diff --git a/.obsidian/plugins/obsidian-git/main.js b/.obsidian/plugins/obsidian-git/main.js index 7140b16..b780486 100644 --- a/.obsidian/plugins/obsidian-git/main.js +++ b/.obsidian/plugins/obsidian-git/main.js @@ -3,32 +3,32 @@ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source visit the plugins github repository (https://github.com/denolehov/obsidian-git) */ -var UP=Object.create;var Oo=Object.defineProperty;var GP=Object.getOwnPropertyDescriptor;var zP=Object.getOwnPropertyNames;var VP=Object.getPrototypeOf,WP=Object.prototype.hasOwnProperty;var jv=e=>{throw TypeError(e)};var qP=(e,t,r)=>t in e?Oo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var YP=(e,t)=>()=>(e&&(t=e(e=0)),t);var I=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),XP=(e,t)=>{for(var r in t)Oo(e,r,{get:t[r],enumerable:!0})},Bv=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of zP(t))!WP.call(e,i)&&i!==r&&Oo(e,i,{get:()=>t[i],enumerable:!(n=GP(t,i))||n.enumerable});return e};var ze=(e,t,r)=>(r=e!=null?UP(VP(e)):{},Bv(t||!e||!e.__esModule?Oo(r,"default",{value:e,enumerable:!0}):r,e)),ZP=e=>Bv(Oo({},"__esModule",{value:!0}),e);var Cr=(e,t,r)=>qP(e,typeof t!="symbol"?t+"":t,r),Hv=(e,t,r)=>t.has(e)||jv("Cannot "+r);var Bt=(e,t,r)=>(Hv(e,t,"read from private field"),r?r.call(e):t.get(e)),Pc=(e,t,r)=>t.has(e)?jv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Rc=(e,t,r,n)=>(Hv(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var zv=I(Mc=>{"use strict";g();Mc.byteLength=JP;Mc.toByteArray=eR;Mc.fromByteArray=nR;var dn=[],Pr=[],KP=typeof Uint8Array!="undefined"?Uint8Array:Array,Qd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Xi=0,Uv=Qd.length;Xi0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function JP(e){var t=Gv(e),r=t[0],n=t[1];return(r+n)*3/4-n}function QP(e,t,r){return(t+r)*3/4-r}function eR(e){var t,r=Gv(e),n=r[0],i=r[1],a=new KP(QP(e,n,i)),s=0,o=i>0?n-4:n,c;for(c=0;c>16&255,a[s++]=t>>8&255,a[s++]=t&255;return i===2&&(t=Pr[e.charCodeAt(c)]<<2|Pr[e.charCodeAt(c+1)]>>4,a[s++]=t&255),i===1&&(t=Pr[e.charCodeAt(c)]<<10|Pr[e.charCodeAt(c+1)]<<4|Pr[e.charCodeAt(c+2)]>>2,a[s++]=t>>8&255,a[s++]=t&255),a}function tR(e){return dn[e>>18&63]+dn[e>>12&63]+dn[e>>6&63]+dn[e&63]}function rR(e,t,r){for(var n,i=[],a=t;ao?o:s+a));return n===1?(t=e[r-1],i.push(dn[t>>2]+dn[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(dn[t>>10]+dn[t>>4&63]+dn[t<<2&63]+"=")),i.join("")}});var Vv=I(eh=>{g();eh.read=function(e,t,r,n,i){var a,s,o=i*8-n-1,c=(1<>1,u=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,a=h&(1<<-u)-1,h>>=-u,u+=o;u>0;a=a*256+e[t+f],f+=d,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=n;u>0;s=s*256+e[t+f],f+=d,u-=8);if(a===0)a=1-l;else{if(a===c)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-l}return(h?-1:1)*s*Math.pow(2,a-n)};eh.write=function(e,t,r,n,i,a){var s,o,c,l=a*8-i-1,u=(1<>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,p=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+f>=1?t+=d/c:t+=d*Math.pow(2,1-f),t*c>=2&&(s++,c/=2),s+f>=u?(o=0,s=u):s+f>=1?(o=(t*c-1)*Math.pow(2,i),s=s+f):(o=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=o&255,h+=p,o/=256,i-=8);for(s=s<0;e[r+h]=s&255,h+=p,s/=256,l-=8);e[r+h-p]|=m*128}});var ch=I(Za=>{"use strict";g();var th=zv(),Ya=Vv(),Wv=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Za.Buffer=M;Za.SlowBuffer=cR;Za.INSPECT_MAX_BYTES=50;var Oc=2147483647;Za.kMaxLength=Oc;M.TYPED_ARRAY_SUPPORT=iR();!M.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function iR(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(M.prototype,"parent",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.buffer}});Object.defineProperty(M.prototype,"offset",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.byteOffset}});function Ln(e){if(e>Oc)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,M.prototype),t}function M(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ah(e)}return Zv(e,t,r)}M.poolSize=8192;function Zv(e,t,r){if(typeof e=="string")return sR(e,t);if(ArrayBuffer.isView(e))return oR(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(hn(e,ArrayBuffer)||e&&hn(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(hn(e,SharedArrayBuffer)||e&&hn(e.buffer,SharedArrayBuffer)))return nh(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return M.from(n,t,r);let i=lR(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return M.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}M.from=function(e,t,r){return Zv(e,t,r)};Object.setPrototypeOf(M.prototype,Uint8Array.prototype);Object.setPrototypeOf(M,Uint8Array);function Kv(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function aR(e,t,r){return Kv(e),e<=0?Ln(e):t!==void 0?typeof r=="string"?Ln(e).fill(t,r):Ln(e).fill(t):Ln(e)}M.alloc=function(e,t,r){return aR(e,t,r)};function ah(e){return Kv(e),Ln(e<0?0:sh(e)|0)}M.allocUnsafe=function(e){return ah(e)};M.allocUnsafeSlow=function(e){return ah(e)};function sR(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!M.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=Jv(e,t)|0,n=Ln(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function rh(e){let t=e.length<0?0:sh(e.length)|0,r=Ln(t);for(let n=0;n=Oc)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Oc.toString(16)+" bytes");return e|0}function cR(e){return+e!=e&&(e=0),M.alloc(+e)}M.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==M.prototype};M.compare=function(t,r){if(hn(t,Uint8Array)&&(t=M.from(t,t.offset,t.byteLength)),hn(r,Uint8Array)&&(r=M.from(r,r.offset,r.byteLength)),!M.isBuffer(t)||!M.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,i=r.length;for(let a=0,s=Math.min(n,i);ai.length?(M.isBuffer(s)||(s=M.from(s)),s.copy(i,a)):Uint8Array.prototype.set.call(i,s,a);else if(M.isBuffer(s))s.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=s.length}return i};function Jv(e,t){if(M.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||hn(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return ih(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return o1(e).length;default:if(i)return n?-1:ih(e).length;t=(""+t).toLowerCase(),i=!0}}M.byteLength=Jv;function uR(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return bR(this,t,r);case"utf8":case"utf-8":return e1(this,t,r);case"ascii":return yR(this,t,r);case"latin1":case"binary":return wR(this,t,r);case"base64":return gR(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}M.prototype._isBuffer=!0;function Zi(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}M.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(t+=" ... "),""};Wv&&(M.prototype[Wv]=M.prototype.inspect);M.prototype.compare=function(t,r,n,i,a){if(hn(t,Uint8Array)&&(t=M.from(t,t.offset,t.byteLength)),!M.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;let s=a-i,o=n-r,c=Math.min(s,o),l=this.slice(i,a),u=t.slice(r,n);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,lh(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=M.from(t,n)),M.isBuffer(t))return t.length===0?-1:qv(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):qv(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function qv(e,t,r,n,i){let a=1,s=e.length,o=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,s/=2,o/=2,r/=2}function c(u,f){return a===1?u[f]:u.readUInt16BE(f*a)}let l;if(i){let u=-1;for(l=r;ls&&(r=s-o),l=r;l>=0;l--){let u=!0;for(let f=0;fi&&(n=i)):n=i;let a=t.length;n>a/2&&(n=a/2);let s;for(s=0;s>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((n===void 0||n>a)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let s=!1;for(;;)switch(i){case"hex":return fR(this,t,r,n);case"utf8":case"utf-8":return dR(this,t,r,n);case"ascii":case"latin1":case"binary":return hR(this,t,r,n);case"base64":return pR(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mR(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};M.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function gR(e,t,r){return t===0&&r===e.length?th.fromByteArray(e):th.fromByteArray(e.slice(t,r))}function e1(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:a>223?3:a>191?2:1;if(i+o<=r){let c,l,u,f;switch(o){case 1:a<128&&(s=a);break;case 2:c=e[i+1],(c&192)===128&&(f=(a&31)<<6|c&63,f>127&&(s=f));break;case 3:c=e[i+1],l=e[i+2],(c&192)===128&&(l&192)===128&&(f=(a&15)<<12|(c&63)<<6|l&63,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:c=e[i+1],l=e[i+2],u=e[i+3],(c&192)===128&&(l&192)===128&&(u&192)===128&&(f=(a&15)<<18|(c&63)<<12|(l&63)<<6|u&63,f>65535&&f<1114112&&(s=f))}}s===null?(s=65533,o=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=o}return vR(n)}var Yv=4096;function vR(e){let t=e.length;if(t<=Yv)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let a=t;an&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}M.prototype.readUintLE=M.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||yt(t,r,this.length);let i=this[t],a=1,s=0;for(;++s>>0,r=r>>>0,n||yt(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};M.prototype.readUint8=M.prototype.readUInt8=function(t,r){return t=t>>>0,r||yt(t,1,this.length),this[t]};M.prototype.readUint16LE=M.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||yt(t,2,this.length),this[t]|this[t+1]<<8};M.prototype.readUint16BE=M.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||yt(t,2,this.length),this[t]<<8|this[t+1]};M.prototype.readUint32LE=M.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||yt(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};M.prototype.readUint32BE=M.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||yt(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};M.prototype.readBigUInt64LE=ui(function(t){t=t>>>0,Xa(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Io(t,this.length-8);let i=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(a)<>>0,Xa(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Io(t,this.length-8);let i=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<>>0,r=r>>>0,n||yt(t,r,this.length);let i=this[t],a=1,s=0;for(;++s=a&&(i-=Math.pow(2,8*r)),i};M.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||yt(t,r,this.length);let i=r,a=1,s=this[t+--i];for(;i>0&&(a*=256);)s+=this[t+--i]*a;return a*=128,s>=a&&(s-=Math.pow(2,8*r)),s};M.prototype.readInt8=function(t,r){return t=t>>>0,r||yt(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};M.prototype.readInt16LE=function(t,r){t=t>>>0,r||yt(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};M.prototype.readInt16BE=function(t,r){t=t>>>0,r||yt(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};M.prototype.readInt32LE=function(t,r){return t=t>>>0,r||yt(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};M.prototype.readInt32BE=function(t,r){return t=t>>>0,r||yt(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};M.prototype.readBigInt64LE=ui(function(t){t=t>>>0,Xa(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Io(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<>>0,Xa(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Io(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<>>0,r||yt(t,4,this.length),Ya.read(this,t,!0,23,4)};M.prototype.readFloatBE=function(t,r){return t=t>>>0,r||yt(t,4,this.length),Ya.read(this,t,!1,23,4)};M.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||yt(t,8,this.length),Ya.read(this,t,!0,52,8)};M.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||yt(t,8,this.length),Ya.read(this,t,!1,52,8)};function Kt(e,t,r,n,i,a){if(!M.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}M.prototype.writeUintLE=M.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let o=Math.pow(2,8*n)-1;Kt(this,t,r,n,o,0)}let a=1,s=0;for(this[r]=t&255;++s>>0,n=n>>>0,!i){let o=Math.pow(2,8*n)-1;Kt(this,t,r,n,o,0)}let a=n-1,s=1;for(this[r+a]=t&255;--a>=0&&(s*=256);)this[r+a]=t/s&255;return r+n};M.prototype.writeUint8=M.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,1,255,0),this[r]=t&255,r+1};M.prototype.writeUint16LE=M.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};M.prototype.writeUint16BE=M.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};M.prototype.writeUint32LE=M.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};M.prototype.writeUint32BE=M.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function t1(e,t,r,n,i){s1(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function r1(e,t,r,n,i){s1(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}M.prototype.writeBigUInt64LE=ui(function(t,r=0){return t1(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});M.prototype.writeBigUInt64BE=ui(function(t,r=0){return r1(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});M.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let c=Math.pow(2,8*n-1);Kt(this,t,r,n,c-1,-c)}let a=0,s=1,o=0;for(this[r]=t&255;++a>0)-o&255;return r+n};M.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let c=Math.pow(2,8*n-1);Kt(this,t,r,n,c-1,-c)}let a=n-1,s=1,o=0;for(this[r+a]=t&255;--a>=0&&(s*=256);)t<0&&o===0&&this[r+a+1]!==0&&(o=1),this[r+a]=(t/s>>0)-o&255;return r+n};M.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};M.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};M.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};M.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};M.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Kt(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};M.prototype.writeBigInt64LE=ui(function(t,r=0){return t1(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});M.prototype.writeBigInt64BE=ui(function(t,r=0){return r1(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function n1(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function i1(e,t,r,n,i){return t=+t,r=r>>>0,i||n1(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ya.write(e,t,r,n,23,4),r+4}M.prototype.writeFloatLE=function(t,r,n){return i1(this,t,r,!0,n)};M.prototype.writeFloatBE=function(t,r,n){return i1(this,t,r,!1,n)};function a1(e,t,r,n,i){return t=+t,r=r>>>0,i||n1(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ya.write(e,t,r,n,52,8),r+8}M.prototype.writeDoubleLE=function(t,r,n){return a1(this,t,r,!0,n)};M.prototype.writeDoubleBE=function(t,r,n){return a1(this,t,r,!1,n)};M.prototype.copy=function(t,r,n,i){if(!M.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let a;if(typeof t=="number")for(a=r;a2**32?i=Xv(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Xv(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Xv(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function xR(e,t,r){Xa(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Io(t,e.length-(r+1))}function s1(e,t,r,n,i,a){if(e>r||e3?t===0||t===BigInt(0)?o=`>= 0${s} and < 2${s} ** ${(a+1)*8}${s}`:o=`>= -(2${s} ** ${(a+1)*8-1}${s}) and < 2 ** ${(a+1)*8-1}${s}`:o=`>= ${t}${s} and <= ${r}${s}`,new qa.ERR_OUT_OF_RANGE("value",o,e)}xR(n,i,a)}function Xa(e,t){if(typeof e!="number")throw new qa.ERR_INVALID_ARG_TYPE(t,"number",e)}function Io(e,t,r){throw Math.floor(e)!==e?(Xa(e,r),new qa.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new qa.ERR_BUFFER_OUT_OF_BOUNDS:new qa.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var SR=/[^+/0-9A-Za-z-_]/g;function ER(e){if(e=e.split("=")[0],e=e.trim().replace(SR,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function ih(e,t){t=t||1/0;let r,n=e.length,i=null,a=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function AR(e){let t=[];for(let r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function o1(e){return th.toByteArray(ER(e))}function Ic(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function hn(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function lh(e){return e!==e}var TR=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function ui(e){return typeof BigInt=="undefined"?CR:e}function CR(){throw new Error("BigInt not supported")}});var l1,uh,Buffer,g=YP(()=>{l1=require("obsidian");l1.Platform.isMobileApp?uh=ch().Buffer:uh=global.Buffer;Buffer=uh});var u1=I((XH,c1)=>{"use strict";g();var dr=function(e){if(e=e||{},this.Promise=e.Promise||Promise,this.queues=Object.create(null),this.domainReentrant=e.domainReentrant||!1,this.domainReentrant){if(typeof process=="undefined"||typeof process.domain=="undefined")throw new Error("Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, use a NodeJS version that still implements Domain, or install a browser polyfill.");this.domains=Object.create(null)}this.timeout=e.timeout||dr.DEFAULT_TIMEOUT,this.maxOccupationTime=e.maxOccupationTime||dr.DEFAULT_MAX_OCCUPATION_TIME,this.maxExecutionTime=e.maxExecutionTime||dr.DEFAULT_MAX_EXECUTION_TIME,e.maxPending===1/0||Number.isInteger(e.maxPending)&&e.maxPending>=0?this.maxPending=e.maxPending:this.maxPending=dr.DEFAULT_MAX_PENDING};dr.DEFAULT_TIMEOUT=0;dr.DEFAULT_MAX_OCCUPATION_TIME=0;dr.DEFAULT_MAX_EXECUTION_TIME=0;dr.DEFAULT_MAX_PENDING=1e3;dr.prototype.acquire=function(e,t,r,n){if(Array.isArray(e))return this._acquireBatch(e,t,r,n);if(typeof t!="function")throw new Error("You must pass a function to execute");var i=null,a=null,s=null;typeof r!="function"&&(n=r,r=null,s=new this.Promise(function(b,x){i=b,a=x})),n=n||{};var o=!1,c=null,l=null,u=null,f=this,d=function(b,x,E){l&&(clearTimeout(l),l=null),u&&(clearTimeout(u),u=null),b&&(f.queues[e]&&f.queues[e].length===0&&delete f.queues[e],f.domainReentrant&&delete f.domains[e]),o||(s?x?a(x):i(E):typeof r=="function"&&r(x,E),o=!0),b&&f.queues[e]&&f.queues[e].length>0&&f.queues[e].shift()()},h=function(b){if(o)return d(b);c&&(clearTimeout(c),c=null),f.domainReentrant&&b&&(f.domains[e]=process.domain);var x=n.maxExecutionTime||f.maxExecutionTime;if(x&&(u=setTimeout(function(){f.queues[e]&&d(b,new Error("Maximum execution time is exceeded "+e))},x)),t.length===1){var E=!1;try{t(function(_,k){E||(E=!0,d(b,_,k))})}catch(_){E||(E=!0,d(b,_))}}else f._promiseTry(function(){return t()}).then(function(_){d(b,void 0,_)},function(_){d(b,_)})};f.domainReentrant&&process.domain&&(h=process.domain.bind(h));var p=n.maxPending||f.maxPending;if(!f.queues[e])f.queues[e]=[],h(!0);else if(f.domainReentrant&&process.domain&&process.domain===f.domains[e])h(!1);else if(f.queues[e].length>=p)d(!1,new Error("Too many pending tasks in queue "+e));else{var m=function(){h(!0)};n.skipQueue?f.queues[e].unshift(m):f.queues[e].push(m);var v=n.timeout||f.timeout;v&&(c=setTimeout(function(){c=null,d(!1,new Error("async-lock timed out in queue "+e))},v))}var y=n.maxOccupationTime||f.maxOccupationTime;if(y&&(l=setTimeout(function(){f.queues[e]&&d(!1,new Error("Maximum occupation time is exceeded in queue "+e))},y)),s)return s};dr.prototype._acquireBatch=function(e,t,r,n){typeof r!="function"&&(n=r,r=null);var i=this,a=function(o,c){return function(l){i.acquire(o,c,l,n)}},s=e.reduceRight(function(o,c){return a(c,o)},t);if(typeof r=="function")s(r);else return new this.Promise(function(o,c){s.length===1?s(function(l,u){l?c(l):o(u)}):o(s())})};dr.prototype.isBusy=function(e){return e?!!this.queues[e]:Object.keys(this.queues).length>0};dr.prototype._promiseTry=function(e){try{return this.Promise.resolve(e())}catch(t){return this.Promise.reject(t)}};c1.exports=dr});var d1=I((KH,f1)=>{"use strict";g();f1.exports=u1()});var h1=I((QH,fh)=>{g();typeof Object.create=="function"?fh.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:fh.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var hh=I((dh,m1)=>{g();var Fc=ch(),pn=Fc.Buffer;function p1(e,t){for(var r in e)t[r]=e[r]}pn.from&&pn.alloc&&pn.allocUnsafe&&pn.allocUnsafeSlow?m1.exports=Fc:(p1(Fc,dh),dh.Buffer=Ki);function Ki(e,t,r){return pn(e,t,r)}Ki.prototype=Object.create(pn.prototype);p1(pn,Ki);Ki.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return pn(e,t,r)};Ki.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=pn(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};Ki.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return pn(e)};Ki.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Fc.SlowBuffer(e)}});var y1=I((rU,v1)=>{g();var g1=hh().Buffer;function $c(e,t){this._block=g1.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}$c.prototype.update=function(e,t){typeof e=="string"&&(t=t||"utf8",e=g1.from(e,t));for(var r=this._block,n=this._blockSize,i=e.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a};$c.prototype._update=function(){throw new Error("_update must be implemented by subclass")};v1.exports=$c});var _1=I((iU,b1)=>{g();var PR=h1(),w1=y1(),RR=hh().Buffer,MR=[1518500249,1859775393,-1894007588,-899497514],OR=new Array(80);function Fo(){this.init(),this._w=OR,w1.call(this,64,56)}PR(Fo,w1);Fo.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function IR(e){return e<<1|e>>>31}function FR(e){return e<<5|e>>>27}function $R(e){return e<<30|e>>>2}function LR(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Fo.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,i=this._c|0,a=this._d|0,s=this._e|0,o=0;o<16;++o)t[o]=e.readInt32BE(o*4);for(;o<80;++o)t[o]=IR(t[o-3]^t[o-8]^t[o-14]^t[o-16]);for(var c=0;c<80;++c){var l=~~(c/20),u=FR(r)+LR(l,n,i,a)+s+t[c]+MR[l]|0;s=a,a=i,i=$R(n),n=r,r=u}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0};Fo.prototype._hash=function(){var e=RR.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};b1.exports=Fo});var S1=I(ph=>{g();var x1;(function(e){typeof DO_NOT_EXPORT_CRC=="undefined"?typeof ph=="object"?e(ph):typeof define=="function"&&define.amd?define(function(){var t={};return e(t),t}):e(x1={}):e(x1={})})(function(e){e.version="1.2.2";function t(){for(var w=0,A=new Array(256),S=0;S!=256;++S)w=S,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,A[S]=w;return typeof Int32Array!="undefined"?new Int32Array(A):A}var r=t();function n(w){var A=0,S=0,T=0,P=typeof Int32Array!="undefined"?new Int32Array(4096):new Array(4096);for(T=0;T!=256;++T)P[T]=w[T];for(T=0;T!=256;++T)for(S=w[T],A=256+T;A<4096;A+=256)S=P[A]=S>>>8^w[S&255];var O=[];for(T=1;T!=16;++T)O[T-1]=typeof Int32Array!="undefined"?P.subarray(T*256,T*256+256):P.slice(T*256,T*256+256);return O}var i=n(r),a=i[0],s=i[1],o=i[2],c=i[3],l=i[4],u=i[5],f=i[6],d=i[7],h=i[8],p=i[9],m=i[10],v=i[11],y=i[12],b=i[13],x=i[14];function E(w,A){for(var S=A^-1,T=0,P=w.length;T>>8^r[(S^w.charCodeAt(T++))&255];return~S}function _(w,A){for(var S=A^-1,T=w.length-15,P=0;P>8&255]^y[w[P++]^S>>16&255]^v[w[P++]^S>>>24]^m[w[P++]]^p[w[P++]]^h[w[P++]]^d[w[P++]]^f[w[P++]]^u[w[P++]]^l[w[P++]]^c[w[P++]]^o[w[P++]]^s[w[P++]]^a[w[P++]]^r[w[P++]];for(T+=15;P>>8^r[(S^w[P++])&255];return~S}function k(w,A){for(var S=A^-1,T=0,P=w.length,O=0,j=0;T>>8^r[(S^O)&255]:O<2048?(S=S>>>8^r[(S^(192|O>>6&31))&255],S=S>>>8^r[(S^(128|O&63))&255]):O>=55296&&O<57344?(O=(O&1023)+64,j=w.charCodeAt(T++)&1023,S=S>>>8^r[(S^(240|O>>8&7))&255],S=S>>>8^r[(S^(128|O>>2&63))&255],S=S>>>8^r[(S^(128|j>>6&15|(O&3)<<4))&255],S=S>>>8^r[(S^(128|j&63))&255]):(S=S>>>8^r[(S^(224|O>>12&15))&255],S=S>>>8^r[(S^(128|O>>6&63))&255],S=S>>>8^r[(S^(128|O&63))&255]);return~S}e.table=r,e.bstr=E,e.buf=_,e.str=k})});var Dn=I(Ht=>{"use strict";g();var DR=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function NR(e,t){return Object.prototype.hasOwnProperty.call(e,t)}Ht.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)NR(r,n)&&(e[n]=r[n])}}return e};Ht.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var jR={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+n),i);return}for(var a=0;a{"use strict";g();var HR=Dn(),UR=4,E1=0,A1=1,GR=2;function Ja(e){for(var t=e.length;--t>=0;)e[t]=0}var zR=0,M1=1,VR=2,WR=3,qR=258,_h=29,Bo=256,Lo=Bo+1+_h,Ka=30,xh=19,O1=2*Lo+1,Ji=15,mh=16,YR=7,Sh=256,I1=16,F1=17,$1=18,wh=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Lc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],XR=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L1=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ZR=512,Nn=new Array((Lo+2)*2);Ja(Nn);var $o=new Array(Ka*2);Ja($o);var Do=new Array(ZR);Ja(Do);var No=new Array(qR-WR+1);Ja(No);var Eh=new Array(_h);Ja(Eh);var Dc=new Array(Ka);Ja(Dc);function gh(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var D1,N1,j1;function vh(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function B1(e){return e<256?Do[e]:Do[256+(e>>>7)]}function jo(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Jt(e,t,r){e.bi_valid>mh-r?(e.bi_buf|=t<>mh-e.bi_valid,e.bi_valid+=r-mh):(e.bi_buf|=t<>>=1,r<<=1;while(--t>0);return r>>>1}function KR(e){e.bi_valid===16?(jo(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function JR(e,t){var r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,f,d,h,p,m=0;for(d=0;d<=Ji;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;lc&&(d=c,m++),r[u*2+1]=d,!(u>n)&&(e.bl_count[d]++,h=0,u>=o&&(h=s[u-o]),p=r[u*2],e.opt_len+=p*(d+h),a&&(e.static_len+=p*(i[u*2+1]+h)));if(m!==0){do{for(d=c-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[c]--,m-=2}while(m>0);for(d=c;d!==0;d--)for(u=e.bl_count[d];u!==0;)f=e.heap[--l],!(f>n)&&(r[f*2+1]!==d&&(e.opt_len+=(d-r[f*2+1])*r[f*2],r[f*2+1]=d),u--)}}function U1(e,t,r){var n=new Array(Ji+1),i=0,a,s;for(a=1;a<=Ji;a++)n[a]=i=i+r[a-1]<<1;for(s=0;s<=t;s++){var o=e[s*2+1];o!==0&&(e[s*2]=H1(n[o]++,o))}}function QR(){var e,t,r,n,i,a=new Array(Ji+1);for(r=0,n=0;n<_h-1;n++)for(Eh[n]=r,e=0;e<1<>=7;n8?jo(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function e5(e,t,r,n){z1(e),n&&(jo(e,r),jo(e,~r)),HR.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function k1(e,t,r,n){var i=t*2,a=r*2;return e[i]>1;s>=1;s--)yh(e,r,s);l=a;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],yh(e,r,1),o=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=o,r[l*2]=r[s*2]+r[o*2],e.depth[l]=(e.depth[s]>=e.depth[o]?e.depth[s]:e.depth[o])+1,r[s*2+1]=r[o*2+1]=l,e.heap[1]=l++,yh(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],JR(e,t),U1(r,c,e.bl_count)}function C1(e,t,r){var n,i=-1,a,s=t[0*2+1],o=0,c=7,l=4;for(s===0&&(c=138,l=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)a=s,s=t[(n+1)*2+1],!(++o=3&&e.bl_tree[L1[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function r5(e,t,r,n){var i;for(Jt(e,t-257,5),Jt(e,r-1,5),Jt(e,n-4,4),i=0;i>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return E1;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return A1;for(r=32;r0?(e.strm.data_type===GR&&(e.strm.data_type=n5(e)),bh(e,e.l_desc),bh(e,e.d_desc),s=t5(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=r+5,r+4<=i&&t!==-1?V1(e,t,r,n):e.strategy===UR||a===i?(Jt(e,(M1<<1)+(n?1:0),3),T1(e,Nn,$o)):(Jt(e,(VR<<1)+(n?1:0),3),r5(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),T1(e,e.dyn_ltree,e.dyn_dtree)),G1(e),n&&z1(e)}function o5(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(No[r]+Bo+1)*2]++,e.dyn_dtree[B1(t)*2]++),e.last_lit===e.lit_bufsize-1}Qa._tr_init=i5;Qa._tr_stored_block=V1;Qa._tr_flush_block=s5;Qa._tr_tally=o5;Qa._tr_align=a5});var Ah=I((dU,q1)=>{"use strict";g();function l5(e,t,r,n){for(var i=e&65535|0,a=e>>>16&65535|0,s=0;r!==0;){s=r>2e3?2e3:r,r-=s;do i=i+t[n++]|0,a=a+i|0;while(--s);i%=65521,a%=65521}return i|a<<16|0}q1.exports=l5});var kh=I((pU,Y1)=>{"use strict";g();function c5(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var u5=c5();function f5(e,t,r,n){var i=u5,a=n+r;e^=-1;for(var s=n;s>>8^i[(e^t[s])&255];return e^-1}Y1.exports=f5});var Nc=I((gU,X1)=>{"use strict";g();X1.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var iy=I(yn=>{"use strict";g();var Ut=Dn(),Rr=W1(),Q1=Ah(),fi=kh(),d5=Nc(),ra=0,h5=1,p5=3,gi=4,Z1=5,vn=0,K1=1,Mr=-2,m5=-3,Th=-5,g5=-1,v5=1,jc=2,y5=3,w5=4,b5=0,_5=2,Gc=8,x5=9,S5=15,E5=8,A5=29,k5=256,Ph=k5+1+A5,T5=30,C5=19,P5=2*Ph+1,R5=15,we=3,pi=258,Zr=pi+we+1,M5=32,zc=42,Rh=69,Bc=73,Hc=91,Uc=103,Qi=113,Uo=666,pt=1,Go=2,ea=3,rs=4,O5=3;function mi(e,t){return e.msg=d5[t],t}function J1(e){return(e<<1)-(e>4?9:0)}function hi(e){for(var t=e.length;--t>=0;)e[t]=0}function di(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(Ut.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function xt(e,t){Rr._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,di(e.strm)}function Ae(e,t){e.pending_buf[e.pending++]=t}function Ho(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function I5(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,Ut.arraySet(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=Q1(e.adler,t,i,r):e.state.wrap===2&&(e.adler=fi(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function ey(e,t){var r=e.max_chain_length,n=e.strstart,i,a,s=e.prev_length,o=e.nice_match,c=e.strstart>e.w_size-Zr?e.strstart-(e.w_size-Zr):0,l=e.window,u=e.w_mask,f=e.prev,d=e.strstart+pi,h=l[n+s-1],p=l[n+s];e.prev_length>=e.good_match&&(r>>=2),o>e.lookahead&&(o=e.lookahead);do if(i=t,!(l[i+s]!==p||l[i+s-1]!==h||l[i]!==l[n]||l[++i]!==l[n+1])){n+=2,i++;do;while(l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&ns){if(e.match_start=t,s=a,a>=o)break;h=l[n+s-1],p=l[n+s]}}while((t=f[t&u])>c&&--r!==0);return s<=e.lookahead?s:e.lookahead}function ta(e){var t=e.w_size,r,n,i,a,s;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Zr)){Ut.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do i=e.head[--r],e.head[r]=i>=t?i-t:0;while(--n);n=t,r=n;do i=e.prev[--r],e.prev[r]=i>=t?i-t:0;while(--n);a+=t}if(e.strm.avail_in===0)break;if(n=I5(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=we)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(ta(e),e.lookahead===0&&t===ra)return pt;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,xt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Zr&&(xt(e,!1),e.strm.avail_out===0))return pt}return e.insert=0,t===gi?(xt(e,!0),e.strm.avail_out===0?ea:rs):(e.strstart>e.block_start&&(xt(e,!1),e.strm.avail_out===0),pt)}function Ch(e,t){for(var r,n;;){if(e.lookahead=we&&(e.ins_h=(e.ins_h<=we)if(n=Rr._tr_tally(e,e.strstart-e.match_start,e.match_length-we),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=we){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=we&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=we-1)),e.prev_length>=we&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-we,n=Rr._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-we),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<=we&&e.strstart>0&&(i=e.strstart-1,n=s[i],n===s[++i]&&n===s[++i]&&n===s[++i])){a=e.strstart+pi;do;while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=we?(r=Rr._tr_tally(e,1,e.match_length-we),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Rr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(xt(e,!1),e.strm.avail_out===0))return pt}return e.insert=0,t===gi?(xt(e,!0),e.strm.avail_out===0?ea:rs):e.last_lit&&(xt(e,!1),e.strm.avail_out===0)?pt:Go}function L5(e,t){for(var r;;){if(e.lookahead===0&&(ta(e),e.lookahead===0)){if(t===ra)return pt;break}if(e.match_length=0,r=Rr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(xt(e,!1),e.strm.avail_out===0))return pt}return e.insert=0,t===gi?(xt(e,!0),e.strm.avail_out===0?ea:rs):e.last_lit&&(xt(e,!1),e.strm.avail_out===0)?pt:Go}function gn(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var ts;ts=[new gn(0,0,0,0,F5),new gn(4,4,8,4,Ch),new gn(4,5,16,8,Ch),new gn(4,6,32,32,Ch),new gn(4,4,16,16,es),new gn(8,16,32,32,es),new gn(8,16,128,128,es),new gn(8,32,128,256,es),new gn(32,128,258,1024,es),new gn(32,258,258,4096,es)];function D5(e){e.window_size=2*e.w_size,hi(e.head),e.max_lazy_match=ts[e.level].max_lazy,e.good_match=ts[e.level].good_length,e.nice_match=ts[e.level].nice_length,e.max_chain_length=ts[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=we-1,e.match_available=0,e.ins_h=0}function N5(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Gc,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Ut.Buf16(P5*2),this.dyn_dtree=new Ut.Buf16((2*T5+1)*2),this.bl_tree=new Ut.Buf16((2*C5+1)*2),hi(this.dyn_ltree),hi(this.dyn_dtree),hi(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Ut.Buf16(R5+1),this.heap=new Ut.Buf16(2*Ph+1),hi(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Ut.Buf16(2*Ph+1),hi(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ty(e){var t;return!e||!e.state?mi(e,Mr):(e.total_in=e.total_out=0,e.data_type=_5,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?zc:Qi,e.adler=t.wrap===2?0:1,t.last_flush=ra,Rr._tr_init(t),vn)}function ry(e){var t=ty(e);return t===vn&&D5(e.state),t}function j5(e,t){return!e||!e.state||e.state.wrap!==2?Mr:(e.state.gzhead=t,vn)}function ny(e,t,r,n,i,a){if(!e)return Mr;var s=1;if(t===g5&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>x5||r!==Gc||n<8||n>15||t<0||t>9||a<0||a>w5)return mi(e,Mr);n===8&&(n=9);var o=new N5;return e.state=o,o.strm=e,o.wrap=s,o.gzhead=null,o.w_bits=n,o.w_size=1<Z1||t<0)return e?mi(e,Mr):Mr;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===Uo&&t!==gi)return mi(e,e.avail_out===0?Th:Mr);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===zc)if(n.wrap===2)e.adler=0,Ae(n,31),Ae(n,139),Ae(n,8),n.gzhead?(Ae(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Ae(n,n.gzhead.time&255),Ae(n,n.gzhead.time>>8&255),Ae(n,n.gzhead.time>>16&255),Ae(n,n.gzhead.time>>24&255),Ae(n,n.level===9?2:n.strategy>=jc||n.level<2?4:0),Ae(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Ae(n,n.gzhead.extra.length&255),Ae(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=fi(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Rh):(Ae(n,0),Ae(n,0),Ae(n,0),Ae(n,0),Ae(n,0),Ae(n,n.level===9?2:n.strategy>=jc||n.level<2?4:0),Ae(n,O5),n.status=Qi);else{var s=Gc+(n.w_bits-8<<4)<<8,o=-1;n.strategy>=jc||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,s|=o<<6,n.strstart!==0&&(s|=M5),s+=31-s%31,n.status=Qi,Ho(n,s),n.strstart!==0&&(Ho(n,e.adler>>>16),Ho(n,e.adler&65535)),e.adler=1}if(n.status===Rh)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=fi(e.adler,n.pending_buf,n.pending-i,i)),di(e),i=n.pending,n.pending===n.pending_buf_size));)Ae(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=fi(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=Bc)}else n.status=Bc;if(n.status===Bc)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=fi(e.adler,n.pending_buf,n.pending-i,i)),di(e),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindexi&&(e.adler=fi(e.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.gzindex=0,n.status=Hc)}else n.status=Hc;if(n.status===Hc)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=fi(e.adler,n.pending_buf,n.pending-i,i)),di(e),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindexi&&(e.adler=fi(e.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.status=Uc)}else n.status=Uc;if(n.status===Uc&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&di(e),n.pending+2<=n.pending_buf_size&&(Ae(n,e.adler&255),Ae(n,e.adler>>8&255),e.adler=0,n.status=Qi)):n.status=Qi),n.pending!==0){if(di(e),e.avail_out===0)return n.last_flush=-1,vn}else if(e.avail_in===0&&J1(t)<=J1(r)&&t!==gi)return mi(e,Th);if(n.status===Uo&&e.avail_in!==0)return mi(e,Th);if(e.avail_in!==0||n.lookahead!==0||t!==ra&&n.status!==Uo){var c=n.strategy===jc?L5(n,t):n.strategy===y5?$5(n,t):ts[n.level].func(n,t);if((c===ea||c===rs)&&(n.status=Uo),c===pt||c===ea)return e.avail_out===0&&(n.last_flush=-1),vn;if(c===Go&&(t===h5?Rr._tr_align(n):t!==Z1&&(Rr._tr_stored_block(n,0,0,!1),t===p5&&(hi(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),di(e),e.avail_out===0))return n.last_flush=-1,vn}return t!==gi?vn:n.wrap<=0?K1:(n.wrap===2?(Ae(n,e.adler&255),Ae(n,e.adler>>8&255),Ae(n,e.adler>>16&255),Ae(n,e.adler>>24&255),Ae(n,e.total_in&255),Ae(n,e.total_in>>8&255),Ae(n,e.total_in>>16&255),Ae(n,e.total_in>>24&255)):(Ho(n,e.adler>>>16),Ho(n,e.adler&65535)),di(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?vn:K1)}function U5(e){var t;return!e||!e.state?Mr:(t=e.state.status,t!==zc&&t!==Rh&&t!==Bc&&t!==Hc&&t!==Uc&&t!==Qi&&t!==Uo?mi(e,Mr):(e.state=null,t===Qi?mi(e,m5):vn))}function G5(e,t){var r=t.length,n,i,a,s,o,c,l,u;if(!e||!e.state||(n=e.state,s=n.wrap,s===2||s===1&&n.status!==zc||n.lookahead))return Mr;for(s===1&&(e.adler=Q1(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(s===0&&(hi(n.head),n.strstart=0,n.block_start=0,n.insert=0),u=new Ut.Buf8(n.w_size),Ut.arraySet(u,t,r-n.w_size,n.w_size,0),t=u,r=n.w_size),o=e.avail_in,c=e.next_in,l=e.input,e.avail_in=r,e.next_in=0,e.input=t,ta(n);n.lookahead>=we;){i=n.strstart,a=n.lookahead-(we-1);do n.ins_h=(n.ins_h<{"use strict";g();var Vc=Dn(),ay=!0,sy=!0;try{String.fromCharCode.apply(null,[0])}catch(e){ay=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){sy=!1}var zo=new Vc.Buf8(256);for(jn=0;jn<256;jn++)zo[jn]=jn>=252?6:jn>=248?5:jn>=240?4:jn>=224?3:jn>=192?2:1;var jn;zo[254]=zo[254]=1;ns.string2buf=function(e){var t,r,n,i,a,s=e.length,o=0;for(i=0;i>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t};function oy(e,t){if(t<65534&&(e.subarray&&sy||!e.subarray&&ay))return String.fromCharCode.apply(null,Vc.shrinkBuf(e,t));for(var r="",n=0;n4){o[n++]=65533,r+=a-1;continue}for(i&=a===2?31:a===3?15:7;a>1&&r1){o[n++]=65533;continue}i<65536?o[n++]=i:(i-=65536,o[n++]=55296|i>>10&1023,o[n++]=56320|i&1023)}return oy(o,n)};ns.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+zo[e[r]]>t?r:t}});var Oh=I((xU,ly)=>{"use strict";g();function z5(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}ly.exports=z5});var dy=I(qo=>{"use strict";g();var Vo=iy(),Wo=Dn(),Fh=Mh(),$h=Nc(),V5=Oh(),fy=Object.prototype.toString,W5=0,Ih=4,is=0,cy=1,uy=2,q5=-1,Y5=0,X5=8;function na(e){if(!(this instanceof na))return new na(e);this.options=Wo.assign({level:q5,method:X5,chunkSize:16384,windowBits:15,memLevel:8,strategy:Y5,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new V5,this.strm.avail_out=0;var r=Vo.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==is)throw new Error($h[r]);if(t.header&&Vo.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=Fh.string2buf(t.dictionary):fy.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Vo.deflateSetDictionary(this.strm,n),r!==is)throw new Error($h[r]);this._dict_set=!0}}na.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i,a;if(this.ended)return!1;a=t===~~t?t:t===!0?Ih:W5,typeof e=="string"?r.input=Fh.string2buf(e):fy.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Wo.Buf8(n),r.next_out=0,r.avail_out=n),i=Vo.deflate(r,a),i!==cy&&i!==is)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(a===Ih||a===uy))&&(this.options.to==="string"?this.onData(Fh.buf2binstring(Wo.shrinkBuf(r.output,r.next_out))):this.onData(Wo.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==cy);return a===Ih?(i=Vo.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===is):(a===uy&&(this.onEnd(is),r.avail_out=0),!0)};na.prototype.onData=function(e){this.chunks.push(e)};na.prototype.onEnd=function(e){e===is&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Wo.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Lh(e,t){var r=new na(t);if(r.push(e,!0),r.err)throw r.msg||$h[r.err];return r.result}function Z5(e,t){return t=t||{},t.raw=!0,Lh(e,t)}function K5(e,t){return t=t||{},t.gzip=!0,Lh(e,t)}qo.Deflate=na;qo.deflate=Lh;qo.deflateRaw=Z5;qo.gzip=K5});var py=I((kU,hy)=>{"use strict";g();var Wc=30,J5=12;hy.exports=function(t,r){var n,i,a,s,o,c,l,u,f,d,h,p,m,v,y,b,x,E,_,k,w,A,S,T,P;n=t.state,i=t.next_in,T=t.input,a=i+(t.avail_in-5),s=t.next_out,P=t.output,o=s-(r-t.avail_out),c=s+(t.avail_out-257),l=n.dmax,u=n.wsize,f=n.whave,d=n.wnext,h=n.window,p=n.hold,m=n.bits,v=n.lencode,y=n.distcode,b=(1<>>24,p>>>=_,m-=_,_=E>>>16&255,_===0)P[s++]=E&65535;else if(_&16){k=E&65535,_&=15,_&&(m<_&&(p+=T[i++]<>>=_,m-=_),m<15&&(p+=T[i++]<>>24,p>>>=_,m-=_,_=E>>>16&255,_&16){if(w=E&65535,_&=15,m<_&&(p+=T[i++]<l){t.msg="invalid distance too far back",n.mode=Wc;break e}if(p>>>=_,m-=_,_=s-o,w>_){if(_=w-_,_>f&&n.sane){t.msg="invalid distance too far back",n.mode=Wc;break e}if(A=0,S=h,d===0){if(A+=u-_,_2;)P[s++]=S[A++],P[s++]=S[A++],P[s++]=S[A++],k-=3;k&&(P[s++]=S[A++],k>1&&(P[s++]=S[A++]))}else{A=s-w;do P[s++]=P[A++],P[s++]=P[A++],P[s++]=P[A++],k-=3;while(k>2);k&&(P[s++]=P[A++],k>1&&(P[s++]=P[A++]))}}else if(_&64){t.msg="invalid distance code",n.mode=Wc;break e}else{E=y[(E&65535)+(p&(1<<_)-1)];continue r}break}}else if(_&64)if(_&32){n.mode=J5;break e}else{t.msg="invalid literal/length code",n.mode=Wc;break e}else{E=v[(E&65535)+(p&(1<<_)-1)];continue t}break}}while(i>3,i-=k,m-=k<<3,p&=(1<{"use strict";g();var my=Dn(),as=15,gy=852,vy=592,yy=0,Dh=1,wy=2,Q5=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],e6=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],t6=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],r6=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];by.exports=function(t,r,n,i,a,s,o,c){var l=c.bits,u=0,f=0,d=0,h=0,p=0,m=0,v=0,y=0,b=0,x=0,E,_,k,w,A,S=null,T=0,P,O=new my.Buf16(as+1),j=new my.Buf16(as+1),D=null,Q=0,de,ee,J;for(u=0;u<=as;u++)O[u]=0;for(f=0;f=1&&O[h]===0;h--);if(p>h&&(p=h),h===0)return a[s++]=1<<24|64<<16|0,a[s++]=1<<24|64<<16|0,c.bits=1,0;for(d=1;d0&&(t===yy||h!==1))return-1;for(j[1]=0,u=1;ugy||t===wy&&b>vy)return 1;for(;;){de=u-v,o[f]P?(ee=D[Q+o[f]],J=S[T+o[f]]):(ee=96,J=0),E=1<>v)+_]=de<<24|ee<<16|J|0;while(_!==0);for(E=1<>=1;if(E!==0?(x&=E-1,x+=E):x=0,f++,--O[u]===0){if(u===h)break;u=r[n+o[f]]}if(u>p&&(x&w)!==k){for(v===0&&(v=p),A+=d,m=u-v,y=1<gy||t===wy&&b>vy)return 1;k=x&w,a[k]=p<<24|m<<16|A-s|0}}return x!==0&&(a[A+x]=u-v<<24|64<<16|0),c.bits=p,0}});var rw=I(Kr=>{"use strict";g();var hr=Dn(),Gh=Ah(),wn=kh(),n6=py(),Yo=_y(),i6=0,qy=1,Yy=2,xy=4,a6=5,qc=6,ia=0,s6=1,o6=2,Or=-2,Xy=-3,zh=-4,l6=-5,Sy=8,Zy=1,Ey=2,Ay=3,ky=4,Ty=5,Cy=6,Py=7,Ry=8,My=9,Oy=10,Zc=11,Bn=12,Nh=13,Iy=14,jh=15,Fy=16,$y=17,Ly=18,Dy=19,Yc=20,Xc=21,Ny=22,jy=23,By=24,Hy=25,Uy=26,Bh=27,Gy=28,zy=29,je=30,Vh=31,c6=32,u6=852,f6=592,d6=15,h6=d6;function Vy(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function p6(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new hr.Buf16(320),this.work=new hr.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Ky(e){var t;return!e||!e.state?Or:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Zy,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new hr.Buf32(u6),t.distcode=t.distdyn=new hr.Buf32(f6),t.sane=1,t.back=-1,ia)}function Jy(e){var t;return!e||!e.state?Or:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Ky(e))}function Qy(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Or:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Jy(e))}function ew(e,t){var r,n;return e?(n=new p6,e.state=n,n.window=null,r=Qy(e,t),r!==ia&&(e.state=null),r):Or}function m6(e){return ew(e,h6)}var Wy=!0,Hh,Uh;function g6(e){if(Wy){var t;for(Hh=new hr.Buf32(512),Uh=new hr.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Yo(qy,e.lens,0,288,Hh,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Yo(Yy,e.lens,0,32,Uh,0,e.work,{bits:5}),Wy=!1}e.lencode=Hh,e.lenbits=9,e.distcode=Uh,e.distbits=5}function tw(e,t,r,n){var i,a=e.state;return a.window===null&&(a.wsize=1<=a.wsize?(hr.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),hr.arraySet(a.window,t,r-n,i,a.wnext),n-=i,n?(hr.arraySet(a.window,t,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=wn(r.check,S,2,0),l=0,u=0,r.mode=Ey;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",r.mode=je;break}if((l&15)!==Sy){e.msg="unknown compression method",r.mode=je;break}if(l>>>=4,u-=4,w=(l&15)+8,r.wbits===0)r.wbits=w;else if(w>r.wbits){e.msg="invalid window size",r.mode=je;break}r.dmax=1<>8&1),r.flags&512&&(S[0]=l&255,S[1]=l>>>8&255,r.check=wn(r.check,S,2,0)),l=0,u=0,r.mode=Ay;case Ay:for(;u<32;){if(o===0)break e;o--,l+=n[a++]<>>8&255,S[2]=l>>>16&255,S[3]=l>>>24&255,r.check=wn(r.check,S,4,0)),l=0,u=0,r.mode=ky;case ky:for(;u<16;){if(o===0)break e;o--,l+=n[a++]<>8),r.flags&512&&(S[0]=l&255,S[1]=l>>>8&255,r.check=wn(r.check,S,2,0)),l=0,u=0,r.mode=Ty;case Ty:if(r.flags&1024){for(;u<16;){if(o===0)break e;o--,l+=n[a++]<>>8&255,r.check=wn(r.check,S,2,0)),l=0,u=0}else r.head&&(r.head.extra=null);r.mode=Cy;case Cy:if(r.flags&1024&&(h=r.length,h>o&&(h=o),h&&(r.head&&(w=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),hr.arraySet(r.head.extra,n,a,h,w)),r.flags&512&&(r.check=wn(r.check,n,h,a)),o-=h,a+=h,r.length-=h),r.length))break e;r.length=0,r.mode=Py;case Py:if(r.flags&2048){if(o===0)break e;h=0;do w=n[a+h++],r.head&&w&&r.length<65536&&(r.head.name+=String.fromCharCode(w));while(w&&h>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Bn;break;case Oy:for(;u<32;){if(o===0)break e;o--,l+=n[a++]<>>=u&7,u-=u&7,r.mode=Bh;break}for(;u<3;){if(o===0)break e;o--,l+=n[a++]<>>=1,u-=1,l&3){case 0:r.mode=Iy;break;case 1:if(g6(r),r.mode=Yc,t===qc){l>>>=2,u-=2;break e}break;case 2:r.mode=$y;break;case 3:e.msg="invalid block type",r.mode=je}l>>>=2,u-=2;break;case Iy:for(l>>>=u&7,u-=u&7;u<32;){if(o===0)break e;o--,l+=n[a++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=je;break}if(r.length=l&65535,l=0,u=0,r.mode=jh,t===qc)break e;case jh:r.mode=Fy;case Fy:if(h=r.length,h){if(h>o&&(h=o),h>c&&(h=c),h===0)break e;hr.arraySet(i,n,a,h,s),o-=h,a+=h,c-=h,s+=h,r.length-=h;break}r.mode=Bn;break;case $y:for(;u<14;){if(o===0)break e;o--,l+=n[a++]<>>=5,u-=5,r.ndist=(l&31)+1,l>>>=5,u-=5,r.ncode=(l&15)+4,l>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=je;break}r.have=0,r.mode=Ly;case Ly:for(;r.have>>=3,u-=3}for(;r.have<19;)r.lens[O[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,T={bits:r.lenbits},A=Yo(i6,r.lens,0,19,r.lencode,0,r.work,T),r.lenbits=T.bits,A){e.msg="invalid code lengths set",r.mode=je;break}r.have=0,r.mode=Dy;case Dy:for(;r.have>>24,b=v>>>16&255,x=v&65535,!(y<=u);){if(o===0)break e;o--,l+=n[a++]<>>=y,u-=y,r.lens[r.have++]=x;else{if(x===16){for(P=y+2;u>>=y,u-=y,r.have===0){e.msg="invalid bit length repeat",r.mode=je;break}w=r.lens[r.have-1],h=3+(l&3),l>>>=2,u-=2}else if(x===17){for(P=y+3;u>>=y,u-=y,w=0,h=3+(l&7),l>>>=3,u-=3}else{for(P=y+7;u>>=y,u-=y,w=0,h=11+(l&127),l>>>=7,u-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=je;break}for(;h--;)r.lens[r.have++]=w}}if(r.mode===je)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=je;break}if(r.lenbits=9,T={bits:r.lenbits},A=Yo(qy,r.lens,0,r.nlen,r.lencode,0,r.work,T),r.lenbits=T.bits,A){e.msg="invalid literal/lengths set",r.mode=je;break}if(r.distbits=6,r.distcode=r.distdyn,T={bits:r.distbits},A=Yo(Yy,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,T),r.distbits=T.bits,A){e.msg="invalid distances set",r.mode=je;break}if(r.mode=Yc,t===qc)break e;case Yc:r.mode=Xc;case Xc:if(o>=6&&c>=258){e.next_out=s,e.avail_out=c,e.next_in=a,e.avail_in=o,r.hold=l,r.bits=u,n6(e,d),s=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,n=e.input,o=e.avail_in,l=r.hold,u=r.bits,r.mode===Bn&&(r.back=-1);break}for(r.back=0;v=r.lencode[l&(1<>>24,b=v>>>16&255,x=v&65535,!(y<=u);){if(o===0)break e;o--,l+=n[a++]<>E)],y=v>>>24,b=v>>>16&255,x=v&65535,!(E+y<=u);){if(o===0)break e;o--,l+=n[a++]<>>=E,u-=E,r.back+=E}if(l>>>=y,u-=y,r.back+=y,r.length=x,b===0){r.mode=Uy;break}if(b&32){r.back=-1,r.mode=Bn;break}if(b&64){e.msg="invalid literal/length code",r.mode=je;break}r.extra=b&15,r.mode=Ny;case Ny:if(r.extra){for(P=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=jy;case jy:for(;v=r.distcode[l&(1<>>24,b=v>>>16&255,x=v&65535,!(y<=u);){if(o===0)break e;o--,l+=n[a++]<>E)],y=v>>>24,b=v>>>16&255,x=v&65535,!(E+y<=u);){if(o===0)break e;o--,l+=n[a++]<>>=E,u-=E,r.back+=E}if(l>>>=y,u-=y,r.back+=y,b&64){e.msg="invalid distance code",r.mode=je;break}r.offset=x,r.extra=b&15,r.mode=By;case By:if(r.extra){for(P=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=je;break}r.mode=Hy;case Hy:if(c===0)break e;if(h=d-c,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=je;break}h>r.wnext?(h-=r.wnext,p=r.wsize-h):p=r.wnext-h,h>r.length&&(h=r.length),m=r.window}else m=i,p=s-r.offset,h=r.length;h>c&&(h=c),c-=h,r.length-=h;do i[s++]=m[p++];while(--h);r.length===0&&(r.mode=Xc);break;case Uy:if(c===0)break e;i[s++]=r.length,c--,r.mode=Xc;break;case Bh:if(r.wrap){for(;u<32;){if(o===0)break e;o--,l|=n[a++]<{"use strict";g();nw.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var aw=I((FU,iw)=>{"use strict";g();function _6(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}iw.exports=_6});var ow=I(Zo=>{"use strict";g();var ss=rw(),Xo=Dn(),Kc=Mh(),et=Wh(),qh=Nc(),x6=Oh(),S6=aw(),sw=Object.prototype.toString;function aa(e){if(!(this instanceof aa))return new aa(e);this.options=Xo.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new x6,this.strm.avail_out=0;var r=ss.inflateInit2(this.strm,t.windowBits);if(r!==et.Z_OK)throw new Error(qh[r]);if(this.header=new S6,ss.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Kc.string2buf(t.dictionary):sw.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=ss.inflateSetDictionary(this.strm,t.dictionary),r!==et.Z_OK)))throw new Error(qh[r])}aa.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,a,s,o,c,l,u=!1;if(this.ended)return!1;s=t===~~t?t:t===!0?et.Z_FINISH:et.Z_NO_FLUSH,typeof e=="string"?r.input=Kc.binstring2buf(e):sw.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Xo.Buf8(n),r.next_out=0,r.avail_out=n),a=ss.inflate(r,et.Z_NO_FLUSH),a===et.Z_NEED_DICT&&i&&(a=ss.inflateSetDictionary(this.strm,i)),a===et.Z_BUF_ERROR&&u===!0&&(a=et.Z_OK,u=!1),a!==et.Z_STREAM_END&&a!==et.Z_OK)return this.onEnd(a),this.ended=!0,!1;r.next_out&&(r.avail_out===0||a===et.Z_STREAM_END||r.avail_in===0&&(s===et.Z_FINISH||s===et.Z_SYNC_FLUSH))&&(this.options.to==="string"?(o=Kc.utf8border(r.output,r.next_out),c=r.next_out-o,l=Kc.buf2string(r.output,o),r.next_out=c,r.avail_out=n-c,c&&Xo.arraySet(r.output,r.output,o,c,0),this.onData(l)):this.onData(Xo.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(u=!0)}while((r.avail_in>0||r.avail_out===0)&&a!==et.Z_STREAM_END);return a===et.Z_STREAM_END&&(s=et.Z_FINISH),s===et.Z_FINISH?(a=ss.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===et.Z_OK):(s===et.Z_SYNC_FLUSH&&(this.onEnd(et.Z_OK),r.avail_out=0),!0)};aa.prototype.onData=function(e){this.chunks.push(e)};aa.prototype.onEnd=function(e){e===et.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Xo.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Yh(e,t){var r=new aa(t);if(r.push(e,!0),r.err)throw r.msg||qh[r.err];return r.result}function E6(e,t){return t=t||{},t.raw=!0,Yh(e,t)}Zo.Inflate=aa;Zo.inflate=Yh;Zo.inflateRaw=E6;Zo.ungzip=Yh});var uw=I((NU,cw)=>{"use strict";g();var A6=Dn().assign,k6=dy(),T6=ow(),C6=Wh(),lw={};A6(lw,k6,T6,C6);cw.exports=lw});var hw=I((BU,dw)=>{"use strict";g();var fw=(e,t)=>function(...r){let n=t.promiseModule;return new n((i,a)=>{t.multiArgs?r.push((...s)=>{t.errorFirst?s[0]?a(s):(s.shift(),i(s)):i(s)}):t.errorFirst?r.push((s,o)=>{s?a(s):i(o)}):r.push(i),e.apply(this,r)})};dw.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);let r=typeof e;if(!(e!==null&&(r==="object"||r==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${e===null?"null":r}\``);let n=a=>{let s=o=>typeof o=="string"?a===o:o.test(a);return t.include?t.include.some(s):!t.exclude.some(s)},i;r==="function"?i=function(...a){return t.excludeMain?e(...a):fw(e,t).apply(this,a)}:i=Object.create(Object.getPrototypeOf(e));for(let a in e){let s=e[a];i[a]=typeof s=="function"&&n(a)?fw(s,t):s}return i}});var xw=I((UU,_w)=>{g();function pw(e){return Array.isArray(e)?e:[e]}var Kh="",mw=" ",Xh="\\",P6=/^\s+$/,R6=/(?:[^\\]|^)\\$/,M6=/^\\!/,O6=/^\\#/,I6=/\r?\n/g,F6=/^\.*\/|^\.+$/,Zh="/",yw="node-ignore";typeof Symbol!="undefined"&&(yw=Symbol.for("node-ignore"));var gw=yw,$6=(e,t,r)=>Object.defineProperty(e,t,{value:r}),L6=/([0-z])-([0-z])/g,ww=()=>!1,D6=e=>e.replace(L6,(t,r,n)=>r.charCodeAt(0)<=n.charCodeAt(0)?t:Kh),N6=e=>{let{length:t}=e;return e.slice(0,t-t%2)},j6=[[/^\uFEFF/,()=>Kh],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?mw:Kh)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+mw}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6{let n=r.replace(/\\\*/g,"[^\\/]*");return t+n}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Xh],[/\\\\/g,()=>Xh],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,n,i)=>t===Xh?`\\[${r}${N6(n)}${i}`:i==="]"&&n.length%2===0?`[${D6(r)}${n}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],vw=Object.create(null),B6=(e,t)=>{let r=vw[e];return r||(r=j6.reduce((n,[i,a])=>n.replace(i,a.bind(e)),e),vw[e]=r),t?new RegExp(r,"i"):new RegExp(r)},ep=e=>typeof e=="string",H6=e=>e&&ep(e)&&!P6.test(e)&&!R6.test(e)&&e.indexOf("#")!==0,U6=e=>e.split(I6),Jh=class{constructor(t,r,n,i){this.origin=t,this.pattern=r,this.negative=n,this.regex=i}},G6=(e,t)=>{let r=e,n=!1;e.indexOf("!")===0&&(n=!0,e=e.substr(1)),e=e.replace(M6,"!").replace(O6,"#");let i=B6(e,t);return new Jh(r,e,n,i)},z6=(e,t)=>{throw new t(e)},Hn=(e,t,r)=>ep(e)?e?Hn.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),bw=e=>F6.test(e);Hn.isNotRelative=bw;Hn.convert=e=>e;var Qh=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:n=!1}={}){$6(this,gw,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[gw]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(H6(t)){let r=G6(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,pw(ep(t)?U6(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let n=!1,i=!1;return this._rules.forEach(a=>{let{negative:s}=a;if(i===s&&n!==i||s&&!n&&!i&&!r)return;a.regex.test(t)&&(n=!s,i=s)}),{ignored:n,unignored:i}}_test(t,r,n,i){let a=t&&Hn.convert(t);return Hn(a,t,this._allowRelativePaths?ww:z6),this._t(a,r,n,i)}_t(t,r,n,i){if(t in r)return r[t];if(i||(i=t.split(Zh)),i.pop(),!i.length)return r[t]=this._testOne(t,n);let a=this._t(i.join(Zh)+Zh,r,n,i);return r[t]=a.ignored?a:this._testOne(t,n)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return pw(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},Jc=e=>new Qh(e),V6=e=>Hn(e&&Hn.convert(e),e,ww);Jc.isPathValid=V6;Jc.default=Jc;_w.exports=Jc;if(typeof process!="undefined"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Hn.convert=e;let t=/^[a-z]:\//i;Hn.isNotRelative=r=>t.test(r)||bw(r)}});var Ew=I((zU,Sw)=>{"use strict";g();function W6(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function bn(e,t,r){return t=t instanceof RegExp?t:new RegExp(W6(t),"g"),e.replace(t,r)}var q6={clean:function(t){if(typeof t!="string")throw new Error("Expected a string, received: "+t);return t=bn(t,"./","/"),t=bn(t,"..","."),t=bn(t," ","-"),t=bn(t,/^[~^:?*\\\-]/g,""),t=bn(t,/[~^:?*\\]/g,"-"),t=bn(t,/[~^:?*\\\-]$/g,""),t=bn(t,"@{","-"),t=bn(t,/\.$/g,""),t=bn(t,/\/$/g,""),t=bn(t,/\.lock$/g,""),t}};Sw.exports=q6});var kw=I((WU,Aw)=>{g();Aw.exports=function(e,t){var r=e,n=t,i=r.length,a=n.length,s=!1,o=null,c=i+1,l=[],u=[],f=[],d="",h=-1,p=0,m=1,v,y,b=function(){i>=a&&(v=r,y=i,r=n,n=v,i=a,a=y,s=!0,c=i+1)},x=function(w,A,S){return{x:w,y:A,k:S}},E=function(w,A){return{elem:w,t:A}},_=function(w,A,S){var T,P,O;for(A>S?T=l[w-1+c]:T=l[w+1+c],O=Math.max(A,S),P=O-w;P=0;--O)for(;TP-T?(s?f[f.length]=new E(n[P],h):f[f.length]=new E(n[P],m),++S,++P):w[O].y-w[O].x=w+1;--D)S[D+c]=_(D,S[D-1+c]+1,S[D+1+c]);S[w+c]=_(w,S[w-1+c]+1,S[w+1+c])}while(S[w+c]!==a);for(o=w+2*T,P=l[w+c],O=[];P!==-1;)O[O.length]=new x(u[P].x,u[P].y,null),P=u[P].k;k(O)}}}});var Pw=I((YU,Cw)=>{g();var Y6=kw();function X6(e,t){var r=new Y6(e,t);r.compose();for(var n=r.getses(),i,a,s=e.length-1,o=t.length-1,c=n.length-1;c>=0;--c)n[c].t===r.SES_COMMON?(a?(a.chain={file1index:s,file2index:o,chain:null},a=a.chain):(i={file1index:s,file2index:o,chain:null},a=i),s--,o--):n[c].t===r.SES_DELETE?s--:n[c].t===r.SES_ADD&&o--;var l={file1index:-1,file2index:-1,chain:null};return a?(a.chain=l,i):l}function Tw(e,t){for(var r=[],n=e.length,i=t.length,a=X6(e,t);a!==null;a=a.chain){var s=n-a.file1index-1,o=i-a.file2index-1;n=a.file1index,i=a.file2index,(s||o)&&r.push({file1:[n+1,s],file2:[i+1,o]})}return r.reverse(),r}function Z6(e,t,r){var n,i=Tw(t,e),a=Tw(t,r),s=[];function o(j,D){s.push([j.file1[0],D,j.file1[1],j.file2[0],j.file2[1]])}for(n=0;nl&&(c.push([1,l,j-l]),l=j)}for(var f=0;fm)break;m=Math.max(m,y+v[2]),f++}if(u(p),d==f)h[4]>0&&c.push([h[1],h[3],h[4]]);else{var b={0:[e.length,-1,t.length,-1],2:[r.length,-1,t.length,-1]};for(n=d;n<=f;n++){h=s[n];var x=h[1],E=b[x],_=h[0],k=_+h[2],w=h[3],A=w+h[4];E[0]=Math.min(w,E[0]),E[1]=Math.max(A,E[1]),E[2]=Math.min(_,E[2]),E[3]=Math.max(k,E[3])}var S=b[0][0]+(p-b[0][2]),T=b[0][1]+(m-b[0][3]),P=b[2][0]+(p-b[2][2]),O=b[2][1]+(m-b[2][3]);c.push([-1,S,T-S,p,m-p,P,O-P])}l=m}return u(t.length),c}function K6(e,t,r){var n=[],i=[e,t,r],a=Z6(e,t,r),s=[];function o(){s.length&&n.push({ok:s}),s=[]}function c(h){for(var p=0;p{g();var Es=1e3,As=Es*60,ks=As*60,da=ks*24,eI=da*7,tI=da*365.25;O2.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return rI(e);if(r==="number"&&isFinite(e))return t.long?iI(e):nI(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function rI(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*tI;case"weeks":case"week":case"w":return r*eI;case"days":case"day":case"d":return r*da;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ks;case"minutes":case"minute":case"mins":case"min":case"m":return r*As;case"seconds":case"second":case"secs":case"sec":case"s":return r*Es;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function nI(e){var t=Math.abs(e);return t>=da?Math.round(e/da)+"d":t>=ks?Math.round(e/ks)+"h":t>=As?Math.round(e/As)+"m":t>=Es?Math.round(e/Es)+"s":e+"ms"}function iI(e){var t=Math.abs(e);return t>=da?wu(e,t,da,"day"):t>=ks?wu(e,t,ks,"hour"):t>=As?wu(e,t,As,"minute"):t>=Es?wu(e,t,Es,"second"):e+" ms"}function wu(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var $2=I((nG,F2)=>{g();function aI(e){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=i,r.enabled=s,r.humanize=I2(),r.destroy=l,Object.keys(e).forEach(u=>{r[u]=e[u]}),r.names=[],r.skips=[],r.formatters={};function t(u){let f=0;for(let d=0;d{if(k==="%%")return"%";E++;let A=r.formatters[w];if(typeof A=="function"){let S=v[E];k=A.call(y,S),v.splice(E,1),E--}return k}),r.formatArgs.call(y,v),(y.log||r.log).apply(y,v)}return m.namespace=u,m.useColors=r.useColors(),m.color=r.selectColor(u),m.extend=n,m.destroy=r.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,p=r.enabled(u)),p),set:v=>{d=v}}),typeof r.init=="function"&&r.init(m),m}function n(u,f){let d=r(this.namespace+(typeof f=="undefined"?":":f)+u);return d.log=this.log,d}function i(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let f,d=(typeof u=="string"?u:"").split(/[\s,]+/),h=d.length;for(f=0;f"-"+f)].join(",");return r.enable(""),u}function s(u){if(u[u.length-1]==="*")return!0;let f,d;for(f=0,d=r.skips.length;f{g();gr.formatArgs=oI;gr.save=lI;gr.load=cI;gr.useColors=sI;gr.storage=uI();gr.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();gr.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function sI(){if(typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function oI(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+bu.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}gr.log=console.debug||console.log||(()=>{});function lI(e){try{e?gr.storage.setItem("debug",e):gr.storage.removeItem("debug")}catch(t){}}function cI(){let e;try{e=gr.storage.getItem("debug")}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}function uI(){try{return localStorage}catch(e){}}bu.exports=$2()(gr);var{formatters:fI}=bu.exports;fI.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var L2=I(vr=>{"use strict";g();var dI=vr&&vr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vr,"__esModule",{value:!0});var hI=require("fs"),pI=dI(_u()),Ts=pI.default("@kwsites/file-exists");function mI(e,t,r){Ts("checking %s",e);try{let n=hI.statSync(e);return n.isFile()&&t?(Ts("[OK] path represents a file"),!0):n.isDirectory()&&r?(Ts("[OK] path represents a directory"),!0):(Ts("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return Ts("[FAIL] path is not accessible: %o",n),!1;throw Ts("[FATAL] %o",n),n}}function gI(e,t=vr.READABLE){return mI(e,(t&vr.FILE)>0,(t&vr.FOLDER)>0)}vr.exists=gI;vr.FILE=1;vr.FOLDER=2;vr.READABLE=vr.FILE+vr.FOLDER});var D2=I(xu=>{"use strict";g();function vI(e){for(var t in e)xu.hasOwnProperty(t)||(xu[t]=e[t])}Object.defineProperty(xu,"__esModule",{value:!0});vI(L2())});var Rp=I(ha=>{"use strict";g();Object.defineProperty(ha,"__esModule",{value:!0});ha.createDeferred=ha.deferred=void 0;function Pp(){let e,t,r="pending";return{promise:new Promise((i,a)=>{e=i,t=a}),done(i){r==="pending"&&(r="resolved",e(i))},fail(i){r==="pending"&&(r="rejected",t(i))},get fulfilled(){return r!=="pending"},get status(){return r}}}ha.deferred=Pp;ha.createDeferred=Pp;ha.default=Pp});var kx=I((XG,Ax)=>{"use strict";g();Ax.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Cx=I((KG,Tx)=>{g();var xm={px:{px:1,cm:37.79527559055118,mm:3.7795275590551185,in:96,pt:1.3333333333333333,pc:16},cm:{px:.026458333333333334,cm:1,mm:.1,in:2.54,pt:.035277777777777776,pc:.42333333333333334},mm:{px:.26458333333333334,cm:10,mm:1,in:25.4,pt:.35277777777777775,pc:4.233333333333333},in:{px:.010416666666666666,cm:.39370078740157477,mm:.03937007874015748,in:1,pt:.013888888888888888,pc:.16666666666666666},pt:{px:.75,cm:28.346456692913385,mm:2.834645669291339,in:72,pt:1,pc:12},pc:{px:.0625,cm:2.3622047244094486,mm:.2362204724409449,in:6,pt:.08333333333333333,pc:1},deg:{deg:1,grad:.9,rad:180/Math.PI,turn:360},grad:{deg:1.1111111111111112,grad:1,rad:200/Math.PI,turn:400},rad:{deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:Math.PI*2},turn:{deg:.002777777777777778,grad:.0025,rad:.5/Math.PI,turn:1},s:{s:1,ms:.001},ms:{s:1e3,ms:1},Hz:{Hz:1,kHz:1e3},kHz:{Hz:.001,kHz:1},dpi:{dpi:1,dpcm:.39370078740157477,dppx:.010416666666666666},dpcm:{dpi:2.54,dpcm:1,dppx:.026458333333333334},dppx:{dpi:96,dpcm:37.79527559055118,dppx:1}};Tx.exports=function(e,t,r,n){if(!xm.hasOwnProperty(r))throw new Error("Cannot convert to "+r);if(!xm[r].hasOwnProperty(t))throw new Error("Cannot convert from "+t+" to "+r);var i=xm[r][t]*e;return n!==!1?(n=Math.pow(10,parseInt(n)||5),Math.round(i*n)/n):i}});var Ux=I(Wn=>{"use strict";g();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.fromRgba=Fs;Wn.fromRgb=Sm;Wn.fromHsla=qu;Wn.fromHsl=Bx;Wn.fromString=Hx;Wn.default=void 0;var Px=Ox(kx()),P$=Ox(Cx());function Ox(e){return e&&e.__esModule?e:{default:e}}function R$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rx(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1}function L$(e,t,r){var n=e/255,i=t/255,a=r/255,s=Math.max(n,i,a),o=Math.min(n,i,a),c=s-o,l=(s+o)/2;if(c===0)return[0,0,l*100];var u=c/(1-Math.abs(2*l-1)),f=function(){switch(s){case n:return(i-a)/c%6;case i:return(a-n)/c+2;default:return(n-i)/c+4}}();return[f*60,u*100,l*100]}function D$(e,t,r){var n=e/60,i=t/100,a=r/100,s=(1-Math.abs(2*a-1))*i,o=s*(1-Math.abs(n%2-1)),c=a-s/2,l=function(){return n<1?[s,o,0]:n<2?[o,s,0]:n<3?[0,s,o]:n<4?[0,o,s]:n<5?[o,0,s]:[s,0,o]}(),u=Wt(l,3),f=u[0],d=u[1],h=u[2];return[(f+c)*255,(d+c)*255,(h+c)*255]}var N$=function(){function e(t){var r=Wt(t,4),n=r[0],i=r[1],a=r[2],s=r[3];R$(this,e),this.values=[Math.max(Math.min(parseInt(n,10),255),0),Math.max(Math.min(parseInt(i,10),255),0),Math.max(Math.min(parseInt(a,10),255),0),s==null?1:Math.max(Math.min(parseFloat(s),255),0)]}return M$(e,[{key:"toRgbString",value:function(){var r=Wt(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3];return s===1?"rgb(".concat(n,", ").concat(i,", ").concat(a,")"):"rgba(".concat(n,", ").concat(i,", ").concat(a,", ").concat(s,")")}},{key:"toHslString",value:function(){var r=this.toHslaArray(),n=Wt(r,4),i=n[0],a=n[1],s=n[2],o=n[3];return o===1?"hsl(".concat(i,", ").concat(a,"%, ").concat(s,"%)"):"hsla(".concat(i,", ").concat(a,"%, ").concat(s,"%, ").concat(o,")")}},{key:"toHexString",value:function(){var r=Wt(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3];return n=Number(n).toString(16).padStart(2,"0"),i=Number(i).toString(16).padStart(2,"0"),a=Number(a).toString(16).padStart(2,"0"),s=s<1?parseInt(s*255,10).toString(16).padStart(2,"0"):"","#".concat(n).concat(i).concat(a).concat(s)}},{key:"toRgbaArray",value:function(){return this.values}},{key:"toHslaArray",value:function(){var r=Wt(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3],o=L$(n,i,a),c=Wt(o,3),l=c[0],u=c[1],f=c[2];return[l,u,f,s]}}]),e}();function Fs(e){var t=Wt(e,4),r=t[0],n=t[1],i=t[2],a=t[3];return new N$([r,n,i,a])}function Sm(e){var t=Wt(e,3),r=t[0],n=t[1],i=t[2];return Fs([r,n,i,1])}function qu(e){var t=Wt(e,4),r=t[0],n=t[1],i=t[2],a=t[3],s=D$(r,n,i),o=Wt(s,3),c=o[0],l=o[1],u=o[2];return Fs([c,l,u,a])}function Bx(e){var t=Wt(e,3),r=t[0],n=t[1],i=t[2];return qu([r,n,i,1])}function j$(e){var t=Ix.exec(e)||Fx.exec(e),r=Wt(t,5),n=r[1],i=r[2],a=r[3],s=r[4];return n=parseInt(n.length<2?n.repeat(2):n,16),i=parseInt(i.length<2?i.repeat(2):i,16),a=parseInt(a.length<2?a.repeat(2):a,16),s=s&&(parseInt(s.length<2?s.repeat(2):s,16)/255).toPrecision(1)||1,Fs([n,i,a,s])}function B$(e){var t=$x.exec(e)||Dx.exec(e)||Lx.exec(e)||Nx.exec(e),r=Wt(t,5),n=r[1],i=r[2],a=r[3],s=r[4];return n=Ol(n,"%")?parseInt(n,10)*255/100:parseInt(n,10),i=Ol(i,"%")?parseInt(i,10)*255/100:parseInt(i,10),a=Ol(a,"%")>0?parseInt(a,10)*255/100:parseInt(a,10),s=s===void 0?1:parseFloat(s)/(Ol(s,"%")?100:1),Fs([n,i,a,s])}function H$(e){var t=jx.exec(e),r=Wt(t,6),n=r[1],i=r[2],a=r[3],s=r[4],o=r[5];return i=i||"deg",n=(0,P$.default)(parseFloat(n),i,"deg"),a=parseFloat(a),s=parseFloat(s),o=o===void 0?1:parseFloat(o)/(Ol(o,"%")?100:1),qu([n,a,s,o])}function Hx(e){return Px.default[e]?Sm(Px.default[e]):Ix.test(e)||Fx.test(e)?j$(e):$x.test(e)||Dx.test(e)||Lx.test(e)||Nx.test(e)?B$(e):jx.test(e)?H$(e):null}var U$={fromString:Hx,fromRgb:Sm,fromRgba:Fs,fromHsl:Bx,fromHsla:qu};Wn.default=U$});var Em=I((tz,zx)=>{"use strict";g();var Gx=Object.prototype.toString;zx.exports=function(t){var r=Gx.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Gx.call(t.callee)==="[object Function]"),n}});var Qx=I((nz,Jx)=>{"use strict";g();var Kx;Object.keys||(Il=Object.prototype.hasOwnProperty,Am=Object.prototype.toString,Vx=Em(),km=Object.prototype.propertyIsEnumerable,Wx=!km.call({toString:null},"toString"),qx=km.call(function(){},"prototype"),Fl=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Yu=function(e){var t=e.constructor;return t&&t.prototype===e},Yx={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Xx=function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!Yx["$"+e]&&Il.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{Yu(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),Zx=function(e){if(typeof window=="undefined"||!Xx)return Yu(e);try{return Yu(e)}catch(t){return!1}},Kx=function(t){var r=t!==null&&typeof t=="object",n=Am.call(t)==="[object Function]",i=Vx(t),a=r&&Am.call(t)==="[object String]",s=[];if(!r&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var o=qx&&n;if(a&&t.length>0&&!Il.call(t,0))for(var c=0;c0)for(var l=0;l{"use strict";g();var G$=Array.prototype.slice,z$=Em(),eS=Object.keys,Xu=eS?function(t){return eS(t)}:Qx(),tS=Object.keys;Xu.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return z$(n)?tS(G$.call(n)):tS(n)})}else Object.keys=Xu;return Object.keys||Xu};rS.exports=Xu});var iS=I((oz,nS)=>{"use strict";g();nS.exports=Error});var sS=I((cz,aS)=>{"use strict";g();aS.exports=EvalError});var lS=I((fz,oS)=>{"use strict";g();oS.exports=RangeError});var uS=I((hz,cS)=>{"use strict";g();cS.exports=ReferenceError});var Tm=I((mz,fS)=>{"use strict";g();fS.exports=SyntaxError});var qn=I((vz,dS)=>{"use strict";g();dS.exports=TypeError});var pS=I((wz,hS)=>{"use strict";g();hS.exports=URIError});var $l=I((_z,mS)=>{"use strict";g();mS.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var Ku=I((Sz,vS)=>{"use strict";g();var gS=typeof Symbol!="undefined"&&Symbol,V$=$l();vS.exports=function(){return typeof gS!="function"||typeof Symbol!="function"||typeof gS("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:V$()}});var wS=I((Az,yS)=>{"use strict";g();var Cm={__proto__:null,foo:{}},W$=Object;yS.exports=function(){return{__proto__:Cm}.foo===Cm.foo&&!(Cm instanceof W$)}});var xS=I((Tz,_S)=>{"use strict";g();var q$="Function.prototype.bind called on incompatible ",Y$=Object.prototype.toString,X$=Math.max,Z$="[object Function]",bS=function(t,r){for(var n=[],i=0;i{"use strict";g();var Q$=xS();SS.exports=Function.prototype.bind||Q$});var Pm=I((Mz,ES)=>{"use strict";g();var eL=Function.prototype.call,tL=Object.prototype.hasOwnProperty,rL=Ju();ES.exports=rL.call(eL,tL)});var en=I((Iz,PS)=>{"use strict";g();var ve,nL=iS(),iL=sS(),aL=lS(),sL=uS(),Ns=Tm(),Ds=qn(),oL=pS(),CS=Function,Rm=function(e){try{return CS('"use strict"; return ('+e+").constructor;")()}catch(t){}},va=Object.getOwnPropertyDescriptor;if(va)try{va({},"")}catch(e){va=null}var Mm=function(){throw new Ds},lL=va?function(){try{return arguments.callee,Mm}catch(e){try{return va(arguments,"callee").get}catch(t){return Mm}}}():Mm,$s=Ku()(),cL=wS()(),wt=Object.getPrototypeOf||(cL?function(e){return e.__proto__}:null),Ls={},uL=typeof Uint8Array=="undefined"||!wt?ve:wt(Uint8Array),ya={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?ve:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?ve:ArrayBuffer,"%ArrayIteratorPrototype%":$s&&wt?wt([][Symbol.iterator]()):ve,"%AsyncFromSyncIteratorPrototype%":ve,"%AsyncFunction%":Ls,"%AsyncGenerator%":Ls,"%AsyncGeneratorFunction%":Ls,"%AsyncIteratorPrototype%":Ls,"%Atomics%":typeof Atomics=="undefined"?ve:Atomics,"%BigInt%":typeof BigInt=="undefined"?ve:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?ve:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?ve:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?ve:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":nL,"%eval%":eval,"%EvalError%":iL,"%Float32Array%":typeof Float32Array=="undefined"?ve:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?ve:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?ve:FinalizationRegistry,"%Function%":CS,"%GeneratorFunction%":Ls,"%Int8Array%":typeof Int8Array=="undefined"?ve:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?ve:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?ve:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$s&&wt?wt(wt([][Symbol.iterator]())):ve,"%JSON%":typeof JSON=="object"?JSON:ve,"%Map%":typeof Map=="undefined"?ve:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!$s||!wt?ve:wt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?ve:Promise,"%Proxy%":typeof Proxy=="undefined"?ve:Proxy,"%RangeError%":aL,"%ReferenceError%":sL,"%Reflect%":typeof Reflect=="undefined"?ve:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?ve:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!$s||!wt?ve:wt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?ve:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$s&&wt?wt(""[Symbol.iterator]()):ve,"%Symbol%":$s?Symbol:ve,"%SyntaxError%":Ns,"%ThrowTypeError%":lL,"%TypedArray%":uL,"%TypeError%":Ds,"%Uint8Array%":typeof Uint8Array=="undefined"?ve:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?ve:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?ve:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?ve:Uint32Array,"%URIError%":oL,"%WeakMap%":typeof WeakMap=="undefined"?ve:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?ve:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?ve:WeakSet};if(wt)try{null.error}catch(e){AS=wt(wt(e)),ya["%Error.prototype%"]=AS}var AS,fL=function e(t){var r;if(t==="%AsyncFunction%")r=Rm("async function () {}");else if(t==="%GeneratorFunction%")r=Rm("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Rm("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&wt&&(r=wt(i.prototype))}return ya[t]=r,r},kS={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Ll=Ju(),Qu=Pm(),dL=Ll.call(Function.call,Array.prototype.concat),hL=Ll.call(Function.apply,Array.prototype.splice),TS=Ll.call(Function.call,String.prototype.replace),ef=Ll.call(Function.call,String.prototype.slice),pL=Ll.call(Function.call,RegExp.prototype.exec),mL=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,gL=/\\(\\)?/g,vL=function(t){var r=ef(t,0,1),n=ef(t,-1);if(r==="%"&&n!=="%")throw new Ns("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ns("invalid intrinsic syntax, expected opening `%`");var i=[];return TS(t,mL,function(a,s,o,c){i[i.length]=o?TS(c,gL,"$1"):s||a}),i},yL=function(t,r){var n=t,i;if(Qu(kS,n)&&(i=kS[n],n="%"+i[0]+"%"),Qu(ya,n)){var a=ya[n];if(a===Ls&&(a=fL(n)),typeof a=="undefined"&&!r)throw new Ds("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new Ns("intrinsic "+t+" does not exist!")};PS.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new Ds("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ds('"allowMissing" argument must be a boolean');if(pL(/^%?[^%]*%?$/,t)===null)throw new Ns("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=vL(t),i=n.length>0?n[0]:"",a=yL("%"+i+"%",r),s=a.name,o=a.value,c=!1,l=a.alias;l&&(i=l[0],hL(n,dL([0,1],l)));for(var u=1,f=!0;u=n.length){var m=va(o,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?o=m.get:o=o[d]}else f=Qu(o,d),o=o[d];f&&!c&&(ya[s]=o)}}return o}});var rf=I(($z,RS)=>{"use strict";g();var wL=en(),tf=wL("%Object.defineProperty%",!0)||!1;if(tf)try{tf({},"a",{value:1})}catch(e){tf=!1}RS.exports=tf});var af=I((Dz,MS)=>{"use strict";g();var bL=en(),nf=bL("%Object.getOwnPropertyDescriptor%",!0);if(nf)try{nf([],"length")}catch(e){nf=null}MS.exports=nf});var sf=I((jz,FS)=>{"use strict";g();var OS=rf(),_L=Tm(),js=qn(),IS=af();FS.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new js("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new js("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new js("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new js("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new js("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new js("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,o=arguments.length>6?arguments[6]:!1,c=!!IS&&IS(t,r);if(OS)OS(t,r,{configurable:s===null&&c?c.configurable:!s,enumerable:i===null&&c?c.enumerable:!i,value:n,writable:a===null&&c?c.writable:!a});else if(o||!i&&!a&&!s)t[r]=n;else throw new _L("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var of=I((Hz,LS)=>{"use strict";g();var Om=rf(),$S=function(){return!!Om};$S.hasArrayLengthDefineBug=function(){if(!Om)return null;try{return Om([],"length",{value:1}).length!==1}catch(t){return!0}};LS.exports=$S});var Ti=I((Gz,BS)=>{"use strict";g();var xL=Zu(),SL=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",EL=Object.prototype.toString,AL=Array.prototype.concat,DS=sf(),kL=function(e){return typeof e=="function"&&EL.call(e)==="[object Function]"},NS=of()(),TL=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!kL(n)||!n())return}NS?DS(e,t,r,!0):DS(e,t,r)},jS=function(e,t){var r=arguments.length>2?arguments[2]:{},n=xL(t);SL&&(n=AL.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i{"use strict";g();var CL=en(),HS=sf(),PL=of()(),US=af(),GS=qn(),RL=CL("%Math.floor%");zS.exports=function(t,r){if(typeof t!="function")throw new GS("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||RL(r)!==r)throw new GS("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&US){var s=US(t,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(a=!1)}return(i||a||!n)&&(PL?HS(t,"length",r,!0,!0):HS(t,"length",r)),t}});var wa=I((qz,lf)=>{"use strict";g();var Im=Ju(),cf=en(),ML=VS(),OL=qn(),YS=cf("%Function.prototype.apply%"),XS=cf("%Function.prototype.call%"),ZS=cf("%Reflect.apply%",!0)||Im.call(XS,YS),WS=rf(),IL=cf("%Math.max%");lf.exports=function(t){if(typeof t!="function")throw new OL("a function is required");var r=ZS(Im,XS,arguments);return ML(r,1+IL(0,t.length-(arguments.length-1)),!0)};var qS=function(){return ZS(Im,YS,arguments)};WS?WS(lf.exports,"apply",{value:qS}):lf.exports.apply=qS});var br=I((Xz,QS)=>{"use strict";g();var KS=en(),JS=wa(),FL=JS(KS("String.prototype.indexOf"));QS.exports=function(t,r){var n=KS(t,!!r);return typeof n=="function"&&FL(t,".prototype.")>-1?JS(n):n}});var Fm=I((Kz,iE)=>{"use strict";g();var $L=Zu(),rE=$l()(),nE=br(),eE=Object,LL=nE("Array.prototype.push"),tE=nE("Object.prototype.propertyIsEnumerable"),DL=rE?Object.getOwnPropertySymbols:null;iE.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=eE(t);if(arguments.length===1)return n;for(var i=1;i{"use strict";g();var $m=Fm(),NL=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n{"use strict";g();var BL=Ti(),HL=Lm();sE.exports=function(){var t=HL();return BL(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t}});var fE=I((nV,uE)=>{"use strict";g();var UL=Ti(),GL=wa(),zL=Fm(),lE=Lm(),VL=oE(),WL=GL.apply(lE()),cE=function(t,r){return WL(Object,arguments)};UL(cE,{getPolyfill:lE,implementation:zL,shim:VL});uE.exports=cE});var hE=I((aV,dE)=>{"use strict";g();var Nl=function(){return typeof function(){}.name=="string"},Dl=Object.getOwnPropertyDescriptor;if(Dl)try{Dl([],"length")}catch(e){Dl=null}Nl.functionsHaveConfigurableNames=function(){if(!Nl()||!Dl)return!1;var t=Dl(function(){},"name");return!!t&&!!t.configurable};var qL=Function.prototype.bind;Nl.boundFunctionsHaveNames=function(){return Nl()&&typeof qL=="function"&&function(){}.bind().name!==""};dE.exports=Nl});var gE=I((oV,mE)=>{"use strict";g();var pE=sf(),YL=of()(),XL=hE().functionsHaveConfigurableNames(),ZL=qn();mE.exports=function(t,r){if(typeof t!="function")throw new ZL("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return(!n||XL)&&(YL?pE(t,"name",r,!0,!0):pE(t,"name",r)),t}});var Dm=I((cV,vE)=>{"use strict";g();var KL=gE(),JL=qn(),QL=Object;vE.exports=KL(function(){if(this==null||this!==QL(this))throw new JL("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0)});var Nm=I((fV,yE)=>{"use strict";g();var eD=Dm(),tD=Ti().supportsDescriptors,rD=Object.getOwnPropertyDescriptor;yE.exports=function(){if(tD&&/a/mig.flags==="gim"){var t=rD(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var r="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(n,"sticky",{get:function(){r+="y"}}),t.get.call(n),r==="dy")return t.get}}return eD}});var _E=I((hV,bE)=>{"use strict";g();var nD=Ti().supportsDescriptors,iD=Nm(),aD=Object.getOwnPropertyDescriptor,sD=Object.defineProperty,oD=TypeError,wE=Object.getPrototypeOf,lD=/a/;bE.exports=function(){if(!nD||!wE)throw new oD("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=iD(),r=wE(lD),n=aD(r,"flags");return(!n||n.get!==t)&&sD(r,"flags",{configurable:!0,enumerable:!1,get:t}),t}});var AE=I((mV,EE)=>{"use strict";g();var cD=Ti(),uD=wa(),fD=Dm(),xE=Nm(),dD=_E(),SE=uD(xE());cD(SE,{getPolyfill:xE,implementation:fD,shim:dD});EE.exports=SE});var Ci=I((vV,kE)=>{"use strict";g();var hD=$l();kE.exports=function(){return hD()&&!!Symbol.toStringTag}});var Bm=I((wV,CE)=>{"use strict";g();var pD=Ci()(),mD=br(),jm=mD("Object.prototype.toString"),uf=function(t){return pD&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:jm(t)==="[object Arguments]"},TE=function(t){return uf(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&jm(t)!=="[object Array]"&&jm(t.callee)==="[object Function]"},gD=function(){return uf(arguments)}();uf.isLegacyArguments=TE;CE.exports=gD?uf:TE});var PE=I(()=>{g()});var XE=I((EV,YE)=>{g();var Zm=typeof Map=="function"&&Map.prototype,Hm=Object.getOwnPropertyDescriptor&&Zm?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,df=Zm&&Hm&&typeof Hm.get=="function"?Hm.get:null,RE=Zm&&Map.prototype.forEach,Km=typeof Set=="function"&&Set.prototype,Um=Object.getOwnPropertyDescriptor&&Km?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,hf=Km&&Um&&typeof Um.get=="function"?Um.get:null,ME=Km&&Set.prototype.forEach,vD=typeof WeakMap=="function"&&WeakMap.prototype,Bl=vD?WeakMap.prototype.has:null,yD=typeof WeakSet=="function"&&WeakSet.prototype,Hl=yD?WeakSet.prototype.has:null,wD=typeof WeakRef=="function"&&WeakRef.prototype,OE=wD?WeakRef.prototype.deref:null,bD=Boolean.prototype.valueOf,_D=Object.prototype.toString,xD=Function.prototype.toString,SD=String.prototype.match,Jm=String.prototype.slice,Ri=String.prototype.replace,ED=String.prototype.toUpperCase,IE=String.prototype.toLowerCase,UE=RegExp.prototype.test,FE=Array.prototype.concat,En=Array.prototype.join,AD=Array.prototype.slice,$E=Math.floor,Vm=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Gm=Object.getOwnPropertySymbols,Wm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Bs=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Rt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Bs||!0)?Symbol.toStringTag:null,GE=Object.prototype.propertyIsEnumerable,LE=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function DE(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||UE.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-$E(-e):$E(e);if(n!==e){var i=String(n),a=Jm.call(t,i.length+1);return Ri.call(i,r,"$&_")+"."+Ri.call(Ri.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ri.call(t,r,"$&_")}var qm=PE(),NE=qm.custom,jE=VE(NE)?NE:null;YE.exports=function e(t,r,n,i){var a=r||{};if(Pi(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Pi(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Pi(a,"customInspect")?a.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Pi(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Pi(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=a.numericSeparator;if(typeof t=="undefined")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return qE(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return o?DE(t,c):c}if(typeof t=="bigint"){var l=String(t)+"n";return o?DE(t,l):l}var u=typeof a.depth=="undefined"?5:a.depth;if(typeof n=="undefined"&&(n=0),n>=u&&u>0&&typeof t=="object")return Ym(t)?"[Array]":"[Object]";var f=GD(a,n);if(typeof i=="undefined")i=[];else if(WE(i,t)>=0)return"[Circular]";function d(j,D,Q){if(D&&(i=AD.call(i),i.push(D)),Q){var de={depth:a.depth};return Pi(a,"quoteStyle")&&(de.quoteStyle=a.quoteStyle),e(j,de,n+1,i)}return e(j,a,n+1,i)}if(typeof t=="function"&&!BE(t)){var h=FD(t),p=ff(t,d);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+En.call(p,", ")+" }":"")}if(VE(t)){var m=Bs?Ri.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Wm.call(t);return typeof t=="object"&&!Bs?jl(m):m}if(BD(t)){for(var v="<"+IE.call(String(t.nodeName)),y=t.attributes||[],b=0;b",v}if(Ym(t)){if(t.length===0)return"[]";var x=ff(t,d);return f&&!UD(x)?"["+Xm(x,f)+"]":"[ "+En.call(x,", ")+" ]"}if(CD(t)){var E=ff(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!GE.call(t,"cause")?"{ ["+String(t)+"] "+En.call(FE.call("[cause]: "+d(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+En.call(E,", ")+" }"}if(typeof t=="object"&&s){if(jE&&typeof t[jE]=="function"&&qm)return qm(t,{depth:u-n});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if($D(t)){var _=[];return RE&&RE.call(t,function(j,D){_.push(d(D,t,!0)+" => "+d(j,t))}),HE("Map",df.call(t),_,f)}if(ND(t)){var k=[];return ME&&ME.call(t,function(j){k.push(d(j,t))}),HE("Set",hf.call(t),k,f)}if(LD(t))return zm("WeakMap");if(jD(t))return zm("WeakSet");if(DD(t))return zm("WeakRef");if(RD(t))return jl(d(Number(t)));if(OD(t))return jl(d(Vm.call(t)));if(MD(t))return jl(bD.call(t));if(PD(t))return jl(d(String(t)));if(typeof window!="undefined"&&t===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&t===globalThis||typeof global!="undefined"&&t===global)return"{ [object globalThis] }";if(!TD(t)&&!BE(t)){var w=ff(t,d),A=LE?LE(t)===Object.prototype:t instanceof Object||t.constructor===Object,S=t instanceof Object?"":"null prototype",T=!A&&Rt&&Object(t)===t&&Rt in t?Jm.call(Mi(t),8,-1):S?"Object":"",P=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",O=P+(T||S?"["+En.call(FE.call([],T||[],S||[]),": ")+"] ":"");return w.length===0?O+"{}":f?O+"{"+Xm(w,f)+"}":O+"{ "+En.call(w,", ")+" }"}return String(t)};function zE(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function kD(e){return Ri.call(String(e),/"/g,""")}function Ym(e){return Mi(e)==="[object Array]"&&(!Rt||!(typeof e=="object"&&Rt in e))}function TD(e){return Mi(e)==="[object Date]"&&(!Rt||!(typeof e=="object"&&Rt in e))}function BE(e){return Mi(e)==="[object RegExp]"&&(!Rt||!(typeof e=="object"&&Rt in e))}function CD(e){return Mi(e)==="[object Error]"&&(!Rt||!(typeof e=="object"&&Rt in e))}function PD(e){return Mi(e)==="[object String]"&&(!Rt||!(typeof e=="object"&&Rt in e))}function RD(e){return Mi(e)==="[object Number]"&&(!Rt||!(typeof e=="object"&&Rt in e))}function MD(e){return Mi(e)==="[object Boolean]"&&(!Rt||!(typeof e=="object"&&Rt in e))}function VE(e){if(Bs)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Wm)return!1;try{return Wm.call(e),!0}catch(t){}return!1}function OD(e){if(!e||typeof e!="object"||!Vm)return!1;try{return Vm.call(e),!0}catch(t){}return!1}var ID=Object.prototype.hasOwnProperty||function(e){return e in this};function Pi(e,t){return ID.call(e,t)}function Mi(e){return _D.call(e)}function FD(e){if(e.name)return e.name;var t=SD.call(xD.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function WE(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return qE(Jm.call(e,0,t.maxStringLength),t)+n}var i=Ri.call(Ri.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,HD);return zE(i,"single",t)}function HD(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+ED.call(t.toString(16))}function jl(e){return"Object("+e+")"}function zm(e){return e+" { ? }"}function HE(e,t,r,n){var i=n?Xm(r,n):En.call(r,", ");return e+" ("+t+") {"+i+"}"}function UD(e){for(var t=0;t=0)return!1;return!0}function GD(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=En.call(Array(e.indent+1)," ");else return null;return{base:r,prev:En.call(Array(t+1),r)}}function Xm(e,t){if(e.length===0)return"";var r=` -`+t.prev+t.base;return r+En.call(e,","+r)+` -`+t.prev}function ff(e,t){var r=Ym(e),n=[];if(r){n.length=e.length;for(var i=0;i{"use strict";g();var ZE=en(),Hs=br(),zD=XE(),VD=qn(),pf=ZE("%WeakMap%",!0),mf=ZE("%Map%",!0),WD=Hs("WeakMap.prototype.get",!0),qD=Hs("WeakMap.prototype.set",!0),YD=Hs("WeakMap.prototype.has",!0),XD=Hs("Map.prototype.get",!0),ZD=Hs("Map.prototype.set",!0),KD=Hs("Map.prototype.has",!0),Qm=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},JD=function(e,t){var r=Qm(e,t);return r&&r.value},QD=function(e,t,r){var n=Qm(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},eN=function(e,t){return!!Qm(e,t)};KE.exports=function(){var t,r,n,i={assert:function(a){if(!i.has(a))throw new VD("Side channel does not contain "+zD(a))},get:function(a){if(pf&&a&&(typeof a=="object"||typeof a=="function")){if(t)return WD(t,a)}else if(mf){if(r)return XD(r,a)}else if(n)return JD(n,a)},has:function(a){if(pf&&a&&(typeof a=="object"||typeof a=="function")){if(t)return YD(t,a)}else if(mf){if(r)return KD(r,a)}else if(n)return eN(n,a);return!1},set:function(a,s){pf&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new pf),qD(t,a,s)):mf?(r||(r=new mf),ZD(r,a,s)):(n||(n={key:{},next:null}),QD(n,a,s))}};return i}});var QE=I((CV,JE)=>{"use strict";g();var tN=Pm(),Ul=eg()(),Yn=qn(),tg={assert:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Yn("`O` is not an object");if(typeof t!="string")throw new Yn("`slot` must be a string");if(Ul.assert(e),!tg.has(e,t))throw new Yn("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Yn("`O` is not an object");if(typeof t!="string")throw new Yn("`slot` must be a string");var r=Ul.get(e);return r&&r["$"+t]},has:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Yn("`O` is not an object");if(typeof t!="string")throw new Yn("`slot` must be a string");var r=Ul.get(e);return!!r&&tN(r,"$"+t)},set:function(e,t,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Yn("`O` is not an object");if(typeof t!="string")throw new Yn("`slot` must be a string");var n=Ul.get(e);n||(n={},Ul.set(e,n)),n["$"+t]=r}};Object.freeze&&Object.freeze(tg);JE.exports=tg});var rA=I((RV,tA)=>{"use strict";g();var Gl=QE(),rN=SyntaxError,eA=typeof StopIteration=="object"?StopIteration:null;tA.exports=function(t){if(!eA)throw new rN("this environment lacks StopIteration");Gl.set(t,"[[Done]]",!1);var r={next:function(){var i=Gl.get(this,"[[Iterator]]"),a=Gl.get(i,"[[Done]]");try{return{done:a,value:a?void 0:i.next()}}catch(s){if(Gl.set(i,"[[Done]]",!0),s!==eA)throw s;return{done:!0,value:void 0}}}};return Gl.set(r,"[[Iterator]]",t),r}});var rg=I((OV,nA)=>{g();var nN={}.toString;nA.exports=Array.isArray||function(e){return nN.call(e)=="[object Array]"}});var ng=I((FV,iA)=>{"use strict";g();var iN=String.prototype.valueOf,aN=function(t){try{return iN.call(t),!0}catch(r){return!1}},sN=Object.prototype.toString,oN="[object String]",lN=Ci()();iA.exports=function(t){return typeof t=="string"?!0:typeof t!="object"?!1:lN?aN(t):sN.call(t)===oN}});var ag=I((LV,oA)=>{"use strict";g();var ig=typeof Map=="function"&&Map.prototype?Map:null,cN=typeof Set=="function"&&Set.prototype?Set:null,gf;ig||(gf=function(t){return!1});var sA=ig?Map.prototype.has:null,aA=cN?Set.prototype.has:null;!gf&&!sA&&(gf=function(t){return!1});oA.exports=gf||function(t){if(!t||typeof t!="object")return!1;try{if(sA.call(t),aA)try{aA.call(t)}catch(r){return!0}return t instanceof ig}catch(r){}return!1}});var og=I((NV,uA)=>{"use strict";g();var uN=typeof Map=="function"&&Map.prototype?Map:null,sg=typeof Set=="function"&&Set.prototype?Set:null,vf;sg||(vf=function(t){return!1});var lA=uN?Map.prototype.has:null,cA=sg?Set.prototype.has:null;!vf&&!cA&&(vf=function(t){return!1});uA.exports=vf||function(t){if(!t||typeof t!="object")return!1;try{if(cA.call(t),lA)try{lA.call(t)}catch(r){return!0}return t instanceof sg}catch(r){}return!1}});var xA=I((BV,bf)=>{"use strict";g();var fA=Bm(),dA=rA();Ku()()||$l()()?(yf=Symbol.iterator,bf.exports=function(t){if(t!=null&&typeof t[yf]!="undefined")return t[yf]();if(fA(t))return Array.prototype[yf].call(t)}):(hA=rg(),pA=ng(),lg=en(),mA=lg("%Map%",!0),gA=lg("%Set%",!0),Lr=br(),cg=Lr("Array.prototype.push"),ug=Lr("String.prototype.charCodeAt"),vA=Lr("String.prototype.slice"),yA=function(t,r){var n=t.length;if(r+1>=n)return r+1;var i=ug(t,r);if(i<55296||i>56319)return r+1;var a=ug(t,r+1);return a<56320||a>57343?r+1:r+2},wf=function(t){var r=0;return{next:function(){var i=r>=t.length,a;return i||(a=t[r],r+=1),{done:i,value:a}}}},fg=function(t,r){if(hA(t)||fA(t))return wf(t);if(pA(t)){var n=0;return{next:function(){var a=yA(t,n),s=vA(t,n,a);return n=a,{done:a>t.length,value:s}}}}if(r&&typeof t["_es6-shim iterator_"]!="undefined")return t["_es6-shim iterator_"]()},!mA&&!gA?bf.exports=function(t){if(t!=null)return fg(t,!0)}:(wA=ag(),bA=og(),dg=Lr("Map.prototype.forEach",!0),hg=Lr("Set.prototype.forEach",!0),(typeof process=="undefined"||!process.versions||!process.versions.node)&&(pg=Lr("Map.prototype.iterator",!0),mg=Lr("Set.prototype.iterator",!0)),gg=Lr("Map.prototype.@@iterator",!0)||Lr("Map.prototype._es6-shim iterator_",!0),vg=Lr("Set.prototype.@@iterator",!0)||Lr("Set.prototype._es6-shim iterator_",!0),_A=function(t){if(wA(t)){if(pg)return dA(pg(t));if(gg)return gg(t);if(dg){var r=[];return dg(t,function(i,a){cg(r,[a,i])}),wf(r)}}if(bA(t)){if(mg)return dA(mg(t));if(vg)return vg(t);if(hg){var n=[];return hg(t,function(i){cg(n,i)}),wf(n)}}},bf.exports=function(t){return _A(t)||fg(t)}));var yf,hA,pA,lg,mA,gA,Lr,cg,ug,vA,yA,wf,fg,wA,bA,dg,hg,pg,mg,gg,vg,_A});var yg=I((UV,EA)=>{"use strict";g();var SA=function(e){return e!==e};EA.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||SA(t)&&SA(r))}});var wg=I((zV,AA)=>{"use strict";g();var fN=yg();AA.exports=function(){return typeof Object.is=="function"?Object.is:fN}});var TA=I((WV,kA)=>{"use strict";g();var dN=wg(),hN=Ti();kA.exports=function(){var t=dN();return hN(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var MA=I((YV,RA)=>{"use strict";g();var pN=Ti(),mN=wa(),gN=yg(),CA=wg(),vN=TA(),PA=mN(CA(),Object);pN(PA,{getPolyfill:CA,implementation:gN,shim:vN});RA.exports=PA});var _g=I((ZV,$A)=>{"use strict";g();var yN=wa(),FA=br(),wN=en(),bg=wN("%ArrayBuffer%",!0),_f=FA("ArrayBuffer.prototype.byteLength",!0),bN=FA("Object.prototype.toString"),OA=!!bg&&!_f&&new bg(0).slice,IA=!!OA&&yN(OA);$A.exports=_f||IA?function(t){if(!t||typeof t!="object")return!1;try{return _f?_f(t):IA(t,0),!0}catch(r){return!1}}:bg?function(t){return bN(t)==="[object ArrayBuffer]"}:function(t){return!1}});var DA=I((JV,LA)=>{"use strict";g();var _N=Date.prototype.getDay,xN=function(t){try{return _N.call(t),!0}catch(r){return!1}},SN=Object.prototype.toString,EN="[object Date]",AN=Ci()();LA.exports=function(t){return typeof t!="object"||t===null?!1:AN?xN(t):SN.call(t)===EN}});var UA=I((eW,HA)=>{"use strict";g();var xg=br(),NA=Ci()(),jA,BA,Sg,Eg;NA&&(jA=xg("Object.prototype.hasOwnProperty"),BA=xg("RegExp.prototype.exec"),Sg={},xf=function(){throw Sg},Eg={toString:xf,valueOf:xf},typeof Symbol.toPrimitive=="symbol"&&(Eg[Symbol.toPrimitive]=xf));var xf,kN=xg("Object.prototype.toString"),TN=Object.getOwnPropertyDescriptor,CN="[object RegExp]";HA.exports=NA?function(t){if(!t||typeof t!="object")return!1;var r=TN(t,"lastIndex"),n=r&&jA(r,"value");if(!n)return!1;try{BA(t,Eg)}catch(i){return i===Sg}}:function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:kN(t)===CN}});var VA=I((rW,zA)=>{"use strict";g();var PN=br(),GA=PN("SharedArrayBuffer.prototype.byteLength",!0);zA.exports=GA?function(t){if(!t||typeof t!="object")return!1;try{return GA(t),!0}catch(r){return!1}}:function(t){return!1}});var qA=I((iW,WA)=>{"use strict";g();var RN=Number.prototype.toString,MN=function(t){try{return RN.call(t),!0}catch(r){return!1}},ON=Object.prototype.toString,IN="[object Number]",FN=Ci()();WA.exports=function(t){return typeof t=="number"?!0:typeof t!="object"?!1:FN?MN(t):ON.call(t)===IN}});var ZA=I((sW,XA)=>{"use strict";g();var YA=br(),$N=YA("Boolean.prototype.toString"),LN=YA("Object.prototype.toString"),DN=function(t){try{return $N(t),!0}catch(r){return!1}},NN="[object Boolean]",jN=Ci()();XA.exports=function(t){return typeof t=="boolean"?!0:t===null||typeof t!="object"?!1:jN&&Symbol.toStringTag in t?DN(t):LN(t)===NN}});var ek=I((lW,Ag)=>{"use strict";g();var BN=Object.prototype.toString,HN=Ku()();HN?(KA=Symbol.prototype.toString,JA=/^Symbol\(.*\)$/,QA=function(t){return typeof t.valueOf()!="symbol"?!1:JA.test(KA.call(t))},Ag.exports=function(t){if(typeof t=="symbol")return!0;if(BN.call(t)!=="[object Symbol]")return!1;try{return QA(t)}catch(r){return!1}}):Ag.exports=function(t){return!1};var KA,JA,QA});var nk=I((uW,rk)=>{"use strict";g();var tk=typeof BigInt!="undefined"&&BigInt;rk.exports=function(){return typeof tk=="function"&&typeof BigInt=="function"&&typeof tk(42)=="bigint"&&typeof BigInt(42)=="bigint"}});var sk=I((dW,kg)=>{"use strict";g();var UN=nk()();UN?(ik=BigInt.prototype.valueOf,ak=function(t){try{return ik.call(t),!0}catch(r){}return!1},kg.exports=function(t){return t===null||typeof t=="undefined"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:ak(t)}):kg.exports=function(t){return!1};var ik,ak});var lk=I((pW,ok)=>{"use strict";g();var GN=ng(),zN=qA(),VN=ZA(),WN=ek(),qN=sk();ok.exports=function(t){if(t==null||typeof t!="object"&&typeof t!="function")return null;if(GN(t))return"String";if(zN(t))return"Number";if(VN(t))return"Boolean";if(WN(t))return"Symbol";if(qN(t))return"BigInt"}});var fk=I((gW,uk)=>{"use strict";g();var Sf=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,ck=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,Ef;Sf||(Ef=function(t){return!1});var Cg=Sf?Sf.prototype.has:null,Tg=ck?ck.prototype.has:null;!Ef&&!Cg&&(Ef=function(t){return!1});uk.exports=Ef||function(t){if(!t||typeof t!="object")return!1;try{if(Cg.call(t,Cg),Tg)try{Tg.call(t,Tg)}catch(r){return!0}return t instanceof Sf}catch(r){}return!1}});var hk=I((yW,Rg)=>{"use strict";g();var YN=en(),dk=br(),XN=YN("%WeakSet%",!0),Pg=dk("WeakSet.prototype.has",!0);Pg?(Af=dk("WeakMap.prototype.has",!0),Rg.exports=function(t){if(!t||typeof t!="object")return!1;try{if(Pg(t,Pg),Af)try{Af(t,Af)}catch(r){return!0}return t instanceof XN}catch(r){}return!1}):Rg.exports=function(t){return!1};var Af});var mk=I((bW,pk)=>{"use strict";g();var ZN=ag(),KN=og(),JN=fk(),QN=hk();pk.exports=function(t){if(t&&typeof t=="object"){if(ZN(t))return"Map";if(KN(t))return"Set";if(JN(t))return"WeakMap";if(QN(t))return"WeakSet"}return!1}});var wk=I((xW,yk)=>{"use strict";g();var vk=Function.prototype.toString,Us=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Og,kf;if(typeof Us=="function"&&typeof Object.defineProperty=="function")try{Og=Object.defineProperty({},"length",{get:function(){throw kf}}),kf={},Us(function(){throw 42},null,Og)}catch(e){e!==kf&&(Us=null)}else Us=null;var ej=/^\s*class\b/,Ig=function(t){try{var r=vk.call(t);return ej.test(r)}catch(n){return!1}},Mg=function(t){try{return Ig(t)?!1:(vk.call(t),!0)}catch(r){return!1}},Tf=Object.prototype.toString,tj="[object Object]",rj="[object Function]",nj="[object GeneratorFunction]",ij="[object HTMLAllCollection]",aj="[object HTML document.all class]",sj="[object HTMLCollection]",oj=typeof Symbol=="function"&&!!Symbol.toStringTag,lj=!(0 in[,]),Fg=function(){return!1};typeof document=="object"&&(gk=document.all,Tf.call(gk)===Tf.call(document.all)&&(Fg=function(t){if((lj||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=Tf.call(t);return(r===ij||r===aj||r===sj||r===tj)&&t("")==null}catch(n){}return!1}));var gk;yk.exports=Us?function(t){if(Fg(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Us(t,null,Og)}catch(r){if(r!==kf)return!1}return!Ig(t)&&Mg(t)}:function(t){if(Fg(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(oj)return Mg(t);if(Ig(t))return!1;var r=Tf.call(t);return r!==rj&&r!==nj&&!/^\[object HTML/.test(r)?!1:Mg(t)}});var xk=I((EW,_k)=>{"use strict";g();var cj=wk(),uj=Object.prototype.toString,bk=Object.prototype.hasOwnProperty,fj=function(t,r,n){for(var i=0,a=t.length;i=3&&(i=n),uj.call(t)==="[object Array]"?fj(t,r,i):typeof t=="string"?dj(t,r,i):hj(t,r,i)};_k.exports=pj});var Ek=I((kW,Sk)=>{"use strict";g();Sk.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var kk=I((CW,Ak)=>{"use strict";g();var $g=Ek(),mj=typeof globalThis=="undefined"?global:globalThis;Ak.exports=function(){for(var t=[],r=0;r<$g.length;r++)typeof mj[$g[r]]=="function"&&(t[t.length]=$g[r]);return t}});var Mk=I((RW,Rk)=>{"use strict";g();var Pf=xk(),gj=kk(),Tk=wa(),Ng=br(),Cf=af(),vj=Ng("Object.prototype.toString"),Pk=Ci()(),Ck=typeof globalThis=="undefined"?global:globalThis,Dg=gj(),jg=Ng("String.prototype.slice"),Lg=Object.getPrototypeOf,yj=Ng("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:bj(t)}return Cf?wj(t):null}});var Fk=I((OW,Ik)=>{"use strict";g();var _j=br(),Ok=_j("ArrayBuffer.prototype.byteLength",!0),xj=_g();Ik.exports=function(t){return xj(t)?Ok?Ok(t):t.byteLength:NaN}});var aT=I((FW,iT)=>{"use strict";g();var tT=fE(),An=br(),$k=AE(),Sj=en(),Gs=xA(),Ej=eg(),Lk=MA(),Dk=Bm(),Nk=rg(),jk=_g(),Bk=DA(),Hk=UA(),Uk=VA(),Gk=Zu(),zk=lk(),Vk=mk(),Wk=Mk(),qk=Fk(),Yk=An("SharedArrayBuffer.prototype.byteLength",!0),Xk=An("Date.prototype.getTime"),Bg=Object.getPrototypeOf,Zk=An("Object.prototype.toString"),Of=Sj("%Set%",!0),Hg=An("Map.prototype.has",!0),If=An("Map.prototype.get",!0),Kk=An("Map.prototype.size",!0),Ff=An("Set.prototype.add",!0),rT=An("Set.prototype.delete",!0),$f=An("Set.prototype.has",!0),Mf=An("Set.prototype.size",!0);function Jk(e,t,r,n){for(var i=Gs(e),a;(a=i.next())&&!a.done;)if(tn(t,a.value,r,n))return rT(e,a.value),!0;return!1}function nT(e){if(typeof e=="undefined")return null;if(typeof e!="object")return typeof e=="symbol"?!1:typeof e=="string"||typeof e=="number"?+e==+e:!0}function Aj(e,t,r,n,i,a){var s=nT(r);if(s!=null)return s;var o=If(t,s),c=tT({},i,{strict:!1});return typeof o=="undefined"&&!Hg(t,s)||!tn(n,o,c,a)?!1:!Hg(e,s)&&tn(n,o,c,a)}function kj(e,t,r){var n=nT(r);return n!=null?n:$f(t,n)&&!$f(e,n)}function Qk(e,t,r,n,i,a){for(var s=Gs(e),o,c;(o=s.next())&&!o.done;)if(c=o.value,tn(r,c,i,a)&&tn(n,If(t,c),i,a))return rT(e,c),!0;return!1}function tn(e,t,r,n){var i=r||{};if(i.strict?Lk(e,t):e===t)return!0;var a=zk(e),s=zk(t);if(a!==s)return!1;if(!e||!t||typeof e!="object"&&typeof t!="object")return i.strict?Lk(e,t):e==t;var o=n.has(e),c=n.has(t),l;if(o&&c){if(n.get(e)===n.get(t))return!0}else l={};return o||n.set(e,l),c||n.set(t,l),Pj(e,t,i,n)}function eT(e){return!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}function Tj(e,t,r,n){if(Mf(e)!==Mf(t))return!1;for(var i=Gs(e),a=Gs(t),s,o,c;(s=i.next())&&!s.done;)if(s.value&&typeof s.value=="object")c||(c=new Of),Ff(c,s.value);else if(!$f(t,s.value)){if(r.strict||!kj(e,t,s.value))return!1;c||(c=new Of),Ff(c,s.value)}if(c){for(;(o=a.next())&&!o.done;)if(o.value&&typeof o.value=="object"){if(!Jk(c,o.value,r.strict,n))return!1}else if(!r.strict&&!$f(e,o.value)&&!Jk(c,o.value,r.strict,n))return!1;return Mf(c)===0}return!0}function Cj(e,t,r,n){if(Kk(e)!==Kk(t))return!1;for(var i=Gs(e),a=Gs(t),s,o,c,l,u,f;(s=i.next())&&!s.done;)if(l=s.value[0],u=s.value[1],l&&typeof l=="object")c||(c=new Of),Ff(c,l);else if(f=If(t,l),typeof f=="undefined"&&!Hg(t,l)||!tn(u,f,r,n)){if(r.strict||!Aj(e,t,l,u,r,n))return!1;c||(c=new Of),Ff(c,l)}if(c){for(;(o=a.next())&&!o.done;)if(l=o.value[0],f=o.value[1],l&&typeof l=="object"){if(!Qk(c,e,l,f,r,n))return!1}else if(!r.strict&&(!e.has(l)||!tn(If(e,l),f,r,n))&&!Qk(c,e,l,f,tT({},r,{strict:!1}),n))return!1;return Mf(c)===0}return!0}function Pj(e,t,r,n){var i,a;if(typeof e!=typeof t||e==null||t==null||Zk(e)!==Zk(t)||Dk(e)!==Dk(t))return!1;var s=Nk(e),o=Nk(t);if(s!==o)return!1;var c=e instanceof Error,l=t instanceof Error;if(c!==l||(c||l)&&(e.name!==t.name||e.message!==t.message))return!1;var u=Hk(e),f=Hk(t);if(u!==f||(u||f)&&(e.source!==t.source||$k(e)!==$k(t)))return!1;var d=Bk(e),h=Bk(t);if(d!==h||(d||h)&&Xk(e)!==Xk(t)||r.strict&&Bg&&Bg(e)!==Bg(t))return!1;var p=Wk(e),m=Wk(t);if(p!==m)return!1;if(p||m){if(e.length!==t.length)return!1;for(i=0;i=0;i--)if(k[i]!=w[i])return!1;for(i=k.length-1;i>=0;i--)if(a=k[i],!tn(e[a],t[a],r,n))return!1;var A=Vk(e),S=Vk(t);return A!==S?!1:A==="Set"||S==="Set"?Tj(e,t,r,n):A==="Map"?Cj(e,t,r,n):!0}iT.exports=function(t,r,n){return tn(t,r,n,Ej())}});var Xg=I((exports,module)=>{g();(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=typeof define=="function"&&define.amd,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer!="undefined",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(r){return new Sha256(t,!0).update(r)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(i){return t.create().update(i)};for(var r=0;r>2]|=e[i]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|n&63)<=57344?(o[a>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|n&63)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|n&63)<=64?(this.block=o[16],this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,s=this.h6,o=this.h7,c=this.blocks,l,u,f,d,h,p,m,v,y,b,x;for(l=16;l<64;++l)h=c[l-15],u=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,h=c[l-2],f=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,c[l]=c[l-16]+u+c[l-7]+f<<0;for(x=t&r,l=0;l<64;l+=4)this.first?(this.is224?(v=300032,h=c[0]-1413257819,o=h-150054599<<0,n=h+24177077<<0):(v=704751109,h=c[0]-210244248,o=h-1521486534<<0,n=h+143694565<<0),this.first=!1):(u=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),f=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),v=e&t,d=v^e&r^x,m=i&a^~i&s,h=o+f+m+K[l]+c[l],p=u+d,o=n+h<<0,n=h+p<<0),u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),f=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),y=n&e,d=y^n&t^v,m=o&i^~o&a,h=s+f+m+K[l+1]+c[l+1],p=u+d,s=r+h<<0,r=h+p<<0,u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),f=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),b=r&n,d=b^r&e^y,m=s&o^~s&i,h=a+f+m+K[l+2]+c[l+2],p=u+d,a=t+h<<0,t=h+p<<0,u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),f=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),x=t&r,d=x^t&n^b,m=a&s^~a&o,h=i+f+m+K[l+3]+c[l+3],p=u+d,i=e+h<<0,e=h+p<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+r<<0,this.h3=this.h3+n<<0,this.h4=this.h4+i<<0,this.h5=this.h5+a<<0,this.h6=this.h6+s<<0,this.h7=this.h7+o<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,s=this.h6,o=this.h7,c=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[a&15]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[s&15];return this.is224||(c+=HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[o&15]),c},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,s=this.h6,o=this.h7,c=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,r>>24&255,r>>16&255,r>>8&255,r&255,n>>24&255,n>>16&255,n>>8&255,n&255,i>>24&255,i>>16&255,i>>8&255,i&255,a>>24&255,a>>16&255,a>>8&255,a&255,s>>24&255,s>>16&255,s>>8&255,s&255];return this.is224||c.push(o>>24&255,o>>16&255,o>>8&255,o&255),c},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function HmacSha256(e,t,r){var n,i=typeof e;if(i==="string"){var a=[],s=e.length,o=0,c;for(n=0;n>6,a[o++]=128|c&63):c<55296||c>=57344?(a[o++]=224|c>>12,a[o++]=128|c>>6&63,a[o++]=128|c&63):(c=65536+((c&1023)<<10|e.charCodeAt(++n)&1023),a[o++]=240|c>>18,a[o++]=128|c>>12&63,a[o++]=128|c>>6&63,a[o++]=128|c&63);e=a}else if(i==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);e.length>64&&(e=new Sha256(t,!0).update(e).array());var l=[],u=[];for(n=0;n<64;++n){var f=e[n]||0;l[n]=92^f,u[n]=54^f}Sha256.call(this,t,r),this.update(u),this.oKeyPad=l,this.inner=!0,this.sharedMemory=r}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&define(function(){return exports}))})()});var kC=I(E0=>{g();(function(e){var t=/\S/,r=/\"/g,n=/\n/g,i=/\r/g,a=/\\/g,s=/\u2028/,o=/\u2029/;e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(A,S){var T=A.length,P=0,O=1,j=2,D=P,Q=null,de=null,ee="",J=[],Pe=!1,me=0,F=0,G="{{",N="}}";function Me(){ee.length>0&&(J.push({tag:"_t",text:new String(ee)}),ee="")}function Dt(){for(var st=!0,ot=F;ot"&&($e.indent=J[Ct].text.toString()),J.splice(Ct,1));else ot||J.push({tag:` -`});Pe=!1,F=J.length}function Ee(st,ot){var Ct="="+N,$e=st.indexOf(Ct,ot),U=l(st.substring(st.indexOf("=",ot)+1,$e)).split(" ");return G=U[0],N=U[U.length-1],$e+Ct.length-1}for(S&&(S=S.split(" "),G=S[0],N=S[1]),me=0;me0;){if(D=w.shift(),j&&j.tag=="<"&&!(D.tag in f))throw new Error("Illegal content in < super tag.");if(e.tags[D.tag]<=e.tags.$||h(D,T))S.push(D),D.nodes=d(w,D.tag,S,T);else if(D.tag=="/"){if(S.length===0)throw new Error("Closing tag without opener: /"+D.n);if(O=S.pop(),D.n!=O.n&&!p(D.n,O.n,T))throw new Error("Nesting error: "+O.n+" vs. "+D.n);return O.end=D.i,P}else D.tag==` -`&&(D.last=w.length==0||w[0].tag==` -`);P.push(D)}if(S.length>0)throw new Error("missing closing tag: "+S.pop().n);return P}function h(w,A){for(var S=0,T=A.length;S":E,"<":function(w,A){var S={partials:{},code:"",subs:{},inPartial:!0};e.walk(w.nodes,S);var T=A.partials[E(w,A)];T.subs=S.subs,T.partials=S.partials},$:function(w,A){var S={subs:{},code:"",partials:A.partials,prefix:w.n};e.walk(w.nodes,S),A.subs[w.n]=S.code,A.inPartial||(A.code+='t.sub("'+b(w.n)+'",c,p,i);')},"\n":function(w,A){A.code+=k('"\\n"'+(w.last?"":" + i"))},_v:function(w,A){A.code+="t.b(t.v(t."+x(w.n)+'("'+b(w.n)+'",c,p,0)));'},_t:function(w,A){A.code+=k('"'+b(w.text)+'"')},"{":_,"&":_};function _(w,A){A.code+="t.b(t.t(t."+x(w.n)+'("'+b(w.n)+'",c,p,0)));'}function k(w){return"t.b("+w+");"}e.walk=function(w,A){for(var S,T=0,P=w.length;T{g();var UB={};(function(e){e.Template=function(d,h,p,m){d=d||{},this.r=d.code||this.r,this.c=p,this.options=m||{},this.text=h||"",this.partials=d.partials||{},this.subs=d.subs||{},this.buf=""},e.Template.prototype={r:function(d,h,p){return""},v:u,t:l,render:function(h,p,m){return this.ri([h],p||{},m)},ri:function(d,h,p){return this.r(d,h,p)},ep:function(d,h){var p=this.partials[d],m=h[p.name];if(p.instance&&p.base==m)return p.instance;if(typeof m=="string"){if(!this.c)throw new Error("No compiler available.");m=this.c.compile(m,this.options)}if(!m)return null;if(this.partials[d].base=m,p.subs){h.stackText||(h.stackText={});for(key in p.subs)h.stackText[key]||(h.stackText[key]=this.activeSub!==void 0&&h.stackText[this.activeSub]?h.stackText[this.activeSub]:this.text);m=r(m,p.subs,p.partials,this.stackSubs,this.stackPartials,h.stackText)}return this.partials[d].instance=m,m},rp:function(d,h,p,m){var v=this.ep(d,p);return v?v.ri(h,p,m):""},rs:function(d,h,p){var m=d[d.length-1];if(!f(m)){p(d,h,this);return}for(var v=0;v=0;E--)if(y=h[E],v=t(d,y,x),v!==void 0){b=!0;break}return b?(!m&&typeof v=="function"&&(v=this.mv(v,h,p)),v):m?!1:""},ls:function(d,h,p,m,v){var y=this.options.delimiters;return this.options.delimiters=v,this.b(this.ct(l(d.call(h,m)),h,p)),this.options.delimiters=y,!1},ct:function(d,h,p){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(d,this.options).render(h,p)},b:function(d){this.buf+=d},fl:function(){var d=this.buf;return this.buf="",d},ms:function(d,h,p,m,v,y,b){var x,E=h[h.length-1],_=d.call(E);return typeof _=="function"?m?!0:(x=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(_,E,p,x.substring(v,y),b)):_},mv:function(d,h,p){var m=h[h.length-1],v=d.call(m);return typeof v=="function"?this.ct(l(v.call(m)),m,p):v},sub:function(d,h,p,m){var v=this.subs[d];v&&(this.activeSub=d,v(h,p,this,m),this.activeSub=!1)}};function t(d,h,p){var m;return h&&typeof h=="object"&&(h[d]!==void 0?m=h[d]:p&&h.get&&typeof h.get=="function"&&(m=h.get(d))),m}function r(d,h,p,m,v,y){function b(){}b.prototype=d;function x(){}x.prototype=d.subs;var E,_=new b;_.subs=new x,_.subsText={},_.buf="",m=m||{},_.stackSubs=m,_.subsText=y;for(E in h)m[E]||(m[E]=h[E]);for(E in m)_.subs[E]=m[E];v=v||{},_.stackPartials=v;for(E in p)v[E]||(v[E]=p[E]);for(E in v)_.partials[E]=v[E];return _}var n=/&/g,i=//g,s=/\'/g,o=/\"/g,c=/[&<>\"\']/;function l(d){return String(d==null?"":d)}function u(d){return d=l(d),c.test(d)?d.replace(n,"&").replace(i,"<").replace(a,">").replace(s,"'").replace(o,"""):d}var f=Array.isArray||function(d){return Object.prototype.toString.call(d)==="[object Array]"}})(typeof A0!="undefined"?A0:UB)});var k0=I((LX,CC)=>{g();var md=kC();md.Template=TC().Template;md.template=md.Template;CC.exports=md});var X3=I((yc,Sv)=>{g();(function(t,r){typeof yc=="object"&&typeof Sv=="object"?Sv.exports=r():typeof define=="function"&&define.amd?define([],r):typeof yc=="object"?yc.feather=r():t.feather=r()})(typeof self!="undefined"?self:yc,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.r=function(n){Object.defineProperty(n,"__esModule",{value:!0})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=0)}({"./dist/icons.json":function(e){e.exports={activity:'',airplay:'',"alert-circle":'',"alert-octagon":'',"alert-triangle":'',"align-center":'',"align-justify":'',"align-left":'',"align-right":'',anchor:'',aperture:'',archive:'',"arrow-down-circle":'',"arrow-down-left":'',"arrow-down-right":'',"arrow-down":'',"arrow-left-circle":'',"arrow-left":'',"arrow-right-circle":'',"arrow-right":'',"arrow-up-circle":'',"arrow-up-left":'',"arrow-up-right":'',"arrow-up":'',"at-sign":'',award:'',"bar-chart-2":'',"bar-chart":'',"battery-charging":'',battery:'',"bell-off":'',bell:'',bluetooth:'',bold:'',"book-open":'',book:'',bookmark:'',box:'',briefcase:'',calendar:'',"camera-off":'',camera:'',cast:'',"check-circle":'',"check-square":'',check:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',"chevrons-down":'',"chevrons-left":'',"chevrons-right":'',"chevrons-up":'',chrome:'',circle:'',clipboard:'',clock:'',"cloud-drizzle":'',"cloud-lightning":'',"cloud-off":'',"cloud-rain":'',"cloud-snow":'',cloud:'',code:'',codepen:'',codesandbox:'',coffee:'',columns:'',command:'',compass:'',copy:'',"corner-down-left":'',"corner-down-right":'',"corner-left-down":'',"corner-left-up":'',"corner-right-down":'',"corner-right-up":'',"corner-up-left":'',"corner-up-right":'',cpu:'',"credit-card":'',crop:'',crosshair:'',database:'',delete:'',disc:'',"divide-circle":'',"divide-square":'',divide:'',"dollar-sign":'',"download-cloud":'',download:'',dribbble:'',droplet:'',"edit-2":'',"edit-3":'',edit:'',"external-link":'',"eye-off":'',eye:'',facebook:'',"fast-forward":'',feather:'',figma:'',"file-minus":'',"file-plus":'',"file-text":'',file:'',film:'',filter:'',flag:'',"folder-minus":'',"folder-plus":'',folder:'',framer:'',frown:'',gift:'',"git-branch":'',"git-commit":'',"git-merge":'',"git-pull-request":'',github:'',gitlab:'',globe:'',grid:'',"hard-drive":'',hash:'',headphones:'',heart:'',"help-circle":'',hexagon:'',home:'',image:'',inbox:'',info:'',instagram:'',italic:'',key:'',layers:'',layout:'',"life-buoy":'',"link-2":'',link:'',linkedin:'',list:'',loader:'',lock:'',"log-in":'',"log-out":'',mail:'',"map-pin":'',map:'',"maximize-2":'',maximize:'',meh:'',menu:'',"message-circle":'',"message-square":'',"mic-off":'',mic:'',"minimize-2":'',minimize:'',"minus-circle":'',"minus-square":'',minus:'',monitor:'',moon:'',"more-horizontal":'',"more-vertical":'',"mouse-pointer":'',move:'',music:'',"navigation-2":'',navigation:'',octagon:'',package:'',paperclip:'',"pause-circle":'',pause:'',"pen-tool":'',percent:'',"phone-call":'',"phone-forwarded":'',"phone-incoming":'',"phone-missed":'',"phone-off":'',"phone-outgoing":'',phone:'',"pie-chart":'',"play-circle":'',play:'',"plus-circle":'',"plus-square":'',plus:'',pocket:'',power:'',printer:'',radio:'',"refresh-ccw":'',"refresh-cw":'',repeat:'',rewind:'',"rotate-ccw":'',"rotate-cw":'',rss:'',save:'',scissors:'',search:'',send:'',server:'',settings:'',"share-2":'',share:'',"shield-off":'',shield:'',"shopping-bag":'',"shopping-cart":'',shuffle:'',sidebar:'',"skip-back":'',"skip-forward":'',slack:'',slash:'',sliders:'',smartphone:'',smile:'',speaker:'',square:'',star:'',"stop-circle":'',sun:'',sunrise:'',sunset:'',table:'',tablet:'',tag:'',target:'',terminal:'',thermometer:'',"thumbs-down":'',"thumbs-up":'',"toggle-left":'',"toggle-right":'',tool:'',"trash-2":'',trash:'',trello:'',"trending-down":'',"trending-up":'',triangle:'',truck:'',tv:'',twitch:'',twitter:'',type:'',umbrella:'',underline:'',unlock:'',"upload-cloud":'',upload:'',"user-check":'',"user-minus":'',"user-plus":'',"user-x":'',user:'',users:'',"video-off":'',video:'',voicemail:'',"volume-1":'',"volume-2":'',"volume-x":'',volume:'',watch:'',"wifi-off":'',wifi:'',wind:'',"x-circle":'',"x-octagon":'',"x-square":'',x:'',youtube:'',"zap-off":'',zap:'',"zoom-in":'',"zoom-out":''}},"./node_modules/classnames/dedupe.js":function(e,t,r){var n,i;(function(){"use strict";var a=function(){function s(){}s.prototype=Object.create(null);function o(m,v){for(var y=v.length,b=0;b1?arguments[1]:void 0,v=m!==void 0,y=0,b=l(d),x,E,_,k;if(v&&(m=n(m,p>2?arguments[2]:void 0,2)),b!=null&&!(h==Array&&s(b)))for(k=b.call(d),E=new h;!(_=k.next()).done;y++)c(E,y,v?a(k,m,[_.value,y],!0):_.value);else for(x=o(d.length),E=new h(x);x>y;y++)c(E,y,v?m(d[y],y):d[y]);return E.length=y,E}},"./node_modules/core-js/internals/array-includes.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-indexed-object.js"),i=r("./node_modules/core-js/internals/to-length.js"),a=r("./node_modules/core-js/internals/to-absolute-index.js");e.exports=function(s){return function(o,c,l){var u=n(o),f=i(u.length),d=a(l,f),h;if(s&&c!=c){for(;f>d;)if(h=u[d++],h!=h)return!0}else for(;f>d;d++)if((s||d in u)&&u[d]===c)return s||d||0;return!s&&-1}}},"./node_modules/core-js/internals/bind-context.js":function(e,t,r){var n=r("./node_modules/core-js/internals/a-function.js");e.exports=function(i,a,s){if(n(i),a===void 0)return i;switch(s){case 0:return function(){return i.call(a)};case 1:return function(o){return i.call(a,o)};case 2:return function(o,c){return i.call(a,o,c)};case 3:return function(o,c,l){return i.call(a,o,c,l)}}return function(){return i.apply(a,arguments)}}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":function(e,t,r){var n=r("./node_modules/core-js/internals/an-object.js");e.exports=function(i,a,s,o){try{return o?a(n(s)[0],s[1]):a(s)}catch(l){var c=i.return;throw c!==void 0&&n(c.call(i)),l}}},"./node_modules/core-js/internals/check-correctness-of-iteration.js":function(e,t,r){var n=r("./node_modules/core-js/internals/well-known-symbol.js"),i=n("iterator"),a=!1;try{var s=0,o={next:function(){return{done:!!s++}},return:function(){a=!0}};o[i]=function(){return this},Array.from(o,function(){throw 2})}catch(c){}e.exports=function(c,l){if(!l&&!a)return!1;var u=!1;try{var f={};f[i]=function(){return{next:function(){return{done:u=!0}}}},c(f)}catch(d){}return u}},"./node_modules/core-js/internals/classof-raw.js":function(e,t){var r={}.toString;e.exports=function(n){return r.call(n).slice(8,-1)}},"./node_modules/core-js/internals/classof.js":function(e,t,r){var n=r("./node_modules/core-js/internals/classof-raw.js"),i=r("./node_modules/core-js/internals/well-known-symbol.js"),a=i("toStringTag"),s=n(function(){return arguments}())=="Arguments",o=function(c,l){try{return c[l]}catch(u){}};e.exports=function(c){var l,u,f;return c===void 0?"Undefined":c===null?"Null":typeof(u=o(l=Object(c),a))=="string"?u:s?n(l):(f=n(l))=="Object"&&typeof l.callee=="function"?"Arguments":f}},"./node_modules/core-js/internals/copy-constructor-properties.js":function(e,t,r){var n=r("./node_modules/core-js/internals/has.js"),i=r("./node_modules/core-js/internals/own-keys.js"),a=r("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),s=r("./node_modules/core-js/internals/object-define-property.js");e.exports=function(o,c){for(var l=i(c),u=s.f,f=a.f,d=0;d",x="java"+y+":",E;for(p.style.display="none",o.appendChild(p),p.src=String(x),E=p.contentWindow.document,E.open(),E.write(v+y+b+"document.F=Object"+v+"/"+y+b),E.close(),h=E.F;m--;)delete h[f][a[m]];return h()};e.exports=Object.create||function(m,v){var y;return m!==null?(d[f]=n(m),y=new d,d[f]=null,y[u]=m):y=h(),v===void 0?y:i(y,v)},s[u]=!0},"./node_modules/core-js/internals/object-define-properties.js":function(e,t,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/object-define-property.js"),a=r("./node_modules/core-js/internals/an-object.js"),s=r("./node_modules/core-js/internals/object-keys.js");e.exports=n?Object.defineProperties:function(c,l){a(c);for(var u=s(l),f=u.length,d=0,h;f>d;)i.f(c,h=u[d++],l[h]);return c}},"./node_modules/core-js/internals/object-define-property.js":function(e,t,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/ie8-dom-define.js"),a=r("./node_modules/core-js/internals/an-object.js"),s=r("./node_modules/core-js/internals/to-primitive.js"),o=Object.defineProperty;t.f=n?o:function(l,u,f){if(a(l),u=s(u,!0),a(f),i)try{return o(l,u,f)}catch(d){}if("get"in f||"set"in f)throw TypeError("Accessors not supported");return"value"in f&&(l[u]=f.value),l}},"./node_modules/core-js/internals/object-get-own-property-descriptor.js":function(e,t,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/object-property-is-enumerable.js"),a=r("./node_modules/core-js/internals/create-property-descriptor.js"),s=r("./node_modules/core-js/internals/to-indexed-object.js"),o=r("./node_modules/core-js/internals/to-primitive.js"),c=r("./node_modules/core-js/internals/has.js"),l=r("./node_modules/core-js/internals/ie8-dom-define.js"),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(d,h){if(d=s(d),h=o(h,!0),l)try{return u(d,h)}catch(p){}if(c(d,h))return a(!i.f.call(d,h),d[h])}},"./node_modules/core-js/internals/object-get-own-property-names.js":function(e,t,r){var n=r("./node_modules/core-js/internals/object-keys-internal.js"),i=r("./node_modules/core-js/internals/enum-bug-keys.js"),a=i.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(o){return n(o,a)}},"./node_modules/core-js/internals/object-get-own-property-symbols.js":function(e,t){t.f=Object.getOwnPropertySymbols},"./node_modules/core-js/internals/object-get-prototype-of.js":function(e,t,r){var n=r("./node_modules/core-js/internals/has.js"),i=r("./node_modules/core-js/internals/to-object.js"),a=r("./node_modules/core-js/internals/shared-key.js"),s=r("./node_modules/core-js/internals/correct-prototype-getter.js"),o=a("IE_PROTO"),c=Object.prototype;e.exports=s?Object.getPrototypeOf:function(l){return l=i(l),n(l,o)?l[o]:typeof l.constructor=="function"&&l instanceof l.constructor?l.constructor.prototype:l instanceof Object?c:null}},"./node_modules/core-js/internals/object-keys-internal.js":function(e,t,r){var n=r("./node_modules/core-js/internals/has.js"),i=r("./node_modules/core-js/internals/to-indexed-object.js"),a=r("./node_modules/core-js/internals/array-includes.js"),s=r("./node_modules/core-js/internals/hidden-keys.js"),o=a(!1);e.exports=function(c,l){var u=i(c),f=0,d=[],h;for(h in u)!n(s,h)&&n(u,h)&&d.push(h);for(;l.length>f;)n(u,h=l[f++])&&(~o(d,h)||d.push(h));return d}},"./node_modules/core-js/internals/object-keys.js":function(e,t,r){var n=r("./node_modules/core-js/internals/object-keys-internal.js"),i=r("./node_modules/core-js/internals/enum-bug-keys.js");e.exports=Object.keys||function(s){return n(s,i)}},"./node_modules/core-js/internals/object-property-is-enumerable.js":function(e,t,r){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a=i&&!n.call({1:2},1);t.f=a?function(o){var c=i(this,o);return!!c&&c.enumerable}:n},"./node_modules/core-js/internals/object-set-prototype-of.js":function(e,t,r){var n=r("./node_modules/core-js/internals/validate-set-prototype-of-arguments.js");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,a={},s;try{s=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,s.call(a,[]),i=a instanceof Array}catch(o){}return function(c,l){return n(c,l),i?s.call(c,l):c.__proto__=l,c}}():void 0)},"./node_modules/core-js/internals/own-keys.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/object-get-own-property-names.js"),a=r("./node_modules/core-js/internals/object-get-own-property-symbols.js"),s=r("./node_modules/core-js/internals/an-object.js"),o=n.Reflect;e.exports=o&&o.ownKeys||function(l){var u=i.f(s(l)),f=a.f;return f?u.concat(f(l)):u}},"./node_modules/core-js/internals/path.js":function(e,t,r){e.exports=r("./node_modules/core-js/internals/global.js")},"./node_modules/core-js/internals/redefine.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/shared.js"),a=r("./node_modules/core-js/internals/hide.js"),s=r("./node_modules/core-js/internals/has.js"),o=r("./node_modules/core-js/internals/set-global.js"),c=r("./node_modules/core-js/internals/function-to-string.js"),l=r("./node_modules/core-js/internals/internal-state.js"),u=l.get,f=l.enforce,d=String(c).split("toString");i("inspectSource",function(h){return c.call(h)}),(e.exports=function(h,p,m,v){var y=v?!!v.unsafe:!1,b=v?!!v.enumerable:!1,x=v?!!v.noTargetGet:!1;if(typeof m=="function"&&(typeof p=="string"&&!s(m,"name")&&a(m,"name",p),f(m).source=d.join(typeof p=="string"?p:"")),h===n){b?h[p]=m:o(p,m);return}else y?!x&&h[p]&&(b=!0):delete h[p];b?h[p]=m:a(h,p,m)})(Function.prototype,"toString",function(){return typeof this=="function"&&u(this).source||c.call(this)})},"./node_modules/core-js/internals/require-object-coercible.js":function(e,t){e.exports=function(r){if(r==null)throw TypeError("Can't call method on "+r);return r}},"./node_modules/core-js/internals/set-global.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/hide.js");e.exports=function(a,s){try{i(n,a,s)}catch(o){n[a]=s}return s}},"./node_modules/core-js/internals/set-to-string-tag.js":function(e,t,r){var n=r("./node_modules/core-js/internals/object-define-property.js").f,i=r("./node_modules/core-js/internals/has.js"),a=r("./node_modules/core-js/internals/well-known-symbol.js"),s=a("toStringTag");e.exports=function(o,c,l){o&&!i(o=l?o:o.prototype,s)&&n(o,s,{configurable:!0,value:c})}},"./node_modules/core-js/internals/shared-key.js":function(e,t,r){var n=r("./node_modules/core-js/internals/shared.js"),i=r("./node_modules/core-js/internals/uid.js"),a=n("keys");e.exports=function(s){return a[s]||(a[s]=i(s))}},"./node_modules/core-js/internals/shared.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/set-global.js"),a=r("./node_modules/core-js/internals/is-pure.js"),s="__core-js_shared__",o=n[s]||i(s,{});(e.exports=function(c,l){return o[c]||(o[c]=l!==void 0?l:{})})("versions",[]).push({version:"3.1.3",mode:a?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},"./node_modules/core-js/internals/string-at.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-integer.js"),i=r("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(a,s,o){var c=String(i(a)),l=n(s),u=c.length,f,d;return l<0||l>=u?o?"":void 0:(f=c.charCodeAt(l),f<55296||f>56319||l+1===u||(d=c.charCodeAt(l+1))<56320||d>57343?o?c.charAt(l):f:o?c.slice(l,l+2):(f-55296<<10)+(d-56320)+65536)}},"./node_modules/core-js/internals/to-absolute-index.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-integer.js"),i=Math.max,a=Math.min;e.exports=function(s,o){var c=n(s);return c<0?i(c+o,0):a(c,o)}},"./node_modules/core-js/internals/to-indexed-object.js":function(e,t,r){var n=r("./node_modules/core-js/internals/indexed-object.js"),i=r("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(a){return n(i(a))}},"./node_modules/core-js/internals/to-integer.js":function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(i){return isNaN(i=+i)?0:(i>0?n:r)(i)}},"./node_modules/core-js/internals/to-length.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-integer.js"),i=Math.min;e.exports=function(a){return a>0?i(n(a),9007199254740991):0}},"./node_modules/core-js/internals/to-object.js":function(e,t,r){var n=r("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(i){return Object(n(i))}},"./node_modules/core-js/internals/to-primitive.js":function(e,t,r){var n=r("./node_modules/core-js/internals/is-object.js");e.exports=function(i,a){if(!n(i))return i;var s,o;if(a&&typeof(s=i.toString)=="function"&&!n(o=s.call(i))||typeof(s=i.valueOf)=="function"&&!n(o=s.call(i))||!a&&typeof(s=i.toString)=="function"&&!n(o=s.call(i)))return o;throw TypeError("Can't convert object to primitive value")}},"./node_modules/core-js/internals/uid.js":function(e,t){var r=0,n=Math.random();e.exports=function(i){return"Symbol(".concat(i===void 0?"":i,")_",(++r+n).toString(36))}},"./node_modules/core-js/internals/validate-set-prototype-of-arguments.js":function(e,t,r){var n=r("./node_modules/core-js/internals/is-object.js"),i=r("./node_modules/core-js/internals/an-object.js");e.exports=function(a,s){if(i(a),!n(s)&&s!==null)throw TypeError("Can't set "+String(s)+" as a prototype")}},"./node_modules/core-js/internals/well-known-symbol.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/shared.js"),a=r("./node_modules/core-js/internals/uid.js"),s=r("./node_modules/core-js/internals/native-symbol.js"),o=n.Symbol,c=i("wks");e.exports=function(l){return c[l]||(c[l]=s&&o[l]||(s?o:a)("Symbol."+l))}},"./node_modules/core-js/modules/es.array.from.js":function(e,t,r){var n=r("./node_modules/core-js/internals/export.js"),i=r("./node_modules/core-js/internals/array-from.js"),a=r("./node_modules/core-js/internals/check-correctness-of-iteration.js"),s=!a(function(o){Array.from(o)});n({target:"Array",stat:!0,forced:s},{from:i})},"./node_modules/core-js/modules/es.string.iterator.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js/internals/string-at.js"),i=r("./node_modules/core-js/internals/internal-state.js"),a=r("./node_modules/core-js/internals/define-iterator.js"),s="String Iterator",o=i.set,c=i.getterFor(s);a(String,"String",function(l){o(this,{type:s,string:String(l),index:0})},function(){var u=c(this),f=u.string,d=u.index,h;return d>=f.length?{value:void 0,done:!0}:(h=n(f,d,!0),u.index+=h.length,{value:h,done:!1})})},"./node_modules/webpack/buildin/global.js":function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(n){typeof window=="object"&&(r=window)}e.exports=r},"./src/default-attrs.json":function(e){e.exports={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}},"./src/icon.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(h){for(var p=1;p2&&arguments[2]!==void 0?arguments[2]:[];u(this,h),this.name=p,this.contents=m,this.tags=v,this.attrs=n({},c.default,{class:"feather feather-"+p})}return i(h,[{key:"toSvg",value:function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v=n({},this.attrs,m,{class:(0,s.default)(this.attrs.class,m.class)});return""+this.contents+""}},{key:"toString",value:function(){return this.contents}}]),h}();function d(h){return Object.keys(h).map(function(p){return p+'="'+h[p]+'"'}).join(" ")}t.default=f},"./src/icons.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("./src/icon.js"),i=l(n),a=r("./dist/icons.json"),s=l(a),o=r("./src/tags.json"),c=l(o);function l(u){return u&&u.__esModule?u:{default:u}}t.default=Object.keys(s.default).map(function(u){return new i.default(u,s.default[u],c.default[u])}).reduce(function(u,f){return u[f.name]=f,u},{})},"./src/index.js":function(e,t,r){"use strict";var n=r("./src/icons.js"),i=l(n),a=r("./src/to-svg.js"),s=l(a),o=r("./src/replace.js"),c=l(o);function l(u){return u&&u.__esModule?u:{default:u}}e.exports={icons:i.default,toSvg:s.default,replace:c.default}},"./src/replace.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(d){for(var h=1;h0&&arguments[0]!==void 0?arguments[0]:{};if(typeof document=="undefined")throw new Error("`feather.replace()` only works in a browser environment.");var h=document.querySelectorAll("[data-feather]");Array.from(h).forEach(function(p){return u(p,d)})}function u(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=f(d),m=p["data-feather"];if(delete p["data-feather"],o.default[m]===void 0){console.warn("feather: '"+m+"' is not a valid icon");return}var v=o.default[m].toSvg(n({},h,p,{class:(0,a.default)(h.class,p.class)})),y=new DOMParser().parseFromString(v,"image/svg+xml"),b=y.querySelector("svg");d.parentNode.replaceChild(b,d)}function f(d){return Array.from(d.attributes).reduce(function(h,p){return h[p.name]=p.value,h},{})}t.default=l},"./src/tags.json":function(e){e.exports={activity:["pulse","health","action","motion"],airplay:["stream","cast","mirroring"],"alert-circle":["warning","alert","danger"],"alert-octagon":["warning","alert","danger"],"alert-triangle":["warning","alert","danger"],"align-center":["text alignment","center"],"align-justify":["text alignment","justified"],"align-left":["text alignment","left"],"align-right":["text alignment","right"],anchor:[],archive:["index","box"],"at-sign":["mention","at","email","message"],award:["achievement","badge"],aperture:["camera","photo"],"bar-chart":["statistics","diagram","graph"],"bar-chart-2":["statistics","diagram","graph"],battery:["power","electricity"],"battery-charging":["power","electricity"],bell:["alarm","notification","sound"],"bell-off":["alarm","notification","silent"],bluetooth:["wireless"],"book-open":["read","library"],book:["read","dictionary","booklet","magazine","library"],bookmark:["read","clip","marker","tag"],box:["cube"],briefcase:["work","bag","baggage","folder"],calendar:["date"],camera:["photo"],cast:["chromecast","airplay"],"chevron-down":["expand"],"chevron-up":["collapse"],circle:["off","zero","record"],clipboard:["copy"],clock:["time","watch","alarm"],"cloud-drizzle":["weather","shower"],"cloud-lightning":["weather","bolt"],"cloud-rain":["weather"],"cloud-snow":["weather","blizzard"],cloud:["weather"],codepen:["logo"],codesandbox:["logo"],code:["source","programming"],coffee:["drink","cup","mug","tea","cafe","hot","beverage"],columns:["layout"],command:["keyboard","cmd","terminal","prompt"],compass:["navigation","safari","travel","direction"],copy:["clone","duplicate"],"corner-down-left":["arrow","return"],"corner-down-right":["arrow"],"corner-left-down":["arrow"],"corner-left-up":["arrow"],"corner-right-down":["arrow"],"corner-right-up":["arrow"],"corner-up-left":["arrow"],"corner-up-right":["arrow"],cpu:["processor","technology"],"credit-card":["purchase","payment","cc"],crop:["photo","image"],crosshair:["aim","target"],database:["storage","memory"],delete:["remove"],disc:["album","cd","dvd","music"],"dollar-sign":["currency","money","payment"],droplet:["water"],edit:["pencil","change"],"edit-2":["pencil","change"],"edit-3":["pencil","change"],eye:["view","watch"],"eye-off":["view","watch","hide","hidden"],"external-link":["outbound"],facebook:["logo","social"],"fast-forward":["music"],figma:["logo","design","tool"],"file-minus":["delete","remove","erase"],"file-plus":["add","create","new"],"file-text":["data","txt","pdf"],film:["movie","video"],filter:["funnel","hopper"],flag:["report"],"folder-minus":["directory"],"folder-plus":["directory"],folder:["directory"],framer:["logo","design","tool"],frown:["emoji","face","bad","sad","emotion"],gift:["present","box","birthday","party"],"git-branch":["code","version control"],"git-commit":["code","version control"],"git-merge":["code","version control"],"git-pull-request":["code","version control"],github:["logo","version control"],gitlab:["logo","version control"],globe:["world","browser","language","translate"],"hard-drive":["computer","server","memory","data"],hash:["hashtag","number","pound"],headphones:["music","audio","sound"],heart:["like","love","emotion"],"help-circle":["question mark"],hexagon:["shape","node.js","logo"],home:["house","living"],image:["picture"],inbox:["email"],instagram:["logo","camera"],key:["password","login","authentication","secure"],layers:["stack"],layout:["window","webpage"],"life-buoy":["help","life ring","support"],link:["chain","url"],"link-2":["chain","url"],linkedin:["logo","social media"],list:["options"],lock:["security","password","secure"],"log-in":["sign in","arrow","enter"],"log-out":["sign out","arrow","exit"],mail:["email","message"],"map-pin":["location","navigation","travel","marker"],map:["location","navigation","travel"],maximize:["fullscreen"],"maximize-2":["fullscreen","arrows","expand"],meh:["emoji","face","neutral","emotion"],menu:["bars","navigation","hamburger"],"message-circle":["comment","chat"],"message-square":["comment","chat"],"mic-off":["record","sound","mute"],mic:["record","sound","listen"],minimize:["exit fullscreen","close"],"minimize-2":["exit fullscreen","arrows","close"],minus:["subtract"],monitor:["tv","screen","display"],moon:["dark","night"],"more-horizontal":["ellipsis"],"more-vertical":["ellipsis"],"mouse-pointer":["arrow","cursor"],move:["arrows"],music:["note"],navigation:["location","travel"],"navigation-2":["location","travel"],octagon:["stop"],package:["box","container"],paperclip:["attachment"],pause:["music","stop"],"pause-circle":["music","audio","stop"],"pen-tool":["vector","drawing"],percent:["discount"],"phone-call":["ring"],"phone-forwarded":["call"],"phone-incoming":["call"],"phone-missed":["call"],"phone-off":["call","mute"],"phone-outgoing":["call"],phone:["call"],play:["music","start"],"pie-chart":["statistics","diagram"],"play-circle":["music","start"],plus:["add","new"],"plus-circle":["add","new"],"plus-square":["add","new"],pocket:["logo","save"],power:["on","off"],printer:["fax","office","device"],radio:["signal"],"refresh-cw":["synchronise","arrows"],"refresh-ccw":["arrows"],repeat:["loop","arrows"],rewind:["music"],"rotate-ccw":["arrow"],"rotate-cw":["arrow"],rss:["feed","subscribe"],save:["floppy disk"],scissors:["cut"],search:["find","magnifier","magnifying glass"],send:["message","mail","email","paper airplane","paper aeroplane"],settings:["cog","edit","gear","preferences"],"share-2":["network","connections"],shield:["security","secure"],"shield-off":["security","insecure"],"shopping-bag":["ecommerce","cart","purchase","store"],"shopping-cart":["ecommerce","cart","purchase","store"],shuffle:["music"],"skip-back":["music"],"skip-forward":["music"],slack:["logo"],slash:["ban","no"],sliders:["settings","controls"],smartphone:["cellphone","device"],smile:["emoji","face","happy","good","emotion"],speaker:["audio","music"],star:["bookmark","favorite","like"],"stop-circle":["media","music"],sun:["brightness","weather","light"],sunrise:["weather","time","morning","day"],sunset:["weather","time","evening","night"],tablet:["device"],tag:["label"],target:["logo","bullseye"],terminal:["code","command line","prompt"],thermometer:["temperature","celsius","fahrenheit","weather"],"thumbs-down":["dislike","bad","emotion"],"thumbs-up":["like","good","emotion"],"toggle-left":["on","off","switch"],"toggle-right":["on","off","switch"],tool:["settings","spanner"],trash:["garbage","delete","remove","bin"],"trash-2":["garbage","delete","remove","bin"],triangle:["delta"],truck:["delivery","van","shipping","transport","lorry"],tv:["television","stream"],twitch:["logo"],twitter:["logo","social"],type:["text"],umbrella:["rain","weather"],unlock:["security"],"user-check":["followed","subscribed"],"user-minus":["delete","remove","unfollow","unsubscribe"],"user-plus":["new","add","create","follow","subscribe"],"user-x":["delete","remove","unfollow","unsubscribe","unavailable"],user:["person","account"],users:["group"],"video-off":["camera","movie","film"],video:["camera","movie","film"],voicemail:["phone"],volume:["music","sound","mute"],"volume-1":["music","sound"],"volume-2":["music","sound"],"volume-x":["music","sound","mute"],watch:["clock","time"],"wifi-off":["disabled"],wifi:["connection","signal","wireless"],wind:["weather","air"],"x-circle":["cancel","close","delete","remove","times","clear"],"x-octagon":["delete","stop","alert","warning","times","clear"],"x-square":["cancel","close","delete","remove","times","clear"],x:["cancel","close","delete","remove","times","clear"],youtube:["logo","video","play"],"zap-off":["flash","camera","lightning"],zap:["flash","camera","lightning"],"zoom-in":["magnifying glass"],"zoom-out":["magnifying glass"]}},"./src/to-svg.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("./src/icons.js"),i=a(n);function a(o){return o&&o.__esModule?o:{default:o}}function s(o){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(console.warn("feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead."),!o)throw new Error("The required `key` (icon name) parameter is missing.");if(!i.default[o])throw new Error("No icon matching '"+o+"'. See the complete list of icons at https://feathericons.com");return i.default[o].toSvg(c)}t.default=s},0:function(e,t,r){r("./node_modules/core-js/es/array/from.js"),e.exports=r("./src/index.js")}})})});var jH={};XP(jH,{default:()=>Jd});module.exports=ZP(jH);g();g();var Jo=ze(d1(),1),Sp=ze(_1(),1),Jw=ze(S1(),1),du=ze(uw(),1),tu=ze(hw(),1),Qw=ze(xw(),1),Jr=ze(Ew(),1),e2=ze(Pw(),1),_e=class e extends Error{constructor(t){super(t),this.caller=""}toJSON(){return{code:this.code,data:this.data,caller:this.caller,message:this.message,stack:this.stack}}fromJSON(t){let r=new e(t.message);return r.code=t.code,r.data=t.data,r.caller=t.caller,r.stack=t.stack,r}get isIsomorphicGitError(){return!0}},Qo=class e extends _e{constructor(t){super(`Modifying the index is not possible because you have unmerged files: ${t.toString}. Fix them up in the work tree, and then use 'git add/rm as appropriate to mark resolution and make a commit.`),this.code=this.name=e.code,this.data={filepaths:t}}};Qo.code="UnmergedPathsError";var le=class e extends _e{constructor(t){super(`An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${t}`),this.code=this.name=e.code,this.data={message:t}}};le.code="InternalError";var cs=class e extends _e{constructor(t){super(`The filepath "${t}" contains unsafe character sequences`),this.code=this.name=e.code,this.data={filepath:t}}};cs.code="UnsafeFilepathError";var Ir=class{constructor(t){this.buffer=t,this._start=0}eof(){return this._start>=this.buffer.length}tell(){return this._start}seek(t){this._start=t}slice(t){let r=this.buffer.slice(this._start,this._start+t);return this._start+=t,r}toString(t,r){let n=this.buffer.toString(t,this._start,this._start+r);return this._start+=r,n}write(t,r,n){let i=this.buffer.write(t,this._start,r,n);return this._start+=r,i}copy(t,r,n){let i=t.copy(this.buffer,this._start,r,n);return this._start+=i,i}readUInt8(){let t=this.buffer.readUInt8(this._start);return this._start+=1,t}writeUInt8(t){let r=this.buffer.writeUInt8(t,this._start);return this._start+=1,r}readUInt16BE(){let t=this.buffer.readUInt16BE(this._start);return this._start+=2,t}writeUInt16BE(t){let r=this.buffer.writeUInt16BE(t,this._start);return this._start+=2,r}readUInt32BE(){let t=this.buffer.readUInt32BE(this._start);return this._start+=4,t}writeUInt32BE(t){let r=this.buffer.writeUInt32BE(t,this._start);return this._start+=4,r}};function hu(e,t){return-(et)}function t2(e,t){return hu(e.path,t.path)}function r2(e){let t=e>0?e>>12:0;t!==4&&t!==8&&t!==10&&t!==14&&(t=8);let r=e&511;return r&73?r=493:r=420,t!==8&&(r=0),(t<<12)+r}var _n=2**32;function Rw(e,t,r,n){if(e!==void 0&&t!==void 0)return[e,t];r===void 0&&(r=n.valueOf());let i=Math.floor(r/1e3),a=(r-i*1e3)*1e6;return[i,a]}function us(e){let[t,r]=Rw(e.ctimeSeconds,e.ctimeNanoseconds,e.ctimeMs,e.ctime),[n,i]=Rw(e.mtimeSeconds,e.mtimeNanoseconds,e.mtimeMs,e.mtime);return{ctimeSeconds:t%_n,ctimeNanoseconds:r%_n,mtimeSeconds:n%_n,mtimeNanoseconds:i%_n,dev:e.dev%_n,ino:e.ino%_n,mode:r2(e.mode%_n),uid:e.uid%_n,gid:e.gid%_n,size:e.size>-1?e.size%_n:0}}function J6(e){let t="";for(let r of new Uint8Array(e))r<16&&(t+="0"),t+=r.toString(16);return t}var tp=null;async function Gn(e){return tp===null&&(tp=await eM()),tp?n2(e):Q6(e)}function Q6(e){return new Sp.default().update(e).digest("hex")}async function n2(e){let t=await crypto.subtle.digest("SHA-1",e);return J6(t)}async function eM(){try{if(await n2(new Uint8Array([]))==="da39a3ee5e6b4b0d3255bfef95601890afd80709")return!0}catch(e){}return!1}function tM(e){return{assumeValid:!!(e&32768),extended:!!(e&16384),stage:(e&12288)>>12,nameLength:e&4095}}function rM(e){let t=e.flags;return t.extended=!1,t.nameLength=Math.min(Buffer.from(e.path).length,4095),(t.assumeValid?32768:0)+(t.extended?16384:0)+((t.stage&3)<<12)+(t.nameLength&4095)}var fp=class e{constructor(t,r){this._dirty=!1,this._unmergedPaths=r||new Set,this._entries=t||new Map}_addEntry(t){if(t.flags.stage===0)t.stages=[t],this._entries.set(t.path,t),this._unmergedPaths.delete(t.path);else{let r=this._entries.get(t.path);r||(this._entries.set(t.path,t),r=t),r.stages[t.flags.stage]=t,this._unmergedPaths.add(t.path)}}static async from(t){if(Buffer.isBuffer(t))return e.fromBuffer(t);if(t===null)return new e(null);throw new le("invalid type passed to GitIndex.from")}static async fromBuffer(t){if(t.length===0)throw new le("Index file is empty (.git/index)");let r=new e,n=new Ir(t),i=n.toString("utf8",4);if(i!=="DIRC")throw new le(`Invalid dircache magic file number: ${i}`);let a=await Gn(t.slice(0,-20)),s=t.slice(-20).toString("hex");if(s!==a)throw new le(`Invalid checksum in GitIndex buffer: expected ${s} but saw ${a}`);let o=n.readUInt32BE();if(o!==2)throw new le(`Unsupported dircache version: ${o}`);let c=n.readUInt32BE(),l=0;for(;!n.eof()&&lt.stages.length>1?t.stages.filter(r=>r):t)}*[Symbol.iterator](){for(let t of this.entries)yield t}insert({filepath:t,stats:r,oid:n,stage:i=0}){r||(r={ctimeSeconds:0,ctimeNanoseconds:0,mtimeSeconds:0,mtimeNanoseconds:0,dev:0,ino:0,mode:0,uid:0,gid:0,size:0}),r=us(r);let a=Buffer.from(t),s={ctimeSeconds:r.ctimeSeconds,ctimeNanoseconds:r.ctimeNanoseconds,mtimeSeconds:r.mtimeSeconds,mtimeNanoseconds:r.mtimeNanoseconds,dev:r.dev,ino:r.ino,mode:r.mode||33188,uid:r.uid,gid:r.gid,size:r.size,path:t,oid:n,flags:{assumeValid:!1,extended:!1,stage:i,nameLength:a.length<4095?a.length:4095},stages:[]};this._addEntry(s),this._dirty=!0}delete({filepath:t}){if(this._entries.has(t))this._entries.delete(t);else for(let r of this._entries.keys())r.startsWith(t+"/")&&this._entries.delete(r);this._unmergedPaths.has(t)&&this._unmergedPaths.delete(t),this._dirty=!0}clear(){this._entries.clear(),this._dirty=!0}has({filepath:t}){return this._entries.has(t)}render(){return this.entries.map(t=>`${t.mode.toString(8)} ${t.oid} ${t.path}`).join(` -`)}static async _entryToBuffer(t){let r=Buffer.from(t.path),n=Math.ceil((62+r.length+1)/8)*8,i=Buffer.alloc(n),a=new Ir(i),s=us(t);return a.writeUInt32BE(s.ctimeSeconds),a.writeUInt32BE(s.ctimeNanoseconds),a.writeUInt32BE(s.mtimeSeconds),a.writeUInt32BE(s.mtimeNanoseconds),a.writeUInt32BE(s.dev),a.writeUInt32BE(s.ino),a.writeUInt32BE(s.mode),a.writeUInt32BE(s.uid),a.writeUInt32BE(s.gid),a.writeUInt32BE(s.size),a.write(t.oid,20,"hex"),a.writeUInt16BE(rM(t)),a.write(t.path,r.length,"utf8"),i}async toObject(){let t=Buffer.alloc(12),r=new Ir(t);r.write("DIRC",4,"utf8"),r.writeUInt32BE(2),r.writeUInt32BE(this.entriesFlat.length);let n=[];for(let o of this.entries)if(n.push(e._entryToBuffer(o)),o.stages.length>1)for(let c of o.stages)c&&c!==o&&n.push(e._entryToBuffer(c));n=await Promise.all(n);let i=Buffer.concat(n),a=Buffer.concat([t,i]),s=await Gn(a);return Buffer.concat([a,Buffer.from(s,"hex")])}};function ru(e,t,r=!0,n=!0){let i=us(e),a=us(t);return r&&i.mode!==a.mode||i.mtimeSeconds!==a.mtimeSeconds||i.ctimeSeconds!==a.ctimeSeconds||i.uid!==a.uid||i.gid!==a.gid||n&&i.ino!==a.ino||i.size!==a.size}var rp=null,os=Symbol("IndexCache");function nM(){return{map:new Map,stats:new Map}}async function iM(e,t,r){let n=await e.lstat(t),i=await e.read(t),a=await fp.from(i);r.map.set(t,a),r.stats.set(t,n)}async function aM(e,t,r){let n=r.stats.get(t);if(n===void 0)return!0;let i=await e.lstat(t);return n===null||i===null?!1:ru(n,i)}var mt=class{static async acquire({fs:t,gitdir:r,cache:n,allowUnmerged:i=!0},a){n[os]||(n[os]=nM());let s=`${r}/index`;rp===null&&(rp=new Jo.default({maxPending:1/0}));let o,c=[];return await rp.acquire(s,async()=>{await aM(t,s,n[os])&&await iM(t,s,n[os]);let l=n[os].map.get(s);if(c=l.unmergedPaths,c.length&&!i)throw new Qo(c);if(o=await a(l),l._dirty){let u=await l.toObject();await t.write(s,u),n[os].stats.set(s,await t.lstat(s)),l._dirty=!1}}),o}};function nu(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t>-1&&(e=e.slice(t+1)),e}function fs(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t===-1?".":t===0?"/":e.slice(0,t)}function i2(e){let t=new Map,r=function(i){if(!t.has(i)){let a={type:"tree",fullpath:i,basename:nu(i),metadata:{},children:[]};t.set(i,a),a.parent=r(fs(i)),a.parent&&a.parent!==a&&a.parent.children.push(a)}return t.get(i)},n=function(i,a){if(!t.has(i)){let s={type:"blob",fullpath:i,basename:nu(i),metadata:a,parent:r(fs(i)),children:[]};s.parent&&s.parent.children.push(s),t.set(i,s)}return t.get(i)};r(".");for(let i of e)n(i.path,i);return t}function sM(e){switch(e){case 16384:return"tree";case 33188:return"blob";case 33261:return"blob";case 40960:return"blob";case 57344:return"commit"}throw new le(`Unexpected GitTree entry mode: ${e.toString(8)}`)}var dp=class{constructor({fs:t,gitdir:r,cache:n}){this.treePromise=mt.acquire({fs:t,gitdir:r,cache:n},async function(a){return i2(a.entries)});let i=this;this.ConstructEntry=class{constructor(s){this._fullpath=s,this._type=!1,this._mode=!1,this._stat=!1,this._oid=!1}async type(){return i.type(this)}async mode(){return i.mode(this)}async stat(){return i.stat(this)}async content(){return i.content(this)}async oid(){return i.oid(this)}}}async readdir(t){let r=t._fullpath,i=(await this.treePromise).get(r);if(!i||i.type==="blob")return null;if(i.type!=="tree")throw new Error(`ENOTDIR: not a directory, scandir '${r}'`);let a=i.children.map(s=>s.fullpath);return a.sort(hu),a}async type(t){return t._type===!1&&await t.stat(),t._type}async mode(t){return t._mode===!1&&await t.stat(),t._mode}async stat(t){if(t._stat===!1){let n=(await this.treePromise).get(t._fullpath);if(!n)throw new Error(`ENOENT: no such file or directory, lstat '${t._fullpath}'`);let i=n.type==="tree"?{}:us(n.metadata);t._type=n.type==="tree"?"tree":sM(i.mode),t._mode=i.mode,n.type==="tree"?t._stat=void 0:t._stat=i}return t._stat}async content(t){}async oid(t){if(t._oid===!1){let n=(await this.treePromise).get(t._fullpath);t._oid=n.metadata.oid}return t._oid}},pu=Symbol("GitWalkSymbol");function mu(){let e=Object.create(null);return Object.defineProperty(e,pu,{value:function({fs:t,gitdir:r,cache:n}){return new dp({fs:t,gitdir:r,cache:n})}}),Object.freeze(e),e}var Ne=class e extends _e{constructor(t){super(`Could not find ${t}.`),this.code=this.name=e.code,this.data={what:t}}};Ne.code="NotFoundError";var Gt=class e extends _e{constructor(t,r,n,i){super(`Object ${t} ${i?`at ${i}`:""}was anticipated to be a ${n} but it is a ${r}.`),this.code=this.name=e.code,this.data={oid:t,actual:r,expected:n,filepath:i}}};Gt.code="ObjectTypeError";var bi=class e extends _e{constructor(t){super(`Expected a 40-char hex object id but saw "${t}".`),this.code=this.name=e.code,this.data={value:t}}};bi.code="InvalidOidError";var el=class e extends _e{constructor(t){super(`Could not find a fetch refspec for remote "${t}". Make sure the config file has an entry like the following: +var WP=Object.create;var $o=Object.defineProperty;var qP=Object.getOwnPropertyDescriptor;var YP=Object.getOwnPropertyNames;var XP=Object.getPrototypeOf,ZP=Object.prototype.hasOwnProperty;var Uv=e=>{throw TypeError(e)};var KP=(e,t,r)=>t in e?$o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var JP=(e,t)=>()=>(e&&(t=e(e=0)),t);var F=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),QP=(e,t)=>{for(var r in t)$o(e,r,{get:t[r],enumerable:!0})},Gv=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of YP(t))!ZP.call(e,i)&&i!==r&&$o(e,i,{get:()=>t[i],enumerable:!(n=qP(t,i))||n.enumerable});return e};var ze=(e,t,r)=>(r=e!=null?WP(XP(e)):{},Gv(t||!e||!e.__esModule?$o(r,"default",{value:e,enumerable:!0}):r,e)),eR=e=>Gv($o({},"__esModule",{value:!0}),e);var Pr=(e,t,r)=>KP(e,typeof t!="symbol"?t+"":t,r),zv=(e,t,r)=>t.has(e)||Uv("Cannot "+r);var Ht=(e,t,r)=>(zv(e,t,"read from private field"),r?r.call(e):t.get(e)),Tc=(e,t,r)=>t.has(e)?Uv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Cc=(e,t,r,n)=>(zv(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var qv=F(Pc=>{"use strict";g();Pc.byteLength=rR;Pc.toByteArray=iR;Pc.fromByteArray=oR;var hn=[],Rr=[],tR=typeof Uint8Array!="undefined"?Uint8Array:Array,eh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Ki=0,Vv=eh.length;Ki0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function rR(e){var t=Wv(e),r=t[0],n=t[1];return(r+n)*3/4-n}function nR(e,t,r){return(t+r)*3/4-r}function iR(e){var t,r=Wv(e),n=r[0],i=r[1],a=new tR(nR(e,n,i)),s=0,o=i>0?n-4:n,l;for(l=0;l>16&255,a[s++]=t>>8&255,a[s++]=t&255;return i===2&&(t=Rr[e.charCodeAt(l)]<<2|Rr[e.charCodeAt(l+1)]>>4,a[s++]=t&255),i===1&&(t=Rr[e.charCodeAt(l)]<<10|Rr[e.charCodeAt(l+1)]<<4|Rr[e.charCodeAt(l+2)]>>2,a[s++]=t>>8&255,a[s++]=t&255),a}function aR(e){return hn[e>>18&63]+hn[e>>12&63]+hn[e>>6&63]+hn[e&63]}function sR(e,t,r){for(var n,i=[],a=t;ao?o:s+a));return n===1?(t=e[r-1],i.push(hn[t>>2]+hn[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(hn[t>>10]+hn[t>>4&63]+hn[t<<2&63]+"=")),i.join("")}});var Yv=F(th=>{g();th.read=function(e,t,r,n,i){var a,s,o=i*8-n-1,l=(1<>1,u=-7,f=r?i-1:0,d=r?-1:1,h=e[t+f];for(f+=d,a=h&(1<<-u)-1,h>>=-u,u+=o;u>0;a=a*256+e[t+f],f+=d,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=n;u>0;s=s*256+e[t+f],f+=d,u-=8);if(a===0)a=1-c;else{if(a===l)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,n),a=a-c}return(h?-1:1)*s*Math.pow(2,a-n)};th.write=function(e,t,r,n,i,a){var s,o,l,c=a*8-i-1,u=(1<>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,p=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+f>=1?t+=d/l:t+=d*Math.pow(2,1-f),t*l>=2&&(s++,l/=2),s+f>=u?(o=0,s=u):s+f>=1?(o=(t*l-1)*Math.pow(2,i),s=s+f):(o=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=o&255,h+=p,o/=256,i-=8);for(s=s<0;e[r+h]=s&255,h+=p,s/=256,c-=8);e[r+h-p]|=m*128}});var uh=F(Qa=>{"use strict";g();var rh=qv(),Ka=Yv(),Xv=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Qa.Buffer=M;Qa.SlowBuffer=hR;Qa.INSPECT_MAX_BYTES=50;var Rc=2147483647;Qa.kMaxLength=Rc;M.TYPED_ARRAY_SUPPORT=lR();!M.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function lR(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(M.prototype,"parent",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.buffer}});Object.defineProperty(M.prototype,"offset",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.byteOffset}});function Nn(e){if(e>Rc)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,M.prototype),t}function M(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return sh(e)}return Qv(e,t,r)}M.poolSize=8192;function Qv(e,t,r){if(typeof e=="string")return uR(e,t);if(ArrayBuffer.isView(e))return fR(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(pn(e,ArrayBuffer)||e&&pn(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(pn(e,SharedArrayBuffer)||e&&pn(e.buffer,SharedArrayBuffer)))return ih(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return M.from(n,t,r);let i=dR(e);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return M.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}M.from=function(e,t,r){return Qv(e,t,r)};Object.setPrototypeOf(M.prototype,Uint8Array.prototype);Object.setPrototypeOf(M,Uint8Array);function e1(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function cR(e,t,r){return e1(e),e<=0?Nn(e):t!==void 0?typeof r=="string"?Nn(e).fill(t,r):Nn(e).fill(t):Nn(e)}M.alloc=function(e,t,r){return cR(e,t,r)};function sh(e){return e1(e),Nn(e<0?0:oh(e)|0)}M.allocUnsafe=function(e){return sh(e)};M.allocUnsafeSlow=function(e){return sh(e)};function uR(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!M.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=t1(e,t)|0,n=Nn(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function nh(e){let t=e.length<0?0:oh(e.length)|0,r=Nn(t);for(let n=0;n=Rc)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Rc.toString(16)+" bytes");return e|0}function hR(e){return+e!=e&&(e=0),M.alloc(+e)}M.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==M.prototype};M.compare=function(t,r){if(pn(t,Uint8Array)&&(t=M.from(t,t.offset,t.byteLength)),pn(r,Uint8Array)&&(r=M.from(r,r.offset,r.byteLength)),!M.isBuffer(t)||!M.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,i=r.length;for(let a=0,s=Math.min(n,i);ai.length?(M.isBuffer(s)||(s=M.from(s)),s.copy(i,a)):Uint8Array.prototype.set.call(i,s,a);else if(M.isBuffer(s))s.copy(i,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=s.length}return i};function t1(e,t){if(M.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||pn(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return ah(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return u1(e).length;default:if(i)return n?-1:ah(e).length;t=(""+t).toLowerCase(),i=!0}}M.byteLength=t1;function pR(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return ER(this,t,r);case"utf8":case"utf-8":return n1(this,t,r);case"ascii":return xR(this,t,r);case"latin1":case"binary":return SR(this,t,r);case"base64":return bR(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return AR(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}M.prototype._isBuffer=!0;function Ji(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}M.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(t+=" ... "),""};Xv&&(M.prototype[Xv]=M.prototype.inspect);M.prototype.compare=function(t,r,n,i,a){if(pn(t,Uint8Array)&&(t=M.from(t,t.offset,t.byteLength)),!M.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),r<0||n>t.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&r>=n)return 0;if(i>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,a>>>=0,this===t)return 0;let s=a-i,o=n-r,l=Math.min(s,o),c=this.slice(i,a),u=t.slice(r,n);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,ch(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=M.from(t,n)),M.isBuffer(t))return t.length===0?-1:Zv(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Zv(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Zv(e,t,r,n,i){let a=1,s=e.length,o=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,s/=2,o/=2,r/=2}function l(u,f){return a===1?u[f]:u.readUInt16BE(f*a)}let c;if(i){let u=-1;for(c=r;cs&&(r=s-o),c=r;c>=0;c--){let u=!0;for(let f=0;fi&&(n=i)):n=i;let a=t.length;n>a/2&&(n=a/2);let s;for(s=0;s>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((n===void 0||n>a)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let s=!1;for(;;)switch(i){case"hex":return mR(this,t,r,n);case"utf8":case"utf-8":return gR(this,t,r,n);case"ascii":case"latin1":case"binary":return vR(this,t,r,n);case"base64":return yR(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wR(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};M.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function bR(e,t,r){return t===0&&r===e.length?rh.fromByteArray(e):rh.fromByteArray(e.slice(t,r))}function n1(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:a>223?3:a>191?2:1;if(i+o<=r){let l,c,u,f;switch(o){case 1:a<128&&(s=a);break;case 2:l=e[i+1],(l&192)===128&&(f=(a&31)<<6|l&63,f>127&&(s=f));break;case 3:l=e[i+1],c=e[i+2],(l&192)===128&&(c&192)===128&&(f=(a&15)<<12|(l&63)<<6|c&63,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:l=e[i+1],c=e[i+2],u=e[i+3],(l&192)===128&&(c&192)===128&&(u&192)===128&&(f=(a&15)<<18|(l&63)<<12|(c&63)<<6|u&63,f>65535&&f<1114112&&(s=f))}}s===null?(s=65533,o=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=o}return _R(n)}var Kv=4096;function _R(e){let t=e.length;if(t<=Kv)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let a=t;an&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}M.prototype.readUintLE=M.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||_t(t,r,this.length);let i=this[t],a=1,s=0;for(;++s>>0,r=r>>>0,n||_t(t,r,this.length);let i=this[t+--r],a=1;for(;r>0&&(a*=256);)i+=this[t+--r]*a;return i};M.prototype.readUint8=M.prototype.readUInt8=function(t,r){return t=t>>>0,r||_t(t,1,this.length),this[t]};M.prototype.readUint16LE=M.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||_t(t,2,this.length),this[t]|this[t+1]<<8};M.prototype.readUint16BE=M.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||_t(t,2,this.length),this[t]<<8|this[t+1]};M.prototype.readUint32LE=M.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||_t(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};M.prototype.readUint32BE=M.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||_t(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};M.prototype.readBigUInt64LE=fi(function(t){t=t>>>0,Ja(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Lo(t,this.length-8);let i=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(i)+(BigInt(a)<>>0,Ja(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Lo(t,this.length-8);let i=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(i)<>>0,r=r>>>0,n||_t(t,r,this.length);let i=this[t],a=1,s=0;for(;++s=a&&(i-=Math.pow(2,8*r)),i};M.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||_t(t,r,this.length);let i=r,a=1,s=this[t+--i];for(;i>0&&(a*=256);)s+=this[t+--i]*a;return a*=128,s>=a&&(s-=Math.pow(2,8*r)),s};M.prototype.readInt8=function(t,r){return t=t>>>0,r||_t(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};M.prototype.readInt16LE=function(t,r){t=t>>>0,r||_t(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};M.prototype.readInt16BE=function(t,r){t=t>>>0,r||_t(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};M.prototype.readInt32LE=function(t,r){return t=t>>>0,r||_t(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};M.prototype.readInt32BE=function(t,r){return t=t>>>0,r||_t(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};M.prototype.readBigInt64LE=fi(function(t){t=t>>>0,Ja(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Lo(t,this.length-8);let i=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(i)<>>0,Ja(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Lo(t,this.length-8);let i=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(i)<>>0,r||_t(t,4,this.length),Ka.read(this,t,!0,23,4)};M.prototype.readFloatBE=function(t,r){return t=t>>>0,r||_t(t,4,this.length),Ka.read(this,t,!1,23,4)};M.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||_t(t,8,this.length),Ka.read(this,t,!0,52,8)};M.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||_t(t,8,this.length),Ka.read(this,t,!1,52,8)};function Jt(e,t,r,n,i,a){if(!M.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}M.prototype.writeUintLE=M.prototype.writeUIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,n=n>>>0,!i){let o=Math.pow(2,8*n)-1;Jt(this,t,r,n,o,0)}let a=1,s=0;for(this[r]=t&255;++s>>0,n=n>>>0,!i){let o=Math.pow(2,8*n)-1;Jt(this,t,r,n,o,0)}let a=n-1,s=1;for(this[r+a]=t&255;--a>=0&&(s*=256);)this[r+a]=t/s&255;return r+n};M.prototype.writeUint8=M.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,1,255,0),this[r]=t&255,r+1};M.prototype.writeUint16LE=M.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};M.prototype.writeUint16BE=M.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};M.prototype.writeUint32LE=M.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};M.prototype.writeUint32BE=M.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function i1(e,t,r,n,i){c1(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function a1(e,t,r,n,i){c1(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}M.prototype.writeBigUInt64LE=fi(function(t,r=0){return i1(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});M.prototype.writeBigUInt64BE=fi(function(t,r=0){return a1(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});M.prototype.writeIntLE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Jt(this,t,r,n,l-1,-l)}let a=0,s=1,o=0;for(this[r]=t&255;++a>0)-o&255;return r+n};M.prototype.writeIntBE=function(t,r,n,i){if(t=+t,r=r>>>0,!i){let l=Math.pow(2,8*n-1);Jt(this,t,r,n,l-1,-l)}let a=n-1,s=1,o=0;for(this[r+a]=t&255;--a>=0&&(s*=256);)t<0&&o===0&&this[r+a+1]!==0&&(o=1),this[r+a]=(t/s>>0)-o&255;return r+n};M.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};M.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};M.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};M.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};M.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Jt(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};M.prototype.writeBigInt64LE=fi(function(t,r=0){return i1(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});M.prototype.writeBigInt64BE=fi(function(t,r=0){return a1(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function s1(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function o1(e,t,r,n,i){return t=+t,r=r>>>0,i||s1(e,t,r,4,34028234663852886e22,-34028234663852886e22),Ka.write(e,t,r,n,23,4),r+4}M.prototype.writeFloatLE=function(t,r,n){return o1(this,t,r,!0,n)};M.prototype.writeFloatBE=function(t,r,n){return o1(this,t,r,!1,n)};function l1(e,t,r,n,i){return t=+t,r=r>>>0,i||s1(e,t,r,8,17976931348623157e292,-17976931348623157e292),Ka.write(e,t,r,n,52,8),r+8}M.prototype.writeDoubleLE=function(t,r,n){return l1(this,t,r,!0,n)};M.prototype.writeDoubleBE=function(t,r,n){return l1(this,t,r,!1,n)};M.prototype.copy=function(t,r,n,i){if(!M.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let a;if(typeof t=="number")for(a=r;a2**32?i=Jv(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Jv(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Jv(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function kR(e,t,r){Ja(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Lo(t,e.length-(r+1))}function c1(e,t,r,n,i,a){if(e>r||e3?t===0||t===BigInt(0)?o=`>= 0${s} and < 2${s} ** ${(a+1)*8}${s}`:o=`>= -(2${s} ** ${(a+1)*8-1}${s}) and < 2 ** ${(a+1)*8-1}${s}`:o=`>= ${t}${s} and <= ${r}${s}`,new Za.ERR_OUT_OF_RANGE("value",o,e)}kR(n,i,a)}function Ja(e,t){if(typeof e!="number")throw new Za.ERR_INVALID_ARG_TYPE(t,"number",e)}function Lo(e,t,r){throw Math.floor(e)!==e?(Ja(e,r),new Za.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Za.ERR_BUFFER_OUT_OF_BOUNDS:new Za.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var TR=/[^+/0-9A-Za-z-_]/g;function CR(e){if(e=e.split("=")[0],e=e.trim().replace(TR,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function ah(e,t){t=t||1/0;let r,n=e.length,i=null,a=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function PR(e){let t=[];for(let r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function u1(e){return rh.toByteArray(CR(e))}function Mc(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function pn(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function ch(e){return e!==e}var MR=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function fi(e){return typeof BigInt=="undefined"?OR:e}function OR(){throw new Error("BigInt not supported")}});var f1,fh,Buffer,g=JP(()=>{f1=require("obsidian");f1.Platform.isMobileApp?fh=uh().Buffer:fh=global.Buffer;Buffer=fh});var h1=F((JH,d1)=>{"use strict";g();var dr=function(e){if(e=e||{},this.Promise=e.Promise||Promise,this.queues=Object.create(null),this.domainReentrant=e.domainReentrant||!1,this.domainReentrant){if(typeof process=="undefined"||typeof process.domain=="undefined")throw new Error("Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, use a NodeJS version that still implements Domain, or install a browser polyfill.");this.domains=Object.create(null)}this.timeout=e.timeout||dr.DEFAULT_TIMEOUT,this.maxOccupationTime=e.maxOccupationTime||dr.DEFAULT_MAX_OCCUPATION_TIME,this.maxExecutionTime=e.maxExecutionTime||dr.DEFAULT_MAX_EXECUTION_TIME,e.maxPending===1/0||Number.isInteger(e.maxPending)&&e.maxPending>=0?this.maxPending=e.maxPending:this.maxPending=dr.DEFAULT_MAX_PENDING};dr.DEFAULT_TIMEOUT=0;dr.DEFAULT_MAX_OCCUPATION_TIME=0;dr.DEFAULT_MAX_EXECUTION_TIME=0;dr.DEFAULT_MAX_PENDING=1e3;dr.prototype.acquire=function(e,t,r,n){if(Array.isArray(e))return this._acquireBatch(e,t,r,n);if(typeof t!="function")throw new Error("You must pass a function to execute");var i=null,a=null,s=null;typeof r!="function"&&(n=r,r=null,s=new this.Promise(function(b,x){i=b,a=x})),n=n||{};var o=!1,l=null,c=null,u=null,f=this,d=function(b,x,E){c&&(clearTimeout(c),c=null),u&&(clearTimeout(u),u=null),b&&(f.queues[e]&&f.queues[e].length===0&&delete f.queues[e],f.domainReentrant&&delete f.domains[e]),o||(s?x?a(x):i(E):typeof r=="function"&&r(x,E),o=!0),b&&f.queues[e]&&f.queues[e].length>0&&f.queues[e].shift()()},h=function(b){if(o)return d(b);l&&(clearTimeout(l),l=null),f.domainReentrant&&b&&(f.domains[e]=process.domain);var x=n.maxExecutionTime||f.maxExecutionTime;if(x&&(u=setTimeout(function(){f.queues[e]&&d(b,new Error("Maximum execution time is exceeded "+e))},x)),t.length===1){var E=!1;try{t(function(_,k){E||(E=!0,d(b,_,k))})}catch(_){E||(E=!0,d(b,_))}}else f._promiseTry(function(){return t()}).then(function(_){d(b,void 0,_)},function(_){d(b,_)})};f.domainReentrant&&process.domain&&(h=process.domain.bind(h));var p=n.maxPending||f.maxPending;if(!f.queues[e])f.queues[e]=[],h(!0);else if(f.domainReentrant&&process.domain&&process.domain===f.domains[e])h(!1);else if(f.queues[e].length>=p)d(!1,new Error("Too many pending tasks in queue "+e));else{var m=function(){h(!0)};n.skipQueue?f.queues[e].unshift(m):f.queues[e].push(m);var v=n.timeout||f.timeout;v&&(l=setTimeout(function(){l=null,d(!1,new Error("async-lock timed out in queue "+e))},v))}var y=n.maxOccupationTime||f.maxOccupationTime;if(y&&(c=setTimeout(function(){f.queues[e]&&d(!1,new Error("Maximum occupation time is exceeded in queue "+e))},y)),s)return s};dr.prototype._acquireBatch=function(e,t,r,n){typeof r!="function"&&(n=r,r=null);var i=this,a=function(o,l){return function(c){i.acquire(o,l,c,n)}},s=e.reduceRight(function(o,l){return a(l,o)},t);if(typeof r=="function")s(r);else return new this.Promise(function(o,l){s.length===1?s(function(c,u){c?l(c):o(u)}):o(s())})};dr.prototype.isBusy=function(e){return e?!!this.queues[e]:Object.keys(this.queues).length>0};dr.prototype._promiseTry=function(e){try{return this.Promise.resolve(e())}catch(t){return this.Promise.reject(t)}};d1.exports=dr});var m1=F((eU,p1)=>{"use strict";g();p1.exports=h1()});var g1=F((rU,dh)=>{g();typeof Object.create=="function"?dh.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:dh.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var ph=F((hh,y1)=>{g();var Oc=uh(),mn=Oc.Buffer;function v1(e,t){for(var r in e)t[r]=e[r]}mn.from&&mn.alloc&&mn.allocUnsafe&&mn.allocUnsafeSlow?y1.exports=Oc:(v1(Oc,hh),hh.Buffer=Qi);function Qi(e,t,r){return mn(e,t,r)}Qi.prototype=Object.create(mn.prototype);v1(mn,Qi);Qi.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return mn(e,t,r)};Qi.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=mn(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};Qi.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return mn(e)};Qi.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Oc.SlowBuffer(e)}});var _1=F((aU,b1)=>{g();var w1=ph().Buffer;function Ic(e,t){this._block=w1.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}Ic.prototype.update=function(e,t){typeof e=="string"&&(t=t||"utf8",e=w1.from(e,t));for(var r=this._block,n=this._blockSize,i=e.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(r&4294967295)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a};Ic.prototype._update=function(){throw new Error("_update must be implemented by subclass")};b1.exports=Ic});var E1=F((oU,S1)=>{g();var IR=g1(),x1=_1(),FR=ph().Buffer,$R=[1518500249,1859775393,-1894007588,-899497514],LR=new Array(80);function Do(){this.init(),this._w=LR,x1.call(this,64,56)}IR(Do,x1);Do.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function DR(e){return e<<1|e>>>31}function NR(e){return e<<5|e>>>27}function BR(e){return e<<30|e>>>2}function jR(e,t,r,n){return e===0?t&r|~t&n:e===2?t&r|t&n|r&n:t^r^n}Do.prototype._update=function(e){for(var t=this._w,r=this._a|0,n=this._b|0,i=this._c|0,a=this._d|0,s=this._e|0,o=0;o<16;++o)t[o]=e.readInt32BE(o*4);for(;o<80;++o)t[o]=DR(t[o-3]^t[o-8]^t[o-14]^t[o-16]);for(var l=0;l<80;++l){var c=~~(l/20),u=NR(r)+jR(c,n,i,a)+s+t[l]+$R[c]|0;s=a,a=i,i=BR(n),n=r,r=u}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0};Do.prototype._hash=function(){var e=FR.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};S1.exports=Do});var k1=F(mh=>{g();var A1;(function(e){typeof DO_NOT_EXPORT_CRC=="undefined"?typeof mh=="object"?e(mh):typeof define=="function"&&define.amd?define(function(){var t={};return e(t),t}):e(A1={}):e(A1={})})(function(e){e.version="1.2.2";function t(){for(var w=0,A=new Array(256),S=0;S!=256;++S)w=S,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,w=w&1?-306674912^w>>>1:w>>>1,A[S]=w;return typeof Int32Array!="undefined"?new Int32Array(A):A}var r=t();function n(w){var A=0,S=0,T=0,P=typeof Int32Array!="undefined"?new Int32Array(4096):new Array(4096);for(T=0;T!=256;++T)P[T]=w[T];for(T=0;T!=256;++T)for(S=w[T],A=256+T;A<4096;A+=256)S=P[A]=S>>>8^w[S&255];var I=[];for(T=1;T!=16;++T)I[T-1]=typeof Int32Array!="undefined"?P.subarray(T*256,T*256+256):P.slice(T*256,T*256+256);return I}var i=n(r),a=i[0],s=i[1],o=i[2],l=i[3],c=i[4],u=i[5],f=i[6],d=i[7],h=i[8],p=i[9],m=i[10],v=i[11],y=i[12],b=i[13],x=i[14];function E(w,A){for(var S=A^-1,T=0,P=w.length;T>>8^r[(S^w.charCodeAt(T++))&255];return~S}function _(w,A){for(var S=A^-1,T=w.length-15,P=0;P>8&255]^y[w[P++]^S>>16&255]^v[w[P++]^S>>>24]^m[w[P++]]^p[w[P++]]^h[w[P++]]^d[w[P++]]^f[w[P++]]^u[w[P++]]^c[w[P++]]^l[w[P++]]^o[w[P++]]^s[w[P++]]^a[w[P++]]^r[w[P++]];for(T+=15;P>>8^r[(S^w[P++])&255];return~S}function k(w,A){for(var S=A^-1,T=0,P=w.length,I=0,N=0;T>>8^r[(S^I)&255]:I<2048?(S=S>>>8^r[(S^(192|I>>6&31))&255],S=S>>>8^r[(S^(128|I&63))&255]):I>=55296&&I<57344?(I=(I&1023)+64,N=w.charCodeAt(T++)&1023,S=S>>>8^r[(S^(240|I>>8&7))&255],S=S>>>8^r[(S^(128|I>>2&63))&255],S=S>>>8^r[(S^(128|N>>6&15|(I&3)<<4))&255],S=S>>>8^r[(S^(128|N&63))&255]):(S=S>>>8^r[(S^(224|I>>12&15))&255],S=S>>>8^r[(S^(128|I>>6&63))&255],S=S>>>8^r[(S^(128|I&63))&255]);return~S}e.table=r,e.bstr=E,e.buf=_,e.str=k})});var Bn=F(Ut=>{"use strict";g();var HR=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function UR(e,t){return Object.prototype.hasOwnProperty.call(e,t)}Ut.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var n in r)UR(r,n)&&(e[n]=r[n])}}return e};Ut.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var GR={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+n),i);return}for(var a=0;a{"use strict";g();var VR=Bn(),WR=4,T1=0,C1=1,qR=2;function ts(e){for(var t=e.length;--t>=0;)e[t]=0}var YR=0,F1=1,XR=2,ZR=3,KR=258,xh=29,Go=256,Bo=Go+1+xh,es=30,Sh=19,$1=2*Bo+1,ea=15,gh=16,JR=7,Eh=256,L1=16,D1=17,N1=18,bh=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Fc=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],QR=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B1=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],e5=512,jn=new Array((Bo+2)*2);ts(jn);var No=new Array(es*2);ts(No);var jo=new Array(e5);ts(jo);var Ho=new Array(KR-ZR+1);ts(Ho);var Ah=new Array(xh);ts(Ah);var $c=new Array(es);ts($c);function vh(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}var j1,H1,U1;function yh(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function G1(e){return e<256?jo[e]:jo[256+(e>>>7)]}function Uo(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Qt(e,t,r){e.bi_valid>gh-r?(e.bi_buf|=t<>gh-e.bi_valid,e.bi_valid+=r-gh):(e.bi_buf|=t<>>=1,r<<=1;while(--t>0);return r>>>1}function t5(e){e.bi_valid===16?(Uo(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function r5(e,t){var r=t.dyn_tree,n=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,l=t.stat_desc.max_length,c,u,f,d,h,p,m=0;for(d=0;d<=ea;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;c<$1;c++)u=e.heap[c],d=r[r[u*2+1]*2+1]+1,d>l&&(d=l,m++),r[u*2+1]=d,!(u>n)&&(e.bl_count[d]++,h=0,u>=o&&(h=s[u-o]),p=r[u*2],e.opt_len+=p*(d+h),a&&(e.static_len+=p*(i[u*2+1]+h)));if(m!==0){do{for(d=l-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(d=l;d!==0;d--)for(u=e.bl_count[d];u!==0;)f=e.heap[--c],!(f>n)&&(r[f*2+1]!==d&&(e.opt_len+=(d-r[f*2+1])*r[f*2],r[f*2+1]=d),u--)}}function V1(e,t,r){var n=new Array(ea+1),i=0,a,s;for(a=1;a<=ea;a++)n[a]=i=i+r[a-1]<<1;for(s=0;s<=t;s++){var o=e[s*2+1];o!==0&&(e[s*2]=z1(n[o]++,o))}}function n5(){var e,t,r,n,i,a=new Array(ea+1);for(r=0,n=0;n>=7;n8?Uo(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function i5(e,t,r,n){q1(e),n&&(Uo(e,r),Uo(e,~r)),VR.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function P1(e,t,r,n){var i=t*2,a=r*2;return e[i]>1;s>=1;s--)wh(e,r,s);c=a;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],wh(e,r,1),o=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=o,r[c*2]=r[s*2]+r[o*2],e.depth[c]=(e.depth[s]>=e.depth[o]?e.depth[s]:e.depth[o])+1,r[s*2+1]=r[o*2+1]=c,e.heap[1]=c++,wh(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],r5(e,t),V1(r,l,e.bl_count)}function M1(e,t,r){var n,i=-1,a,s=t[0*2+1],o=0,l=7,c=4;for(s===0&&(l=138,c=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)a=s,s=t[(n+1)*2+1],!(++o=3&&e.bl_tree[B1[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function s5(e,t,r,n){var i;for(Qt(e,t-257,5),Qt(e,r-1,5),Qt(e,n-4,4),i=0;i>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return T1;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return C1;for(r=32;r0?(e.strm.data_type===qR&&(e.strm.data_type=o5(e)),_h(e,e.l_desc),_h(e,e.d_desc),s=a5(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=r+5,r+4<=i&&t!==-1?Y1(e,t,r,n):e.strategy===WR||a===i?(Qt(e,(F1<<1)+(n?1:0),3),R1(e,jn,No)):(Qt(e,(XR<<1)+(n?1:0),3),s5(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),R1(e,e.dyn_ltree,e.dyn_dtree)),W1(e),n&&q1(e)}function f5(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(Ho[r]+Go+1)*2]++,e.dyn_dtree[G1(t)*2]++),e.last_lit===e.lit_bufsize-1}rs._tr_init=l5;rs._tr_stored_block=Y1;rs._tr_flush_block=u5;rs._tr_tally=f5;rs._tr_align=c5});var kh=F((mU,Z1)=>{"use strict";g();function d5(e,t,r,n){for(var i=e&65535|0,a=e>>>16&65535|0,s=0;r!==0;){s=r>2e3?2e3:r,r-=s;do i=i+t[n++]|0,a=a+i|0;while(--s);i%=65521,a%=65521}return i|a<<16|0}Z1.exports=d5});var Th=F((vU,K1)=>{"use strict";g();function h5(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e}return t}var p5=h5();function m5(e,t,r,n){var i=p5,a=n+r;e^=-1;for(var s=n;s>>8^i[(e^t[s])&255];return e^-1}K1.exports=m5});var Lc=F((wU,J1)=>{"use strict";g();J1.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var oy=F(wn=>{"use strict";g();var Gt=Bn(),Mr=X1(),ry=kh(),di=Th(),g5=Lc(),ia=0,v5=1,y5=3,vi=4,Q1=5,yn=0,ey=1,Or=-2,w5=-3,Ch=-5,b5=-1,_5=1,Dc=2,x5=3,S5=4,E5=0,A5=2,Hc=8,k5=9,T5=15,C5=8,P5=29,R5=256,Rh=R5+1+P5,M5=30,O5=19,I5=2*Rh+1,F5=15,be=3,mi=258,Kr=mi+be+1,$5=32,Uc=42,Mh=69,Nc=73,Bc=91,jc=103,ta=113,Vo=666,vt=1,Wo=2,ra=3,as=4,L5=3;function gi(e,t){return e.msg=g5[t],t}function ty(e){return(e<<1)-(e>4?9:0)}function pi(e){for(var t=e.length;--t>=0;)e[t]=0}function hi(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(Gt.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,t.pending===0&&(t.pending_out=0))}function At(e,t){Mr._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,hi(e.strm)}function ke(e,t){e.pending_buf[e.pending++]=t}function zo(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function D5(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),i===0?0:(e.avail_in-=i,Gt.arraySet(t,e.input,e.next_in,i,r),e.state.wrap===1?e.adler=ry(e.adler,t,i,r):e.state.wrap===2&&(e.adler=di(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function ny(e,t){var r=e.max_chain_length,n=e.strstart,i,a,s=e.prev_length,o=e.nice_match,l=e.strstart>e.w_size-Kr?e.strstart-(e.w_size-Kr):0,c=e.window,u=e.w_mask,f=e.prev,d=e.strstart+mi,h=c[n+s-1],p=c[n+s];e.prev_length>=e.good_match&&(r>>=2),o>e.lookahead&&(o=e.lookahead);do if(i=t,!(c[i+s]!==p||c[i+s-1]!==h||c[i]!==c[n]||c[++i]!==c[n+1])){n+=2,i++;do;while(c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&c[++n]===c[++i]&&ns){if(e.match_start=t,s=a,a>=o)break;h=c[n+s-1],p=c[n+s]}}while((t=f[t&u])>l&&--r!==0);return s<=e.lookahead?s:e.lookahead}function na(e){var t=e.w_size,r,n,i,a,s;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Kr)){Gt.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,n=e.hash_size,r=n;do i=e.head[--r],e.head[r]=i>=t?i-t:0;while(--n);n=t,r=n;do i=e.prev[--r],e.prev[r]=i>=t?i-t:0;while(--n);a+=t}if(e.strm.avail_in===0)break;if(n=D5(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=be)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(na(e),e.lookahead===0&&t===ia)return vt;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,At(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Kr&&(At(e,!1),e.strm.avail_out===0))return vt}return e.insert=0,t===vi?(At(e,!0),e.strm.avail_out===0?ra:as):(e.strstart>e.block_start&&(At(e,!1),e.strm.avail_out===0),vt)}function Ph(e,t){for(var r,n;;){if(e.lookahead=be&&(e.ins_h=(e.ins_h<=be)if(n=Mr._tr_tally(e,e.strstart-e.match_start,e.match_length-be),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=be){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=be&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=be-1)),e.prev_length>=be&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-be,n=Mr._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-be),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<=be&&e.strstart>0&&(i=e.strstart-1,n=s[i],n===s[++i]&&n===s[++i]&&n===s[++i])){a=e.strstart+mi;do;while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=be?(r=Mr._tr_tally(e,1,e.match_length-be),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=Mr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(At(e,!1),e.strm.avail_out===0))return vt}return e.insert=0,t===vi?(At(e,!0),e.strm.avail_out===0?ra:as):e.last_lit&&(At(e,!1),e.strm.avail_out===0)?vt:Wo}function j5(e,t){for(var r;;){if(e.lookahead===0&&(na(e),e.lookahead===0)){if(t===ia)return vt;break}if(e.match_length=0,r=Mr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(At(e,!1),e.strm.avail_out===0))return vt}return e.insert=0,t===vi?(At(e,!0),e.strm.avail_out===0?ra:as):e.last_lit&&(At(e,!1),e.strm.avail_out===0)?vt:Wo}function vn(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}var is;is=[new vn(0,0,0,0,N5),new vn(4,4,8,4,Ph),new vn(4,5,16,8,Ph),new vn(4,6,32,32,Ph),new vn(4,4,16,16,ns),new vn(8,16,32,32,ns),new vn(8,16,128,128,ns),new vn(8,32,128,256,ns),new vn(32,128,258,1024,ns),new vn(32,258,258,4096,ns)];function H5(e){e.window_size=2*e.w_size,pi(e.head),e.max_lazy_match=is[e.level].max_lazy,e.good_match=is[e.level].good_length,e.nice_match=is[e.level].nice_length,e.max_chain_length=is[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=be-1,e.match_available=0,e.ins_h=0}function U5(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Hc,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Gt.Buf16(I5*2),this.dyn_dtree=new Gt.Buf16((2*M5+1)*2),this.bl_tree=new Gt.Buf16((2*O5+1)*2),pi(this.dyn_ltree),pi(this.dyn_dtree),pi(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Gt.Buf16(F5+1),this.heap=new Gt.Buf16(2*Rh+1),pi(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Gt.Buf16(2*Rh+1),pi(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function iy(e){var t;return!e||!e.state?gi(e,Or):(e.total_in=e.total_out=0,e.data_type=A5,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Uc:ta,e.adler=t.wrap===2?0:1,t.last_flush=ia,Mr._tr_init(t),yn)}function ay(e){var t=iy(e);return t===yn&&H5(e.state),t}function G5(e,t){return!e||!e.state||e.state.wrap!==2?Or:(e.state.gzhead=t,yn)}function sy(e,t,r,n,i,a){if(!e)return Or;var s=1;if(t===b5&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>k5||r!==Hc||n<8||n>15||t<0||t>9||a<0||a>S5)return gi(e,Or);n===8&&(n=9);var o=new U5;return e.state=o,o.strm=e,o.wrap=s,o.gzhead=null,o.w_bits=n,o.w_size=1<Q1||t<0)return e?gi(e,Or):Or;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===Vo&&t!==vi)return gi(e,e.avail_out===0?Ch:Or);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===Uc)if(n.wrap===2)e.adler=0,ke(n,31),ke(n,139),ke(n,8),n.gzhead?(ke(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),ke(n,n.gzhead.time&255),ke(n,n.gzhead.time>>8&255),ke(n,n.gzhead.time>>16&255),ke(n,n.gzhead.time>>24&255),ke(n,n.level===9?2:n.strategy>=Dc||n.level<2?4:0),ke(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(ke(n,n.gzhead.extra.length&255),ke(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=di(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Mh):(ke(n,0),ke(n,0),ke(n,0),ke(n,0),ke(n,0),ke(n,n.level===9?2:n.strategy>=Dc||n.level<2?4:0),ke(n,L5),n.status=ta);else{var s=Hc+(n.w_bits-8<<4)<<8,o=-1;n.strategy>=Dc||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,s|=o<<6,n.strstart!==0&&(s|=$5),s+=31-s%31,n.status=ta,zo(n,s),n.strstart!==0&&(zo(n,e.adler>>>16),zo(n,e.adler&65535)),e.adler=1}if(n.status===Mh)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=di(e.adler,n.pending_buf,n.pending-i,i)),hi(e),i=n.pending,n.pending===n.pending_buf_size));)ke(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=di(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=Nc)}else n.status=Nc;if(n.status===Nc)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=di(e.adler,n.pending_buf,n.pending-i,i)),hi(e),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindexi&&(e.adler=di(e.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.gzindex=0,n.status=Bc)}else n.status=Bc;if(n.status===Bc)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=di(e.adler,n.pending_buf,n.pending-i,i)),hi(e),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindexi&&(e.adler=di(e.adler,n.pending_buf,n.pending-i,i)),a===0&&(n.status=jc)}else n.status=jc;if(n.status===jc&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&hi(e),n.pending+2<=n.pending_buf_size&&(ke(n,e.adler&255),ke(n,e.adler>>8&255),e.adler=0,n.status=ta)):n.status=ta),n.pending!==0){if(hi(e),e.avail_out===0)return n.last_flush=-1,yn}else if(e.avail_in===0&&ty(t)<=ty(r)&&t!==vi)return gi(e,Ch);if(n.status===Vo&&e.avail_in!==0)return gi(e,Ch);if(e.avail_in!==0||n.lookahead!==0||t!==ia&&n.status!==Vo){var l=n.strategy===Dc?j5(n,t):n.strategy===x5?B5(n,t):is[n.level].func(n,t);if((l===ra||l===as)&&(n.status=Vo),l===vt||l===ra)return e.avail_out===0&&(n.last_flush=-1),yn;if(l===Wo&&(t===v5?Mr._tr_align(n):t!==Q1&&(Mr._tr_stored_block(n,0,0,!1),t===y5&&(pi(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),hi(e),e.avail_out===0))return n.last_flush=-1,yn}return t!==vi?yn:n.wrap<=0?ey:(n.wrap===2?(ke(n,e.adler&255),ke(n,e.adler>>8&255),ke(n,e.adler>>16&255),ke(n,e.adler>>24&255),ke(n,e.total_in&255),ke(n,e.total_in>>8&255),ke(n,e.total_in>>16&255),ke(n,e.total_in>>24&255)):(zo(n,e.adler>>>16),zo(n,e.adler&65535)),hi(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?yn:ey)}function W5(e){var t;return!e||!e.state?Or:(t=e.state.status,t!==Uc&&t!==Mh&&t!==Nc&&t!==Bc&&t!==jc&&t!==ta&&t!==Vo?gi(e,Or):(e.state=null,t===ta?gi(e,w5):yn))}function q5(e,t){var r=t.length,n,i,a,s,o,l,c,u;if(!e||!e.state||(n=e.state,s=n.wrap,s===2||s===1&&n.status!==Uc||n.lookahead))return Or;for(s===1&&(e.adler=ry(e.adler,t,r,0)),n.wrap=0,r>=n.w_size&&(s===0&&(pi(n.head),n.strstart=0,n.block_start=0,n.insert=0),u=new Gt.Buf8(n.w_size),Gt.arraySet(u,t,r-n.w_size,n.w_size,0),t=u,r=n.w_size),o=e.avail_in,l=e.next_in,c=e.input,e.avail_in=r,e.next_in=0,e.input=t,na(n);n.lookahead>=be;){i=n.strstart,a=n.lookahead-(be-1);do n.ins_h=(n.ins_h<{"use strict";g();var Gc=Bn(),ly=!0,cy=!0;try{String.fromCharCode.apply(null,[0])}catch(e){ly=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){cy=!1}var qo=new Gc.Buf8(256);for(Hn=0;Hn<256;Hn++)qo[Hn]=Hn>=252?6:Hn>=248?5:Hn>=240?4:Hn>=224?3:Hn>=192?2:1;var Hn;qo[254]=qo[254]=1;ss.string2buf=function(e){var t,r,n,i,a,s=e.length,o=0;for(i=0;i>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t};function uy(e,t){if(t<65534&&(e.subarray&&cy||!e.subarray&&ly))return String.fromCharCode.apply(null,Gc.shrinkBuf(e,t));for(var r="",n=0;n4){o[n++]=65533,r+=a-1;continue}for(i&=a===2?31:a===3?15:7;a>1&&r1){o[n++]=65533;continue}i<65536?o[n++]=i:(i-=65536,o[n++]=55296|i>>10&1023,o[n++]=56320|i&1023)}return uy(o,n)};ss.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+qo[e[r]]>t?r:t}});var Ih=F((AU,fy)=>{"use strict";g();function Y5(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}fy.exports=Y5});var my=F(Zo=>{"use strict";g();var Yo=oy(),Xo=Bn(),$h=Oh(),Lh=Lc(),X5=Ih(),py=Object.prototype.toString,Z5=0,Fh=4,os=0,dy=1,hy=2,K5=-1,J5=0,Q5=8;function aa(e){if(!(this instanceof aa))return new aa(e);this.options=Xo.assign({level:K5,method:Q5,chunkSize:16384,windowBits:15,memLevel:8,strategy:J5,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new X5,this.strm.avail_out=0;var r=Yo.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==os)throw new Error(Lh[r]);if(t.header&&Yo.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(typeof t.dictionary=="string"?n=$h.string2buf(t.dictionary):py.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,r=Yo.deflateSetDictionary(this.strm,n),r!==os)throw new Error(Lh[r]);this._dict_set=!0}}aa.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i,a;if(this.ended)return!1;a=t===~~t?t:t===!0?Fh:Z5,typeof e=="string"?r.input=$h.string2buf(e):py.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Xo.Buf8(n),r.next_out=0,r.avail_out=n),i=Yo.deflate(r,a),i!==dy&&i!==os)return this.onEnd(i),this.ended=!0,!1;(r.avail_out===0||r.avail_in===0&&(a===Fh||a===hy))&&(this.options.to==="string"?this.onData($h.buf2binstring(Xo.shrinkBuf(r.output,r.next_out))):this.onData(Xo.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||r.avail_out===0)&&i!==dy);return a===Fh?(i=Yo.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===os):(a===hy&&(this.onEnd(os),r.avail_out=0),!0)};aa.prototype.onData=function(e){this.chunks.push(e)};aa.prototype.onEnd=function(e){e===os&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Xo.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Dh(e,t){var r=new aa(t);if(r.push(e,!0),r.err)throw r.msg||Lh[r.err];return r.result}function eM(e,t){return t=t||{},t.raw=!0,Dh(e,t)}function tM(e,t){return t=t||{},t.gzip=!0,Dh(e,t)}Zo.Deflate=aa;Zo.deflate=Dh;Zo.deflateRaw=eM;Zo.gzip=tM});var vy=F((PU,gy)=>{"use strict";g();var zc=30,rM=12;gy.exports=function(t,r){var n,i,a,s,o,l,c,u,f,d,h,p,m,v,y,b,x,E,_,k,w,A,S,T,P;n=t.state,i=t.next_in,T=t.input,a=i+(t.avail_in-5),s=t.next_out,P=t.output,o=s-(r-t.avail_out),l=s+(t.avail_out-257),c=n.dmax,u=n.wsize,f=n.whave,d=n.wnext,h=n.window,p=n.hold,m=n.bits,v=n.lencode,y=n.distcode,b=(1<>>24,p>>>=_,m-=_,_=E>>>16&255,_===0)P[s++]=E&65535;else if(_&16){k=E&65535,_&=15,_&&(m<_&&(p+=T[i++]<>>=_,m-=_),m<15&&(p+=T[i++]<>>24,p>>>=_,m-=_,_=E>>>16&255,_&16){if(w=E&65535,_&=15,m<_&&(p+=T[i++]<c){t.msg="invalid distance too far back",n.mode=zc;break e}if(p>>>=_,m-=_,_=s-o,w>_){if(_=w-_,_>f&&n.sane){t.msg="invalid distance too far back",n.mode=zc;break e}if(A=0,S=h,d===0){if(A+=u-_,_2;)P[s++]=S[A++],P[s++]=S[A++],P[s++]=S[A++],k-=3;k&&(P[s++]=S[A++],k>1&&(P[s++]=S[A++]))}else{A=s-w;do P[s++]=P[A++],P[s++]=P[A++],P[s++]=P[A++],k-=3;while(k>2);k&&(P[s++]=P[A++],k>1&&(P[s++]=P[A++]))}}else if(_&64){t.msg="invalid distance code",n.mode=zc;break e}else{E=y[(E&65535)+(p&(1<<_)-1)];continue r}break}}else if(_&64)if(_&32){n.mode=rM;break e}else{t.msg="invalid literal/length code",n.mode=zc;break e}else{E=v[(E&65535)+(p&(1<<_)-1)];continue t}break}}while(i>3,i-=k,m-=k<<3,p&=(1<{"use strict";g();var yy=Bn(),ls=15,wy=852,by=592,_y=0,Nh=1,xy=2,nM=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],iM=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],aM=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],sM=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];Sy.exports=function(t,r,n,i,a,s,o,l){var c=l.bits,u=0,f=0,d=0,h=0,p=0,m=0,v=0,y=0,b=0,x=0,E,_,k,w,A,S=null,T=0,P,I=new yy.Buf16(ls+1),N=new yy.Buf16(ls+1),L=null,ee=0,fe,J,Q;for(u=0;u<=ls;u++)I[u]=0;for(f=0;f=1&&I[h]===0;h--);if(p>h&&(p=h),h===0)return a[s++]=1<<24|64<<16|0,a[s++]=1<<24|64<<16|0,l.bits=1,0;for(d=1;d0&&(t===_y||h!==1))return-1;for(N[1]=0,u=1;uwy||t===xy&&b>by)return 1;for(;;){fe=u-v,o[f]P?(J=L[ee+o[f]],Q=S[T+o[f]]):(J=96,Q=0),E=1<>v)+_]=fe<<24|J<<16|Q|0;while(_!==0);for(E=1<>=1;if(E!==0?(x&=E-1,x+=E):x=0,f++,--I[u]===0){if(u===h)break;u=r[n+o[f]]}if(u>p&&(x&w)!==k){for(v===0&&(v=p),A+=d,m=u-v,y=1<wy||t===xy&&b>by)return 1;k=x&w,a[k]=p<<24|m<<16|A-s|0}}return x!==0&&(a[A+x]=u-v<<24|64<<16|0),l.bits=p,0}});var aw=F(Jr=>{"use strict";g();var hr=Bn(),zh=kh(),bn=Th(),oM=vy(),Ko=Ey(),lM=0,Zy=1,Ky=2,Ay=4,cM=5,Vc=6,sa=0,uM=1,fM=2,Ir=-2,Jy=-3,Vh=-4,dM=-5,ky=8,Qy=1,Ty=2,Cy=3,Py=4,Ry=5,My=6,Oy=7,Iy=8,Fy=9,$y=10,Yc=11,Un=12,Bh=13,Ly=14,jh=15,Dy=16,Ny=17,By=18,jy=19,Wc=20,qc=21,Hy=22,Uy=23,Gy=24,zy=25,Vy=26,Hh=27,Wy=28,qy=29,Be=30,Wh=31,hM=32,pM=852,mM=592,gM=15,vM=gM;function Yy(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function yM(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new hr.Buf16(320),this.work=new hr.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ew(e){var t;return!e||!e.state?Ir:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Qy,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new hr.Buf32(pM),t.distcode=t.distdyn=new hr.Buf32(mM),t.sane=1,t.back=-1,sa)}function tw(e){var t;return!e||!e.state?Ir:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,ew(e))}function rw(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?Ir:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,tw(e))}function nw(e,t){var r,n;return e?(n=new yM,e.state=n,n.window=null,r=rw(e,t),r!==sa&&(e.state=null),r):Ir}function wM(e){return nw(e,vM)}var Xy=!0,Uh,Gh;function bM(e){if(Xy){var t;for(Uh=new hr.Buf32(512),Gh=new hr.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Ko(Zy,e.lens,0,288,Uh,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Ko(Ky,e.lens,0,32,Gh,0,e.work,{bits:5}),Xy=!1}e.lencode=Uh,e.lenbits=9,e.distcode=Gh,e.distbits=5}function iw(e,t,r,n){var i,a=e.state;return a.window===null&&(a.wsize=1<=a.wsize?(hr.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),hr.arraySet(a.window,t,r-n,i,a.wnext),n-=i,n?(hr.arraySet(a.window,t,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=bn(r.check,S,2,0),c=0,u=0,r.mode=Ty;break}if(r.flags=0,r.head&&(r.head.done=!1),!(r.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",r.mode=Be;break}if((c&15)!==ky){e.msg="unknown compression method",r.mode=Be;break}if(c>>>=4,u-=4,w=(c&15)+8,r.wbits===0)r.wbits=w;else if(w>r.wbits){e.msg="invalid window size",r.mode=Be;break}r.dmax=1<>8&1),r.flags&512&&(S[0]=c&255,S[1]=c>>>8&255,r.check=bn(r.check,S,2,0)),c=0,u=0,r.mode=Cy;case Cy:for(;u<32;){if(o===0)break e;o--,c+=n[a++]<>>8&255,S[2]=c>>>16&255,S[3]=c>>>24&255,r.check=bn(r.check,S,4,0)),c=0,u=0,r.mode=Py;case Py:for(;u<16;){if(o===0)break e;o--,c+=n[a++]<>8),r.flags&512&&(S[0]=c&255,S[1]=c>>>8&255,r.check=bn(r.check,S,2,0)),c=0,u=0,r.mode=Ry;case Ry:if(r.flags&1024){for(;u<16;){if(o===0)break e;o--,c+=n[a++]<>>8&255,r.check=bn(r.check,S,2,0)),c=0,u=0}else r.head&&(r.head.extra=null);r.mode=My;case My:if(r.flags&1024&&(h=r.length,h>o&&(h=o),h&&(r.head&&(w=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),hr.arraySet(r.head.extra,n,a,h,w)),r.flags&512&&(r.check=bn(r.check,n,h,a)),o-=h,a+=h,r.length-=h),r.length))break e;r.length=0,r.mode=Oy;case Oy:if(r.flags&2048){if(o===0)break e;h=0;do w=n[a+h++],r.head&&w&&r.length<65536&&(r.head.name+=String.fromCharCode(w));while(w&&h>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Un;break;case $y:for(;u<32;){if(o===0)break e;o--,c+=n[a++]<>>=u&7,u-=u&7,r.mode=Hh;break}for(;u<3;){if(o===0)break e;o--,c+=n[a++]<>>=1,u-=1,c&3){case 0:r.mode=Ly;break;case 1:if(bM(r),r.mode=Wc,t===Vc){c>>>=2,u-=2;break e}break;case 2:r.mode=Ny;break;case 3:e.msg="invalid block type",r.mode=Be}c>>>=2,u-=2;break;case Ly:for(c>>>=u&7,u-=u&7;u<32;){if(o===0)break e;o--,c+=n[a++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=Be;break}if(r.length=c&65535,c=0,u=0,r.mode=jh,t===Vc)break e;case jh:r.mode=Dy;case Dy:if(h=r.length,h){if(h>o&&(h=o),h>l&&(h=l),h===0)break e;hr.arraySet(i,n,a,h,s),o-=h,a+=h,l-=h,s+=h,r.length-=h;break}r.mode=Un;break;case Ny:for(;u<14;){if(o===0)break e;o--,c+=n[a++]<>>=5,u-=5,r.ndist=(c&31)+1,c>>>=5,u-=5,r.ncode=(c&15)+4,c>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Be;break}r.have=0,r.mode=By;case By:for(;r.have>>=3,u-=3}for(;r.have<19;)r.lens[I[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,T={bits:r.lenbits},A=Ko(lM,r.lens,0,19,r.lencode,0,r.work,T),r.lenbits=T.bits,A){e.msg="invalid code lengths set",r.mode=Be;break}r.have=0,r.mode=jy;case jy:for(;r.have>>24,b=v>>>16&255,x=v&65535,!(y<=u);){if(o===0)break e;o--,c+=n[a++]<>>=y,u-=y,r.lens[r.have++]=x;else{if(x===16){for(P=y+2;u>>=y,u-=y,r.have===0){e.msg="invalid bit length repeat",r.mode=Be;break}w=r.lens[r.have-1],h=3+(c&3),c>>>=2,u-=2}else if(x===17){for(P=y+3;u>>=y,u-=y,w=0,h=3+(c&7),c>>>=3,u-=3}else{for(P=y+7;u>>=y,u-=y,w=0,h=11+(c&127),c>>>=7,u-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Be;break}for(;h--;)r.lens[r.have++]=w}}if(r.mode===Be)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=Be;break}if(r.lenbits=9,T={bits:r.lenbits},A=Ko(Zy,r.lens,0,r.nlen,r.lencode,0,r.work,T),r.lenbits=T.bits,A){e.msg="invalid literal/lengths set",r.mode=Be;break}if(r.distbits=6,r.distcode=r.distdyn,T={bits:r.distbits},A=Ko(Ky,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,T),r.distbits=T.bits,A){e.msg="invalid distances set",r.mode=Be;break}if(r.mode=Wc,t===Vc)break e;case Wc:r.mode=qc;case qc:if(o>=6&&l>=258){e.next_out=s,e.avail_out=l,e.next_in=a,e.avail_in=o,r.hold=c,r.bits=u,oM(e,d),s=e.next_out,i=e.output,l=e.avail_out,a=e.next_in,n=e.input,o=e.avail_in,c=r.hold,u=r.bits,r.mode===Un&&(r.back=-1);break}for(r.back=0;v=r.lencode[c&(1<>>24,b=v>>>16&255,x=v&65535,!(y<=u);){if(o===0)break e;o--,c+=n[a++]<>E)],y=v>>>24,b=v>>>16&255,x=v&65535,!(E+y<=u);){if(o===0)break e;o--,c+=n[a++]<>>=E,u-=E,r.back+=E}if(c>>>=y,u-=y,r.back+=y,r.length=x,b===0){r.mode=Vy;break}if(b&32){r.back=-1,r.mode=Un;break}if(b&64){e.msg="invalid literal/length code",r.mode=Be;break}r.extra=b&15,r.mode=Hy;case Hy:if(r.extra){for(P=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=Uy;case Uy:for(;v=r.distcode[c&(1<>>24,b=v>>>16&255,x=v&65535,!(y<=u);){if(o===0)break e;o--,c+=n[a++]<>E)],y=v>>>24,b=v>>>16&255,x=v&65535,!(E+y<=u);){if(o===0)break e;o--,c+=n[a++]<>>=E,u-=E,r.back+=E}if(c>>>=y,u-=y,r.back+=y,b&64){e.msg="invalid distance code",r.mode=Be;break}r.offset=x,r.extra=b&15,r.mode=Gy;case Gy:if(r.extra){for(P=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Be;break}r.mode=zy;case zy:if(l===0)break e;if(h=d-l,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Be;break}h>r.wnext?(h-=r.wnext,p=r.wsize-h):p=r.wnext-h,h>r.length&&(h=r.length),m=r.window}else m=i,p=s-r.offset,h=r.length;h>l&&(h=l),l-=h,r.length-=h;do i[s++]=m[p++];while(--h);r.length===0&&(r.mode=qc);break;case Vy:if(l===0)break e;i[s++]=r.length,l--,r.mode=qc;break;case Hh:if(r.wrap){for(;u<32;){if(o===0)break e;o--,c|=n[a++]<{"use strict";g();sw.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var lw=F((DU,ow)=>{"use strict";g();function AM(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}ow.exports=AM});var uw=F(Qo=>{"use strict";g();var cs=aw(),Jo=Bn(),Xc=Oh(),nt=qh(),Yh=Lc(),kM=Ih(),TM=lw(),cw=Object.prototype.toString;function oa(e){if(!(this instanceof oa))return new oa(e);this.options=Jo.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new kM,this.strm.avail_out=0;var r=cs.inflateInit2(this.strm,t.windowBits);if(r!==nt.Z_OK)throw new Error(Yh[r]);if(this.header=new TM,cs.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Xc.string2buf(t.dictionary):cw.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=cs.inflateSetDictionary(this.strm,t.dictionary),r!==nt.Z_OK)))throw new Error(Yh[r])}oa.prototype.push=function(e,t){var r=this.strm,n=this.options.chunkSize,i=this.options.dictionary,a,s,o,l,c,u=!1;if(this.ended)return!1;s=t===~~t?t:t===!0?nt.Z_FINISH:nt.Z_NO_FLUSH,typeof e=="string"?r.input=Xc.binstring2buf(e):cw.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new Jo.Buf8(n),r.next_out=0,r.avail_out=n),a=cs.inflate(r,nt.Z_NO_FLUSH),a===nt.Z_NEED_DICT&&i&&(a=cs.inflateSetDictionary(this.strm,i)),a===nt.Z_BUF_ERROR&&u===!0&&(a=nt.Z_OK,u=!1),a!==nt.Z_STREAM_END&&a!==nt.Z_OK)return this.onEnd(a),this.ended=!0,!1;r.next_out&&(r.avail_out===0||a===nt.Z_STREAM_END||r.avail_in===0&&(s===nt.Z_FINISH||s===nt.Z_SYNC_FLUSH))&&(this.options.to==="string"?(o=Xc.utf8border(r.output,r.next_out),l=r.next_out-o,c=Xc.buf2string(r.output,o),r.next_out=l,r.avail_out=n-l,l&&Jo.arraySet(r.output,r.output,o,l,0),this.onData(c)):this.onData(Jo.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(u=!0)}while((r.avail_in>0||r.avail_out===0)&&a!==nt.Z_STREAM_END);return a===nt.Z_STREAM_END&&(s=nt.Z_FINISH),s===nt.Z_FINISH?(a=cs.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===nt.Z_OK):(s===nt.Z_SYNC_FLUSH&&(this.onEnd(nt.Z_OK),r.avail_out=0),!0)};oa.prototype.onData=function(e){this.chunks.push(e)};oa.prototype.onEnd=function(e){e===nt.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Jo.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Xh(e,t){var r=new oa(t);if(r.push(e,!0),r.err)throw r.msg||Yh[r.err];return r.result}function CM(e,t){return t=t||{},t.raw=!0,Xh(e,t)}Qo.Inflate=oa;Qo.inflate=Xh;Qo.inflateRaw=CM;Qo.ungzip=Xh});var hw=F((HU,dw)=>{"use strict";g();var PM=Bn().assign,RM=my(),MM=uw(),OM=qh(),fw={};PM(fw,RM,MM,OM);dw.exports=fw});var gw=F((GU,mw)=>{"use strict";g();var pw=(e,t)=>function(...r){let n=t.promiseModule;return new n((i,a)=>{t.multiArgs?r.push((...s)=>{t.errorFirst?s[0]?a(s):(s.shift(),i(s)):i(s)}):t.errorFirst?r.push((s,o)=>{s?a(s):i(o)}):r.push(i),e.apply(this,r)})};mw.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);let r=typeof e;if(!(e!==null&&(r==="object"||r==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${e===null?"null":r}\``);let n=a=>{let s=o=>typeof o=="string"?a===o:o.test(a);return t.include?t.include.some(s):!t.exclude.some(s)},i;r==="function"?i=function(...a){return t.excludeMain?e(...a):pw(e,t).apply(this,a)}:i=Object.create(Object.getPrototypeOf(e));for(let a in e){let s=e[a];i[a]=typeof s=="function"&&n(a)?pw(s,t):s}return i}});var Aw=F((VU,Ew)=>{g();function vw(e){return Array.isArray(e)?e:[e]}var Jh="",yw=" ",Zh="\\",IM=/^\s+$/,FM=/(?:[^\\]|^)\\$/,$M=/^\\!/,LM=/^\\#/,DM=/\r?\n/g,NM=/^\.*\/|^\.+$/,Kh="/",_w="node-ignore";typeof Symbol!="undefined"&&(_w=Symbol.for("node-ignore"));var ww=_w,BM=(e,t,r)=>Object.defineProperty(e,t,{value:r}),jM=/([0-z])-([0-z])/g,xw=()=>!1,HM=e=>e.replace(jM,(t,r,n)=>r.charCodeAt(0)<=n.charCodeAt(0)?t:Jh),UM=e=>{let{length:t}=e;return e.slice(0,t-t%2)},GM=[[/^\uFEFF/,()=>Jh],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?yw:Jh)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+yw}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6{let n=r.replace(/\\\*/g,"[^\\/]*");return t+n}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Zh],[/\\\\/g,()=>Zh],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,n,i)=>t===Zh?`\\[${r}${UM(n)}${i}`:i==="]"&&n.length%2===0?`[${HM(r)}${n}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],bw=Object.create(null),zM=(e,t)=>{let r=bw[e];return r||(r=GM.reduce((n,[i,a])=>n.replace(i,a.bind(e)),e),bw[e]=r),t?new RegExp(r,"i"):new RegExp(r)},tp=e=>typeof e=="string",VM=e=>e&&tp(e)&&!IM.test(e)&&!FM.test(e)&&e.indexOf("#")!==0,WM=e=>e.split(DM),Qh=class{constructor(t,r,n,i){this.origin=t,this.pattern=r,this.negative=n,this.regex=i}},qM=(e,t)=>{let r=e,n=!1;e.indexOf("!")===0&&(n=!0,e=e.substr(1)),e=e.replace($M,"!").replace(LM,"#");let i=zM(e,t);return new Qh(r,e,n,i)},YM=(e,t)=>{throw new t(e)},Gn=(e,t,r)=>tp(e)?e?Gn.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),Sw=e=>NM.test(e);Gn.isNotRelative=Sw;Gn.convert=e=>e;var ep=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:n=!1}={}){BM(this,ww,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[ww]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(VM(t)){let r=qM(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,vw(tp(t)?WM(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let n=!1,i=!1;return this._rules.forEach(a=>{let{negative:s}=a;if(i===s&&n!==i||s&&!n&&!i&&!r)return;a.regex.test(t)&&(n=!s,i=s)}),{ignored:n,unignored:i}}_test(t,r,n,i){let a=t&&Gn.convert(t);return Gn(a,t,this._allowRelativePaths?xw:YM),this._t(a,r,n,i)}_t(t,r,n,i){if(t in r)return r[t];if(i||(i=t.split(Kh)),i.pop(),!i.length)return r[t]=this._testOne(t,n);let a=this._t(i.join(Kh)+Kh,r,n,i);return r[t]=a.ignored?a:this._testOne(t,n)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return vw(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},Zc=e=>new ep(e),XM=e=>Gn(e&&Gn.convert(e),e,xw);Zc.isPathValid=XM;Zc.default=Zc;Ew.exports=Zc;if(typeof process!="undefined"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Gn.convert=e;let t=/^[a-z]:\//i;Gn.isNotRelative=r=>t.test(r)||Sw(r)}});var Tw=F((qU,kw)=>{"use strict";g();function ZM(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _n(e,t,r){return t=t instanceof RegExp?t:new RegExp(ZM(t),"g"),e.replace(t,r)}var KM={clean:function(t){if(typeof t!="string")throw new Error("Expected a string, received: "+t);return t=_n(t,"./","/"),t=_n(t,"..","."),t=_n(t," ","-"),t=_n(t,/^[~^:?*\\\-]/g,""),t=_n(t,/[~^:?*\\]/g,"-"),t=_n(t,/[~^:?*\\\-]$/g,""),t=_n(t,"@{","-"),t=_n(t,/\.$/g,""),t=_n(t,/\/$/g,""),t=_n(t,/\.lock$/g,""),t}};kw.exports=KM});var Pw=F((XU,Cw)=>{g();Cw.exports=function(e,t){var r=e,n=t,i=r.length,a=n.length,s=!1,o=null,l=i+1,c=[],u=[],f=[],d="",h=-1,p=0,m=1,v,y,b=function(){i>=a&&(v=r,y=i,r=n,n=v,i=a,a=y,s=!0,l=i+1)},x=function(w,A,S){return{x:w,y:A,k:S}},E=function(w,A){return{elem:w,t:A}},_=function(w,A,S){var T,P,I;for(A>S?T=c[w-1+l]:T=c[w+1+l],I=Math.max(A,S),P=I-w;P=0;--I)for(;TP-T?(s?f[f.length]=new E(n[P],h):f[f.length]=new E(n[P],m),++S,++P):w[I].y-w[I].x=w+1;--L)S[L+l]=_(L,S[L-1+l]+1,S[L+1+l]);S[w+l]=_(w,S[w-1+l]+1,S[w+1+l])}while(S[w+l]!==a);for(o=w+2*T,P=c[w+l],I=[];P!==-1;)I[I.length]=new x(u[P].x,u[P].y,null),P=u[P].k;k(I)}}}});var Ow=F((KU,Mw)=>{g();var JM=Pw();function QM(e,t){var r=new JM(e,t);r.compose();for(var n=r.getses(),i,a,s=e.length-1,o=t.length-1,l=n.length-1;l>=0;--l)n[l].t===r.SES_COMMON?(a?(a.chain={file1index:s,file2index:o,chain:null},a=a.chain):(i={file1index:s,file2index:o,chain:null},a=i),s--,o--):n[l].t===r.SES_DELETE?s--:n[l].t===r.SES_ADD&&o--;var c={file1index:-1,file2index:-1,chain:null};return a?(a.chain=c,i):c}function Rw(e,t){for(var r=[],n=e.length,i=t.length,a=QM(e,t);a!==null;a=a.chain){var s=n-a.file1index-1,o=i-a.file2index-1;n=a.file1index,i=a.file2index,(s||o)&&r.push({file1:[n+1,s],file2:[i+1,o]})}return r.reverse(),r}function e6(e,t,r){var n,i=Rw(t,e),a=Rw(t,r),s=[];function o(N,L){s.push([N.file1[0],L,N.file1[1],N.file2[0],N.file2[1]])}for(n=0;nc&&(l.push([1,c,N-c]),c=N)}for(var f=0;fm)break;m=Math.max(m,y+v[2]),f++}if(u(p),d==f)h[4]>0&&l.push([h[1],h[3],h[4]]);else{var b={0:[e.length,-1,t.length,-1],2:[r.length,-1,t.length,-1]};for(n=d;n<=f;n++){h=s[n];var x=h[1],E=b[x],_=h[0],k=_+h[2],w=h[3],A=w+h[4];E[0]=Math.min(w,E[0]),E[1]=Math.max(A,E[1]),E[2]=Math.min(_,E[2]),E[3]=Math.max(k,E[3])}var S=b[0][0]+(p-b[0][2]),T=b[0][1]+(m-b[0][3]),P=b[2][0]+(p-b[2][2]),I=b[2][1]+(m-b[2][3]);l.push([-1,S,T-S,p,m-p,P,I-P])}c=m}return u(t.length),l}function t6(e,t,r){var n=[],i=[e,t,r],a=e6(e,t,r),s=[];function o(){s.length&&n.push({ok:s}),s=[]}function l(h){for(var p=0;p{g();var Ts=1e3,Cs=Ts*60,Ps=Cs*60,pa=Ps*24,i8=pa*7,a8=pa*365.25;$2.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return s8(e);if(r==="number"&&isFinite(e))return t.long?l8(e):o8(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function s8(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*a8;case"weeks":case"week":case"w":return r*i8;case"days":case"day":case"d":return r*pa;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Ps;case"minutes":case"minute":case"mins":case"min":case"m":return r*Cs;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ts;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function o8(e){var t=Math.abs(e);return t>=pa?Math.round(e/pa)+"d":t>=Ps?Math.round(e/Ps)+"h":t>=Cs?Math.round(e/Cs)+"m":t>=Ts?Math.round(e/Ts)+"s":e+"ms"}function l8(e){var t=Math.abs(e);return t>=pa?vu(e,t,pa,"day"):t>=Ps?vu(e,t,Ps,"hour"):t>=Cs?vu(e,t,Cs,"minute"):t>=Ts?vu(e,t,Ts,"second"):e+" ms"}function vu(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var N2=F((sG,D2)=>{g();function c8(e){r.debug=r,r.default=r,r.coerce=l,r.disable=a,r.enable=i,r.enabled=s,r.humanize=L2(),r.destroy=c,Object.keys(e).forEach(u=>{r[u]=e[u]}),r.names=[],r.skips=[],r.formatters={};function t(u){let f=0;for(let d=0;d{if(k==="%%")return"%";E++;let A=r.formatters[w];if(typeof A=="function"){let S=v[E];k=A.call(y,S),v.splice(E,1),E--}return k}),r.formatArgs.call(y,v),(y.log||r.log).apply(y,v)}return m.namespace=u,m.useColors=r.useColors(),m.color=r.selectColor(u),m.extend=n,m.destroy=r.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,p=r.enabled(u)),p),set:v=>{d=v}}),typeof r.init=="function"&&r.init(m),m}function n(u,f){let d=r(this.namespace+(typeof f=="undefined"?":":f)+u);return d.log=this.log,d}function i(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let f,d=(typeof u=="string"?u:"").split(/[\s,]+/),h=d.length;for(f=0;f"-"+f)].join(",");return r.enable(""),u}function s(u){if(u[u.length-1]==="*")return!0;let f,d;for(f=0,d=r.skips.length;f{g();gr.formatArgs=f8;gr.save=d8;gr.load=h8;gr.useColors=u8;gr.storage=p8();gr.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();gr.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function u8(){if(typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function f8(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+yu.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}gr.log=console.debug||console.log||(()=>{});function d8(e){try{e?gr.storage.setItem("debug",e):gr.storage.removeItem("debug")}catch(t){}}function h8(){let e;try{e=gr.storage.getItem("debug")}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}function p8(){try{return localStorage}catch(e){}}yu.exports=N2()(gr);var{formatters:m8}=yu.exports;m8.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var B2=F(vr=>{"use strict";g();var g8=vr&&vr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vr,"__esModule",{value:!0});var v8=require("fs"),y8=g8(wu()),Rs=y8.default("@kwsites/file-exists");function w8(e,t,r){Rs("checking %s",e);try{let n=v8.statSync(e);return n.isFile()&&t?(Rs("[OK] path represents a file"),!0):n.isDirectory()&&r?(Rs("[OK] path represents a directory"),!0):(Rs("[FAIL] path represents something other than a file or directory"),!1)}catch(n){if(n.code==="ENOENT")return Rs("[FAIL] path is not accessible: %o",n),!1;throw Rs("[FATAL] %o",n),n}}function b8(e,t=vr.READABLE){return w8(e,(t&vr.FILE)>0,(t&vr.FOLDER)>0)}vr.exists=b8;vr.FILE=1;vr.FOLDER=2;vr.READABLE=vr.FILE+vr.FOLDER});var j2=F(bu=>{"use strict";g();function _8(e){for(var t in e)bu.hasOwnProperty(t)||(bu[t]=e[t])}Object.defineProperty(bu,"__esModule",{value:!0});_8(B2())});var Mp=F(ma=>{"use strict";g();Object.defineProperty(ma,"__esModule",{value:!0});ma.createDeferred=ma.deferred=void 0;function Rp(){let e,t,r="pending";return{promise:new Promise((i,a)=>{e=i,t=a}),done(i){r==="pending"&&(r="resolved",e(i))},fail(i){r==="pending"&&(r="rejected",t(i))},get fulfilled(){return r!=="pending"},get status(){return r}}}ma.deferred=Rp;ma.createDeferred=Rp;ma.default=Rp});var Px=F((JG,Cx)=>{"use strict";g();Cx.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Mx=F((ez,Rx)=>{g();var Sm={px:{px:1,cm:37.79527559055118,mm:3.7795275590551185,in:96,pt:1.3333333333333333,pc:16},cm:{px:.026458333333333334,cm:1,mm:.1,in:2.54,pt:.035277777777777776,pc:.42333333333333334},mm:{px:.26458333333333334,cm:10,mm:1,in:25.4,pt:.35277777777777775,pc:4.233333333333333},in:{px:.010416666666666666,cm:.39370078740157477,mm:.03937007874015748,in:1,pt:.013888888888888888,pc:.16666666666666666},pt:{px:.75,cm:28.346456692913385,mm:2.834645669291339,in:72,pt:1,pc:12},pc:{px:.0625,cm:2.3622047244094486,mm:.2362204724409449,in:6,pt:.08333333333333333,pc:1},deg:{deg:1,grad:.9,rad:180/Math.PI,turn:360},grad:{deg:1.1111111111111112,grad:1,rad:200/Math.PI,turn:400},rad:{deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:Math.PI*2},turn:{deg:.002777777777777778,grad:.0025,rad:.5/Math.PI,turn:1},s:{s:1,ms:.001},ms:{s:1e3,ms:1},Hz:{Hz:1,kHz:1e3},kHz:{Hz:.001,kHz:1},dpi:{dpi:1,dpcm:.39370078740157477,dppx:.010416666666666666},dpcm:{dpi:2.54,dpcm:1,dppx:.026458333333333334},dppx:{dpi:96,dpcm:37.79527559055118,dppx:1}};Rx.exports=function(e,t,r,n){if(!Sm.hasOwnProperty(r))throw new Error("Cannot convert to "+r);if(!Sm[r].hasOwnProperty(t))throw new Error("Cannot convert from "+t+" to "+r);var i=Sm[r][t]*e;return n!==!1?(n=Math.pow(10,parseInt(n)||5),Math.round(i*n)/n):i}});var Vx=F(Yn=>{"use strict";g();Object.defineProperty(Yn,"__esModule",{value:!0});Yn.fromRgba=Ls;Yn.fromRgb=Em;Yn.fromHsla=Vu;Yn.fromHsl=Gx;Yn.fromString=zx;Yn.default=void 0;var Ox=$x(Px()),I$=$x(Mx());function $x(e){return e&&e.__esModule?e:{default:e}}function F$(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ix(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r-1}function j$(e,t,r){var n=e/255,i=t/255,a=r/255,s=Math.max(n,i,a),o=Math.min(n,i,a),l=s-o,c=(s+o)/2;if(l===0)return[0,0,c*100];var u=l/(1-Math.abs(2*c-1)),f=function(){switch(s){case n:return(i-a)/l%6;case i:return(a-n)/l+2;default:return(n-i)/l+4}}();return[f*60,u*100,c*100]}function H$(e,t,r){var n=e/60,i=t/100,a=r/100,s=(1-Math.abs(2*a-1))*i,o=s*(1-Math.abs(n%2-1)),l=a-s/2,c=function(){return n<1?[s,o,0]:n<2?[o,s,0]:n<3?[0,s,o]:n<4?[0,o,s]:n<5?[o,0,s]:[s,0,o]}(),u=qt(c,3),f=u[0],d=u[1],h=u[2];return[(f+l)*255,(d+l)*255,(h+l)*255]}var U$=function(){function e(t){var r=qt(t,4),n=r[0],i=r[1],a=r[2],s=r[3];F$(this,e),this.values=[Math.max(Math.min(parseInt(n,10),255),0),Math.max(Math.min(parseInt(i,10),255),0),Math.max(Math.min(parseInt(a,10),255),0),s==null?1:Math.max(Math.min(parseFloat(s),255),0)]}return $$(e,[{key:"toRgbString",value:function(){var r=qt(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3];return s===1?"rgb(".concat(n,", ").concat(i,", ").concat(a,")"):"rgba(".concat(n,", ").concat(i,", ").concat(a,", ").concat(s,")")}},{key:"toHslString",value:function(){var r=this.toHslaArray(),n=qt(r,4),i=n[0],a=n[1],s=n[2],o=n[3];return o===1?"hsl(".concat(i,", ").concat(a,"%, ").concat(s,"%)"):"hsla(".concat(i,", ").concat(a,"%, ").concat(s,"%, ").concat(o,")")}},{key:"toHexString",value:function(){var r=qt(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3];return n=Number(n).toString(16).padStart(2,"0"),i=Number(i).toString(16).padStart(2,"0"),a=Number(a).toString(16).padStart(2,"0"),s=s<1?parseInt(s*255,10).toString(16).padStart(2,"0"):"","#".concat(n).concat(i).concat(a).concat(s)}},{key:"toRgbaArray",value:function(){return this.values}},{key:"toHslaArray",value:function(){var r=qt(this.values,4),n=r[0],i=r[1],a=r[2],s=r[3],o=j$(n,i,a),l=qt(o,3),c=l[0],u=l[1],f=l[2];return[c,u,f,s]}}]),e}();function Ls(e){var t=qt(e,4),r=t[0],n=t[1],i=t[2],a=t[3];return new U$([r,n,i,a])}function Em(e){var t=qt(e,3),r=t[0],n=t[1],i=t[2];return Ls([r,n,i,1])}function Vu(e){var t=qt(e,4),r=t[0],n=t[1],i=t[2],a=t[3],s=H$(r,n,i),o=qt(s,3),l=o[0],c=o[1],u=o[2];return Ls([l,c,u,a])}function Gx(e){var t=qt(e,3),r=t[0],n=t[1],i=t[2];return Vu([r,n,i,1])}function G$(e){var t=Lx.exec(e)||Dx.exec(e),r=qt(t,5),n=r[1],i=r[2],a=r[3],s=r[4];return n=parseInt(n.length<2?n.repeat(2):n,16),i=parseInt(i.length<2?i.repeat(2):i,16),a=parseInt(a.length<2?a.repeat(2):a,16),s=s&&(parseInt(s.length<2?s.repeat(2):s,16)/255).toPrecision(1)||1,Ls([n,i,a,s])}function z$(e){var t=Nx.exec(e)||jx.exec(e)||Bx.exec(e)||Hx.exec(e),r=qt(t,5),n=r[1],i=r[2],a=r[3],s=r[4];return n=$l(n,"%")?parseInt(n,10)*255/100:parseInt(n,10),i=$l(i,"%")?parseInt(i,10)*255/100:parseInt(i,10),a=$l(a,"%")>0?parseInt(a,10)*255/100:parseInt(a,10),s=s===void 0?1:parseFloat(s)/($l(s,"%")?100:1),Ls([n,i,a,s])}function V$(e){var t=Ux.exec(e),r=qt(t,6),n=r[1],i=r[2],a=r[3],s=r[4],o=r[5];return i=i||"deg",n=(0,I$.default)(parseFloat(n),i,"deg"),a=parseFloat(a),s=parseFloat(s),o=o===void 0?1:parseFloat(o)/($l(o,"%")?100:1),Vu([n,a,s,o])}function zx(e){return Ox.default[e]?Em(Ox.default[e]):Lx.test(e)||Dx.test(e)?G$(e):Nx.test(e)||jx.test(e)||Bx.test(e)||Hx.test(e)?z$(e):Ux.test(e)?V$(e):null}var W$={fromString:zx,fromRgb:Em,fromRgba:Ls,fromHsl:Gx,fromHsla:Vu};Yn.default=W$});var Am=F((iz,qx)=>{"use strict";g();var Wx=Object.prototype.toString;qx.exports=function(t){var r=Wx.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Wx.call(t.callee)==="[object Function]"),n}});var rS=F((sz,tS)=>{"use strict";g();var eS;Object.keys||(Ll=Object.prototype.hasOwnProperty,km=Object.prototype.toString,Yx=Am(),Tm=Object.prototype.propertyIsEnumerable,Xx=!Tm.call({toString:null},"toString"),Zx=Tm.call(function(){},"prototype"),Dl=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Wu=function(e){var t=e.constructor;return t&&t.prototype===e},Kx={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Jx=function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!Kx["$"+e]&&Ll.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{Wu(window[e])}catch(t){return!0}}catch(t){return!0}return!1}(),Qx=function(e){if(typeof window=="undefined"||!Jx)return Wu(e);try{return Wu(e)}catch(t){return!1}},eS=function(t){var r=t!==null&&typeof t=="object",n=km.call(t)==="[object Function]",i=Yx(t),a=r&&km.call(t)==="[object String]",s=[];if(!r&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var o=Zx&&n;if(a&&t.length>0&&!Ll.call(t,0))for(var l=0;l0)for(var c=0;c{"use strict";g();var q$=Array.prototype.slice,Y$=Am(),nS=Object.keys,qu=nS?function(t){return nS(t)}:rS(),iS=Object.keys;qu.shim=function(){if(Object.keys){var t=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);t||(Object.keys=function(n){return Y$(n)?iS(q$.call(n)):iS(n)})}else Object.keys=qu;return Object.keys||qu};aS.exports=qu});var oS=F((uz,sS)=>{"use strict";g();sS.exports=Error});var cS=F((dz,lS)=>{"use strict";g();lS.exports=EvalError});var fS=F((pz,uS)=>{"use strict";g();uS.exports=RangeError});var hS=F((gz,dS)=>{"use strict";g();dS.exports=ReferenceError});var Cm=F((yz,pS)=>{"use strict";g();pS.exports=SyntaxError});var Xn=F((bz,mS)=>{"use strict";g();mS.exports=TypeError});var vS=F((xz,gS)=>{"use strict";g();gS.exports=URIError});var Nl=F((Ez,yS)=>{"use strict";g();yS.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var Xu=F((kz,bS)=>{"use strict";g();var wS=typeof Symbol!="undefined"&&Symbol,X$=Nl();bS.exports=function(){return typeof wS!="function"||typeof Symbol!="function"||typeof wS("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:X$()}});var xS=F((Cz,_S)=>{"use strict";g();var Pm={__proto__:null,foo:{}},Z$=Object;_S.exports=function(){return{__proto__:Pm}.foo===Pm.foo&&!(Pm instanceof Z$)}});var AS=F((Rz,ES)=>{"use strict";g();var K$="Function.prototype.bind called on incompatible ",J$=Object.prototype.toString,Q$=Math.max,eL="[object Function]",SS=function(t,r){for(var n=[],i=0;i{"use strict";g();var nL=AS();kS.exports=Function.prototype.bind||nL});var Rm=F((Fz,TS)=>{"use strict";g();var iL=Function.prototype.call,aL=Object.prototype.hasOwnProperty,sL=Zu();TS.exports=sL.call(iL,aL)});var tn=F((Lz,OS)=>{"use strict";g();var we,oL=oS(),lL=cS(),cL=fS(),uL=hS(),js=Cm(),Bs=Xn(),fL=vS(),MS=Function,Mm=function(e){try{return MS('"use strict"; return ('+e+").constructor;")()}catch(t){}},ba=Object.getOwnPropertyDescriptor;if(ba)try{ba({},"")}catch(e){ba=null}var Om=function(){throw new Bs},dL=ba?function(){try{return arguments.callee,Om}catch(e){try{return ba(arguments,"callee").get}catch(t){return Om}}}():Om,Ds=Xu()(),hL=xS()(),xt=Object.getPrototypeOf||(hL?function(e){return e.__proto__}:null),Ns={},pL=typeof Uint8Array=="undefined"||!xt?we:xt(Uint8Array),_a={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?we:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?we:ArrayBuffer,"%ArrayIteratorPrototype%":Ds&&xt?xt([][Symbol.iterator]()):we,"%AsyncFromSyncIteratorPrototype%":we,"%AsyncFunction%":Ns,"%AsyncGenerator%":Ns,"%AsyncGeneratorFunction%":Ns,"%AsyncIteratorPrototype%":Ns,"%Atomics%":typeof Atomics=="undefined"?we:Atomics,"%BigInt%":typeof BigInt=="undefined"?we:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?we:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?we:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?we:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":oL,"%eval%":eval,"%EvalError%":lL,"%Float32Array%":typeof Float32Array=="undefined"?we:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?we:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?we:FinalizationRegistry,"%Function%":MS,"%GeneratorFunction%":Ns,"%Int8Array%":typeof Int8Array=="undefined"?we:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?we:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?we:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ds&&xt?xt(xt([][Symbol.iterator]())):we,"%JSON%":typeof JSON=="object"?JSON:we,"%Map%":typeof Map=="undefined"?we:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Ds||!xt?we:xt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?we:Promise,"%Proxy%":typeof Proxy=="undefined"?we:Proxy,"%RangeError%":cL,"%ReferenceError%":uL,"%Reflect%":typeof Reflect=="undefined"?we:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?we:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Ds||!xt?we:xt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?we:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ds&&xt?xt(""[Symbol.iterator]()):we,"%Symbol%":Ds?Symbol:we,"%SyntaxError%":js,"%ThrowTypeError%":dL,"%TypedArray%":pL,"%TypeError%":Bs,"%Uint8Array%":typeof Uint8Array=="undefined"?we:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?we:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?we:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?we:Uint32Array,"%URIError%":fL,"%WeakMap%":typeof WeakMap=="undefined"?we:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?we:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?we:WeakSet};if(xt)try{null.error}catch(e){CS=xt(xt(e)),_a["%Error.prototype%"]=CS}var CS,mL=function e(t){var r;if(t==="%AsyncFunction%")r=Mm("async function () {}");else if(t==="%GeneratorFunction%")r=Mm("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Mm("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&xt&&(r=xt(i.prototype))}return _a[t]=r,r},PS={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Bl=Zu(),Ku=Rm(),gL=Bl.call(Function.call,Array.prototype.concat),vL=Bl.call(Function.apply,Array.prototype.splice),RS=Bl.call(Function.call,String.prototype.replace),Ju=Bl.call(Function.call,String.prototype.slice),yL=Bl.call(Function.call,RegExp.prototype.exec),wL=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,bL=/\\(\\)?/g,_L=function(t){var r=Ju(t,0,1),n=Ju(t,-1);if(r==="%"&&n!=="%")throw new js("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new js("invalid intrinsic syntax, expected opening `%`");var i=[];return RS(t,wL,function(a,s,o,l){i[i.length]=o?RS(l,bL,"$1"):s||a}),i},xL=function(t,r){var n=t,i;if(Ku(PS,n)&&(i=PS[n],n="%"+i[0]+"%"),Ku(_a,n)){var a=_a[n];if(a===Ns&&(a=mL(n)),typeof a=="undefined"&&!r)throw new Bs("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new js("intrinsic "+t+" does not exist!")};OS.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new Bs("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Bs('"allowMissing" argument must be a boolean');if(yL(/^%?[^%]*%?$/,t)===null)throw new js("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=_L(t),i=n.length>0?n[0]:"",a=xL("%"+i+"%",r),s=a.name,o=a.value,l=!1,c=a.alias;c&&(i=c[0],vL(n,gL([0,1],c)));for(var u=1,f=!0;u=n.length){var m=ba(o,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?o=m.get:o=o[d]}else f=Ku(o,d),o=o[d];f&&!l&&(_a[s]=o)}}return o}});var ef=F((Nz,IS)=>{"use strict";g();var SL=tn(),Qu=SL("%Object.defineProperty%",!0)||!1;if(Qu)try{Qu({},"a",{value:1})}catch(e){Qu=!1}IS.exports=Qu});var rf=F((jz,FS)=>{"use strict";g();var EL=tn(),tf=EL("%Object.getOwnPropertyDescriptor%",!0);if(tf)try{tf([],"length")}catch(e){tf=null}FS.exports=tf});var nf=F((Uz,DS)=>{"use strict";g();var $S=ef(),AL=Cm(),Hs=Xn(),LS=rf();DS.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new Hs("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Hs("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Hs("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Hs("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Hs("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Hs("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,o=arguments.length>6?arguments[6]:!1,l=!!LS&&LS(t,r);if($S)$S(t,r,{configurable:s===null&&l?l.configurable:!s,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:a===null&&l?l.writable:!a});else if(o||!i&&!a&&!s)t[r]=n;else throw new AL("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var af=F((zz,BS)=>{"use strict";g();var Im=ef(),NS=function(){return!!Im};NS.hasArrayLengthDefineBug=function(){if(!Im)return null;try{return Im([],"length",{value:1}).length!==1}catch(t){return!0}};BS.exports=NS});var Ci=F((Wz,GS)=>{"use strict";g();var kL=Yu(),TL=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",CL=Object.prototype.toString,PL=Array.prototype.concat,jS=nf(),RL=function(e){return typeof e=="function"&&CL.call(e)==="[object Function]"},HS=af()(),ML=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!RL(n)||!n())return}HS?jS(e,t,r,!0):jS(e,t,r)},US=function(e,t){var r=arguments.length>2?arguments[2]:{},n=kL(t);TL&&(n=PL.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i{"use strict";g();var OL=tn(),zS=nf(),IL=af()(),VS=rf(),WS=Xn(),FL=OL("%Math.floor%");qS.exports=function(t,r){if(typeof t!="function")throw new WS("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||FL(r)!==r)throw new WS("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&VS){var s=VS(t,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(a=!1)}return(i||a||!n)&&(IL?zS(t,"length",r,!0,!0):zS(t,"length",r)),t}});var xa=F((Zz,sf)=>{"use strict";g();var Fm=Zu(),of=tn(),$L=YS(),LL=Xn(),KS=of("%Function.prototype.apply%"),JS=of("%Function.prototype.call%"),QS=of("%Reflect.apply%",!0)||Fm.call(JS,KS),XS=ef(),DL=of("%Math.max%");sf.exports=function(t){if(typeof t!="function")throw new LL("a function is required");var r=QS(Fm,JS,arguments);return $L(r,1+DL(0,t.length-(arguments.length-1)),!0)};var ZS=function(){return QS(Fm,KS,arguments)};XS?XS(sf.exports,"apply",{value:ZS}):sf.exports.apply=ZS});var br=F((Jz,rE)=>{"use strict";g();var eE=tn(),tE=xa(),NL=tE(eE("String.prototype.indexOf"));rE.exports=function(t,r){var n=eE(t,!!r);return typeof n=="function"&&NL(t,".prototype.")>-1?tE(n):n}});var $m=F((eV,oE)=>{"use strict";g();var BL=Yu(),aE=Nl()(),sE=br(),nE=Object,jL=sE("Array.prototype.push"),iE=sE("Object.prototype.propertyIsEnumerable"),HL=aE?Object.getOwnPropertySymbols:null;oE.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=nE(t);if(arguments.length===1)return n;for(var i=1;i{"use strict";g();var Lm=$m(),UL=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n{"use strict";g();var zL=Ci(),VL=Dm();cE.exports=function(){var t=VL();return zL(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t}});var pE=F((sV,hE)=>{"use strict";g();var WL=Ci(),qL=xa(),YL=$m(),fE=Dm(),XL=uE(),ZL=qL.apply(fE()),dE=function(t,r){return ZL(Object,arguments)};WL(dE,{getPolyfill:fE,implementation:YL,shim:XL});hE.exports=dE});var gE=F((lV,mE)=>{"use strict";g();var Hl=function(){return typeof function(){}.name=="string"},jl=Object.getOwnPropertyDescriptor;if(jl)try{jl([],"length")}catch(e){jl=null}Hl.functionsHaveConfigurableNames=function(){if(!Hl()||!jl)return!1;var t=jl(function(){},"name");return!!t&&!!t.configurable};var KL=Function.prototype.bind;Hl.boundFunctionsHaveNames=function(){return Hl()&&typeof KL=="function"&&function(){}.bind().name!==""};mE.exports=Hl});var wE=F((uV,yE)=>{"use strict";g();var vE=nf(),JL=af()(),QL=gE().functionsHaveConfigurableNames(),eD=Xn();yE.exports=function(t,r){if(typeof t!="function")throw new eD("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return(!n||QL)&&(JL?vE(t,"name",r,!0,!0):vE(t,"name",r)),t}});var Nm=F((dV,bE)=>{"use strict";g();var tD=wE(),rD=Xn(),nD=Object;bE.exports=tD(function(){if(this==null||this!==nD(this))throw new rD("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0)});var Bm=F((pV,_E)=>{"use strict";g();var iD=Nm(),aD=Ci().supportsDescriptors,sD=Object.getOwnPropertyDescriptor;_E.exports=function(){if(aD&&/a/mig.flags==="gim"){var t=sD(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var r="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(n,"sticky",{get:function(){r+="y"}}),t.get.call(n),r==="dy")return t.get}}return iD}});var EE=F((gV,SE)=>{"use strict";g();var oD=Ci().supportsDescriptors,lD=Bm(),cD=Object.getOwnPropertyDescriptor,uD=Object.defineProperty,fD=TypeError,xE=Object.getPrototypeOf,dD=/a/;SE.exports=function(){if(!oD||!xE)throw new fD("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=lD(),r=xE(dD),n=cD(r,"flags");return(!n||n.get!==t)&&uD(r,"flags",{configurable:!0,enumerable:!1,get:t}),t}});var CE=F((yV,TE)=>{"use strict";g();var hD=Ci(),pD=xa(),mD=Nm(),AE=Bm(),gD=EE(),kE=pD(AE());hD(kE,{getPolyfill:AE,implementation:mD,shim:gD});TE.exports=kE});var Pi=F((bV,PE)=>{"use strict";g();var vD=Nl();PE.exports=function(){return vD()&&!!Symbol.toStringTag}});var Hm=F((xV,ME)=>{"use strict";g();var yD=Pi()(),wD=br(),jm=wD("Object.prototype.toString"),lf=function(t){return yD&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:jm(t)==="[object Arguments]"},RE=function(t){return lf(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&jm(t)!=="[object Array]"&&jm(t.callee)==="[object Function]"},bD=function(){return lf(arguments)}();lf.isLegacyArguments=RE;ME.exports=bD?lf:RE});var OE=F(()=>{g()});var JE=F((TV,KE)=>{g();var Km=typeof Map=="function"&&Map.prototype,Um=Object.getOwnPropertyDescriptor&&Km?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,uf=Km&&Um&&typeof Um.get=="function"?Um.get:null,IE=Km&&Map.prototype.forEach,Jm=typeof Set=="function"&&Set.prototype,Gm=Object.getOwnPropertyDescriptor&&Jm?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ff=Jm&&Gm&&typeof Gm.get=="function"?Gm.get:null,FE=Jm&&Set.prototype.forEach,_D=typeof WeakMap=="function"&&WeakMap.prototype,Gl=_D?WeakMap.prototype.has:null,xD=typeof WeakSet=="function"&&WeakSet.prototype,zl=xD?WeakSet.prototype.has:null,SD=typeof WeakRef=="function"&&WeakRef.prototype,$E=SD?WeakRef.prototype.deref:null,ED=Boolean.prototype.valueOf,AD=Object.prototype.toString,kD=Function.prototype.toString,TD=String.prototype.match,Qm=String.prototype.slice,Mi=String.prototype.replace,CD=String.prototype.toUpperCase,LE=String.prototype.toLowerCase,VE=RegExp.prototype.test,DE=Array.prototype.concat,An=Array.prototype.join,PD=Array.prototype.slice,NE=Math.floor,Wm=typeof BigInt=="function"?BigInt.prototype.valueOf:null,zm=Object.getOwnPropertySymbols,qm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Us=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ot=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Us||!0)?Symbol.toStringTag:null,WE=Object.prototype.propertyIsEnumerable,BE=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function jE(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||VE.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-NE(-e):NE(e);if(n!==e){var i=String(n),a=Qm.call(t,i.length+1);return Mi.call(i,r,"$&_")+"."+Mi.call(Mi.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Mi.call(t,r,"$&_")}var Ym=OE(),HE=Ym.custom,UE=YE(HE)?HE:null;KE.exports=function e(t,r,n,i){var a=r||{};if(Ri(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ri(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Ri(a,"customInspect")?a.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ri(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ri(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=a.numericSeparator;if(typeof t=="undefined")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return ZE(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return o?jE(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return o?jE(t,c):c}var u=typeof a.depth=="undefined"?5:a.depth;if(typeof n=="undefined"&&(n=0),n>=u&&u>0&&typeof t=="object")return Xm(t)?"[Array]":"[Object]";var f=qD(a,n);if(typeof i=="undefined")i=[];else if(XE(i,t)>=0)return"[Circular]";function d(N,L,ee){if(L&&(i=PD.call(i),i.push(L)),ee){var fe={depth:a.depth};return Ri(a,"quoteStyle")&&(fe.quoteStyle=a.quoteStyle),e(N,fe,n+1,i)}return e(N,a,n+1,i)}if(typeof t=="function"&&!GE(t)){var h=ND(t),p=cf(t,d);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(p.length>0?" { "+An.call(p,", ")+" }":"")}if(YE(t)){var m=Us?Mi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):qm.call(t);return typeof t=="object"&&!Us?Ul(m):m}if(zD(t)){for(var v="<"+LE.call(String(t.nodeName)),y=t.attributes||[],b=0;b",v}if(Xm(t)){if(t.length===0)return"[]";var x=cf(t,d);return f&&!WD(x)?"["+Zm(x,f)+"]":"[ "+An.call(x,", ")+" ]"}if(OD(t)){var E=cf(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!WE.call(t,"cause")?"{ ["+String(t)+"] "+An.call(DE.call("[cause]: "+d(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+An.call(E,", ")+" }"}if(typeof t=="object"&&s){if(UE&&typeof t[UE]=="function"&&Ym)return Ym(t,{depth:u-n});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(BD(t)){var _=[];return IE&&IE.call(t,function(N,L){_.push(d(L,t,!0)+" => "+d(N,t))}),zE("Map",uf.call(t),_,f)}if(UD(t)){var k=[];return FE&&FE.call(t,function(N){k.push(d(N,t))}),zE("Set",ff.call(t),k,f)}if(jD(t))return Vm("WeakMap");if(GD(t))return Vm("WeakSet");if(HD(t))return Vm("WeakRef");if(FD(t))return Ul(d(Number(t)));if(LD(t))return Ul(d(Wm.call(t)));if($D(t))return Ul(ED.call(t));if(ID(t))return Ul(d(String(t)));if(typeof window!="undefined"&&t===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&t===globalThis||typeof global!="undefined"&&t===global)return"{ [object globalThis] }";if(!MD(t)&&!GE(t)){var w=cf(t,d),A=BE?BE(t)===Object.prototype:t instanceof Object||t.constructor===Object,S=t instanceof Object?"":"null prototype",T=!A&&Ot&&Object(t)===t&&Ot in t?Qm.call(Oi(t),8,-1):S?"Object":"",P=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",I=P+(T||S?"["+An.call(DE.call([],T||[],S||[]),": ")+"] ":"");return w.length===0?I+"{}":f?I+"{"+Zm(w,f)+"}":I+"{ "+An.call(w,", ")+" }"}return String(t)};function qE(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function RD(e){return Mi.call(String(e),/"/g,""")}function Xm(e){return Oi(e)==="[object Array]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function MD(e){return Oi(e)==="[object Date]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function GE(e){return Oi(e)==="[object RegExp]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function OD(e){return Oi(e)==="[object Error]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function ID(e){return Oi(e)==="[object String]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function FD(e){return Oi(e)==="[object Number]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function $D(e){return Oi(e)==="[object Boolean]"&&(!Ot||!(typeof e=="object"&&Ot in e))}function YE(e){if(Us)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!qm)return!1;try{return qm.call(e),!0}catch(t){}return!1}function LD(e){if(!e||typeof e!="object"||!Wm)return!1;try{return Wm.call(e),!0}catch(t){}return!1}var DD=Object.prototype.hasOwnProperty||function(e){return e in this};function Ri(e,t){return DD.call(e,t)}function Oi(e){return AD.call(e)}function ND(e){if(e.name)return e.name;var t=TD.call(kD.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function XE(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return ZE(Qm.call(e,0,t.maxStringLength),t)+n}var i=Mi.call(Mi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,VD);return qE(i,"single",t)}function VD(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+CD.call(t.toString(16))}function Ul(e){return"Object("+e+")"}function Vm(e){return e+" { ? }"}function zE(e,t,r,n){var i=n?Zm(r,n):An.call(r,", ");return e+" ("+t+") {"+i+"}"}function WD(e){for(var t=0;t=0)return!1;return!0}function qD(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=An.call(Array(e.indent+1)," ");else return null;return{base:r,prev:An.call(Array(t+1),r)}}function Zm(e,t){if(e.length===0)return"";var r=` +`+t.prev+t.base;return r+An.call(e,","+r)+` +`+t.prev}function cf(e,t){var r=Xm(e),n=[];if(r){n.length=e.length;for(var i=0;i{"use strict";g();var QE=tn(),Gs=br(),YD=JE(),XD=Xn(),df=QE("%WeakMap%",!0),hf=QE("%Map%",!0),ZD=Gs("WeakMap.prototype.get",!0),KD=Gs("WeakMap.prototype.set",!0),JD=Gs("WeakMap.prototype.has",!0),QD=Gs("Map.prototype.get",!0),eN=Gs("Map.prototype.set",!0),tN=Gs("Map.prototype.has",!0),eg=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},rN=function(e,t){var r=eg(e,t);return r&&r.value},nN=function(e,t,r){var n=eg(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},iN=function(e,t){return!!eg(e,t)};eA.exports=function(){var t,r,n,i={assert:function(a){if(!i.has(a))throw new XD("Side channel does not contain "+YD(a))},get:function(a){if(df&&a&&(typeof a=="object"||typeof a=="function")){if(t)return ZD(t,a)}else if(hf){if(r)return QD(r,a)}else if(n)return rN(n,a)},has:function(a){if(df&&a&&(typeof a=="object"||typeof a=="function")){if(t)return JD(t,a)}else if(hf){if(r)return tN(r,a)}else if(n)return iN(n,a);return!1},set:function(a,s){df&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new df),KD(t,a,s)):hf?(r||(r=new hf),eN(r,a,s)):(n||(n={key:{},next:null}),nN(n,a,s))}};return i}});var rA=F((MV,tA)=>{"use strict";g();var aN=Rm(),Vl=tg()(),Zn=Xn(),rg={assert:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");if(Vl.assert(e),!rg.has(e,t))throw new Zn("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");var r=Vl.get(e);return r&&r["$"+t]},has:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");var r=Vl.get(e);return!!r&&aN(r,"$"+t)},set:function(e,t,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Zn("`O` is not an object");if(typeof t!="string")throw new Zn("`slot` must be a string");var n=Vl.get(e);n||(n={},Vl.set(e,n)),n["$"+t]=r}};Object.freeze&&Object.freeze(rg);tA.exports=rg});var aA=F((IV,iA)=>{"use strict";g();var Wl=rA(),sN=SyntaxError,nA=typeof StopIteration=="object"?StopIteration:null;iA.exports=function(t){if(!nA)throw new sN("this environment lacks StopIteration");Wl.set(t,"[[Done]]",!1);var r={next:function(){var i=Wl.get(this,"[[Iterator]]"),a=Wl.get(i,"[[Done]]");try{return{done:a,value:a?void 0:i.next()}}catch(s){if(Wl.set(i,"[[Done]]",!0),s!==nA)throw s;return{done:!0,value:void 0}}}};return Wl.set(r,"[[Iterator]]",t),r}});var ng=F(($V,sA)=>{g();var oN={}.toString;sA.exports=Array.isArray||function(e){return oN.call(e)=="[object Array]"}});var ig=F((DV,oA)=>{"use strict";g();var lN=String.prototype.valueOf,cN=function(t){try{return lN.call(t),!0}catch(r){return!1}},uN=Object.prototype.toString,fN="[object String]",dN=Pi()();oA.exports=function(t){return typeof t=="string"?!0:typeof t!="object"?!1:dN?cN(t):uN.call(t)===fN}});var sg=F((BV,uA)=>{"use strict";g();var ag=typeof Map=="function"&&Map.prototype?Map:null,hN=typeof Set=="function"&&Set.prototype?Set:null,pf;ag||(pf=function(t){return!1});var cA=ag?Map.prototype.has:null,lA=hN?Set.prototype.has:null;!pf&&!cA&&(pf=function(t){return!1});uA.exports=pf||function(t){if(!t||typeof t!="object")return!1;try{if(cA.call(t),lA)try{lA.call(t)}catch(r){return!0}return t instanceof ag}catch(r){}return!1}});var lg=F((HV,hA)=>{"use strict";g();var pN=typeof Map=="function"&&Map.prototype?Map:null,og=typeof Set=="function"&&Set.prototype?Set:null,mf;og||(mf=function(t){return!1});var fA=pN?Map.prototype.has:null,dA=og?Set.prototype.has:null;!mf&&!dA&&(mf=function(t){return!1});hA.exports=mf||function(t){if(!t||typeof t!="object")return!1;try{if(dA.call(t),fA)try{fA.call(t)}catch(r){return!0}return t instanceof og}catch(r){}return!1}});var AA=F((GV,yf)=>{"use strict";g();var pA=Hm(),mA=aA();Xu()()||Nl()()?(gf=Symbol.iterator,yf.exports=function(t){if(t!=null&&typeof t[gf]!="undefined")return t[gf]();if(pA(t))return Array.prototype[gf].call(t)}):(gA=ng(),vA=ig(),cg=tn(),yA=cg("%Map%",!0),wA=cg("%Set%",!0),Dr=br(),ug=Dr("Array.prototype.push"),fg=Dr("String.prototype.charCodeAt"),bA=Dr("String.prototype.slice"),_A=function(t,r){var n=t.length;if(r+1>=n)return r+1;var i=fg(t,r);if(i<55296||i>56319)return r+1;var a=fg(t,r+1);return a<56320||a>57343?r+1:r+2},vf=function(t){var r=0;return{next:function(){var i=r>=t.length,a;return i||(a=t[r],r+=1),{done:i,value:a}}}},dg=function(t,r){if(gA(t)||pA(t))return vf(t);if(vA(t)){var n=0;return{next:function(){var a=_A(t,n),s=bA(t,n,a);return n=a,{done:a>t.length,value:s}}}}if(r&&typeof t["_es6-shim iterator_"]!="undefined")return t["_es6-shim iterator_"]()},!yA&&!wA?yf.exports=function(t){if(t!=null)return dg(t,!0)}:(xA=sg(),SA=lg(),hg=Dr("Map.prototype.forEach",!0),pg=Dr("Set.prototype.forEach",!0),(typeof process=="undefined"||!process.versions||!process.versions.node)&&(mg=Dr("Map.prototype.iterator",!0),gg=Dr("Set.prototype.iterator",!0)),vg=Dr("Map.prototype.@@iterator",!0)||Dr("Map.prototype._es6-shim iterator_",!0),yg=Dr("Set.prototype.@@iterator",!0)||Dr("Set.prototype._es6-shim iterator_",!0),EA=function(t){if(xA(t)){if(mg)return mA(mg(t));if(vg)return vg(t);if(hg){var r=[];return hg(t,function(i,a){ug(r,[a,i])}),vf(r)}}if(SA(t)){if(gg)return mA(gg(t));if(yg)return yg(t);if(pg){var n=[];return pg(t,function(i){ug(n,i)}),vf(n)}}},yf.exports=function(t){return EA(t)||dg(t)}));var gf,gA,vA,cg,yA,wA,Dr,ug,fg,bA,_A,vf,dg,xA,SA,hg,pg,mg,gg,vg,yg,EA});var wg=F((VV,TA)=>{"use strict";g();var kA=function(e){return e!==e};TA.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||kA(t)&&kA(r))}});var bg=F((qV,CA)=>{"use strict";g();var mN=wg();CA.exports=function(){return typeof Object.is=="function"?Object.is:mN}});var RA=F((XV,PA)=>{"use strict";g();var gN=bg(),vN=Ci();PA.exports=function(){var t=gN();return vN(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var FA=F((KV,IA)=>{"use strict";g();var yN=Ci(),wN=xa(),bN=wg(),MA=bg(),_N=RA(),OA=wN(MA(),Object);yN(OA,{getPolyfill:MA,implementation:bN,shim:_N});IA.exports=OA});var xg=F((QV,NA)=>{"use strict";g();var xN=xa(),DA=br(),SN=tn(),_g=SN("%ArrayBuffer%",!0),wf=DA("ArrayBuffer.prototype.byteLength",!0),EN=DA("Object.prototype.toString"),$A=!!_g&&!wf&&new _g(0).slice,LA=!!$A&&xN($A);NA.exports=wf||LA?function(t){if(!t||typeof t!="object")return!1;try{return wf?wf(t):LA(t,0),!0}catch(r){return!1}}:_g?function(t){return EN(t)==="[object ArrayBuffer]"}:function(t){return!1}});var jA=F((tW,BA)=>{"use strict";g();var AN=Date.prototype.getDay,kN=function(t){try{return AN.call(t),!0}catch(r){return!1}},TN=Object.prototype.toString,CN="[object Date]",PN=Pi()();BA.exports=function(t){return typeof t!="object"||t===null?!1:PN?kN(t):TN.call(t)===CN}});var VA=F((nW,zA)=>{"use strict";g();var Sg=br(),HA=Pi()(),UA,GA,Eg,Ag;HA&&(UA=Sg("Object.prototype.hasOwnProperty"),GA=Sg("RegExp.prototype.exec"),Eg={},bf=function(){throw Eg},Ag={toString:bf,valueOf:bf},typeof Symbol.toPrimitive=="symbol"&&(Ag[Symbol.toPrimitive]=bf));var bf,RN=Sg("Object.prototype.toString"),MN=Object.getOwnPropertyDescriptor,ON="[object RegExp]";zA.exports=HA?function(t){if(!t||typeof t!="object")return!1;var r=MN(t,"lastIndex"),n=r&&UA(r,"value");if(!n)return!1;try{GA(t,Ag)}catch(i){return i===Eg}}:function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:RN(t)===ON}});var YA=F((aW,qA)=>{"use strict";g();var IN=br(),WA=IN("SharedArrayBuffer.prototype.byteLength",!0);qA.exports=WA?function(t){if(!t||typeof t!="object")return!1;try{return WA(t),!0}catch(r){return!1}}:function(t){return!1}});var ZA=F((oW,XA)=>{"use strict";g();var FN=Number.prototype.toString,$N=function(t){try{return FN.call(t),!0}catch(r){return!1}},LN=Object.prototype.toString,DN="[object Number]",NN=Pi()();XA.exports=function(t){return typeof t=="number"?!0:typeof t!="object"?!1:NN?$N(t):LN.call(t)===DN}});var QA=F((cW,JA)=>{"use strict";g();var KA=br(),BN=KA("Boolean.prototype.toString"),jN=KA("Object.prototype.toString"),HN=function(t){try{return BN(t),!0}catch(r){return!1}},UN="[object Boolean]",GN=Pi()();JA.exports=function(t){return typeof t=="boolean"?!0:t===null||typeof t!="object"?!1:GN&&Symbol.toStringTag in t?HN(t):jN(t)===UN}});var nk=F((fW,kg)=>{"use strict";g();var zN=Object.prototype.toString,VN=Xu()();VN?(ek=Symbol.prototype.toString,tk=/^Symbol\(.*\)$/,rk=function(t){return typeof t.valueOf()!="symbol"?!1:tk.test(ek.call(t))},kg.exports=function(t){if(typeof t=="symbol")return!0;if(zN.call(t)!=="[object Symbol]")return!1;try{return rk(t)}catch(r){return!1}}):kg.exports=function(t){return!1};var ek,tk,rk});var sk=F((hW,ak)=>{"use strict";g();var ik=typeof BigInt!="undefined"&&BigInt;ak.exports=function(){return typeof ik=="function"&&typeof BigInt=="function"&&typeof ik(42)=="bigint"&&typeof BigInt(42)=="bigint"}});var ck=F((mW,Tg)=>{"use strict";g();var WN=sk()();WN?(ok=BigInt.prototype.valueOf,lk=function(t){try{return ok.call(t),!0}catch(r){}return!1},Tg.exports=function(t){return t===null||typeof t=="undefined"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:lk(t)}):Tg.exports=function(t){return!1};var ok,lk});var fk=F((vW,uk)=>{"use strict";g();var qN=ig(),YN=ZA(),XN=QA(),ZN=nk(),KN=ck();uk.exports=function(t){if(t==null||typeof t!="object"&&typeof t!="function")return null;if(qN(t))return"String";if(YN(t))return"Number";if(XN(t))return"Boolean";if(ZN(t))return"Symbol";if(KN(t))return"BigInt"}});var pk=F((wW,hk)=>{"use strict";g();var _f=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,dk=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,xf;_f||(xf=function(t){return!1});var Pg=_f?_f.prototype.has:null,Cg=dk?dk.prototype.has:null;!xf&&!Pg&&(xf=function(t){return!1});hk.exports=xf||function(t){if(!t||typeof t!="object")return!1;try{if(Pg.call(t,Pg),Cg)try{Cg.call(t,Cg)}catch(r){return!0}return t instanceof _f}catch(r){}return!1}});var gk=F((_W,Mg)=>{"use strict";g();var JN=tn(),mk=br(),QN=JN("%WeakSet%",!0),Rg=mk("WeakSet.prototype.has",!0);Rg?(Sf=mk("WeakMap.prototype.has",!0),Mg.exports=function(t){if(!t||typeof t!="object")return!1;try{if(Rg(t,Rg),Sf)try{Sf(t,Sf)}catch(r){return!0}return t instanceof QN}catch(r){}return!1}):Mg.exports=function(t){return!1};var Sf});var yk=F((SW,vk)=>{"use strict";g();var eB=sg(),tB=lg(),rB=pk(),nB=gk();vk.exports=function(t){if(t&&typeof t=="object"){if(eB(t))return"Map";if(tB(t))return"Set";if(rB(t))return"WeakMap";if(nB(t))return"WeakSet"}return!1}});var xk=F((AW,_k)=>{"use strict";g();var bk=Function.prototype.toString,zs=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ig,Ef;if(typeof zs=="function"&&typeof Object.defineProperty=="function")try{Ig=Object.defineProperty({},"length",{get:function(){throw Ef}}),Ef={},zs(function(){throw 42},null,Ig)}catch(e){e!==Ef&&(zs=null)}else zs=null;var iB=/^\s*class\b/,Fg=function(t){try{var r=bk.call(t);return iB.test(r)}catch(n){return!1}},Og=function(t){try{return Fg(t)?!1:(bk.call(t),!0)}catch(r){return!1}},Af=Object.prototype.toString,aB="[object Object]",sB="[object Function]",oB="[object GeneratorFunction]",lB="[object HTMLAllCollection]",cB="[object HTML document.all class]",uB="[object HTMLCollection]",fB=typeof Symbol=="function"&&!!Symbol.toStringTag,dB=!(0 in[,]),$g=function(){return!1};typeof document=="object"&&(wk=document.all,Af.call(wk)===Af.call(document.all)&&($g=function(t){if((dB||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=Af.call(t);return(r===lB||r===cB||r===uB||r===aB)&&t("")==null}catch(n){}return!1}));var wk;_k.exports=zs?function(t){if($g(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{zs(t,null,Ig)}catch(r){if(r!==Ef)return!1}return!Fg(t)&&Og(t)}:function(t){if($g(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(fB)return Og(t);if(Fg(t))return!1;var r=Af.call(t);return r!==sB&&r!==oB&&!/^\[object HTML/.test(r)?!1:Og(t)}});var Ak=F((TW,Ek)=>{"use strict";g();var hB=xk(),pB=Object.prototype.toString,Sk=Object.prototype.hasOwnProperty,mB=function(t,r,n){for(var i=0,a=t.length;i=3&&(i=n),pB.call(t)==="[object Array]"?mB(t,r,i):typeof t=="string"?gB(t,r,i):vB(t,r,i)};Ek.exports=yB});var Tk=F((PW,kk)=>{"use strict";g();kk.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var Pk=F((MW,Ck)=>{"use strict";g();var Lg=Tk(),wB=typeof globalThis=="undefined"?global:globalThis;Ck.exports=function(){for(var t=[],r=0;r{"use strict";g();var Tf=Ak(),bB=Pk(),Rk=xa(),Bg=br(),kf=rf(),_B=Bg("Object.prototype.toString"),Ok=Pi()(),Mk=typeof globalThis=="undefined"?global:globalThis,Ng=bB(),jg=Bg("String.prototype.slice"),Dg=Object.getPrototypeOf,xB=Bg("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:EB(t)}return kf?SB(t):null}});var Dk=F(($W,Lk)=>{"use strict";g();var AB=br(),$k=AB("ArrayBuffer.prototype.byteLength",!0),kB=xg();Lk.exports=function(t){return kB(t)?$k?$k(t):t.byteLength:NaN}});var lT=F((DW,oT)=>{"use strict";g();var iT=pE(),kn=br(),Nk=CE(),TB=tn(),Vs=AA(),CB=tg(),Bk=FA(),jk=Hm(),Hk=ng(),Uk=xg(),Gk=jA(),zk=VA(),Vk=YA(),Wk=Yu(),qk=fk(),Yk=yk(),Xk=Fk(),Zk=Dk(),Kk=kn("SharedArrayBuffer.prototype.byteLength",!0),Jk=kn("Date.prototype.getTime"),Hg=Object.getPrototypeOf,Qk=kn("Object.prototype.toString"),Rf=TB("%Set%",!0),Ug=kn("Map.prototype.has",!0),Mf=kn("Map.prototype.get",!0),eT=kn("Map.prototype.size",!0),Of=kn("Set.prototype.add",!0),aT=kn("Set.prototype.delete",!0),If=kn("Set.prototype.has",!0),Pf=kn("Set.prototype.size",!0);function tT(e,t,r,n){for(var i=Vs(e),a;(a=i.next())&&!a.done;)if(rn(t,a.value,r,n))return aT(e,a.value),!0;return!1}function sT(e){if(typeof e=="undefined")return null;if(typeof e!="object")return typeof e=="symbol"?!1:typeof e=="string"||typeof e=="number"?+e==+e:!0}function PB(e,t,r,n,i,a){var s=sT(r);if(s!=null)return s;var o=Mf(t,s),l=iT({},i,{strict:!1});return typeof o=="undefined"&&!Ug(t,s)||!rn(n,o,l,a)?!1:!Ug(e,s)&&rn(n,o,l,a)}function RB(e,t,r){var n=sT(r);return n!=null?n:If(t,n)&&!If(e,n)}function rT(e,t,r,n,i,a){for(var s=Vs(e),o,l;(o=s.next())&&!o.done;)if(l=o.value,rn(r,l,i,a)&&rn(n,Mf(t,l),i,a))return aT(e,l),!0;return!1}function rn(e,t,r,n){var i=r||{};if(i.strict?Bk(e,t):e===t)return!0;var a=qk(e),s=qk(t);if(a!==s)return!1;if(!e||!t||typeof e!="object"&&typeof t!="object")return i.strict?Bk(e,t):e==t;var o=n.has(e),l=n.has(t),c;if(o&&l){if(n.get(e)===n.get(t))return!0}else c={};return o||n.set(e,c),l||n.set(t,c),IB(e,t,i,n)}function nT(e){return!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}function MB(e,t,r,n){if(Pf(e)!==Pf(t))return!1;for(var i=Vs(e),a=Vs(t),s,o,l;(s=i.next())&&!s.done;)if(s.value&&typeof s.value=="object")l||(l=new Rf),Of(l,s.value);else if(!If(t,s.value)){if(r.strict||!RB(e,t,s.value))return!1;l||(l=new Rf),Of(l,s.value)}if(l){for(;(o=a.next())&&!o.done;)if(o.value&&typeof o.value=="object"){if(!tT(l,o.value,r.strict,n))return!1}else if(!r.strict&&!If(e,o.value)&&!tT(l,o.value,r.strict,n))return!1;return Pf(l)===0}return!0}function OB(e,t,r,n){if(eT(e)!==eT(t))return!1;for(var i=Vs(e),a=Vs(t),s,o,l,c,u,f;(s=i.next())&&!s.done;)if(c=s.value[0],u=s.value[1],c&&typeof c=="object")l||(l=new Rf),Of(l,c);else if(f=Mf(t,c),typeof f=="undefined"&&!Ug(t,c)||!rn(u,f,r,n)){if(r.strict||!PB(e,t,c,u,r,n))return!1;l||(l=new Rf),Of(l,c)}if(l){for(;(o=a.next())&&!o.done;)if(c=o.value[0],f=o.value[1],c&&typeof c=="object"){if(!rT(l,e,c,f,r,n))return!1}else if(!r.strict&&(!e.has(c)||!rn(Mf(e,c),f,r,n))&&!rT(l,e,c,f,iT({},r,{strict:!1}),n))return!1;return Pf(l)===0}return!0}function IB(e,t,r,n){var i,a;if(typeof e!=typeof t||e==null||t==null||Qk(e)!==Qk(t)||jk(e)!==jk(t))return!1;var s=Hk(e),o=Hk(t);if(s!==o)return!1;var l=e instanceof Error,c=t instanceof Error;if(l!==c||(l||c)&&(e.name!==t.name||e.message!==t.message))return!1;var u=zk(e),f=zk(t);if(u!==f||(u||f)&&(e.source!==t.source||Nk(e)!==Nk(t)))return!1;var d=Gk(e),h=Gk(t);if(d!==h||(d||h)&&Jk(e)!==Jk(t)||r.strict&&Hg&&Hg(e)!==Hg(t))return!1;var p=Xk(e),m=Xk(t);if(p!==m)return!1;if(p||m){if(e.length!==t.length)return!1;for(i=0;i=0;i--)if(k[i]!=w[i])return!1;for(i=k.length-1;i>=0;i--)if(a=k[i],!rn(e[a],t[a],r,n))return!1;var A=Yk(e),S=Yk(t);return A!==S?!1:A==="Set"||S==="Set"?MB(e,t,r,n):A==="Map"?OB(e,t,r,n):!0}oT.exports=function(t,r,n){return rn(t,r,n,CB())}});var Zg=F((exports,module)=>{g();(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=typeof define=="function"&&define.amd,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer!="undefined",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(r){return new Sha256(t,!0).update(r)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(i){return t.create().update(i)};for(var r=0;r>2]|=e[i]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|n&63)<=57344?(o[a>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|n&63)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|n&63)<=64?(this.block=o[16],this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,s=this.h6,o=this.h7,l=this.blocks,c,u,f,d,h,p,m,v,y,b,x;for(c=16;c<64;++c)h=l[c-15],u=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,h=l[c-2],f=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,l[c]=l[c-16]+u+l[c-7]+f<<0;for(x=t&r,c=0;c<64;c+=4)this.first?(this.is224?(v=300032,h=l[0]-1413257819,o=h-150054599<<0,n=h+24177077<<0):(v=704751109,h=l[0]-210244248,o=h-1521486534<<0,n=h+143694565<<0),this.first=!1):(u=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),f=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),v=e&t,d=v^e&r^x,m=i&a^~i&s,h=o+f+m+K[c]+l[c],p=u+d,o=n+h<<0,n=h+p<<0),u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),f=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),y=n&e,d=y^n&t^v,m=o&i^~o&a,h=s+f+m+K[c+1]+l[c+1],p=u+d,s=r+h<<0,r=h+p<<0,u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),f=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),b=r&n,d=b^r&e^y,m=s&o^~s&i,h=a+f+m+K[c+2]+l[c+2],p=u+d,a=t+h<<0,t=h+p<<0,u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),f=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),x=t&r,d=x^t&n^b,m=a&s^~a&o,h=i+f+m+K[c+3]+l[c+3],p=u+d,i=e+h<<0,e=h+p<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+r<<0,this.h3=this.h3+n<<0,this.h4=this.h4+i<<0,this.h5=this.h5+a<<0,this.h6=this.h6+s<<0,this.h7=this.h7+o<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,s=this.h6,o=this.h7,l=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[a&15]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[s&15];return this.is224||(l+=HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[o&15]),l},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,i=this.h4,a=this.h5,s=this.h6,o=this.h7,l=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,r>>24&255,r>>16&255,r>>8&255,r&255,n>>24&255,n>>16&255,n>>8&255,n&255,i>>24&255,i>>16&255,i>>8&255,i&255,a>>24&255,a>>16&255,a>>8&255,a&255,s>>24&255,s>>16&255,s>>8&255,s&255];return this.is224||l.push(o>>24&255,o>>16&255,o>>8&255,o&255),l},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function HmacSha256(e,t,r){var n,i=typeof e;if(i==="string"){var a=[],s=e.length,o=0,l;for(n=0;n>6,a[o++]=128|l&63):l<55296||l>=57344?(a[o++]=224|l>>12,a[o++]=128|l>>6&63,a[o++]=128|l&63):(l=65536+((l&1023)<<10|e.charCodeAt(++n)&1023),a[o++]=240|l>>18,a[o++]=128|l>>12&63,a[o++]=128|l>>6&63,a[o++]=128|l&63);e=a}else if(i==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);e.length>64&&(e=new Sha256(t,!0).update(e).array());var c=[],u=[];for(n=0;n<64;++n){var f=e[n]||0;c[n]=92^f,u[n]=54^f}Sha256.call(this,t,r),this.update(u),this.oKeyPad=c,this.inner=!0,this.sharedMemory=r}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&define(function(){return exports}))})()});var RC=F(A0=>{g();(function(e){var t=/\S/,r=/\"/g,n=/\n/g,i=/\r/g,a=/\\/g,s=/\u2028/,o=/\u2029/;e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(A,S){var T=A.length,P=0,I=1,N=2,L=P,ee=null,fe=null,J="",Q=[],Pe=!1,ge=0,z=0,Y="{{",O="}}";function he(){J.length>0&&(Q.push({tag:"_t",text:new String(J)}),J="")}function Ge(){for(var ct=!0,rt=z;rt"&&(Ie.indent=Q[Et].text.toString()),Q.splice(Et,1));else rt||Q.push({tag:` +`});Pe=!1,z=Q.length}function Re(ct,rt){var Et="="+O,Ie=ct.indexOf(Et,rt),H=c(ct.substring(ct.indexOf("=",rt)+1,Ie)).split(" ");return Y=H[0],O=H[H.length-1],Ie+Et.length-1}for(S&&(S=S.split(" "),Y=S[0],O=S[1]),ge=0;ge0;){if(L=w.shift(),N&&N.tag=="<"&&!(L.tag in f))throw new Error("Illegal content in < super tag.");if(e.tags[L.tag]<=e.tags.$||h(L,T))S.push(L),L.nodes=d(w,L.tag,S,T);else if(L.tag=="/"){if(S.length===0)throw new Error("Closing tag without opener: /"+L.n);if(I=S.pop(),L.n!=I.n&&!p(L.n,I.n,T))throw new Error("Nesting error: "+I.n+" vs. "+L.n);return I.end=L.i,P}else L.tag==` +`&&(L.last=w.length==0||w[0].tag==` +`);P.push(L)}if(S.length>0)throw new Error("missing closing tag: "+S.pop().n);return P}function h(w,A){for(var S=0,T=A.length;S":E,"<":function(w,A){var S={partials:{},code:"",subs:{},inPartial:!0};e.walk(w.nodes,S);var T=A.partials[E(w,A)];T.subs=S.subs,T.partials=S.partials},$:function(w,A){var S={subs:{},code:"",partials:A.partials,prefix:w.n};e.walk(w.nodes,S),A.subs[w.n]=S.code,A.inPartial||(A.code+='t.sub("'+b(w.n)+'",c,p,i);')},"\n":function(w,A){A.code+=k('"\\n"'+(w.last?"":" + i"))},_v:function(w,A){A.code+="t.b(t.v(t."+x(w.n)+'("'+b(w.n)+'",c,p,0)));'},_t:function(w,A){A.code+=k('"'+b(w.text)+'"')},"{":_,"&":_};function _(w,A){A.code+="t.b(t.t(t."+x(w.n)+'("'+b(w.n)+'",c,p,0)));'}function k(w){return"t.b("+w+");"}e.walk=function(w,A){for(var S,T=0,P=w.length;T{g();var Wj={};(function(e){e.Template=function(d,h,p,m){d=d||{},this.r=d.code||this.r,this.c=p,this.options=m||{},this.text=h||"",this.partials=d.partials||{},this.subs=d.subs||{},this.buf=""},e.Template.prototype={r:function(d,h,p){return""},v:u,t:c,render:function(h,p,m){return this.ri([h],p||{},m)},ri:function(d,h,p){return this.r(d,h,p)},ep:function(d,h){var p=this.partials[d],m=h[p.name];if(p.instance&&p.base==m)return p.instance;if(typeof m=="string"){if(!this.c)throw new Error("No compiler available.");m=this.c.compile(m,this.options)}if(!m)return null;if(this.partials[d].base=m,p.subs){h.stackText||(h.stackText={});for(key in p.subs)h.stackText[key]||(h.stackText[key]=this.activeSub!==void 0&&h.stackText[this.activeSub]?h.stackText[this.activeSub]:this.text);m=r(m,p.subs,p.partials,this.stackSubs,this.stackPartials,h.stackText)}return this.partials[d].instance=m,m},rp:function(d,h,p,m){var v=this.ep(d,p);return v?v.ri(h,p,m):""},rs:function(d,h,p){var m=d[d.length-1];if(!f(m)){p(d,h,this);return}for(var v=0;v=0;E--)if(y=h[E],v=t(d,y,x),v!==void 0){b=!0;break}return b?(!m&&typeof v=="function"&&(v=this.mv(v,h,p)),v):m?!1:""},ls:function(d,h,p,m,v){var y=this.options.delimiters;return this.options.delimiters=v,this.b(this.ct(c(d.call(h,m)),h,p)),this.options.delimiters=y,!1},ct:function(d,h,p){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(d,this.options).render(h,p)},b:function(d){this.buf+=d},fl:function(){var d=this.buf;return this.buf="",d},ms:function(d,h,p,m,v,y,b){var x,E=h[h.length-1],_=d.call(E);return typeof _=="function"?m?!0:(x=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(_,E,p,x.substring(v,y),b)):_},mv:function(d,h,p){var m=h[h.length-1],v=d.call(m);return typeof v=="function"?this.ct(c(v.call(m)),m,p):v},sub:function(d,h,p,m){var v=this.subs[d];v&&(this.activeSub=d,v(h,p,this,m),this.activeSub=!1)}};function t(d,h,p){var m;return h&&typeof h=="object"&&(h[d]!==void 0?m=h[d]:p&&h.get&&typeof h.get=="function"&&(m=h.get(d))),m}function r(d,h,p,m,v,y){function b(){}b.prototype=d;function x(){}x.prototype=d.subs;var E,_=new b;_.subs=new x,_.subsText={},_.buf="",m=m||{},_.stackSubs=m,_.subsText=y;for(E in h)m[E]||(m[E]=h[E]);for(E in m)_.subs[E]=m[E];v=v||{},_.stackPartials=v;for(E in p)v[E]||(v[E]=p[E]);for(E in v)_.partials[E]=v[E];return _}var n=/&/g,i=//g,s=/\'/g,o=/\"/g,l=/[&<>\"\']/;function c(d){return String(d==null?"":d)}function u(d){return d=c(d),l.test(d)?d.replace(n,"&").replace(i,"<").replace(a,">").replace(s,"'").replace(o,"""):d}var f=Array.isArray||function(d){return Object.prototype.toString.call(d)==="[object Array]"}})(typeof k0!="undefined"?k0:Wj)});var T0=F((WX,OC)=>{g();var hd=RC();hd.Template=MC().Template;hd.template=hd.Template;OC.exports=hd});var MP=F((xc,$v)=>{g();(function(t,r){typeof xc=="object"&&typeof $v=="object"?$v.exports=r():typeof define=="function"&&define.amd?define([],r):typeof xc=="object"?xc.feather=r():t.feather=r()})(typeof self!="undefined"?self:xc,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.r=function(n){Object.defineProperty(n,"__esModule",{value:!0})},r.n=function(n){var i=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=0)}({"./dist/icons.json":function(e){e.exports={activity:'',airplay:'',"alert-circle":'',"alert-octagon":'',"alert-triangle":'',"align-center":'',"align-justify":'',"align-left":'',"align-right":'',anchor:'',aperture:'',archive:'',"arrow-down-circle":'',"arrow-down-left":'',"arrow-down-right":'',"arrow-down":'',"arrow-left-circle":'',"arrow-left":'',"arrow-right-circle":'',"arrow-right":'',"arrow-up-circle":'',"arrow-up-left":'',"arrow-up-right":'',"arrow-up":'',"at-sign":'',award:'',"bar-chart-2":'',"bar-chart":'',"battery-charging":'',battery:'',"bell-off":'',bell:'',bluetooth:'',bold:'',"book-open":'',book:'',bookmark:'',box:'',briefcase:'',calendar:'',"camera-off":'',camera:'',cast:'',"check-circle":'',"check-square":'',check:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',"chevrons-down":'',"chevrons-left":'',"chevrons-right":'',"chevrons-up":'',chrome:'',circle:'',clipboard:'',clock:'',"cloud-drizzle":'',"cloud-lightning":'',"cloud-off":'',"cloud-rain":'',"cloud-snow":'',cloud:'',code:'',codepen:'',codesandbox:'',coffee:'',columns:'',command:'',compass:'',copy:'',"corner-down-left":'',"corner-down-right":'',"corner-left-down":'',"corner-left-up":'',"corner-right-down":'',"corner-right-up":'',"corner-up-left":'',"corner-up-right":'',cpu:'',"credit-card":'',crop:'',crosshair:'',database:'',delete:'',disc:'',"divide-circle":'',"divide-square":'',divide:'',"dollar-sign":'',"download-cloud":'',download:'',dribbble:'',droplet:'',"edit-2":'',"edit-3":'',edit:'',"external-link":'',"eye-off":'',eye:'',facebook:'',"fast-forward":'',feather:'',figma:'',"file-minus":'',"file-plus":'',"file-text":'',file:'',film:'',filter:'',flag:'',"folder-minus":'',"folder-plus":'',folder:'',framer:'',frown:'',gift:'',"git-branch":'',"git-commit":'',"git-merge":'',"git-pull-request":'',github:'',gitlab:'',globe:'',grid:'',"hard-drive":'',hash:'',headphones:'',heart:'',"help-circle":'',hexagon:'',home:'',image:'',inbox:'',info:'',instagram:'',italic:'',key:'',layers:'',layout:'',"life-buoy":'',"link-2":'',link:'',linkedin:'',list:'',loader:'',lock:'',"log-in":'',"log-out":'',mail:'',"map-pin":'',map:'',"maximize-2":'',maximize:'',meh:'',menu:'',"message-circle":'',"message-square":'',"mic-off":'',mic:'',"minimize-2":'',minimize:'',"minus-circle":'',"minus-square":'',minus:'',monitor:'',moon:'',"more-horizontal":'',"more-vertical":'',"mouse-pointer":'',move:'',music:'',"navigation-2":'',navigation:'',octagon:'',package:'',paperclip:'',"pause-circle":'',pause:'',"pen-tool":'',percent:'',"phone-call":'',"phone-forwarded":'',"phone-incoming":'',"phone-missed":'',"phone-off":'',"phone-outgoing":'',phone:'',"pie-chart":'',"play-circle":'',play:'',"plus-circle":'',"plus-square":'',plus:'',pocket:'',power:'',printer:'',radio:'',"refresh-ccw":'',"refresh-cw":'',repeat:'',rewind:'',"rotate-ccw":'',"rotate-cw":'',rss:'',save:'',scissors:'',search:'',send:'',server:'',settings:'',"share-2":'',share:'',"shield-off":'',shield:'',"shopping-bag":'',"shopping-cart":'',shuffle:'',sidebar:'',"skip-back":'',"skip-forward":'',slack:'',slash:'',sliders:'',smartphone:'',smile:'',speaker:'',square:'',star:'',"stop-circle":'',sun:'',sunrise:'',sunset:'',table:'',tablet:'',tag:'',target:'',terminal:'',thermometer:'',"thumbs-down":'',"thumbs-up":'',"toggle-left":'',"toggle-right":'',tool:'',"trash-2":'',trash:'',trello:'',"trending-down":'',"trending-up":'',triangle:'',truck:'',tv:'',twitch:'',twitter:'',type:'',umbrella:'',underline:'',unlock:'',"upload-cloud":'',upload:'',"user-check":'',"user-minus":'',"user-plus":'',"user-x":'',user:'',users:'',"video-off":'',video:'',voicemail:'',"volume-1":'',"volume-2":'',"volume-x":'',volume:'',watch:'',"wifi-off":'',wifi:'',wind:'',"x-circle":'',"x-octagon":'',"x-square":'',x:'',youtube:'',"zap-off":'',zap:'',"zoom-in":'',"zoom-out":''}},"./node_modules/classnames/dedupe.js":function(e,t,r){var n,i;(function(){"use strict";var a=function(){function s(){}s.prototype=Object.create(null);function o(m,v){for(var y=v.length,b=0;b1?arguments[1]:void 0,v=m!==void 0,y=0,b=c(d),x,E,_,k;if(v&&(m=n(m,p>2?arguments[2]:void 0,2)),b!=null&&!(h==Array&&s(b)))for(k=b.call(d),E=new h;!(_=k.next()).done;y++)l(E,y,v?a(k,m,[_.value,y],!0):_.value);else for(x=o(d.length),E=new h(x);x>y;y++)l(E,y,v?m(d[y],y):d[y]);return E.length=y,E}},"./node_modules/core-js/internals/array-includes.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-indexed-object.js"),i=r("./node_modules/core-js/internals/to-length.js"),a=r("./node_modules/core-js/internals/to-absolute-index.js");e.exports=function(s){return function(o,l,c){var u=n(o),f=i(u.length),d=a(c,f),h;if(s&&l!=l){for(;f>d;)if(h=u[d++],h!=h)return!0}else for(;f>d;d++)if((s||d in u)&&u[d]===l)return s||d||0;return!s&&-1}}},"./node_modules/core-js/internals/bind-context.js":function(e,t,r){var n=r("./node_modules/core-js/internals/a-function.js");e.exports=function(i,a,s){if(n(i),a===void 0)return i;switch(s){case 0:return function(){return i.call(a)};case 1:return function(o){return i.call(a,o)};case 2:return function(o,l){return i.call(a,o,l)};case 3:return function(o,l,c){return i.call(a,o,l,c)}}return function(){return i.apply(a,arguments)}}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":function(e,t,r){var n=r("./node_modules/core-js/internals/an-object.js");e.exports=function(i,a,s,o){try{return o?a(n(s)[0],s[1]):a(s)}catch(c){var l=i.return;throw l!==void 0&&n(l.call(i)),c}}},"./node_modules/core-js/internals/check-correctness-of-iteration.js":function(e,t,r){var n=r("./node_modules/core-js/internals/well-known-symbol.js"),i=n("iterator"),a=!1;try{var s=0,o={next:function(){return{done:!!s++}},return:function(){a=!0}};o[i]=function(){return this},Array.from(o,function(){throw 2})}catch(l){}e.exports=function(l,c){if(!c&&!a)return!1;var u=!1;try{var f={};f[i]=function(){return{next:function(){return{done:u=!0}}}},l(f)}catch(d){}return u}},"./node_modules/core-js/internals/classof-raw.js":function(e,t){var r={}.toString;e.exports=function(n){return r.call(n).slice(8,-1)}},"./node_modules/core-js/internals/classof.js":function(e,t,r){var n=r("./node_modules/core-js/internals/classof-raw.js"),i=r("./node_modules/core-js/internals/well-known-symbol.js"),a=i("toStringTag"),s=n(function(){return arguments}())=="Arguments",o=function(l,c){try{return l[c]}catch(u){}};e.exports=function(l){var c,u,f;return l===void 0?"Undefined":l===null?"Null":typeof(u=o(c=Object(l),a))=="string"?u:s?n(c):(f=n(c))=="Object"&&typeof c.callee=="function"?"Arguments":f}},"./node_modules/core-js/internals/copy-constructor-properties.js":function(e,t,r){var n=r("./node_modules/core-js/internals/has.js"),i=r("./node_modules/core-js/internals/own-keys.js"),a=r("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),s=r("./node_modules/core-js/internals/object-define-property.js");e.exports=function(o,l){for(var c=i(l),u=s.f,f=a.f,d=0;d",x="java"+y+":",E;for(p.style.display="none",o.appendChild(p),p.src=String(x),E=p.contentWindow.document,E.open(),E.write(v+y+b+"document.F=Object"+v+"/"+y+b),E.close(),h=E.F;m--;)delete h[f][a[m]];return h()};e.exports=Object.create||function(m,v){var y;return m!==null?(d[f]=n(m),y=new d,d[f]=null,y[u]=m):y=h(),v===void 0?y:i(y,v)},s[u]=!0},"./node_modules/core-js/internals/object-define-properties.js":function(e,t,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/object-define-property.js"),a=r("./node_modules/core-js/internals/an-object.js"),s=r("./node_modules/core-js/internals/object-keys.js");e.exports=n?Object.defineProperties:function(l,c){a(l);for(var u=s(c),f=u.length,d=0,h;f>d;)i.f(l,h=u[d++],c[h]);return l}},"./node_modules/core-js/internals/object-define-property.js":function(e,t,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/ie8-dom-define.js"),a=r("./node_modules/core-js/internals/an-object.js"),s=r("./node_modules/core-js/internals/to-primitive.js"),o=Object.defineProperty;t.f=n?o:function(c,u,f){if(a(c),u=s(u,!0),a(f),i)try{return o(c,u,f)}catch(d){}if("get"in f||"set"in f)throw TypeError("Accessors not supported");return"value"in f&&(c[u]=f.value),c}},"./node_modules/core-js/internals/object-get-own-property-descriptor.js":function(e,t,r){var n=r("./node_modules/core-js/internals/descriptors.js"),i=r("./node_modules/core-js/internals/object-property-is-enumerable.js"),a=r("./node_modules/core-js/internals/create-property-descriptor.js"),s=r("./node_modules/core-js/internals/to-indexed-object.js"),o=r("./node_modules/core-js/internals/to-primitive.js"),l=r("./node_modules/core-js/internals/has.js"),c=r("./node_modules/core-js/internals/ie8-dom-define.js"),u=Object.getOwnPropertyDescriptor;t.f=n?u:function(d,h){if(d=s(d),h=o(h,!0),c)try{return u(d,h)}catch(p){}if(l(d,h))return a(!i.f.call(d,h),d[h])}},"./node_modules/core-js/internals/object-get-own-property-names.js":function(e,t,r){var n=r("./node_modules/core-js/internals/object-keys-internal.js"),i=r("./node_modules/core-js/internals/enum-bug-keys.js"),a=i.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(o){return n(o,a)}},"./node_modules/core-js/internals/object-get-own-property-symbols.js":function(e,t){t.f=Object.getOwnPropertySymbols},"./node_modules/core-js/internals/object-get-prototype-of.js":function(e,t,r){var n=r("./node_modules/core-js/internals/has.js"),i=r("./node_modules/core-js/internals/to-object.js"),a=r("./node_modules/core-js/internals/shared-key.js"),s=r("./node_modules/core-js/internals/correct-prototype-getter.js"),o=a("IE_PROTO"),l=Object.prototype;e.exports=s?Object.getPrototypeOf:function(c){return c=i(c),n(c,o)?c[o]:typeof c.constructor=="function"&&c instanceof c.constructor?c.constructor.prototype:c instanceof Object?l:null}},"./node_modules/core-js/internals/object-keys-internal.js":function(e,t,r){var n=r("./node_modules/core-js/internals/has.js"),i=r("./node_modules/core-js/internals/to-indexed-object.js"),a=r("./node_modules/core-js/internals/array-includes.js"),s=r("./node_modules/core-js/internals/hidden-keys.js"),o=a(!1);e.exports=function(l,c){var u=i(l),f=0,d=[],h;for(h in u)!n(s,h)&&n(u,h)&&d.push(h);for(;c.length>f;)n(u,h=c[f++])&&(~o(d,h)||d.push(h));return d}},"./node_modules/core-js/internals/object-keys.js":function(e,t,r){var n=r("./node_modules/core-js/internals/object-keys-internal.js"),i=r("./node_modules/core-js/internals/enum-bug-keys.js");e.exports=Object.keys||function(s){return n(s,i)}},"./node_modules/core-js/internals/object-property-is-enumerable.js":function(e,t,r){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a=i&&!n.call({1:2},1);t.f=a?function(o){var l=i(this,o);return!!l&&l.enumerable}:n},"./node_modules/core-js/internals/object-set-prototype-of.js":function(e,t,r){var n=r("./node_modules/core-js/internals/validate-set-prototype-of-arguments.js");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,a={},s;try{s=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,s.call(a,[]),i=a instanceof Array}catch(o){}return function(l,c){return n(l,c),i?s.call(l,c):l.__proto__=c,l}}():void 0)},"./node_modules/core-js/internals/own-keys.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/object-get-own-property-names.js"),a=r("./node_modules/core-js/internals/object-get-own-property-symbols.js"),s=r("./node_modules/core-js/internals/an-object.js"),o=n.Reflect;e.exports=o&&o.ownKeys||function(c){var u=i.f(s(c)),f=a.f;return f?u.concat(f(c)):u}},"./node_modules/core-js/internals/path.js":function(e,t,r){e.exports=r("./node_modules/core-js/internals/global.js")},"./node_modules/core-js/internals/redefine.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/shared.js"),a=r("./node_modules/core-js/internals/hide.js"),s=r("./node_modules/core-js/internals/has.js"),o=r("./node_modules/core-js/internals/set-global.js"),l=r("./node_modules/core-js/internals/function-to-string.js"),c=r("./node_modules/core-js/internals/internal-state.js"),u=c.get,f=c.enforce,d=String(l).split("toString");i("inspectSource",function(h){return l.call(h)}),(e.exports=function(h,p,m,v){var y=v?!!v.unsafe:!1,b=v?!!v.enumerable:!1,x=v?!!v.noTargetGet:!1;if(typeof m=="function"&&(typeof p=="string"&&!s(m,"name")&&a(m,"name",p),f(m).source=d.join(typeof p=="string"?p:"")),h===n){b?h[p]=m:o(p,m);return}else y?!x&&h[p]&&(b=!0):delete h[p];b?h[p]=m:a(h,p,m)})(Function.prototype,"toString",function(){return typeof this=="function"&&u(this).source||l.call(this)})},"./node_modules/core-js/internals/require-object-coercible.js":function(e,t){e.exports=function(r){if(r==null)throw TypeError("Can't call method on "+r);return r}},"./node_modules/core-js/internals/set-global.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/hide.js");e.exports=function(a,s){try{i(n,a,s)}catch(o){n[a]=s}return s}},"./node_modules/core-js/internals/set-to-string-tag.js":function(e,t,r){var n=r("./node_modules/core-js/internals/object-define-property.js").f,i=r("./node_modules/core-js/internals/has.js"),a=r("./node_modules/core-js/internals/well-known-symbol.js"),s=a("toStringTag");e.exports=function(o,l,c){o&&!i(o=c?o:o.prototype,s)&&n(o,s,{configurable:!0,value:l})}},"./node_modules/core-js/internals/shared-key.js":function(e,t,r){var n=r("./node_modules/core-js/internals/shared.js"),i=r("./node_modules/core-js/internals/uid.js"),a=n("keys");e.exports=function(s){return a[s]||(a[s]=i(s))}},"./node_modules/core-js/internals/shared.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/set-global.js"),a=r("./node_modules/core-js/internals/is-pure.js"),s="__core-js_shared__",o=n[s]||i(s,{});(e.exports=function(l,c){return o[l]||(o[l]=c!==void 0?c:{})})("versions",[]).push({version:"3.1.3",mode:a?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},"./node_modules/core-js/internals/string-at.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-integer.js"),i=r("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(a,s,o){var l=String(i(a)),c=n(s),u=l.length,f,d;return c<0||c>=u?o?"":void 0:(f=l.charCodeAt(c),f<55296||f>56319||c+1===u||(d=l.charCodeAt(c+1))<56320||d>57343?o?l.charAt(c):f:o?l.slice(c,c+2):(f-55296<<10)+(d-56320)+65536)}},"./node_modules/core-js/internals/to-absolute-index.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-integer.js"),i=Math.max,a=Math.min;e.exports=function(s,o){var l=n(s);return l<0?i(l+o,0):a(l,o)}},"./node_modules/core-js/internals/to-indexed-object.js":function(e,t,r){var n=r("./node_modules/core-js/internals/indexed-object.js"),i=r("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(a){return n(i(a))}},"./node_modules/core-js/internals/to-integer.js":function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(i){return isNaN(i=+i)?0:(i>0?n:r)(i)}},"./node_modules/core-js/internals/to-length.js":function(e,t,r){var n=r("./node_modules/core-js/internals/to-integer.js"),i=Math.min;e.exports=function(a){return a>0?i(n(a),9007199254740991):0}},"./node_modules/core-js/internals/to-object.js":function(e,t,r){var n=r("./node_modules/core-js/internals/require-object-coercible.js");e.exports=function(i){return Object(n(i))}},"./node_modules/core-js/internals/to-primitive.js":function(e,t,r){var n=r("./node_modules/core-js/internals/is-object.js");e.exports=function(i,a){if(!n(i))return i;var s,o;if(a&&typeof(s=i.toString)=="function"&&!n(o=s.call(i))||typeof(s=i.valueOf)=="function"&&!n(o=s.call(i))||!a&&typeof(s=i.toString)=="function"&&!n(o=s.call(i)))return o;throw TypeError("Can't convert object to primitive value")}},"./node_modules/core-js/internals/uid.js":function(e,t){var r=0,n=Math.random();e.exports=function(i){return"Symbol(".concat(i===void 0?"":i,")_",(++r+n).toString(36))}},"./node_modules/core-js/internals/validate-set-prototype-of-arguments.js":function(e,t,r){var n=r("./node_modules/core-js/internals/is-object.js"),i=r("./node_modules/core-js/internals/an-object.js");e.exports=function(a,s){if(i(a),!n(s)&&s!==null)throw TypeError("Can't set "+String(s)+" as a prototype")}},"./node_modules/core-js/internals/well-known-symbol.js":function(e,t,r){var n=r("./node_modules/core-js/internals/global.js"),i=r("./node_modules/core-js/internals/shared.js"),a=r("./node_modules/core-js/internals/uid.js"),s=r("./node_modules/core-js/internals/native-symbol.js"),o=n.Symbol,l=i("wks");e.exports=function(c){return l[c]||(l[c]=s&&o[c]||(s?o:a)("Symbol."+c))}},"./node_modules/core-js/modules/es.array.from.js":function(e,t,r){var n=r("./node_modules/core-js/internals/export.js"),i=r("./node_modules/core-js/internals/array-from.js"),a=r("./node_modules/core-js/internals/check-correctness-of-iteration.js"),s=!a(function(o){Array.from(o)});n({target:"Array",stat:!0,forced:s},{from:i})},"./node_modules/core-js/modules/es.string.iterator.js":function(e,t,r){"use strict";var n=r("./node_modules/core-js/internals/string-at.js"),i=r("./node_modules/core-js/internals/internal-state.js"),a=r("./node_modules/core-js/internals/define-iterator.js"),s="String Iterator",o=i.set,l=i.getterFor(s);a(String,"String",function(c){o(this,{type:s,string:String(c),index:0})},function(){var u=l(this),f=u.string,d=u.index,h;return d>=f.length?{value:void 0,done:!0}:(h=n(f,d,!0),u.index+=h.length,{value:h,done:!1})})},"./node_modules/webpack/buildin/global.js":function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(n){typeof window=="object"&&(r=window)}e.exports=r},"./src/default-attrs.json":function(e){e.exports={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}},"./src/icon.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(h){for(var p=1;p2&&arguments[2]!==void 0?arguments[2]:[];u(this,h),this.name=p,this.contents=m,this.tags=v,this.attrs=n({},l.default,{class:"feather feather-"+p})}return i(h,[{key:"toSvg",value:function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v=n({},this.attrs,m,{class:(0,s.default)(this.attrs.class,m.class)});return""+this.contents+""}},{key:"toString",value:function(){return this.contents}}]),h}();function d(h){return Object.keys(h).map(function(p){return p+'="'+h[p]+'"'}).join(" ")}t.default=f},"./src/icons.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("./src/icon.js"),i=c(n),a=r("./dist/icons.json"),s=c(a),o=r("./src/tags.json"),l=c(o);function c(u){return u&&u.__esModule?u:{default:u}}t.default=Object.keys(s.default).map(function(u){return new i.default(u,s.default[u],l.default[u])}).reduce(function(u,f){return u[f.name]=f,u},{})},"./src/index.js":function(e,t,r){"use strict";var n=r("./src/icons.js"),i=c(n),a=r("./src/to-svg.js"),s=c(a),o=r("./src/replace.js"),l=c(o);function c(u){return u&&u.__esModule?u:{default:u}}e.exports={icons:i.default,toSvg:s.default,replace:l.default}},"./src/replace.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(d){for(var h=1;h0&&arguments[0]!==void 0?arguments[0]:{};if(typeof document=="undefined")throw new Error("`feather.replace()` only works in a browser environment.");var h=document.querySelectorAll("[data-feather]");Array.from(h).forEach(function(p){return u(p,d)})}function u(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=f(d),m=p["data-feather"];if(delete p["data-feather"],o.default[m]===void 0){console.warn("feather: '"+m+"' is not a valid icon");return}var v=o.default[m].toSvg(n({},h,p,{class:(0,a.default)(h.class,p.class)})),y=new DOMParser().parseFromString(v,"image/svg+xml"),b=y.querySelector("svg");d.parentNode.replaceChild(b,d)}function f(d){return Array.from(d.attributes).reduce(function(h,p){return h[p.name]=p.value,h},{})}t.default=c},"./src/tags.json":function(e){e.exports={activity:["pulse","health","action","motion"],airplay:["stream","cast","mirroring"],"alert-circle":["warning","alert","danger"],"alert-octagon":["warning","alert","danger"],"alert-triangle":["warning","alert","danger"],"align-center":["text alignment","center"],"align-justify":["text alignment","justified"],"align-left":["text alignment","left"],"align-right":["text alignment","right"],anchor:[],archive:["index","box"],"at-sign":["mention","at","email","message"],award:["achievement","badge"],aperture:["camera","photo"],"bar-chart":["statistics","diagram","graph"],"bar-chart-2":["statistics","diagram","graph"],battery:["power","electricity"],"battery-charging":["power","electricity"],bell:["alarm","notification","sound"],"bell-off":["alarm","notification","silent"],bluetooth:["wireless"],"book-open":["read","library"],book:["read","dictionary","booklet","magazine","library"],bookmark:["read","clip","marker","tag"],box:["cube"],briefcase:["work","bag","baggage","folder"],calendar:["date"],camera:["photo"],cast:["chromecast","airplay"],"chevron-down":["expand"],"chevron-up":["collapse"],circle:["off","zero","record"],clipboard:["copy"],clock:["time","watch","alarm"],"cloud-drizzle":["weather","shower"],"cloud-lightning":["weather","bolt"],"cloud-rain":["weather"],"cloud-snow":["weather","blizzard"],cloud:["weather"],codepen:["logo"],codesandbox:["logo"],code:["source","programming"],coffee:["drink","cup","mug","tea","cafe","hot","beverage"],columns:["layout"],command:["keyboard","cmd","terminal","prompt"],compass:["navigation","safari","travel","direction"],copy:["clone","duplicate"],"corner-down-left":["arrow","return"],"corner-down-right":["arrow"],"corner-left-down":["arrow"],"corner-left-up":["arrow"],"corner-right-down":["arrow"],"corner-right-up":["arrow"],"corner-up-left":["arrow"],"corner-up-right":["arrow"],cpu:["processor","technology"],"credit-card":["purchase","payment","cc"],crop:["photo","image"],crosshair:["aim","target"],database:["storage","memory"],delete:["remove"],disc:["album","cd","dvd","music"],"dollar-sign":["currency","money","payment"],droplet:["water"],edit:["pencil","change"],"edit-2":["pencil","change"],"edit-3":["pencil","change"],eye:["view","watch"],"eye-off":["view","watch","hide","hidden"],"external-link":["outbound"],facebook:["logo","social"],"fast-forward":["music"],figma:["logo","design","tool"],"file-minus":["delete","remove","erase"],"file-plus":["add","create","new"],"file-text":["data","txt","pdf"],film:["movie","video"],filter:["funnel","hopper"],flag:["report"],"folder-minus":["directory"],"folder-plus":["directory"],folder:["directory"],framer:["logo","design","tool"],frown:["emoji","face","bad","sad","emotion"],gift:["present","box","birthday","party"],"git-branch":["code","version control"],"git-commit":["code","version control"],"git-merge":["code","version control"],"git-pull-request":["code","version control"],github:["logo","version control"],gitlab:["logo","version control"],globe:["world","browser","language","translate"],"hard-drive":["computer","server","memory","data"],hash:["hashtag","number","pound"],headphones:["music","audio","sound"],heart:["like","love","emotion"],"help-circle":["question mark"],hexagon:["shape","node.js","logo"],home:["house","living"],image:["picture"],inbox:["email"],instagram:["logo","camera"],key:["password","login","authentication","secure"],layers:["stack"],layout:["window","webpage"],"life-buoy":["help","life ring","support"],link:["chain","url"],"link-2":["chain","url"],linkedin:["logo","social media"],list:["options"],lock:["security","password","secure"],"log-in":["sign in","arrow","enter"],"log-out":["sign out","arrow","exit"],mail:["email","message"],"map-pin":["location","navigation","travel","marker"],map:["location","navigation","travel"],maximize:["fullscreen"],"maximize-2":["fullscreen","arrows","expand"],meh:["emoji","face","neutral","emotion"],menu:["bars","navigation","hamburger"],"message-circle":["comment","chat"],"message-square":["comment","chat"],"mic-off":["record","sound","mute"],mic:["record","sound","listen"],minimize:["exit fullscreen","close"],"minimize-2":["exit fullscreen","arrows","close"],minus:["subtract"],monitor:["tv","screen","display"],moon:["dark","night"],"more-horizontal":["ellipsis"],"more-vertical":["ellipsis"],"mouse-pointer":["arrow","cursor"],move:["arrows"],music:["note"],navigation:["location","travel"],"navigation-2":["location","travel"],octagon:["stop"],package:["box","container"],paperclip:["attachment"],pause:["music","stop"],"pause-circle":["music","audio","stop"],"pen-tool":["vector","drawing"],percent:["discount"],"phone-call":["ring"],"phone-forwarded":["call"],"phone-incoming":["call"],"phone-missed":["call"],"phone-off":["call","mute"],"phone-outgoing":["call"],phone:["call"],play:["music","start"],"pie-chart":["statistics","diagram"],"play-circle":["music","start"],plus:["add","new"],"plus-circle":["add","new"],"plus-square":["add","new"],pocket:["logo","save"],power:["on","off"],printer:["fax","office","device"],radio:["signal"],"refresh-cw":["synchronise","arrows"],"refresh-ccw":["arrows"],repeat:["loop","arrows"],rewind:["music"],"rotate-ccw":["arrow"],"rotate-cw":["arrow"],rss:["feed","subscribe"],save:["floppy disk"],scissors:["cut"],search:["find","magnifier","magnifying glass"],send:["message","mail","email","paper airplane","paper aeroplane"],settings:["cog","edit","gear","preferences"],"share-2":["network","connections"],shield:["security","secure"],"shield-off":["security","insecure"],"shopping-bag":["ecommerce","cart","purchase","store"],"shopping-cart":["ecommerce","cart","purchase","store"],shuffle:["music"],"skip-back":["music"],"skip-forward":["music"],slack:["logo"],slash:["ban","no"],sliders:["settings","controls"],smartphone:["cellphone","device"],smile:["emoji","face","happy","good","emotion"],speaker:["audio","music"],star:["bookmark","favorite","like"],"stop-circle":["media","music"],sun:["brightness","weather","light"],sunrise:["weather","time","morning","day"],sunset:["weather","time","evening","night"],tablet:["device"],tag:["label"],target:["logo","bullseye"],terminal:["code","command line","prompt"],thermometer:["temperature","celsius","fahrenheit","weather"],"thumbs-down":["dislike","bad","emotion"],"thumbs-up":["like","good","emotion"],"toggle-left":["on","off","switch"],"toggle-right":["on","off","switch"],tool:["settings","spanner"],trash:["garbage","delete","remove","bin"],"trash-2":["garbage","delete","remove","bin"],triangle:["delta"],truck:["delivery","van","shipping","transport","lorry"],tv:["television","stream"],twitch:["logo"],twitter:["logo","social"],type:["text"],umbrella:["rain","weather"],unlock:["security"],"user-check":["followed","subscribed"],"user-minus":["delete","remove","unfollow","unsubscribe"],"user-plus":["new","add","create","follow","subscribe"],"user-x":["delete","remove","unfollow","unsubscribe","unavailable"],user:["person","account"],users:["group"],"video-off":["camera","movie","film"],video:["camera","movie","film"],voicemail:["phone"],volume:["music","sound","mute"],"volume-1":["music","sound"],"volume-2":["music","sound"],"volume-x":["music","sound","mute"],watch:["clock","time"],"wifi-off":["disabled"],wifi:["connection","signal","wireless"],wind:["weather","air"],"x-circle":["cancel","close","delete","remove","times","clear"],"x-octagon":["delete","stop","alert","warning","times","clear"],"x-square":["cancel","close","delete","remove","times","clear"],x:["cancel","close","delete","remove","times","clear"],youtube:["logo","video","play"],"zap-off":["flash","camera","lightning"],zap:["flash","camera","lightning"],"zoom-in":["magnifying glass"],"zoom-out":["magnifying glass"]}},"./src/to-svg.js":function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r("./src/icons.js"),i=a(n);function a(o){return o&&o.__esModule?o:{default:o}}function s(o){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(console.warn("feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead."),!o)throw new Error("The required `key` (icon name) parameter is missing.");if(!i.default[o])throw new Error("No icon matching '"+o+"'. See the complete list of icons at https://feathericons.com");return i.default[o].toSvg(l)}t.default=s},0:function(e,t,r){r("./node_modules/core-js/es/array/from.js"),e.exports=r("./src/index.js")}})})});var UH={};QP(UH,{default:()=>Qd});module.exports=eR(UH);g();g();var tl=ze(m1(),1),Ep=ze(E1(),1),t2=ze(k1(),1),uu=ze(hw(),1),Qc=ze(gw(),1),r2=ze(Aw(),1),Qr=ze(Tw(),1),n2=ze(Ow(),1),Se=class e extends Error{constructor(t){super(t),this.caller=""}toJSON(){return{code:this.code,data:this.data,caller:this.caller,message:this.message,stack:this.stack}}fromJSON(t){let r=new e(t.message);return r.code=t.code,r.data=t.data,r.caller=t.caller,r.stack=t.stack,r}get isIsomorphicGitError(){return!0}},rl=class e extends Se{constructor(t){super(`Modifying the index is not possible because you have unmerged files: ${t.toString}. Fix them up in the work tree, and then use 'git add/rm as appropriate to mark resolution and make a commit.`),this.code=this.name=e.code,this.data={filepaths:t}}};rl.code="UnmergedPathsError";var le=class e extends Se{constructor(t){super(`An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: ${t}`),this.code=this.name=e.code,this.data={message:t}}};le.code="InternalError";var ds=class e extends Se{constructor(t){super(`The filepath "${t}" contains unsafe character sequences`),this.code=this.name=e.code,this.data={filepath:t}}};ds.code="UnsafeFilepathError";var Fr=class{constructor(t){this.buffer=t,this._start=0}eof(){return this._start>=this.buffer.length}tell(){return this._start}seek(t){this._start=t}slice(t){let r=this.buffer.slice(this._start,this._start+t);return this._start+=t,r}toString(t,r){let n=this.buffer.toString(t,this._start,this._start+r);return this._start+=r,n}write(t,r,n){let i=this.buffer.write(t,this._start,r,n);return this._start+=r,i}copy(t,r,n){let i=t.copy(this.buffer,this._start,r,n);return this._start+=i,i}readUInt8(){let t=this.buffer.readUInt8(this._start);return this._start+=1,t}writeUInt8(t){let r=this.buffer.writeUInt8(t,this._start);return this._start+=1,r}readUInt16BE(){let t=this.buffer.readUInt16BE(this._start);return this._start+=2,t}writeUInt16BE(t){let r=this.buffer.writeUInt16BE(t,this._start);return this._start+=2,r}readUInt32BE(){let t=this.buffer.readUInt32BE(this._start);return this._start+=4,t}writeUInt32BE(t){let r=this.buffer.writeUInt32BE(t,this._start);return this._start+=4,r}};function fu(e,t){return-(et)}function i2(e,t){return fu(e.path,t.path)}function a2(e){let t=e>0?e>>12:0;t!==4&&t!==8&&t!==10&&t!==14&&(t=8);let r=e&511;return r&73?r=493:r=420,t!==8&&(r=0),(t<<12)+r}var xn=2**32;function Iw(e,t,r,n){if(e!==void 0&&t!==void 0)return[e,t];r===void 0&&(r=n.valueOf());let i=Math.floor(r/1e3),a=(r-i*1e3)*1e6;return[i,a]}function hs(e){let[t,r]=Iw(e.ctimeSeconds,e.ctimeNanoseconds,e.ctimeMs,e.ctime),[n,i]=Iw(e.mtimeSeconds,e.mtimeNanoseconds,e.mtimeMs,e.mtime);return{ctimeSeconds:t%xn,ctimeNanoseconds:r%xn,mtimeSeconds:n%xn,mtimeNanoseconds:i%xn,dev:e.dev%xn,ino:e.ino%xn,mode:a2(e.mode%xn),uid:e.uid%xn,gid:e.gid%xn,size:e.size>-1?e.size%xn:0}}function r6(e){let t="";for(let r of new Uint8Array(e))r<16&&(t+="0"),t+=r.toString(16);return t}var rp=null;async function Vn(e){return rp===null&&(rp=await i6()),rp?s2(e):n6(e)}function n6(e){return new Ep.default().update(e).digest("hex")}async function s2(e){let t=await crypto.subtle.digest("SHA-1",e);return r6(t)}async function i6(){try{if(await s2(new Uint8Array([]))==="da39a3ee5e6b4b0d3255bfef95601890afd80709")return!0}catch(e){}return!1}function a6(e){return{assumeValid:!!(e&32768),extended:!!(e&16384),stage:(e&12288)>>12,nameLength:e&4095}}function s6(e){let t=e.flags;return t.extended=!1,t.nameLength=Math.min(Buffer.from(e.path).length,4095),(t.assumeValid?32768:0)+(t.extended?16384:0)+((t.stage&3)<<12)+(t.nameLength&4095)}var dp=class e{constructor(t,r){this._dirty=!1,this._unmergedPaths=r||new Set,this._entries=t||new Map}_addEntry(t){if(t.flags.stage===0)t.stages=[t],this._entries.set(t.path,t),this._unmergedPaths.delete(t.path);else{let r=this._entries.get(t.path);r||(this._entries.set(t.path,t),r=t),r.stages[t.flags.stage]=t,this._unmergedPaths.add(t.path)}}static async from(t){if(Buffer.isBuffer(t))return e.fromBuffer(t);if(t===null)return new e(null);throw new le("invalid type passed to GitIndex.from")}static async fromBuffer(t){if(t.length===0)throw new le("Index file is empty (.git/index)");let r=new e,n=new Fr(t),i=n.toString("utf8",4);if(i!=="DIRC")throw new le(`Invalid dircache magic file number: ${i}`);let a=await Vn(t.slice(0,-20)),s=t.slice(-20).toString("hex");if(s!==a)throw new le(`Invalid checksum in GitIndex buffer: expected ${s} but saw ${a}`);let o=n.readUInt32BE();if(o!==2)throw new le(`Unsupported dircache version: ${o}`);let l=n.readUInt32BE(),c=0;for(;!n.eof()&&ct.stages.length>1?t.stages.filter(r=>r):t)}*[Symbol.iterator](){for(let t of this.entries)yield t}insert({filepath:t,stats:r,oid:n,stage:i=0}){r||(r={ctimeSeconds:0,ctimeNanoseconds:0,mtimeSeconds:0,mtimeNanoseconds:0,dev:0,ino:0,mode:0,uid:0,gid:0,size:0}),r=hs(r);let a=Buffer.from(t),s={ctimeSeconds:r.ctimeSeconds,ctimeNanoseconds:r.ctimeNanoseconds,mtimeSeconds:r.mtimeSeconds,mtimeNanoseconds:r.mtimeNanoseconds,dev:r.dev,ino:r.ino,mode:r.mode||33188,uid:r.uid,gid:r.gid,size:r.size,path:t,oid:n,flags:{assumeValid:!1,extended:!1,stage:i,nameLength:a.length<4095?a.length:4095},stages:[]};this._addEntry(s),this._dirty=!0}delete({filepath:t}){if(this._entries.has(t))this._entries.delete(t);else for(let r of this._entries.keys())r.startsWith(t+"/")&&this._entries.delete(r);this._unmergedPaths.has(t)&&this._unmergedPaths.delete(t),this._dirty=!0}clear(){this._entries.clear(),this._dirty=!0}has({filepath:t}){return this._entries.has(t)}render(){return this.entries.map(t=>`${t.mode.toString(8)} ${t.oid} ${t.path}`).join(` +`)}static async _entryToBuffer(t){let r=Buffer.from(t.path),n=Math.ceil((62+r.length+1)/8)*8,i=Buffer.alloc(n),a=new Fr(i),s=hs(t);return a.writeUInt32BE(s.ctimeSeconds),a.writeUInt32BE(s.ctimeNanoseconds),a.writeUInt32BE(s.mtimeSeconds),a.writeUInt32BE(s.mtimeNanoseconds),a.writeUInt32BE(s.dev),a.writeUInt32BE(s.ino),a.writeUInt32BE(s.mode),a.writeUInt32BE(s.uid),a.writeUInt32BE(s.gid),a.writeUInt32BE(s.size),a.write(t.oid,20,"hex"),a.writeUInt16BE(s6(t)),a.write(t.path,r.length,"utf8"),i}async toObject(){let t=Buffer.alloc(12),r=new Fr(t);r.write("DIRC",4,"utf8"),r.writeUInt32BE(2),r.writeUInt32BE(this.entriesFlat.length);let n=[];for(let o of this.entries)if(n.push(e._entryToBuffer(o)),o.stages.length>1)for(let l of o.stages)l&&l!==o&&n.push(e._entryToBuffer(l));n=await Promise.all(n);let i=Buffer.concat(n),a=Buffer.concat([t,i]),s=await Vn(a);return Buffer.concat([a,Buffer.from(s,"hex")])}};function eu(e,t,r=!0,n=!0){let i=hs(e),a=hs(t);return r&&i.mode!==a.mode||i.mtimeSeconds!==a.mtimeSeconds||i.ctimeSeconds!==a.ctimeSeconds||i.uid!==a.uid||i.gid!==a.gid||n&&i.ino!==a.ino||i.size!==a.size}var np=null,us=Symbol("IndexCache");function o6(){return{map:new Map,stats:new Map}}async function l6(e,t,r){let n=await e.lstat(t),i=await e.read(t),a=await dp.from(i);r.map.set(t,a),r.stats.set(t,n)}async function c6(e,t,r){let n=r.stats.get(t);if(n===void 0)return!0;let i=await e.lstat(t);return n===null||i===null?!1:eu(n,i)}var yt=class{static async acquire({fs:t,gitdir:r,cache:n,allowUnmerged:i=!0},a){n[us]||(n[us]=o6());let s=`${r}/index`;np===null&&(np=new tl.default({maxPending:1/0}));let o,l=[];return await np.acquire(s,async()=>{await c6(t,s,n[us])&&await l6(t,s,n[us]);let c=n[us].map.get(s);if(l=c.unmergedPaths,l.length&&!i)throw new rl(l);if(o=await a(c),c._dirty){let u=await c.toObject();await t.write(s,u),n[us].stats.set(s,await t.lstat(s)),c._dirty=!1}}),o}};function tu(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t>-1&&(e=e.slice(t+1)),e}function ps(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t===-1?".":t===0?"/":e.slice(0,t)}function o2(e){let t=new Map,r=function(i){if(!t.has(i)){let a={type:"tree",fullpath:i,basename:tu(i),metadata:{},children:[]};t.set(i,a),a.parent=r(ps(i)),a.parent&&a.parent!==a&&a.parent.children.push(a)}return t.get(i)},n=function(i,a){if(!t.has(i)){let s={type:"blob",fullpath:i,basename:tu(i),metadata:a,parent:r(ps(i)),children:[]};s.parent&&s.parent.children.push(s),t.set(i,s)}return t.get(i)};r(".");for(let i of e)n(i.path,i);return t}function u6(e){switch(e){case 16384:return"tree";case 33188:return"blob";case 33261:return"blob";case 40960:return"blob";case 57344:return"commit"}throw new le(`Unexpected GitTree entry mode: ${e.toString(8)}`)}var hp=class{constructor({fs:t,gitdir:r,cache:n}){this.treePromise=yt.acquire({fs:t,gitdir:r,cache:n},async function(a){return o2(a.entries)});let i=this;this.ConstructEntry=class{constructor(s){this._fullpath=s,this._type=!1,this._mode=!1,this._stat=!1,this._oid=!1}async type(){return i.type(this)}async mode(){return i.mode(this)}async stat(){return i.stat(this)}async content(){return i.content(this)}async oid(){return i.oid(this)}}}async readdir(t){let r=t._fullpath,i=(await this.treePromise).get(r);if(!i||i.type==="blob")return null;if(i.type!=="tree")throw new Error(`ENOTDIR: not a directory, scandir '${r}'`);let a=i.children.map(s=>s.fullpath);return a.sort(fu),a}async type(t){return t._type===!1&&await t.stat(),t._type}async mode(t){return t._mode===!1&&await t.stat(),t._mode}async stat(t){if(t._stat===!1){let n=(await this.treePromise).get(t._fullpath);if(!n)throw new Error(`ENOENT: no such file or directory, lstat '${t._fullpath}'`);let i=n.type==="tree"?{}:hs(n.metadata);t._type=n.type==="tree"?"tree":u6(i.mode),t._mode=i.mode,n.type==="tree"?t._stat=void 0:t._stat=i}return t._stat}async content(t){}async oid(t){if(t._oid===!1){let n=(await this.treePromise).get(t._fullpath);t._oid=n.metadata.oid}return t._oid}},du=Symbol("GitWalkSymbol");function hu(){let e=Object.create(null);return Object.defineProperty(e,du,{value:function({fs:t,gitdir:r,cache:n}){return new hp({fs:t,gitdir:r,cache:n})}}),Object.freeze(e),e}var Le=class e extends Se{constructor(t){super(`Could not find ${t}.`),this.code=this.name=e.code,this.data={what:t}}};Le.code="NotFoundError";var zt=class e extends Se{constructor(t,r,n,i){super(`Object ${t} ${i?`at ${i}`:""}was anticipated to be a ${n} but it is a ${r}.`),this.code=this.name=e.code,this.data={oid:t,actual:r,expected:n,filepath:i}}};zt.code="ObjectTypeError";var _i=class e extends Se{constructor(t){super(`Expected a 40-char hex object id but saw "${t}".`),this.code=this.name=e.code,this.data={value:t}}};_i.code="InvalidOidError";var nl=class e extends Se{constructor(t){super(`Could not find a fetch refspec for remote "${t}". Make sure the config file has an entry like the following: [remote "${t}"] fetch = +refs/heads/*:refs/remotes/origin/* -`),this.code=this.name=e.code,this.data={remote:t}}};el.code="NoRefspecError";var iu=class e{constructor(t){if(this.refs=new Map,this.parsedConfig=[],t){let r=null;this.parsedConfig=t.trim().split(` +`),this.code=this.name=e.code,this.data={remote:t}}};nl.code="NoRefspecError";var ru=class e{constructor(t){if(this.refs=new Map,this.parsedConfig=[],t){let r=null;this.parsedConfig=t.trim().split(` `).map(n=>{if(/^\s*#/.test(n))return{line:n,comment:!0};let i=n.indexOf(" ");if(n.startsWith("^")){let a=n.slice(1);return this.refs.set(r+"^{}",a),{line:n,ref:r,peeled:a}}else{let a=n.slice(0,i);return r=n.slice(i+1),this.refs.set(r,a),{line:n,ref:r,oid:a}}})}return this}static from(t){return new e(t)}delete(t){this.parsedConfig=this.parsedConfig.filter(r=>r.ref!==t),this.refs.delete(t)}toString(){return this.parsedConfig.map(({line:t})=>t).join(` `)+` -`}},au=class e{constructor({remotePath:t,localPath:r,force:n,matchPrefix:i}){Object.assign(this,{remotePath:t,localPath:r,force:n,matchPrefix:i})}static from(t){let[r,n,i,a,s]=t.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1),o=r==="+",c=i==="*";if(c!==(s==="*"))throw new le("Invalid refspec");return new e({remotePath:n,localPath:a,force:o,matchPrefix:c})}translate(t){if(this.matchPrefix){if(t.startsWith(this.remotePath))return this.localPath+t.replace(this.remotePath,"")}else if(t===this.remotePath)return this.localPath;return null}reverseTranslate(t){if(this.matchPrefix){if(t.startsWith(this.localPath))return this.remotePath+t.replace(this.localPath,"")}else if(t===this.localPath)return this.remotePath;return null}},hp=class e{constructor(t=[]){this.rules=t}static from(t){let r=[];for(let n of t)r.push(au.from(n));return new e(r)}add(t){let r=au.from(t);this.rules.push(r)}translate(t){let r=[];for(let n of this.rules)for(let i of t){let a=n.translate(i);a&&r.push([i,a])}return r}translateOne(t){let r=null;for(let n of this.rules){let i=n.translate(t);i&&(r=i)}return r}localNamespaces(){return this.rules.filter(t=>t.matchPrefix).map(t=>t.localPath.replace(/\/$/,""))}};function oM(e,t){let r=e.replace(/\^\{\}$/,""),n=t.replace(/\^\{\}$/,""),i=-(rn);return i===0?e.endsWith("^{}")?1:-1:i}var Mw=new Map;function Ow(e){let t=Mw.get(e);return t||(t=lM(e),Mw.set(e,t)),t}function lM(e){return e=e.split("/./").join("/").replace(/\/{2,}/g,"/"),e==="/."?"/":e==="./"||(e.startsWith("./")&&(e=e.slice(2)),e.endsWith("/.")&&(e=e.slice(0,-2)),e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e==="")?".":e}function $(...e){return Ow(e.map(Ow).join("/"))}var cM=e=>{e=e.toLowerCase();let t=parseInt(e);return e.endsWith("k")&&(t*=1024),e.endsWith("m")&&(t*=1024*1024),e.endsWith("g")&&(t*=1024*1024*1024),t},Ko=e=>{if(e=e.trim().toLowerCase(),e==="true"||e==="yes"||e==="on")return!0;if(e==="false"||e==="no"||e==="off")return!1;throw Error(`Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${e}`)},Iw={core:{filemode:Ko,bare:Ko,logallrefupdates:Ko,symlinks:Ko,ignorecase:Ko,bigFileThreshold:cM}},uM=/^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/,fM=/^[A-Za-z0-9-.]+$/,dM=/^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/,hM=/^[A-Za-z][A-Za-z-]*$/,pM=/^(.*?)( *[#;].*)$/,mM=e=>{let t=uM.exec(e);if(t!=null){let[r,n]=t.slice(1);return[r,n]}return null},gM=e=>{let t=dM.exec(e);if(t!=null){let[r,n="true"]=t.slice(1),i=vM(n),a=yM(i);return[r,a]}return null},vM=e=>{let t=pM.exec(e);if(t==null)return e;let[r,n]=t.slice(1);return Fw(r)&&Fw(n)?`${r}${n}`:r},Fw=e=>(e.match(/(?:^|[^\\])"/g)||[]).length%2!==0,yM=e=>e.split("").reduce((t,r,n,i)=>{let a=r==='"'&&i[n-1]!=="\\",s=r==="\\"&&i[n+1]==='"';return a||s?t:t+r},""),$w=e=>e!=null?e.toLowerCase():null,pp=(e,t,r)=>[$w(e),t,$w(r)].filter(n=>n!=null).join("."),Lw=e=>{let t=e.split("."),r=t.shift(),n=t.pop(),i=t.length?t.join("."):void 0;return{section:r,subsection:i,name:n,path:pp(r,i,n),sectionPath:pp(r,i,null)}},wM=(e,t)=>e.reduce((r,n,i)=>t(n)?i:r,-1),mp=class e{constructor(t){let r=null,n=null;this.parsedConfig=t?t.split(` -`).map(i=>{let a=null,s=null,o=i.trim(),c=mM(o),l=c!=null;if(l)[r,n]=c;else{let f=gM(o);f!=null&&([a,s]=f)}let u=pp(r,n,a);return{line:i,isSection:l,section:r,subsection:n,name:a,value:s,path:u}}):[]}static from(t){return new e(t)}async get(t,r=!1){let n=Lw(t).path,i=this.parsedConfig.filter(a=>a.path===n).map(({section:a,name:s,value:o})=>{let c=Iw[a]&&Iw[a][s];return c?c(o):o});return r?i:i.pop()}async getall(t){return this.get(t,!0)}async getSubsections(t){return this.parsedConfig.filter(r=>r.section===t&&r.isSection).map(r=>r.subsection)}async deleteSection(t,r){this.parsedConfig=this.parsedConfig.filter(n=>!(n.section===t&&n.subsection===r))}async append(t,r){return this.set(t,r,!0)}async set(t,r,n=!1){let{section:i,subsection:a,name:s,path:o,sectionPath:c}=Lw(t),l=wM(this.parsedConfig,u=>u.path===o);if(r==null)l!==-1&&this.parsedConfig.splice(l,1);else if(l!==-1){let u=this.parsedConfig[l],f=Object.assign({},u,{name:s,value:r,modified:!0});n?this.parsedConfig.splice(l+1,0,f):this.parsedConfig[l]=f}else{let u=this.parsedConfig.findIndex(d=>d.path===c),f={section:i,subsection:a,name:s,value:r,modified:!0,path:o};if(fM.test(i)&&hM.test(s))if(u>=0)this.parsedConfig.splice(u+1,0,f);else{let d={section:i,subsection:a,modified:!0,path:c};this.parsedConfig.push(d,f)}}}toString(){return this.parsedConfig.map(({line:t,section:r,subsection:n,name:i,value:a,modified:s=!1})=>s?i!=null&&a!=null?typeof a=="string"&&/[#;]/.test(a)?` ${i} = "${a}"`:` ${i} = ${a}`:n!=null?`[${r} "${n}"]`:`[${r}]`:t).join(` -`)}},We=class{static async get({fs:t,gitdir:r}){let n=await t.read(`${r}/config`,{encoding:"utf8"});return mp.from(n)}static async save({fs:t,gitdir:r,config:n}){await t.write(`${r}/config`,n.toString(),{encoding:"utf8"})}},Qc=e=>[`${e}`,`refs/${e}`,`refs/tags/${e}`,`refs/heads/${e}`,`refs/remotes/${e}`,`refs/remotes/${e}/HEAD`],bM=["config","description","index","shallow","commondir"],np;async function vi(e,t){return np===void 0&&(np=new Jo.default),np.acquire(e,t)}var q=class e{static async updateRemoteRefs({fs:t,gitdir:r,remote:n,refs:i,symrefs:a,tags:s,refspecs:o=void 0,prune:c=!1,pruneTags:l=!1}){for(let v of i.values())if(!v.match(/[0-9a-f]{40}/))throw new bi(v);let u=await We.get({fs:t,gitdir:r});if(!o){if(o=await u.getall(`remote.${n}.fetch`),o.length===0)throw new el(n);o.unshift(`+HEAD:refs/remotes/${n}/HEAD`)}let f=hp.from(o),d=new Map;if(l){let v=await e.listRefs({fs:t,gitdir:r,filepath:"refs/tags"});await e.deleteRefs({fs:t,gitdir:r,refs:v.map(y=>`refs/tags/${y}`)})}if(s){for(let v of i.keys())if(v.startsWith("refs/tags")&&!v.endsWith("^{}")&&!await e.exists({fs:t,gitdir:r,ref:v})){let y=i.get(v);d.set(v,y)}}let h=f.translate([...i.keys()]);for(let[v,y]of h){let b=i.get(v);d.set(y,b)}let p=f.translate([...a.keys()]);for(let[v,y]of p){let b=a.get(v),x=f.translateOne(b);x&&d.set(y,`ref: ${x}`)}let m=[];if(c){for(let v of f.localNamespaces()){let y=(await e.listRefs({fs:t,gitdir:r,filepath:v})).map(b=>`${v}/${b}`);for(let b of y)d.has(b)||m.push(b)}m.length>0&&await e.deleteRefs({fs:t,gitdir:r,refs:m})}for(let[v,y]of d)await vi(v,async()=>t.write($(r,v),`${y.trim()} -`,"utf8"));return{pruned:m}}static async writeRef({fs:t,gitdir:r,ref:n,value:i}){if(!i.match(/[0-9a-f]{40}/))throw new bi(i);await vi(n,async()=>t.write($(r,n),`${i.trim()} -`,"utf8"))}static async writeSymbolicRef({fs:t,gitdir:r,ref:n,value:i}){await vi(n,async()=>t.write($(r,n),`ref: ${i.trim()} -`,"utf8"))}static async deleteRef({fs:t,gitdir:r,ref:n}){return e.deleteRefs({fs:t,gitdir:r,refs:[n]})}static async deleteRefs({fs:t,gitdir:r,refs:n}){await Promise.all(n.map(o=>t.rm($(r,o))));let i=await vi("packed-refs",async()=>t.read(`${r}/packed-refs`,{encoding:"utf8"})),a=iu.from(i),s=a.refs.size;for(let o of n)a.refs.has(o)&&a.delete(o);a.refs.sizet.write(`${r}/packed-refs`,i,{encoding:"utf8"})))}static async resolve({fs:t,gitdir:r,ref:n,depth:i=void 0}){if(i!==void 0&&(i--,i===-1))return n;if(n.startsWith("ref: "))return n=n.slice(5),e.resolve({fs:t,gitdir:r,ref:n,depth:i});if(n.length===40&&/[0-9a-f]{40}/.test(n))return n;let a=await e.packedRefs({fs:t,gitdir:r}),s=Qc(n).filter(o=>!bM.includes(o));for(let o of s){let c=await vi(o,async()=>await t.read(`${r}/${o}`,{encoding:"utf8"})||a.get(o));if(c)return e.resolve({fs:t,gitdir:r,ref:c.trim(),depth:i})}throw new Ne(n)}static async exists({fs:t,gitdir:r,ref:n}){try{return await e.expand({fs:t,gitdir:r,ref:n}),!0}catch(i){return!1}}static async expand({fs:t,gitdir:r,ref:n}){if(n.length===40&&/[0-9a-f]{40}/.test(n))return n;let i=await e.packedRefs({fs:t,gitdir:r}),a=Qc(n);for(let s of a)if(await vi(s,async()=>t.exists(`${r}/${s}`))||i.has(s))return s;throw new Ne(n)}static async expandAgainstMap({ref:t,map:r}){let n=Qc(t);for(let i of n)if(await r.has(i))return i;throw new Ne(t)}static resolveAgainstMap({ref:t,fullref:r=t,depth:n=void 0,map:i}){if(n!==void 0&&(n--,n===-1))return{fullref:r,oid:t};if(t.startsWith("ref: "))return t=t.slice(5),e.resolveAgainstMap({ref:t,fullref:r,depth:n,map:i});if(t.length===40&&/[0-9a-f]{40}/.test(t))return{fullref:r,oid:t};let a=Qc(t);for(let s of a){let o=i.get(s);if(o)return e.resolveAgainstMap({ref:o.trim(),fullref:s,depth:n,map:i})}throw new Ne(t)}static async packedRefs({fs:t,gitdir:r}){let n=await vi("packed-refs",async()=>t.read(`${r}/packed-refs`,{encoding:"utf8"}));return iu.from(n).refs}static async listRefs({fs:t,gitdir:r,filepath:n}){let i=e.packedRefs({fs:t,gitdir:r}),a=null;try{a=await t.readdirDeep(`${r}/${n}`),a=a.map(s=>s.replace(`${r}/${n}/`,""))}catch(s){a=[]}for(let s of(await i).keys())s.startsWith(n)&&(s=s.replace(n+"/",""),a.includes(s)||a.push(s));return a.sort(oM),a}static async listBranches({fs:t,gitdir:r,remote:n}){return n?e.listRefs({fs:t,gitdir:r,filepath:`refs/remotes/${n}`}):e.listRefs({fs:t,gitdir:r,filepath:"refs/heads"})}static async listTags({fs:t,gitdir:r}){return(await e.listRefs({fs:t,gitdir:r,filepath:"refs/tags"})).filter(i=>!i.endsWith("^{}"))}};function _M(e,t){return hu(Dw(e),Dw(t))}function Dw(e){return e.mode==="040000"?e.path+"/":e.path}function a2(e){switch(e){case"040000":return"tree";case"100644":return"blob";case"100755":return"blob";case"120000":return"blob";case"160000":return"commit"}throw new le(`Unexpected GitTree entry mode: ${e}`)}function xM(e){let t=[],r=0;for(;r`${t.mode} ${t.type} ${t.oid} ${t.path}`).join(` -`)}toObject(){let t=[...this._entries];return t.sort(_M),Buffer.concat(t.map(r=>{let n=Buffer.from(r.mode.replace(/^0/,"")),i=Buffer.from(" "),a=Buffer.from(r.path,"utf8"),s=Buffer.from([0]),o=Buffer.from(r.oid,"hex");return Buffer.concat([n,i,a,s,o])}))}entries(){return this._entries}*[Symbol.iterator](){for(let t of this._entries)yield t}},_i=class{static wrap({type:t,object:r}){return Buffer.concat([Buffer.from(`${t} ${r.byteLength.toString()}\0`),Buffer.from(r)])}static unwrap(t){let r=t.indexOf(32),n=t.indexOf(0),i=t.slice(0,r).toString("utf8"),a=t.slice(r+1,n).toString("utf8"),s=t.length-(n+1);if(parseInt(a)!==s)throw new le(`Length mismatch: expected ${a} bytes but got ${s} instead.`);return{type:i,object:Buffer.from(t.slice(n+1))}}};async function AM({fs:e,gitdir:t,oid:r}){let n=`objects/${r.slice(0,2)}/${r.slice(2)}`,i=await e.read(`${t}/${n}`);return i?{object:i,format:"deflated",source:n}:null}function kM(e,t){let r=new Ir(e),n=Nw(r);if(n!==t.byteLength)throw new le(`applyDelta expected source buffer to be ${n} bytes but the provided buffer was ${t.length} bytes`);let i=Nw(r),a,s=Bw(r,t);if(s.byteLength===i)a=s;else{a=Buffer.alloc(i);let o=new Ir(a);for(o.copy(s);!r.eof();)o.copy(Bw(r,t));let c=o.tell();if(i!==c)throw new le(`applyDelta expected target buffer to be ${i} bytes but the resulting buffer was ${c} bytes`)}return a}function Nw(e){let t=0,r=0,n=null;do n=e.readUInt8(),t|=(n&127)<>=1,i+=8;return n}function Bw(e,t){let r=e.readUInt8(),n=128,i=15,a=112;if(r&n){let s=jw(e,r&i,4),o=jw(e,(r&a)>>4,3);return o===0&&(o=65536),t.slice(s,s+o)}else return e.slice(r)}function TM(e){let t=[e];return{next(){return Promise.resolve({done:t.length===0,value:t.pop()})},return(){return t=[],{}},[Symbol.asyncIterator](){return this}}}function s2(e){return e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]?e[Symbol.iterator]():e.next?e:TM(e)}var su=class{constructor(t){if(typeof Buffer=="undefined")throw new Error("Missing Buffer dependency");this.stream=s2(t),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}async byte(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(1),this.buffer[this.undoCursor]}async chunk(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(this.buffer.length),this.buffer.slice(this.undoCursor,this.cursor)}async read(t){if(!this.eof())return this.started||await this._init(),this.cursor+t>this.buffer.length&&(this._trim(),await this._accumulate(t)),this._moveCursor(t),this.buffer.slice(this.undoCursor,this.cursor)}async skip(t){this.eof()||(this.started||await this._init(),this.cursor+t>this.buffer.length&&(this._trim(),await this._accumulate(t)),this._moveCursor(t))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:t,value:r}=await this.stream.next();return t&&(this._ended=!0,!r)?Buffer.alloc(0):(r&&(r=Buffer.from(r)),r)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(t){this.undoCursor=this.cursor,this.cursor+=t,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(t){if(this._ended)return;let r=[this.buffer];for(;this.cursor+t>CM(r);){let n=await this._next();if(this._ended)break;r.push(n)}this.buffer=Buffer.concat(r)}async _loadnext(){this._discardedBytes+=this.buffer.length,this.undoCursor=0,this.cursor=0,this.buffer=await this._next()}async _init(){this.buffer=await this._next()}};function CM(e){return e.reduce((t,r)=>t+r.length,0)}async function PM(e,t){let r=new su(e),n=await r.read(4);if(n=n.toString("utf8"),n!=="PACK")throw new le(`Invalid PACK header '${n}'`);let i=await r.read(4);if(i=i.readUInt32BE(0),i!==2)throw new le(`Invalid packfile version: ${i}`);let a=await r.read(4);if(a=a.readUInt32BE(0),!(a<1))for(;!r.eof()&&a--;){let s=r.tell(),{type:o,length:c,ofs:l,reference:u}=await RM(r),f=new du.default.Inflate;for(;!f.result;){let d=await r.chunk();if(!d)break;if(f.push(d,!1),f.err)throw new le(`Pako error: ${f.msg}`);if(f.result){if(f.result.length!==c)throw new le("Inflated object size is different from that stated in packfile.");await r.undo(),await r.read(d.length-f.strm.avail_in);let h=r.tell();await t({data:f.result,type:o,num:a,offset:s,end:h,reference:u,ofs:l})}}}}async function RM(e){let t=await e.byte(),r=t>>4&7,n=t&15;if(t&128){let s=4;do t=await e.byte(),n|=(t&127)<i+1<<7|a,-1)}function FM(e,t){let r=t,n=4,i=null;do i=e.readUInt8(),r|=(i&127)<2048*1024*1024)throw new le("To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.");n.seek(n.tell()+4*255);let s=n.readUInt32BE(),o=[];for(let u=0;u{u===null&&(u=E);let _=Math.floor((u-E)*100/u);_!==f&&n&&await n({phase:"Receiving objects",loaded:u-E,total:u}),f=_,y=i[y],["commit","tree","blob","tag"].includes(y)?a[x]={type:y,offset:x}:y==="ofs-delta"?a[x]={type:y,offset:x}:y==="ref-delta"&&(a[x]={type:y,offset:x})});let d=Object.keys(a).map(Number);for(let[v,y]of d.entries()){let b=v+1===d.length?t.byteLength-20:d[v+1],x=a[y],E=Jw.default.buf(t.slice(y,b))>>>0;x.end=b,x.crc=E}let h=new e({pack:Promise.resolve(t),packfileSha:s,crcs:c,hashes:o,offsets:l,getExternalRefDelta:r});f=null;let p=0,m=[0,0,0,0,0,0,0,0,0,0,0,0];for(let v in a){v=Number(v);let y=Math.floor(p*100/u);y!==f&&n&&await n({phase:"Resolving deltas",loaded:p,total:u}),p++,f=y;let b=a[v];if(!b.oid)try{h.readDepth=0,h.externalReadDepth=0;let{type:x,object:E}=await h.readSlice({start:v});m[h.readDepth]+=1;let _=await Gn(_i.wrap({type:x,object:E}));b.oid=_,o.push(_),l.set(_,v),c[_]=b.crc}catch(x){continue}}return o.sort(),h}async toBuffer(){let t=[],r=(l,u)=>{t.push(Buffer.from(l,u))};r("ff744f63","hex"),r("00000002","hex");let n=new Ir(Buffer.alloc(256*4));for(let l=0;l<256;l++){let u=0;for(let f of this.hashes)parseInt(f.slice(0,2),16)<=l&&u++;n.writeUInt32BE(u)}t.push(n.buffer);for(let l of this.hashes)r(l,"hex");let i=new Ir(Buffer.alloc(this.hashes.length*4));for(let l of this.hashes)i.writeUInt32BE(this.crcs[l]);t.push(i.buffer);let a=new Ir(Buffer.alloc(this.hashes.length*4));for(let l of this.hashes)a.writeUInt32BE(this.offsets.get(l));t.push(a.buffer),r(this.packfileSha,"hex");let s=Buffer.concat(t),o=await Gn(s),c=Buffer.alloc(20);return c.write(o,"hex"),Buffer.concat([s,c])}async load({pack:t}){this.pack=t}async unload(){this.pack=null}async read({oid:t}){if(!this.offsets.get(t)){if(this.getExternalRefDelta)return this.externalReadDepth++,this.getExternalRefDelta(t);throw new le(`Could not read object ${t} from packfile`)}let r=this.offsets.get(t);return this.readSlice({start:r})}async readSlice({start:t}){if(this.offsetCache[t])return Object.assign({},this.offsetCache[t]);this.readDepth++;let r={16:"commit",32:"tree",48:"blob",64:"tag",96:"ofs_delta",112:"ref_delta"};if(!this.pack)throw new le("Tried to read from a GitPackIndex with no packfile loaded into memory");let n=(await this.pack).slice(t),i=new Ir(n),a=i.readUInt8(),s=a&112,o=r[s];if(o===void 0)throw new le("Unrecognized type: 0b"+s.toString(2));let c=a&15,l=c;a&128&&(l=FM(i,c));let f=null,d=null;if(o==="ofs_delta"){let p=IM(i),m=t-p;({object:f,type:o}=await this.readSlice({start:m}))}if(o==="ref_delta"){let p=i.slice(20).toString("hex");({object:f,type:o}=await this.read({oid:p}))}let h=n.slice(i.tell());if(d=Buffer.from(await o2(h)),d.byteLength!==l)throw new le(`Packfile told us object would have length ${l} but it had length ${d.byteLength}`);return f&&(d=Buffer.from(kM(d,f))),this.readDepth>3&&(this.offsetCache[t]={type:o,object:d}),{type:o,format:"content",object:d}}},eu=Symbol("PackfileCache");async function $M({fs:e,filename:t,getExternalRefDelta:r,emitter:n,emitterPrefix:i}){let a=await e.read(t);return tl.fromIdx({idx:a,getExternalRefDelta:r})}function Ep({fs:e,cache:t,filename:r,getExternalRefDelta:n,emitter:i,emitterPrefix:a}){t[eu]||(t[eu]=new Map);let s=t[eu].get(r);return s||(s=$M({fs:e,filename:r,getExternalRefDelta:n,emitter:i,emitterPrefix:a}),t[eu].set(r,s)),s}async function LM({fs:e,cache:t,gitdir:r,oid:n,format:i="content",getExternalRefDelta:a}){let s=await e.readdir($(r,"objects/pack"));s=s.filter(o=>o.endsWith(".idx"));for(let o of s){let c=`${r}/objects/pack/${o}`,l=await Ep({fs:e,cache:t,filename:c,getExternalRefDelta:a});if(l.error)throw new le(l.error);if(l.offsets.has(n)){if(!l.pack){let f=c.replace(/idx$/,"pack");l.pack=e.read(f)}let u=await l.read({oid:n,getExternalRefDelta:a});return u.format="content",u.source=`objects/pack/${o.replace(/idx$/,"pack")}`,u}}return null}async function qe({fs:e,cache:t,gitdir:r,oid:n,format:i="content"}){let a=u=>qe({fs:e,cache:t,gitdir:r,oid:u}),s;if(n==="4b825dc642cb6eb9a060e54bf8d69288fbee4904"&&(s={format:"wrapped",object:Buffer.from("tree 0\0")}),s||(s=await AM({fs:e,gitdir:r,oid:n})),!s){if(s=await LM({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:a}),!s)throw new Ne(n);return s}if(i==="deflated"||(s.format==="deflated"&&(s.object=Buffer.from(await o2(s.object)),s.format="wrapped"),i==="wrapped"))return s;let o=await Gn(s.object);if(o!==n)throw new le(`SHA check failed! Expected ${n}, computed ${o}`);let{object:c,type:l}=_i.unwrap(s.object);if(s.type=l,s.object=c,s.format="content",i==="content")return s;throw new le(`invalid requested format "${i}"`)}var Qr=class e extends _e{constructor(t,r,n=!0){super(`Failed to create ${t} at ${r} because it already exists.${n?` (Hint: use 'force: true' parameter to overwrite existing ${t}.)`:""}`),this.code=this.name=e.code,this.data={noun:t,where:r,canForce:n}}};Qr.code="AlreadyExistsError";var rl=class e extends _e{constructor(t,r,n){super(`Found multiple ${t} matching "${r}" (${n.join(", ")}). Use a longer abbreviation length to disambiguate them.`),this.code=this.name=e.code,this.data={nouns:t,short:r,matches:n}}};rl.code="AmbiguousError";var nl=class e extends _e{constructor(t){super(`Your local changes to the following files would be overwritten by checkout: ${t.join(", ")}`),this.code=this.name=e.code,this.data={filepaths:t}}};nl.code="CheckoutConflictError";var il=class e extends _e{constructor(t,r){super(`Failed to checkout "${t}" because commit ${r} is not available locally. Do a git fetch to make the branch available locally.`),this.code=this.name=e.code,this.data={ref:t,oid:r}}};il.code="CommitNotFetchedError";var al=class e extends _e{constructor(){super("Empty response from git server."),this.code=this.name=e.code,this.data={}}};al.code="EmptyServerResponseError";var sl=class e extends _e{constructor(){super("A simple fast-forward merge was not possible."),this.code=this.name=e.code,this.data={}}};sl.code="FastForwardError";var ol=class e extends _e{constructor(t,r){super(`One or more branches were not updated: ${t}`),this.code=this.name=e.code,this.data={prettyDetails:t,result:r}}};ol.code="GitPushError";var ds=class e extends _e{constructor(t,r,n){super(`HTTP Error: ${t} ${r}`),this.code=this.name=e.code,this.data={statusCode:t,statusMessage:r,response:n}}};ds.code="HttpError";var xi=class e extends _e{constructor(t){let r="invalid filepath";t==="leading-slash"||t==="trailing-slash"?r='"filepath" parameter should not include leading or trailing directory separators because these can cause problems on some platforms.':t==="directory"&&(r='"filepath" should not be a directory.'),super(r),this.code=this.name=e.code,this.data={reason:t}}};xi.code="InvalidFilepathError";var zn=class e extends _e{constructor(t,r){super(`"${t}" would be an invalid git reference. (Hint: a valid alternative would be "${r}".)`),this.code=this.name=e.code,this.data={ref:t,suggestion:r}}};zn.code="InvalidRefNameError";var ll=class e extends _e{constructor(t){super(`Maximum search depth of ${t} exceeded.`),this.code=this.name=e.code,this.data={depth:t}}};ll.code="MaxDepthError";var hs=class e extends _e{constructor(){super("Merges with conflicts are not supported yet."),this.code=this.name=e.code,this.data={}}};hs.code="MergeNotSupportedError";var ps=class e extends _e{constructor(t,r,n,i){super(`Automatic merge failed with one or more merge conflicts in the following files: ${t.toString()}. Fix conflicts then commit the result.`),this.code=this.name=e.code,this.data={filepaths:t,bothModified:r,deleteByUs:n,deleteByTheirs:i}}};ps.code="MergeConflictError";var zt=class e extends _e{constructor(t){super(`No name was provided for ${t} in the argument or in the .git/config file.`),this.code=this.name=e.code,this.data={role:t}}};zt.code="MissingNameError";var Qt=class e extends _e{constructor(t){super(`The function requires a "${t}" parameter but none was provided.`),this.code=this.name=e.code,this.data={parameter:t}}};Qt.code="MissingParameterError";var cl=class e extends _e{constructor(t){super('There are multiple errors that were thrown by the method. Please refer to the "errors" property to see more'),this.code=this.name=e.code,this.data={errors:t},this.errors=t}};cl.code="MultipleGitError";var la=class e extends _e{constructor(t,r){super(`Expected "${t}" but received "${r}".`),this.code=this.name=e.code,this.data={expected:t,actual:r}}};la.code="ParseError";var ms=class e extends _e{constructor(t){let r="";t==="not-fast-forward"?r=" because it was not a simple fast-forward":t==="tag-exists"&&(r=" because tag already exists"),super(`Push rejected${r}. Use "force: true" to override.`),this.code=this.name=e.code,this.data={reason:t}}};ms.code="PushRejectedError";var yi=class e extends _e{constructor(t,r){super(`Remote does not support the "${t}" so the "${r}" parameter cannot be used.`),this.code=this.name=e.code,this.data={capability:t,parameter:r}}};yi.code="RemoteCapabilityError";var ul=class e extends _e{constructor(t,r){super(`Remote did not reply using the "smart" HTTP protocol. Expected "001e# service=git-upload-pack" but received: ${t}`),this.code=this.name=e.code,this.data={preview:t,response:r}}};ul.code="SmartHttpError";var fl=class e extends _e{constructor(t,r,n){super(`Git remote "${t}" uses an unrecognized transport protocol: "${r}"`),this.code=this.name=e.code,this.data={url:t,transport:r,suggestion:n}}};fl.code="UnknownTransportError";var dl=class e extends _e{constructor(t){super(`Cannot parse remote URL: "${t}"`),this.code=this.name=e.code,this.data={url:t}}};dl.code="UrlParseError";var gs=class e extends _e{constructor(){super("The operation was canceled."),this.code=this.name=e.code,this.data={}}};gs.code="UserCanceledError";var hl=class e extends _e{constructor(t){super(`Could not merge index: Entry for '${t}' is not up to date. Either reset the index entry to HEAD, or stage your unstaged changes.`),this.code=this.name=e.code,this.data={filepath:t}}};hl.code="IndexResetError";var pl=class e extends _e{constructor(t){super(`"${t}" does not point to any commit. You're maybe working on a repository with no commits yet. `),this.code=this.name=e.code,this.data={ref:t}}};pl.code="NoCommitError";var gl=Object.freeze({__proto__:null,AlreadyExistsError:Qr,AmbiguousError:rl,CheckoutConflictError:nl,CommitNotFetchedError:il,EmptyServerResponseError:al,FastForwardError:sl,GitPushError:ol,HttpError:ds,InternalError:le,InvalidFilepathError:xi,InvalidOidError:bi,InvalidRefNameError:zn,MaxDepthError:ll,MergeNotSupportedError:hs,MergeConflictError:ps,MissingNameError:zt,MissingParameterError:Qt,MultipleGitError:cl,NoRefspecError:el,NotFoundError:Ne,ObjectTypeError:Gt,ParseError:la,PushRejectedError:ms,RemoteCapabilityError:yi,SmartHttpError:ul,UnknownTransportError:fl,UnsafeFilepathError:cs,UrlParseError:dl,UserCanceledError:gs,UnmergedPathsError:Qo,IndexResetError:hl,NoCommitError:pl});function gp({name:e,email:t,timestamp:r,timezoneOffset:n}){return n=DM(n),`${e} <${t}> ${r} ${n}`}function DM(e){let t=NM(jM(e));e=Math.abs(e);let r=Math.floor(e/60);e-=r*60;let n=String(r),i=String(e);return n.length<2&&(n="0"+n),i.length<2&&(i="0"+i),(t===-1?"-":"+")+n+i}function NM(e){return Math.sign(e)||(Object.is(e,-0)?-1:1)}function jM(e){return e===0?e:-e}function Un(e){return e=e.replace(/\r/g,""),e=e.replace(/^\n+/,""),e=e.replace(/\n+$/,"")+` -`,e}function ou(e){let[,t,r,n,i]=e.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:t,email:r,timestamp:Number(n),timezoneOffset:BM(i)}}function BM(e){let[,t,r,n]=e.match(/(\+|-)(\d\d)(\d\d)/);return n=(t==="+"?1:-1)*(Number(r)*60+Number(n)),HM(n)}function HM(e){return e===0?e:-e}var pr=class e{constructor(t){if(typeof t=="string")this._tag=t;else if(Buffer.isBuffer(t))this._tag=t.toString("utf8");else if(typeof t=="object")this._tag=e.render(t);else throw new le("invalid type passed to GitAnnotatedTag constructor")}static from(t){return new e(t)}static render(t){return`object ${t.object} +`}},nu=class e{constructor({remotePath:t,localPath:r,force:n,matchPrefix:i}){Object.assign(this,{remotePath:t,localPath:r,force:n,matchPrefix:i})}static from(t){let[r,n,i,a,s]=t.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1),o=r==="+",l=i==="*";if(l!==(s==="*"))throw new le("Invalid refspec");return new e({remotePath:n,localPath:a,force:o,matchPrefix:l})}translate(t){if(this.matchPrefix){if(t.startsWith(this.remotePath))return this.localPath+t.replace(this.remotePath,"")}else if(t===this.remotePath)return this.localPath;return null}reverseTranslate(t){if(this.matchPrefix){if(t.startsWith(this.localPath))return this.remotePath+t.replace(this.localPath,"")}else if(t===this.localPath)return this.remotePath;return null}},pp=class e{constructor(t=[]){this.rules=t}static from(t){let r=[];for(let n of t)r.push(nu.from(n));return new e(r)}add(t){let r=nu.from(t);this.rules.push(r)}translate(t){let r=[];for(let n of this.rules)for(let i of t){let a=n.translate(i);a&&r.push([i,a])}return r}translateOne(t){let r=null;for(let n of this.rules){let i=n.translate(t);i&&(r=i)}return r}localNamespaces(){return this.rules.filter(t=>t.matchPrefix).map(t=>t.localPath.replace(/\/$/,""))}};function f6(e,t){let r=e.replace(/\^\{\}$/,""),n=t.replace(/\^\{\}$/,""),i=-(rn);return i===0?e.endsWith("^{}")?1:-1:i}var Fw=new Map;function $w(e){let t=Fw.get(e);return t||(t=d6(e),Fw.set(e,t)),t}function d6(e){return e=e.split("/./").join("/").replace(/\/{2,}/g,"/"),e==="/."?"/":e==="./"||(e.startsWith("./")&&(e=e.slice(2)),e.endsWith("/.")&&(e=e.slice(0,-2)),e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e==="")?".":e}function $(...e){return $w(e.map($w).join("/"))}var h6=e=>{e=e.toLowerCase();let t=parseInt(e);return e.endsWith("k")&&(t*=1024),e.endsWith("m")&&(t*=1024*1024),e.endsWith("g")&&(t*=1024*1024*1024),t},el=e=>{if(e=e.trim().toLowerCase(),e==="true"||e==="yes"||e==="on")return!0;if(e==="false"||e==="no"||e==="off")return!1;throw Error(`Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${e}`)},Lw={core:{filemode:el,bare:el,logallrefupdates:el,symlinks:el,ignorecase:el,bigFileThreshold:h6}},p6=/^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/,m6=/^[A-Za-z0-9-.]+$/,g6=/^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/,v6=/^[A-Za-z][A-Za-z-]*$/,y6=/^(.*?)( *[#;].*)$/,w6=e=>{let t=p6.exec(e);if(t!=null){let[r,n]=t.slice(1);return[r,n]}return null},b6=e=>{let t=g6.exec(e);if(t!=null){let[r,n="true"]=t.slice(1),i=_6(n),a=x6(i);return[r,a]}return null},_6=e=>{let t=y6.exec(e);if(t==null)return e;let[r,n]=t.slice(1);return Dw(r)&&Dw(n)?`${r}${n}`:r},Dw=e=>(e.match(/(?:^|[^\\])"/g)||[]).length%2!==0,x6=e=>e.split("").reduce((t,r,n,i)=>{let a=r==='"'&&i[n-1]!=="\\",s=r==="\\"&&i[n+1]==='"';return a||s?t:t+r},""),Nw=e=>e!=null?e.toLowerCase():null,mp=(e,t,r)=>[Nw(e),t,Nw(r)].filter(n=>n!=null).join("."),Bw=e=>{let t=e.split("."),r=t.shift(),n=t.pop(),i=t.length?t.join("."):void 0;return{section:r,subsection:i,name:n,path:mp(r,i,n),sectionPath:mp(r,i,null)}},S6=(e,t)=>e.reduce((r,n,i)=>t(n)?i:r,-1),gp=class e{constructor(t){let r=null,n=null;this.parsedConfig=t?t.split(` +`).map(i=>{let a=null,s=null,o=i.trim(),l=w6(o),c=l!=null;if(c)[r,n]=l;else{let f=b6(o);f!=null&&([a,s]=f)}let u=mp(r,n,a);return{line:i,isSection:c,section:r,subsection:n,name:a,value:s,path:u}}):[]}static from(t){return new e(t)}async get(t,r=!1){let n=Bw(t).path,i=this.parsedConfig.filter(a=>a.path===n).map(({section:a,name:s,value:o})=>{let l=Lw[a]&&Lw[a][s];return l?l(o):o});return r?i:i.pop()}async getall(t){return this.get(t,!0)}async getSubsections(t){return this.parsedConfig.filter(r=>r.section===t&&r.isSection).map(r=>r.subsection)}async deleteSection(t,r){this.parsedConfig=this.parsedConfig.filter(n=>!(n.section===t&&n.subsection===r))}async append(t,r){return this.set(t,r,!0)}async set(t,r,n=!1){let{section:i,subsection:a,name:s,path:o,sectionPath:l}=Bw(t),c=S6(this.parsedConfig,u=>u.path===o);if(r==null)c!==-1&&this.parsedConfig.splice(c,1);else if(c!==-1){let u=this.parsedConfig[c],f=Object.assign({},u,{name:s,value:r,modified:!0});n?this.parsedConfig.splice(c+1,0,f):this.parsedConfig[c]=f}else{let u=this.parsedConfig.findIndex(d=>d.path===l),f={section:i,subsection:a,name:s,value:r,modified:!0,path:o};if(m6.test(i)&&v6.test(s))if(u>=0)this.parsedConfig.splice(u+1,0,f);else{let d={section:i,subsection:a,modified:!0,path:l};this.parsedConfig.push(d,f)}}}toString(){return this.parsedConfig.map(({line:t,section:r,subsection:n,name:i,value:a,modified:s=!1})=>s?i!=null&&a!=null?typeof a=="string"&&/[#;]/.test(a)?` ${i} = "${a}"`:` ${i} = ${a}`:n!=null?`[${r} "${n}"]`:`[${r}]`:t).join(` +`)}},We=class{static async get({fs:t,gitdir:r}){let n=await t.read(`${r}/config`,{encoding:"utf8"});return gp.from(n)}static async save({fs:t,gitdir:r,config:n}){await t.write(`${r}/config`,n.toString(),{encoding:"utf8"})}},Kc=e=>[`${e}`,`refs/${e}`,`refs/tags/${e}`,`refs/heads/${e}`,`refs/remotes/${e}`,`refs/remotes/${e}/HEAD`],E6=["config","description","index","shallow","commondir"],ip;async function yi(e,t){return ip===void 0&&(ip=new tl.default),ip.acquire(e,t)}var W=class e{static async updateRemoteRefs({fs:t,gitdir:r,remote:n,refs:i,symrefs:a,tags:s,refspecs:o=void 0,prune:l=!1,pruneTags:c=!1}){for(let v of i.values())if(!v.match(/[0-9a-f]{40}/))throw new _i(v);let u=await We.get({fs:t,gitdir:r});if(!o){if(o=await u.getall(`remote.${n}.fetch`),o.length===0)throw new nl(n);o.unshift(`+HEAD:refs/remotes/${n}/HEAD`)}let f=pp.from(o),d=new Map;if(c){let v=await e.listRefs({fs:t,gitdir:r,filepath:"refs/tags"});await e.deleteRefs({fs:t,gitdir:r,refs:v.map(y=>`refs/tags/${y}`)})}if(s){for(let v of i.keys())if(v.startsWith("refs/tags")&&!v.endsWith("^{}")&&!await e.exists({fs:t,gitdir:r,ref:v})){let y=i.get(v);d.set(v,y)}}let h=f.translate([...i.keys()]);for(let[v,y]of h){let b=i.get(v);d.set(y,b)}let p=f.translate([...a.keys()]);for(let[v,y]of p){let b=a.get(v),x=f.translateOne(b);x&&d.set(y,`ref: ${x}`)}let m=[];if(l){for(let v of f.localNamespaces()){let y=(await e.listRefs({fs:t,gitdir:r,filepath:v})).map(b=>`${v}/${b}`);for(let b of y)d.has(b)||m.push(b)}m.length>0&&await e.deleteRefs({fs:t,gitdir:r,refs:m})}for(let[v,y]of d)await yi(v,async()=>t.write($(r,v),`${y.trim()} +`,"utf8"));return{pruned:m}}static async writeRef({fs:t,gitdir:r,ref:n,value:i}){if(!i.match(/[0-9a-f]{40}/))throw new _i(i);await yi(n,async()=>t.write($(r,n),`${i.trim()} +`,"utf8"))}static async writeSymbolicRef({fs:t,gitdir:r,ref:n,value:i}){await yi(n,async()=>t.write($(r,n),`ref: ${i.trim()} +`,"utf8"))}static async deleteRef({fs:t,gitdir:r,ref:n}){return e.deleteRefs({fs:t,gitdir:r,refs:[n]})}static async deleteRefs({fs:t,gitdir:r,refs:n}){await Promise.all(n.map(o=>t.rm($(r,o))));let i=await yi("packed-refs",async()=>t.read(`${r}/packed-refs`,{encoding:"utf8"})),a=ru.from(i),s=a.refs.size;for(let o of n)a.refs.has(o)&&a.delete(o);a.refs.sizet.write(`${r}/packed-refs`,i,{encoding:"utf8"})))}static async resolve({fs:t,gitdir:r,ref:n,depth:i=void 0}){if(i!==void 0&&(i--,i===-1))return n;if(n.startsWith("ref: "))return n=n.slice(5),e.resolve({fs:t,gitdir:r,ref:n,depth:i});if(n.length===40&&/[0-9a-f]{40}/.test(n))return n;let a=await e.packedRefs({fs:t,gitdir:r}),s=Kc(n).filter(o=>!E6.includes(o));for(let o of s){let l=await yi(o,async()=>await t.read(`${r}/${o}`,{encoding:"utf8"})||a.get(o));if(l)return e.resolve({fs:t,gitdir:r,ref:l.trim(),depth:i})}throw new Le(n)}static async exists({fs:t,gitdir:r,ref:n}){try{return await e.expand({fs:t,gitdir:r,ref:n}),!0}catch(i){return!1}}static async expand({fs:t,gitdir:r,ref:n}){if(n.length===40&&/[0-9a-f]{40}/.test(n))return n;let i=await e.packedRefs({fs:t,gitdir:r}),a=Kc(n);for(let s of a)if(await yi(s,async()=>t.exists(`${r}/${s}`))||i.has(s))return s;throw new Le(n)}static async expandAgainstMap({ref:t,map:r}){let n=Kc(t);for(let i of n)if(await r.has(i))return i;throw new Le(t)}static resolveAgainstMap({ref:t,fullref:r=t,depth:n=void 0,map:i}){if(n!==void 0&&(n--,n===-1))return{fullref:r,oid:t};if(t.startsWith("ref: "))return t=t.slice(5),e.resolveAgainstMap({ref:t,fullref:r,depth:n,map:i});if(t.length===40&&/[0-9a-f]{40}/.test(t))return{fullref:r,oid:t};let a=Kc(t);for(let s of a){let o=i.get(s);if(o)return e.resolveAgainstMap({ref:o.trim(),fullref:s,depth:n,map:i})}throw new Le(t)}static async packedRefs({fs:t,gitdir:r}){let n=await yi("packed-refs",async()=>t.read(`${r}/packed-refs`,{encoding:"utf8"}));return ru.from(n).refs}static async listRefs({fs:t,gitdir:r,filepath:n}){let i=e.packedRefs({fs:t,gitdir:r}),a=null;try{a=await t.readdirDeep(`${r}/${n}`),a=a.map(s=>s.replace(`${r}/${n}/`,""))}catch(s){a=[]}for(let s of(await i).keys())s.startsWith(n)&&(s=s.replace(n+"/",""),a.includes(s)||a.push(s));return a.sort(f6),a}static async listBranches({fs:t,gitdir:r,remote:n}){return n?e.listRefs({fs:t,gitdir:r,filepath:`refs/remotes/${n}`}):e.listRefs({fs:t,gitdir:r,filepath:"refs/heads"})}static async listTags({fs:t,gitdir:r}){return(await e.listRefs({fs:t,gitdir:r,filepath:"refs/tags"})).filter(i=>!i.endsWith("^{}"))}};function A6(e,t){return fu(jw(e),jw(t))}function jw(e){return e.mode==="040000"?e.path+"/":e.path}function l2(e){switch(e){case"040000":return"tree";case"100644":return"blob";case"100755":return"blob";case"120000":return"blob";case"160000":return"commit"}throw new le(`Unexpected GitTree entry mode: ${e}`)}function k6(e){let t=[],r=0;for(;r`${t.mode} ${t.type} ${t.oid} ${t.path}`).join(` +`)}toObject(){let t=[...this._entries];return t.sort(A6),Buffer.concat(t.map(r=>{let n=Buffer.from(r.mode.replace(/^0/,"")),i=Buffer.from(" "),a=Buffer.from(r.path,"utf8"),s=Buffer.from([0]),o=Buffer.from(r.oid,"hex");return Buffer.concat([n,i,a,s,o])}))}entries(){return this._entries}*[Symbol.iterator](){for(let t of this._entries)yield t}},xi=class{static wrap({type:t,object:r}){return Buffer.concat([Buffer.from(`${t} ${r.byteLength.toString()}\0`),Buffer.from(r)])}static unwrap(t){let r=t.indexOf(32),n=t.indexOf(0),i=t.slice(0,r).toString("utf8"),a=t.slice(r+1,n).toString("utf8"),s=t.length-(n+1);if(parseInt(a)!==s)throw new le(`Length mismatch: expected ${a} bytes but got ${s} instead.`);return{type:i,object:Buffer.from(t.slice(n+1))}}};async function P6({fs:e,gitdir:t,oid:r}){let n=`objects/${r.slice(0,2)}/${r.slice(2)}`,i=await e.read(`${t}/${n}`);return i?{object:i,format:"deflated",source:n}:null}function R6(e,t){let r=new Fr(e),n=Hw(r);if(n!==t.byteLength)throw new le(`applyDelta expected source buffer to be ${n} bytes but the provided buffer was ${t.length} bytes`);let i=Hw(r),a,s=Gw(r,t);if(s.byteLength===i)a=s;else{a=Buffer.alloc(i);let o=new Fr(a);for(o.copy(s);!r.eof();)o.copy(Gw(r,t));let l=o.tell();if(i!==l)throw new le(`applyDelta expected target buffer to be ${i} bytes but the resulting buffer was ${l} bytes`)}return a}function Hw(e){let t=0,r=0,n=null;do n=e.readUInt8(),t|=(n&127)<>=1,i+=8;return n}function Gw(e,t){let r=e.readUInt8(),n=128,i=15,a=112;if(r&n){let s=Uw(e,r&i,4),o=Uw(e,(r&a)>>4,3);return o===0&&(o=65536),t.slice(s,s+o)}else return e.slice(r)}function M6(e){let t=[e];return{next(){return Promise.resolve({done:t.length===0,value:t.pop()})},return(){return t=[],{}},[Symbol.asyncIterator](){return this}}}function c2(e){return e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]?e[Symbol.iterator]():e.next?e:M6(e)}var iu=class{constructor(t){if(typeof Buffer=="undefined")throw new Error("Missing Buffer dependency");this.stream=c2(t),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}async byte(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(1),this.buffer[this.undoCursor]}async chunk(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(this.buffer.length),this.buffer.slice(this.undoCursor,this.cursor)}async read(t){if(!this.eof())return this.started||await this._init(),this.cursor+t>this.buffer.length&&(this._trim(),await this._accumulate(t)),this._moveCursor(t),this.buffer.slice(this.undoCursor,this.cursor)}async skip(t){this.eof()||(this.started||await this._init(),this.cursor+t>this.buffer.length&&(this._trim(),await this._accumulate(t)),this._moveCursor(t))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:t,value:r}=await this.stream.next();return t&&(this._ended=!0,!r)?Buffer.alloc(0):(r&&(r=Buffer.from(r)),r)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(t){this.undoCursor=this.cursor,this.cursor+=t,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(t){if(this._ended)return;let r=[this.buffer];for(;this.cursor+t>O6(r);){let n=await this._next();if(this._ended)break;r.push(n)}this.buffer=Buffer.concat(r)}async _loadnext(){this._discardedBytes+=this.buffer.length,this.undoCursor=0,this.cursor=0,this.buffer=await this._next()}async _init(){this.buffer=await this._next()}};function O6(e){return e.reduce((t,r)=>t+r.length,0)}async function I6(e,t){let r=new iu(e),n=await r.read(4);if(n=n.toString("utf8"),n!=="PACK")throw new le(`Invalid PACK header '${n}'`);let i=await r.read(4);if(i=i.readUInt32BE(0),i!==2)throw new le(`Invalid packfile version: ${i}`);let a=await r.read(4);if(a=a.readUInt32BE(0),!(a<1))for(;!r.eof()&&a--;){let s=r.tell(),{type:o,length:l,ofs:c,reference:u}=await F6(r),f=new uu.default.Inflate;for(;!f.result;){let d=await r.chunk();if(!d)break;if(f.push(d,!1),f.err)throw new le(`Pako error: ${f.msg}`);if(f.result){if(f.result.length!==l)throw new le("Inflated object size is different from that stated in packfile.");await r.undo(),await r.read(d.length-f.strm.avail_in);let h=r.tell();await t({data:f.result,type:o,num:a,offset:s,end:h,reference:u,ofs:c})}}}}async function F6(e){let t=await e.byte(),r=t>>4&7,n=t&15;if(t&128){let s=4;do t=await e.byte(),n|=(t&127)<i+1<<7|a,-1)}function N6(e,t){let r=t,n=4,i=null;do i=e.readUInt8(),r|=(i&127)<2048*1024*1024)throw new le("To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.");n.seek(n.tell()+4*255);let s=n.readUInt32BE(),o=[];for(let u=0;u{u===null&&(u=E);let _=Math.floor((u-E)*100/u);_!==f&&n&&await n({phase:"Receiving objects",loaded:u-E,total:u}),f=_,y=i[y],["commit","tree","blob","tag"].includes(y)?a[x]={type:y,offset:x}:y==="ofs-delta"?a[x]={type:y,offset:x}:y==="ref-delta"&&(a[x]={type:y,offset:x})});let d=Object.keys(a).map(Number);for(let[v,y]of d.entries()){let b=v+1===d.length?t.byteLength-20:d[v+1],x=a[y],E=t2.default.buf(t.slice(y,b))>>>0;x.end=b,x.crc=E}let h=new e({pack:Promise.resolve(t),packfileSha:s,crcs:l,hashes:o,offsets:c,getExternalRefDelta:r});f=null;let p=0,m=[0,0,0,0,0,0,0,0,0,0,0,0];for(let v in a){v=Number(v);let y=Math.floor(p*100/u);y!==f&&n&&await n({phase:"Resolving deltas",loaded:p,total:u}),p++,f=y;let b=a[v];if(!b.oid)try{h.readDepth=0,h.externalReadDepth=0;let{type:x,object:E}=await h.readSlice({start:v});m[h.readDepth]+=1;let _=await Vn(xi.wrap({type:x,object:E}));b.oid=_,o.push(_),c.set(_,v),l[_]=b.crc}catch(x){continue}}return o.sort(),h}async toBuffer(){let t=[],r=(c,u)=>{t.push(Buffer.from(c,u))};r("ff744f63","hex"),r("00000002","hex");let n=new Fr(Buffer.alloc(256*4));for(let c=0;c<256;c++){let u=0;for(let f of this.hashes)parseInt(f.slice(0,2),16)<=c&&u++;n.writeUInt32BE(u)}t.push(n.buffer);for(let c of this.hashes)r(c,"hex");let i=new Fr(Buffer.alloc(this.hashes.length*4));for(let c of this.hashes)i.writeUInt32BE(this.crcs[c]);t.push(i.buffer);let a=new Fr(Buffer.alloc(this.hashes.length*4));for(let c of this.hashes)a.writeUInt32BE(this.offsets.get(c));t.push(a.buffer),r(this.packfileSha,"hex");let s=Buffer.concat(t),o=await Vn(s),l=Buffer.alloc(20);return l.write(o,"hex"),Buffer.concat([s,l])}async load({pack:t}){this.pack=t}async unload(){this.pack=null}async read({oid:t}){if(!this.offsets.get(t)){if(this.getExternalRefDelta)return this.externalReadDepth++,this.getExternalRefDelta(t);throw new le(`Could not read object ${t} from packfile`)}let r=this.offsets.get(t);return this.readSlice({start:r})}async readSlice({start:t}){if(this.offsetCache[t])return Object.assign({},this.offsetCache[t]);this.readDepth++;let r={16:"commit",32:"tree",48:"blob",64:"tag",96:"ofs_delta",112:"ref_delta"};if(!this.pack)throw new le("Tried to read from a GitPackIndex with no packfile loaded into memory");let n=(await this.pack).slice(t),i=new Fr(n),a=i.readUInt8(),s=a&112,o=r[s];if(o===void 0)throw new le("Unrecognized type: 0b"+s.toString(2));let l=a&15,c=l;a&128&&(c=N6(i,l));let f=null,d=null;if(o==="ofs_delta"){let p=D6(i),m=t-p;({object:f,type:o}=await this.readSlice({start:m}))}if(o==="ref_delta"){let p=i.slice(20).toString("hex");({object:f,type:o}=await this.read({oid:p}))}let h=n.slice(i.tell());if(d=Buffer.from(await u2(h)),d.byteLength!==c)throw new le(`Packfile told us object would have length ${c} but it had length ${d.byteLength}`);return f&&(d=Buffer.from(R6(d,f))),this.readDepth>3&&(this.offsetCache[t]={type:o,object:d}),{type:o,format:"content",object:d}}},Jc=Symbol("PackfileCache");async function B6({fs:e,filename:t,getExternalRefDelta:r,emitter:n,emitterPrefix:i}){let a=await e.read(t);return il.fromIdx({idx:a,getExternalRefDelta:r})}function Ap({fs:e,cache:t,filename:r,getExternalRefDelta:n,emitter:i,emitterPrefix:a}){t[Jc]||(t[Jc]=new Map);let s=t[Jc].get(r);return s||(s=B6({fs:e,filename:r,getExternalRefDelta:n,emitter:i,emitterPrefix:a}),t[Jc].set(r,s)),s}async function j6({fs:e,cache:t,gitdir:r,oid:n,format:i="content",getExternalRefDelta:a}){let s=await e.readdir($(r,"objects/pack"));s=s.filter(o=>o.endsWith(".idx"));for(let o of s){let l=`${r}/objects/pack/${o}`,c=await Ap({fs:e,cache:t,filename:l,getExternalRefDelta:a});if(c.error)throw new le(c.error);if(c.offsets.has(n)){if(!c.pack){let f=l.replace(/idx$/,"pack");c.pack=e.read(f)}let u=await c.read({oid:n,getExternalRefDelta:a});return u.format="content",u.source=`objects/pack/${o.replace(/idx$/,"pack")}`,u}}return null}async function qe({fs:e,cache:t,gitdir:r,oid:n,format:i="content"}){let a=u=>qe({fs:e,cache:t,gitdir:r,oid:u}),s;if(n==="4b825dc642cb6eb9a060e54bf8d69288fbee4904"&&(s={format:"wrapped",object:Buffer.from("tree 0\0")}),s||(s=await P6({fs:e,gitdir:r,oid:n})),!s){if(s=await j6({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:a}),!s)throw new Le(n);return s}if(i==="deflated"||(s.format==="deflated"&&(s.object=Buffer.from(await u2(s.object)),s.format="wrapped"),i==="wrapped"))return s;let o=await Vn(s.object);if(o!==n)throw new le(`SHA check failed! Expected ${n}, computed ${o}`);let{object:l,type:c}=xi.unwrap(s.object);if(s.type=c,s.object=l,s.format="content",i==="content")return s;throw new le(`invalid requested format "${i}"`)}var en=class e extends Se{constructor(t,r,n=!0){super(`Failed to create ${t} at ${r} because it already exists.${n?` (Hint: use 'force: true' parameter to overwrite existing ${t}.)`:""}`),this.code=this.name=e.code,this.data={noun:t,where:r,canForce:n}}};en.code="AlreadyExistsError";var al=class e extends Se{constructor(t,r,n){super(`Found multiple ${t} matching "${r}" (${n.join(", ")}). Use a longer abbreviation length to disambiguate them.`),this.code=this.name=e.code,this.data={nouns:t,short:r,matches:n}}};al.code="AmbiguousError";var sl=class e extends Se{constructor(t){super(`Your local changes to the following files would be overwritten by checkout: ${t.join(", ")}`),this.code=this.name=e.code,this.data={filepaths:t}}};sl.code="CheckoutConflictError";var ol=class e extends Se{constructor(t,r){super(`Failed to checkout "${t}" because commit ${r} is not available locally. Do a git fetch to make the branch available locally.`),this.code=this.name=e.code,this.data={ref:t,oid:r}}};ol.code="CommitNotFetchedError";var ll=class e extends Se{constructor(){super("Empty response from git server."),this.code=this.name=e.code,this.data={}}};ll.code="EmptyServerResponseError";var cl=class e extends Se{constructor(){super("A simple fast-forward merge was not possible."),this.code=this.name=e.code,this.data={}}};cl.code="FastForwardError";var ul=class e extends Se{constructor(t,r){super(`One or more branches were not updated: ${t}`),this.code=this.name=e.code,this.data={prettyDetails:t,result:r}}};ul.code="GitPushError";var ms=class e extends Se{constructor(t,r,n){super(`HTTP Error: ${t} ${r}`),this.code=this.name=e.code,this.data={statusCode:t,statusMessage:r,response:n}}};ms.code="HttpError";var Si=class e extends Se{constructor(t){let r="invalid filepath";t==="leading-slash"||t==="trailing-slash"?r='"filepath" parameter should not include leading or trailing directory separators because these can cause problems on some platforms.':t==="directory"&&(r='"filepath" should not be a directory.'),super(r),this.code=this.name=e.code,this.data={reason:t}}};Si.code="InvalidFilepathError";var Wn=class e extends Se{constructor(t,r){super(`"${t}" would be an invalid git reference. (Hint: a valid alternative would be "${r}".)`),this.code=this.name=e.code,this.data={ref:t,suggestion:r}}};Wn.code="InvalidRefNameError";var fl=class e extends Se{constructor(t){super(`Maximum search depth of ${t} exceeded.`),this.code=this.name=e.code,this.data={depth:t}}};fl.code="MaxDepthError";var gs=class e extends Se{constructor(){super("Merges with conflicts are not supported yet."),this.code=this.name=e.code,this.data={}}};gs.code="MergeNotSupportedError";var vs=class e extends Se{constructor(t,r,n,i){super(`Automatic merge failed with one or more merge conflicts in the following files: ${t.toString()}. Fix conflicts then commit the result.`),this.code=this.name=e.code,this.data={filepaths:t,bothModified:r,deleteByUs:n,deleteByTheirs:i}}};vs.code="MergeConflictError";var Vt=class e extends Se{constructor(t){super(`No name was provided for ${t} in the argument or in the .git/config file.`),this.code=this.name=e.code,this.data={role:t}}};Vt.code="MissingNameError";var er=class e extends Se{constructor(t){super(`The function requires a "${t}" parameter but none was provided.`),this.code=this.name=e.code,this.data={parameter:t}}};er.code="MissingParameterError";var dl=class e extends Se{constructor(t){super('There are multiple errors that were thrown by the method. Please refer to the "errors" property to see more'),this.code=this.name=e.code,this.data={errors:t},this.errors=t}};dl.code="MultipleGitError";var ua=class e extends Se{constructor(t,r){super(`Expected "${t}" but received "${r}".`),this.code=this.name=e.code,this.data={expected:t,actual:r}}};ua.code="ParseError";var ys=class e extends Se{constructor(t){let r="";t==="not-fast-forward"?r=" because it was not a simple fast-forward":t==="tag-exists"&&(r=" because tag already exists"),super(`Push rejected${r}. Use "force: true" to override.`),this.code=this.name=e.code,this.data={reason:t}}};ys.code="PushRejectedError";var wi=class e extends Se{constructor(t,r){super(`Remote does not support the "${t}" so the "${r}" parameter cannot be used.`),this.code=this.name=e.code,this.data={capability:t,parameter:r}}};wi.code="RemoteCapabilityError";var hl=class e extends Se{constructor(t,r){super(`Remote did not reply using the "smart" HTTP protocol. Expected "001e# service=git-upload-pack" but received: ${t}`),this.code=this.name=e.code,this.data={preview:t,response:r}}};hl.code="SmartHttpError";var pl=class e extends Se{constructor(t,r,n){super(`Git remote "${t}" uses an unrecognized transport protocol: "${r}"`),this.code=this.name=e.code,this.data={url:t,transport:r,suggestion:n}}};pl.code="UnknownTransportError";var ml=class e extends Se{constructor(t){super(`Cannot parse remote URL: "${t}"`),this.code=this.name=e.code,this.data={url:t}}};ml.code="UrlParseError";var ws=class e extends Se{constructor(){super("The operation was canceled."),this.code=this.name=e.code,this.data={}}};ws.code="UserCanceledError";var gl=class e extends Se{constructor(t){super(`Could not merge index: Entry for '${t}' is not up to date. Either reset the index entry to HEAD, or stage your unstaged changes.`),this.code=this.name=e.code,this.data={filepath:t}}};gl.code="IndexResetError";var vl=class e extends Se{constructor(t){super(`"${t}" does not point to any commit. You're maybe working on a repository with no commits yet. `),this.code=this.name=e.code,this.data={ref:t}}};vl.code="NoCommitError";var wl=Object.freeze({__proto__:null,AlreadyExistsError:en,AmbiguousError:al,CheckoutConflictError:sl,CommitNotFetchedError:ol,EmptyServerResponseError:ll,FastForwardError:cl,GitPushError:ul,HttpError:ms,InternalError:le,InvalidFilepathError:Si,InvalidOidError:_i,InvalidRefNameError:Wn,MaxDepthError:fl,MergeNotSupportedError:gs,MergeConflictError:vs,MissingNameError:Vt,MissingParameterError:er,MultipleGitError:dl,NoRefspecError:nl,NotFoundError:Le,ObjectTypeError:zt,ParseError:ua,PushRejectedError:ys,RemoteCapabilityError:wi,SmartHttpError:hl,UnknownTransportError:pl,UnsafeFilepathError:ds,UrlParseError:ml,UserCanceledError:ws,UnmergedPathsError:rl,IndexResetError:gl,NoCommitError:vl});function vp({name:e,email:t,timestamp:r,timezoneOffset:n}){return n=H6(n),`${e} <${t}> ${r} ${n}`}function H6(e){let t=U6(G6(e));e=Math.abs(e);let r=Math.floor(e/60);e-=r*60;let n=String(r),i=String(e);return n.length<2&&(n="0"+n),i.length<2&&(i="0"+i),(t===-1?"-":"+")+n+i}function U6(e){return Math.sign(e)||(Object.is(e,-0)?-1:1)}function G6(e){return e===0?e:-e}function zn(e){return e=e.replace(/\r/g,""),e=e.replace(/^\n+/,""),e=e.replace(/\n+$/,"")+` +`,e}function au(e){let[,t,r,n,i]=e.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:t,email:r,timestamp:Number(n),timezoneOffset:z6(i)}}function z6(e){let[,t,r,n]=e.match(/(\+|-)(\d\d)(\d\d)/);return n=(t==="+"?1:-1)*(Number(r)*60+Number(n)),V6(n)}function V6(e){return e===0?e:-e}var pr=class e{constructor(t){if(typeof t=="string")this._tag=t;else if(Buffer.isBuffer(t))this._tag=t.toString("utf8");else if(typeof t=="object")this._tag=e.render(t);else throw new le("invalid type passed to GitAnnotatedTag constructor")}static from(t){return new e(t)}static render(t){return`object ${t.object} type ${t.type} tag ${t.tag} -tagger ${gp(t.tagger)} +tagger ${vp(t.tagger)} ${t.message} ${t.gpgsig?t.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf(` @@ -37,49 +37,49 @@ ${t.gpgsig?t.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexO `)+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){let t=this.justHeaders().split(` `),r=[];for(let i of t)i[0]===" "?r[r.length-1]+=` -`+i.slice(1):r.push(i);let n={};for(let i of r){let a=i.slice(0,i.indexOf(" ")),s=i.slice(i.indexOf(" ")+1);Array.isArray(n[a])?n[a].push(s):n[a]=s}return n.tagger&&(n.tagger=ou(n.tagger)),n.committer&&(n.committer=ou(n.committer)),n}withoutSignature(){let t=Un(this._tag);return t.indexOf(` +`+i.slice(1):r.push(i);let n={};for(let i of r){let a=i.slice(0,i.indexOf(" ")),s=i.slice(i.indexOf(" ")+1);Array.isArray(n[a])?n[a].push(s):n[a]=s}return n.tagger&&(n.tagger=au(n.tagger)),n.committer&&(n.committer=au(n.committer)),n}withoutSignature(){let t=zn(this._tag);return t.indexOf(` -----BEGIN PGP SIGNATURE-----`)===-1?t:t.slice(0,t.lastIndexOf(` -----BEGIN PGP SIGNATURE-----`))}gpgsig(){if(this._tag.indexOf(` ------BEGIN PGP SIGNATURE-----`)===-1)return;let t=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+27);return Un(t)}payload(){return this.withoutSignature()+` -`}toObject(){return Buffer.from(this._tag,"utf8")}static async sign(t,r,n){let i=t.payload(),{signature:a}=await r({payload:i,secretKey:n});a=Un(a);let s=i+a;return e.from(s)}};function ap(e){return e.trim().split(` +-----BEGIN PGP SIGNATURE-----`)===-1)return;let t=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+27);return zn(t)}payload(){return this.withoutSignature()+` +`}toObject(){return Buffer.from(this._tag,"utf8")}static async sign(t,r,n){let i=t.payload(),{signature:a}=await r({payload:i,secretKey:n});a=zn(a);let s=i+a;return e.from(s)}};function sp(e){return e.trim().split(` `).map(t=>" "+t).join(` `)+` -`}function UM(e){return e.split(` +`}function W6(e){return e.split(` `).map(t=>t.replace(/^ /,"")).join(` -`)}var tr=class e{constructor(t){if(typeof t=="string")this._commit=t;else if(Buffer.isBuffer(t))this._commit=t.toString("utf8");else if(typeof t=="object")this._commit=e.render(t);else throw new le("invalid type passed to GitCommit constructor")}static fromPayloadSignature({payload:t,signature:r}){let n=e.justHeaders(t),i=e.justMessage(t),a=Un(n+` -gpgsig`+ap(r)+` -`+i);return new e(a)}static from(t){return new e(t)}toObject(){return Buffer.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return e.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(t){return Un(t.slice(t.indexOf(` +`)}var rr=class e{constructor(t){if(typeof t=="string")this._commit=t;else if(Buffer.isBuffer(t))this._commit=t.toString("utf8");else if(typeof t=="object")this._commit=e.render(t);else throw new le("invalid type passed to GitCommit constructor")}static fromPayloadSignature({payload:t,signature:r}){let n=e.justHeaders(t),i=e.justMessage(t),a=zn(n+` +gpgsig`+sp(r)+` +`+i);return new e(a)}static from(t){return new e(t)}toObject(){return Buffer.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return e.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(t){return zn(t.slice(t.indexOf(` `)+2))}static justHeaders(t){return t.slice(0,t.indexOf(` `))}parseHeaders(){let t=e.justHeaders(this._commit).split(` `),r=[];for(let i of t)i[0]===" "?r[r.length-1]+=` -`+i.slice(1):r.push(i);let n={parent:[]};for(let i of r){let a=i.slice(0,i.indexOf(" ")),s=i.slice(i.indexOf(" ")+1);Array.isArray(n[a])?n[a].push(s):n[a]=s}return n.author&&(n.author=ou(n.author)),n.committer&&(n.committer=ou(n.committer)),n}static renderHeaders(t){let r="";if(t.tree?r+=`tree ${t.tree} +`+i.slice(1):r.push(i);let n={parent:[]};for(let i of r){let a=i.slice(0,i.indexOf(" ")),s=i.slice(i.indexOf(" ")+1);Array.isArray(n[a])?n[a].push(s):n[a]=s}return n.author&&(n.author=au(n.author)),n.committer&&(n.committer=au(n.committer)),n}static renderHeaders(t){let r="";if(t.tree?r+=`tree ${t.tree} `:r+=`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 `,t.parent){if(t.parent.length===void 0)throw new le("commit 'parent' property should be an array");for(let a of t.parent)r+=`parent ${a} -`}let n=t.author;r+=`author ${gp(n)} -`;let i=t.committer||t.author;return r+=`committer ${gp(i)} -`,t.gpgsig&&(r+="gpgsig"+ap(t.gpgsig)),r}static render(t){return e.renderHeaders(t)+` -`+Un(t.message)}render(){return this._commit}withoutSignature(){let t=Un(this._commit);if(t.indexOf(` +`}let n=t.author;r+=`author ${vp(n)} +`;let i=t.committer||t.author;return r+=`committer ${vp(i)} +`,t.gpgsig&&(r+="gpgsig"+sp(t.gpgsig)),r}static render(t){return e.renderHeaders(t)+` +`+zn(t.message)}render(){return this._commit}withoutSignature(){let t=zn(this._commit);if(t.indexOf(` gpgsig`)===-1)return t;let r=t.slice(0,t.indexOf(` gpgsig`)),n=t.slice(t.indexOf(`-----END PGP SIGNATURE----- -`)+28);return Un(r+` -`+n)}isolateSignature(){let t=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+27);return UM(t)}static async sign(t,r,n){let i=t.withoutSignature(),a=e.justMessage(t._commit),{signature:s}=await r({payload:i,secretKey:n});s=Un(s);let c=e.justHeaders(t._commit)+` -gpgsig`+ap(s)+` -`+a;return e.from(c)}};async function vs({fs:e,cache:t,gitdir:r,oid:n}){if(n==="4b825dc642cb6eb9a060e54bf8d69288fbee4904")return{tree:er.from([]),oid:n};let{type:i,object:a}=await qe({fs:e,cache:t,gitdir:r,oid:n});if(i==="tag")return n=pr.from(a).parse().object,vs({fs:e,cache:t,gitdir:r,oid:n});if(i==="commit")return n=tr.from(a).parse().tree,vs({fs:e,cache:t,gitdir:r,oid:n});if(i!=="tree")throw new Gt(n,i,"tree");return{tree:er.from(a),oid:n}}var vp=class{constructor({fs:t,gitdir:r,ref:n,cache:i}){this.fs=t,this.cache=i,this.gitdir=r,this.mapPromise=(async()=>{let s=new Map,o;try{o=await q.resolve({fs:t,gitdir:r,ref:n})}catch(l){l instanceof Ne&&(o="4b825dc642cb6eb9a060e54bf8d69288fbee4904")}let c=await vs({fs:t,cache:this.cache,gitdir:r,oid:o});return c.type="tree",c.mode="40000",s.set(".",c),s})();let a=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(t){let r=t._fullpath,{fs:n,cache:i,gitdir:a}=this,s=await this.mapPromise,o=s.get(r);if(!o)throw new Error(`No obj for ${r}`);let c=o.oid;if(!c)throw new Error(`No oid for obj ${JSON.stringify(o)}`);if(o.type!=="tree")return null;let{type:l,object:u}=await qe({fs:n,cache:i,gitdir:a,oid:c});if(l!==o.type)throw new Gt(c,l,o.type);let f=er.from(u);for(let d of f)s.set($(r,d.path),d);return f.entries().map(d=>$(r,d.path))}async type(t){if(t._type===!1){let r=await this.mapPromise,{type:n}=r.get(t._fullpath);t._type=n}return t._type}async mode(t){if(t._mode===!1){let r=await this.mapPromise,{mode:n}=r.get(t._fullpath);t._mode=r2(parseInt(n,8))}return t._mode}async stat(t){}async content(t){if(t._content===!1){let r=await this.mapPromise,{fs:n,cache:i,gitdir:a}=this,o=r.get(t._fullpath).oid,{type:c,object:l}=await qe({fs:n,cache:i,gitdir:a,oid:o});c!=="blob"?t._content=void 0:t._content=new Uint8Array(l)}return t._content}async oid(t){if(t._oid===!1){let n=(await this.mapPromise).get(t._fullpath);t._oid=n.oid}return t._oid}};function wi({ref:e="HEAD"}={}){let t=Object.create(null);return Object.defineProperty(t,pu,{value:function({fs:r,gitdir:n,cache:i}){return new vp({fs:r,gitdir:n,ref:e,cache:i})}}),Object.freeze(t),t}var yp=class{constructor({fs:t,dir:r,gitdir:n,cache:i}){this.fs=t,this.cache=i,this.dir=r,this.gitdir=n;let a=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(t){let r=t._fullpath,{fs:n,dir:i}=this,a=await n.readdir($(i,r));return a===null?null:a.map(s=>$(r,s))}async type(t){return t._type===!1&&await t.stat(),t._type}async mode(t){return t._mode===!1&&await t.stat(),t._mode}async stat(t){if(t._stat===!1){let{fs:r,dir:n}=this,i=await r.lstat(`${n}/${t._fullpath}`);if(!i)throw new Error(`ENOENT: no such file or directory, lstat '${t._fullpath}'`);let a=i.isDirectory()?"tree":"blob";a==="blob"&&!i.isFile()&&!i.isSymbolicLink()&&(a="special"),t._type=a,i=us(i),t._mode=i.mode,i.size===-1&&t._actualSize&&(i.size=t._actualSize),t._stat=i}return t._stat}async content(t){if(t._content===!1){let{fs:r,dir:n,gitdir:i}=this;if(await t.type()==="tree")t._content=void 0;else{let s=await(await We.get({fs:r,gitdir:i})).get("core.autocrlf"),o=await r.read(`${n}/${t._fullpath}`,{autocrlf:s});t._actualSize=o.length,t._stat&&t._stat.size===-1&&(t._stat.size=t._actualSize),t._content=new Uint8Array(o)}}return t._content}async oid(t){if(t._oid===!1){let{fs:r,gitdir:n,cache:i}=this,a;await mt.acquire({fs:r,gitdir:n,cache:i},async function(s){let o=s.entriesMap.get(t._fullpath),c=await t.stat(),u=await(await We.get({fs:r,gitdir:n})).get("core.filemode"),f=typeof process!="undefined"?process.platform!=="win32":!0;!o||ru(c,o,u,f)?await t.content()===void 0?a=void 0:(a=await Gn(_i.wrap({type:"blob",object:await t.content()})),o&&a===o.oid&&(!u||c.mode===o.mode)&&ru(c,o,u,f)&&s.insert({filepath:t._fullpath,stats:c,oid:a})):a=o.oid}),t._oid=a}return t._oid}};function gu(){let e=Object.create(null);return Object.defineProperty(e,pu,{value:function({fs:t,dir:r,gitdir:n,cache:i}){return new yp({fs:t,dir:r,gitdir:n,cache:i})}}),Object.freeze(e),e}function GM(e,t){let r=t-e;return Array.from({length:r},(n,i)=>e+i)}var l2=typeof Array.prototype.flat=="undefined"?e=>e.reduce((t,r)=>t.concat(r),[]):e=>e.flat(),wp=class{constructor(){this.value=null}consider(t){t!=null&&(this.value===null?this.value=t:tl,reduce:s=async(c,l)=>{let u=l2(l);return c!==void 0&&u.unshift(c),u},iterate:o=(c,l)=>Promise.all([...l].map(c))}){let c=i.map(h=>h[pu]({fs:e,dir:r,gitdir:n,cache:t})),l=new Array(c.length).fill("."),u=GM(0,c.length),f=async h=>{u.map(v=>{h[v]=h[v]&&new c[v].ConstructEntry(h[v])});let m=(await Promise.all(u.map(v=>h[v]?c[v].readdir(h[v]):[]))).map(v=>v===null?[]:v).map(v=>v[Symbol.iterator]());return{entries:h,children:zM(m)}},d=async h=>{let{entries:p,children:m}=await f(h),v=p.find(b=>b&&b._fullpath)._fullpath,y=await a(v,p);if(y!==null){let b=await o(d,m);return b=b.filter(x=>x!==void 0),s(y,b)}};return d(l)}async function bp(e,t){let r=await e.readdir(t);r==null?await e.rm(t):r.length?await Promise.all(r.map(n=>{let i=$(t,n);return e.lstat(i).then(a=>{if(a)return a.isDirectory()?bp(e,i):e.rm(i)})})).then(()=>e.rmdir(t)):await e.rmdir(t)}function VM(e){return WM(e)&&Hw(e.then)&&Hw(e.catch)}function WM(e){return e&&typeof e=="object"}function Hw(e){return typeof e=="function"}function Uw(e){return VM((r=>{try{return r.readFile().catch(n=>n)}catch(n){return n}})(e))}var Gw=["readFile","writeFile","mkdir","rmdir","unlink","stat","lstat","readdir","readlink","symlink"];function zw(e,t){if(Uw(t))for(let r of Gw)e[`_${r}`]=t[r].bind(t);else for(let r of Gw)e[`_${r}`]=(0,tu.default)(t[r].bind(t));Uw(t)?t.rm?e._rm=t.rm.bind(t):t.rmdir.length>1?e._rm=t.rmdir.bind(t):e._rm=bp.bind(null,e):t.rm?e._rm=(0,tu.default)(t.rm.bind(t)):t.rmdir.length>2?e._rm=(0,tu.default)(t.rmdir.bind(t)):e._rm=bp.bind(null,e)}var X=class{constructor(t){if(typeof t._original_unwrapped_fs!="undefined")return t;let r=Object.getOwnPropertyDescriptor(t,"promises");r&&r.enumerable?zw(this,t.promises):zw(this,t),this._original_unwrapped_fs=t}async exists(t,r={}){try{return await this._stat(t),!0}catch(n){if(n.code==="ENOENT"||n.code==="ENOTDIR")return!1;throw console.log('Unhandled error in "FileSystem.exists()" function',n),n}}async read(t,r={}){try{let n=await this._readFile(t,r);if(r.autocrlf==="true")try{n=new TextDecoder("utf8",{fatal:!0}).decode(n),n=n.replace(/\r\n/g,` -`),n=new TextEncoder().encode(n)}catch(i){}return typeof n!="string"&&(n=Buffer.from(n)),n}catch(n){return null}}async write(t,r,n={}){try{await this._writeFile(t,r,n);return}catch(i){await this.mkdir(fs(t)),await this._writeFile(t,r,n)}}async mkdir(t,r=!1){try{await this._mkdir(t);return}catch(n){if(n===null||n.code==="EEXIST")return;if(r)throw n;if(n.code==="ENOENT"){let i=fs(t);if(i==="."||i==="/"||i===t)throw n;await this.mkdir(i),await this.mkdir(t,!0)}}}async rm(t){try{await this._unlink(t)}catch(r){if(r.code!=="ENOENT")throw r}}async rmdir(t,r){try{r&&r.recursive?await this._rm(t,r):await this._rmdir(t)}catch(n){if(n.code!=="ENOENT")throw n}}async readdir(t){try{let r=await this._readdir(t);return r.sort(hu),r}catch(r){return r.code==="ENOTDIR"?null:[]}}async readdirDeep(t){let r=await this._readdir(t);return(await Promise.all(r.map(async i=>{let a=t+"/"+i;return(await this._stat(a)).isDirectory()?this.readdirDeep(a):a}))).reduce((i,a)=>i.concat(a),[])}async lstat(t){try{return await this._lstat(t)}catch(r){if(r.code==="ENOENT")return null;throw r}}async readlink(t,r={encoding:"buffer"}){try{let n=await this._readlink(t,r);return Buffer.isBuffer(n)?n:Buffer.from(n)}catch(n){if(n.code==="ENOENT")return null;throw n}}async writelink(t,r){return this._symlink(r.toString("utf8"),t)}};function C(e,t){if(t===void 0)throw new Qt(e)}async function lu(e,t){return!e&&!t?!1:e&&!t||!e&&t?!0:!(await e.type()==="tree"&&await t.type()==="tree"||await e.type()===await t.type()&&await e.mode()===await t.mode()&&await e.oid()===await t.oid())}async function qM({fs:e,dir:t,gitdir:r=$(t,".git"),commit:n="HEAD",cache:i={}}){try{C("fs",e),C("dir",t),C("gitdir",r);let a=new X(e),s=[wi({ref:n}),gu(),mu()],o=[];await mt.acquire({fs:a,gitdir:r,cache:i},async function(l){o=l.unmergedPaths});let c=await ys({fs:a,cache:i,dir:t,gitdir:r,trees:s,map:async function(l,[u,f,d]){let h=!await lu(f,d),p=o.includes(l),m=!await lu(d,u);if(h||p)return u?{path:l,mode:await u.mode(),oid:await u.oid(),type:await u.type(),content:await u.content()}:void 0;if(m)return!1;throw new hl(l)}});await mt.acquire({fs:a,gitdir:r,cache:i},async function(l){for(let u of c)if(u!==!1){if(!u){await a.rmdir(`${t}/${u.path}`,{recursive:!0}),l.delete({filepath:u.path});continue}if(u.type==="blob"){let f=new TextDecoder().decode(u.content);await a.write(`${t}/${u.path}`,f,{mode:u.mode}),l.insert({filepath:u.path,oid:u.oid,stage:0})}}})}catch(a){throw a.caller="git.abortMerge",a}}var ws=class{static async isIgnored({fs:t,dir:r,gitdir:n=$(r,".git"),filepath:i}){if(nu(i)===".git")return!0;if(i===".")return!1;let a="",s=$(n,"info","exclude");await t.exists(s)&&(a=await t.read(s,"utf8"));let o=[{gitignore:$(r,".gitignore"),filepath:i}],c=i.split("/").filter(Boolean);for(let u=1;u_p({dir:t,gitdir:r,fs:o,filepath:n,index:c,force:a,parallel:s}))}catch(o){throw o.caller="git.add",o}}async function _p({dir:e,gitdir:t,fs:r,filepath:n,index:i,force:a,parallel:s}){n=Array.isArray(n)?n:[n];let o=n.map(async f=>{if(!a&&await ws.isIgnored({fs:r,dir:e,gitdir:t,filepath:f}))return;let d=await r.lstat($(e,f));if(!d)throw new Ne(f);if(d.isDirectory()){let h=await r.readdir($(e,f));if(s){let p=h.map(m=>_p({dir:e,gitdir:t,fs:r,filepath:[$(f,m)],index:i,force:a,parallel:s}));await Promise.all(p)}else for(let p of h)await _p({dir:e,gitdir:t,fs:r,filepath:[$(f,p)],index:i,force:a,parallel:s})}else{let p=await(await We.get({fs:r,gitdir:t})).get("core.autocrlf"),m=d.isSymbolicLink()?await r.readlink($(e,f)).then(KM):await r.read($(e,f),{autocrlf:p});if(m===null)throw new Ne(f);let v=await mr({fs:r,gitdir:t,type:"blob",object:m});i.insert({filepath:f,stats:d,oid:v})}}),c=await Promise.allSettled(o),l=c.filter(f=>f.status==="rejected").map(f=>f.reason);if(l.length>1)throw new cl(l);if(l.length===1)throw l[0];return c.filter(f=>f.status==="fulfilled"&&f.value).map(f=>f.value)}async function ml({fs:e,gitdir:t,path:r}){return(await We.get({fs:e,gitdir:t})).get(r)}function u2(e,...t){for(let r of t)if(r)for(let n of Object.keys(r)){let i=r[n];i!==void 0&&(e[n]=i)}return e}async function ca({fs:e,gitdir:t,author:r,commit:n}){let i=Math.floor(Date.now()/1e3),a={name:await ml({fs:e,gitdir:t,path:"user.name"}),email:await ml({fs:e,gitdir:t,path:"user.email"})||"",timestamp:i,timezoneOffset:new Date(i*1e3).getTimezoneOffset()},s=u2({},a,n?n.author:void 0,r);if(s.name!==void 0)return s}async function bs({fs:e,gitdir:t,author:r,committer:n,commit:i}){let a=Math.floor(Date.now()/1e3),s={name:await ml({fs:e,gitdir:t,path:"user.name"}),email:await ml({fs:e,gitdir:t,path:"user.email"})||"",timestamp:a,timezoneOffset:new Date(a*1e3).getTimezoneOffset()},o=u2({},s,i?i.committer:void 0,r,n);if(o.name!==void 0)return o}async function f2({fs:e,cache:t,gitdir:r,oid:n}){let{type:i,object:a}=await qe({fs:e,cache:t,gitdir:r,oid:n});if(i==="tag")return n=pr.from(a).parse().object,f2({fs:e,cache:t,gitdir:r,oid:n});if(i!=="commit")throw new Gt(n,i,"commit");return{commit:tr.from(a),oid:n}}async function cu({fs:e,cache:t,gitdir:r,oid:n}){let{commit:i,oid:a}=await f2({fs:e,cache:t,gitdir:r,oid:n});return{oid:a,commit:i.parse(),payload:i.withoutSignature()}}async function vu({fs:e,cache:t,onSign:r,gitdir:n,message:i,author:a,committer:s,signingKey:o,amend:c=!1,dryRun:l=!1,noUpdateBranch:u=!1,ref:f,parent:d,tree:h}){let p=!1;f||(f=await q.resolve({fs:e,gitdir:n,ref:"HEAD",depth:2}));let m,v;try{m=await q.resolve({fs:e,gitdir:n,ref:f}),v=await cu({fs:e,gitdir:n,oid:m,cache:{}})}catch(x){p=!0}if(c&&p)throw new pl(f);let y=c?await ca({fs:e,gitdir:n,author:a,commit:v.commit}):await ca({fs:e,gitdir:n,author:a});if(!y)throw new zt("author");let b=c?await bs({fs:e,gitdir:n,author:y,committer:s,commit:v.commit}):await bs({fs:e,gitdir:n,author:y,committer:s});if(!b)throw new zt("committer");return mt.acquire({fs:e,gitdir:n,cache:t,allowUnmerged:!1},async function(x){let _=i2(x.entries).get(".");if(h||(h=await d2({fs:e,gitdir:n,inode:_,dryRun:l})),d?d=await Promise.all(d.map(A=>q.resolve({fs:e,gitdir:n,ref:A}))):c?d=v.commit.parent:d=m?[m]:[],!i)if(c)i=v.commit.message;else throw new Qt("message");let k=tr.from({tree:h,parent:d,author:y,committer:b,message:i});o&&(k=await tr.sign(k,r,o));let w=await mr({fs:e,gitdir:n,type:"commit",object:k.toObject(),dryRun:l});return!u&&!l&&await q.writeRef({fs:e,gitdir:n,ref:f,value:w}),w})}async function d2({fs:e,gitdir:t,inode:r,dryRun:n}){let i=r.children;for(let c of i)c.type==="tree"&&(c.metadata.mode="040000",c.metadata.oid=await d2({fs:e,gitdir:t,inode:c,dryRun:n}));let a=i.map(c=>({mode:c.metadata.mode,path:c.basename,oid:c.metadata.oid,type:c.type})),s=er.from(a);return await mr({fs:e,gitdir:t,type:"tree",object:s.toObject(),dryRun:n})}async function vl({fs:e,cache:t,gitdir:r,oid:n,filepath:i}){if(i.startsWith("/"))throw new xi("leading-slash");if(i.endsWith("/"))throw new xi("trailing-slash");let a=n,s=await vs({fs:e,cache:t,gitdir:r,oid:n}),o=s.tree;if(i==="")n=s.oid;else{let c=i.split("/");n=await h2({fs:e,cache:t,gitdir:r,tree:o,pathArray:c,oid:a,filepath:i})}return n}async function h2({fs:e,cache:t,gitdir:r,tree:n,pathArray:i,oid:a,filepath:s}){let o=i.shift();for(let c of n)if(c.path===o){if(i.length===0)return c.oid;{let{type:l,object:u}=await qe({fs:e,cache:t,gitdir:r,oid:c.oid});if(l!=="tree")throw new Gt(a,l,"tree",s);return n=er.from(u),h2({fs:e,cache:t,gitdir:r,tree:n,pathArray:i,oid:a,filepath:s})}}throw new Ne(`file or directory found at "${a}:${s}"`)}async function Ss({fs:e,cache:t,gitdir:r,oid:n,filepath:i=void 0}){i!==void 0&&(n=await vl({fs:e,cache:t,gitdir:r,oid:n,filepath:i}));let{tree:a,oid:s}=await vs({fs:e,cache:t,gitdir:r,oid:n});return{oid:s,tree:a.entries()}}async function Ap({fs:e,gitdir:t,tree:r}){let n=er.from(r).toObject();return await mr({fs:e,gitdir:t,type:"tree",object:n,format:"content"})}async function QM({fs:e,cache:t,onSign:r,gitdir:n,ref:i,oid:a,note:s,force:o,author:c,committer:l,signingKey:u}){let f;try{f=await q.resolve({gitdir:n,fs:e,ref:i})}catch(y){if(!(y instanceof Ne))throw y}let h=(await Ss({fs:e,cache:t,gitdir:n,oid:f||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;if(o)h=h.filter(y=>y.path!==a);else for(let y of h)if(y.path===a)throw new Qr("note",a);typeof s=="string"&&(s=Buffer.from(s,"utf8"));let p=await mr({fs:e,gitdir:n,type:"blob",object:s,format:"content"});h.push({mode:"100644",path:a,oid:p,type:"blob"});let m=await Ap({fs:e,gitdir:n,tree:h});return await vu({fs:e,cache:t,onSign:r,gitdir:n,ref:i,tree:m,parent:f&&[f],message:`Note added by 'isomorphic-git addNote' -`,author:c,committer:l,signingKey:u})}async function eO({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ref:i="refs/notes/commits",oid:a,note:s,force:o,author:c,committer:l,signingKey:u,cache:f={}}){try{C("fs",e),C("gitdir",n),C("oid",a),C("note",s),u&&C("onSign",t);let d=new X(e),h=await ca({fs:d,gitdir:n,author:c});if(!h)throw new zt("author");let p=await bs({fs:d,gitdir:n,author:h,committer:l});if(!p)throw new zt("committer");return await QM({fs:new X(d),cache:f,onSign:t,gitdir:n,ref:i,oid:a,note:s,force:o,author:h,committer:p,signingKey:u})}catch(d){throw d.caller="git.addNote",d}}async function p2({fs:e,gitdir:t,remote:r,url:n,force:i}){if(r!==Jr.default.clean(r))throw new zn(r,Jr.default.clean(r));let a=await We.get({fs:e,gitdir:t});if(!i&&(await a.getSubsections("remote")).includes(r)&&n!==await a.get(`remote.${r}.url`))throw new Qr("remote",r);await a.set(`remote.${r}.url`,n),await a.set(`remote.${r}.fetch`,`+refs/heads/*:refs/remotes/${r}/*`),await We.save({fs:e,gitdir:t,config:a})}async function tO({fs:e,dir:t,gitdir:r=$(t,".git"),remote:n,url:i,force:a=!1}){try{return C("fs",e),C("gitdir",r),C("remote",n),C("url",i),await p2({fs:new X(e),gitdir:r,remote:n,url:i,force:a})}catch(s){throw s.caller="git.addRemote",s}}async function rO({fs:e,cache:t,onSign:r,gitdir:n,ref:i,tagger:a,message:s=i,gpgsig:o,object:c,signingKey:l,force:u=!1}){if(i=i.startsWith("refs/tags/")?i:`refs/tags/${i}`,!u&&await q.exists({fs:e,gitdir:n,ref:i}))throw new Qr("tag",i);let f=await q.resolve({fs:e,gitdir:n,ref:c||"HEAD"}),{type:d}=await qe({fs:e,cache:t,gitdir:n,oid:f}),h=pr.from({object:f,type:d,tag:i.replace("refs/tags/",""),tagger:a,message:s,gpgsig:o});l&&(h=await pr.sign(h,r,l));let p=await mr({fs:e,gitdir:n,type:"tag",object:h.toObject()});await q.writeRef({fs:e,gitdir:n,ref:i,value:p})}async function nO({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ref:i,tagger:a,message:s=i,gpgsig:o,object:c,signingKey:l,force:u=!1,cache:f={}}){try{C("fs",e),C("gitdir",n),C("ref",i),l&&C("onSign",t);let d=new X(e),h=await ca({fs:d,gitdir:n,author:a});if(!h)throw new zt("tagger");return await rO({fs:d,cache:f,onSign:t,gitdir:n,ref:i,tagger:h,message:s,gpgsig:o,object:c,signingKey:l,force:u})}catch(d){throw d.caller="git.annotatedTag",d}}async function iO({fs:e,gitdir:t,ref:r,object:n,checkout:i=!1,force:a=!1}){if(r!==Jr.default.clean(r))throw new zn(r,Jr.default.clean(r));let s=`refs/heads/${r}`;if(!a&&await q.exists({fs:e,gitdir:t,ref:s}))throw new Qr("branch",r,!1);let o;try{o=await q.resolve({fs:e,gitdir:t,ref:n||"HEAD"})}catch(c){}o&&await q.writeRef({fs:e,gitdir:t,ref:s,value:o}),i&&await q.writeSymbolicRef({fs:e,gitdir:t,ref:"HEAD",value:s})}async function aO({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,object:i,checkout:a=!1,force:s=!1}){try{return C("fs",e),C("gitdir",r),C("ref",n),await iO({fs:new X(e),gitdir:r,ref:n,object:i,checkout:a,force:s})}catch(o){throw o.caller="git.branch",o}}var m2=(e,t)=>e==="."||t==null||t.length===0||t==="."?!0:t.length>=e.length?t.startsWith(e):e.startsWith(t);async function kp({fs:e,cache:t,onProgress:r,onPostCheckout:n,dir:i,gitdir:a,remote:s,ref:o,filepaths:c,noCheckout:l,noUpdateHead:u,dryRun:f,force:d,track:h=!0}){let p;if(n)try{p=await q.resolve({fs:e,gitdir:a,ref:"HEAD"})}catch(v){p="0000000000000000000000000000000000000000"}let m;try{m=await q.resolve({fs:e,gitdir:a,ref:o})}catch(v){if(o==="HEAD")throw v;let y=`${s}/${o}`;if(m=await q.resolve({fs:e,gitdir:a,ref:y}),h){let b=await We.get({fs:e,gitdir:a});await b.set(`branch.${o}.remote`,s),await b.set(`branch.${o}.merge`,`refs/heads/${o}`),await We.save({fs:e,gitdir:a,config:b})}await q.writeRef({fs:e,gitdir:a,ref:`refs/heads/${o}`,value:m})}if(!l){let v;try{v=await sO({fs:e,cache:t,onProgress:r,dir:i,gitdir:a,ref:o,force:d,filepaths:c})}catch(_){throw _ instanceof Ne&&_.data.what===m?new il(o,m):_}let y=v.filter(([_])=>_==="conflict").map(([_,k])=>k);if(y.length>0)throw new nl(y);let b=v.filter(([_])=>_==="error").map(([_,k])=>k);if(b.length>0)throw new le(b.join(", "));if(f){n&&await n({previousHead:p,newHead:m,type:c!=null&&c.length>0?"file":"branch"});return}let x=0,E=v.length;await mt.acquire({fs:e,gitdir:a,cache:t},async function(_){await Promise.all(v.filter(([k])=>k==="delete"||k==="delete-index").map(async function([k,w]){let A=`${i}/${w}`;k==="delete"&&await e.rm(A),_.delete({filepath:w}),r&&await r({phase:"Updating workdir",loaded:++x,total:E})}))}),await mt.acquire({fs:e,gitdir:a,cache:t},async function(_){for(let[k,w]of v)if(k==="rmdir"||k==="rmdir-index"){let A=`${i}/${w}`;try{k==="rmdir-index"&&_.delete({filepath:w}),await e.rmdir(A),r&&await r({phase:"Updating workdir",loaded:++x,total:E})}catch(S){if(S.code==="ENOTEMPTY")console.log(`Did not delete ${w} because directory is not empty`);else throw S}}}),await Promise.all(v.filter(([_])=>_==="mkdir"||_==="mkdir-index").map(async function([_,k]){let w=`${i}/${k}`;await e.mkdir(w),r&&await r({phase:"Updating workdir",loaded:++x,total:E})})),await mt.acquire({fs:e,gitdir:a,cache:t},async function(_){await Promise.all(v.filter(([k])=>k==="create"||k==="create-index"||k==="update"||k==="mkdir-index").map(async function([k,w,A,S,T]){let P=`${i}/${w}`;try{if(k!=="create-index"&&k!=="mkdir-index"){let{object:j}=await qe({fs:e,cache:t,gitdir:a,oid:A});if(T&&await e.rm(P),S===33188)await e.write(P,j);else if(S===33261)await e.write(P,j,{mode:511});else if(S===40960)await e.writelink(P,j);else throw new le(`Invalid mode 0o${S.toString(8)} detected in blob ${A}`)}let O=await e.lstat(P);S===33261&&(O.mode=493),k==="mkdir-index"&&(O.mode=57344),_.insert({filepath:w,stats:O,oid:A}),r&&await r({phase:"Updating workdir",loaded:++x,total:E})}catch(O){console.log(O)}}))}),n&&await n({previousHead:p,newHead:m,type:c!=null&&c.length>0?"file":"branch"})}if(!u){let v=await q.expand({fs:e,gitdir:a,ref:o});v.startsWith("refs/heads")?await q.writeSymbolicRef({fs:e,gitdir:a,ref:"HEAD",value:v}):await q.writeRef({fs:e,gitdir:a,ref:"HEAD",value:m})}}async function sO({fs:e,cache:t,onProgress:r,dir:n,gitdir:i,ref:a,force:s,filepaths:o}){let c=0;return ys({fs:e,cache:t,dir:n,gitdir:i,trees:[wi({ref:a}),gu(),mu()],map:async function(l,[u,f,d]){if(l===".")return;if(o&&!o.some(p=>m2(l,p)))return null;switch(r&&await r({phase:"Analyzing workdir",loaded:++c}),[!!d,!!u,!!f].map(Number).join("")){case"000":return;case"001":return s&&o&&o.includes(l)?["delete",l]:void 0;case"010":switch(await u.type()){case"tree":return["mkdir",l];case"blob":return["create",l,await u.oid(),await u.mode()];case"commit":return["mkdir-index",l,await u.oid(),await u.mode()];default:return["error",`new entry Unhandled type ${await u.type()}`]}case"011":switch(`${await u.type()}-${await f.type()}`){case"tree-tree":return;case"tree-blob":case"blob-tree":return["conflict",l];case"blob-blob":return await u.oid()!==await f.oid()?s?["update",l,await u.oid(),await u.mode(),await u.mode()!==await f.mode()]:["conflict",l]:await u.mode()!==await f.mode()?s?["update",l,await u.oid(),await u.mode(),!0]:["conflict",l]:["create-index",l,await u.oid(),await u.mode()];case"commit-tree":return;case"commit-blob":return["conflict",l];default:return["error",`new entry Unhandled type ${u.type}`]}case"100":return["delete-index",l];case"101":switch(await d.type()){case"tree":return["rmdir",l];case"blob":return await d.oid()!==await f.oid()?s?["delete",l]:["conflict",l]:["delete",l];case"commit":return["rmdir-index",l];default:return["error",`delete entry Unhandled type ${await d.type()}`]}case"110":case"111":switch(`${await d.type()}-${await u.type()}`){case"tree-tree":return;case"blob-blob":{if(await d.oid()===await u.oid()&&await d.mode()===await u.mode()&&!s)return;if(f){if(await f.oid()!==await d.oid()&&await f.oid()!==await u.oid())return s?["update",l,await u.oid(),await u.mode(),await u.mode()!==await f.mode()]:["conflict",l]}else if(s)return["update",l,await u.oid(),await u.mode(),await u.mode()!==await d.mode()];return await u.mode()!==await d.mode()?["update",l,await u.oid(),await u.mode(),!0]:await u.oid()!==await d.oid()?["update",l,await u.oid(),await u.mode(),!1]:void 0}case"tree-blob":return["update-dir-to-blob",l,await u.oid()];case"blob-tree":return["update-blob-to-tree",l];case"commit-commit":return["mkdir-index",l,await u.oid(),await u.mode()];default:return["error",`update entry Unhandled type ${await d.type()}-${await u.type()}`]}}},reduce:async function(l,u){return u=l2(u),l?l&&l[0]==="rmdir"?(u.push(l),u):(u.unshift(l),u):u}})}async function oO({fs:e,onProgress:t,onPostCheckout:r,dir:n,gitdir:i=$(n,".git"),remote:a="origin",ref:s,filepaths:o,noCheckout:c=!1,noUpdateHead:l=s===void 0,dryRun:u=!1,force:f=!1,track:d=!0,cache:h={}}){try{C("fs",e),C("dir",n),C("gitdir",i);let p=s||"HEAD";return await kp({fs:new X(e),cache:h,onProgress:t,onPostCheckout:r,dir:n,gitdir:i,remote:a,ref:p,filepaths:o,noCheckout:c,noUpdateHead:l,dryRun:u,force:f,track:d})}catch(p){throw p.caller="git.checkout",p}}var lO=new RegExp("^refs/(heads/|tags/|remotes/)?(.*)");function oa(e){let t=lO.exec(e);return t?t[1]==="remotes/"&&e.endsWith("/HEAD")?t[2].slice(0,-5):t[2]:e}async function fa({fs:e,gitdir:t,fullname:r=!1,test:n=!1}){let i=await q.resolve({fs:e,gitdir:t,ref:"HEAD",depth:2});if(n)try{await q.resolve({fs:e,gitdir:t,ref:i})}catch(a){return}if(i.startsWith("refs/"))return r?i:oa(i)}function cO(e){return e=e.replace(/^git@([^:]+):/,"https://$1/"),e=e.replace(/^ssh:\/\//,"https://"),e}function g2({username:e="",password:t=""}){return`Basic ${Buffer.from(`${e}:${t}`).toString("base64")}`}async function yl(e,t){let r=s2(e);for(;;){let{value:n,done:i}=await r.next();if(n&&await t(n),i)break}r.return&&r.return()}async function uu(e){let t=0,r=[];await yl(e,a=>{r.push(a),t+=a.byteLength});let n=new Uint8Array(t),i=0;for(let a of r)n.set(a,i),i+=a.byteLength;return n}function Vw(e){let t=e.match(/^https?:\/\/([^/]+)@/);if(t==null)return{url:e,auth:{}};t=t[1];let[r,n]=t.split(":");return e=e.replace(`${t}@`,""),{url:e,auth:{username:r,password:n}}}function xp(e,t){let r=t.toString(16);return"0".repeat(e-r.length)+r}var Ve=class{static flush(){return Buffer.from("0000","utf8")}static delim(){return Buffer.from("0001","utf8")}static encode(t){typeof t=="string"&&(t=Buffer.from(t));let r=t.length+4,n=xp(4,r);return Buffer.concat([Buffer.from(n,"utf8"),t])}static streamReader(t){let r=new su(t);return async function(){try{let i=await r.read(4);if(i==null)return!0;if(i=parseInt(i.toString("utf8"),16),i===0||i===1)return null;let a=await r.read(i-4);return a==null?!0:a}catch(i){return t.error=i,!0}}}};async function Ww(e){let t={},r;for(;r=await e(),r!==!0;){if(r===null)continue;r=r.toString("utf8").replace(/\n$/,"");let n=r.indexOf("=");if(n>-1){let i=r.slice(0,n),a=r.slice(n+1);t[i]=a}else t[r]=!0}return{protocolVersion:2,capabilities2:t}}async function qw(e,{service:t}){let r=new Set,n=new Map,i=new Map,a=Ve.streamReader(e),s=await a();for(;s===null;)s=await a();if(s===!0)throw new al;if(s.includes("version 2"))return Ww(a);if(s.toString("utf8").replace(/\n$/,"")!==`# service=${t}`)throw new la(`# service=${t}\\n`,s.toString("utf8"));let o=await a();for(;o===null;)o=await a();if(o===!0)return{capabilities:r,refs:n,symrefs:i};if(o=o.toString("utf8"),o.includes("version 2"))return Ww(a);let[c,l]=op(o,"\0","\\x00");if(l.split(" ").map(u=>r.add(u)),c!=="0000000000000000000000000000000000000000 capabilities^{}"){let[u,f]=op(c," "," ");for(n.set(f,u);;){let d=await a();if(d===!0)break;if(d!==null){let[h,p]=op(d.toString("utf8")," "," ");n.set(p,h)}}}for(let u of r)if(u.startsWith("symref=")){let f=u.match(/symref=([^:]+):(.*)/);f.length===3&&i.set(f[1],f[2])}return{protocolVersion:1,capabilities:r,refs:n,symrefs:i}}function op(e,t,r){let n=e.trim().split(t);if(n.length!==2)throw new la(`Two strings separated by '${r}'`,e.toString("utf8"));return n}var Yw=(e,t)=>e.endsWith("?")?`${e}${t}`:`${e}/${t.replace(/^https?:\/\//,"")}`,Xw=(e,t)=>{(t.username||t.password)&&(e.Authorization=g2(t)),t.headers&&Object.assign(e,t.headers)},lp=async e=>{try{let t=Buffer.from(await uu(e.body)),r=t.toString("utf8");return{preview:r.length<256?r:r.slice(0,256)+"...",response:r,data:t}}catch(t){return{}}},_s=class{static async capabilities(){return["discover","connect"]}static async discover({http:t,onProgress:r,onAuth:n,onAuthSuccess:i,onAuthFailure:a,corsProxy:s,service:o,url:c,headers:l,protocolVersion:u}){let{url:f,auth:d}=Vw(c),h=s?Yw(s,f):f;(d.username||d.password)&&(l.Authorization=g2(d)),u===2&&(l["Git-Protocol"]="version=2");let p,m,v=!1;do if(p=await t.request({onProgress:r,method:"GET",url:`${h}/info/refs?service=${o}`,headers:l}),m=!1,p.statusCode===401||p.statusCode===203){let y=v?a:n;if(y){if(d=await y(f,{...d,headers:{...l}}),d&&d.cancel)throw new gs;d&&(Xw(l,d),v=!0,m=!0)}}else p.statusCode===200&&v&&i&&await i(f,d);while(m);if(p.statusCode!==200){let{response:y}=await lp(p);throw new ds(p.statusCode,p.statusMessage,y)}if(p.headers["content-type"]===`application/x-${o}-advertisement`){let y=await qw(p.body,{service:o});return y.auth=d,y}else{let{preview:y,response:b,data:x}=await lp(p);try{let E=await qw([x],{service:o});return E.auth=d,E}catch(E){throw new ul(y,b)}}}static async connect({http:t,onProgress:r,corsProxy:n,service:i,url:a,auth:s,body:o,headers:c}){let l=Vw(a);l&&(a=l.url),n&&(a=Yw(n,a)),c["content-type"]=`application/x-${i}-request`,c.accept=`application/x-${i}-result`,Xw(c,s);let u=await t.request({onProgress:r,method:"POST",url:`${a}/${i}`,body:o,headers:c});if(u.statusCode!==200){let{response:f}=lp(u);throw new ds(u.statusCode,u.statusMessage,f)}return u}};function uO({url:e}){if(e.startsWith("git@"))return{transport:"ssh",address:e};let t=e.match(/(\w+)(:\/\/|::)(.*)/);if(t!==null){if(t[2]==="://")return{transport:t[1],address:t[0]};if(t[2]==="::")return{transport:t[1],address:t[3]}}}var xs=class{static getRemoteHelperFor({url:t}){let r=new Map;r.set("http",_s),r.set("https",_s);let n=uO({url:t});if(!n)throw new dl(t);if(r.has(n.transport))return r.get(n.transport);throw new fl(t,n.transport,n.transport==="ssh"?cO(t):void 0)}},sa=null,ua=class{static async read({fs:t,gitdir:r}){sa===null&&(sa=new Jo.default);let n=$(r,"shallow"),i=new Set;return await sa.acquire(n,async function(){let a=await t.read(n,{encoding:"utf8"});if(a===null||a.trim()==="")return i;a.trim().split(` -`).map(s=>i.add(s))}),i}static async write({fs:t,gitdir:r,oids:n}){sa===null&&(sa=new Jo.default);let i=$(r,"shallow");if(n.size>0){let a=[...n].join(` +`)+28);return zn(r+` +`+n)}isolateSignature(){let t=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+27);return W6(t)}static async sign(t,r,n){let i=t.withoutSignature(),a=e.justMessage(t._commit),{signature:s}=await r({payload:i,secretKey:n});s=zn(s);let l=e.justHeaders(t._commit)+` +gpgsig`+sp(s)+` +`+a;return e.from(l)}};async function bs({fs:e,cache:t,gitdir:r,oid:n}){if(n==="4b825dc642cb6eb9a060e54bf8d69288fbee4904")return{tree:tr.from([]),oid:n};let{type:i,object:a}=await qe({fs:e,cache:t,gitdir:r,oid:n});if(i==="tag")return n=pr.from(a).parse().object,bs({fs:e,cache:t,gitdir:r,oid:n});if(i==="commit")return n=rr.from(a).parse().tree,bs({fs:e,cache:t,gitdir:r,oid:n});if(i!=="tree")throw new zt(n,i,"tree");return{tree:tr.from(a),oid:n}}var yp=class{constructor({fs:t,gitdir:r,ref:n,cache:i}){this.fs=t,this.cache=i,this.gitdir=r,this.mapPromise=(async()=>{let s=new Map,o;try{o=await W.resolve({fs:t,gitdir:r,ref:n})}catch(c){c instanceof Le&&(o="4b825dc642cb6eb9a060e54bf8d69288fbee4904")}let l=await bs({fs:t,cache:this.cache,gitdir:r,oid:o});return l.type="tree",l.mode="40000",s.set(".",l),s})();let a=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(t){let r=t._fullpath,{fs:n,cache:i,gitdir:a}=this,s=await this.mapPromise,o=s.get(r);if(!o)throw new Error(`No obj for ${r}`);let l=o.oid;if(!l)throw new Error(`No oid for obj ${JSON.stringify(o)}`);if(o.type!=="tree")return null;let{type:c,object:u}=await qe({fs:n,cache:i,gitdir:a,oid:l});if(c!==o.type)throw new zt(l,c,o.type);let f=tr.from(u);for(let d of f)s.set($(r,d.path),d);return f.entries().map(d=>$(r,d.path))}async type(t){if(t._type===!1){let r=await this.mapPromise,{type:n}=r.get(t._fullpath);t._type=n}return t._type}async mode(t){if(t._mode===!1){let r=await this.mapPromise,{mode:n}=r.get(t._fullpath);t._mode=a2(parseInt(n,8))}return t._mode}async stat(t){}async content(t){if(t._content===!1){let r=await this.mapPromise,{fs:n,cache:i,gitdir:a}=this,o=r.get(t._fullpath).oid,{type:l,object:c}=await qe({fs:n,cache:i,gitdir:a,oid:o});l!=="blob"?t._content=void 0:t._content=new Uint8Array(c)}return t._content}async oid(t){if(t._oid===!1){let n=(await this.mapPromise).get(t._fullpath);t._oid=n.oid}return t._oid}};function bi({ref:e="HEAD"}={}){let t=Object.create(null);return Object.defineProperty(t,du,{value:function({fs:r,gitdir:n,cache:i}){return new yp({fs:r,gitdir:n,ref:e,cache:i})}}),Object.freeze(t),t}var wp=class{constructor({fs:t,dir:r,gitdir:n,cache:i}){this.fs=t,this.cache=i,this.dir=r,this.gitdir=n;let a=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(t){let r=t._fullpath,{fs:n,dir:i}=this,a=await n.readdir($(i,r));return a===null?null:a.map(s=>$(r,s))}async type(t){return t._type===!1&&await t.stat(),t._type}async mode(t){return t._mode===!1&&await t.stat(),t._mode}async stat(t){if(t._stat===!1){let{fs:r,dir:n}=this,i=await r.lstat(`${n}/${t._fullpath}`);if(!i)throw new Error(`ENOENT: no such file or directory, lstat '${t._fullpath}'`);let a=i.isDirectory()?"tree":"blob";a==="blob"&&!i.isFile()&&!i.isSymbolicLink()&&(a="special"),t._type=a,i=hs(i),t._mode=i.mode,i.size===-1&&t._actualSize&&(i.size=t._actualSize),t._stat=i}return t._stat}async content(t){if(t._content===!1){let{fs:r,dir:n,gitdir:i}=this;if(await t.type()==="tree")t._content=void 0;else{let s=await(await We.get({fs:r,gitdir:i})).get("core.autocrlf"),o=await r.read(`${n}/${t._fullpath}`,{autocrlf:s});t._actualSize=o.length,t._stat&&t._stat.size===-1&&(t._stat.size=t._actualSize),t._content=new Uint8Array(o)}}return t._content}async oid(t){if(t._oid===!1){let{fs:r,gitdir:n,cache:i}=this,a;await yt.acquire({fs:r,gitdir:n,cache:i},async function(s){let o=s.entriesMap.get(t._fullpath),l=await t.stat(),u=await(await We.get({fs:r,gitdir:n})).get("core.filemode"),f=typeof process!="undefined"?process.platform!=="win32":!0;!o||eu(l,o,u,f)?await t.content()===void 0?a=void 0:(a=await Vn(xi.wrap({type:"blob",object:await t.content()})),o&&a===o.oid&&(!u||l.mode===o.mode)&&eu(l,o,u,f)&&s.insert({filepath:t._fullpath,stats:l,oid:a})):a=o.oid}),t._oid=a}return t._oid}};function pu(){let e=Object.create(null);return Object.defineProperty(e,du,{value:function({fs:t,dir:r,gitdir:n,cache:i}){return new wp({fs:t,dir:r,gitdir:n,cache:i})}}),Object.freeze(e),e}function q6(e,t){let r=t-e;return Array.from({length:r},(n,i)=>e+i)}var f2=typeof Array.prototype.flat=="undefined"?e=>e.reduce((t,r)=>t.concat(r),[]):e=>e.flat(),bp=class{constructor(){this.value=null}consider(t){t!=null&&(this.value===null?this.value=t:tc,reduce:s=async(l,c)=>{let u=f2(c);return l!==void 0&&u.unshift(l),u},iterate:o=(l,c)=>Promise.all([...c].map(l))}){let l=i.map(h=>h[du]({fs:e,dir:r,gitdir:n,cache:t})),c=new Array(l.length).fill("."),u=q6(0,l.length),f=async h=>{u.map(v=>{h[v]=h[v]&&new l[v].ConstructEntry(h[v])});let m=(await Promise.all(u.map(v=>h[v]?l[v].readdir(h[v]):[]))).map(v=>v===null?[]:v).map(v=>v[Symbol.iterator]());return{entries:h,children:Y6(m)}},d=async h=>{let{entries:p,children:m}=await f(h),v=p.find(b=>b&&b._fullpath)._fullpath,y=await a(v,p);if(y!==null){let b=await o(d,m);return b=b.filter(x=>x!==void 0),s(y,b)}};return d(c)}async function _p(e,t){let r=await e.readdir(t);r==null?await e.rm(t):r.length?await Promise.all(r.map(n=>{let i=$(t,n);return e.lstat(i).then(a=>{if(a)return a.isDirectory()?_p(e,i):e.rm(i)})})).then(()=>e.rmdir(t)):await e.rmdir(t)}function X6(e){return Z6(e)&&zw(e.then)&&zw(e.catch)}function Z6(e){return e&&typeof e=="object"}function zw(e){return typeof e=="function"}function Vw(e){return X6((r=>{try{return r.readFile().catch(n=>n)}catch(n){return n}})(e))}var Ww=["readFile","writeFile","mkdir","rmdir","unlink","stat","lstat","readdir","readlink","symlink"];function qw(e,t){if(Vw(t))for(let r of Ww)e[`_${r}`]=t[r].bind(t);else for(let r of Ww)e[`_${r}`]=(0,Qc.default)(t[r].bind(t));Vw(t)?t.rm?e._rm=t.rm.bind(t):t.rmdir.length>1?e._rm=t.rmdir.bind(t):e._rm=_p.bind(null,e):t.rm?e._rm=(0,Qc.default)(t.rm.bind(t)):t.rmdir.length>2?e._rm=(0,Qc.default)(t.rmdir.bind(t)):e._rm=_p.bind(null,e)}var X=class{constructor(t){if(typeof t._original_unwrapped_fs!="undefined")return t;let r=Object.getOwnPropertyDescriptor(t,"promises");r&&r.enumerable?qw(this,t.promises):qw(this,t),this._original_unwrapped_fs=t}async exists(t,r={}){try{return await this._stat(t),!0}catch(n){if(n.code==="ENOENT"||n.code==="ENOTDIR")return!1;throw console.log('Unhandled error in "FileSystem.exists()" function',n),n}}async read(t,r={}){try{let n=await this._readFile(t,r);if(r.autocrlf==="true")try{n=new TextDecoder("utf8",{fatal:!0}).decode(n),n=n.replace(/\r\n/g,` +`),n=new TextEncoder().encode(n)}catch(i){}return typeof n!="string"&&(n=Buffer.from(n)),n}catch(n){return null}}async write(t,r,n={}){try{await this._writeFile(t,r,n);return}catch(i){await this.mkdir(ps(t)),await this._writeFile(t,r,n)}}async mkdir(t,r=!1){try{await this._mkdir(t);return}catch(n){if(n===null||n.code==="EEXIST")return;if(r)throw n;if(n.code==="ENOENT"){let i=ps(t);if(i==="."||i==="/"||i===t)throw n;await this.mkdir(i),await this.mkdir(t,!0)}}}async rm(t){try{await this._unlink(t)}catch(r){if(r.code!=="ENOENT")throw r}}async rmdir(t,r){try{r&&r.recursive?await this._rm(t,r):await this._rmdir(t)}catch(n){if(n.code!=="ENOENT")throw n}}async readdir(t){try{let r=await this._readdir(t);return r.sort(fu),r}catch(r){return r.code==="ENOTDIR"?null:[]}}async readdirDeep(t){let r=await this._readdir(t);return(await Promise.all(r.map(async i=>{let a=t+"/"+i;return(await this._stat(a)).isDirectory()?this.readdirDeep(a):a}))).reduce((i,a)=>i.concat(a),[])}async lstat(t){try{return await this._lstat(t)}catch(r){if(r.code==="ENOENT")return null;throw r}}async readlink(t,r={encoding:"buffer"}){try{let n=await this._readlink(t,r);return Buffer.isBuffer(n)?n:Buffer.from(n)}catch(n){if(n.code==="ENOENT")return null;throw n}}async writelink(t,r){return this._symlink(r.toString("utf8"),t)}};function C(e,t){if(t===void 0)throw new er(e)}async function su(e,t){return!e&&!t?!1:e&&!t||!e&&t?!0:!(await e.type()==="tree"&&await t.type()==="tree"||await e.type()===await t.type()&&await e.mode()===await t.mode()&&await e.oid()===await t.oid())}async function K6({fs:e,dir:t,gitdir:r=$(t,".git"),commit:n="HEAD",cache:i={}}){try{C("fs",e),C("dir",t),C("gitdir",r);let a=new X(e),s=[bi({ref:n}),pu(),hu()],o=[];await yt.acquire({fs:a,gitdir:r,cache:i},async function(c){o=c.unmergedPaths});let l=await _s({fs:a,cache:i,dir:t,gitdir:r,trees:s,map:async function(c,[u,f,d]){let h=!await su(f,d),p=o.includes(c),m=!await su(d,u);if(h||p)return u?{path:c,mode:await u.mode(),oid:await u.oid(),type:await u.type(),content:await u.content()}:void 0;if(m)return!1;throw new gl(c)}});await yt.acquire({fs:a,gitdir:r,cache:i},async function(c){for(let u of l)if(u!==!1){if(!u){await a.rmdir(`${t}/${u.path}`,{recursive:!0}),c.delete({filepath:u.path});continue}if(u.type==="blob"){let f=new TextDecoder().decode(u.content);await a.write(`${t}/${u.path}`,f,{mode:u.mode}),c.insert({filepath:u.path,oid:u.oid,stage:0})}}})}catch(a){throw a.caller="git.abortMerge",a}}var xs=class{static async isIgnored({fs:t,dir:r,gitdir:n=$(r,".git"),filepath:i}){if(tu(i)===".git")return!0;if(i===".")return!1;let a="",s=$(n,"info","exclude");await t.exists(s)&&(a=await t.read(s,"utf8"));let o=[{gitignore:$(r,".gitignore"),filepath:i}],l=i.split("/").filter(Boolean);for(let u=1;uxp({dir:t,gitdir:r,fs:o,filepath:n,index:l,force:a,parallel:s}))}catch(o){throw o.caller="git.add",o}}async function xp({dir:e,gitdir:t,fs:r,filepath:n,index:i,force:a,parallel:s}){n=Array.isArray(n)?n:[n];let o=n.map(async f=>{if(!a&&await xs.isIgnored({fs:r,dir:e,gitdir:t,filepath:f}))return;let d=await r.lstat($(e,f));if(!d)throw new Le(f);if(d.isDirectory()){let h=await r.readdir($(e,f));if(s){let p=h.map(m=>xp({dir:e,gitdir:t,fs:r,filepath:[$(f,m)],index:i,force:a,parallel:s}));await Promise.all(p)}else for(let p of h)await xp({dir:e,gitdir:t,fs:r,filepath:[$(f,p)],index:i,force:a,parallel:s})}else{let p=await(await We.get({fs:r,gitdir:t})).get("core.autocrlf"),m=d.isSymbolicLink()?await r.readlink($(e,f)).then(tO):await r.read($(e,f),{autocrlf:p});if(m===null)throw new Le(f);let v=await mr({fs:r,gitdir:t,type:"blob",object:m});i.insert({filepath:f,stats:d,oid:v})}}),l=await Promise.allSettled(o),c=l.filter(f=>f.status==="rejected").map(f=>f.reason);if(c.length>1)throw new dl(c);if(c.length===1)throw c[0];return l.filter(f=>f.status==="fulfilled"&&f.value).map(f=>f.value)}async function yl({fs:e,gitdir:t,path:r}){return(await We.get({fs:e,gitdir:t})).get(r)}function h2(e,...t){for(let r of t)if(r)for(let n of Object.keys(r)){let i=r[n];i!==void 0&&(e[n]=i)}return e}async function fa({fs:e,gitdir:t,author:r,commit:n}){let i=Math.floor(Date.now()/1e3),a={name:await yl({fs:e,gitdir:t,path:"user.name"}),email:await yl({fs:e,gitdir:t,path:"user.email"})||"",timestamp:i,timezoneOffset:new Date(i*1e3).getTimezoneOffset()},s=h2({},a,n?n.author:void 0,r);if(s.name!==void 0)return s}async function Ss({fs:e,gitdir:t,author:r,committer:n,commit:i}){let a=Math.floor(Date.now()/1e3),s={name:await yl({fs:e,gitdir:t,path:"user.name"}),email:await yl({fs:e,gitdir:t,path:"user.email"})||"",timestamp:a,timezoneOffset:new Date(a*1e3).getTimezoneOffset()},o=h2({},s,i?i.committer:void 0,r,n);if(o.name!==void 0)return o}async function p2({fs:e,cache:t,gitdir:r,oid:n}){let{type:i,object:a}=await qe({fs:e,cache:t,gitdir:r,oid:n});if(i==="tag")return n=pr.from(a).parse().object,p2({fs:e,cache:t,gitdir:r,oid:n});if(i!=="commit")throw new zt(n,i,"commit");return{commit:rr.from(a),oid:n}}async function ou({fs:e,cache:t,gitdir:r,oid:n}){let{commit:i,oid:a}=await p2({fs:e,cache:t,gitdir:r,oid:n});return{oid:a,commit:i.parse(),payload:i.withoutSignature()}}async function mu({fs:e,cache:t,onSign:r,gitdir:n,message:i,author:a,committer:s,signingKey:o,amend:l=!1,dryRun:c=!1,noUpdateBranch:u=!1,ref:f,parent:d,tree:h}){let p=!1;f||(f=await W.resolve({fs:e,gitdir:n,ref:"HEAD",depth:2}));let m,v;try{m=await W.resolve({fs:e,gitdir:n,ref:f}),v=await ou({fs:e,gitdir:n,oid:m,cache:{}})}catch(x){p=!0}if(l&&p)throw new vl(f);let y=l?await fa({fs:e,gitdir:n,author:a,commit:v.commit}):await fa({fs:e,gitdir:n,author:a});if(!y)throw new Vt("author");let b=l?await Ss({fs:e,gitdir:n,author:y,committer:s,commit:v.commit}):await Ss({fs:e,gitdir:n,author:y,committer:s});if(!b)throw new Vt("committer");return yt.acquire({fs:e,gitdir:n,cache:t,allowUnmerged:!1},async function(x){let _=o2(x.entries).get(".");if(h||(h=await m2({fs:e,gitdir:n,inode:_,dryRun:c})),d?d=await Promise.all(d.map(A=>W.resolve({fs:e,gitdir:n,ref:A}))):l?d=v.commit.parent:d=m?[m]:[],!i)if(l)i=v.commit.message;else throw new er("message");let k=rr.from({tree:h,parent:d,author:y,committer:b,message:i});o&&(k=await rr.sign(k,r,o));let w=await mr({fs:e,gitdir:n,type:"commit",object:k.toObject(),dryRun:c});return!u&&!c&&await W.writeRef({fs:e,gitdir:n,ref:f,value:w}),w})}async function m2({fs:e,gitdir:t,inode:r,dryRun:n}){let i=r.children;for(let l of i)l.type==="tree"&&(l.metadata.mode="040000",l.metadata.oid=await m2({fs:e,gitdir:t,inode:l,dryRun:n}));let a=i.map(l=>({mode:l.metadata.mode,path:l.basename,oid:l.metadata.oid,type:l.type})),s=tr.from(a);return await mr({fs:e,gitdir:t,type:"tree",object:s.toObject(),dryRun:n})}async function bl({fs:e,cache:t,gitdir:r,oid:n,filepath:i}){if(i.startsWith("/"))throw new Si("leading-slash");if(i.endsWith("/"))throw new Si("trailing-slash");let a=n,s=await bs({fs:e,cache:t,gitdir:r,oid:n}),o=s.tree;if(i==="")n=s.oid;else{let l=i.split("/");n=await g2({fs:e,cache:t,gitdir:r,tree:o,pathArray:l,oid:a,filepath:i})}return n}async function g2({fs:e,cache:t,gitdir:r,tree:n,pathArray:i,oid:a,filepath:s}){let o=i.shift();for(let l of n)if(l.path===o){if(i.length===0)return l.oid;{let{type:c,object:u}=await qe({fs:e,cache:t,gitdir:r,oid:l.oid});if(c!=="tree")throw new zt(a,c,"tree",s);return n=tr.from(u),g2({fs:e,cache:t,gitdir:r,tree:n,pathArray:i,oid:a,filepath:s})}}throw new Le(`file or directory found at "${a}:${s}"`)}async function ks({fs:e,cache:t,gitdir:r,oid:n,filepath:i=void 0}){i!==void 0&&(n=await bl({fs:e,cache:t,gitdir:r,oid:n,filepath:i}));let{tree:a,oid:s}=await bs({fs:e,cache:t,gitdir:r,oid:n});return{oid:s,tree:a.entries()}}async function kp({fs:e,gitdir:t,tree:r}){let n=tr.from(r).toObject();return await mr({fs:e,gitdir:t,type:"tree",object:n,format:"content"})}async function nO({fs:e,cache:t,onSign:r,gitdir:n,ref:i,oid:a,note:s,force:o,author:l,committer:c,signingKey:u}){let f;try{f=await W.resolve({gitdir:n,fs:e,ref:i})}catch(y){if(!(y instanceof Le))throw y}let h=(await ks({fs:e,cache:t,gitdir:n,oid:f||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;if(o)h=h.filter(y=>y.path!==a);else for(let y of h)if(y.path===a)throw new en("note",a);typeof s=="string"&&(s=Buffer.from(s,"utf8"));let p=await mr({fs:e,gitdir:n,type:"blob",object:s,format:"content"});h.push({mode:"100644",path:a,oid:p,type:"blob"});let m=await kp({fs:e,gitdir:n,tree:h});return await mu({fs:e,cache:t,onSign:r,gitdir:n,ref:i,tree:m,parent:f&&[f],message:`Note added by 'isomorphic-git addNote' +`,author:l,committer:c,signingKey:u})}async function iO({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ref:i="refs/notes/commits",oid:a,note:s,force:o,author:l,committer:c,signingKey:u,cache:f={}}){try{C("fs",e),C("gitdir",n),C("oid",a),C("note",s),u&&C("onSign",t);let d=new X(e),h=await fa({fs:d,gitdir:n,author:l});if(!h)throw new Vt("author");let p=await Ss({fs:d,gitdir:n,author:h,committer:c});if(!p)throw new Vt("committer");return await nO({fs:new X(d),cache:f,onSign:t,gitdir:n,ref:i,oid:a,note:s,force:o,author:h,committer:p,signingKey:u})}catch(d){throw d.caller="git.addNote",d}}async function v2({fs:e,gitdir:t,remote:r,url:n,force:i}){if(r!==Qr.default.clean(r))throw new Wn(r,Qr.default.clean(r));let a=await We.get({fs:e,gitdir:t});if(!i&&(await a.getSubsections("remote")).includes(r)&&n!==await a.get(`remote.${r}.url`))throw new en("remote",r);await a.set(`remote.${r}.url`,n),await a.set(`remote.${r}.fetch`,`+refs/heads/*:refs/remotes/${r}/*`),await We.save({fs:e,gitdir:t,config:a})}async function aO({fs:e,dir:t,gitdir:r=$(t,".git"),remote:n,url:i,force:a=!1}){try{return C("fs",e),C("gitdir",r),C("remote",n),C("url",i),await v2({fs:new X(e),gitdir:r,remote:n,url:i,force:a})}catch(s){throw s.caller="git.addRemote",s}}async function sO({fs:e,cache:t,onSign:r,gitdir:n,ref:i,tagger:a,message:s=i,gpgsig:o,object:l,signingKey:c,force:u=!1}){if(i=i.startsWith("refs/tags/")?i:`refs/tags/${i}`,!u&&await W.exists({fs:e,gitdir:n,ref:i}))throw new en("tag",i);let f=await W.resolve({fs:e,gitdir:n,ref:l||"HEAD"}),{type:d}=await qe({fs:e,cache:t,gitdir:n,oid:f}),h=pr.from({object:f,type:d,tag:i.replace("refs/tags/",""),tagger:a,message:s,gpgsig:o});c&&(h=await pr.sign(h,r,c));let p=await mr({fs:e,gitdir:n,type:"tag",object:h.toObject()});await W.writeRef({fs:e,gitdir:n,ref:i,value:p})}async function oO({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ref:i,tagger:a,message:s=i,gpgsig:o,object:l,signingKey:c,force:u=!1,cache:f={}}){try{C("fs",e),C("gitdir",n),C("ref",i),c&&C("onSign",t);let d=new X(e),h=await fa({fs:d,gitdir:n,author:a});if(!h)throw new Vt("tagger");return await sO({fs:d,cache:f,onSign:t,gitdir:n,ref:i,tagger:h,message:s,gpgsig:o,object:l,signingKey:c,force:u})}catch(d){throw d.caller="git.annotatedTag",d}}async function lO({fs:e,gitdir:t,ref:r,object:n,checkout:i=!1,force:a=!1}){if(r!==Qr.default.clean(r))throw new Wn(r,Qr.default.clean(r));let s=`refs/heads/${r}`;if(!a&&await W.exists({fs:e,gitdir:t,ref:s}))throw new en("branch",r,!1);let o;try{o=await W.resolve({fs:e,gitdir:t,ref:n||"HEAD"})}catch(l){}o&&await W.writeRef({fs:e,gitdir:t,ref:s,value:o}),i&&await W.writeSymbolicRef({fs:e,gitdir:t,ref:"HEAD",value:s})}async function cO({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,object:i,checkout:a=!1,force:s=!1}){try{return C("fs",e),C("gitdir",r),C("ref",n),await lO({fs:new X(e),gitdir:r,ref:n,object:i,checkout:a,force:s})}catch(o){throw o.caller="git.branch",o}}var y2=(e,t)=>e==="."||t==null||t.length===0||t==="."?!0:t.length>=e.length?t.startsWith(e):e.startsWith(t);async function Tp({fs:e,cache:t,onProgress:r,onPostCheckout:n,dir:i,gitdir:a,remote:s,ref:o,filepaths:l,noCheckout:c,noUpdateHead:u,dryRun:f,force:d,track:h=!0}){let p;if(n)try{p=await W.resolve({fs:e,gitdir:a,ref:"HEAD"})}catch(v){p="0000000000000000000000000000000000000000"}let m;try{m=await W.resolve({fs:e,gitdir:a,ref:o})}catch(v){if(o==="HEAD")throw v;let y=`${s}/${o}`;if(m=await W.resolve({fs:e,gitdir:a,ref:y}),h){let b=await We.get({fs:e,gitdir:a});await b.set(`branch.${o}.remote`,s),await b.set(`branch.${o}.merge`,`refs/heads/${o}`),await We.save({fs:e,gitdir:a,config:b})}await W.writeRef({fs:e,gitdir:a,ref:`refs/heads/${o}`,value:m})}if(!c){let v;try{v=await uO({fs:e,cache:t,onProgress:r,dir:i,gitdir:a,ref:o,force:d,filepaths:l})}catch(_){throw _ instanceof Le&&_.data.what===m?new ol(o,m):_}let y=v.filter(([_])=>_==="conflict").map(([_,k])=>k);if(y.length>0)throw new sl(y);let b=v.filter(([_])=>_==="error").map(([_,k])=>k);if(b.length>0)throw new le(b.join(", "));if(f){n&&await n({previousHead:p,newHead:m,type:l!=null&&l.length>0?"file":"branch"});return}let x=0,E=v.length;await yt.acquire({fs:e,gitdir:a,cache:t},async function(_){await Promise.all(v.filter(([k])=>k==="delete"||k==="delete-index").map(async function([k,w]){let A=`${i}/${w}`;k==="delete"&&await e.rm(A),_.delete({filepath:w}),r&&await r({phase:"Updating workdir",loaded:++x,total:E})}))}),await yt.acquire({fs:e,gitdir:a,cache:t},async function(_){for(let[k,w]of v)if(k==="rmdir"||k==="rmdir-index"){let A=`${i}/${w}`;try{k==="rmdir-index"&&_.delete({filepath:w}),await e.rmdir(A),r&&await r({phase:"Updating workdir",loaded:++x,total:E})}catch(S){if(S.code==="ENOTEMPTY")console.log(`Did not delete ${w} because directory is not empty`);else throw S}}}),await Promise.all(v.filter(([_])=>_==="mkdir"||_==="mkdir-index").map(async function([_,k]){let w=`${i}/${k}`;await e.mkdir(w),r&&await r({phase:"Updating workdir",loaded:++x,total:E})})),await yt.acquire({fs:e,gitdir:a,cache:t},async function(_){await Promise.all(v.filter(([k])=>k==="create"||k==="create-index"||k==="update"||k==="mkdir-index").map(async function([k,w,A,S,T]){let P=`${i}/${w}`;try{if(k!=="create-index"&&k!=="mkdir-index"){let{object:N}=await qe({fs:e,cache:t,gitdir:a,oid:A});if(T&&await e.rm(P),S===33188)await e.write(P,N);else if(S===33261)await e.write(P,N,{mode:511});else if(S===40960)await e.writelink(P,N);else throw new le(`Invalid mode 0o${S.toString(8)} detected in blob ${A}`)}let I=await e.lstat(P);S===33261&&(I.mode=493),k==="mkdir-index"&&(I.mode=57344),_.insert({filepath:w,stats:I,oid:A}),r&&await r({phase:"Updating workdir",loaded:++x,total:E})}catch(I){console.log(I)}}))}),n&&await n({previousHead:p,newHead:m,type:l!=null&&l.length>0?"file":"branch"})}if(!u){let v=await W.expand({fs:e,gitdir:a,ref:o});v.startsWith("refs/heads")?await W.writeSymbolicRef({fs:e,gitdir:a,ref:"HEAD",value:v}):await W.writeRef({fs:e,gitdir:a,ref:"HEAD",value:m})}}async function uO({fs:e,cache:t,onProgress:r,dir:n,gitdir:i,ref:a,force:s,filepaths:o}){let l=0;return _s({fs:e,cache:t,dir:n,gitdir:i,trees:[bi({ref:a}),pu(),hu()],map:async function(c,[u,f,d]){if(c===".")return;if(o&&!o.some(p=>y2(c,p)))return null;switch(r&&await r({phase:"Analyzing workdir",loaded:++l}),[!!d,!!u,!!f].map(Number).join("")){case"000":return;case"001":return s&&o&&o.includes(c)?["delete",c]:void 0;case"010":switch(await u.type()){case"tree":return["mkdir",c];case"blob":return["create",c,await u.oid(),await u.mode()];case"commit":return["mkdir-index",c,await u.oid(),await u.mode()];default:return["error",`new entry Unhandled type ${await u.type()}`]}case"011":switch(`${await u.type()}-${await f.type()}`){case"tree-tree":return;case"tree-blob":case"blob-tree":return["conflict",c];case"blob-blob":return await u.oid()!==await f.oid()?s?["update",c,await u.oid(),await u.mode(),await u.mode()!==await f.mode()]:["conflict",c]:await u.mode()!==await f.mode()?s?["update",c,await u.oid(),await u.mode(),!0]:["conflict",c]:["create-index",c,await u.oid(),await u.mode()];case"commit-tree":return;case"commit-blob":return["conflict",c];default:return["error",`new entry Unhandled type ${u.type}`]}case"100":return["delete-index",c];case"101":switch(await d.type()){case"tree":return["rmdir",c];case"blob":return await d.oid()!==await f.oid()?s?["delete",c]:["conflict",c]:["delete",c];case"commit":return["rmdir-index",c];default:return["error",`delete entry Unhandled type ${await d.type()}`]}case"110":case"111":switch(`${await d.type()}-${await u.type()}`){case"tree-tree":return;case"blob-blob":{if(await d.oid()===await u.oid()&&await d.mode()===await u.mode()&&!s)return;if(f){if(await f.oid()!==await d.oid()&&await f.oid()!==await u.oid())return s?["update",c,await u.oid(),await u.mode(),await u.mode()!==await f.mode()]:["conflict",c]}else if(s)return["update",c,await u.oid(),await u.mode(),await u.mode()!==await d.mode()];return await u.mode()!==await d.mode()?["update",c,await u.oid(),await u.mode(),!0]:await u.oid()!==await d.oid()?["update",c,await u.oid(),await u.mode(),!1]:void 0}case"tree-blob":return["update-dir-to-blob",c,await u.oid()];case"blob-tree":return["update-blob-to-tree",c];case"commit-commit":return["mkdir-index",c,await u.oid(),await u.mode()];default:return["error",`update entry Unhandled type ${await d.type()}-${await u.type()}`]}}},reduce:async function(c,u){return u=f2(u),c?c&&c[0]==="rmdir"?(u.push(c),u):(u.unshift(c),u):u}})}async function fO({fs:e,onProgress:t,onPostCheckout:r,dir:n,gitdir:i=$(n,".git"),remote:a="origin",ref:s,filepaths:o,noCheckout:l=!1,noUpdateHead:c=s===void 0,dryRun:u=!1,force:f=!1,track:d=!0,cache:h={}}){try{C("fs",e),C("dir",n),C("gitdir",i);let p=s||"HEAD";return await Tp({fs:new X(e),cache:h,onProgress:t,onPostCheckout:r,dir:n,gitdir:i,remote:a,ref:p,filepaths:o,noCheckout:l,noUpdateHead:c,dryRun:u,force:f,track:d})}catch(p){throw p.caller="git.checkout",p}}var dO=new RegExp("^refs/(heads/|tags/|remotes/)?(.*)");function ca(e){let t=dO.exec(e);return t?t[1]==="remotes/"&&e.endsWith("/HEAD")?t[2].slice(0,-5):t[2]:e}async function ha({fs:e,gitdir:t,fullname:r=!1,test:n=!1}){let i=await W.resolve({fs:e,gitdir:t,ref:"HEAD",depth:2});if(n)try{await W.resolve({fs:e,gitdir:t,ref:i})}catch(a){return}if(i.startsWith("refs/"))return r?i:ca(i)}function hO(e){return e=e.replace(/^git@([^:]+):/,"https://$1/"),e=e.replace(/^ssh:\/\//,"https://"),e}function w2({username:e="",password:t=""}){return`Basic ${Buffer.from(`${e}:${t}`).toString("base64")}`}async function _l(e,t){let r=c2(e);for(;;){let{value:n,done:i}=await r.next();if(n&&await t(n),i)break}r.return&&r.return()}async function lu(e){let t=0,r=[];await _l(e,a=>{r.push(a),t+=a.byteLength});let n=new Uint8Array(t),i=0;for(let a of r)n.set(a,i),i+=a.byteLength;return n}function Yw(e){let t=e.match(/^https?:\/\/([^/]+)@/);if(t==null)return{url:e,auth:{}};t=t[1];let[r,n]=t.split(":");return e=e.replace(`${t}@`,""),{url:e,auth:{username:r,password:n}}}function Sp(e,t){let r=t.toString(16);return"0".repeat(e-r.length)+r}var Ve=class{static flush(){return Buffer.from("0000","utf8")}static delim(){return Buffer.from("0001","utf8")}static encode(t){typeof t=="string"&&(t=Buffer.from(t));let r=t.length+4,n=Sp(4,r);return Buffer.concat([Buffer.from(n,"utf8"),t])}static streamReader(t){let r=new iu(t);return async function(){try{let i=await r.read(4);if(i==null)return!0;if(i=parseInt(i.toString("utf8"),16),i===0||i===1)return null;let a=await r.read(i-4);return a==null?!0:a}catch(i){return t.error=i,!0}}}};async function Xw(e){let t={},r;for(;r=await e(),r!==!0;){if(r===null)continue;r=r.toString("utf8").replace(/\n$/,"");let n=r.indexOf("=");if(n>-1){let i=r.slice(0,n),a=r.slice(n+1);t[i]=a}else t[r]=!0}return{protocolVersion:2,capabilities2:t}}async function Zw(e,{service:t}){let r=new Set,n=new Map,i=new Map,a=Ve.streamReader(e),s=await a();for(;s===null;)s=await a();if(s===!0)throw new ll;if(s.includes("version 2"))return Xw(a);if(s.toString("utf8").replace(/\n$/,"")!==`# service=${t}`)throw new ua(`# service=${t}\\n`,s.toString("utf8"));let o=await a();for(;o===null;)o=await a();if(o===!0)return{capabilities:r,refs:n,symrefs:i};if(o=o.toString("utf8"),o.includes("version 2"))return Xw(a);let[l,c]=lp(o,"\0","\\x00");if(c.split(" ").map(u=>r.add(u)),l!=="0000000000000000000000000000000000000000 capabilities^{}"){let[u,f]=lp(l," "," ");for(n.set(f,u);;){let d=await a();if(d===!0)break;if(d!==null){let[h,p]=lp(d.toString("utf8")," "," ");n.set(p,h)}}}for(let u of r)if(u.startsWith("symref=")){let f=u.match(/symref=([^:]+):(.*)/);f.length===3&&i.set(f[1],f[2])}return{protocolVersion:1,capabilities:r,refs:n,symrefs:i}}function lp(e,t,r){let n=e.trim().split(t);if(n.length!==2)throw new ua(`Two strings separated by '${r}'`,e.toString("utf8"));return n}var Kw=(e,t)=>e.endsWith("?")?`${e}${t}`:`${e}/${t.replace(/^https?:\/\//,"")}`,Jw=(e,t)=>{(t.username||t.password)&&(e.Authorization=w2(t)),t.headers&&Object.assign(e,t.headers)},cp=async e=>{try{let t=Buffer.from(await lu(e.body)),r=t.toString("utf8");return{preview:r.length<256?r:r.slice(0,256)+"...",response:r,data:t}}catch(t){return{}}},Es=class{static async capabilities(){return["discover","connect"]}static async discover({http:t,onProgress:r,onAuth:n,onAuthSuccess:i,onAuthFailure:a,corsProxy:s,service:o,url:l,headers:c,protocolVersion:u}){let{url:f,auth:d}=Yw(l),h=s?Kw(s,f):f;(d.username||d.password)&&(c.Authorization=w2(d)),u===2&&(c["Git-Protocol"]="version=2");let p,m,v=!1;do if(p=await t.request({onProgress:r,method:"GET",url:`${h}/info/refs?service=${o}`,headers:c}),m=!1,p.statusCode===401||p.statusCode===203){let y=v?a:n;if(y){if(d=await y(f,{...d,headers:{...c}}),d&&d.cancel)throw new ws;d&&(Jw(c,d),v=!0,m=!0)}}else p.statusCode===200&&v&&i&&await i(f,d);while(m);if(p.statusCode!==200){let{response:y}=await cp(p);throw new ms(p.statusCode,p.statusMessage,y)}if(p.headers["content-type"]===`application/x-${o}-advertisement`){let y=await Zw(p.body,{service:o});return y.auth=d,y}else{let{preview:y,response:b,data:x}=await cp(p);try{let E=await Zw([x],{service:o});return E.auth=d,E}catch(E){throw new hl(y,b)}}}static async connect({http:t,onProgress:r,corsProxy:n,service:i,url:a,auth:s,body:o,headers:l}){let c=Yw(a);c&&(a=c.url),n&&(a=Kw(n,a)),l["content-type"]=`application/x-${i}-request`,l.accept=`application/x-${i}-result`,Jw(l,s);let u=await t.request({onProgress:r,method:"POST",url:`${a}/${i}`,body:o,headers:l});if(u.statusCode!==200){let{response:f}=cp(u);throw new ms(u.statusCode,u.statusMessage,f)}return u}};function pO({url:e}){if(e.startsWith("git@"))return{transport:"ssh",address:e};let t=e.match(/(\w+)(:\/\/|::)(.*)/);if(t!==null){if(t[2]==="://")return{transport:t[1],address:t[0]};if(t[2]==="::")return{transport:t[1],address:t[3]}}}var As=class{static getRemoteHelperFor({url:t}){let r=new Map;r.set("http",Es),r.set("https",Es);let n=pO({url:t});if(!n)throw new ml(t);if(r.has(n.transport))return r.get(n.transport);throw new pl(t,n.transport,n.transport==="ssh"?hO(t):void 0)}},la=null,da=class{static async read({fs:t,gitdir:r}){la===null&&(la=new tl.default);let n=$(r,"shallow"),i=new Set;return await la.acquire(n,async function(){let a=await t.read(n,{encoding:"utf8"});if(a===null||a.trim()==="")return i;a.trim().split(` +`).map(s=>i.add(s))}),i}static async write({fs:t,gitdir:r,oids:n}){la===null&&(la=new tl.default);let i=$(r,"shallow");if(n.size>0){let a=[...n].join(` `)+` -`;await sa.acquire(i,async function(){await t.write(i,a,{encoding:"utf8"})})}else await sa.acquire(i,async function(){await t.rm(i)})}};async function fO({fs:e,gitdir:t,oid:r}){let n=`objects/${r.slice(0,2)}/${r.slice(2)}`;return e.exists(`${t}/${n}`)}async function dO({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:i}){let a=await e.readdir($(r,"objects/pack"));a=a.filter(s=>s.endsWith(".idx"));for(let s of a){let o=`${r}/objects/pack/${s}`,c=await Ep({fs:e,cache:t,filename:o,getExternalRefDelta:i});if(c.error)throw new le(c.error);if(c.offsets.has(n))return!0}return!1}async function Zw({fs:e,cache:t,gitdir:r,oid:n,format:i="content"}){let a=o=>qe({fs:e,cache:t,gitdir:r,oid:o}),s=await fO({fs:e,gitdir:r,oid:n});return s||(s=await dO({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:a})),s}function hO(e){let i="5041434b"+"00000002"+"00000000";return e.slice(0,12).toString("hex")===i}function v2(e,t){let r=e.map(n=>n.split("=",1)[0]);return t.filter(n=>{let i=n.split("=",1)[0];return r.includes(i)})}var yu={name:"isomorphic-git",version:"1.27.1",agent:"git/isomorphic-git@1.27.1"},ls=class{constructor(){this._queue=[]}write(t){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){let r=this._waiting;this._waiting=null,r({value:t})}else this._queue.push(t)}end(){if(this._ended=!0,this._waiting){let t=this._waiting;this._waiting=null,t({done:!0})}}destroy(t){this.error=t,this.end()}async next(){if(this._queue.length>0)return{value:this._queue.shift()};if(this._ended)return{done:!0};if(this._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(t=>{this._waiting=t})}};function pO(e){let t=e.indexOf("\r"),r=e.indexOf(` -`);return t===-1&&r===-1?-1:t===-1?r+1:r===-1?t+1:r===t+1?r+1:Math.min(t,r)+1}function y2(e){let t=new ls,r="";return(async()=>(await yl(e,n=>{for(n=n.toString("utf8"),r+=n;;){let i=pO(r);if(i===-1)break;t.write(r.slice(0,i)),r=r.slice(i)}}),r.length>0&&t.write(r),t.end()))(),t}var fu=class{static demux(t){let r=Ve.streamReader(t),n=new ls,i=new ls,a=new ls,s=async function(){let o=await r();if(o===null)return s();if(o===!0){n.end(),a.end(),t.error?i.destroy(t.error):i.end();return}switch(o[0]){case 1:{i.write(o.slice(1));break}case 2:{a.write(o.slice(1));break}case 3:{let c=o.slice(1);a.write(c),n.end(),a.end(),i.destroy(new Error(c.toString("utf8")));return}default:n.write(o)}s()};return s(),{packetlines:n,packfile:i,progress:a}}};async function mO(e){let{packetlines:t,packfile:r,progress:n}=fu.demux(e),i=[],a=[],s=[],o=!1,c=!1;return new Promise((l,u)=>{yl(t,f=>{let d=f.toString("utf8").trim();if(d.startsWith("shallow")){let h=d.slice(-41).trim();h.length!==40&&u(new bi(h)),i.push(h)}else if(d.startsWith("unshallow")){let h=d.slice(-41).trim();h.length!==40&&u(new bi(h)),a.push(h)}else if(d.startsWith("ACK")){let[,h,p]=d.split(" ");s.push({oid:h,status:p}),p||(c=!0)}else d.startsWith("NAK")?(o=!0,c=!0):(c=!0,o=!0);c&&(e.error?u(e.error):l({shallows:i,unshallows:a,acks:s,nak:o,packfile:r,progress:n}))}).finally(()=>{c||(e.error?u(e.error):l({shallows:i,unshallows:a,acks:s,nak:o,packfile:r,progress:n}))})})}function gO({capabilities:e=[],wants:t=[],haves:r=[],shallows:n=[],depth:i=null,since:a=null,exclude:s=[]}){let o=[];t=[...new Set(t)];let c=` ${e.join(" ")}`;for(let l of t)o.push(Ve.encode(`want ${l}${c} -`)),c="";for(let l of n)o.push(Ve.encode(`shallow ${l} +`;await la.acquire(i,async function(){await t.write(i,a,{encoding:"utf8"})})}else await la.acquire(i,async function(){await t.rm(i)})}};async function mO({fs:e,gitdir:t,oid:r}){let n=`objects/${r.slice(0,2)}/${r.slice(2)}`;return e.exists(`${t}/${n}`)}async function gO({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:i}){let a=await e.readdir($(r,"objects/pack"));a=a.filter(s=>s.endsWith(".idx"));for(let s of a){let o=`${r}/objects/pack/${s}`,l=await Ap({fs:e,cache:t,filename:o,getExternalRefDelta:i});if(l.error)throw new le(l.error);if(l.offsets.has(n))return!0}return!1}async function Qw({fs:e,cache:t,gitdir:r,oid:n,format:i="content"}){let a=o=>qe({fs:e,cache:t,gitdir:r,oid:o}),s=await mO({fs:e,gitdir:r,oid:n});return s||(s=await gO({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:a})),s}function vO(e){let i="5041434b"+"00000002"+"00000000";return e.slice(0,12).toString("hex")===i}function b2(e,t){let r=e.map(n=>n.split("=",1)[0]);return t.filter(n=>{let i=n.split("=",1)[0];return r.includes(i)})}var gu={name:"isomorphic-git",version:"1.27.1",agent:"git/isomorphic-git@1.27.1"},fs=class{constructor(){this._queue=[]}write(t){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){let r=this._waiting;this._waiting=null,r({value:t})}else this._queue.push(t)}end(){if(this._ended=!0,this._waiting){let t=this._waiting;this._waiting=null,t({done:!0})}}destroy(t){this.error=t,this.end()}async next(){if(this._queue.length>0)return{value:this._queue.shift()};if(this._ended)return{done:!0};if(this._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(t=>{this._waiting=t})}};function yO(e){let t=e.indexOf("\r"),r=e.indexOf(` +`);return t===-1&&r===-1?-1:t===-1?r+1:r===-1?t+1:r===t+1?r+1:Math.min(t,r)+1}function _2(e){let t=new fs,r="";return(async()=>(await _l(e,n=>{for(n=n.toString("utf8"),r+=n;;){let i=yO(r);if(i===-1)break;t.write(r.slice(0,i)),r=r.slice(i)}}),r.length>0&&t.write(r),t.end()))(),t}var cu=class{static demux(t){let r=Ve.streamReader(t),n=new fs,i=new fs,a=new fs,s=async function(){let o=await r();if(o===null)return s();if(o===!0){n.end(),a.end(),t.error?i.destroy(t.error):i.end();return}switch(o[0]){case 1:{i.write(o.slice(1));break}case 2:{a.write(o.slice(1));break}case 3:{let l=o.slice(1);a.write(l),n.end(),a.end(),i.destroy(new Error(l.toString("utf8")));return}default:n.write(o)}s()};return s(),{packetlines:n,packfile:i,progress:a}}};async function wO(e){let{packetlines:t,packfile:r,progress:n}=cu.demux(e),i=[],a=[],s=[],o=!1,l=!1;return new Promise((c,u)=>{_l(t,f=>{let d=f.toString("utf8").trim();if(d.startsWith("shallow")){let h=d.slice(-41).trim();h.length!==40&&u(new _i(h)),i.push(h)}else if(d.startsWith("unshallow")){let h=d.slice(-41).trim();h.length!==40&&u(new _i(h)),a.push(h)}else if(d.startsWith("ACK")){let[,h,p]=d.split(" ");s.push({oid:h,status:p}),p||(l=!0)}else d.startsWith("NAK")?(o=!0,l=!0):(l=!0,o=!0);l&&(e.error?u(e.error):c({shallows:i,unshallows:a,acks:s,nak:o,packfile:r,progress:n}))}).finally(()=>{l||(e.error?u(e.error):c({shallows:i,unshallows:a,acks:s,nak:o,packfile:r,progress:n}))})})}function bO({capabilities:e=[],wants:t=[],haves:r=[],shallows:n=[],depth:i=null,since:a=null,exclude:s=[]}){let o=[];t=[...new Set(t)];let l=` ${e.join(" ")}`;for(let c of t)o.push(Ve.encode(`want ${c}${l} +`)),l="";for(let c of n)o.push(Ve.encode(`shallow ${c} `));i!==null&&o.push(Ve.encode(`deepen ${i} `)),a!==null&&o.push(Ve.encode(`deepen-since ${Math.floor(a.valueOf()/1e3)} -`));for(let l of s)o.push(Ve.encode(`deepen-not ${l} -`));o.push(Ve.flush());for(let l of r)o.push(Ve.encode(`have ${l} +`));for(let c of s)o.push(Ve.encode(`deepen-not ${c} +`));o.push(Ve.flush());for(let c of r)o.push(Ve.encode(`have ${c} `));return o.push(Ve.encode(`done -`)),o}async function Tp({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:c,ref:l,remoteRef:u,remote:f,url:d,corsProxy:h,depth:p=null,since:m=null,exclude:v=[],relative:y=!1,tags:b=!1,singleBranch:x=!1,headers:E={},prune:_=!1,pruneTags:k=!1}){let w=l||await fa({fs:e,gitdir:c,test:!0}),A=await We.get({fs:e,gitdir:c}),S=f||w&&await A.get(`branch.${w}.remote`)||"origin",T=d||await A.get(`remote.${S}.url`);if(typeof T=="undefined")throw new Qt("remote OR url");let P=u||w&&await A.get(`branch.${w}.merge`)||l||"HEAD";h===void 0&&(h=await A.get("http.corsProxy"));let O=xs.getRemoteHelperFor({url:T}),j=await O.discover({http:r,onAuth:a,onAuthSuccess:s,onAuthFailure:o,corsProxy:h,service:"git-upload-pack",url:T,headers:E,protocolVersion:1}),D=j.auth,Q=j.refs;if(Q.size===0)return{defaultBranch:null,fetchHead:null,fetchHeadDescription:null};if(p!==null&&!j.capabilities.has("shallow"))throw new yi("shallow","depth");if(m!==null&&!j.capabilities.has("deepen-since"))throw new yi("deepen-since","since");if(v.length>0&&!j.capabilities.has("deepen-not"))throw new yi("deepen-not","exclude");if(y===!0&&!j.capabilities.has("deepen-relative"))throw new yi("deepen-relative","relative");let{oid:de,fullref:ee}=q.resolveAgainstMap({ref:P,map:Q});for(let U of Q.keys())U===ee||U==="HEAD"||U.startsWith("refs/heads/")||b&&U.startsWith("refs/tags/")||Q.delete(U);let J=v2([...j.capabilities],["multi_ack_detailed","no-done","side-band-64k","ofs-delta",`agent=${yu.agent}`]);y&&J.push("deepen-relative");let Pe=x?[de]:Q.values(),me=x?[w]:await q.listRefs({fs:e,gitdir:c,filepath:"refs"}),F=[];for(let U of me)try{U=await q.expand({fs:e,gitdir:c,ref:U});let Le=await q.resolve({fs:e,gitdir:c,ref:U});await Zw({fs:e,cache:t,gitdir:c,oid:Le})&&F.push(Le)}catch(Le){}F=[...new Set(F)];let G=await ua.read({fs:e,gitdir:c}),N=j.capabilities.has("shallow")?[...G]:[],Me=gO({capabilities:J,wants:Pe,haves:F,shallows:N,depth:p,since:m,exclude:v}),Dt=Buffer.from(await uu(Me)),_t=await O.connect({http:r,onProgress:n,corsProxy:h,service:"git-upload-pack",url:T,auth:D,body:[Dt],headers:E}),Ee=await mO(_t.body);_t.headers&&(Ee.headers=_t.headers);for(let U of Ee.shallows)if(!G.has(U))try{let{object:Le}=await qe({fs:e,cache:t,gitdir:c,oid:U}),L=new tr(Le),Y=await Promise.all(L.headers().parent.map(De=>Zw({fs:e,cache:t,gitdir:c,oid:De})));Y.length===0||Y.every(De=>De)||G.add(U)}catch(Le){G.add(U)}for(let U of Ee.unshallows)G.delete(U);if(await ua.write({fs:e,gitdir:c,oids:G}),x){let U=new Map([[ee,de]]),Le=new Map,L=10,Y=ee;for(;L--;){let vt=j.symrefs.get(Y);if(vt===void 0)break;Le.set(Y,vt),Y=vt}let ye=Q.get(Y);ye&&U.set(Y,ye);let{pruned:De}=await q.updateRemoteRefs({fs:e,gitdir:c,remote:S,refs:U,symrefs:Le,tags:b,prune:_});_&&(Ee.pruned=De)}else{let{pruned:U}=await q.updateRemoteRefs({fs:e,gitdir:c,remote:S,refs:Q,symrefs:j.symrefs,tags:b,prune:_,pruneTags:k});_&&(Ee.pruned=U)}if(Ee.HEAD=j.symrefs.get("HEAD"),Ee.HEAD===void 0){let{oid:U}=q.resolveAgainstMap({ref:"HEAD",map:Q});for(let[Le,L]of Q.entries())if(Le!=="HEAD"&&L===U){Ee.HEAD=Le;break}}let st=ee.startsWith("refs/tags")?"tag":"branch";if(Ee.FETCH_HEAD={oid:de,description:`${st} '${oa(ee)}' of ${T}`},n||i){let U=y2(Ee.progress);yl(U,async Le=>{if(i&&await i(Le),n){let L=Le.match(/([^:]*).*\((\d+?)\/(\d+?)\)/);L&&await n({phase:L[1].trim(),loaded:parseInt(L[2],10),total:parseInt(L[3],10)})}})}let ot=Buffer.from(await uu(Ee.packfile));if(_t.body.error)throw _t.body.error;let Ct=ot.slice(-20).toString("hex"),$e={defaultBranch:Ee.HEAD,fetchHead:Ee.FETCH_HEAD.oid,fetchHeadDescription:Ee.FETCH_HEAD.description};if(Ee.headers&&($e.headers=Ee.headers),_&&($e.pruned=Ee.pruned),Ct!==""&&!hO(ot)){$e.packfile=`objects/pack/pack-${Ct}.pack`;let U=$(c,$e.packfile);await e.write(U,ot);let Le=Y=>qe({fs:e,cache:t,gitdir:c,oid:Y}),L=await tl.fromPack({pack:ot,getExternalRefDelta:Le,onProgress:n});await e.write(U.replace(/\.pack$/,".idx"),await L.toBuffer())}return $e}async function w2({fs:e,bare:t=!1,dir:r,gitdir:n=t?r:$(r,".git"),defaultBranch:i="master"}){if(await e.exists(n+"/config"))return;let a=["hooks","info","objects/info","objects/pack","refs/heads","refs/tags"];a=a.map(s=>n+"/"+s);for(let s of a)await e.mkdir(s);await e.write(n+"/config",`[core] +`)),o}async function Cp({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:l,ref:c,remoteRef:u,remote:f,url:d,corsProxy:h,depth:p=null,since:m=null,exclude:v=[],relative:y=!1,tags:b=!1,singleBranch:x=!1,headers:E={},prune:_=!1,pruneTags:k=!1}){let w=c||await ha({fs:e,gitdir:l,test:!0}),A=await We.get({fs:e,gitdir:l}),S=f||w&&await A.get(`branch.${w}.remote`)||"origin",T=d||await A.get(`remote.${S}.url`);if(typeof T=="undefined")throw new er("remote OR url");let P=u||w&&await A.get(`branch.${w}.merge`)||c||"HEAD";h===void 0&&(h=await A.get("http.corsProxy"));let I=As.getRemoteHelperFor({url:T}),N=await I.discover({http:r,onAuth:a,onAuthSuccess:s,onAuthFailure:o,corsProxy:h,service:"git-upload-pack",url:T,headers:E,protocolVersion:1}),L=N.auth,ee=N.refs;if(ee.size===0)return{defaultBranch:null,fetchHead:null,fetchHeadDescription:null};if(p!==null&&!N.capabilities.has("shallow"))throw new wi("shallow","depth");if(m!==null&&!N.capabilities.has("deepen-since"))throw new wi("deepen-since","since");if(v.length>0&&!N.capabilities.has("deepen-not"))throw new wi("deepen-not","exclude");if(y===!0&&!N.capabilities.has("deepen-relative"))throw new wi("deepen-relative","relative");let{oid:fe,fullref:J}=W.resolveAgainstMap({ref:P,map:ee});for(let H of ee.keys())H===J||H==="HEAD"||H.startsWith("refs/heads/")||b&&H.startsWith("refs/tags/")||ee.delete(H);let Q=b2([...N.capabilities],["multi_ack_detailed","no-done","side-band-64k","ofs-delta",`agent=${gu.agent}`]);y&&Q.push("deepen-relative");let Pe=x?[fe]:ee.values(),ge=x?[w]:await W.listRefs({fs:e,gitdir:l,filepath:"refs"}),z=[];for(let H of ge)try{H=await W.expand({fs:e,gitdir:l,ref:H});let Je=await W.resolve({fs:e,gitdir:l,ref:H});await Qw({fs:e,cache:t,gitdir:l,oid:Je})&&z.push(Je)}catch(Je){}z=[...new Set(z)];let Y=await da.read({fs:e,gitdir:l}),O=N.capabilities.has("shallow")?[...Y]:[],he=bO({capabilities:Q,wants:Pe,haves:z,shallows:O,depth:p,since:m,exclude:v}),Ge=Buffer.from(await lu(he)),gt=await I.connect({http:r,onProgress:n,corsProxy:h,service:"git-upload-pack",url:T,auth:L,body:[Ge],headers:E}),Re=await wO(gt.body);gt.headers&&(Re.headers=gt.headers);for(let H of Re.shallows)if(!Y.has(H))try{let{object:Je}=await qe({fs:e,cache:t,gitdir:l,oid:H}),D=new rr(Je),q=await Promise.all(D.headers().parent.map(Ne=>Qw({fs:e,cache:t,gitdir:l,oid:Ne})));q.length===0||q.every(Ne=>Ne)||Y.add(H)}catch(Je){Y.add(H)}for(let H of Re.unshallows)Y.delete(H);if(await da.write({fs:e,gitdir:l,oids:Y}),x){let H=new Map([[J,fe]]),Je=new Map,D=10,q=J;for(;D--;){let bt=N.symrefs.get(q);if(bt===void 0)break;Je.set(q,bt),q=bt}let ve=ee.get(q);ve&&H.set(q,ve);let{pruned:Ne}=await W.updateRemoteRefs({fs:e,gitdir:l,remote:S,refs:H,symrefs:Je,tags:b,prune:_});_&&(Re.pruned=Ne)}else{let{pruned:H}=await W.updateRemoteRefs({fs:e,gitdir:l,remote:S,refs:ee,symrefs:N.symrefs,tags:b,prune:_,pruneTags:k});_&&(Re.pruned=H)}if(Re.HEAD=N.symrefs.get("HEAD"),Re.HEAD===void 0){let{oid:H}=W.resolveAgainstMap({ref:"HEAD",map:ee});for(let[Je,D]of ee.entries())if(Je!=="HEAD"&&D===H){Re.HEAD=Je;break}}let ct=J.startsWith("refs/tags")?"tag":"branch";if(Re.FETCH_HEAD={oid:fe,description:`${ct} '${ca(J)}' of ${T}`},n||i){let H=_2(Re.progress);_l(H,async Je=>{if(i&&await i(Je),n){let D=Je.match(/([^:]*).*\((\d+?)\/(\d+?)\)/);D&&await n({phase:D[1].trim(),loaded:parseInt(D[2],10),total:parseInt(D[3],10)})}})}let rt=Buffer.from(await lu(Re.packfile));if(gt.body.error)throw gt.body.error;let Et=rt.slice(-20).toString("hex"),Ie={defaultBranch:Re.HEAD,fetchHead:Re.FETCH_HEAD.oid,fetchHeadDescription:Re.FETCH_HEAD.description};if(Re.headers&&(Ie.headers=Re.headers),_&&(Ie.pruned=Re.pruned),Et!==""&&!vO(rt)){Ie.packfile=`objects/pack/pack-${Et}.pack`;let H=$(l,Ie.packfile);await e.write(H,rt);let Je=q=>qe({fs:e,cache:t,gitdir:l,oid:q}),D=await il.fromPack({pack:rt,getExternalRefDelta:Je,onProgress:n});await e.write(H.replace(/\.pack$/,".idx"),await D.toBuffer())}return Ie}async function x2({fs:e,bare:t=!1,dir:r,gitdir:n=t?r:$(r,".git"),defaultBranch:i="master"}){if(await e.exists(n+"/config"))return;let a=["hooks","info","objects/info","objects/pack","refs/heads","refs/tags"];a=a.map(s=>n+"/"+s);for(let s of a)await e.mkdir(s);await e.write(n+"/config",`[core] repositoryformatversion = 0 filemode = false bare = ${t} @@ -87,21 +87,21 @@ gpgsig`+ap(s)+` `)+` symlinks = false ignorecase = true `),await e.write(n+"/HEAD",`ref: refs/heads/${i} -`)}async function vO({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,onPostCheckout:c,dir:l,gitdir:u,url:f,corsProxy:d,ref:h,remote:p,depth:m,since:v,exclude:y,relative:b,singleBranch:x,noCheckout:E,noTags:_,headers:k}){try{if(await w2({fs:e,gitdir:u}),await p2({fs:e,gitdir:u,remote:p,url:f,force:!1}),d){let S=await We.get({fs:e,gitdir:u});await S.set("http.corsProxy",d),await We.save({fs:e,gitdir:u,config:S})}let{defaultBranch:w,fetchHead:A}=await Tp({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:u,ref:h,remote:p,corsProxy:d,depth:m,since:v,exclude:y,relative:b,singleBranch:x,headers:k,tags:!_});if(A===null)return;h=h||w,h=h.replace("refs/heads/",""),await kp({fs:e,cache:t,onProgress:n,onPostCheckout:c,dir:l,gitdir:u,ref:h,remote:p,noCheckout:E})}catch(w){throw await e.rmdir(u,{recursive:!0,maxRetries:10}).catch(()=>{}),w}}async function yO({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPostCheckout:o,dir:c,gitdir:l=$(c,".git"),url:u,corsProxy:f=void 0,ref:d=void 0,remote:h="origin",depth:p=void 0,since:m=void 0,exclude:v=[],relative:y=!1,singleBranch:b=!1,noCheckout:x=!1,noTags:E=!1,headers:_={},cache:k={}}){try{return C("fs",e),C("http",t),C("gitdir",l),x||C("dir",c),C("url",u),await vO({fs:new X(e),cache:k,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPostCheckout:o,dir:c,gitdir:l,url:u,corsProxy:f,ref:d,remote:h,depth:p,since:m,exclude:v,relative:y,singleBranch:b,noCheckout:x,noTags:E,headers:_})}catch(w){throw w.caller="git.clone",w}}async function wO({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),message:i,author:a,committer:s,signingKey:o,amend:c=!1,dryRun:l=!1,noUpdateBranch:u=!1,ref:f,parent:d,tree:h,cache:p={}}){try{C("fs",e),c||C("message",i),o&&C("onSign",t);let m=new X(e);return await vu({fs:m,cache:p,onSign:t,gitdir:n,message:i,author:a,committer:s,signingKey:o,amend:c,dryRun:l,noUpdateBranch:u,ref:f,parent:d,tree:h})}catch(m){throw m.caller="git.commit",m}}async function bO({fs:e,dir:t,gitdir:r=$(t,".git"),fullname:n=!1,test:i=!1}){try{return C("fs",e),C("gitdir",r),await fa({fs:new X(e),gitdir:r,fullname:n,test:i})}catch(a){throw a.caller="git.currentBranch",a}}async function _O({fs:e,gitdir:t,ref:r}){if(r=r.startsWith("refs/heads/")?r:`refs/heads/${r}`,!await q.exists({fs:e,gitdir:t,ref:r}))throw new Ne(r);let i=await q.expand({fs:e,gitdir:t,ref:r}),a=await fa({fs:e,gitdir:t,fullname:!0});if(i===a){let c=await q.resolve({fs:e,gitdir:t,ref:i});await q.writeRef({fs:e,gitdir:t,ref:"HEAD",value:c})}await q.deleteRef({fs:e,gitdir:t,ref:i});let s=oa(r),o=await We.get({fs:e,gitdir:t});await o.deleteSection("branch",s),await We.save({fs:e,gitdir:t,config:o})}async function xO({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{return C("fs",e),C("ref",n),await _O({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteBranch",i}}async function SO({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{C("fs",e),C("ref",n),await q.deleteRef({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteRef",i}}async function EO({fs:e,gitdir:t,remote:r}){let n=await We.get({fs:e,gitdir:t});await n.deleteSection("remote",r),await We.save({fs:e,gitdir:t,config:n})}async function AO({fs:e,dir:t,gitdir:r=$(t,".git"),remote:n}){try{return C("fs",e),C("remote",n),await EO({fs:new X(e),gitdir:r,remote:n})}catch(i){throw i.caller="git.deleteRemote",i}}async function kO({fs:e,gitdir:t,ref:r}){r=r.startsWith("refs/tags/")?r:`refs/tags/${r}`,await q.deleteRef({fs:e,gitdir:t,ref:r})}async function TO({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{return C("fs",e),C("ref",n),await kO({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteTag",i}}async function CO({fs:e,gitdir:t,oid:r}){let n=r.slice(0,2);return(await e.readdir(`${t}/objects/${n}`)).map(a=>`${n}${a}`).filter(a=>a.startsWith(r))}async function PO({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:i}){let a=[],s=await e.readdir($(r,"objects/pack"));s=s.filter(o=>o.endsWith(".idx"));for(let o of s){let c=`${r}/objects/pack/${o}`,l=await Ep({fs:e,cache:t,filename:c,getExternalRefDelta:i});if(l.error)throw new le(l.error);for(let u of l.offsets.keys())u.startsWith(n)&&a.push(u)}return a}async function RO({fs:e,cache:t,gitdir:r,oid:n}){let i=o=>qe({fs:e,cache:t,gitdir:r,oid:o}),a=await CO({fs:e,gitdir:r,oid:n}),s=await PO({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:i});for(let o of s)a.indexOf(o)===-1&&a.push(o);if(a.length===1)return a[0];throw a.length>1?new rl("oids",n,a):new Ne(`an object matching "${n}"`)}async function MO({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await RO({fs:new X(e),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.expandOid",a}}async function OO({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{return C("fs",e),C("gitdir",r),C("ref",n),await q.expand({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.expandRef",i}}async function Cp({fs:e,cache:t,gitdir:r,oids:n}){let i={},a=n.length,s=n.map((o,c)=>({index:c,oid:o}));for(;s.length;){let o=new Set;for(let{oid:l,index:u}of s)i[l]||(i[l]=new Set),i[l].add(u),i[l].size===a&&o.add(l);if(o.size>0)return[...o];let c=new Map;for(let{oid:l,index:u}of s)try{let{object:f}=await qe({fs:e,cache:t,gitdir:r,oid:l}),d=tr.from(f),{parent:h}=d.parseHeaders();for(let p of h)(!i[p]||!i[p].has(u))&&c.set(p+":"+u,{oid:p,index:u})}catch(f){}s=Array.from(c.values())}return[]}var cp=/^.*(\r?\n|$)/gm;function IO({branches:e,contents:t}){let r=e[1],n=e[2],i=t[0],a=t[1],s=t[2],o=a.match(cp),c=i.match(cp),l=s.match(cp),u=(0,e2.default)(o,c,l),f=7,d="",h=!0;for(let p of u)p.ok&&(d+=p.ok.join("")),p.conflict&&(h=!1,d+=`${"<".repeat(f)} ${r} +`)}async function _O({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,onPostCheckout:l,dir:c,gitdir:u,url:f,corsProxy:d,ref:h,remote:p,depth:m,since:v,exclude:y,relative:b,singleBranch:x,noCheckout:E,noTags:_,headers:k}){try{if(await x2({fs:e,gitdir:u}),await v2({fs:e,gitdir:u,remote:p,url:f,force:!1}),d){let S=await We.get({fs:e,gitdir:u});await S.set("http.corsProxy",d),await We.save({fs:e,gitdir:u,config:S})}let{defaultBranch:w,fetchHead:A}=await Cp({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:u,ref:h,remote:p,corsProxy:d,depth:m,since:v,exclude:y,relative:b,singleBranch:x,headers:k,tags:!_});if(A===null)return;h=h||w,h=h.replace("refs/heads/",""),await Tp({fs:e,cache:t,onProgress:n,onPostCheckout:l,dir:c,gitdir:u,ref:h,remote:p,noCheckout:E})}catch(w){throw await e.rmdir(u,{recursive:!0,maxRetries:10}).catch(()=>{}),w}}async function xO({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPostCheckout:o,dir:l,gitdir:c=$(l,".git"),url:u,corsProxy:f=void 0,ref:d=void 0,remote:h="origin",depth:p=void 0,since:m=void 0,exclude:v=[],relative:y=!1,singleBranch:b=!1,noCheckout:x=!1,noTags:E=!1,headers:_={},cache:k={}}){try{return C("fs",e),C("http",t),C("gitdir",c),x||C("dir",l),C("url",u),await _O({fs:new X(e),cache:k,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPostCheckout:o,dir:l,gitdir:c,url:u,corsProxy:f,ref:d,remote:h,depth:p,since:m,exclude:v,relative:y,singleBranch:b,noCheckout:x,noTags:E,headers:_})}catch(w){throw w.caller="git.clone",w}}async function SO({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),message:i,author:a,committer:s,signingKey:o,amend:l=!1,dryRun:c=!1,noUpdateBranch:u=!1,ref:f,parent:d,tree:h,cache:p={}}){try{C("fs",e),l||C("message",i),o&&C("onSign",t);let m=new X(e);return await mu({fs:m,cache:p,onSign:t,gitdir:n,message:i,author:a,committer:s,signingKey:o,amend:l,dryRun:c,noUpdateBranch:u,ref:f,parent:d,tree:h})}catch(m){throw m.caller="git.commit",m}}async function EO({fs:e,dir:t,gitdir:r=$(t,".git"),fullname:n=!1,test:i=!1}){try{return C("fs",e),C("gitdir",r),await ha({fs:new X(e),gitdir:r,fullname:n,test:i})}catch(a){throw a.caller="git.currentBranch",a}}async function AO({fs:e,gitdir:t,ref:r}){if(r=r.startsWith("refs/heads/")?r:`refs/heads/${r}`,!await W.exists({fs:e,gitdir:t,ref:r}))throw new Le(r);let i=await W.expand({fs:e,gitdir:t,ref:r}),a=await ha({fs:e,gitdir:t,fullname:!0});if(i===a){let l=await W.resolve({fs:e,gitdir:t,ref:i});await W.writeRef({fs:e,gitdir:t,ref:"HEAD",value:l})}await W.deleteRef({fs:e,gitdir:t,ref:i});let s=ca(r),o=await We.get({fs:e,gitdir:t});await o.deleteSection("branch",s),await We.save({fs:e,gitdir:t,config:o})}async function kO({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{return C("fs",e),C("ref",n),await AO({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteBranch",i}}async function TO({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{C("fs",e),C("ref",n),await W.deleteRef({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteRef",i}}async function CO({fs:e,gitdir:t,remote:r}){let n=await We.get({fs:e,gitdir:t});await n.deleteSection("remote",r),await We.save({fs:e,gitdir:t,config:n})}async function PO({fs:e,dir:t,gitdir:r=$(t,".git"),remote:n}){try{return C("fs",e),C("remote",n),await CO({fs:new X(e),gitdir:r,remote:n})}catch(i){throw i.caller="git.deleteRemote",i}}async function RO({fs:e,gitdir:t,ref:r}){r=r.startsWith("refs/tags/")?r:`refs/tags/${r}`,await W.deleteRef({fs:e,gitdir:t,ref:r})}async function MO({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{return C("fs",e),C("ref",n),await RO({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.deleteTag",i}}async function OO({fs:e,gitdir:t,oid:r}){let n=r.slice(0,2);return(await e.readdir(`${t}/objects/${n}`)).map(a=>`${n}${a}`).filter(a=>a.startsWith(r))}async function IO({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:i}){let a=[],s=await e.readdir($(r,"objects/pack"));s=s.filter(o=>o.endsWith(".idx"));for(let o of s){let l=`${r}/objects/pack/${o}`,c=await Ap({fs:e,cache:t,filename:l,getExternalRefDelta:i});if(c.error)throw new le(c.error);for(let u of c.offsets.keys())u.startsWith(n)&&a.push(u)}return a}async function FO({fs:e,cache:t,gitdir:r,oid:n}){let i=o=>qe({fs:e,cache:t,gitdir:r,oid:o}),a=await OO({fs:e,gitdir:r,oid:n}),s=await IO({fs:e,cache:t,gitdir:r,oid:n,getExternalRefDelta:i});for(let o of s)a.indexOf(o)===-1&&a.push(o);if(a.length===1)return a[0];throw a.length>1?new al("oids",n,a):new Le(`an object matching "${n}"`)}async function $O({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await FO({fs:new X(e),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.expandOid",a}}async function LO({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n}){try{return C("fs",e),C("gitdir",r),C("ref",n),await W.expand({fs:new X(e),gitdir:r,ref:n})}catch(i){throw i.caller="git.expandRef",i}}async function Pp({fs:e,cache:t,gitdir:r,oids:n}){let i={},a=n.length,s=n.map((o,l)=>({index:l,oid:o}));for(;s.length;){let o=new Set;for(let{oid:c,index:u}of s)i[c]||(i[c]=new Set),i[c].add(u),i[c].size===a&&o.add(c);if(o.size>0)return[...o];let l=new Map;for(let{oid:c,index:u}of s)try{let{object:f}=await qe({fs:e,cache:t,gitdir:r,oid:c}),d=rr.from(f),{parent:h}=d.parseHeaders();for(let p of h)(!i[p]||!i[p].has(u))&&l.set(p+":"+u,{oid:p,index:u})}catch(f){}s=Array.from(l.values())}return[]}var up=/^.*(\r?\n|$)/gm;function DO({branches:e,contents:t}){let r=e[1],n=e[2],i=t[0],a=t[1],s=t[2],o=a.match(up),l=i.match(up),c=s.match(up),u=(0,n2.default)(o,l,c),f=7,d="",h=!0;for(let p of u)p.ok&&(d+=p.ok.join("")),p.conflict&&(h=!1,d+=`${"<".repeat(f)} ${r} `,d+=p.conflict.a.join(""),d+=`${"=".repeat(f)} `,d+=p.conflict.b.join(""),d+=`${">".repeat(f)} ${n} -`);return{cleanMerge:h,mergedText:d}}async function FO({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),index:i,ourOid:a,baseOid:s,theirOid:o,ourName:c="ours",baseName:l="base",theirName:u="theirs",dryRun:f=!1,abortOnConflict:d=!0,mergeDriver:h}){let p=wi({ref:a}),m=wi({ref:s}),v=wi({ref:o}),y=[],b=[],x=[],E=[],_=await ys({fs:e,cache:t,dir:r,gitdir:n,trees:[p,m,v],map:async function(k,[w,A,S]){let T=nu(k),P=await lu(w,A),O=await lu(S,A);switch(`${P}-${O}`){case"false-false":return{mode:await A.mode(),path:T,oid:await A.oid(),type:await A.type()};case"false-true":return S?{mode:await S.mode(),path:T,oid:await S.oid(),type:await S.type()}:void 0;case"true-false":return w?{mode:await w.mode(),path:T,oid:await w.oid(),type:await w.type()}:void 0;case"true-true":{if(w&&A&&S&&await w.type()==="blob"&&await A.type()==="blob"&&await S.type()==="blob")return $O({fs:e,gitdir:n,path:T,ours:w,base:A,theirs:S,ourName:c,baseName:l,theirName:u,mergeDriver:h}).then(async j=>{if(j.cleanMerge)d||i.insert({filepath:k,oid:j.mergeResult.oid,stage:0});else if(y.push(k),b.push(k),!d){let D=await A.oid(),Q=await w.oid(),de=await S.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:D,stage:1}),i.insert({filepath:k,oid:Q,stage:2}),i.insert({filepath:k,oid:de,stage:3})}return j.mergeResult});if(A&&!w&&S&&await A.type()==="blob"&&await S.type()==="blob"){if(y.push(k),x.push(k),!d){let j=await A.oid(),D=await S.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:j,stage:1}),i.insert({filepath:k,oid:D,stage:3})}return{mode:await S.mode(),oid:await S.oid(),type:"blob",path:T}}if(A&&w&&!S&&await A.type()==="blob"&&await w.type()==="blob"){if(y.push(k),E.push(k),!d){let j=await A.oid(),D=await w.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:j,stage:1}),i.insert({filepath:k,oid:D,stage:2})}return{mode:await w.mode(),oid:await w.oid(),type:"blob",path:T}}if(A&&!w&&!S&&await A.type()==="blob")return;throw new hs}}},reduce:y.length!==0&&(!r||d)?void 0:async(k,w)=>{let A=w.filter(Boolean);if(k&&!(k&&k.type==="tree"&&A.length===0)){if(A.length>0){let T=new er(A).toObject(),P=await mr({fs:e,gitdir:n,type:"tree",object:T,dryRun:f});k.oid=P}return k}}});return y.length!==0?(r&&!d&&await ys({fs:e,cache:t,dir:r,gitdir:n,trees:[wi({ref:_.oid})],map:async function(k,[w]){let A=`${r}/${k}`;if(await w.type()==="blob"){let S=await w.mode(),T=new TextDecoder().decode(await w.content());await e.write(A,T,{mode:S})}return!0}}),new ps(y,b,x,E)):_.oid}async function $O({fs:e,gitdir:t,path:r,ours:n,base:i,theirs:a,ourName:s,theirName:o,baseName:c,dryRun:l,mergeDriver:u=IO}){let f="blob",d=await i.mode()===await n.mode()?await a.mode():await n.mode();if(await n.oid()===await a.oid())return{cleanMerge:!0,mergeResult:{mode:d,path:r,oid:await n.oid(),type:f}};if(await n.oid()===await i.oid())return{cleanMerge:!0,mergeResult:{mode:d,path:r,oid:await a.oid(),type:f}};if(await a.oid()===await i.oid())return{cleanMerge:!0,mergeResult:{mode:d,path:r,oid:await n.oid(),type:f}};let h=Buffer.from(await n.content()).toString("utf8"),p=Buffer.from(await i.content()).toString("utf8"),m=Buffer.from(await a.content()).toString("utf8"),{mergedText:v,cleanMerge:y}=await u({branches:[c,s,o],contents:[p,h,m],path:r}),b=await mr({fs:e,gitdir:t,type:"blob",object:Buffer.from(v,"utf8"),dryRun:l});return{cleanMerge:y,mergeResult:{mode:d,path:r,oid:b,type:f}}}async function b2({fs:e,cache:t,dir:r,gitdir:n,ours:i,theirs:a,fastForward:s=!0,fastForwardOnly:o=!1,dryRun:c=!1,noUpdateBranch:l=!1,abortOnConflict:u=!0,message:f,author:d,committer:h,signingKey:p,onSign:m,mergeDriver:v}){i===void 0&&(i=await fa({fs:e,gitdir:n,fullname:!0})),i=await q.expand({fs:e,gitdir:n,ref:i}),a=await q.expand({fs:e,gitdir:n,ref:a});let y=await q.resolve({fs:e,gitdir:n,ref:i}),b=await q.resolve({fs:e,gitdir:n,ref:a}),x=await Cp({fs:e,cache:t,gitdir:n,oids:[y,b]});if(x.length!==1)throw new hs;let E=x[0];if(E===b)return{oid:y,alreadyMerged:!0};if(s&&E===y)return!c&&!l&&await q.writeRef({fs:e,gitdir:n,ref:i,value:b}),{oid:b,fastForward:!0};{if(o)throw new sl;let _=await mt.acquire({fs:e,gitdir:n,cache:t,allowUnmerged:!1},async w=>FO({fs:e,cache:t,dir:r,gitdir:n,index:w,ourOid:y,theirOid:b,baseOid:E,ourName:oa(i),baseName:"base",theirName:oa(a),dryRun:c,abortOnConflict:u,mergeDriver:v}));if(_ instanceof ps)throw _;return f||(f=`Merge branch '${oa(a)}' into ${oa(i)}`),{oid:await vu({fs:e,cache:t,gitdir:n,message:f,ref:i,tree:_,parent:[y,b],author:d,committer:h,signingKey:p,onSign:m,dryRun:c,noUpdateBranch:l}),tree:_,mergeCommit:!0}}}async function _2({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,dir:c,gitdir:l,ref:u,url:f,remote:d,remoteRef:h,prune:p,pruneTags:m,fastForward:v,fastForwardOnly:y,corsProxy:b,singleBranch:x,headers:E,author:_,committer:k,signingKey:w}){try{if(!u){let T=await fa({fs:e,gitdir:l});if(!T)throw new Qt("ref");u=T}let{fetchHead:A,fetchHeadDescription:S}=await Tp({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:l,corsProxy:b,ref:u,url:f,remote:d,remoteRef:h,singleBranch:x,headers:E,prune:p,pruneTags:m});await b2({fs:e,cache:t,gitdir:l,ours:u,theirs:A,fastForward:v,fastForwardOnly:y,message:`Merge ${S}`,author:_,committer:k,signingKey:w,dryRun:!1,noUpdateBranch:!1}),await kp({fs:e,cache:t,onProgress:n,dir:c,gitdir:l,ref:u,remote:d,noCheckout:!1})}catch(A){throw A.caller="git.pull",A}}async function LO({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:c=$(o,".git"),ref:l,url:u,remote:f,remoteRef:d,corsProxy:h,singleBranch:p,headers:m={},cache:v={}}){try{C("fs",e),C("http",t),C("gitdir",c);let y={name:"",email:"",timestamp:Date.now(),timezoneOffset:0};return await _2({fs:new X(e),cache:v,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:c,ref:l,url:u,remote:f,remoteRef:d,fastForwardOnly:!0,corsProxy:h,singleBranch:p,headers:m,author:y,committer:y})}catch(y){throw y.caller="git.fastForward",y}}async function DO({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:c=$(o,".git"),ref:l,remote:u,remoteRef:f,url:d,corsProxy:h,depth:p=null,since:m=null,exclude:v=[],relative:y=!1,tags:b=!1,singleBranch:x=!1,headers:E={},prune:_=!1,pruneTags:k=!1,cache:w={}}){try{return C("fs",e),C("http",t),C("gitdir",c),await Tp({fs:new X(e),cache:w,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,gitdir:c,ref:l,remote:u,remoteRef:f,url:d,corsProxy:h,depth:p,since:m,exclude:v,relative:y,tags:b,singleBranch:x,headers:E,prune:_,pruneTags:k})}catch(A){throw A.caller="git.fetch",A}}async function NO({fs:e,dir:t,gitdir:r=$(t,".git"),oids:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oids",n),await Cp({fs:new X(e),cache:i,gitdir:r,oids:n})}catch(a){throw a.caller="git.findMergeBase",a}}async function x2({fs:e,filepath:t}){if(await e.exists($(t,".git")))return t;{let r=fs(t);if(r===t)throw new Ne(`git root for ${t}`);return x2({fs:e,filepath:r})}}async function jO({fs:e,filepath:t}){try{return C("fs",e),C("filepath",t),await x2({fs:new X(e),filepath:t})}catch(r){throw r.caller="git.findRoot",r}}async function BO({fs:e,dir:t,gitdir:r=$(t,".git"),path:n}){try{return C("fs",e),C("gitdir",r),C("path",n),await ml({fs:new X(e),gitdir:r,path:n})}catch(i){throw i.caller="git.getConfig",i}}async function HO({fs:e,gitdir:t,path:r}){return(await We.get({fs:e,gitdir:t})).getall(r)}async function UO({fs:e,dir:t,gitdir:r=$(t,".git"),path:n}){try{return C("fs",e),C("gitdir",r),C("path",n),await HO({fs:new X(e),gitdir:r,path:n})}catch(i){throw i.caller="git.getConfigAll",i}}async function GO({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1}){try{C("http",e),C("url",a);let l=await xs.getRemoteHelperFor({url:a}).discover({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:1}),u={capabilities:[...l.capabilities]};for(let[f,d]of l.refs){let h=f.split("/"),p=h.pop(),m=u;for(let v of h)m[v]=m[v]||{},m=m[v];m[p]=d}for(let[f,d]of l.symrefs){let h=f.split("/"),p=h.pop(),m=u;for(let v of h)m[v]=m[v]||{},m=m[v];m[p]=d}return u}catch(c){throw c.caller="git.getRemoteInfo",c}}function S2(e,t,r,n){let i=[];for(let[a,s]of e.refs){if(t&&!a.startsWith(t))continue;if(a.endsWith("^{}")){if(n){let c=a.replace("^{}",""),l=i[i.length-1],u=l.ref===c?l:i.find(f=>f.ref===c);if(u===void 0)throw new Error("I did not expect this to happen");u.peeled=s}continue}let o={ref:a,oid:s};r&&e.symrefs.has(a)&&(o.target=e.symrefs.get(a)),i.push(o)}return i}async function zO({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1,protocolVersion:c=2}){try{C("http",e),C("url",a);let u=await xs.getRemoteHelperFor({url:a}).discover({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:c});if(u.protocolVersion===2)return{protocolVersion:u.protocolVersion,capabilities:u.capabilities2};let f={};for(let d of u.capabilities){let[h,p]=d.split("=");p?f[h]=p:f[h]=!0}return{protocolVersion:1,capabilities:f,refs:S2(u,void 0,!0,!0)}}catch(l){throw l.caller="git.getRemoteInfo2",l}}async function VO({type:e,object:t,format:r="content",oid:n=void 0}){return r!=="deflated"&&(r!=="wrapped"&&(t=_i.wrap({type:e,object:t})),n=await Gn(t)),{oid:n,object:t}}async function WO({object:e}){try{C("object",e),typeof e=="string"?e=Buffer.from(e,"utf8"):e=Buffer.from(e);let t="blob",{oid:r,object:n}=await VO({type:"blob",format:"content",object:e});return{oid:r,type:t,object:new Uint8Array(n),format:"wrapped"}}catch(t){throw t.caller="git.hashBlob",t}}async function qO({fs:e,cache:t,onProgress:r,dir:n,gitdir:i,filepath:a}){try{a=$(n,a);let s=await e.read(a),o=l=>qe({fs:e,cache:t,gitdir:i,oid:l}),c=await tl.fromPack({pack:s,getExternalRefDelta:o,onProgress:r});return await e.write(a.replace(/\.pack$/,".idx"),await c.toBuffer()),{oids:[...c.hashes]}}catch(s){throw s.caller="git.indexPack",s}}async function YO({fs:e,onProgress:t,dir:r,gitdir:n=$(r,".git"),filepath:i,cache:a={}}){try{return C("fs",e),C("dir",r),C("gitdir",r),C("filepath",i),await qO({fs:new X(e),cache:a,onProgress:t,dir:r,gitdir:n,filepath:i})}catch(s){throw s.caller="git.indexPack",s}}async function XO({fs:e,bare:t=!1,dir:r,gitdir:n=t?r:$(r,".git"),defaultBranch:i="master"}){try{return C("fs",e),C("gitdir",n),t||C("dir",r),await w2({fs:new X(e),bare:t,dir:r,gitdir:n,defaultBranch:i})}catch(a){throw a.caller="git.init",a}}async function E2({fs:e,cache:t,gitdir:r,oid:n,ancestor:i,depth:a}){let s=await ua.read({fs:e,gitdir:r});if(!n)throw new Qt("oid");if(!i)throw new Qt("ancestor");if(n===i)return!1;let o=[n],c=new Set,l=0;for(;o.length;){if(l++===a)throw new ll(a);let u=o.shift(),{type:f,object:d}=await qe({fs:e,cache:t,gitdir:r,oid:u});if(f!=="commit")throw new Gt(u,f,"commit");let h=tr.from(d).parse();for(let p of h.parent)if(p===i)return!0;if(!s.has(u))for(let p of h.parent)c.has(p)||(o.push(p),c.add(p))}return!1}async function ZO({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,ancestor:i,depth:a=-1,cache:s={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),C("ancestor",i),await E2({fs:new X(e),cache:s,gitdir:r,oid:n,ancestor:i,depth:a})}catch(o){throw o.caller="git.isDescendent",o}}async function KO({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n}){try{return C("fs",e),C("dir",t),C("gitdir",r),C("filepath",n),ws.isIgnored({fs:new X(e),dir:t,gitdir:r,filepath:n})}catch(i){throw i.caller="git.isIgnored",i}}async function JO({fs:e,dir:t,gitdir:r=$(t,".git"),remote:n}){try{return C("fs",e),C("gitdir",r),q.listBranches({fs:new X(e),gitdir:r,remote:n})}catch(i){throw i.caller="git.listBranches",i}}async function QO({fs:e,gitdir:t,ref:r,cache:n}){if(r){let i=await q.resolve({gitdir:t,fs:e,ref:r}),a=[];return await A2({fs:e,cache:n,gitdir:t,oid:i,filenames:a,prefix:""}),a}else return mt.acquire({fs:e,gitdir:t,cache:n},async function(i){return i.entries.map(a=>a.path)})}async function A2({fs:e,cache:t,gitdir:r,oid:n,filenames:i,prefix:a}){let{tree:s}=await Ss({fs:e,cache:t,gitdir:r,oid:n});for(let o of s)o.type==="tree"?await A2({fs:e,cache:t,gitdir:r,oid:o.oid,filenames:i,prefix:$(a,o.path)}):i.push($(a,o.path))}async function e8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),await QO({fs:new X(e),cache:i,gitdir:r,ref:n})}catch(a){throw a.caller="git.listFiles",a}}async function t8({fs:e,cache:t,gitdir:r,ref:n}){let i;try{i=await q.resolve({gitdir:r,fs:e,ref:n})}catch(o){if(o instanceof Ne)return[]}return(await Ss({fs:e,cache:t,gitdir:r,oid:i})).tree.map(o=>({target:o.path,note:o.oid}))}async function r8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n="refs/notes/commits",cache:i={}}){try{return C("fs",e),C("gitdir",r),C("ref",n),await t8({fs:new X(e),cache:i,gitdir:r,ref:n})}catch(a){throw a.caller="git.listNotes",a}}async function n8({fs:e,gitdir:t}){let r=await We.get({fs:e,gitdir:t}),n=await r.getSubsections("remote");return Promise.all(n.map(async a=>{let s=await r.get(`remote.${a}.url`);return{remote:a,url:s}}))}async function i8({fs:e,dir:t,gitdir:r=$(t,".git")}){try{return C("fs",e),C("gitdir",r),await n8({fs:new X(e),gitdir:r})}catch(n){throw n.caller="git.listRemotes",n}}async function a8(e){let t=Ve.streamReader(e),r=[],n;for(;n=await t(),n!==!0;){if(n===null)continue;n=n.toString("utf8").replace(/\n$/,"");let[i,a,...s]=n.split(" "),o={ref:a,oid:i};for(let c of s){let[l,u]=c.split(":");l==="symref-target"?o.target=u:l==="peeled"&&(o.peeled=u)}r.push(o)}return r}async function s8({prefix:e,symrefs:t,peelTags:r}){let n=[];return n.push(Ve.encode(`command=ls-refs -`)),n.push(Ve.encode(`agent=${yu.agent} -`)),(r||t||e)&&n.push(Ve.delim()),r&&n.push(Ve.encode("peel")),t&&n.push(Ve.encode("symrefs")),e&&n.push(Ve.encode(`ref-prefix ${e}`)),n.push(Ve.flush()),n}async function o8({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1,protocolVersion:c=2,prefix:l,symrefs:u,peelTags:f}){try{C("http",e),C("url",a);let d=await _s.discover({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:c});if(d.protocolVersion===1)return S2(d,l,u,f);let h=await s8({prefix:l,symrefs:u,peelTags:f}),p=await _s.connect({http:e,auth:d.auth,headers:s,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,body:h});return a8(p.body)}catch(d){throw d.caller="git.listServerRefs",d}}async function l8({fs:e,dir:t,gitdir:r=$(t,".git")}){try{return C("fs",e),C("gitdir",r),q.listTags({fs:new X(e),gitdir:r})}catch(n){throw n.caller="git.listTags",n}}function c8(e,t){return e.committer.timestamp-t.committer.timestamp}var u8="e69de29bb2d1d6434b8b29ae775ad8c2e48c5391";async function Kw({fs:e,cache:t,gitdir:r,oid:n,fileId:i}){if(i===u8)return;let a=n,s,o=await vs({fs:e,cache:t,gitdir:r,oid:n}),c=o.tree;return i===o.oid?s=o.path:(s=await k2({fs:e,cache:t,gitdir:r,tree:c,fileId:i,oid:a}),Array.isArray(s)&&(s.length===0?s=void 0:s.length===1&&(s=s[0]))),s}async function k2({fs:e,cache:t,gitdir:r,tree:n,fileId:i,oid:a,filepaths:s=[],parentPath:o=""}){let c=n.entries().map(function(l){let u;return l.oid===i?(u=$(o,l.path),s.push(u)):l.type==="tree"&&(u=qe({fs:e,cache:t,gitdir:r,oid:l.oid}).then(function({object:f}){return k2({fs:e,cache:t,gitdir:r,tree:er.from(f),fileId:i,oid:a,filepaths:s,parentPath:$(o,l.path)})})),u});return await Promise.all(c),s}async function f8({fs:e,cache:t,gitdir:r,filepath:n,ref:i,depth:a,since:s,force:o,follow:c}){let l=typeof s=="undefined"?void 0:Math.floor(s.valueOf()/1e3),u=[],f=await ua.read({fs:e,gitdir:r}),d=await q.resolve({fs:e,gitdir:r,ref:i}),h=[await cu({fs:e,cache:t,gitdir:r,oid:d})],p,m,v;function y(b){v&&n&&u.push(b)}for(;h.length>0;){let b=h.pop();if(l!==void 0&&b.commit.committer.timestamp<=l)break;if(n){let x;try{x=await vl({fs:e,cache:t,gitdir:r,oid:b.commit.tree,filepath:n}),m&&p!==x&&u.push(m),p=x,m=b,v=!0}catch(E){if(E instanceof Ne){let _=c&&p;if(_&&(_=await Kw({fs:e,cache:t,gitdir:r,oid:b.commit.tree,fileId:p}),_))if(Array.isArray(_)){if(m){let k=await Kw({fs:e,cache:t,gitdir:r,oid:m.commit.tree,fileId:p});if(Array.isArray(k))if(_=_.filter(w=>k.indexOf(w)===-1),_.length===1)_=_[0],n=_,m&&u.push(m);else{_=!1,m&&u.push(m);break}}}else n=_,m&&u.push(m);if(!_){if(v&&p&&(u.push(m),!o))break;if(!o&&!c)throw E}m=b,v=!1}else throw E}}else u.push(b);if(a!==void 0&&u.length===a){y(b);break}if(!f.has(b.oid))for(let x of b.commit.parent){let E=await cu({fs:e,cache:t,gitdir:r,oid:x});h.map(_=>_.oid).includes(E.oid)||h.push(E)}h.length===0&&y(b),h.sort((x,E)=>c8(x.commit,E.commit))}return u}async function d8({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,ref:i="HEAD",depth:a,since:s,force:o,follow:c,cache:l={}}){try{return C("fs",e),C("gitdir",r),C("ref",i),await f8({fs:new X(e),cache:l,gitdir:r,filepath:n,ref:i,depth:a,since:s,force:o,follow:c})}catch(u){throw u.caller="git.log",u}}async function h8({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ours:i,theirs:a,fastForward:s=!0,fastForwardOnly:o=!1,dryRun:c=!1,noUpdateBranch:l=!1,abortOnConflict:u=!0,message:f,author:d,committer:h,signingKey:p,cache:m={},mergeDriver:v}){try{C("fs",e),p&&C("onSign",t);let y=new X(e),b=await ca({fs:y,gitdir:n,author:d});if(!b&&(!o||!s))throw new zt("author");let x=await bs({fs:y,gitdir:n,author:b,committer:h});if(!x&&(!o||!s))throw new zt("committer");return await b2({fs:y,cache:m,dir:r,gitdir:n,ours:i,theirs:a,fastForward:s,fastForwardOnly:o,dryRun:c,noUpdateBranch:l,abortOnConflict:u,message:f,author:b,committer:x,signingKey:p,onSign:t,mergeDriver:v})}catch(y){throw y.caller="git.merge",y}}var p8={commit:16,tree:32,blob:48,tag:64,ofs_delta:96,ref_delta:112};async function T2({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),oids:i}){let a=new Sp.default,s=[];function o(u,f){let d=Buffer.from(u,f);s.push(d),a.update(d)}async function c({stype:u,object:f}){let d=p8[u],h=f.length,p=h>15?128:0,m=h&15;h=h>>>4;let v=(p|d|m).toString(16);for(o(v,"hex");p;)p=h>127?128:0,v=p|h&127,o(xp(2,v),"hex"),h=h>>>7;o(Buffer.from(await c2(f)))}o("PACK"),o("00000002","hex"),o(xp(8,i.length),"hex");for(let u of i){let{type:f,object:d}=await qe({fs:e,cache:t,gitdir:n,oid:u});await c({write:o,object:d,stype:f})}let l=a.digest();return s.push(l),s}async function m8({fs:e,cache:t,gitdir:r,oids:n,write:i}){let a=await T2({fs:e,cache:t,gitdir:r,oids:n}),s=Buffer.from(await uu(a)),c=`pack-${s.slice(-20).toString("hex")}.pack`;return i?(await e.write($(r,`objects/pack/${c}`),s),{filename:c}):{filename:c,packfile:new Uint8Array(s)}}async function g8({fs:e,dir:t,gitdir:r=$(t,".git"),oids:n,write:i=!1,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("oids",n),await m8({fs:new X(e),cache:a,gitdir:r,oids:n,write:i})}catch(s){throw s.caller="git.packObjects",s}}async function v8({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:c=$(o,".git"),ref:l,url:u,remote:f,remoteRef:d,prune:h=!1,pruneTags:p=!1,fastForward:m=!0,fastForwardOnly:v=!1,corsProxy:y,singleBranch:b,headers:x={},author:E,committer:_,signingKey:k,cache:w={}}){try{C("fs",e),C("gitdir",c);let A=new X(e),S=await ca({fs:A,gitdir:c,author:E});if(!S)throw new zt("author");let T=await bs({fs:A,gitdir:c,author:S,committer:_});if(!T)throw new zt("committer");return await _2({fs:A,cache:w,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:c,ref:l,url:u,remote:f,remoteRef:d,fastForward:m,fastForwardOnly:v,corsProxy:y,singleBranch:b,headers:x,author:S,committer:T,signingKey:k,prune:h,pruneTags:p})}catch(A){throw A.caller="git.pull",A}}async function y8({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),start:i,finish:a}){let s=await ua.read({fs:e,gitdir:n}),o=new Set,c=new Set;for(let f of i)o.add(await q.resolve({fs:e,gitdir:n,ref:f}));for(let f of a)try{let d=await q.resolve({fs:e,gitdir:n,ref:f});c.add(d)}catch(d){}let l=new Set;async function u(f){l.add(f);let{type:d,object:h}=await qe({fs:e,cache:t,gitdir:n,oid:f});if(d==="tag"){let m=pr.from(h).headers().object;return u(m)}if(d!=="commit")throw new Gt(f,d,"commit");if(!s.has(f)){let m=tr.from(h).headers().parent;for(f of m)!c.has(f)&&!l.has(f)&&await u(f)}}for(let f of o)await u(f);return l}async function up({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),oids:i}){let a=new Set;async function s(o){if(a.has(o))return;a.add(o);let{type:c,object:l}=await qe({fs:e,cache:t,gitdir:n,oid:o});if(c==="tag"){let f=pr.from(l).headers().object;await s(f)}else if(c==="commit"){let f=tr.from(l).headers().tree;await s(f)}else if(c==="tree"){let u=er.from(l);for(let f of u)f.type==="blob"&&a.add(f.oid),f.type==="tree"&&await s(f.oid)}}for(let o of i)await s(o);return a}async function w8(e){let t={},r="",n=Ve.streamReader(e),i=await n();for(;i!==!0;)i!==null&&(r+=i.toString("utf8")+` +`);return{cleanMerge:h,mergedText:d}}async function NO({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),index:i,ourOid:a,baseOid:s,theirOid:o,ourName:l="ours",baseName:c="base",theirName:u="theirs",dryRun:f=!1,abortOnConflict:d=!0,mergeDriver:h}){let p=bi({ref:a}),m=bi({ref:s}),v=bi({ref:o}),y=[],b=[],x=[],E=[],_=await _s({fs:e,cache:t,dir:r,gitdir:n,trees:[p,m,v],map:async function(k,[w,A,S]){let T=tu(k),P=await su(w,A),I=await su(S,A);switch(`${P}-${I}`){case"false-false":return{mode:await A.mode(),path:T,oid:await A.oid(),type:await A.type()};case"false-true":return S?{mode:await S.mode(),path:T,oid:await S.oid(),type:await S.type()}:void 0;case"true-false":return w?{mode:await w.mode(),path:T,oid:await w.oid(),type:await w.type()}:void 0;case"true-true":{if(w&&A&&S&&await w.type()==="blob"&&await A.type()==="blob"&&await S.type()==="blob")return BO({fs:e,gitdir:n,path:T,ours:w,base:A,theirs:S,ourName:l,baseName:c,theirName:u,mergeDriver:h}).then(async N=>{if(N.cleanMerge)d||i.insert({filepath:k,oid:N.mergeResult.oid,stage:0});else if(y.push(k),b.push(k),!d){let L=await A.oid(),ee=await w.oid(),fe=await S.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:L,stage:1}),i.insert({filepath:k,oid:ee,stage:2}),i.insert({filepath:k,oid:fe,stage:3})}return N.mergeResult});if(A&&!w&&S&&await A.type()==="blob"&&await S.type()==="blob"){if(y.push(k),x.push(k),!d){let N=await A.oid(),L=await S.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:N,stage:1}),i.insert({filepath:k,oid:L,stage:3})}return{mode:await S.mode(),oid:await S.oid(),type:"blob",path:T}}if(A&&w&&!S&&await A.type()==="blob"&&await w.type()==="blob"){if(y.push(k),E.push(k),!d){let N=await A.oid(),L=await w.oid();i.delete({filepath:k}),i.insert({filepath:k,oid:N,stage:1}),i.insert({filepath:k,oid:L,stage:2})}return{mode:await w.mode(),oid:await w.oid(),type:"blob",path:T}}if(A&&!w&&!S&&await A.type()==="blob")return;throw new gs}}},reduce:y.length!==0&&(!r||d)?void 0:async(k,w)=>{let A=w.filter(Boolean);if(k&&!(k&&k.type==="tree"&&A.length===0)){if(A.length>0){let T=new tr(A).toObject(),P=await mr({fs:e,gitdir:n,type:"tree",object:T,dryRun:f});k.oid=P}return k}}});return y.length!==0?(r&&!d&&await _s({fs:e,cache:t,dir:r,gitdir:n,trees:[bi({ref:_.oid})],map:async function(k,[w]){let A=`${r}/${k}`;if(await w.type()==="blob"){let S=await w.mode(),T=new TextDecoder().decode(await w.content());await e.write(A,T,{mode:S})}return!0}}),new vs(y,b,x,E)):_.oid}async function BO({fs:e,gitdir:t,path:r,ours:n,base:i,theirs:a,ourName:s,theirName:o,baseName:l,dryRun:c,mergeDriver:u=DO}){let f="blob",d=await i.mode()===await n.mode()?await a.mode():await n.mode();if(await n.oid()===await a.oid())return{cleanMerge:!0,mergeResult:{mode:d,path:r,oid:await n.oid(),type:f}};if(await n.oid()===await i.oid())return{cleanMerge:!0,mergeResult:{mode:d,path:r,oid:await a.oid(),type:f}};if(await a.oid()===await i.oid())return{cleanMerge:!0,mergeResult:{mode:d,path:r,oid:await n.oid(),type:f}};let h=Buffer.from(await n.content()).toString("utf8"),p=Buffer.from(await i.content()).toString("utf8"),m=Buffer.from(await a.content()).toString("utf8"),{mergedText:v,cleanMerge:y}=await u({branches:[l,s,o],contents:[p,h,m],path:r}),b=await mr({fs:e,gitdir:t,type:"blob",object:Buffer.from(v,"utf8"),dryRun:c});return{cleanMerge:y,mergeResult:{mode:d,path:r,oid:b,type:f}}}async function S2({fs:e,cache:t,dir:r,gitdir:n,ours:i,theirs:a,fastForward:s=!0,fastForwardOnly:o=!1,dryRun:l=!1,noUpdateBranch:c=!1,abortOnConflict:u=!0,message:f,author:d,committer:h,signingKey:p,onSign:m,mergeDriver:v}){i===void 0&&(i=await ha({fs:e,gitdir:n,fullname:!0})),i=await W.expand({fs:e,gitdir:n,ref:i}),a=await W.expand({fs:e,gitdir:n,ref:a});let y=await W.resolve({fs:e,gitdir:n,ref:i}),b=await W.resolve({fs:e,gitdir:n,ref:a}),x=await Pp({fs:e,cache:t,gitdir:n,oids:[y,b]});if(x.length!==1)throw new gs;let E=x[0];if(E===b)return{oid:y,alreadyMerged:!0};if(s&&E===y)return!l&&!c&&await W.writeRef({fs:e,gitdir:n,ref:i,value:b}),{oid:b,fastForward:!0};{if(o)throw new cl;let _=await yt.acquire({fs:e,gitdir:n,cache:t,allowUnmerged:!1},async w=>NO({fs:e,cache:t,dir:r,gitdir:n,index:w,ourOid:y,theirOid:b,baseOid:E,ourName:ca(i),baseName:"base",theirName:ca(a),dryRun:l,abortOnConflict:u,mergeDriver:v}));if(_ instanceof vs)throw _;return f||(f=`Merge branch '${ca(a)}' into ${ca(i)}`),{oid:await mu({fs:e,cache:t,gitdir:n,message:f,ref:i,tree:_,parent:[y,b],author:d,committer:h,signingKey:p,onSign:m,dryRun:l,noUpdateBranch:c}),tree:_,mergeCommit:!0}}}async function E2({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,dir:l,gitdir:c,ref:u,url:f,remote:d,remoteRef:h,prune:p,pruneTags:m,fastForward:v,fastForwardOnly:y,corsProxy:b,singleBranch:x,headers:E,author:_,committer:k,signingKey:w}){try{if(!u){let T=await ha({fs:e,gitdir:c});if(!T)throw new er("ref");u=T}let{fetchHead:A,fetchHeadDescription:S}=await Cp({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,gitdir:c,corsProxy:b,ref:u,url:f,remote:d,remoteRef:h,singleBranch:x,headers:E,prune:p,pruneTags:m});await S2({fs:e,cache:t,gitdir:c,ours:u,theirs:A,fastForward:v,fastForwardOnly:y,message:`Merge ${S}`,author:_,committer:k,signingKey:w,dryRun:!1,noUpdateBranch:!1}),await Tp({fs:e,cache:t,onProgress:n,dir:l,gitdir:c,ref:u,remote:d,noCheckout:!1})}catch(A){throw A.caller="git.pull",A}}async function jO({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:l=$(o,".git"),ref:c,url:u,remote:f,remoteRef:d,corsProxy:h,singleBranch:p,headers:m={},cache:v={}}){try{C("fs",e),C("http",t),C("gitdir",l);let y={name:"",email:"",timestamp:Date.now(),timezoneOffset:0};return await E2({fs:new X(e),cache:v,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:l,ref:c,url:u,remote:f,remoteRef:d,fastForwardOnly:!0,corsProxy:h,singleBranch:p,headers:m,author:y,committer:y})}catch(y){throw y.caller="git.fastForward",y}}async function HO({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:l=$(o,".git"),ref:c,remote:u,remoteRef:f,url:d,corsProxy:h,depth:p=null,since:m=null,exclude:v=[],relative:y=!1,tags:b=!1,singleBranch:x=!1,headers:E={},prune:_=!1,pruneTags:k=!1,cache:w={}}){try{return C("fs",e),C("http",t),C("gitdir",l),await Cp({fs:new X(e),cache:w,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,gitdir:l,ref:c,remote:u,remoteRef:f,url:d,corsProxy:h,depth:p,since:m,exclude:v,relative:y,tags:b,singleBranch:x,headers:E,prune:_,pruneTags:k})}catch(A){throw A.caller="git.fetch",A}}async function UO({fs:e,dir:t,gitdir:r=$(t,".git"),oids:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oids",n),await Pp({fs:new X(e),cache:i,gitdir:r,oids:n})}catch(a){throw a.caller="git.findMergeBase",a}}async function A2({fs:e,filepath:t}){if(await e.exists($(t,".git")))return t;{let r=ps(t);if(r===t)throw new Le(`git root for ${t}`);return A2({fs:e,filepath:r})}}async function GO({fs:e,filepath:t}){try{return C("fs",e),C("filepath",t),await A2({fs:new X(e),filepath:t})}catch(r){throw r.caller="git.findRoot",r}}async function zO({fs:e,dir:t,gitdir:r=$(t,".git"),path:n}){try{return C("fs",e),C("gitdir",r),C("path",n),await yl({fs:new X(e),gitdir:r,path:n})}catch(i){throw i.caller="git.getConfig",i}}async function VO({fs:e,gitdir:t,path:r}){return(await We.get({fs:e,gitdir:t})).getall(r)}async function WO({fs:e,dir:t,gitdir:r=$(t,".git"),path:n}){try{return C("fs",e),C("gitdir",r),C("path",n),await VO({fs:new X(e),gitdir:r,path:n})}catch(i){throw i.caller="git.getConfigAll",i}}async function qO({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1}){try{C("http",e),C("url",a);let c=await As.getRemoteHelperFor({url:a}).discover({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:1}),u={capabilities:[...c.capabilities]};for(let[f,d]of c.refs){let h=f.split("/"),p=h.pop(),m=u;for(let v of h)m[v]=m[v]||{},m=m[v];m[p]=d}for(let[f,d]of c.symrefs){let h=f.split("/"),p=h.pop(),m=u;for(let v of h)m[v]=m[v]||{},m=m[v];m[p]=d}return u}catch(l){throw l.caller="git.getRemoteInfo",l}}function k2(e,t,r,n){let i=[];for(let[a,s]of e.refs){if(t&&!a.startsWith(t))continue;if(a.endsWith("^{}")){if(n){let l=a.replace("^{}",""),c=i[i.length-1],u=c.ref===l?c:i.find(f=>f.ref===l);if(u===void 0)throw new Error("I did not expect this to happen");u.peeled=s}continue}let o={ref:a,oid:s};r&&e.symrefs.has(a)&&(o.target=e.symrefs.get(a)),i.push(o)}return i}async function YO({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1,protocolVersion:l=2}){try{C("http",e),C("url",a);let u=await As.getRemoteHelperFor({url:a}).discover({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:l});if(u.protocolVersion===2)return{protocolVersion:u.protocolVersion,capabilities:u.capabilities2};let f={};for(let d of u.capabilities){let[h,p]=d.split("=");p?f[h]=p:f[h]=!0}return{protocolVersion:1,capabilities:f,refs:k2(u,void 0,!0,!0)}}catch(c){throw c.caller="git.getRemoteInfo2",c}}async function XO({type:e,object:t,format:r="content",oid:n=void 0}){return r!=="deflated"&&(r!=="wrapped"&&(t=xi.wrap({type:e,object:t})),n=await Vn(t)),{oid:n,object:t}}async function ZO({object:e}){try{C("object",e),typeof e=="string"?e=Buffer.from(e,"utf8"):e=Buffer.from(e);let t="blob",{oid:r,object:n}=await XO({type:"blob",format:"content",object:e});return{oid:r,type:t,object:new Uint8Array(n),format:"wrapped"}}catch(t){throw t.caller="git.hashBlob",t}}async function KO({fs:e,cache:t,onProgress:r,dir:n,gitdir:i,filepath:a}){try{a=$(n,a);let s=await e.read(a),o=c=>qe({fs:e,cache:t,gitdir:i,oid:c}),l=await il.fromPack({pack:s,getExternalRefDelta:o,onProgress:r});return await e.write(a.replace(/\.pack$/,".idx"),await l.toBuffer()),{oids:[...l.hashes]}}catch(s){throw s.caller="git.indexPack",s}}async function JO({fs:e,onProgress:t,dir:r,gitdir:n=$(r,".git"),filepath:i,cache:a={}}){try{return C("fs",e),C("dir",r),C("gitdir",r),C("filepath",i),await KO({fs:new X(e),cache:a,onProgress:t,dir:r,gitdir:n,filepath:i})}catch(s){throw s.caller="git.indexPack",s}}async function QO({fs:e,bare:t=!1,dir:r,gitdir:n=t?r:$(r,".git"),defaultBranch:i="master"}){try{return C("fs",e),C("gitdir",n),t||C("dir",r),await x2({fs:new X(e),bare:t,dir:r,gitdir:n,defaultBranch:i})}catch(a){throw a.caller="git.init",a}}async function T2({fs:e,cache:t,gitdir:r,oid:n,ancestor:i,depth:a}){let s=await da.read({fs:e,gitdir:r});if(!n)throw new er("oid");if(!i)throw new er("ancestor");if(n===i)return!1;let o=[n],l=new Set,c=0;for(;o.length;){if(c++===a)throw new fl(a);let u=o.shift(),{type:f,object:d}=await qe({fs:e,cache:t,gitdir:r,oid:u});if(f!=="commit")throw new zt(u,f,"commit");let h=rr.from(d).parse();for(let p of h.parent)if(p===i)return!0;if(!s.has(u))for(let p of h.parent)l.has(p)||(o.push(p),l.add(p))}return!1}async function eI({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,ancestor:i,depth:a=-1,cache:s={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),C("ancestor",i),await T2({fs:new X(e),cache:s,gitdir:r,oid:n,ancestor:i,depth:a})}catch(o){throw o.caller="git.isDescendent",o}}async function tI({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n}){try{return C("fs",e),C("dir",t),C("gitdir",r),C("filepath",n),xs.isIgnored({fs:new X(e),dir:t,gitdir:r,filepath:n})}catch(i){throw i.caller="git.isIgnored",i}}async function rI({fs:e,dir:t,gitdir:r=$(t,".git"),remote:n}){try{return C("fs",e),C("gitdir",r),W.listBranches({fs:new X(e),gitdir:r,remote:n})}catch(i){throw i.caller="git.listBranches",i}}async function nI({fs:e,gitdir:t,ref:r,cache:n}){if(r){let i=await W.resolve({gitdir:t,fs:e,ref:r}),a=[];return await C2({fs:e,cache:n,gitdir:t,oid:i,filenames:a,prefix:""}),a}else return yt.acquire({fs:e,gitdir:t,cache:n},async function(i){return i.entries.map(a=>a.path)})}async function C2({fs:e,cache:t,gitdir:r,oid:n,filenames:i,prefix:a}){let{tree:s}=await ks({fs:e,cache:t,gitdir:r,oid:n});for(let o of s)o.type==="tree"?await C2({fs:e,cache:t,gitdir:r,oid:o.oid,filenames:i,prefix:$(a,o.path)}):i.push($(a,o.path))}async function iI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),await nI({fs:new X(e),cache:i,gitdir:r,ref:n})}catch(a){throw a.caller="git.listFiles",a}}async function aI({fs:e,cache:t,gitdir:r,ref:n}){let i;try{i=await W.resolve({gitdir:r,fs:e,ref:n})}catch(o){if(o instanceof Le)return[]}return(await ks({fs:e,cache:t,gitdir:r,oid:i})).tree.map(o=>({target:o.path,note:o.oid}))}async function sI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n="refs/notes/commits",cache:i={}}){try{return C("fs",e),C("gitdir",r),C("ref",n),await aI({fs:new X(e),cache:i,gitdir:r,ref:n})}catch(a){throw a.caller="git.listNotes",a}}async function oI({fs:e,gitdir:t}){let r=await We.get({fs:e,gitdir:t}),n=await r.getSubsections("remote");return Promise.all(n.map(async a=>{let s=await r.get(`remote.${a}.url`);return{remote:a,url:s}}))}async function lI({fs:e,dir:t,gitdir:r=$(t,".git")}){try{return C("fs",e),C("gitdir",r),await oI({fs:new X(e),gitdir:r})}catch(n){throw n.caller="git.listRemotes",n}}async function cI(e){let t=Ve.streamReader(e),r=[],n;for(;n=await t(),n!==!0;){if(n===null)continue;n=n.toString("utf8").replace(/\n$/,"");let[i,a,...s]=n.split(" "),o={ref:a,oid:i};for(let l of s){let[c,u]=l.split(":");c==="symref-target"?o.target=u:c==="peeled"&&(o.peeled=u)}r.push(o)}return r}async function uI({prefix:e,symrefs:t,peelTags:r}){let n=[];return n.push(Ve.encode(`command=ls-refs +`)),n.push(Ve.encode(`agent=${gu.agent} +`)),(r||t||e)&&n.push(Ve.delim()),r&&n.push(Ve.encode("peel")),t&&n.push(Ve.encode("symrefs")),e&&n.push(Ve.encode(`ref-prefix ${e}`)),n.push(Ve.flush()),n}async function fI({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,url:a,headers:s={},forPush:o=!1,protocolVersion:l=2,prefix:c,symrefs:u,peelTags:f}){try{C("http",e),C("url",a);let d=await Es.discover({http:e,onAuth:t,onAuthSuccess:r,onAuthFailure:n,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,headers:s,protocolVersion:l});if(d.protocolVersion===1)return k2(d,c,u,f);let h=await uI({prefix:c,symrefs:u,peelTags:f}),p=await Es.connect({http:e,auth:d.auth,headers:s,corsProxy:i,service:o?"git-receive-pack":"git-upload-pack",url:a,body:h});return cI(p.body)}catch(d){throw d.caller="git.listServerRefs",d}}async function dI({fs:e,dir:t,gitdir:r=$(t,".git")}){try{return C("fs",e),C("gitdir",r),W.listTags({fs:new X(e),gitdir:r})}catch(n){throw n.caller="git.listTags",n}}function hI(e,t){return e.committer.timestamp-t.committer.timestamp}var pI="e69de29bb2d1d6434b8b29ae775ad8c2e48c5391";async function e2({fs:e,cache:t,gitdir:r,oid:n,fileId:i}){if(i===pI)return;let a=n,s,o=await bs({fs:e,cache:t,gitdir:r,oid:n}),l=o.tree;return i===o.oid?s=o.path:(s=await P2({fs:e,cache:t,gitdir:r,tree:l,fileId:i,oid:a}),Array.isArray(s)&&(s.length===0?s=void 0:s.length===1&&(s=s[0]))),s}async function P2({fs:e,cache:t,gitdir:r,tree:n,fileId:i,oid:a,filepaths:s=[],parentPath:o=""}){let l=n.entries().map(function(c){let u;return c.oid===i?(u=$(o,c.path),s.push(u)):c.type==="tree"&&(u=qe({fs:e,cache:t,gitdir:r,oid:c.oid}).then(function({object:f}){return P2({fs:e,cache:t,gitdir:r,tree:tr.from(f),fileId:i,oid:a,filepaths:s,parentPath:$(o,c.path)})})),u});return await Promise.all(l),s}async function mI({fs:e,cache:t,gitdir:r,filepath:n,ref:i,depth:a,since:s,force:o,follow:l}){let c=typeof s=="undefined"?void 0:Math.floor(s.valueOf()/1e3),u=[],f=await da.read({fs:e,gitdir:r}),d=await W.resolve({fs:e,gitdir:r,ref:i}),h=[await ou({fs:e,cache:t,gitdir:r,oid:d})],p,m,v;function y(b){v&&n&&u.push(b)}for(;h.length>0;){let b=h.pop();if(c!==void 0&&b.commit.committer.timestamp<=c)break;if(n){let x;try{x=await bl({fs:e,cache:t,gitdir:r,oid:b.commit.tree,filepath:n}),m&&p!==x&&u.push(m),p=x,m=b,v=!0}catch(E){if(E instanceof Le){let _=l&&p;if(_&&(_=await e2({fs:e,cache:t,gitdir:r,oid:b.commit.tree,fileId:p}),_))if(Array.isArray(_)){if(m){let k=await e2({fs:e,cache:t,gitdir:r,oid:m.commit.tree,fileId:p});if(Array.isArray(k))if(_=_.filter(w=>k.indexOf(w)===-1),_.length===1)_=_[0],n=_,m&&u.push(m);else{_=!1,m&&u.push(m);break}}}else n=_,m&&u.push(m);if(!_){if(v&&p&&(u.push(m),!o))break;if(!o&&!l)throw E}m=b,v=!1}else throw E}}else u.push(b);if(a!==void 0&&u.length===a){y(b);break}if(!f.has(b.oid))for(let x of b.commit.parent){let E=await ou({fs:e,cache:t,gitdir:r,oid:x});h.map(_=>_.oid).includes(E.oid)||h.push(E)}h.length===0&&y(b),h.sort((x,E)=>hI(x.commit,E.commit))}return u}async function gI({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,ref:i="HEAD",depth:a,since:s,force:o,follow:l,cache:c={}}){try{return C("fs",e),C("gitdir",r),C("ref",i),await mI({fs:new X(e),cache:c,gitdir:r,filepath:n,ref:i,depth:a,since:s,force:o,follow:l})}catch(u){throw u.caller="git.log",u}}async function vI({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ours:i,theirs:a,fastForward:s=!0,fastForwardOnly:o=!1,dryRun:l=!1,noUpdateBranch:c=!1,abortOnConflict:u=!0,message:f,author:d,committer:h,signingKey:p,cache:m={},mergeDriver:v}){try{C("fs",e),p&&C("onSign",t);let y=new X(e),b=await fa({fs:y,gitdir:n,author:d});if(!b&&(!o||!s))throw new Vt("author");let x=await Ss({fs:y,gitdir:n,author:b,committer:h});if(!x&&(!o||!s))throw new Vt("committer");return await S2({fs:y,cache:m,dir:r,gitdir:n,ours:i,theirs:a,fastForward:s,fastForwardOnly:o,dryRun:l,noUpdateBranch:c,abortOnConflict:u,message:f,author:b,committer:x,signingKey:p,onSign:t,mergeDriver:v})}catch(y){throw y.caller="git.merge",y}}var yI={commit:16,tree:32,blob:48,tag:64,ofs_delta:96,ref_delta:112};async function R2({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),oids:i}){let a=new Ep.default,s=[];function o(u,f){let d=Buffer.from(u,f);s.push(d),a.update(d)}async function l({stype:u,object:f}){let d=yI[u],h=f.length,p=h>15?128:0,m=h&15;h=h>>>4;let v=(p|d|m).toString(16);for(o(v,"hex");p;)p=h>127?128:0,v=p|h&127,o(Sp(2,v),"hex"),h=h>>>7;o(Buffer.from(await d2(f)))}o("PACK"),o("00000002","hex"),o(Sp(8,i.length),"hex");for(let u of i){let{type:f,object:d}=await qe({fs:e,cache:t,gitdir:n,oid:u});await l({write:o,object:d,stype:f})}let c=a.digest();return s.push(c),s}async function wI({fs:e,cache:t,gitdir:r,oids:n,write:i}){let a=await R2({fs:e,cache:t,gitdir:r,oids:n}),s=Buffer.from(await lu(a)),l=`pack-${s.slice(-20).toString("hex")}.pack`;return i?(await e.write($(r,`objects/pack/${l}`),s),{filename:l}):{filename:l,packfile:new Uint8Array(s)}}async function bI({fs:e,dir:t,gitdir:r=$(t,".git"),oids:n,write:i=!1,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("oids",n),await wI({fs:new X(e),cache:a,gitdir:r,oids:n,write:i})}catch(s){throw s.caller="git.packObjects",s}}async function _I({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:l=$(o,".git"),ref:c,url:u,remote:f,remoteRef:d,prune:h=!1,pruneTags:p=!1,fastForward:m=!0,fastForwardOnly:v=!1,corsProxy:y,singleBranch:b,headers:x={},author:E,committer:_,signingKey:k,cache:w={}}){try{C("fs",e),C("gitdir",l);let A=new X(e),S=await fa({fs:A,gitdir:l,author:E});if(!S)throw new Vt("author");let T=await Ss({fs:A,gitdir:l,author:S,committer:_});if(!T)throw new Vt("committer");return await E2({fs:A,cache:w,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,dir:o,gitdir:l,ref:c,url:u,remote:f,remoteRef:d,fastForward:m,fastForwardOnly:v,corsProxy:y,singleBranch:b,headers:x,author:S,committer:T,signingKey:k,prune:h,pruneTags:p})}catch(A){throw A.caller="git.pull",A}}async function xI({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),start:i,finish:a}){let s=await da.read({fs:e,gitdir:n}),o=new Set,l=new Set;for(let f of i)o.add(await W.resolve({fs:e,gitdir:n,ref:f}));for(let f of a)try{let d=await W.resolve({fs:e,gitdir:n,ref:f});l.add(d)}catch(d){}let c=new Set;async function u(f){c.add(f);let{type:d,object:h}=await qe({fs:e,cache:t,gitdir:n,oid:f});if(d==="tag"){let m=pr.from(h).headers().object;return u(m)}if(d!=="commit")throw new zt(f,d,"commit");if(!s.has(f)){let m=rr.from(h).headers().parent;for(f of m)!l.has(f)&&!c.has(f)&&await u(f)}}for(let f of o)await u(f);return c}async function fp({fs:e,cache:t,dir:r,gitdir:n=$(r,".git"),oids:i}){let a=new Set;async function s(o){if(a.has(o))return;a.add(o);let{type:l,object:c}=await qe({fs:e,cache:t,gitdir:n,oid:o});if(l==="tag"){let f=pr.from(c).headers().object;await s(f)}else if(l==="commit"){let f=rr.from(c).headers().tree;await s(f)}else if(l==="tree"){let u=tr.from(c);for(let f of u)f.type==="blob"&&a.add(f.oid),f.type==="tree"&&await s(f.oid)}}for(let o of i)await s(o);return a}async function SI(e){let t={},r="",n=Ve.streamReader(e),i=await n();for(;i!==!0;)i!==null&&(r+=i.toString("utf8")+` `),i=await n();let a=r.toString("utf8").split(` -`);if(i=a.shift(),!i.startsWith("unpack "))throw new la('unpack ok" or "unpack [error message]',i);t.ok=i==="unpack ok",t.ok||(t.error=i.slice(7)),t.refs={};for(let s of a){if(s.trim()==="")continue;let o=s.slice(0,2),c=s.slice(3),l=c.indexOf(" ");l===-1&&(l=c.length);let u=c.slice(0,l),f=c.slice(l+1);t.refs[u]={ok:o==="ok",error:f}}return t}async function b8({capabilities:e=[],triplets:t=[]}){let r=[],n=`\0 ${e.join(" ")}`;for(let i of t)r.push(Ve.encode(`${i.oldoid} ${i.oid} ${i.fullRef}${n} -`)),n="";return r.push(Ve.flush()),r}async function _8({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,onPrePush:c,gitdir:l,ref:u,remoteRef:f,remote:d,url:h,force:p=!1,delete:m=!1,corsProxy:v,headers:y={}}){let b=u||await fa({fs:e,gitdir:l});if(typeof b=="undefined")throw new Qt("ref");let x=await We.get({fs:e,gitdir:l});d=d||await x.get(`branch.${b}.pushRemote`)||await x.get("remote.pushDefault")||await x.get(`branch.${b}.remote`)||"origin";let E=h||await x.get(`remote.${d}.pushurl`)||await x.get(`remote.${d}.url`);if(typeof E=="undefined")throw new Qt("remote OR url");let _=f||await x.get(`branch.${b}.merge`);if(typeof E=="undefined")throw new Qt("remoteRef");v===void 0&&(v=await x.get("http.corsProxy"));let k=await q.expand({fs:e,gitdir:l,ref:b}),w=m?"0000000000000000000000000000000000000000":await q.resolve({fs:e,gitdir:l,ref:k}),A=xs.getRemoteHelperFor({url:E}),S=await A.discover({http:r,onAuth:a,onAuthSuccess:s,onAuthFailure:o,corsProxy:v,service:"git-receive-pack",url:E,headers:y,protocolVersion:1}),T=S.auth,P;if(!_)P=k;else try{P=await q.expandAgainstMap({ref:_,map:S.refs})}catch(G){if(G instanceof Ne)P=_.startsWith("refs/")?_:`refs/heads/${_}`;else throw G}let O=S.refs.get(P)||"0000000000000000000000000000000000000000";if(c&&!await c({remote:d,url:E,localRef:{ref:m?"(delete)":k,oid:w},remoteRef:{ref:P,oid:O}}))throw new gs;let j=!S.capabilities.has("no-thin"),D=new Set;if(!m){let G=[...S.refs.values()],N=new Set;if(O!=="0000000000000000000000000000000000000000"){let Me=await Cp({fs:e,cache:t,gitdir:l,oids:[w,O]});for(let Dt of Me)G.push(Dt);j&&(N=await up({fs:e,cache:t,gitdir:l,oids:Me}))}if(!G.includes(w)){let Me=await y8({fs:e,cache:t,gitdir:l,start:[w],finish:G});D=await up({fs:e,cache:t,gitdir:l,oids:Me})}if(j){try{let Me=await q.resolve({fs:e,gitdir:l,ref:`refs/remotes/${d}/HEAD`,depth:2}),{oid:Dt}=await q.resolveAgainstMap({ref:Me.replace(`refs/remotes/${d}/`,""),fullref:Me,map:S.refs}),_t=[Dt];for(let Ee of await up({fs:e,cache:t,gitdir:l,oids:_t}))N.add(Ee)}catch(Me){}for(let Me of N)D.delete(Me)}if(w===O&&(p=!0),!p){if(k.startsWith("refs/tags")&&O!=="0000000000000000000000000000000000000000")throw new ms("tag-exists");if(w!=="0000000000000000000000000000000000000000"&&O!=="0000000000000000000000000000000000000000"&&!await E2({fs:e,cache:t,gitdir:l,oid:w,ancestor:O,depth:-1}))throw new ms("not-fast-forward")}}let Q=v2([...S.capabilities],["report-status","side-band-64k",`agent=${yu.agent}`]),de=await b8({capabilities:Q,triplets:[{oldoid:O,oid:w,fullRef:P}]}),ee=m?[]:await T2({fs:e,cache:t,gitdir:l,oids:[...D]}),J=await A.connect({http:r,onProgress:n,corsProxy:v,service:"git-receive-pack",url:E,auth:T,headers:y,body:[...de,...ee]}),{packfile:Pe,progress:me}=await fu.demux(J.body);if(i){let G=y2(me);yl(G,async N=>{await i(N)})}let F=await w8(Pe);if(J.headers&&(F.headers=J.headers),d&&F.ok&&F.refs[P].ok&&!k.startsWith("refs/tags")){let G=`refs/remotes/${d}/${P.replace("refs/heads","")}`;m?await q.deleteRef({fs:e,gitdir:l,ref:G}):await q.writeRef({fs:e,gitdir:l,ref:G,value:w})}if(F.ok&&Object.values(F.refs).every(G=>G.ok))return F;{let G=Object.entries(F.refs).filter(([N,Me])=>!Me.ok).map(([N,Me])=>` - - ${N}: ${Me.error}`).join("");throw new ol(G,F)}}async function x8({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,dir:c,gitdir:l=$(c,".git"),ref:u,remoteRef:f,remote:d="origin",url:h,force:p=!1,delete:m=!1,corsProxy:v,headers:y={},cache:b={}}){try{return C("fs",e),C("http",t),C("gitdir",l),await _8({fs:new X(e),cache:b,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,gitdir:l,ref:u,remoteRef:f,remote:d,url:h,force:p,delete:m,corsProxy:v,headers:y})}catch(x){throw x.caller="git.push",x}}async function C2({fs:e,cache:t,gitdir:r,oid:n}){let{type:i,object:a}=await qe({fs:e,cache:t,gitdir:r,oid:n});if(i==="tag")return n=pr.from(a).parse().object,C2({fs:e,cache:t,gitdir:r,oid:n});if(i!=="blob")throw new Gt(n,i,"blob");return{oid:n,blob:new Uint8Array(a)}}async function P2({fs:e,cache:t,gitdir:r,oid:n,filepath:i=void 0}){return i!==void 0&&(n=await vl({fs:e,cache:t,gitdir:r,oid:n,filepath:i})),await C2({fs:e,cache:t,gitdir:r,oid:n})}async function wl({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,filepath:i,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await P2({fs:new X(e),cache:a,gitdir:r,oid:n,filepath:i})}catch(s){throw s.caller="git.readBlob",s}}async function S8({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await cu({fs:new X(e),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.readCommit",a}}async function E8({fs:e,cache:t,gitdir:r,ref:n="refs/notes/commits",oid:i}){let a=await q.resolve({gitdir:r,fs:e,ref:n}),{blob:s}=await P2({fs:e,cache:t,gitdir:r,oid:a,filepath:i});return s}async function A8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n="refs/notes/commits",oid:i,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("ref",n),C("oid",i),await E8({fs:new X(e),cache:a,gitdir:r,ref:n,oid:i})}catch(s){throw s.caller="git.readNote",s}}async function k8({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,format:i="parsed",filepath:a=void 0,encoding:s=void 0,cache:o={}}){try{C("fs",e),C("gitdir",r),C("oid",n);let c=new X(e);a!==void 0&&(n=await vl({fs:c,cache:o,gitdir:r,oid:n,filepath:a}));let u=await qe({fs:c,cache:o,gitdir:r,oid:n,format:i==="parsed"?"content":i});if(u.oid=n,i==="parsed")switch(u.format="parsed",u.type){case"commit":u.object=tr.from(u.object).parse();break;case"tree":u.object=er.from(u.object).entries();break;case"blob":s?u.object=u.object.toString(s):(u.object=new Uint8Array(u.object),u.format="content");break;case"tag":u.object=pr.from(u.object).parse();break;default:throw new Gt(u.oid,u.type,"blob|commit|tag|tree")}else(u.format==="deflated"||u.format==="wrapped")&&(u.type=u.format);return u}catch(c){throw c.caller="git.readObject",c}}async function T8({fs:e,cache:t,gitdir:r,oid:n}){let{type:i,object:a}=await qe({fs:e,cache:t,gitdir:r,oid:n,format:"content"});if(i!=="tag")throw new Gt(n,i,"tag");let s=pr.from(a);return{oid:n,tag:s.parse(),payload:s.payload()}}async function C8({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await T8({fs:new X(e),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.readTag",a}}async function P8({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,filepath:i=void 0,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await Ss({fs:new X(e),cache:a,gitdir:r,oid:n,filepath:i})}catch(s){throw s.caller="git.readTree",s}}async function R8({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,cache:i={}}){try{C("fs",e),C("gitdir",r),C("filepath",n),await mt.acquire({fs:new X(e),gitdir:r,cache:i},async function(a){a.delete({filepath:n})})}catch(a){throw a.caller="git.remove",a}}async function M8({fs:e,cache:t,onSign:r,gitdir:n,ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:c}){let l;try{l=await q.resolve({gitdir:n,fs:e,ref:i})}catch(p){if(!(p instanceof Ne))throw p}let f=(await Ss({fs:e,gitdir:n,oid:l||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;f=f.filter(p=>p.path!==a);let d=await Ap({fs:e,gitdir:n,tree:f});return await vu({fs:e,cache:t,onSign:r,gitdir:n,ref:i,tree:d,parent:l&&[l],message:`Note removed by 'isomorphic-git removeNote' -`,author:s,committer:o,signingKey:c})}async function O8({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:c,cache:l={}}){try{C("fs",e),C("gitdir",n),C("oid",a);let u=new X(e),f=await ca({fs:u,gitdir:n,author:s});if(!f)throw new zt("author");let d=await bs({fs:u,gitdir:n,author:f,committer:o});if(!d)throw new zt("committer");return await M8({fs:u,cache:l,onSign:t,gitdir:n,ref:i,oid:a,author:f,committer:d,signingKey:c})}catch(u){throw u.caller="git.removeNote",u}}async function I8({fs:e,gitdir:t,oldref:r,ref:n,checkout:i=!1}){if(n!==Jr.default.clean(n))throw new zn(n,Jr.default.clean(n));if(r!==Jr.default.clean(r))throw new zn(r,Jr.default.clean(r));let a=`refs/heads/${r}`,s=`refs/heads/${n}`;if(await q.exists({fs:e,gitdir:t,ref:s}))throw new Qr("branch",n,!1);let c=await q.resolve({fs:e,gitdir:t,ref:a,depth:1});await q.writeRef({fs:e,gitdir:t,ref:s,value:c}),await q.deleteRef({fs:e,gitdir:t,ref:a});let u=await fa({fs:e,gitdir:t,fullname:!0})===a;(i||u)&&await q.writeSymbolicRef({fs:e,gitdir:t,ref:"HEAD",value:s})}async function F8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,oldref:i,checkout:a=!1}){try{return C("fs",e),C("gitdir",r),C("ref",n),C("oldref",i),await I8({fs:new X(e),gitdir:r,ref:n,oldref:i,checkout:a})}catch(s){throw s.caller="git.renameBranch",s}}async function R2({gitdir:e,type:t,object:r}){return Gn(_i.wrap({type:t,object:r}))}async function $8({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,ref:i,cache:a={}}){try{C("fs",e),C("gitdir",r),C("filepath",n);let s=new X(e),o,c;try{o=await q.resolve({fs:s,gitdir:r,ref:i||"HEAD"})}catch(f){if(i)throw f}if(o)try{o=await vl({fs:s,cache:a,gitdir:r,oid:o,filepath:n})}catch(f){o=null}let l={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:0,uid:0,gid:0,size:0},u=t&&await s.read($(t,n));u&&(c=await R2({gitdir:r,type:"blob",object:u}),o===c&&(l=await s.lstat($(t,n)))),await mt.acquire({fs:s,gitdir:r,cache:a},async function(f){f.delete({filepath:n}),o&&f.insert({filepath:n,stats:l,oid:o})})}catch(s){throw s.caller="git.reset",s}}async function L8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,depth:i}){try{return C("fs",e),C("gitdir",r),C("ref",n),await q.resolve({fs:new X(e),gitdir:r,ref:n,depth:i})}catch(a){throw a.caller="git.resolveRef",a}}async function D8({fs:e,dir:t,gitdir:r=$(t,".git"),path:n,value:i,append:a=!1}){try{C("fs",e),C("gitdir",r),C("path",n);let s=new X(e),o=await We.get({fs:s,gitdir:r});a?await o.append(n,i):await o.set(n,i),await We.save({fs:s,gitdir:r,config:o})}catch(s){throw s.caller="git.setConfig",s}}async function N8({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,cache:i={}}){try{C("fs",e),C("gitdir",r),C("filepath",n);let a=new X(e);if(await ws.isIgnored({fs:a,gitdir:r,dir:t,filepath:n}))return"ignored";let o=await j8({fs:a,cache:i,gitdir:r}),c=await M2({fs:a,cache:i,gitdir:r,tree:o,path:n}),l=await mt.acquire({fs:a,gitdir:r,cache:i},async function(m){for(let v of m)if(v.path===n)return v;return null}),u=await a.lstat($(t,n)),f=c!==null,d=l!==null,h=u!==null,p=async()=>{if(d&&!ru(l,u))return l.oid;{let m=await a.read($(t,n)),v=await R2({gitdir:r,type:"blob",object:m});return d&&l.oid===v&&u.size!==-1&&mt.acquire({fs:a,gitdir:r,cache:i},async function(y){y.insert({filepath:n,stats:u,oid:v})}),v}};if(!f&&!h&&!d)return"absent";if(!f&&!h&&d)return"*absent";if(!f&&h&&!d)return"*added";if(!f&&h&&d)return await p()===l.oid?"added":"*added";if(f&&!h&&!d)return"deleted";if(f&&!h&&d)return c===l.oid,"*deleted";if(f&&h&&!d)return await p()===c?"*undeleted":"*undeletemodified";if(f&&h&&d){let m=await p();return m===c?m===l.oid?"unmodified":"*unmodified":m===l.oid?"modified":"*modified"}}catch(a){throw a.caller="git.status",a}}async function M2({fs:e,cache:t,gitdir:r,tree:n,path:i}){typeof i=="string"&&(i=i.split("/"));let a=i.shift();for(let s of n)if(s.path===a){if(i.length===0)return s.oid;let{type:o,object:c}=await qe({fs:e,cache:t,gitdir:r,oid:s.oid});if(o==="tree"){let l=er.from(c);return M2({fs:e,cache:t,gitdir:r,tree:l,path:i})}if(o==="blob")throw new Gt(s.oid,o,"blob",i.join("/"))}return null}async function j8({fs:e,cache:t,gitdir:r}){let n;try{n=await q.resolve({fs:e,gitdir:r,ref:"HEAD"})}catch(a){if(a instanceof Ne)return[]}let{tree:i}=await Ss({fs:e,cache:t,gitdir:r,oid:n});return i}async function B8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n="HEAD",filepaths:i=["."],filter:a,cache:s={},ignored:o=!1}){try{C("fs",e),C("gitdir",r),C("ref",n);let c=new X(e);return await ys({fs:c,cache:s,dir:t,gitdir:r,trees:[wi({ref:n}),gu(),mu()],map:async function(l,[u,f,d]){if(!u&&!d&&f&&!o&&await ws.isIgnored({fs:c,dir:t,filepath:l})||!i.some(k=>m2(l,k)))return null;if(a&&!a(l))return;let[h,p,m]=await Promise.all([u&&u.type(),f&&f.type(),d&&d.type()]),v=[h,p,m].includes("blob");if((h==="tree"||h==="special")&&!v)return;if(h==="commit")return null;if((p==="tree"||p==="special")&&!v)return;if(m==="commit")return null;if((m==="tree"||m==="special")&&!v)return;let y=h==="blob"?await u.oid():void 0,b=m==="blob"?await d.oid():void 0,x;h!=="blob"&&p==="blob"&&m!=="blob"?x="42":p==="blob"&&(x=await f.oid());let E=[void 0,y,x,b],_=E.map(k=>E.indexOf(k));return _.shift(),[l,..._]}})}catch(c){throw c.caller="git.statusMatrix",c}}async function H8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,object:i,force:a=!1}){try{C("fs",e),C("gitdir",r),C("ref",n);let s=new X(e);if(n===void 0)throw new Qt("ref");n=n.startsWith("refs/tags/")?n:`refs/tags/${n}`;let o=await q.resolve({fs:s,gitdir:r,ref:i||"HEAD"});if(!a&&await q.exists({fs:s,gitdir:r,ref:n}))throw new Qr("tag",n);await q.writeRef({fs:s,gitdir:r,ref:n,value:o})}catch(s){throw s.caller="git.tag",s}}async function U8({fs:e,dir:t,gitdir:r=$(t,".git"),cache:n={},filepath:i,oid:a,mode:s,add:o,remove:c,force:l}){try{C("fs",e),C("gitdir",r),C("filepath",i);let u=new X(e);if(c)return await mt.acquire({fs:u,gitdir:r,cache:n},async function(d){let h;if(!l&&(h=await u.lstat($(t,i)),h)){if(h.isDirectory())throw new xi("directory");return}d.has({filepath:i})&&d.delete({filepath:i})});let f;if(!a){if(f=await u.lstat($(t,i)),!f)throw new Ne(`file at "${i}" on disk and "remove" not set`);if(f.isDirectory())throw new xi("directory")}return await mt.acquire({fs:u,gitdir:r,cache:n},async function(d){if(!o&&!d.has({filepath:i}))throw new Ne(`file at "${i}" in index and "add" not set`);let h={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:s,uid:0,gid:0,size:0};if(!a){h=f;let p=h.isSymbolicLink()?await u.readlink($(t,i)):await u.read($(t,i));a=await mr({fs:u,gitdir:r,type:"blob",format:"content",object:p})}return d.insert({filepath:i,oid:a,stats:h}),a})}catch(u){throw u.caller="git.updateIndex",u}}function G8(){try{return yu.version}catch(e){throw e.caller="git.version",e}}async function z8({fs:e,dir:t,gitdir:r=$(t,".git"),trees:n,map:i,reduce:a,iterate:s,cache:o={}}){try{return C("fs",e),C("gitdir",r),C("trees",n),await ys({fs:new X(e),cache:o,dir:t,gitdir:r,trees:n,map:i,reduce:a,iterate:s})}catch(c){throw c.caller="git.walk",c}}async function V8({fs:e,dir:t,gitdir:r=$(t,".git"),blob:n}){try{return C("fs",e),C("gitdir",r),C("blob",n),await mr({fs:new X(e),gitdir:r,type:"blob",object:n,format:"content"})}catch(i){throw i.caller="git.writeBlob",i}}async function W8({fs:e,gitdir:t,commit:r}){let n=tr.from(r).toObject();return await mr({fs:e,gitdir:t,type:"commit",object:n,format:"content"})}async function q8({fs:e,dir:t,gitdir:r=$(t,".git"),commit:n}){try{return C("fs",e),C("gitdir",r),C("commit",n),await W8({fs:new X(e),gitdir:r,commit:n})}catch(i){throw i.caller="git.writeCommit",i}}async function Y8({fs:e,dir:t,gitdir:r=$(t,".git"),type:n,object:i,format:a="parsed",oid:s,encoding:o=void 0}){try{let c=new X(e);if(a==="parsed"){switch(n){case"commit":i=tr.from(i).toObject();break;case"tree":i=er.from(i).toObject();break;case"blob":i=Buffer.from(i,o);break;case"tag":i=pr.from(i).toObject();break;default:throw new Gt(s||"",n,"blob|commit|tag|tree")}a="content"}return s=await mr({fs:c,gitdir:r,type:n,object:i,oid:s,format:a}),s}catch(c){throw c.caller="git.writeObject",c}}async function X8({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,value:i,force:a=!1,symbolic:s=!1}){try{C("fs",e),C("gitdir",r),C("ref",n),C("value",i);let o=new X(e);if(n!==Jr.default.clean(n))throw new zn(n,Jr.default.clean(n));if(!a&&await q.exists({fs:o,gitdir:r,ref:n}))throw new Qr("ref",n);s?await q.writeSymbolicRef({fs:o,gitdir:r,ref:n,value:i}):(i=await q.resolve({fs:o,gitdir:r,ref:i}),await q.writeRef({fs:o,gitdir:r,ref:n,value:i}))}catch(o){throw o.caller="git.writeRef",o}}async function Z8({fs:e,gitdir:t,tag:r}){let n=pr.from(r).toObject();return await mr({fs:e,gitdir:t,type:"tag",object:n,format:"content"})}async function K8({fs:e,dir:t,gitdir:r=$(t,".git"),tag:n}){try{return C("fs",e),C("gitdir",r),C("tag",n),await Z8({fs:new X(e),gitdir:r,tag:n})}catch(i){throw i.caller="git.writeTag",i}}async function J8({fs:e,dir:t,gitdir:r=$(t,".git"),tree:n}){try{return C("fs",e),C("gitdir",r),C("tree",n),await Ap({fs:new X(e),gitdir:r,tree:n})}catch(i){throw i.caller="git.writeTree",i}}var Q8={Errors:gl,STAGE:mu,TREE:wi,WORKDIR:gu,add:JM,abortMerge:qM,addNote:eO,addRemote:tO,annotatedTag:nO,branch:aO,checkout:oO,clone:yO,commit:wO,getConfig:BO,getConfigAll:UO,setConfig:D8,currentBranch:bO,deleteBranch:xO,deleteRef:SO,deleteRemote:AO,deleteTag:TO,expandOid:MO,expandRef:OO,fastForward:LO,fetch:DO,findMergeBase:NO,findRoot:jO,getRemoteInfo:GO,getRemoteInfo2:zO,hashBlob:WO,indexPack:YO,init:XO,isDescendent:ZO,isIgnored:KO,listBranches:JO,listFiles:e8,listNotes:r8,listRemotes:i8,listServerRefs:o8,listTags:l8,log:d8,merge:h8,packObjects:g8,pull:v8,push:x8,readBlob:wl,readCommit:S8,readNote:A8,readObject:k8,readTag:C8,readTree:P8,remove:R8,removeNote:O8,renameBranch:F8,resetIndex:$8,updateIndex:U8,resolveRef:L8,status:N8,statusMatrix:B8,tag:H8,version:G8,walk:z8,writeBlob:V8,writeCommit:q8,writeObject:Y8,writeRef:X8,writeTag:K8,writeTree:J8},ie=Q8;var OP=ze(require("path")),Ce=require("obsidian");g();var Sa=require("obsidian");g();var qg=require("child_process"),yT=ze(_u()),Zn=ze(require("fs/promises")),Xn=require("obsidian"),Be=ze(require("path")),Vl=require("path");g();var $u=ze(D2(),1),Mu=ze(_u(),1),c_=require("child_process"),W_=ze(Rp(),1),Cs=ze(Rp(),1),yx=require("node:events"),Iu=Object.defineProperty,yI=Object.defineProperties,wI=Object.getOwnPropertyDescriptor,bI=Object.getOwnPropertyDescriptors,Zp=Object.getOwnPropertyNames,N2=Object.getOwnPropertySymbols,vb=Object.prototype.hasOwnProperty,_I=Object.prototype.propertyIsEnumerable,j2=(e,t,r)=>t in e?Iu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fr=(e,t)=>{for(var r in t||(t={}))vb.call(t,r)&&j2(e,r,t[r]);if(N2)for(var r of N2(t))_I.call(t,r)&&j2(e,r,t[r]);return e},xl=(e,t)=>yI(e,bI(t)),W=(e,t)=>function(){return e&&(t=(0,e[Zp(e)[0]])(e=0)),t},xI=(e,t)=>function(){return t||(0,e[Zp(e)[0]])((t={exports:{}}).exports,t),t.exports},rt=(e,t)=>{for(var r in t)Iu(e,r,{get:t[r],enumerable:!0})},SI=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Zp(t))!vb.call(e,i)&&i!==r&&Iu(e,i,{get:()=>t[i],enumerable:!(n=wI(t,i))||n.enumerable});return e},Ke=e=>SI(Iu({},"__esModule",{value:!0}),e),_l=(e,t,r)=>new Promise((n,i)=>{var a=c=>{try{o(r.next(c))}catch(l){i(l)}},s=c=>{try{o(r.throw(c))}catch(l){i(l)}},o=c=>c.done?n(c.value):Promise.resolve(c.value).then(a,s);o((r=r.apply(e,t)).next())});function EI(...e){let t=new String(e);return Fu.set(t,e),t}function Pu(e){return e instanceof String&&Fu.has(e)}function B2(e){return Fu.get(e)||[]}var Fu,kl=W({"src/lib/args/pathspec.ts"(){"use strict";Fu=new WeakMap}}),wr,Ei=W({"src/lib/errors/git-error.ts"(){"use strict";wr=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),Tl,Rs=W({"src/lib/errors/git-response-error.ts"(){"use strict";Ei(),Tl=class extends wr{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),yb,wb=W({"src/lib/errors/task-configuration-error.ts"(){"use strict";Ei(),yb=class extends wr{constructor(e){super(void 0,e)}}}});function bb(e){return typeof e=="function"?e:ga}function _b(e){return typeof e=="function"&&e!==ga}function xb(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function Sb(e,t=0){return Eb(e)&&e.length>t?e[t]:void 0}function ma(e,t=0){if(Eb(e)&&e.length>t)return e[e.length-1-t]}function Eb(e){return!!(e&&typeof e.length=="number")}function Cl(e="",t=!0,r=` -`){return e.split(r).reduce((n,i)=>{let a=t?i.trim():i;return a&&n.push(a),n},[])}function Kp(e,t){return Cl(e,!0).map(r=>t(r))}function Jp(e){return(0,$u.exists)(e,$u.FOLDER)}function ke(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function Ab(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function Lu(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function xn(e){return Array.isArray(e)?e:[e]}function kb(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function Tb(e){return xn(e).map(String)}function Ie(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function Sl(e,t){let r=[];for(let n=0,i=e.length;nr in e?{[r]:e[r]}:{}))}function Dp(e=0){return new Promise(t=>setTimeout(t,e))}function Np(e){if(e!==!1)return e}var Ps,ga,Pl,Du=W({"src/lib/utils/util.ts"(){"use strict";Ps="\0",ga=()=>{},Pl=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Sn(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function Qp(e,t){let r=Pu(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function em(e){return!!e&&Pl(e)==="[object Object]"}function Pb(e){return typeof e=="function"}var Rl,Pt,Rb,Ru,tm,Mb=W({"src/lib/utils/argument-filters.ts"(){"use strict";Du(),kl(),Rl=e=>Array.isArray(e),Pt=e=>typeof e=="string",Rb=e=>Array.isArray(e)&&e.every(Pt),Ru=e=>Pt(e)||Array.isArray(e)&&e.every(Pt),tm=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),jp,AI=W({"src/lib/utils/exit-codes.ts"(){"use strict";jp=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(jp||{})}}),Al,kI=W({"src/lib/utils/git-output-streams.ts"(){"use strict";Al=class{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new Al(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),ce,Si,TI=W({"src/lib/utils/line-parser.ts"(){"use strict";ce=class{constructor(e,t){this.matches=[],this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((i,a)=>this.addMatch(i,a,r(a)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}},Si=class extends ce{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function Ob(...e){let t=process.cwd(),r=Object.assign(Fr({baseDir:t},Ib),...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var Ib,CI=W({"src/lib/utils/simple-git-options.ts"(){"use strict";Ib={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function rm(e,t=[]){return em(e)?Object.keys(e).reduce((r,n)=>{let i=e[n];return Pu(i)?r.push(i):Qp(i,["boolean"])?r.push(n+"="+i):r.push(n),r},t):t}function rr(e,t=0,r=!1){let n=[];for(let i=0,a=t<0?e.length:t;i{for(let a=Cl(i,n),s=0,o=a.length;s{if(!(s+l>=o))return a[s+l]};t.some(({parse:l})=>l(c,e))}}),e}var MI=W({"src/lib/utils/task-parser.ts"(){"use strict";Du()}}),Fb={};rt(Fb,{ExitCodes:()=>jp,GitOutputStreams:()=>Al,LineParser:()=>ce,NOOP:()=>ga,NULL:()=>Ps,RemoteLineParser:()=>Si,append:()=>ke,appendTaskOptions:()=>rm,asArray:()=>xn,asCamelCase:()=>kb,asFunction:()=>bb,asNumber:()=>Ie,asStringArray:()=>Tb,bufferToString:()=>El,callTaskParser:()=>Bp,createInstanceConfig:()=>Ob,delay:()=>Dp,filterArray:()=>Rl,filterFunction:()=>Pb,filterHasLength:()=>tm,filterPlainObject:()=>em,filterPrimitives:()=>Qp,filterString:()=>Pt,filterStringArray:()=>Rb,filterStringOrStringArray:()=>Ru,filterType:()=>Sn,first:()=>Sb,folderExists:()=>Jp,forEachLineWithContent:()=>Kp,getTrailingOptions:()=>rr,including:()=>Ab,isUserFunction:()=>_b,last:()=>ma,objectToString:()=>Pl,orVoid:()=>Np,parseStringResponse:()=>ir,pick:()=>Cb,prefixedArray:()=>Sl,remove:()=>Lu,splitOn:()=>xb,toLinesWithContent:()=>Cl,trailingFunctionArgument:()=>Je,trailingOptionsArgument:()=>nm});var oe=W({"src/lib/utils/index.ts"(){"use strict";Mb(),AI(),kI(),TI(),CI(),RI(),MI(),Du()}}),$b={};rt($b,{CheckRepoActions:()=>Hp,checkIsBareRepoTask:()=>Db,checkIsRepoRootTask:()=>Lb,checkIsRepoTask:()=>OI});function OI(e){switch(e){case"bare":return Db();case"root":return Lb()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:Nu,parser:im}}function Lb(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:Nu,parser(t){return/^\.(git)?$/.test(t.trim())}}}function Db(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:Nu,parser:im}}function II(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var Hp,Nu,im,Nb=W({"src/lib/tasks/check-is-repo.ts"(){"use strict";oe(),Hp=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(Hp||{}),Nu=({exitCode:e},t,r,n)=>{if(e===128&&II(t))return r(Buffer.from("false"));n(t)},im=e=>e.trim()==="true"}});function FI(e,t){let r=new jb(e),n=e?Hb:Bb;return Cl(t).forEach(i=>{let a=i.replace(n,"");r.paths.push(a),(Ub.test(a)?r.folders:r.files).push(a)}),r}var jb,Bb,Hb,Ub,$I=W({"src/lib/responses/CleanSummary.ts"(){"use strict";oe(),jb=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},Bb=/^[a-z]+\s*/i,Hb=/^[a-z]+\s+[a-z]+\s*/i,Ub=/\/$/}}),Up={};rt(Up,{EMPTY_COMMANDS:()=>ju,adhocExecTask:()=>Gb,configurationErrorTask:()=>nr,isBufferTask:()=>Vb,isEmptyTask:()=>Wb,straightThroughBufferTask:()=>zb,straightThroughStringTask:()=>Vt});function Gb(e){return{commands:ju,format:"empty",parser:e}}function nr(e){return{commands:ju,format:"empty",parser(){throw typeof e=="string"?new yb(e):e}}}function Vt(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function zb(e){return{commands:e,format:"buffer",parser(t){return t}}}function Vb(e){return e.format==="buffer"}function Wb(e){return e.format==="empty"||!e.commands.length}var ju,tt=W({"src/lib/tasks/task.ts"(){"use strict";wb(),ju=[]}}),qb={};rt(qb,{CONFIG_ERROR_INTERACTIVE_MODE:()=>am,CONFIG_ERROR_MODE_REQUIRED:()=>sm,CONFIG_ERROR_UNKNOWN_OPTION:()=>om,CleanOptions:()=>Au,cleanTask:()=>Yb,cleanWithOptionsTask:()=>LI,isCleanOptionsArray:()=>DI});function LI(e,t){let{cleanMode:r,options:n,valid:i}=NI(e);return r?i.options?(n.push(...t),n.some(HI)?nr(am):Yb(r,n)):nr(om+JSON.stringify(e)):nr(sm)}function Yb(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return FI(e==="n",n)}}}function DI(e){return Array.isArray(e)&&e.every(t=>lm.has(t))}function NI(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(i=>{jI(i)?(t=i,n.cleanMode=!0):n.options=n.options&&BI(r[r.length]=`-${i}`)}),{cleanMode:t,options:r,valid:n}}function jI(e){return e==="f"||e==="n"}function BI(e){return/^-[a-z]$/i.test(e)&&lm.has(e.charAt(1))}function HI(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var am,sm,om,Au,lm,Xb=W({"src/lib/tasks/clean.ts"(){"use strict";$I(),oe(),tt(),am="Git clean interactive mode is not supported",sm='Git clean mode parameter ("n" or "f") is required',om="Git clean unknown option found in: ",Au=(e=>(e.DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d",e))(Au||{}),lm=new Set(["i",...Tb(Object.values(Au))])}});function UI(e){let t=new Kb;for(let r of Zb(e))t.addValue(r.file,String(r.key),r.value);return t}function GI(e,t){let r=null,n=[],i=new Map;for(let a of Zb(e,t))a.key===t&&(n.push(r=a.value),i.has(a.file)||i.set(a.file,[]),i.get(a.file).push(r));return{key:t,paths:Array.from(i.keys()),scopes:i,value:r,values:n}}function zI(e){return e.replace(/^(file):/,"")}function*Zb(e,t=null){let r=e.split("\0");for(let n=0,i=r.length-1;nObject.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=ma(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let n=this.addFile(e);n.hasOwnProperty(t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});function Mp(e,t){return typeof e=="string"&&Gp.hasOwnProperty(e)?e:t}function WI(e,t,r,n){let i=["config",`--${n}`];return r&&i.push("--add"),i.push(e,t),{commands:i,format:"utf-8",parser(a){return a}}}function qI(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(n){return GI(n,e)}}}function YI(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return UI(r)}}}function XI(){return{addConfig(e,t,...r){return this._runTask(WI(e,t,r[0]===!0,Mp(r[1],"local")),Je(arguments))},getConfig(e,t){return this._runTask(qI(e,Mp(t,void 0)),Je(arguments))},listConfig(...e){return this._runTask(YI(Mp(e[0],void 0)),Je(arguments))}}}var Gp,Jb=W({"src/lib/tasks/config.ts"(){"use strict";VI(),oe(),Gp=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(Gp||{})}});function ZI(e){return Qb.has(e)}var Op,Qb,e_=W({"src/lib/tasks/diff-name-status.ts"(){"use strict";Op=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(Op||{}),Qb=new Set(Object.values(Op))}});function KI(...e){return new r_().param(...e)}function JI(e){let t=new Set,r={};return Kp(e,n=>{let[i,a,s]=n.split(Ps);t.add(i),(r[i]=r[i]||[]).push({line:Ie(a),path:i,preview:s})}),{paths:t,results:r}}function QI(){return{grep(e){let t=Je(arguments),r=rr(arguments);for(let i of t_)if(r.includes(i))return this._runTask(nr(`git.grep: use of "${i}" is not supported.`),t);typeof e=="string"&&(e=KI().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(i){return JI(i)}},t)}}}var t_,bl,H2,r_,n_=W({"src/lib/tasks/grep.ts"(){"use strict";oe(),tt(),t_=["-h"],bl=Symbol("grepQuery"),r_=class{constructor(){this[H2]=[]}*[(H2=bl,Symbol.iterator)](){for(let e of this[bl])yield e}and(...e){return e.length&&this[bl].push("--and","(",...Sl(e,"-e"),")"),this}param(...e){return this[bl].push(...Sl(e,"-e")),this}}}}),i_={};rt(i_,{ResetMode:()=>ku,getResetMode:()=>tF,resetTask:()=>eF});function eF(e,t){let r=["reset"];return a_(e)&&r.push(`--${e}`),r.push(...t),Vt(r)}function tF(e){if(a_(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function a_(e){return s_.includes(e)}var ku,s_,o_=W({"src/lib/tasks/reset.ts"(){"use strict";tt(),ku=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(ku||{}),s_=Array.from(Object.values(ku))}});function rF(){return(0,Mu.default)("simple-git")}function U2(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(n,...i)=>{e(n,...i),r(n,...i)}:e:(n,...i)=>{e(`%s ${n}`,t,...i),r&&r(n,...i)}}function nF(e,t,{namespace:r}){if(typeof e=="string")return e;let n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function cm(e,t,r,n=rF()){let i=e&&`[${e}]`||"",a=[],s=typeof t=="string"?n.extend(t):t,o=nF(Sn(t,Pt),s,n);return l(r);function c(u,f){return ke(a,cm(e,o.replace(/^[^:]+/,u),f,n))}function l(u){let f=u&&`[${u}]`||"",d=s&&U2(s,f)||ga,h=U2(n,`${i} ${f}`,d);return Object.assign(s?d:h,{label:e,sibling:c,info:h,step:l})}}var l_=W({"src/lib/git-logger.ts"(){"use strict";oe(),Mu.default.formatters.L=e=>String(tm(e)?e.length:"-"),Mu.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):Pl(e)}}),Su,zp,iF=W({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";Ei(),l_(),Su=class{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let t=Su.getName(e.commands[0]),r=cm(this.logLabel,t);return{task:e,logger:r,name:t}}push(e){let t=this.createProgress(e);return t.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,t),t}fatal(e){for(let[t,{logger:r}]of Array.from(this._queue.entries()))t===e.task?(r.info("Failed %o",e),r("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):r.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(t);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new wr(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task"),t}static getName(e="empty"){return`task:${e}:${++Su.counter}`}},zp=Su,zp.counter=0}});function pa(e,t){return{method:Sb(e.commands)||"",commands:t}}function aF(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function G2(e,t,r,n){return i=>{r("%s received %L bytes",t,i),n("%B",i),e.push(i)}}var Vp,sF=W({"src/lib/runners/git-executor-chain.ts"(){"use strict";Ei(),tt(),oe(),iF(),Vp=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new zp}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}attemptTask(e){return _l(this,null,function*(){let t=yield this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return yield Wb(e)?this.attemptEmptyTask(e,n):this.attemptRemoteTask(e,n)}catch(n){throw this.onFatalException(e,n)}finally{r(),t()}})}onFatalException(e,t){let r=t instanceof wr?Object.assign(t,{task:e}):new wr(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}attemptRemoteTask(e,t){return _l(this,null,function*(){let r=this._plugins.exec("spawn.binary","",pa(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],pa(e,e.commands)),i=yield this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),a=yield this.handleTaskData(e,n,i,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),Vb(e)?Bp(e.parser,a):Bp(e.parser,a.asStrings())})}attemptEmptyTask(e,t){return _l(this,null,function*(){return t("empty task bypassing child process to call to task's parser"),e.parser(this)})}handleTaskData(e,t,r,n){let{exitCode:i,rejection:a,stdOut:s,stdErr:o}=r;return new Promise((c,l)=>{n("Preparing to handle process response exitCode=%d stdOut=",i);let{error:u}=this._plugins.exec("task.error",{error:a},Fr(Fr({},pa(e,t)),r));if(u&&e.onError)return n.info("exitCode=%s handling with custom error handler"),e.onError(r,u,f=>{n.info("custom error handler treated as success"),n("custom error returned a %s",Pl(f)),c(new Al(Array.isArray(f)?Buffer.concat(f):f,Buffer.concat(o)))},l);if(u)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",i,o.length,a),l(u);n.info("retrieving task output complete"),c(new Al(Buffer.concat(s),Buffer.concat(o)))})}gitResponse(e,t,r,n,i){return _l(this,null,function*(){let a=i.sibling("output"),s=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},pa(e,e.commands));return new Promise(o=>{let c=[],l=[];i.info("%s %o",t,r),i("%O",s);let u=this._beforeSpawn(e,r);if(u)return o({stdOut:c,stdErr:l,exitCode:9901,rejection:u});this._plugins.exec("spawn.before",void 0,xl(Fr({},pa(e,r)),{kill(d){u=d||u}}));let f=(0,c_.spawn)(t,r,s);f.stdout.on("data",G2(c,"stdOut",i,a.step("stdOut"))),f.stderr.on("data",G2(l,"stdErr",i,a.step("stdErr"))),f.on("error",aF(l,i)),n&&(i("Passing child process stdOut/stdErr to custom outputHandler"),n(t,f.stdout,f.stderr,[...r])),this._plugins.exec("spawn.after",void 0,xl(Fr({},pa(e,r)),{spawned:f,close(d,h){o({stdOut:c,stdErr:l,exitCode:d,rejection:u||h})},kill(d){f.killed||(u=d,f.kill("SIGINT"))}}))})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,xl(Fr({},pa(e,t)),{kill(n){r=n||r}})),r}}}}),u_={};rt(u_,{GitExecutor:()=>f_});var f_,oF=W({"src/lib/runners/git-executor.ts"(){"use strict";sF(),f_=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new Vp(this,this._scheduler,this._plugins)}chain(){return new Vp(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function lF(e,t,r=ga){let n=a=>{r(null,a)},i=a=>{(a==null?void 0:a.task)===e&&r(a instanceof Tl?cF(a):a,void 0)};t.then(n,i)}function cF(e){let t=n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),t=ga};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(r,{}));function r(n,i){return i in e||(n[i]={enumerable:!1,configurable:!1,get(){return t(i),e.git[i]}}),n}}var uF=W({"src/lib/task-callback.ts"(){"use strict";Rs(),oe()}});function z2(e,t){return Gb(r=>{if(!Jp(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var fF=W({"src/lib/tasks/change-working-directory.ts"(){"use strict";oe(),tt()}});function Ip(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=Lu(t,"-B")),Vt(t)}function dF(){return{checkout(){return this._runTask(Ip(rr(arguments,1)),Je(arguments))},checkoutBranch(e,t){return this._runTask(Ip(["-b",e,t,...rr(arguments)]),Je(arguments))},checkoutLocalBranch(e){return this._runTask(Ip(["-b",e,...rr(arguments)]),Je(arguments))}}}var hF=W({"src/lib/tasks/checkout.ts"(){"use strict";oe(),tt()}});function pF(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function mF(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return ir(pF(),[d_],e)}})}}}var d_,gF=W({"src/lib/tasks/count-objects.ts"(){"use strict";oe(),d_=new ce(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=kb(t);e.hasOwnProperty(n)&&(e[n]=Ie(r))})}});function vF(e){return ir({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},h_,e)}var h_,yF=W({"src/lib/parsers/parse-commit.ts"(){"use strict";oe(),h_=[new ce(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new ce(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),n=r.pop();!n||!n.includes("@")||(e.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new ce(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(n,10)||0}),new ce(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0;let i=parseInt(r,10)||0;n==="-"?e.summary.deletions=i:n==="+"&&(e.summary.insertions=i)})]}});function wF(e,t,r){return{commands:["-c","core.abbrev=40","commit",...Sl(e,"-m"),...t,...r],format:"utf-8",parser:vF}}function bF(){return{commit(t,...r){let n=Je(arguments),i=e(t)||wF(xn(t),xn(Sn(r[0],Ru,[])),[...Sn(r[1],Rl,[]),...rr(arguments,0,!0)]);return this._runTask(i,n)}};function e(t){return!Ru(t)&&nr("git.commit: requires the commit message to be supplied as a string/string[]")}}var _F=W({"src/lib/tasks/commit.ts"(){"use strict";yF(),oe(),tt()}});function xF(){return{firstCommit(){return this._runTask(Vt(["rev-list","--max-parents=0","HEAD"],!0),Je(arguments))}}}var SF=W({"src/lib/tasks/first-commit.ts"(){"use strict";oe(),tt()}});function EF(e,t){let r=["hash-object",e];return t&&r.push("-w"),Vt(r,!0)}var AF=W({"src/lib/tasks/hash-object.ts"(){"use strict";tt()}});function kF(e,t,r){let n=String(r).trim(),i;if(i=p_.exec(n))return new Tu(e,t,!1,i[1]);if(i=m_.exec(n))return new Tu(e,t,!0,i[1]);let a="",s=n.split(" ");for(;s.length;)if(s.shift()==="in"){a=s.join(" ");break}return new Tu(e,t,/^re/i.test(n),a)}var Tu,p_,m_,TF=W({"src/lib/responses/InitSummary.ts"(){"use strict";Tu=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},p_=/^Init.+ repository in (.+)$/,m_=/^Rein.+ in (.+)$/}});function CF(e){return e.includes(um)}function PF(e=!1,t,r){let n=["init",...r];return e&&!CF(n)&&n.splice(1,0,um),{commands:n,format:"utf-8",parser(i){return kF(n.includes("--bare"),t,i)}}}var um,RF=W({"src/lib/tasks/init.ts"(){"use strict";TF(),um="--bare"}});function fm(e){for(let t=0;tir(new g_,t,r,!1)}var Fp,V2,W2,q2,y_,w_=W({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";Ml(),OF(),e_(),oe(),Fp=[new ce(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,n=""])=>{e.files.push({file:t.trim(),changes:Ie(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new ce(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,n])=>{e.files.push({file:t.trim(),before:Ie(r),after:Ie(n),binary:!0})}),new ce(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let n=/(\d+) i/.exec(r),i=/(\d+) d/.exec(r);e.changed=Ie(t),e.insertions=Ie(n==null?void 0:n[1]),e.deletions=Ie(i==null?void 0:i[1])})],V2=[new ce(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,n])=>{let i=Ie(t),a=Ie(r);e.changed++,e.insertions+=i,e.deletions+=a,e.files.push({file:n,changes:i+a,insertions:i,deletions:a,binary:!1})}),new ce(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],W2=[new ce(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],q2=[new ce(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,n,i,a])=>{e.changed++,e.files.push({file:a!=null?a:n,changes:0,insertions:0,deletions:0,binary:!1,status:Np(ZI(t)&&t),from:Np(!!a&&n!==a&&n),similarity:Ie(r)})})],y_={"":Fp,"--stat":Fp,"--numstat":V2,"--name-status":q2,"--name-only":W2}}});function IF(e,t){return t.reduce((r,n,i)=>(r[n]=e[i]||"",r),Object.create({diff:null}))}function b_(e=mm,t=__,r=""){let n=v_(r);return function(i){let a=Cl(i.trim(),!1,hm).map(function(s){let o=s.split(pm),c=IF(o[0].split(e),t);return o.length>1&&o[1].trim()&&(c.diff=n(o[1])),c});return{all:a,latest:a.length&&a[0]||null,total:a.length}}}var hm,pm,mm,__,x_=W({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";oe(),w_(),Ml(),hm="\xF2\xF2\xF2\xF2\xF2\xF2 ",pm=" \xF2\xF2",mm=" \xF2 ",__=["hash","date","message","refs","author_name","author_email"]}}),S_={};rt(S_,{diffSummaryTask:()=>FF,validateLogFormatConfig:()=>Bu});function FF(e){let t=fm(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Bu(r)||{commands:r,format:"utf-8",parser:v_(t)}}function Bu(e){let t=e.filter(MF);if(t.length>1)return nr(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return nr(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var gm=W({"src/lib/tasks/diff.ts"(){"use strict";Ml(),w_(),tt()}});function $F(e,t){let r=[],n=[];return Object.keys(e).forEach(i=>{r.push(i),n.push(String(e[i]))}),[r,n.join(t)]}function LF(e){return Object.keys(e).reduce((t,r)=>(r in Wp||(t[r]=e[r]),t),{})}function E_(e={},t=[]){let r=Sn(e.splitter,Pt,mm),n=!Qp(e.format)&&e.format?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[i,a]=$F(n,r),s=[],o=[`--pretty=format:${hm}${a}${pm}`,...t],c=e.n||e["max-count"]||e.maxCount;if(c&&o.push(`--max-count=${c}`),e.from||e.to){let l=e.symmetric!==!1?"...":"..";s.push(`${e.from||""}${l}${e.to||""}`)}return Pt(e.file)&&o.push("--follow",EI(e.file)),rm(LF(e),o),{fields:i,splitter:r,commands:[...o,...s]}}function DF(e,t,r){let n=b_(e,t,fm(r));return{commands:["log",...r],format:"utf-8",parser:n}}function NF(){return{log(...r){let n=Je(arguments),i=E_(nm(arguments),Sn(arguments[0],Rl)),a=t(...r)||Bu(i.commands)||e(i);return this._runTask(a,n)}};function e(r){return DF(r.splitter,r.fields,r.commands)}function t(r,n){return Pt(r)&&Pt(n)&&nr("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var Wp,A_=W({"src/lib/tasks/log.ts"(){"use strict";Ml(),kl(),x_(),oe(),tt(),gm(),Wp=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(Wp||{})}}),Cu,k_,jF=W({"src/lib/responses/MergeSummary.ts"(){"use strict";Cu=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},k_=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),qp,T_,BF=W({"src/lib/responses/PullSummary.ts"(){"use strict";qp=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},T_=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function $p(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function Y2(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:Ie(t&&t[1]||"0"),delta:Ie(r&&r[1]||"0")}}var C_,HF=W({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";oe(),C_=[new Si(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),i=$p(e.remoteMessages);Object.assign(i,{[n]:Ie(r)})}),new Si(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),i=$p(e.remoteMessages);Object.assign(i,{[n]:Ie(r)})}),new Si(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let i=$p(e.remoteMessages);i.total=Y2(t),i.reused=Y2(r),i.packReused=Ie(n)})]}});function P_(e,t){return ir({remoteMessages:new M_},R_,t)}var R_,M_,O_=W({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";oe(),HF(),R_=[new Si(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...C_,new Si([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new Si([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:Ie(t),summary:r,url:n}})],M_=class{constructor(){this.all=[]}}}});function UF(e,t){let r=ir(new T_,I_,[e,t]);return r.message&&r}var X2,Z2,K2,J2,I_,Q2,vm,F_=W({"src/lib/parsers/parse-pull.ts"(){"use strict";BF(),oe(),O_(),X2=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,Z2=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,K2=/^(create|delete) mode \d+ (.+)/,J2=[new ce(X2,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new ce(Z2,(e,[t,,r,,n])=>r!==void 0||n!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+n||0,!0):!1),new ce(K2,(e,[t,r])=>{ke(e.files,r),ke(t==="create"?e.created:e.deleted,r)})],I_=[new ce(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new ce(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new ce(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,n,i])=>{e.branch.local=n,e.hash.local=t,e.branch.remote=i,e.hash.remote=r})],Q2=(e,t)=>ir(new qp,J2,[e,t]),vm=(e,t)=>Object.assign(new qp,Q2(e,t),P_(e,t))}}),eb,$_,tb,GF=W({"src/lib/parsers/parse-merge.ts"(){"use strict";jF(),oe(),F_(),eb=[new ce(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new ce(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new Cu(t,r))}),new ce(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new Cu(t,r,{deleteRef:n}))}),new ce(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new Cu(t,null))}),new ce(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],$_=(e,t)=>Object.assign(tb(e,t),vm(e,t)),tb=e=>ir(new k_,eb,e)}});function rb(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=$_(t,r);if(n.failed)throw new Tl(n);return n}}:nr("Git.merge requires at least one option")}var zF=W({"src/lib/tasks/merge.ts"(){"use strict";Rs(),GF(),tt()}});function VF(e,t,r){let n=r.includes("deleted"),i=r.includes("tag")||/^refs\/tags/.test(e),a=!r.includes("new");return{deleted:n,tag:i,branch:!i,new:!a,alreadyUpdated:a,local:e,remote:t}}var nb,L_,ib,WF=W({"src/lib/parsers/parse-push.ts"(){"use strict";oe(),O_(),nb=[new ce(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new ce(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref=xl(Fr({},e.ref||{}),{local:t})}),new ce(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(VF(t,r,n))}),new ce(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch=xl(Fr({},e.branch||{}),{local:t,remote:r,remoteName:n})}),new ce(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,n,i])=>{e.update={head:{local:t,remote:r},hash:{from:n,to:i}}})],L_=(e,t)=>{let r=ib(e,t),n=P_(e,t);return Fr(Fr({},r),n)},ib=(e,t)=>ir({pushed:[]},nb,[e,t])}}),D_={};rt(D_,{pushTagsTask:()=>qF,pushTask:()=>ym});function qF(e={},t){return ke(t,"--tags"),ym(e,t)}function ym(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),Lu(r,"-v"),ke(r,"--verbose"),ke(r,"--porcelain"),{commands:r,format:"utf-8",parser:L_}}var N_=W({"src/lib/tasks/push.ts"(){"use strict";WF(),oe()}});function YF(){return{showBuffer(){let e=["show",...rr(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(zb(e),Je(arguments))},show(){let e=["show",...rr(arguments,1)];return this._runTask(Vt(e),Je(arguments))}}}var XF=W({"src/lib/tasks/show.ts"(){"use strict";oe(),tt()}}),ab,j_,ZF=W({"src/lib/responses/FileStatusSummary.ts"(){"use strict";ab=/^(.+)\0(.+)$/,j_=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=ab.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function sb(e){let[t,r]=e.split(Ps);return{from:r||t,to:t}}function yr(e,t,r){return[`${e}${t}`,r]}function Lp(e,...t){return t.map(r=>yr(e,r,(n,i)=>ke(n.conflicted,i)))}function KF(e,t){let r=t.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return n(" ",r.charAt(0),r.substr(2));default:return}function n(i,a,s){let o=`${i}${a}`,c=B_.get(o);c&&c(e,s),o!=="##"&&o!=="!!"&&e.files.push(new j_(s,i,a))}}var ob,B_,H_,JF=W({"src/lib/responses/StatusSummary.ts"(){"use strict";oe(),ZF(),ob=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},B_=new Map([yr(" ","A",(e,t)=>ke(e.created,t)),yr(" ","D",(e,t)=>ke(e.deleted,t)),yr(" ","M",(e,t)=>ke(e.modified,t)),yr("A"," ",(e,t)=>ke(e.created,t)&&ke(e.staged,t)),yr("A","M",(e,t)=>ke(e.created,t)&&ke(e.staged,t)&&ke(e.modified,t)),yr("D"," ",(e,t)=>ke(e.deleted,t)&&ke(e.staged,t)),yr("M"," ",(e,t)=>ke(e.modified,t)&&ke(e.staged,t)),yr("M","M",(e,t)=>ke(e.modified,t)&&ke(e.staged,t)),yr("R"," ",(e,t)=>{ke(e.renamed,sb(t))}),yr("R","M",(e,t)=>{let r=sb(t);ke(e.renamed,r),ke(e.modified,r.to)}),yr("!","!",(e,t)=>{ke(e.ignored=e.ignored||[],t)}),yr("?","?",(e,t)=>ke(e.not_added,t)),...Lp("A","A","U"),...Lp("D","D","U"),...Lp("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,i=/^(.+?(?=(?:\.{3}|\s|$)))/,a=/\.{3}(\S*)/,s=/\son\s([\S]+)$/,o;o=r.exec(t),e.ahead=o&&+o[1]||0,o=n.exec(t),e.behind=o&&+o[1]||0,o=i.exec(t),e.current=o&&o[1],o=a.exec(t),e.tracking=o&&o[1],o=s.exec(t),e.current=o&&o[1]||e.current,e.detached=/\(no branch\)/.test(t)}]]),H_=function(e){let t=e.split(Ps),r=new ob;for(let n=0,i=t.length;n!U_.includes(r))],parser(r){return H_(r)}}}var U_,e4=W({"src/lib/tasks/status.ts"(){"use strict";JF(),U_=["--null","-z"]}});function Ou(e=0,t=0,r=0,n="",i=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:n,installed:i},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function t4(){return Ou(0,0,0,"",!1)}function r4(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:n4,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(wm));n(t)}})}}}function n4(e){return e===wm?t4():ir(Ou(0,0,0,e),G_,e)}var wm,G_,i4=W({"src/lib/tasks/version.ts"(){"use strict";oe(),wm="installed=false",G_=[new ce(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,i=""])=>{Object.assign(e,Ou(Ie(t),Ie(r),Ie(n),i))}),new ce(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,i=""])=>{Object.assign(e,Ou(Ie(t),Ie(r),n,i))})]}}),z_={};rt(z_,{SimpleGitApi:()=>Yp});var Yp,a4=W({"src/lib/simple-git-api.ts"(){"use strict";uF(),fF(),hF(),gF(),_F(),Jb(),SF(),n_(),AF(),RF(),A_(),zF(),N_(),XF(),e4(),tt(),i4(),oe(),Yp=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&lF(e,n,t),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(e){return this._runTask(Vt(["add",...xn(e)]),Je(arguments))}cwd(e){let t=Je(arguments);return typeof e=="string"?this._runTask(z2(e,this._executor),t):typeof(e==null?void 0:e.path)=="string"?this._runTask(z2(e.path,e.root&&this._executor||void 0),t):this._runTask(nr("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(EF(e,t===!0),Je(arguments))}init(e){return this._runTask(PF(e===!0,this._executor.cwd,rr(arguments)),Je(arguments))}merge(){return this._runTask(rb(rr(arguments)),Je(arguments))}mergeFromTo(e,t){return Pt(e)&&Pt(t)?this._runTask(rb([e,t,...rr(arguments)]),Je(arguments,!1)):this._runTask(nr("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=ym({remote:Sn(arguments[0],Pt),branch:Sn(arguments[1],Pt)},rr(arguments));return this._runTask(e,Je(arguments))}stash(){return this._runTask(Vt(["stash",...rr(arguments)]),Je(arguments))}status(){return this._runTask(QF(rr(arguments)),Je(arguments))}},Object.assign(Yp.prototype,dF(),bF(),XI(),mF(),xF(),QI(),NF(),YF(),r4())}}),V_={};rt(V_,{Scheduler:()=>q_});var lb,q_,s4=W({"src/lib/runners/scheduler.ts"(){"use strict";oe(),l_(),lb=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,W_.createDeferred)();return{promise:t,done:r,id:e}}})(),q_=class{constructor(e=2){this.concurrency=e,this.logger=cm("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=ke(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),Lu(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=ke(this.pending,lb());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),Y_={};rt(Y_,{applyPatchTask:()=>o4});function o4(e,t){return Vt(["apply",...t,...e])}var l4=W({"src/lib/tasks/apply-patch.ts"(){"use strict";tt()}});function c4(e,t){return{branch:e,hash:t,success:!0}}function u4(e){return{branch:e,hash:null,success:!1}}var X_,f4=W({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";X_=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function Z_(e,t){return t===1&&Xp.test(e)}var cb,Xp,ub,Hu,d4=W({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";f4(),oe(),cb=/(\S+)\s+\(\S+\s([^)]+)\)/,Xp=/^error[^']+'([^']+)'/m,ub=[new ce(cb,(e,[t,r])=>{let n=c4(t,r);e.all.push(n),e.branches[t]=n}),new ce(Xp,(e,[t])=>{let r=u4(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],Hu=(e,t)=>ir(new X_,ub,[e,t])}}),K_,h4=W({"src/lib/responses/BranchSummary.ts"(){"use strict";K_=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,r,n,i){e==="*"&&(this.detached=t,this.current=r),this.all.push(r),this.branches[r]={current:e==="*",linkedWorkTree:e==="+",name:r,commit:n,label:i}}}}});function fb(e){return e?e.charAt(0):""}function J_(e){return ir(new K_,Q_,e)}var Q_,p4=W({"src/lib/parsers/parse-branch.ts"(){"use strict";h4(),oe(),Q_=[new ce(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,i])=>{e.push(fb(t),!0,r,n,i)}),new ce(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(e,[t,r,n,i])=>{e.push(fb(t),!1,r,n,i)})]}}),ex={};rt(ex,{branchLocalTask:()=>g4,branchTask:()=>m4,containsDeleteBranchCommand:()=>tx,deleteBranchTask:()=>y4,deleteBranchesTask:()=>v4});function tx(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function m4(e){let t=tx(e),r=["branch",...e];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(n,i){return t?Hu(n,i).all[0]:J_(n)}}}function g4(){return{format:"utf-8",commands:["branch","-v"],parser:J_}}function v4(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return Hu(r,n)},onError({exitCode:r,stdOut:n},i,a,s){if(!Z_(String(i),r))return s(i);a(n)}}}function y4(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,i){return Hu(n,i).branches[e]},onError({exitCode:n,stdErr:i,stdOut:a},s,o,c){if(!Z_(String(s),n))return c(s);throw new Tl(r.parser(El(a),El(i)),String(s))}};return r}var w4=W({"src/lib/tasks/branch.ts"(){"use strict";Rs(),d4(),p4(),oe()}}),rx,b4=W({"src/lib/responses/CheckIgnore.ts"(){"use strict";rx=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),nx={};rt(nx,{checkIgnoreTask:()=>_4});function _4(e){return{commands:["check-ignore",...e],format:"utf-8",parser:rx}}var x4=W({"src/lib/tasks/check-ignore.ts"(){"use strict";b4()}}),ix={};rt(ix,{cloneMirrorTask:()=>E4,cloneTask:()=>ax});function S4(e){return/^--upload-pack(=|$)/.test(e)}function ax(e,t,r){let n=["clone",...r];return Pt(e)&&n.push(e),Pt(t)&&n.push(t),n.find(S4)?nr("git.fetch: potential exploit argument blocked."):Vt(n)}function E4(e,t,r){return ke(r,"--mirror"),ax(e,t,r)}var A4=W({"src/lib/tasks/clone.ts"(){"use strict";tt(),oe()}});function k4(e,t){return ir({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},sx,[e,t])}var sx,T4=W({"src/lib/parsers/parse-fetch.ts"(){"use strict";oe(),sx=[new ce(/From (.+)$/,(e,[t])=>{e.remote=t}),new ce(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new ce(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new ce(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new ce(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,i])=>{e.updated.push({name:n,tracking:i,to:r,from:t})})]}}),ox={};rt(ox,{fetchTask:()=>P4});function C4(e){return/^--upload-pack(=|$)/.test(e)}function P4(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(C4)?nr("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:k4}}var R4=W({"src/lib/tasks/fetch.ts"(){"use strict";T4(),tt()}});function M4(e){return ir({moves:[]},lx,e)}var lx,O4=W({"src/lib/parsers/parse-move.ts"(){"use strict";oe(),lx=[new ce(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),cx={};rt(cx,{moveTask:()=>I4});function I4(e,t){return{commands:["mv","-v",...xn(e),t],format:"utf-8",parser:M4}}var F4=W({"src/lib/tasks/move.ts"(){"use strict";O4(),oe()}}),ux={};rt(ux,{pullTask:()=>$4});function $4(e,t,r){let n=["pull",...r];return e&&t&&n.splice(1,0,e,t),{commands:n,format:"utf-8",parser(i,a){return vm(i,a)},onError(i,a,s,o){let c=UF(El(i.stdOut),El(i.stdErr));if(c)return o(new Tl(c));o(a)}}}var L4=W({"src/lib/tasks/pull.ts"(){"use strict";Rs(),F_(),oe()}});function D4(e){let t={};return fx(e,([r])=>t[r]={name:r}),Object.values(t)}function N4(e){let t={};return fx(e,([r,n,i])=>{t.hasOwnProperty(r)||(t[r]={name:r,refs:{fetch:"",push:""}}),i&&n&&(t[r].refs[i.replace(/[^a-z]/g,"")]=n)}),Object.values(t)}function fx(e,t){Kp(e,r=>t(r.split(/\s+/)))}var j4=W({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";oe()}}),dx={};rt(dx,{addRemoteTask:()=>B4,getRemotesTask:()=>H4,listRemotesTask:()=>U4,remoteTask:()=>G4,removeRemoteTask:()=>z4});function B4(e,t,r){return Vt(["remote","add",...r,e,t])}function H4(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?N4:D4}}function U4(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),Vt(t)}function G4(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),Vt(t)}function z4(e){return Vt(["remote","remove",e])}var V4=W({"src/lib/tasks/remote.ts"(){"use strict";j4(),tt()}}),hx={};rt(hx,{stashListTask:()=>W4});function W4(e={},t){let r=E_(e),n=["stash","list",...r.commands,...t],i=b_(r.splitter,r.fields,fm(n));return Bu(n)||{commands:n,format:"utf-8",parser:i}}var q4=W({"src/lib/tasks/stash-list.ts"(){"use strict";Ml(),x_(),gm(),A_()}}),px={};rt(px,{addSubModuleTask:()=>Y4,initSubModuleTask:()=>X4,subModuleTask:()=>Uu,updateSubModuleTask:()=>Z4});function Y4(e,t){return Uu(["add",e,t])}function X4(e){return Uu(["init",...e])}function Uu(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),Vt(t)}function Z4(e){return Uu(["update",...e])}var K4=W({"src/lib/tasks/sub-module.ts"(){"use strict";tt()}});function J4(e,t){let r=isNaN(e),n=isNaN(t);return r!==n?r?1:-1:r?mx(e,t):0}function mx(e,t){return e===t?0:e>t?1:-1}function Q4(e){return e.trim()}function Eu(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var db,gx,e$=W({"src/lib/responses/TagList.ts"(){"use strict";db=class{constructor(e,t){this.all=e,this.latest=t}},gx=function(e,t=!1){let r=e.split(` -`).map(Q4).filter(Boolean);t||r.sort(function(i,a){let s=i.split("."),o=a.split(".");if(s.length===1||o.length===1)return J4(Eu(s[0]),Eu(o[0]));for(let c=0,l=Math.max(s.length,o.length);ci.indexOf(".")>=0);return new db(r,n)}}}),vx={};rt(vx,{addAnnotatedTagTask:()=>n$,addTagTask:()=>r$,tagListTask:()=>t$});function t$(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return gx(r,t)}}}function r$(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function n$(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var i$=W({"src/lib/tasks/tag.ts"(){"use strict";e$()}}),a$=xI({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(oF(),Ke(u_)),{SimpleGitApi:n}=(a4(),Ke(z_)),{Scheduler:i}=(s4(),Ke(V_)),{configurationErrorTask:a}=(tt(),Ke(Up)),{asArray:s,filterArray:o,filterPrimitives:c,filterString:l,filterStringOrStringArray:u,filterType:f,getTrailingOptions:d,trailingFunctionArgument:h,trailingOptionsArgument:p}=(oe(),Ke(Fb)),{applyPatchTask:m}=(l4(),Ke(Y_)),{branchTask:v,branchLocalTask:y,deleteBranchesTask:b,deleteBranchTask:x}=(w4(),Ke(ex)),{checkIgnoreTask:E}=(x4(),Ke(nx)),{checkIsRepoTask:_}=(Nb(),Ke($b)),{cloneTask:k,cloneMirrorTask:w}=(A4(),Ke(ix)),{cleanWithOptionsTask:A,isCleanOptionsArray:S}=(Xb(),Ke(qb)),{diffSummaryTask:T}=(gm(),Ke(S_)),{fetchTask:P}=(R4(),Ke(ox)),{moveTask:O}=(F4(),Ke(cx)),{pullTask:j}=(L4(),Ke(ux)),{pushTagsTask:D}=(N_(),Ke(D_)),{addRemoteTask:Q,getRemotesTask:de,listRemotesTask:ee,remoteTask:J,removeRemoteTask:Pe}=(V4(),Ke(dx)),{getResetMode:me,resetTask:F}=(o_(),Ke(i_)),{stashListTask:G}=(q4(),Ke(hx)),{addSubModuleTask:N,initSubModuleTask:Me,subModuleTask:Dt,updateSubModuleTask:_t}=(K4(),Ke(px)),{addAnnotatedTagTask:Ee,addTagTask:st,tagListTask:ot}=(i$(),Ke(vx)),{straightThroughBufferTask:Ct,straightThroughStringTask:$e}=(tt(),Ke(Up));function U(L,Y){this._plugins=Y,this._executor=new r(L.baseDir,new i(L.maxConcurrentProcesses),Y),this._trimmed=L.trimmed}(U.prototype=Object.create(n.prototype)).constructor=U,U.prototype.customBinary=function(L){return this._plugins.reconfigure("binary",L),this},U.prototype.env=function(L,Y){return arguments.length===1&&typeof L=="object"?this._executor.env=L:(this._executor.env=this._executor.env||{})[L]=Y,this},U.prototype.stashList=function(L){return this._runTask(G(p(arguments)||{},o(L)&&L||[]),h(arguments))};function Le(L,Y,ye,De){return typeof ye!="string"?a(`git.${L}() requires a string 'repoPath'`):Y(ye,f(De,l),d(arguments))}U.prototype.clone=function(){return this._runTask(Le("clone",k,...arguments),h(arguments))},U.prototype.mirror=function(){return this._runTask(Le("mirror",w,...arguments),h(arguments))},U.prototype.mv=function(L,Y){return this._runTask(O(L,Y),h(arguments))},U.prototype.checkoutLatestTag=function(L){var Y=this;return this.pull(function(){Y.tags(function(ye,De){Y.checkout(De.latest,L)})})},U.prototype.pull=function(L,Y,ye,De){return this._runTask(j(f(L,l),f(Y,l),d(arguments)),h(arguments))},U.prototype.fetch=function(L,Y){return this._runTask(P(f(L,l),f(Y,l),d(arguments)),h(arguments))},U.prototype.silent=function(L){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},U.prototype.tags=function(L,Y){return this._runTask(ot(d(arguments)),h(arguments))},U.prototype.rebase=function(){return this._runTask($e(["rebase",...d(arguments)]),h(arguments))},U.prototype.reset=function(L){return this._runTask(F(me(L),d(arguments)),h(arguments))},U.prototype.revert=function(L){let Y=h(arguments);return typeof L!="string"?this._runTask(a("Commit must be a string"),Y):this._runTask($e(["revert",...d(arguments,0,!0),L]),Y)},U.prototype.addTag=function(L){let Y=typeof L=="string"?st(L):a("Git.addTag requires a tag name");return this._runTask(Y,h(arguments))},U.prototype.addAnnotatedTag=function(L,Y){return this._runTask(Ee(L,Y),h(arguments))},U.prototype.deleteLocalBranch=function(L,Y,ye){return this._runTask(x(L,typeof Y=="boolean"?Y:!1),h(arguments))},U.prototype.deleteLocalBranches=function(L,Y,ye){return this._runTask(b(L,typeof Y=="boolean"?Y:!1),h(arguments))},U.prototype.branch=function(L,Y){return this._runTask(v(d(arguments)),h(arguments))},U.prototype.branchLocal=function(L){return this._runTask(y(),h(arguments))},U.prototype.raw=function(L){let Y=!Array.isArray(L),ye=[].slice.call(Y?arguments:L,0);for(let vt=0;vte.removeEventListener("abort",a))}}]:void 0}function l$(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function c$(e,t){if(l$(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new Vn(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function u$(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new Vn(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(t==="clone"&&/^\s*-u\b/.test(e))throw new Vn(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(t==="push"&&/^\s*--exec\b/.test(e))throw new Vn(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function f$({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action(r,n){return r.forEach((i,a)=>{let s=aDp(i))).then(s.done)}return{type:"spawn.after",action(i,a){return _l(this,arguments,function*(s,{spawned:o,close:c}){var l,u;let f=r(),d=!0,h=()=>void(d=!1);(l=o.stdout)==null||l.on("data",h),(u=o.stderr)==null||u.on("data",h),o.on("error",h),o.on("close",p=>f.close(p)),o.on("exit",p=>f.exit(p));try{yield f.result,d&&(yield Dp(50)),c(f.exitCode)}catch(p){c(f.exitCode,p)}})}}}oe();var p$="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",pb="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function m$(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function mb(e,t){if(e.length<1||e.length>2)throw new Vn(void 0,"binary",p$);if(e.some(m$))if(t)console.warn(pb);else throw new Vn(void 0,"binary",pb);let[n,i]=e;return{binary:n,prefix:i}}function g$(e,t=["git"],r=!1){let n=mb(xn(t),r);e.on("binary",i=>{n=mb(xn(i),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",i=>n.prefix?[n.prefix,...i]:i)}Ei();function v$(e){return!!(e.exitCode&&e.stdErr.length)}function y$(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function w$(e=!1,t=v$,r=y$){return(n,i)=>!e&&n||!t(i)?n:r(i)}function gb(e){return{type:"task.error",action(t,r){let n=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new wr(void 0,n.toString("utf-8"))}:{error:n}}}}oe();var b$=class{constructor(){this.plugins=new Set,this.events=new yx.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=ke(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return xn(e).forEach(r=>r&&this.plugins.add(ke(t,r))),()=>{t.forEach(r=>this.plugins.delete(r))}}exec(e,t,r){let n=t,i=Object.freeze(Object.create(r));for(let a of this.plugins)a.type===e&&(n=a.action(n,i));return n}};oe();function _$(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(a,s){return r.includes(s.method)?Ab(a,t):a}},{type:"spawn.after",action(a,s){var o;s.commands.includes(t)&&((o=s.spawned.stderr)==null||o.on("data",c=>{let l=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(c.toString("utf8"));l&&e({method:s.method,stage:x$(l[1]),progress:Ie(l[2]),processed:Ie(l[3]),total:Ie(l[4])})}))}}]}function x$(e){return String(e.toLowerCase().split(" ",1))||"unknown"}oe();function S$(e){let t=Cb(e,["uid","gid"]);return{type:"spawn.options",action(r){return Fr(Fr({},t),r)}}}function E$({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,i){var a,s;let o;function c(){o&&clearTimeout(o),o=setTimeout(u,e)}function l(){var f,d;(f=i.spawned.stdout)==null||f.off("data",c),(d=i.spawned.stderr)==null||d.off("data",c),i.spawned.off("exit",l),i.spawned.off("close",l),o&&clearTimeout(o)}function u(){l(),i.kill(new Vn(void 0,"timeout","block timeout reached"))}r&&((a=i.spawned.stdout)==null||a.on("data",c)),t&&((s=i.spawned.stderr)==null||s.on("data",c)),i.spawned.on("exit",l),i.spawned.on("close",l),c()}}}kl();function A$(){return{type:"spawn.args",action(e){let t=[],r;function n(i){(r=r||[]).push(...i)}for(let i=0;iPu(s)&&B2(s)||s));break}t.push(a)}return r?[...t,"--",...r.map(String)]:t}}}oe();var k$=a$();function T$(e,t){var r;let n=new b$,i=Ob(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!Jp(i.baseDir))throw new s$(i,"Cannot use simple-git on a directory that does not exist");return Array.isArray(i.config)&&n.add(d$(i.config)),n.add(f$(i.unsafe)),n.add(A$()),n.add(h$(i.completion)),i.abort&&n.add(o$(i.abort)),i.progress&&n.add(_$(i.progress)),i.timeout&&n.add(E$(i.timeout)),i.spawnOptions&&n.add(S$(i.spawnOptions)),n.add(gb(w$(!0))),i.errors&&n.add(gb(i.errors)),g$(n,i.binary,(r=i.unsafe)==null?void 0:r.allowUnsafeCustomBinary),new k$(i,n)}Rs();var wx=T$;g();var bx=require("obsidian"),Gu="YYYY-MM-DD",bm=`${Gu} HH:mm`,_m=`${Gu} HH:mm:ss`,zu=40,Ms="conflict-files-obsidian-git.md",ar={commitMessage:"vault backup: {{date}}",commitDateFormat:_m,autoSaveInterval:0,autoPushInterval:0,autoPullInterval:0,autoPullOnBoot:!1,disablePush:!1,pullBeforePush:!0,disablePopups:!1,disablePopupsForNoChanges:!1,listChangedFilesInMessageBody:!1,showStatusBar:!0,updateSubmodules:!1,syncMethod:"merge",customMessageOnAutoBackup:!1,autoBackupAfterFileChange:!1,treeStructure:!1,refreshSourceControl:bx.Platform.isDesktopApp,basePath:"",differentIntervalCommitAndPush:!1,changedFilesInStatusBar:!1,showedMobileNotice:!1,refreshSourceControlTimer:7e3,showBranchStatusBar:!0,setLastSaveToLastCommit:!1,submoduleRecurseCheckout:!1,gitDir:"",showFileMenu:!0,authorInHistoryView:"hide",dateInHistoryView:!1,diffStyle:"split",lineAuthor:{show:!1,followMovement:"inactive",authorDisplay:"initials",showCommitHash:!1,dateTimeFormatOptions:"date",dateTimeFormatCustomString:bm,dateTimeTimezone:"viewer-local",coloringMaxAge:"1y",colorNew:{r:255,g:150,b:150},colorOld:{r:120,g:160,b:255},textColorCss:"var(--text-muted)",ignoreWhitespace:!1,gutterSpacingFallbackLength:5}},St={type:"git-view",name:"Source Control",icon:"git-pull-request"},$r={type:"git-history-view",name:"History",icon:"history"},Ai={type:"split-diff-view",name:"Diff view",icon:"diff"},ki={type:"diff-view",name:"Diff View",icon:"git-pull-request"},Vu="C:\\Program Files\\Git\\cmd\\git.exe",Wu="git_credentials_input",Os="obsidian_askpass.sh",_x=`#!/bin/sh +`);if(i=a.shift(),!i.startsWith("unpack "))throw new ua('unpack ok" or "unpack [error message]',i);t.ok=i==="unpack ok",t.ok||(t.error=i.slice(7)),t.refs={};for(let s of a){if(s.trim()==="")continue;let o=s.slice(0,2),l=s.slice(3),c=l.indexOf(" ");c===-1&&(c=l.length);let u=l.slice(0,c),f=l.slice(c+1);t.refs[u]={ok:o==="ok",error:f}}return t}async function EI({capabilities:e=[],triplets:t=[]}){let r=[],n=`\0 ${e.join(" ")}`;for(let i of t)r.push(Ve.encode(`${i.oldoid} ${i.oid} ${i.fullRef}${n} +`)),n="";return r.push(Ve.flush()),r}async function AI({fs:e,cache:t,http:r,onProgress:n,onMessage:i,onAuth:a,onAuthSuccess:s,onAuthFailure:o,onPrePush:l,gitdir:c,ref:u,remoteRef:f,remote:d,url:h,force:p=!1,delete:m=!1,corsProxy:v,headers:y={}}){let b=u||await ha({fs:e,gitdir:c});if(typeof b=="undefined")throw new er("ref");let x=await We.get({fs:e,gitdir:c});d=d||await x.get(`branch.${b}.pushRemote`)||await x.get("remote.pushDefault")||await x.get(`branch.${b}.remote`)||"origin";let E=h||await x.get(`remote.${d}.pushurl`)||await x.get(`remote.${d}.url`);if(typeof E=="undefined")throw new er("remote OR url");let _=f||await x.get(`branch.${b}.merge`);if(typeof E=="undefined")throw new er("remoteRef");v===void 0&&(v=await x.get("http.corsProxy"));let k=await W.expand({fs:e,gitdir:c,ref:b}),w=m?"0000000000000000000000000000000000000000":await W.resolve({fs:e,gitdir:c,ref:k}),A=As.getRemoteHelperFor({url:E}),S=await A.discover({http:r,onAuth:a,onAuthSuccess:s,onAuthFailure:o,corsProxy:v,service:"git-receive-pack",url:E,headers:y,protocolVersion:1}),T=S.auth,P;if(!_)P=k;else try{P=await W.expandAgainstMap({ref:_,map:S.refs})}catch(Y){if(Y instanceof Le)P=_.startsWith("refs/")?_:`refs/heads/${_}`;else throw Y}let I=S.refs.get(P)||"0000000000000000000000000000000000000000";if(l&&!await l({remote:d,url:E,localRef:{ref:m?"(delete)":k,oid:w},remoteRef:{ref:P,oid:I}}))throw new ws;let N=!S.capabilities.has("no-thin"),L=new Set;if(!m){let Y=[...S.refs.values()],O=new Set;if(I!=="0000000000000000000000000000000000000000"){let he=await Pp({fs:e,cache:t,gitdir:c,oids:[w,I]});for(let Ge of he)Y.push(Ge);N&&(O=await fp({fs:e,cache:t,gitdir:c,oids:he}))}if(!Y.includes(w)){let he=await xI({fs:e,cache:t,gitdir:c,start:[w],finish:Y});L=await fp({fs:e,cache:t,gitdir:c,oids:he})}if(N){try{let he=await W.resolve({fs:e,gitdir:c,ref:`refs/remotes/${d}/HEAD`,depth:2}),{oid:Ge}=await W.resolveAgainstMap({ref:he.replace(`refs/remotes/${d}/`,""),fullref:he,map:S.refs}),gt=[Ge];for(let Re of await fp({fs:e,cache:t,gitdir:c,oids:gt}))O.add(Re)}catch(he){}for(let he of O)L.delete(he)}if(w===I&&(p=!0),!p){if(k.startsWith("refs/tags")&&I!=="0000000000000000000000000000000000000000")throw new ys("tag-exists");if(w!=="0000000000000000000000000000000000000000"&&I!=="0000000000000000000000000000000000000000"&&!await T2({fs:e,cache:t,gitdir:c,oid:w,ancestor:I,depth:-1}))throw new ys("not-fast-forward")}}let ee=b2([...S.capabilities],["report-status","side-band-64k",`agent=${gu.agent}`]),fe=await EI({capabilities:ee,triplets:[{oldoid:I,oid:w,fullRef:P}]}),J=m?[]:await R2({fs:e,cache:t,gitdir:c,oids:[...L]}),Q=await A.connect({http:r,onProgress:n,corsProxy:v,service:"git-receive-pack",url:E,auth:T,headers:y,body:[...fe,...J]}),{packfile:Pe,progress:ge}=await cu.demux(Q.body);if(i){let Y=_2(ge);_l(Y,async O=>{await i(O)})}let z=await SI(Pe);if(Q.headers&&(z.headers=Q.headers),d&&z.ok&&z.refs[P].ok&&!k.startsWith("refs/tags")){let Y=`refs/remotes/${d}/${P.replace("refs/heads","")}`;m?await W.deleteRef({fs:e,gitdir:c,ref:Y}):await W.writeRef({fs:e,gitdir:c,ref:Y,value:w})}if(z.ok&&Object.values(z.refs).every(Y=>Y.ok))return z;{let Y=Object.entries(z.refs).filter(([O,he])=>!he.ok).map(([O,he])=>` + - ${O}: ${he.error}`).join("");throw new ul(Y,z)}}async function kI({fs:e,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,dir:l,gitdir:c=$(l,".git"),ref:u,remoteRef:f,remote:d="origin",url:h,force:p=!1,delete:m=!1,corsProxy:v,headers:y={},cache:b={}}){try{return C("fs",e),C("http",t),C("gitdir",c),await AI({fs:new X(e),cache:b,http:t,onProgress:r,onMessage:n,onAuth:i,onAuthSuccess:a,onAuthFailure:s,onPrePush:o,gitdir:c,ref:u,remoteRef:f,remote:d,url:h,force:p,delete:m,corsProxy:v,headers:y})}catch(x){throw x.caller="git.push",x}}async function M2({fs:e,cache:t,gitdir:r,oid:n}){let{type:i,object:a}=await qe({fs:e,cache:t,gitdir:r,oid:n});if(i==="tag")return n=pr.from(a).parse().object,M2({fs:e,cache:t,gitdir:r,oid:n});if(i!=="blob")throw new zt(n,i,"blob");return{oid:n,blob:new Uint8Array(a)}}async function O2({fs:e,cache:t,gitdir:r,oid:n,filepath:i=void 0}){return i!==void 0&&(n=await bl({fs:e,cache:t,gitdir:r,oid:n,filepath:i})),await M2({fs:e,cache:t,gitdir:r,oid:n})}async function xl({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,filepath:i,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await O2({fs:new X(e),cache:a,gitdir:r,oid:n,filepath:i})}catch(s){throw s.caller="git.readBlob",s}}async function TI({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await ou({fs:new X(e),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.readCommit",a}}async function CI({fs:e,cache:t,gitdir:r,ref:n="refs/notes/commits",oid:i}){let a=await W.resolve({gitdir:r,fs:e,ref:n}),{blob:s}=await O2({fs:e,cache:t,gitdir:r,oid:a,filepath:i});return s}async function PI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n="refs/notes/commits",oid:i,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("ref",n),C("oid",i),await CI({fs:new X(e),cache:a,gitdir:r,ref:n,oid:i})}catch(s){throw s.caller="git.readNote",s}}async function RI({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,format:i="parsed",filepath:a=void 0,encoding:s=void 0,cache:o={}}){try{C("fs",e),C("gitdir",r),C("oid",n);let l=new X(e);a!==void 0&&(n=await bl({fs:l,cache:o,gitdir:r,oid:n,filepath:a}));let u=await qe({fs:l,cache:o,gitdir:r,oid:n,format:i==="parsed"?"content":i});if(u.oid=n,i==="parsed")switch(u.format="parsed",u.type){case"commit":u.object=rr.from(u.object).parse();break;case"tree":u.object=tr.from(u.object).entries();break;case"blob":s?u.object=u.object.toString(s):(u.object=new Uint8Array(u.object),u.format="content");break;case"tag":u.object=pr.from(u.object).parse();break;default:throw new zt(u.oid,u.type,"blob|commit|tag|tree")}else(u.format==="deflated"||u.format==="wrapped")&&(u.type=u.format);return u}catch(l){throw l.caller="git.readObject",l}}async function MI({fs:e,cache:t,gitdir:r,oid:n}){let{type:i,object:a}=await qe({fs:e,cache:t,gitdir:r,oid:n,format:"content"});if(i!=="tag")throw new zt(n,i,"tag");let s=pr.from(a);return{oid:n,tag:s.parse(),payload:s.payload()}}async function OI({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,cache:i={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await MI({fs:new X(e),cache:i,gitdir:r,oid:n})}catch(a){throw a.caller="git.readTag",a}}async function II({fs:e,dir:t,gitdir:r=$(t,".git"),oid:n,filepath:i=void 0,cache:a={}}){try{return C("fs",e),C("gitdir",r),C("oid",n),await ks({fs:new X(e),cache:a,gitdir:r,oid:n,filepath:i})}catch(s){throw s.caller="git.readTree",s}}async function FI({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,cache:i={}}){try{C("fs",e),C("gitdir",r),C("filepath",n),await yt.acquire({fs:new X(e),gitdir:r,cache:i},async function(a){a.delete({filepath:n})})}catch(a){throw a.caller="git.remove",a}}async function $I({fs:e,cache:t,onSign:r,gitdir:n,ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:l}){let c;try{c=await W.resolve({gitdir:n,fs:e,ref:i})}catch(p){if(!(p instanceof Le))throw p}let f=(await ks({fs:e,gitdir:n,oid:c||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;f=f.filter(p=>p.path!==a);let d=await kp({fs:e,gitdir:n,tree:f});return await mu({fs:e,cache:t,onSign:r,gitdir:n,ref:i,tree:d,parent:c&&[c],message:`Note removed by 'isomorphic-git removeNote' +`,author:s,committer:o,signingKey:l})}async function LI({fs:e,onSign:t,dir:r,gitdir:n=$(r,".git"),ref:i="refs/notes/commits",oid:a,author:s,committer:o,signingKey:l,cache:c={}}){try{C("fs",e),C("gitdir",n),C("oid",a);let u=new X(e),f=await fa({fs:u,gitdir:n,author:s});if(!f)throw new Vt("author");let d=await Ss({fs:u,gitdir:n,author:f,committer:o});if(!d)throw new Vt("committer");return await $I({fs:u,cache:c,onSign:t,gitdir:n,ref:i,oid:a,author:f,committer:d,signingKey:l})}catch(u){throw u.caller="git.removeNote",u}}async function DI({fs:e,gitdir:t,oldref:r,ref:n,checkout:i=!1}){if(n!==Qr.default.clean(n))throw new Wn(n,Qr.default.clean(n));if(r!==Qr.default.clean(r))throw new Wn(r,Qr.default.clean(r));let a=`refs/heads/${r}`,s=`refs/heads/${n}`;if(await W.exists({fs:e,gitdir:t,ref:s}))throw new en("branch",n,!1);let l=await W.resolve({fs:e,gitdir:t,ref:a,depth:1});await W.writeRef({fs:e,gitdir:t,ref:s,value:l}),await W.deleteRef({fs:e,gitdir:t,ref:a});let u=await ha({fs:e,gitdir:t,fullname:!0})===a;(i||u)&&await W.writeSymbolicRef({fs:e,gitdir:t,ref:"HEAD",value:s})}async function NI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,oldref:i,checkout:a=!1}){try{return C("fs",e),C("gitdir",r),C("ref",n),C("oldref",i),await DI({fs:new X(e),gitdir:r,ref:n,oldref:i,checkout:a})}catch(s){throw s.caller="git.renameBranch",s}}async function I2({gitdir:e,type:t,object:r}){return Vn(xi.wrap({type:t,object:r}))}async function BI({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,ref:i,cache:a={}}){try{C("fs",e),C("gitdir",r),C("filepath",n);let s=new X(e),o,l;try{o=await W.resolve({fs:s,gitdir:r,ref:i||"HEAD"})}catch(f){if(i)throw f}if(o)try{o=await bl({fs:s,cache:a,gitdir:r,oid:o,filepath:n})}catch(f){o=null}let c={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:0,uid:0,gid:0,size:0},u=t&&await s.read($(t,n));u&&(l=await I2({gitdir:r,type:"blob",object:u}),o===l&&(c=await s.lstat($(t,n)))),await yt.acquire({fs:s,gitdir:r,cache:a},async function(f){f.delete({filepath:n}),o&&f.insert({filepath:n,stats:c,oid:o})})}catch(s){throw s.caller="git.reset",s}}async function jI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,depth:i}){try{return C("fs",e),C("gitdir",r),C("ref",n),await W.resolve({fs:new X(e),gitdir:r,ref:n,depth:i})}catch(a){throw a.caller="git.resolveRef",a}}async function HI({fs:e,dir:t,gitdir:r=$(t,".git"),path:n,value:i,append:a=!1}){try{C("fs",e),C("gitdir",r),C("path",n);let s=new X(e),o=await We.get({fs:s,gitdir:r});a?await o.append(n,i):await o.set(n,i),await We.save({fs:s,gitdir:r,config:o})}catch(s){throw s.caller="git.setConfig",s}}async function UI({fs:e,dir:t,gitdir:r=$(t,".git"),filepath:n,cache:i={}}){try{C("fs",e),C("gitdir",r),C("filepath",n);let a=new X(e);if(await xs.isIgnored({fs:a,gitdir:r,dir:t,filepath:n}))return"ignored";let o=await GI({fs:a,cache:i,gitdir:r}),l=await F2({fs:a,cache:i,gitdir:r,tree:o,path:n}),c=await yt.acquire({fs:a,gitdir:r,cache:i},async function(m){for(let v of m)if(v.path===n)return v;return null}),u=await a.lstat($(t,n)),f=l!==null,d=c!==null,h=u!==null,p=async()=>{if(d&&!eu(c,u))return c.oid;{let m=await a.read($(t,n)),v=await I2({gitdir:r,type:"blob",object:m});return d&&c.oid===v&&u.size!==-1&&yt.acquire({fs:a,gitdir:r,cache:i},async function(y){y.insert({filepath:n,stats:u,oid:v})}),v}};if(!f&&!h&&!d)return"absent";if(!f&&!h&&d)return"*absent";if(!f&&h&&!d)return"*added";if(!f&&h&&d)return await p()===c.oid?"added":"*added";if(f&&!h&&!d)return"deleted";if(f&&!h&&d)return l===c.oid,"*deleted";if(f&&h&&!d)return await p()===l?"*undeleted":"*undeletemodified";if(f&&h&&d){let m=await p();return m===l?m===c.oid?"unmodified":"*unmodified":m===c.oid?"modified":"*modified"}}catch(a){throw a.caller="git.status",a}}async function F2({fs:e,cache:t,gitdir:r,tree:n,path:i}){typeof i=="string"&&(i=i.split("/"));let a=i.shift();for(let s of n)if(s.path===a){if(i.length===0)return s.oid;let{type:o,object:l}=await qe({fs:e,cache:t,gitdir:r,oid:s.oid});if(o==="tree"){let c=tr.from(l);return F2({fs:e,cache:t,gitdir:r,tree:c,path:i})}if(o==="blob")throw new zt(s.oid,o,"blob",i.join("/"))}return null}async function GI({fs:e,cache:t,gitdir:r}){let n;try{n=await W.resolve({fs:e,gitdir:r,ref:"HEAD"})}catch(a){if(a instanceof Le)return[]}let{tree:i}=await ks({fs:e,cache:t,gitdir:r,oid:n});return i}async function zI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n="HEAD",filepaths:i=["."],filter:a,cache:s={},ignored:o=!1}){try{C("fs",e),C("gitdir",r),C("ref",n);let l=new X(e);return await _s({fs:l,cache:s,dir:t,gitdir:r,trees:[bi({ref:n}),pu(),hu()],map:async function(c,[u,f,d]){if(!u&&!d&&f&&!o&&await xs.isIgnored({fs:l,dir:t,filepath:c})||!i.some(k=>y2(c,k)))return null;if(a&&!a(c))return;let[h,p,m]=await Promise.all([u&&u.type(),f&&f.type(),d&&d.type()]),v=[h,p,m].includes("blob");if((h==="tree"||h==="special")&&!v)return;if(h==="commit")return null;if((p==="tree"||p==="special")&&!v)return;if(m==="commit")return null;if((m==="tree"||m==="special")&&!v)return;let y=h==="blob"?await u.oid():void 0,b=m==="blob"?await d.oid():void 0,x;h!=="blob"&&p==="blob"&&m!=="blob"?x="42":p==="blob"&&(x=await f.oid());let E=[void 0,y,x,b],_=E.map(k=>E.indexOf(k));return _.shift(),[c,..._]}})}catch(l){throw l.caller="git.statusMatrix",l}}async function VI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,object:i,force:a=!1}){try{C("fs",e),C("gitdir",r),C("ref",n);let s=new X(e);if(n===void 0)throw new er("ref");n=n.startsWith("refs/tags/")?n:`refs/tags/${n}`;let o=await W.resolve({fs:s,gitdir:r,ref:i||"HEAD"});if(!a&&await W.exists({fs:s,gitdir:r,ref:n}))throw new en("tag",n);await W.writeRef({fs:s,gitdir:r,ref:n,value:o})}catch(s){throw s.caller="git.tag",s}}async function WI({fs:e,dir:t,gitdir:r=$(t,".git"),cache:n={},filepath:i,oid:a,mode:s,add:o,remove:l,force:c}){try{C("fs",e),C("gitdir",r),C("filepath",i);let u=new X(e);if(l)return await yt.acquire({fs:u,gitdir:r,cache:n},async function(d){let h;if(!c&&(h=await u.lstat($(t,i)),h)){if(h.isDirectory())throw new Si("directory");return}d.has({filepath:i})&&d.delete({filepath:i})});let f;if(!a){if(f=await u.lstat($(t,i)),!f)throw new Le(`file at "${i}" on disk and "remove" not set`);if(f.isDirectory())throw new Si("directory")}return await yt.acquire({fs:u,gitdir:r,cache:n},async function(d){if(!o&&!d.has({filepath:i}))throw new Le(`file at "${i}" in index and "add" not set`);let h={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:s,uid:0,gid:0,size:0};if(!a){h=f;let p=h.isSymbolicLink()?await u.readlink($(t,i)):await u.read($(t,i));a=await mr({fs:u,gitdir:r,type:"blob",format:"content",object:p})}return d.insert({filepath:i,oid:a,stats:h}),a})}catch(u){throw u.caller="git.updateIndex",u}}function qI(){try{return gu.version}catch(e){throw e.caller="git.version",e}}async function YI({fs:e,dir:t,gitdir:r=$(t,".git"),trees:n,map:i,reduce:a,iterate:s,cache:o={}}){try{return C("fs",e),C("gitdir",r),C("trees",n),await _s({fs:new X(e),cache:o,dir:t,gitdir:r,trees:n,map:i,reduce:a,iterate:s})}catch(l){throw l.caller="git.walk",l}}async function XI({fs:e,dir:t,gitdir:r=$(t,".git"),blob:n}){try{return C("fs",e),C("gitdir",r),C("blob",n),await mr({fs:new X(e),gitdir:r,type:"blob",object:n,format:"content"})}catch(i){throw i.caller="git.writeBlob",i}}async function ZI({fs:e,gitdir:t,commit:r}){let n=rr.from(r).toObject();return await mr({fs:e,gitdir:t,type:"commit",object:n,format:"content"})}async function KI({fs:e,dir:t,gitdir:r=$(t,".git"),commit:n}){try{return C("fs",e),C("gitdir",r),C("commit",n),await ZI({fs:new X(e),gitdir:r,commit:n})}catch(i){throw i.caller="git.writeCommit",i}}async function JI({fs:e,dir:t,gitdir:r=$(t,".git"),type:n,object:i,format:a="parsed",oid:s,encoding:o=void 0}){try{let l=new X(e);if(a==="parsed"){switch(n){case"commit":i=rr.from(i).toObject();break;case"tree":i=tr.from(i).toObject();break;case"blob":i=Buffer.from(i,o);break;case"tag":i=pr.from(i).toObject();break;default:throw new zt(s||"",n,"blob|commit|tag|tree")}a="content"}return s=await mr({fs:l,gitdir:r,type:n,object:i,oid:s,format:a}),s}catch(l){throw l.caller="git.writeObject",l}}async function QI({fs:e,dir:t,gitdir:r=$(t,".git"),ref:n,value:i,force:a=!1,symbolic:s=!1}){try{C("fs",e),C("gitdir",r),C("ref",n),C("value",i);let o=new X(e);if(n!==Qr.default.clean(n))throw new Wn(n,Qr.default.clean(n));if(!a&&await W.exists({fs:o,gitdir:r,ref:n}))throw new en("ref",n);s?await W.writeSymbolicRef({fs:o,gitdir:r,ref:n,value:i}):(i=await W.resolve({fs:o,gitdir:r,ref:i}),await W.writeRef({fs:o,gitdir:r,ref:n,value:i}))}catch(o){throw o.caller="git.writeRef",o}}async function e8({fs:e,gitdir:t,tag:r}){let n=pr.from(r).toObject();return await mr({fs:e,gitdir:t,type:"tag",object:n,format:"content"})}async function t8({fs:e,dir:t,gitdir:r=$(t,".git"),tag:n}){try{return C("fs",e),C("gitdir",r),C("tag",n),await e8({fs:new X(e),gitdir:r,tag:n})}catch(i){throw i.caller="git.writeTag",i}}async function r8({fs:e,dir:t,gitdir:r=$(t,".git"),tree:n}){try{return C("fs",e),C("gitdir",r),C("tree",n),await kp({fs:new X(e),gitdir:r,tree:n})}catch(i){throw i.caller="git.writeTree",i}}var n8={Errors:wl,STAGE:hu,TREE:bi,WORKDIR:pu,add:rO,abortMerge:K6,addNote:iO,addRemote:aO,annotatedTag:oO,branch:cO,checkout:fO,clone:xO,commit:SO,getConfig:zO,getConfigAll:WO,setConfig:HI,currentBranch:EO,deleteBranch:kO,deleteRef:TO,deleteRemote:PO,deleteTag:MO,expandOid:$O,expandRef:LO,fastForward:jO,fetch:HO,findMergeBase:UO,findRoot:GO,getRemoteInfo:qO,getRemoteInfo2:YO,hashBlob:ZO,indexPack:JO,init:QO,isDescendent:eI,isIgnored:tI,listBranches:rI,listFiles:iI,listNotes:sI,listRemotes:lI,listServerRefs:fI,listTags:dI,log:gI,merge:vI,packObjects:bI,pull:_I,push:kI,readBlob:xl,readCommit:TI,readNote:PI,readObject:RI,readTag:OI,readTree:II,remove:FI,removeNote:LI,renameBranch:NI,resetIndex:BI,updateIndex:WI,resolveRef:jI,status:UI,statusMatrix:zI,tag:VI,version:qI,walk:YI,writeBlob:XI,writeCommit:KI,writeObject:JI,writeRef:QI,writeTag:t8,writeTree:r8},ie=n8;var xe=require("obsidian"),LP=ze(require("path"));g();var Aa=require("obsidian");g();var Yg=require("child_process"),xT=ze(wu()),_r=ze(require("fs/promises")),Jn=require("obsidian"),De=ze(require("path")),Yl=require("path");g();var Iu=ze(j2(),1),Pu=ze(wu(),1),d_=require("child_process"),X_=ze(Mp(),1),Ms=ze(Mp(),1),_x=require("node:events"),Mu=Object.defineProperty,x8=Object.defineProperties,S8=Object.getOwnPropertyDescriptor,E8=Object.getOwnPropertyDescriptors,Kp=Object.getOwnPropertyNames,H2=Object.getOwnPropertySymbols,bb=Object.prototype.hasOwnProperty,A8=Object.prototype.propertyIsEnumerable,U2=(e,t,r)=>t in e?Mu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$r=(e,t)=>{for(var r in t||(t={}))bb.call(t,r)&&U2(e,r,t[r]);if(H2)for(var r of H2(t))A8.call(t,r)&&U2(e,r,t[r]);return e},Al=(e,t)=>x8(e,E8(t)),V=(e,t)=>function(){return e&&(t=(0,e[Kp(e)[0]])(e=0)),t},k8=(e,t)=>function(){return t||(0,e[Kp(e)[0]])((t={exports:{}}).exports,t),t.exports},at=(e,t)=>{for(var r in t)Mu(e,r,{get:t[r],enumerable:!0})},T8=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Kp(t))!bb.call(e,i)&&i!==r&&Mu(e,i,{get:()=>t[i],enumerable:!(n=S8(t,i))||n.enumerable});return e},Qe=e=>T8(Mu({},"__esModule",{value:!0}),e),El=(e,t,r)=>new Promise((n,i)=>{var a=l=>{try{o(r.next(l))}catch(c){i(c)}},s=l=>{try{o(r.throw(l))}catch(c){i(c)}},o=l=>l.done?n(l.value):Promise.resolve(l.value).then(a,s);o((r=r.apply(e,t)).next())});function C8(...e){let t=new String(e);return Ou.set(t,e),t}function Tu(e){return e instanceof String&&Ou.has(e)}function G2(e){return Ou.get(e)||[]}var Ou,Pl=V({"src/lib/args/pathspec.ts"(){"use strict";Ou=new WeakMap}}),wr,Ai=V({"src/lib/errors/git-error.ts"(){"use strict";wr=class extends Error{constructor(e,t){super(t),this.task=e,Object.setPrototypeOf(this,new.target.prototype)}}}}),Rl,Is=V({"src/lib/errors/git-response-error.ts"(){"use strict";Ai(),Rl=class extends wr{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),_b,xb=V({"src/lib/errors/task-configuration-error.ts"(){"use strict";Ai(),_b=class extends wr{constructor(e){super(void 0,e)}}}});function Sb(e){return typeof e=="function"?e:ya}function Eb(e){return typeof e=="function"&&e!==ya}function Ab(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function kb(e,t=0){return Tb(e)&&e.length>t?e[t]:void 0}function va(e,t=0){if(Tb(e)&&e.length>t)return e[e.length-1-t]}function Tb(e){return!!(e&&typeof e.length=="number")}function Ml(e="",t=!0,r=` +`){return e.split(r).reduce((n,i)=>{let a=t?i.trim():i;return a&&n.push(a),n},[])}function Jp(e,t){return Ml(e,!0).map(r=>t(r))}function Qp(e){return(0,Iu.exists)(e,Iu.FOLDER)}function Te(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function Cb(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function Fu(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function Sn(e){return Array.isArray(e)?e:[e]}function Pb(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function Rb(e){return Sn(e).map(String)}function Fe(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function kl(e,t){let r=[];for(let n=0,i=e.length;nr in e?{[r]:e[r]}:{}))}function Np(e=0){return new Promise(t=>setTimeout(t,e))}function Bp(e){if(e!==!1)return e}var Os,ya,Ol,$u=V({"src/lib/utils/util.ts"(){"use strict";Os="\0",ya=()=>{},Ol=Object.prototype.toString.call.bind(Object.prototype.toString)}});function En(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function em(e,t){let r=Tu(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function tm(e){return!!e&&Ol(e)==="[object Object]"}function Ob(e){return typeof e=="function"}var Il,Mt,Ib,Cu,rm,Fb=V({"src/lib/utils/argument-filters.ts"(){"use strict";$u(),Pl(),Il=e=>Array.isArray(e),Mt=e=>typeof e=="string",Ib=e=>Array.isArray(e)&&e.every(Mt),Cu=e=>Mt(e)||Array.isArray(e)&&e.every(Mt),rm=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),jp,P8=V({"src/lib/utils/exit-codes.ts"(){"use strict";jp=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(jp||{})}}),Cl,R8=V({"src/lib/utils/git-output-streams.ts"(){"use strict";Cl=class{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new Cl(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),ce,Ei,M8=V({"src/lib/utils/line-parser.ts"(){"use strict";ce=class{constructor(e,t){this.matches=[],this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((i,a)=>this.addMatch(i,a,r(a)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}},Ei=class extends ce{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function $b(...e){let t=process.cwd(),r=Object.assign($r({baseDir:t},Lb),...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var Lb,O8=V({"src/lib/utils/simple-git-options.ts"(){"use strict";Lb={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function nm(e,t=[]){return tm(e)?Object.keys(e).reduce((r,n)=>{let i=e[n];return Tu(i)?r.push(i):em(i,["boolean"])?r.push(n+"="+i):r.push(n),r},t):t}function nr(e,t=0,r=!1){let n=[];for(let i=0,a=t<0?e.length:t;i{for(let a=Ml(i,n),s=0,o=a.length;s{if(!(s+c>=o))return a[s+c]};t.some(({parse:c})=>c(l,e))}}),e}var $8=V({"src/lib/utils/task-parser.ts"(){"use strict";$u()}}),Db={};at(Db,{ExitCodes:()=>jp,GitOutputStreams:()=>Cl,LineParser:()=>ce,NOOP:()=>ya,NULL:()=>Os,RemoteLineParser:()=>Ei,append:()=>Te,appendTaskOptions:()=>nm,asArray:()=>Sn,asCamelCase:()=>Pb,asFunction:()=>Sb,asNumber:()=>Fe,asStringArray:()=>Rb,bufferToString:()=>Tl,callTaskParser:()=>Hp,createInstanceConfig:()=>$b,delay:()=>Np,filterArray:()=>Il,filterFunction:()=>Ob,filterHasLength:()=>rm,filterPlainObject:()=>tm,filterPrimitives:()=>em,filterString:()=>Mt,filterStringArray:()=>Ib,filterStringOrStringArray:()=>Cu,filterType:()=>En,first:()=>kb,folderExists:()=>Qp,forEachLineWithContent:()=>Jp,getTrailingOptions:()=>nr,including:()=>Cb,isUserFunction:()=>Eb,last:()=>va,objectToString:()=>Ol,orVoid:()=>Bp,parseStringResponse:()=>ar,pick:()=>Mb,prefixedArray:()=>kl,remove:()=>Fu,splitOn:()=>Ab,toLinesWithContent:()=>Ml,trailingFunctionArgument:()=>et,trailingOptionsArgument:()=>im});var oe=V({"src/lib/utils/index.ts"(){"use strict";Fb(),P8(),R8(),M8(),O8(),F8(),$8(),$u()}}),Nb={};at(Nb,{CheckRepoActions:()=>Up,checkIsBareRepoTask:()=>jb,checkIsRepoRootTask:()=>Bb,checkIsRepoTask:()=>L8});function L8(e){switch(e){case"bare":return jb();case"root":return Bb()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:Lu,parser:am}}function Bb(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:Lu,parser(t){return/^\.(git)?$/.test(t.trim())}}}function jb(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:Lu,parser:am}}function D8(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var Up,Lu,am,Hb=V({"src/lib/tasks/check-is-repo.ts"(){"use strict";oe(),Up=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(Up||{}),Lu=({exitCode:e},t,r,n)=>{if(e===128&&D8(t))return r(Buffer.from("false"));n(t)},am=e=>e.trim()==="true"}});function N8(e,t){let r=new Ub(e),n=e?zb:Gb;return Ml(t).forEach(i=>{let a=i.replace(n,"");r.paths.push(a),(Vb.test(a)?r.folders:r.files).push(a)}),r}var Ub,Gb,zb,Vb,B8=V({"src/lib/responses/CleanSummary.ts"(){"use strict";oe(),Ub=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},Gb=/^[a-z]+\s*/i,zb=/^[a-z]+\s+[a-z]+\s*/i,Vb=/\/$/}}),Gp={};at(Gp,{EMPTY_COMMANDS:()=>Du,adhocExecTask:()=>Wb,configurationErrorTask:()=>ir,isBufferTask:()=>Yb,isEmptyTask:()=>Xb,straightThroughBufferTask:()=>qb,straightThroughStringTask:()=>Wt});function Wb(e){return{commands:Du,format:"empty",parser:e}}function ir(e){return{commands:Du,format:"empty",parser(){throw typeof e=="string"?new _b(e):e}}}function Wt(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function qb(e){return{commands:e,format:"buffer",parser(t){return t}}}function Yb(e){return e.format==="buffer"}function Xb(e){return e.format==="empty"||!e.commands.length}var Du,it=V({"src/lib/tasks/task.ts"(){"use strict";xb(),Du=[]}}),Zb={};at(Zb,{CONFIG_ERROR_INTERACTIVE_MODE:()=>sm,CONFIG_ERROR_MODE_REQUIRED:()=>om,CONFIG_ERROR_UNKNOWN_OPTION:()=>lm,CleanOptions:()=>Su,cleanTask:()=>Kb,cleanWithOptionsTask:()=>j8,isCleanOptionsArray:()=>H8});function j8(e,t){let{cleanMode:r,options:n,valid:i}=U8(e);return r?i.options?(n.push(...t),n.some(V8)?ir(sm):Kb(r,n)):ir(lm+JSON.stringify(e)):ir(om)}function Kb(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return N8(e==="n",n)}}}function H8(e){return Array.isArray(e)&&e.every(t=>cm.has(t))}function U8(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(i=>{G8(i)?(t=i,n.cleanMode=!0):n.options=n.options&&z8(r[r.length]=`-${i}`)}),{cleanMode:t,options:r,valid:n}}function G8(e){return e==="f"||e==="n"}function z8(e){return/^-[a-z]$/i.test(e)&&cm.has(e.charAt(1))}function V8(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var sm,om,lm,Su,cm,Jb=V({"src/lib/tasks/clean.ts"(){"use strict";B8(),oe(),it(),sm="Git clean interactive mode is not supported",om='Git clean mode parameter ("n" or "f") is required',lm="Git clean unknown option found in: ",Su=(e=>(e.DRY_RUN="n",e.FORCE="f",e.IGNORED_INCLUDED="x",e.IGNORED_ONLY="X",e.EXCLUDING="e",e.QUIET="q",e.RECURSIVE="d",e))(Su||{}),cm=new Set(["i",...Rb(Object.values(Su))])}});function W8(e){let t=new e_;for(let r of Qb(e))t.addValue(r.file,String(r.key),r.value);return t}function q8(e,t){let r=null,n=[],i=new Map;for(let a of Qb(e,t))a.key===t&&(n.push(r=a.value),i.has(a.file)||i.set(a.file,[]),i.get(a.file).push(r));return{key:t,paths:Array.from(i.keys()),scopes:i,value:r,values:n}}function Y8(e){return e.replace(/^(file):/,"")}function*Qb(e,t=null){let r=e.split("\0");for(let n=0,i=r.length-1;nObject.assign(e,this.values[t]),{})),this._all}addFile(e){if(!(e in this.values)){let t=va(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,r){let n=this.addFile(e);n.hasOwnProperty(t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r,this._all=void 0}}}});function Op(e,t){return typeof e=="string"&&zp.hasOwnProperty(e)?e:t}function Z8(e,t,r,n){let i=["config",`--${n}`];return r&&i.push("--add"),i.push(e,t),{commands:i,format:"utf-8",parser(a){return a}}}function K8(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(n){return q8(n,e)}}}function J8(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return W8(r)}}}function Q8(){return{addConfig(e,t,...r){return this._runTask(Z8(e,t,r[0]===!0,Op(r[1],"local")),et(arguments))},getConfig(e,t){return this._runTask(K8(e,Op(t,void 0)),et(arguments))},listConfig(...e){return this._runTask(J8(Op(e[0],void 0)),et(arguments))}}}var zp,t_=V({"src/lib/tasks/config.ts"(){"use strict";X8(),oe(),zp=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(zp||{})}});function eF(e){return r_.has(e)}var Ip,r_,n_=V({"src/lib/tasks/diff-name-status.ts"(){"use strict";Ip=(e=>(e.ADDED="A",e.COPIED="C",e.DELETED="D",e.MODIFIED="M",e.RENAMED="R",e.CHANGED="T",e.UNMERGED="U",e.UNKNOWN="X",e.BROKEN="B",e))(Ip||{}),r_=new Set(Object.values(Ip))}});function tF(...e){return new a_().param(...e)}function rF(e){let t=new Set,r={};return Jp(e,n=>{let[i,a,s]=n.split(Os);t.add(i),(r[i]=r[i]||[]).push({line:Fe(a),path:i,preview:s})}),{paths:t,results:r}}function nF(){return{grep(e){let t=et(arguments),r=nr(arguments);for(let i of i_)if(r.includes(i))return this._runTask(ir(`git.grep: use of "${i}" is not supported.`),t);typeof e=="string"&&(e=tF().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(i){return rF(i)}},t)}}}var i_,Sl,z2,a_,s_=V({"src/lib/tasks/grep.ts"(){"use strict";oe(),it(),i_=["-h"],Sl=Symbol("grepQuery"),a_=class{constructor(){this[z2]=[]}*[(z2=Sl,Symbol.iterator)](){for(let e of this[Sl])yield e}and(...e){return e.length&&this[Sl].push("--and","(",...kl(e,"-e"),")"),this}param(...e){return this[Sl].push(...kl(e,"-e")),this}}}}),o_={};at(o_,{ResetMode:()=>Eu,getResetMode:()=>aF,resetTask:()=>iF});function iF(e,t){let r=["reset"];return l_(e)&&r.push(`--${e}`),r.push(...t),Wt(r)}function aF(e){if(l_(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function l_(e){return c_.includes(e)}var Eu,c_,u_=V({"src/lib/tasks/reset.ts"(){"use strict";it(),Eu=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(Eu||{}),c_=Array.from(Object.values(Eu))}});function sF(){return(0,Pu.default)("simple-git")}function V2(e,t,r){return!t||!String(t).replace(/\s*/,"")?r?(n,...i)=>{e(n,...i),r(n,...i)}:e:(n,...i)=>{e(`%s ${n}`,t,...i),r&&r(n,...i)}}function oF(e,t,{namespace:r}){if(typeof e=="string")return e;let n=t&&t.namespace||"";return n.startsWith(r)?n.substr(r.length+1):n||r}function um(e,t,r,n=sF()){let i=e&&`[${e}]`||"",a=[],s=typeof t=="string"?n.extend(t):t,o=oF(En(t,Mt),s,n);return c(r);function l(u,f){return Te(a,um(e,o.replace(/^[^:]+/,u),f,n))}function c(u){let f=u&&`[${u}]`||"",d=s&&V2(s,f)||ya,h=V2(n,`${i} ${f}`,d);return Object.assign(s?d:h,{label:e,sibling:l,info:h,step:c})}}var f_=V({"src/lib/git-logger.ts"(){"use strict";oe(),Pu.default.formatters.L=e=>String(rm(e)?e.length:"-"),Pu.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):Ol(e)}}),_u,Vp,lF=V({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";Ai(),f_(),_u=class{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let t=_u.getName(e.commands[0]),r=um(this.logLabel,t);return{task:e,logger:r,name:t}}push(e){let t=this.createProgress(e);return t.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,t),t}fatal(e){for(let[t,{logger:r}]of Array.from(this._queue.entries()))t===e.task?(r.info("Failed %o",e),r("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):r.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(t);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new wr(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task"),t}static getName(e="empty"){return`task:${e}:${++_u.counter}`}},Vp=_u,Vp.counter=0}});function ga(e,t){return{method:kb(e.commands)||"",commands:t}}function cF(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function W2(e,t,r,n){return i=>{r("%s received %L bytes",t,i),n("%B",i),e.push(i)}}var Wp,uF=V({"src/lib/runners/git-executor-chain.ts"(){"use strict";Ai(),it(),oe(),lF(),Wp=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new Vp}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}attemptTask(e){return El(this,null,function*(){let t=yield this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return yield Xb(e)?this.attemptEmptyTask(e,n):this.attemptRemoteTask(e,n)}catch(n){throw this.onFatalException(e,n)}finally{r(),t()}})}onFatalException(e,t){let r=t instanceof wr?Object.assign(t,{task:e}):new wr(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(r),r}attemptRemoteTask(e,t){return El(this,null,function*(){let r=this._plugins.exec("spawn.binary","",ga(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],ga(e,e.commands)),i=yield this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),a=yield this.handleTaskData(e,n,i,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),Yb(e)?Hp(e.parser,a):Hp(e.parser,a.asStrings())})}attemptEmptyTask(e,t){return El(this,null,function*(){return t("empty task bypassing child process to call to task's parser"),e.parser(this)})}handleTaskData(e,t,r,n){let{exitCode:i,rejection:a,stdOut:s,stdErr:o}=r;return new Promise((l,c)=>{n("Preparing to handle process response exitCode=%d stdOut=",i);let{error:u}=this._plugins.exec("task.error",{error:a},$r($r({},ga(e,t)),r));if(u&&e.onError)return n.info("exitCode=%s handling with custom error handler"),e.onError(r,u,f=>{n.info("custom error handler treated as success"),n("custom error returned a %s",Ol(f)),l(new Cl(Array.isArray(f)?Buffer.concat(f):f,Buffer.concat(o)))},c);if(u)return n.info("handling as error: exitCode=%s stdErr=%s rejection=%o",i,o.length,a),c(u);n.info("retrieving task output complete"),l(new Cl(Buffer.concat(s),Buffer.concat(o)))})}gitResponse(e,t,r,n,i){return El(this,null,function*(){let a=i.sibling("output"),s=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},ga(e,e.commands));return new Promise(o=>{let l=[],c=[];i.info("%s %o",t,r),i("%O",s);let u=this._beforeSpawn(e,r);if(u)return o({stdOut:l,stdErr:c,exitCode:9901,rejection:u});this._plugins.exec("spawn.before",void 0,Al($r({},ga(e,r)),{kill(d){u=d||u}}));let f=(0,d_.spawn)(t,r,s);f.stdout.on("data",W2(l,"stdOut",i,a.step("stdOut"))),f.stderr.on("data",W2(c,"stdErr",i,a.step("stdErr"))),f.on("error",cF(c,i)),n&&(i("Passing child process stdOut/stdErr to custom outputHandler"),n(t,f.stdout,f.stderr,[...r])),this._plugins.exec("spawn.after",void 0,Al($r({},ga(e,r)),{spawned:f,close(d,h){o({stdOut:l,stdErr:c,exitCode:d,rejection:u||h})},kill(d){f.killed||(u=d,f.kill("SIGINT"))}}))})})}_beforeSpawn(e,t){let r;return this._plugins.exec("spawn.before",void 0,Al($r({},ga(e,t)),{kill(n){r=n||r}})),r}}}}),h_={};at(h_,{GitExecutor:()=>p_});var p_,fF=V({"src/lib/runners/git-executor.ts"(){"use strict";uF(),p_=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new Wp(this,this._scheduler,this._plugins)}chain(){return new Wp(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function dF(e,t,r=ya){let n=a=>{r(null,a)},i=a=>{(a==null?void 0:a.task)===e&&r(a instanceof Rl?hF(a):a,void 0)};t.then(n,i)}function hF(e){let t=n=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${n} should be GitResponseError.git.${n}, this will no longer be available in version 3`),t=ya};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(r,{}));function r(n,i){return i in e||(n[i]={enumerable:!1,configurable:!1,get(){return t(i),e.git[i]}}),n}}var pF=V({"src/lib/task-callback.ts"(){"use strict";Is(),oe()}});function q2(e,t){return Wb(r=>{if(!Qp(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var mF=V({"src/lib/tasks/change-working-directory.ts"(){"use strict";oe(),it()}});function Fp(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=Fu(t,"-B")),Wt(t)}function gF(){return{checkout(){return this._runTask(Fp(nr(arguments,1)),et(arguments))},checkoutBranch(e,t){return this._runTask(Fp(["-b",e,t,...nr(arguments)]),et(arguments))},checkoutLocalBranch(e){return this._runTask(Fp(["-b",e,...nr(arguments)]),et(arguments))}}}var vF=V({"src/lib/tasks/checkout.ts"(){"use strict";oe(),it()}});function yF(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function wF(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return ar(yF(),[m_],e)}})}}}var m_,bF=V({"src/lib/tasks/count-objects.ts"(){"use strict";oe(),m_=new ce(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=Pb(t);e.hasOwnProperty(n)&&(e[n]=Fe(r))})}});function _F(e){return ar({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},g_,e)}var g_,xF=V({"src/lib/parsers/parse-commit.ts"(){"use strict";oe(),g_=[new ce(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,r,n])=>{e.branch=t,e.commit=n,e.root=!!r}),new ce(/\s*Author:\s(.+)/i,(e,[t])=>{let r=t.split("<"),n=r.pop();!n||!n.includes("@")||(e.author={email:n.substr(0,n.length-1),name:r.join("<").trim()})}),new ce(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(r,10)||0,e.summary.deletions=parseInt(n,10)||0}),new ce(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,r,n])=>{e.summary.changes=parseInt(t,10)||0;let i=parseInt(r,10)||0;n==="-"?e.summary.deletions=i:n==="+"&&(e.summary.insertions=i)})]}});function SF(e,t,r){return{commands:["-c","core.abbrev=40","commit",...kl(e,"-m"),...t,...r],format:"utf-8",parser:_F}}function EF(){return{commit(t,...r){let n=et(arguments),i=e(t)||SF(Sn(t),Sn(En(r[0],Cu,[])),[...En(r[1],Il,[]),...nr(arguments,0,!0)]);return this._runTask(i,n)}};function e(t){return!Cu(t)&&ir("git.commit: requires the commit message to be supplied as a string/string[]")}}var AF=V({"src/lib/tasks/commit.ts"(){"use strict";xF(),oe(),it()}});function kF(){return{firstCommit(){return this._runTask(Wt(["rev-list","--max-parents=0","HEAD"],!0),et(arguments))}}}var TF=V({"src/lib/tasks/first-commit.ts"(){"use strict";oe(),it()}});function CF(e,t){let r=["hash-object",e];return t&&r.push("-w"),Wt(r,!0)}var PF=V({"src/lib/tasks/hash-object.ts"(){"use strict";it()}});function RF(e,t,r){let n=String(r).trim(),i;if(i=v_.exec(n))return new Au(e,t,!1,i[1]);if(i=y_.exec(n))return new Au(e,t,!0,i[1]);let a="",s=n.split(" ");for(;s.length;)if(s.shift()==="in"){a=s.join(" ");break}return new Au(e,t,/^re/i.test(n),a)}var Au,v_,y_,MF=V({"src/lib/responses/InitSummary.ts"(){"use strict";Au=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},v_=/^Init.+ repository in (.+)$/,y_=/^Rein.+ in (.+)$/}});function OF(e){return e.includes(fm)}function IF(e=!1,t,r){let n=["init",...r];return e&&!OF(n)&&n.splice(1,0,fm),{commands:n,format:"utf-8",parser(i){return RF(n.includes("--bare"),t,i)}}}var fm,FF=V({"src/lib/tasks/init.ts"(){"use strict";MF(),fm="--bare"}});function dm(e){for(let t=0;tar(new w_,t,r,!1)}var $p,Y2,X2,Z2,__,x_=V({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";Fl(),LF(),n_(),oe(),$p=[new ce(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,r,n=""])=>{e.files.push({file:t.trim(),changes:Fe(r),insertions:n.replace(/[^+]/g,"").length,deletions:n.replace(/[^-]/g,"").length,binary:!1})}),new ce(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,r,n])=>{e.files.push({file:t.trim(),before:Fe(r),after:Fe(n),binary:!0})}),new ce(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,r])=>{let n=/(\d+) i/.exec(r),i=/(\d+) d/.exec(r);e.changed=Fe(t),e.insertions=Fe(n==null?void 0:n[1]),e.deletions=Fe(i==null?void 0:i[1])})],Y2=[new ce(/(\d+)\t(\d+)\t(.+)$/,(e,[t,r,n])=>{let i=Fe(t),a=Fe(r);e.changed++,e.insertions+=i,e.deletions+=a,e.files.push({file:n,changes:i+a,insertions:i,deletions:a,binary:!1})}),new ce(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],X2=[new ce(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],Z2=[new ce(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,r,n,i,a])=>{e.changed++,e.files.push({file:a!=null?a:n,changes:0,insertions:0,deletions:0,binary:!1,status:Bp(eF(t)&&t),from:Bp(!!a&&n!==a&&n),similarity:Fe(r)})})],__={"":$p,"--stat":$p,"--numstat":Y2,"--name-status":Z2,"--name-only":X2}}});function DF(e,t){return t.reduce((r,n,i)=>(r[n]=e[i]||"",r),Object.create({diff:null}))}function S_(e=gm,t=E_,r=""){let n=b_(r);return function(i){let a=Ml(i.trim(),!1,pm).map(function(s){let o=s.split(mm),l=DF(o[0].split(e),t);return o.length>1&&o[1].trim()&&(l.diff=n(o[1])),l});return{all:a,latest:a.length&&a[0]||null,total:a.length}}}var pm,mm,gm,E_,A_=V({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";oe(),x_(),Fl(),pm="\xF2\xF2\xF2\xF2\xF2\xF2 ",mm=" \xF2\xF2",gm=" \xF2 ",E_=["hash","date","message","refs","author_name","author_email"]}}),k_={};at(k_,{diffSummaryTask:()=>NF,validateLogFormatConfig:()=>Nu});function NF(e){let t=dm(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Nu(r)||{commands:r,format:"utf-8",parser:b_(t)}}function Nu(e){let t=e.filter($F);if(t.length>1)return ir(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return ir(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var vm=V({"src/lib/tasks/diff.ts"(){"use strict";Fl(),x_(),it()}});function BF(e,t){let r=[],n=[];return Object.keys(e).forEach(i=>{r.push(i),n.push(String(e[i]))}),[r,n.join(t)]}function jF(e){return Object.keys(e).reduce((t,r)=>(r in qp||(t[r]=e[r]),t),{})}function T_(e={},t=[]){let r=En(e.splitter,Mt,gm),n=!em(e.format)&&e.format?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[i,a]=BF(n,r),s=[],o=[`--pretty=format:${pm}${a}${mm}`,...t],l=e.n||e["max-count"]||e.maxCount;if(l&&o.push(`--max-count=${l}`),e.from||e.to){let c=e.symmetric!==!1?"...":"..";s.push(`${e.from||""}${c}${e.to||""}`)}return Mt(e.file)&&o.push("--follow",C8(e.file)),nm(jF(e),o),{fields:i,splitter:r,commands:[...o,...s]}}function HF(e,t,r){let n=S_(e,t,dm(r));return{commands:["log",...r],format:"utf-8",parser:n}}function UF(){return{log(...r){let n=et(arguments),i=T_(im(arguments),En(arguments[0],Il)),a=t(...r)||Nu(i.commands)||e(i);return this._runTask(a,n)}};function e(r){return HF(r.splitter,r.fields,r.commands)}function t(r,n){return Mt(r)&&Mt(n)&&ir("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var qp,C_=V({"src/lib/tasks/log.ts"(){"use strict";Fl(),Pl(),A_(),oe(),it(),vm(),qp=(e=>(e[e["--pretty"]=0]="--pretty",e[e["max-count"]=1]="max-count",e[e.maxCount=2]="maxCount",e[e.n=3]="n",e[e.file=4]="file",e[e.format=5]="format",e[e.from=6]="from",e[e.to=7]="to",e[e.splitter=8]="splitter",e[e.symmetric=9]="symmetric",e[e.mailMap=10]="mailMap",e[e.multiLine=11]="multiLine",e[e.strictDate=12]="strictDate",e))(qp||{})}}),ku,P_,GF=V({"src/lib/responses/MergeSummary.ts"(){"use strict";ku=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},P_=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),Yp,R_,zF=V({"src/lib/responses/PullSummary.ts"(){"use strict";Yp=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},R_=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function Lp(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function K2(e){let t=/^\s*(\d+)/.exec(e),r=/delta (\d+)/i.exec(e);return{count:Fe(t&&t[1]||"0"),delta:Fe(r&&r[1]||"0")}}var M_,VF=V({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";oe(),M_=[new Ei(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),i=Lp(e.remoteMessages);Object.assign(i,{[n]:Fe(r)})}),new Ei(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),i=Lp(e.remoteMessages);Object.assign(i,{[n]:Fe(r)})}),new Ei(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let i=Lp(e.remoteMessages);i.total=K2(t),i.reused=K2(r),i.packReused=Fe(n)})]}});function O_(e,t){return ar({remoteMessages:new F_},I_,t)}var I_,F_,$_=V({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";oe(),VF(),I_=[new Ei(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...M_,new Ei([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new Ei([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,r,n])=>{e.remoteMessages.vulnerabilities={count:Fe(t),summary:r,url:n}})],F_=class{constructor(){this.all=[]}}}});function WF(e,t){let r=ar(new R_,L_,[e,t]);return r.message&&r}var J2,Q2,eb,tb,L_,rb,ym,D_=V({"src/lib/parsers/parse-pull.ts"(){"use strict";zF(),oe(),$_(),J2=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,Q2=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,eb=/^(create|delete) mode \d+ (.+)/,tb=[new ce(J2,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new ce(Q2,(e,[t,,r,,n])=>r!==void 0||n!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+r||0,e.summary.deletions=+n||0,!0):!1),new ce(eb,(e,[t,r])=>{Te(e.files,r),Te(t==="create"?e.created:e.deleted,r)})],L_=[new ce(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new ce(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new ce(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,n,i])=>{e.branch.local=n,e.hash.local=t,e.branch.remote=i,e.hash.remote=r})],rb=(e,t)=>ar(new Yp,tb,[e,t]),ym=(e,t)=>Object.assign(new Yp,rb(e,t),O_(e,t))}}),nb,N_,ib,qF=V({"src/lib/parsers/parse-merge.ts"(){"use strict";GF(),oe(),D_(),nb=[new ce(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new ce(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,r])=>{e.conflicts.push(new ku(t,r))}),new ce(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new ku(t,r,{deleteRef:n}))}),new ce(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new ku(t,null))}),new ce(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],N_=(e,t)=>Object.assign(ib(e,t),ym(e,t)),ib=e=>ar(new P_,nb,e)}});function ab(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=N_(t,r);if(n.failed)throw new Rl(n);return n}}:ir("Git.merge requires at least one option")}var YF=V({"src/lib/tasks/merge.ts"(){"use strict";Is(),qF(),it()}});function XF(e,t,r){let n=r.includes("deleted"),i=r.includes("tag")||/^refs\/tags/.test(e),a=!r.includes("new");return{deleted:n,tag:i,branch:!i,new:!a,alreadyUpdated:a,local:e,remote:t}}var sb,B_,ob,ZF=V({"src/lib/parsers/parse-push.ts"(){"use strict";oe(),$_(),sb=[new ce(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new ce(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref=Al($r({},e.ref||{}),{local:t})}),new ce(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(XF(t,r,n))}),new ce(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch=Al($r({},e.branch||{}),{local:t,remote:r,remoteName:n})}),new ce(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,n,i])=>{e.update={head:{local:t,remote:r},hash:{from:n,to:i}}})],B_=(e,t)=>{let r=ob(e,t),n=O_(e,t);return $r($r({},r),n)},ob=(e,t)=>ar({pushed:[]},sb,[e,t])}}),j_={};at(j_,{pushTagsTask:()=>KF,pushTask:()=>wm});function KF(e={},t){return Te(t,"--tags"),wm(e,t)}function wm(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),Fu(r,"-v"),Te(r,"--verbose"),Te(r,"--porcelain"),{commands:r,format:"utf-8",parser:B_}}var H_=V({"src/lib/tasks/push.ts"(){"use strict";ZF(),oe()}});function JF(){return{showBuffer(){let e=["show",...nr(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(qb(e),et(arguments))},show(){let e=["show",...nr(arguments,1)];return this._runTask(Wt(e),et(arguments))}}}var QF=V({"src/lib/tasks/show.ts"(){"use strict";oe(),it()}}),lb,U_,e4=V({"src/lib/responses/FileStatusSummary.ts"(){"use strict";lb=/^(.+)\0(.+)$/,U_=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=lb.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function cb(e){let[t,r]=e.split(Os);return{from:r||t,to:t}}function yr(e,t,r){return[`${e}${t}`,r]}function Dp(e,...t){return t.map(r=>yr(e,r,(n,i)=>Te(n.conflicted,i)))}function t4(e,t){let r=t.trim();switch(" "){case r.charAt(2):return n(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return n(" ",r.charAt(0),r.substr(2));default:return}function n(i,a,s){let o=`${i}${a}`,l=G_.get(o);l&&l(e,s),o!=="##"&&o!=="!!"&&e.files.push(new U_(s,i,a))}}var ub,G_,z_,r4=V({"src/lib/responses/StatusSummary.ts"(){"use strict";oe(),e4(),ub=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},G_=new Map([yr(" ","A",(e,t)=>Te(e.created,t)),yr(" ","D",(e,t)=>Te(e.deleted,t)),yr(" ","M",(e,t)=>Te(e.modified,t)),yr("A"," ",(e,t)=>Te(e.created,t)&&Te(e.staged,t)),yr("A","M",(e,t)=>Te(e.created,t)&&Te(e.staged,t)&&Te(e.modified,t)),yr("D"," ",(e,t)=>Te(e.deleted,t)&&Te(e.staged,t)),yr("M"," ",(e,t)=>Te(e.modified,t)&&Te(e.staged,t)),yr("M","M",(e,t)=>Te(e.modified,t)&&Te(e.staged,t)),yr("R"," ",(e,t)=>{Te(e.renamed,cb(t))}),yr("R","M",(e,t)=>{let r=cb(t);Te(e.renamed,r),Te(e.modified,r.to)}),yr("!","!",(e,t)=>{Te(e.ignored=e.ignored||[],t)}),yr("?","?",(e,t)=>Te(e.not_added,t)),...Dp("A","A","U"),...Dp("D","D","U"),...Dp("U","A","D","U"),["##",(e,t)=>{let r=/ahead (\d+)/,n=/behind (\d+)/,i=/^(.+?(?=(?:\.{3}|\s|$)))/,a=/\.{3}(\S*)/,s=/\son\s([\S]+)$/,o;o=r.exec(t),e.ahead=o&&+o[1]||0,o=n.exec(t),e.behind=o&&+o[1]||0,o=i.exec(t),e.current=o&&o[1],o=a.exec(t),e.tracking=o&&o[1],o=s.exec(t),e.current=o&&o[1]||e.current,e.detached=/\(no branch\)/.test(t)}]]),z_=function(e){let t=e.split(Os),r=new ub;for(let n=0,i=t.length;n!V_.includes(r))],parser(r){return z_(r)}}}var V_,i4=V({"src/lib/tasks/status.ts"(){"use strict";r4(),V_=["--null","-z"]}});function Ru(e=0,t=0,r=0,n="",i=!0){return Object.defineProperty({major:e,minor:t,patch:r,agent:n,installed:i},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function a4(){return Ru(0,0,0,"",!1)}function s4(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:o4,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(bm));n(t)}})}}}function o4(e){return e===bm?a4():ar(Ru(0,0,0,e),W_,e)}var bm,W_,l4=V({"src/lib/tasks/version.ts"(){"use strict";oe(),bm="installed=false",W_=[new ce(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,i=""])=>{Object.assign(e,Ru(Fe(t),Fe(r),Fe(n),i))}),new ce(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,i=""])=>{Object.assign(e,Ru(Fe(t),Fe(r),n,i))})]}}),q_={};at(q_,{SimpleGitApi:()=>Xp});var Xp,c4=V({"src/lib/simple-git-api.ts"(){"use strict";pF(),mF(),vF(),bF(),AF(),t_(),TF(),s_(),PF(),FF(),C_(),YF(),H_(),QF(),i4(),it(),l4(),oe(),Xp=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&dF(e,n,t),Object.create(this,{then:{value:n.then.bind(n)},catch:{value:n.catch.bind(n)},_executor:{value:r}})}add(e){return this._runTask(Wt(["add",...Sn(e)]),et(arguments))}cwd(e){let t=et(arguments);return typeof e=="string"?this._runTask(q2(e,this._executor),t):typeof(e==null?void 0:e.path)=="string"?this._runTask(q2(e.path,e.root&&this._executor||void 0),t):this._runTask(ir("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(CF(e,t===!0),et(arguments))}init(e){return this._runTask(IF(e===!0,this._executor.cwd,nr(arguments)),et(arguments))}merge(){return this._runTask(ab(nr(arguments)),et(arguments))}mergeFromTo(e,t){return Mt(e)&&Mt(t)?this._runTask(ab([e,t,...nr(arguments)]),et(arguments,!1)):this._runTask(ir("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=wm({remote:En(arguments[0],Mt),branch:En(arguments[1],Mt)},nr(arguments));return this._runTask(e,et(arguments))}stash(){return this._runTask(Wt(["stash",...nr(arguments)]),et(arguments))}status(){return this._runTask(n4(nr(arguments)),et(arguments))}},Object.assign(Xp.prototype,gF(),EF(),Q8(),wF(),kF(),nF(),UF(),JF(),s4())}}),Y_={};at(Y_,{Scheduler:()=>Z_});var fb,Z_,u4=V({"src/lib/runners/scheduler.ts"(){"use strict";oe(),f_(),fb=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,X_.createDeferred)();return{promise:t,done:r,id:e}}})(),Z_=class{constructor(e=2){this.concurrency=e,this.logger=um("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let e=Te(this.running,this.pending.shift());this.logger("Attempting id=%s",e.id),e.done(()=>{this.logger("Completing id=",e.id),Fu(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=Te(this.pending,fb());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),K_={};at(K_,{applyPatchTask:()=>f4});function f4(e,t){return Wt(["apply",...t,...e])}var d4=V({"src/lib/tasks/apply-patch.ts"(){"use strict";it()}});function h4(e,t){return{branch:e,hash:t,success:!0}}function p4(e){return{branch:e,hash:null,success:!1}}var J_,m4=V({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";J_=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function Q_(e,t){return t===1&&Zp.test(e)}var db,Zp,hb,Bu,g4=V({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";m4(),oe(),db=/(\S+)\s+\(\S+\s([^)]+)\)/,Zp=/^error[^']+'([^']+)'/m,hb=[new ce(db,(e,[t,r])=>{let n=h4(t,r);e.all.push(n),e.branches[t]=n}),new ce(Zp,(e,[t])=>{let r=p4(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],Bu=(e,t)=>ar(new J_,hb,[e,t])}}),ex,v4=V({"src/lib/responses/BranchSummary.ts"(){"use strict";ex=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(e,t,r,n,i){e==="*"&&(this.detached=t,this.current=r),this.all.push(r),this.branches[r]={current:e==="*",linkedWorkTree:e==="+",name:r,commit:n,label:i}}}}});function pb(e){return e?e.charAt(0):""}function tx(e){return ar(new ex,rx,e)}var rx,y4=V({"src/lib/parsers/parse-branch.ts"(){"use strict";v4(),oe(),rx=[new ce(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,i])=>{e.push(pb(t),!0,r,n,i)}),new ce(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(e,[t,r,n,i])=>{e.push(pb(t),!1,r,n,i)})]}}),nx={};at(nx,{branchLocalTask:()=>b4,branchTask:()=>w4,containsDeleteBranchCommand:()=>ix,deleteBranchTask:()=>x4,deleteBranchesTask:()=>_4});function ix(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function w4(e){let t=ix(e),r=["branch",...e];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(n,i){return t?Bu(n,i).all[0]:tx(n)}}}function b4(){return{format:"utf-8",commands:["branch","-v"],parser:tx}}function _4(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return Bu(r,n)},onError({exitCode:r,stdOut:n},i,a,s){if(!Q_(String(i),r))return s(i);a(n)}}}function x4(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,i){return Bu(n,i).branches[e]},onError({exitCode:n,stdErr:i,stdOut:a},s,o,l){if(!Q_(String(s),n))return l(s);throw new Rl(r.parser(Tl(a),Tl(i)),String(s))}};return r}var S4=V({"src/lib/tasks/branch.ts"(){"use strict";Is(),g4(),y4(),oe()}}),ax,E4=V({"src/lib/responses/CheckIgnore.ts"(){"use strict";ax=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),sx={};at(sx,{checkIgnoreTask:()=>A4});function A4(e){return{commands:["check-ignore",...e],format:"utf-8",parser:ax}}var k4=V({"src/lib/tasks/check-ignore.ts"(){"use strict";E4()}}),ox={};at(ox,{cloneMirrorTask:()=>C4,cloneTask:()=>lx});function T4(e){return/^--upload-pack(=|$)/.test(e)}function lx(e,t,r){let n=["clone",...r];return Mt(e)&&n.push(e),Mt(t)&&n.push(t),n.find(T4)?ir("git.fetch: potential exploit argument blocked."):Wt(n)}function C4(e,t,r){return Te(r,"--mirror"),lx(e,t,r)}var P4=V({"src/lib/tasks/clone.ts"(){"use strict";it(),oe()}});function R4(e,t){return ar({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},cx,[e,t])}var cx,M4=V({"src/lib/parsers/parse-fetch.ts"(){"use strict";oe(),cx=[new ce(/From (.+)$/,(e,[t])=>{e.remote=t}),new ce(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.branches.push({name:t,tracking:r})}),new ce(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,r])=>{e.tags.push({name:t,tracking:r})}),new ce(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new ce(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,r,n,i])=>{e.updated.push({name:n,tracking:i,to:r,from:t})})]}}),ux={};at(ux,{fetchTask:()=>I4});function O4(e){return/^--upload-pack(=|$)/.test(e)}function I4(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find(O4)?ir("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:R4}}var F4=V({"src/lib/tasks/fetch.ts"(){"use strict";M4(),it()}});function $4(e){return ar({moves:[]},fx,e)}var fx,L4=V({"src/lib/parsers/parse-move.ts"(){"use strict";oe(),fx=[new ce(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),dx={};at(dx,{moveTask:()=>D4});function D4(e,t){return{commands:["mv","-v",...Sn(e),t],format:"utf-8",parser:$4}}var N4=V({"src/lib/tasks/move.ts"(){"use strict";L4(),oe()}}),hx={};at(hx,{pullTask:()=>B4});function B4(e,t,r){let n=["pull",...r];return e&&t&&n.splice(1,0,e,t),{commands:n,format:"utf-8",parser(i,a){return ym(i,a)},onError(i,a,s,o){let l=WF(Tl(i.stdOut),Tl(i.stdErr));if(l)return o(new Rl(l));o(a)}}}var j4=V({"src/lib/tasks/pull.ts"(){"use strict";Is(),D_(),oe()}});function H4(e){let t={};return px(e,([r])=>t[r]={name:r}),Object.values(t)}function U4(e){let t={};return px(e,([r,n,i])=>{t.hasOwnProperty(r)||(t[r]={name:r,refs:{fetch:"",push:""}}),i&&n&&(t[r].refs[i.replace(/[^a-z]/g,"")]=n)}),Object.values(t)}function px(e,t){Jp(e,r=>t(r.split(/\s+/)))}var G4=V({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";oe()}}),mx={};at(mx,{addRemoteTask:()=>z4,getRemotesTask:()=>V4,listRemotesTask:()=>W4,remoteTask:()=>q4,removeRemoteTask:()=>Y4});function z4(e,t,r){return Wt(["remote","add",...r,e,t])}function V4(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?U4:H4}}function W4(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),Wt(t)}function q4(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),Wt(t)}function Y4(e){return Wt(["remote","remove",e])}var X4=V({"src/lib/tasks/remote.ts"(){"use strict";G4(),it()}}),gx={};at(gx,{stashListTask:()=>Z4});function Z4(e={},t){let r=T_(e),n=["stash","list",...r.commands,...t],i=S_(r.splitter,r.fields,dm(n));return Nu(n)||{commands:n,format:"utf-8",parser:i}}var K4=V({"src/lib/tasks/stash-list.ts"(){"use strict";Fl(),A_(),vm(),C_()}}),vx={};at(vx,{addSubModuleTask:()=>J4,initSubModuleTask:()=>Q4,subModuleTask:()=>ju,updateSubModuleTask:()=>e$});function J4(e,t){return ju(["add",e,t])}function Q4(e){return ju(["init",...e])}function ju(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),Wt(t)}function e$(e){return ju(["update",...e])}var t$=V({"src/lib/tasks/sub-module.ts"(){"use strict";it()}});function r$(e,t){let r=isNaN(e),n=isNaN(t);return r!==n?r?1:-1:r?yx(e,t):0}function yx(e,t){return e===t?0:e>t?1:-1}function n$(e){return e.trim()}function xu(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var mb,wx,i$=V({"src/lib/responses/TagList.ts"(){"use strict";mb=class{constructor(e,t){this.all=e,this.latest=t}},wx=function(e,t=!1){let r=e.split(` +`).map(n$).filter(Boolean);t||r.sort(function(i,a){let s=i.split("."),o=a.split(".");if(s.length===1||o.length===1)return r$(xu(s[0]),xu(o[0]));for(let l=0,c=Math.max(s.length,o.length);li.indexOf(".")>=0);return new mb(r,n)}}}),bx={};at(bx,{addAnnotatedTagTask:()=>o$,addTagTask:()=>s$,tagListTask:()=>a$});function a$(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return wx(r,t)}}}function s$(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function o$(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var l$=V({"src/lib/tasks/tag.ts"(){"use strict";i$()}}),c$=k8({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(fF(),Qe(h_)),{SimpleGitApi:n}=(c4(),Qe(q_)),{Scheduler:i}=(u4(),Qe(Y_)),{configurationErrorTask:a}=(it(),Qe(Gp)),{asArray:s,filterArray:o,filterPrimitives:l,filterString:c,filterStringOrStringArray:u,filterType:f,getTrailingOptions:d,trailingFunctionArgument:h,trailingOptionsArgument:p}=(oe(),Qe(Db)),{applyPatchTask:m}=(d4(),Qe(K_)),{branchTask:v,branchLocalTask:y,deleteBranchesTask:b,deleteBranchTask:x}=(S4(),Qe(nx)),{checkIgnoreTask:E}=(k4(),Qe(sx)),{checkIsRepoTask:_}=(Hb(),Qe(Nb)),{cloneTask:k,cloneMirrorTask:w}=(P4(),Qe(ox)),{cleanWithOptionsTask:A,isCleanOptionsArray:S}=(Jb(),Qe(Zb)),{diffSummaryTask:T}=(vm(),Qe(k_)),{fetchTask:P}=(F4(),Qe(ux)),{moveTask:I}=(N4(),Qe(dx)),{pullTask:N}=(j4(),Qe(hx)),{pushTagsTask:L}=(H_(),Qe(j_)),{addRemoteTask:ee,getRemotesTask:fe,listRemotesTask:J,remoteTask:Q,removeRemoteTask:Pe}=(X4(),Qe(mx)),{getResetMode:ge,resetTask:z}=(u_(),Qe(o_)),{stashListTask:Y}=(K4(),Qe(gx)),{addSubModuleTask:O,initSubModuleTask:he,subModuleTask:Ge,updateSubModuleTask:gt}=(t$(),Qe(vx)),{addAnnotatedTagTask:Re,addTagTask:ct,tagListTask:rt}=(l$(),Qe(bx)),{straightThroughBufferTask:Et,straightThroughStringTask:Ie}=(it(),Qe(Gp));function H(D,q){this._plugins=q,this._executor=new r(D.baseDir,new i(D.maxConcurrentProcesses),q),this._trimmed=D.trimmed}(H.prototype=Object.create(n.prototype)).constructor=H,H.prototype.customBinary=function(D){return this._plugins.reconfigure("binary",D),this},H.prototype.env=function(D,q){return arguments.length===1&&typeof D=="object"?this._executor.env=D:(this._executor.env=this._executor.env||{})[D]=q,this},H.prototype.stashList=function(D){return this._runTask(Y(p(arguments)||{},o(D)&&D||[]),h(arguments))};function Je(D,q,ve,Ne){return typeof ve!="string"?a(`git.${D}() requires a string 'repoPath'`):q(ve,f(Ne,c),d(arguments))}H.prototype.clone=function(){return this._runTask(Je("clone",k,...arguments),h(arguments))},H.prototype.mirror=function(){return this._runTask(Je("mirror",w,...arguments),h(arguments))},H.prototype.mv=function(D,q){return this._runTask(I(D,q),h(arguments))},H.prototype.checkoutLatestTag=function(D){var q=this;return this.pull(function(){q.tags(function(ve,Ne){q.checkout(Ne.latest,D)})})},H.prototype.pull=function(D,q,ve,Ne){return this._runTask(N(f(D,c),f(q,c),d(arguments)),h(arguments))},H.prototype.fetch=function(D,q){return this._runTask(P(f(D,c),f(q,c),d(arguments)),h(arguments))},H.prototype.silent=function(D){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},H.prototype.tags=function(D,q){return this._runTask(rt(d(arguments)),h(arguments))},H.prototype.rebase=function(){return this._runTask(Ie(["rebase",...d(arguments)]),h(arguments))},H.prototype.reset=function(D){return this._runTask(z(ge(D),d(arguments)),h(arguments))},H.prototype.revert=function(D){let q=h(arguments);return typeof D!="string"?this._runTask(a("Commit must be a string"),q):this._runTask(Ie(["revert",...d(arguments,0,!0),D]),q)},H.prototype.addTag=function(D){let q=typeof D=="string"?ct(D):a("Git.addTag requires a tag name");return this._runTask(q,h(arguments))},H.prototype.addAnnotatedTag=function(D,q){return this._runTask(Re(D,q),h(arguments))},H.prototype.deleteLocalBranch=function(D,q,ve){return this._runTask(x(D,typeof q=="boolean"?q:!1),h(arguments))},H.prototype.deleteLocalBranches=function(D,q,ve){return this._runTask(b(D,typeof q=="boolean"?q:!1),h(arguments))},H.prototype.branch=function(D,q){return this._runTask(v(d(arguments)),h(arguments))},H.prototype.branchLocal=function(D){return this._runTask(y(),h(arguments))},H.prototype.raw=function(D){let q=!Array.isArray(D),ve=[].slice.call(q?arguments:D,0);for(let bt=0;bte.removeEventListener("abort",a))}}]:void 0}function d$(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function h$(e,t){if(d$(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new qn(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function p$(e,t){if(/^\s*--(upload|receive)-pack/.test(e))throw new qn(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(t==="clone"&&/^\s*-u\b/.test(e))throw new qn(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(t==="push"&&/^\s*--exec\b/.test(e))throw new qn(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function m$({allowUnsafeProtocolOverride:e=!1,allowUnsafePack:t=!1}={}){return{type:"spawn.args",action(r,n){return r.forEach((i,a)=>{let s=aNp(i))).then(s.done)}return{type:"spawn.after",action(i,a){return El(this,arguments,function*(s,{spawned:o,close:l}){var c,u;let f=r(),d=!0,h=()=>void(d=!1);(c=o.stdout)==null||c.on("data",h),(u=o.stderr)==null||u.on("data",h),o.on("error",h),o.on("close",p=>f.close(p)),o.on("exit",p=>f.exit(p));try{yield f.result,d&&(yield Np(50)),l(f.exitCode)}catch(p){l(f.exitCode,p)}})}}}oe();var y$="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",vb="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function w$(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function yb(e,t){if(e.length<1||e.length>2)throw new qn(void 0,"binary",y$);if(e.some(w$))if(t)console.warn(vb);else throw new qn(void 0,"binary",vb);let[n,i]=e;return{binary:n,prefix:i}}function b$(e,t=["git"],r=!1){let n=yb(Sn(t),r);e.on("binary",i=>{n=yb(Sn(i),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",i=>n.prefix?[n.prefix,...i]:i)}Ai();function _$(e){return!!(e.exitCode&&e.stdErr.length)}function x$(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function S$(e=!1,t=_$,r=x$){return(n,i)=>!e&&n||!t(i)?n:r(i)}function wb(e){return{type:"task.error",action(t,r){let n=e(t.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(n)?{error:new wr(void 0,n.toString("utf-8"))}:{error:n}}}}oe();var E$=class{constructor(){this.plugins=new Set,this.events=new _x.EventEmitter}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let r=Te(this.plugins,{type:e,action:t});return()=>this.plugins.delete(r)}add(e){let t=[];return Sn(e).forEach(r=>r&&this.plugins.add(Te(t,r))),()=>{t.forEach(r=>this.plugins.delete(r))}}exec(e,t,r){let n=t,i=Object.freeze(Object.create(r));for(let a of this.plugins)a.type===e&&(n=a.action(n,i));return n}};oe();function A$(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(a,s){return r.includes(s.method)?Cb(a,t):a}},{type:"spawn.after",action(a,s){var o;s.commands.includes(t)&&((o=s.spawned.stderr)==null||o.on("data",l=>{let c=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(l.toString("utf8"));c&&e({method:s.method,stage:k$(c[1]),progress:Fe(c[2]),processed:Fe(c[3]),total:Fe(c[4])})}))}}]}function k$(e){return String(e.toLowerCase().split(" ",1))||"unknown"}oe();function T$(e){let t=Mb(e,["uid","gid"]);return{type:"spawn.options",action(r){return $r($r({},t),r)}}}function C$({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,i){var a,s;let o;function l(){o&&clearTimeout(o),o=setTimeout(u,e)}function c(){var f,d;(f=i.spawned.stdout)==null||f.off("data",l),(d=i.spawned.stderr)==null||d.off("data",l),i.spawned.off("exit",c),i.spawned.off("close",c),o&&clearTimeout(o)}function u(){c(),i.kill(new qn(void 0,"timeout","block timeout reached"))}r&&((a=i.spawned.stdout)==null||a.on("data",l)),t&&((s=i.spawned.stderr)==null||s.on("data",l)),i.spawned.on("exit",c),i.spawned.on("close",c),l()}}}Pl();function P$(){return{type:"spawn.args",action(e){let t=[],r;function n(i){(r=r||[]).push(...i)}for(let i=0;iTu(s)&&G2(s)||s));break}t.push(a)}return r?[...t,"--",...r.map(String)]:t}}}oe();var R$=c$();function M$(e,t){var r;let n=new E$,i=$b(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!Qp(i.baseDir))throw new u$(i,"Cannot use simple-git on a directory that does not exist");return Array.isArray(i.config)&&n.add(g$(i.config)),n.add(m$(i.unsafe)),n.add(P$()),n.add(v$(i.completion)),i.abort&&n.add(f$(i.abort)),i.progress&&n.add(A$(i.progress)),i.timeout&&n.add(C$(i.timeout)),i.spawnOptions&&n.add(T$(i.spawnOptions)),n.add(wb(S$(!0))),i.errors&&n.add(wb(i.errors)),b$(n,i.binary,(r=i.unsafe)==null?void 0:r.allowUnsafeCustomBinary),new R$(i,n)}Is();var xx=M$;g();var Sx=require("obsidian"),Hu="YYYY-MM-DD",_m=`${Hu} HH:mm`,xm=`${Hu} HH:mm:ss`,Uu=40,Fs="conflict-files-obsidian-git.md",Ye={commitMessage:"vault backup: {{date}}",autoCommitMessage:"vault backup: {{date}}",commitDateFormat:xm,autoSaveInterval:0,autoPushInterval:0,autoPullInterval:0,autoPullOnBoot:!1,disablePush:!1,pullBeforePush:!0,disablePopups:!1,showErrorNotices:!0,disablePopupsForNoChanges:!1,listChangedFilesInMessageBody:!1,showStatusBar:!0,updateSubmodules:!1,syncMethod:"merge",customMessageOnAutoBackup:!1,autoBackupAfterFileChange:!1,treeStructure:!1,refreshSourceControl:Sx.Platform.isDesktopApp,basePath:"",differentIntervalCommitAndPush:!1,changedFilesInStatusBar:!1,showedMobileNotice:!1,refreshSourceControlTimer:7e3,showBranchStatusBar:!0,setLastSaveToLastCommit:!1,submoduleRecurseCheckout:!1,gitDir:"",showFileMenu:!0,authorInHistoryView:"hide",dateInHistoryView:!1,diffStyle:"split",lineAuthor:{show:!1,followMovement:"inactive",authorDisplay:"initials",showCommitHash:!1,dateTimeFormatOptions:"date",dateTimeFormatCustomString:_m,dateTimeTimezone:"viewer-local",coloringMaxAge:"1y",colorNew:{r:255,g:150,b:150},colorOld:{r:120,g:160,b:255},textColorCss:"var(--text-muted)",ignoreWhitespace:!1,gutterSpacingFallbackLength:5}},kt={type:"git-view",name:"Source Control",icon:"git-pull-request"},Lr={type:"git-history-view",name:"History",icon:"history"},ki={type:"split-diff-view",name:"Diff view",icon:"diff"},Ti={type:"diff-view",name:"Diff View",icon:"git-pull-request"},Gu="C:\\Program Files\\Git\\cmd\\git.exe",zu="git_credentials_input",wa="obsidian_askpass.sh",Ex=`#!/bin/sh PROMPT="$1" TEMP_FILE="$OBSIDIAN_GIT_CREDENTIALS_INPUT" @@ -124,46 +124,48 @@ done RESPONSE=$(cat "$TEMP_FILE.response") echo "$RESPONSE" -`,xx=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];g();var Sx=require("obsidian"),C$={options:[],placeholder:"",allowEmpty:!1,onlySelection:!1,initialValue:void 0},Fe=class extends Sx.SuggestModal{constructor(t,r){super(t.app),this.config={...C$,...r},this.setPlaceholder(this.config.placeholder)}openAndGetResult(){return new Promise(t=>{this.resolve=t,this.open(),this.config.initialValue!=null&&(this.inputEl.value=this.config.initialValue,this.inputEl.dispatchEvent(new Event("input")))})}onClose(){new Promise(t=>setTimeout(t,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(t){return this.config.onlySelection?this.config.options:this.config.allowEmpty?[t.length>0?t:" ",...this.config.options]:[t.length>0?t:"...",...this.config.options]}renderSuggestion(t,r){r.setText(t)}onChooseSuggestion(t,r){if(this.resolve){let n;this.config.allowEmpty&&t===" "?n="":t==="..."?n=void 0:n=t,this.resolve(n)}}};g();function Ex(e,t){let r=Object.assign({},e.lineAuthor,t.lineAuthor);return Object.assign({},e,t,{lineAuthor:r})}var Is=class extends Error{constructor(r){super("No network connection available");this.originalError=r}};g();var sT=ze(Ux()),oT=ze(aT()),ba=require("obsidian");var Ug=(e,t)=>e==="."||t==null||t.length===0||t==="."?!0:t.length>=e.length?t.startsWith(e):e.startsWith(t);function rn(e,t){let r;if(t){if(t.button===0||t.button===1){let n=ba.Keymap.isModEvent(t);r=e.workspace.getLeaf(n)}}else r=e.workspace.getLeaf(!1);return r}function kn(e,t,r,n,i){if(t.button==2){let a=e.vault.getAbstractFileByPath(r);if(a!=null){let s=new ba.Menu;e.workspace.trigger("file-menu",s,a,i,n),s.showAtPosition({x:t.pageX,y:t.pageY})}else{let s=new ba.Menu;e.workspace.trigger("obsidian-git:menu",s,r,i,n),s.showAtPosition({x:t.pageX,y:t.pageY})}}}function Oi(e){throw new Error("Impossible branch: "+e)}function Gg(e){return`rgb(${e.r},${e.g},${e.b})`}function lT(e){var a;let t=(a=sT.fromString(e))==null?void 0:a.toRgbaArray();if(t===void 0)return;let[r,n,i]=t;return{r,g:n,b:i}}function cT(e){return e.diff(ba.moment.unix(0),"seconds")}function uT(e){if(e.length!==0)return e.slice().sort()[Math.floor(e.length/2)]}function fT(e,t){return(0,oT.default)(e,t,{strict:!0})}function zl(e,t){return new Proxy(e,{get(r,n){return n==="length"?Math.min(t,r.length):r[n]}})}function dT(e,t,r){return e.length<=t?new Array(t-e.length).fill(r).join("")+e:e.substring(e.length-t)}function hT(e,t){if(t<=0)return e;let r=new Array(t).fill(" ").join(""),n=e.substring(t,e.length);return r+n}function zg(e,t,r){return e<=t&&t<=r}function Ii(e){let[t,...r]=e.split("/");return[t,r.length===0?void 0:r.join("/")]}function Tn(e){return e.endsWith("/")?e:e.split("/").last().replace(/\.md$/,"")}function pT(e){return e===1?"1 minute":`${e} minutes`}function Rj(e){let t=e.lastIndexOf(".");return e.substring(t+1)}function zs(e){if(e.endsWith(".md"))return!1;let t=Rj(e);return xx.includes(t)}function Vg(e){return(e.startsWith("https://github.com/")||e.startsWith("https://gitlab.com/"))&&(e.endsWith(".git")||(e=e+".git")),e}g();var mT=require("obsidian"),Vs=class{constructor(t){this.plugin=t,this.app=t.app}getRelativeVaultPath(t){return this.plugin.settings.basePath?this.plugin.settings.basePath+"/"+t:t}getRelativeRepoPath(t,r=!0){return r&&this.plugin.settings.basePath.length>0?t.substring(this.plugin.settings.basePath.length+1):t}unload(){}_getTreeStructure(t,r=0){let n=[];for(t=[...t];t.length>0;){let i=t.first(),a=i.path.substring(r);if(a.contains("/")){let s=a.substring(0,a.indexOf("/")),o=t.filter(l=>l.path.substring(r).startsWith(s+"/"));o.forEach(l=>t.remove(l));let c=i.path.substring(0,a.indexOf("/")+r);n.push({title:s,path:c,vaultPath:this.getRelativeVaultPath(c),children:this._getTreeStructure(o,(r>0?r+s.length:s.length)+1)})}else n.push({title:a,data:i,path:i.path,vaultPath:this.getRelativeVaultPath(i.path)}),t.remove(i)}return n}simplify(t){var r,n,i,a;for(let s of t){for(;;){let o=((r=s.children)==null?void 0:r.length)==1,c=((i=(n=s.children)==null?void 0:n.first())==null?void 0:i.data)==null;if(!(s.children!=null&&o&&c))break;let l=s.children.first();s.title+="/"+l.title,s.data=l.data,s.path=l.path,s.vaultPath=l.vaultPath,s.children=l.children}s.children!=null&&this.simplify(s.children),(a=s.children)==null||a.sort((o,c)=>{let l=(c.data==null?1:0)-(o.data==null?1:0);return l!=0?l:o.title.localeCompare(c.title)})}return t.sort((s,o)=>{let c=(o.data==null?1:0)-(s.data==null?1:0);return c!=0?c:s.title.localeCompare(o.title)})}getTreeStructure(t){let r=this._getTreeStructure(t);return this.simplify(r)}async formatCommitMessage(t){let r;if(t.includes("{{numFiles}}")){r=await this.status();let n=r.staged.length;t=t.replace("{{numFiles}}",String(n))}if(t.includes("{{hostname}}")){let n=this.plugin.localStorage.getHostname()||"";t=t.replace("{{hostname}}",n)}if(t.includes("{{files}}")){r=r!=null?r:await this.status();let n={},i="";if(r.staged.length<100){r.staged.forEach(s=>{s.index in n?n[s.index].push(s.path):n[s.index]=[s.path]});let a=[];for(let[s,o]of Object.entries(n))a.push(s+" "+o.join(" "));i=a.join(", ")}else i="Too many files to list";t=t.replace("{{files}}",i)}if(t=t.replace("{{date}}",(0,mT.moment)().format(this.plugin.settings.commitDateFormat)),this.plugin.settings.listChangedFilesInMessageBody){let n=r!=null?r:await this.status(),i="";n.staged.length<100?i=n.staged.map(a=>a.path).join(` +`,Ax=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];g();var kx=require("obsidian"),O$={options:[],placeholder:"",allowEmpty:!1,onlySelection:!1,initialValue:void 0,obscure:!1},$e=class extends kx.SuggestModal{constructor(t,r){if(super(t.app),this.config={...O$,...r},this.setPlaceholder(this.config.placeholder),this.config.obscure){this.inputEl.type="password";let n=this.containerEl.querySelector(".prompt-input-container");n.addClass("git-obscure-prompt"),n.setAttr("git-is-obscured","true");let i=n==null?void 0:n.createDiv({cls:"search-input-clear-button"});i.style.marginRight="32px",i.id="git-show-password",i.addEventListener("click",()=>{n.getAttr("git-is-obscured")==="true"?(this.inputEl.type="text",n.setAttr("git-is-obscured","false")):(this.inputEl.type="password",n.setAttr("git-is-obscured","true"))})}}openAndGetResult(){return new Promise(t=>{this.resolve=t,this.open(),this.config.initialValue!=null&&(this.inputEl.value=this.config.initialValue,this.inputEl.dispatchEvent(new Event("input")))})}onClose(){new Promise(t=>setTimeout(t,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(t){return this.config.onlySelection?this.config.options:this.config.allowEmpty?[t.length>0?t:" ",...this.config.options]:[t.length>0?t:"...",...this.config.options]}renderSuggestion(t,r){this.config.obscure?r.hide():r.setText(t)}onChooseSuggestion(t,r){if(this.resolve){let n;this.config.allowEmpty&&t===" "?n="":t==="..."?n=void 0:n=t,this.resolve(n)}}};g();function Tx(e,t){let r=Object.assign({},e.lineAuthor,t.lineAuthor);return Object.assign({},e,t,{lineAuthor:r})}var $s=class extends Error{constructor(r){super("No network connection available");this.originalError=r}};g();var cT=ze(Vx()),uT=ze(lT()),Kn=require("obsidian");var Gg=(e,t)=>e==="."||t==null||t.length===0||t==="."?!0:t.length>=e.length?t.startsWith(e):e.startsWith(t);function nn(e,t){let r;if(t){if(t.button===0||t.button===1){let n=Kn.Keymap.isModEvent(t);r=e.workspace.getLeaf(n)}}else r=e.workspace.getLeaf(!1);return r}function Tn(e,t,r,n,i){if(t.button==2){let a=e.vault.getAbstractFileByPath(r);if(a!=null){let s=new Kn.Menu;e.workspace.trigger("file-menu",s,a,i,n),s.showAtPosition({x:t.pageX,y:t.pageY})}else{let s=new Kn.Menu;e.workspace.trigger("obsidian-git:menu",s,r,i,n),s.showAtPosition({x:t.pageX,y:t.pageY})}}}function Ii(e){throw new Error("Impossible branch: "+e)}function zg(e){return`rgb(${e.r},${e.g},${e.b})`}function fT(e){var a;let t=(a=cT.fromString(e))==null?void 0:a.toRgbaArray();if(t===void 0)return;let[r,n,i]=t;return{r,g:n,b:i}}function dT(e){return e.diff(Kn.moment.unix(0),"seconds")}function hT(e){if(e.length!==0)return e.slice().sort()[Math.floor(e.length/2)]}function pT(e,t){return(0,uT.default)(e,t,{strict:!0})}function ql(e,t){return new Proxy(e,{get(r,n){return n==="length"?Math.min(t,r.length):r[n]}})}function mT(e,t,r){return e.length<=t?new Array(t-e.length).fill(r).join("")+e:e.substring(e.length-t)}function gT(e,t){if(t<=0)return e;let r=new Array(t).fill(" ").join(""),n=e.substring(t,e.length);return r+n}function Vg(e,t,r){return e<=t&&t<=r}function Fi(e){let[t,...r]=e.split("/");return[t,r.length===0?void 0:r.join("/")]}function Cn(e){return e.endsWith("/")?e:e.split("/").last().replace(/\.md$/,"")}function vT(e){return e===1?"1 minute":`${e} minutes`}function FB(e){let t=e.lastIndexOf(".");return e.substring(t+1)}function Ws(e){if(e.endsWith(".md"))return!1;let t=FB(e);return Ax.includes(t)}function Wg(e){return(e.startsWith("https://github.com/")||e.startsWith("https://gitlab.com/"))&&(e.endsWith(".git")||(e=e+".git")),e}function qs(e,t){let r=t.vault.getAbstractFileByPath(e);if(!(r instanceof Kn.TFile))return!1;try{return!!t.viewRegistry.getTypeByExtension(r.extension)}catch(n){return!0}}function yT({isFolder:e,gitRelativePath:t}){let r="/";return r+=t,e&&(r+="/"),r.replace(/([\\!#*?[\]])/g,String.raw`\$1`).replace(/\s(?=\s*$)/g,String.raw`\ `)}g();var wT=require("obsidian"),Ys=class{constructor(t){this.plugin=t,this.app=t.app}getRelativeVaultPath(t){return this.plugin.settings.basePath?this.plugin.settings.basePath+"/"+t:t}getRelativeRepoPath(t,r=!0){return r&&this.plugin.settings.basePath.length>0?t.substring(this.plugin.settings.basePath.length+1):t}unload(){}_getTreeStructure(t,r=0){let n=[];for(t=[...t];t.length>0;){let i=t.first(),a=i.path.substring(r);if(a.contains("/")){let s=a.substring(0,a.indexOf("/")),o=t.filter(c=>c.path.substring(r).startsWith(s+"/"));o.forEach(c=>t.remove(c));let l=i.path.substring(0,a.indexOf("/")+r);n.push({title:s,path:l,vaultPath:this.getRelativeVaultPath(l),children:this._getTreeStructure(o,(r>0?r+s.length:s.length)+1)})}else n.push({title:a,data:i,path:i.path,vaultPath:this.getRelativeVaultPath(i.path)}),t.remove(i)}return n}simplify(t){var r,n,i,a;for(let s of t){for(;;){let o=((r=s.children)==null?void 0:r.length)==1,l=((i=(n=s.children)==null?void 0:n.first())==null?void 0:i.data)==null;if(!(s.children!=null&&o&&l))break;let c=s.children.first();s.title+="/"+c.title,s.data=c.data,s.path=c.path,s.vaultPath=c.vaultPath,s.children=c.children}s.children!=null&&this.simplify(s.children),(a=s.children)==null||a.sort((o,l)=>{let c=(l.data==null?1:0)-(o.data==null?1:0);return c!=0?c:o.title.localeCompare(l.title)})}return t.sort((s,o)=>{let l=(o.data==null?1:0)-(s.data==null?1:0);return l!=0?l:s.title.localeCompare(o.title)})}getTreeStructure(t){let r=this._getTreeStructure(t);return this.simplify(r)}async formatCommitMessage(t){let r;if(t.includes("{{numFiles}}")){r=await this.status();let n=r.staged.length;t=t.replace("{{numFiles}}",String(n))}if(t.includes("{{hostname}}")){let n=this.plugin.localStorage.getHostname()||"";t=t.replace("{{hostname}}",n)}if(t.includes("{{files}}")){r=r!=null?r:await this.status();let n={},i="";if(r.staged.length<100){r.staged.forEach(s=>{s.index in n?n[s.index].push(s.path):n[s.index]=[s.path]});let a=[];for(let[s,o]of Object.entries(n))a.push(s+" "+o.join(" "));i=a.join(", ")}else i="Too many files to list";t=t.replace("{{files}}",i)}if(t=t.replace("{{date}}",(0,wT.moment)().format(this.plugin.settings.commitDateFormat)),this.plugin.settings.listChangedFilesInMessageBody){let n=r!=null?r:await this.status(),i="";n.staged.length<100?i=n.staged.map(a=>a.path).join(` `):i="Too many files to list",t=t+` Affected files: -`+i}return t}};var Te=class extends Vs{constructor(r){super(r);this.useDefaultWindowsGitPath=!1}async setGitInstance(r=!1){if(this.isGitInstalled()){let n=this.app.vault.adapter,i=n.getBasePath(),a=i;this.plugin.settings.basePath&&(await n.exists((0,Xn.normalizePath)(this.plugin.settings.basePath))?a=Be.join(i,this.plugin.settings.basePath):r||new Xn.Notice("ObsidianGit: Base path does not exist")),this.absoluteRepoPath=a,this.git=wx({baseDir:a,binary:this.plugin.localStorage.getGitPath()||(this.useDefaultWindowsGitPath?Vu:void 0),config:["core.quotepath=off"],unsafe:{allowUnsafeCustomBinary:!0}});let s=this.plugin.localStorage.getPATHPaths(),o=this.plugin.localStorage.getEnvVars(),c=this.plugin.settings.gitDir;if(s.length>0){let f=process.env.PATH+":"+s.join(":");process.env.PATH=f}c&&(process.env.GIT_DIR=c);for(let f of o){let[d,h]=f.split("=");process.env[d]=h}if(yT.default.enable("simple-git"),await this.git.checkIsRepo()){let f=await this.git.revparse("--show-cdup"),d=(0,Vl.resolve)(a+Vl.sep+f);this.absoluteRepoPath=d,await this.git.cwd(d)}let l=Be.join(i,this.app.vault.configDir,"plugins","obsidian-git"),u=Be.join(l,Os);process.env.SSH_ASKPASS==null&&(process.env.SSH_ASKPASS=u),process.env.OBSIDIAN_GIT_CREDENTIALS_INPUT=Be.join(l,Wu),process.env.SSH_ASKPASS==u&&this.askpass().catch(f=>this.plugin.displayError(f))}}getRelativeVaultPath(r){let i=this.app.vault.adapter.getBasePath(),a=Be.join(this.absoluteRepoPath,r),s=Be.relative(i,a);return Xn.Platform.isWin&&(s=s.replace(/\\/g,"/")),s}getRelativeRepoPath(r,n=!0){if(n){let a=this.plugin.app.vault.adapter.getBasePath(),s=this.absoluteRepoPath,o=Be.join(a,r),c=Be.relative(s,o);return Xn.Platform.isWin&&(c=c.replace(/\\/g,"/")),c}return r}async askpass(){let r=this.app.vault.adapter,n=r.getBasePath(),i=Be.join(n,this.app.vault.configDir,"plugins","obsidian-git"),a=this.app.vault.configDir+"/plugins/obsidian-git/";await Zn.writeFile(Be.join(i,Os),_x),await Zn.chmod(Be.join(i,Os),493),this.watchAbortController=new AbortController;let{signal:s}=this.watchAbortController;try{let o=Zn.watch(i,{signal:s});for await(let c of o){if(c.filename!=Wu)continue;let l=a+Wu;if(!await r.exists(l))continue;let u=await r.read(l),f;u.length>60&&(f=new Xn.Notice(u,999999));let d=await new Fe(this.plugin,{allowEmpty:!0,placeholder:u.length>60?"Enter a response to the message.":u}).openAndGetResult();f==null||f.hide(),await r.exists(l)&&await r.write(`${l}.response`,d!=null?d:"")}}catch(o){this.plugin.displayError(o),await Zn.rm(Be.join(i,Os),{force:!0}),await Zn.rm(Be.join(i,`${Os}.response`),{force:!0}),await new Promise(c=>setTimeout(c,5e3)),this.plugin.log("Retry watch for ask pass"),await this.askpass()}}unload(){var r;(r=this.watchAbortController)==null||r.abort()}async status(){this.plugin.setPluginState({gitAction:1});let r=await this.git.status();this.plugin.setPluginState({gitAction:0});let n=r.files.map(i=>{let a=this.formatPath(i);return{path:a.path,from:a.from,index:i.index==="?"?"U":i.index,workingDir:i.working_dir==="?"?"U":i.working_dir,vaultPath:this.getRelativeVaultPath(a.path)}});return{all:n,changed:n.filter(i=>i.workingDir!==" "),staged:n.filter(i=>i.index!==" "&&i.index!="U"),conflicted:r.conflicted.map(i=>this.formatPath({path:i}).path)}}async submoduleAwareHeadRevisonInContainingDirectory(r){let n=this.getRelativeRepoPath(r),a=["-C",Be.dirname(n),"rev-parse","HEAD"],s=this.git.raw(a);return s.catch(o=>console.warn("obsidian-git: rev-parse error:",o)),s}async getSubmodulePaths(){return new Promise(r=>{this.git.outputHandler((n,i,a,s)=>{if(!(s.contains("submodule")&&s.contains("foreach")))return;let o="",c=this.app.vault.adapter.getBasePath()+(this.plugin.settings.basePath?"/"+this.plugin.settings.basePath:"");i.on("data",l=>{o+=l.toString("utf8")}),i.on("end",()=>{let u=o.split(` -`).map(f=>{let d=f.match(/'([^']*)'/);if(d!=null)return c+"/"+d[1]+Vl.sep}).filter(f=>!!f);u.reverse(),r(u)})}),this.git.subModule(["foreach","--recursive",""]).then(()=>{this.git.outputHandler(()=>{})},n=>this.plugin.displayError(n))})}formatPath(r,n=!1){function i(a){if(a!=null)return a.startsWith('"')&&a.endsWith('"')?a.substring(1,a.length-1):a}return n?{from:i(r.from),path:i(r.path)}:{path:i(r.path)}}async blame(r,n,i){if(r=this.getRelativeRepoPath(r),!await this.isTracked(r))return"untracked";let a=await this.getSubmoduleOfFile(r),s=a?["-C",a.submodule]:[],o=a?a.relativeFilepath:r;s.push("blame","--porcelain"),i&&s.push("-w");let c=`-C${zu}`;switch(n){case"inactive":break;case"same-commit":s.push("-C",c);break;case"all-commits":s.push("-C","-C",c);break;default:Oi(n)}s.push("--",o);let l=await this.git.raw(s);return Mj(l)}async isTracked(r){let n=await this.getSubmoduleOfFile(r),i=n?["-C",n.submodule]:[],a=n?n.relativeFilepath:r;return i.push("ls-files","--",a),this.git.raw(i).then(s=>s.trim()!=="")}async commitAll({message:r}){if(this.plugin.settings.updateSubmodules){this.plugin.setPluginState({gitAction:4});let i=await this.getSubmodulePaths();for(let a of i)await this.git.cwd({path:a,root:!1}).add("-A"),await this.git.cwd({path:a,root:!1}).commit(await this.formatCommitMessage(r))}this.plugin.setPluginState({gitAction:3}),await this.git.add("-A"),this.plugin.setPluginState({gitAction:4});let n=await this.git.commit(await this.formatCommitMessage(r));return this.app.workspace.trigger("obsidian-git:head-change"),n.summary.changes}async commit({message:r,amend:n}){this.plugin.setPluginState({gitAction:4});let i=(await this.git.commit(await this.formatCommitMessage(r),n?["--amend"]:[])).summary.changes;return this.app.workspace.trigger("obsidian-git:head-change"),this.plugin.setPluginState({gitAction:0}),i}async stage(r,n){this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.git.add(["--",r]),this.plugin.setPluginState({gitAction:0})}async stageAll({dir:r}){this.plugin.setPluginState({gitAction:3}),await this.git.add(r!=null?r:"-A"),this.plugin.setPluginState({gitAction:0})}async unstageAll({dir:r}){this.plugin.setPluginState({gitAction:3}),await this.git.reset(r!=null?["--",r]:[]),this.plugin.setPluginState({gitAction:0})}async unstage(r,n){this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.git.reset(["--",r]),this.plugin.setPluginState({gitAction:0})}async discard(r){this.plugin.setPluginState({gitAction:3}),await this.isTracked(r)?await this.git.checkout(["--",r]):await this.app.vault.adapter.rmdir(this.getRelativeVaultPath(r),!0),this.plugin.setPluginState({gitAction:0})}async hashObject(r){r=this.getRelativeRepoPath(r);let n=await this.getSubmoduleOfFile(r),i=n?["-C",n.submodule]:[],a=n?n.relativeFilepath:r;return i.push("hash-object","--",a),this.git.raw(i)}async discardAll({dir:r}){return this.discard(r!=null?r:".")}async pull(){this.plugin.setPluginState({gitAction:2});try{this.plugin.settings.updateSubmodules&&await this.git.subModule(["update","--remote","--merge","--recursive"]);let r=await this.branchInfo(),n=await this.git.revparse([r.current]);if(!r.tracking&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring pull of main repo and updating submodules only.");return}await this.git.fetch();let i=await this.git.revparse([r.tracking]);if(n!==i){if(this.plugin.settings.syncMethod==="merge"||this.plugin.settings.syncMethod==="rebase")try{switch(this.plugin.settings.syncMethod){case"merge":await this.git.merge([r.tracking]);break;case"rebase":await this.git.rebase([r.tracking])}}catch(o){this.plugin.displayError(`Pull failed (${this.plugin.settings.syncMethod}): ${"message"in o?o.message:o}`);return}else if(this.plugin.settings.syncMethod==="reset")try{await this.git.raw(["update-ref",`refs/heads/${r.current}`,i]),await this.unstageAll({})}catch(o){this.plugin.displayError(`Sync failed (${this.plugin.settings.syncMethod}): ${"message"in o?o.message:o}`)}this.app.workspace.trigger("obsidian-git:head-change");let a=await this.git.revparse([r.current]);return(await this.git.diff([`${n}..${a}`,"--name-only"])).split(/\r\n|\r|\n/).filter(o=>o.length>0).map(o=>({path:o,workingDir:"P",vaultPath:this.getRelativeVaultPath(o)}))}else return[]}catch(r){this.convertErrors(r)}}async push(){this.plugin.setPluginState({gitAction:5});try{if(this.plugin.settings.updateSubmodules){let s=await this.git.env({...process.env,OBSIDIAN_GIT:1}).subModule(["foreach","--recursive",`tracking=$(git for-each-ref --format='%(upstream:short)' "$(git symbolic-ref -q HEAD)"); echo $tracking; if [ ! -z "$(git diff --shortstat $tracking)" ]; then git push; fi`]);console.log(s)}let r=await this.git.status(),n=r.tracking,i=r.current;if(!n&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring push of main repo and updating submodules only.");return}let a=(await this.git.diffSummary([i,n,"--"])).changed;return await this.git.env({...process.env,OBSIDIAN_GIT:1}).push(),a}catch(r){this.convertErrors(r)}}async getUnpushedCommits(){let r=await this.git.status(),n=r.tracking,i=r.current;return n==null||i==null?0:(await this.git.diffSummary([i,n,"--"])).changed}async canPush(){if(this.plugin.settings.updateSubmodules===!0)return!0;let r=await this.git.status(),n=r.tracking,i=r.current;return n?(await this.git.diffSummary([i,n,"--"])).changed!==0:!1}async checkRequirements(){return this.isGitInstalled()?await this.git.checkIsRepo()?"valid":"missing-repo":"missing-git"}async branchInfo(){let r=await this.git.status(),n=await this.git.branch(["--no-color"]);return{current:r.current||void 0,tracking:r.tracking||void 0,branches:n.all}}async getRemoteUrl(r){try{return await this.git.remote(["get-url",r])||void 0}catch(n){if(String(n).contains(r))return;throw n}}async log(r,n=!0,i,a){let s;r&&(s=this.getRelativeRepoPath(r,n));let o={file:s,maxCount:i,"--diff-merges":"first-parent","--name-status":null};return a&&(o[a]=null),(await this.git.log(o)).all.map(l=>{var u,f,d,h;return{...l,author:{name:l.author_name,email:l.author_email},refs:l.refs.split(", ").filter(p=>p.length>0),diff:{...l.diff,files:(f=(u=l.diff)==null?void 0:u.files.map(p=>({...p,status:p.status,path:p.file,hash:l.hash,vaultPath:this.getRelativeVaultPath(p.file),fromPath:p.from,fromVaultPath:p.from!=null?this.getRelativeVaultPath(p.from):void 0,binary:p.binary})))!=null?f:[]},fileName:(h=(d=l.diff)==null?void 0:d.files.first())==null?void 0:h.file}})}async show(r,n,i=!0){let a=this.getRelativeRepoPath(n,i);return this.git.show([r+":"+a])}async checkout(r,n){if(n&&(r=`${n}/${r}`),await this.git.checkout(r),this.plugin.settings.submoduleRecurseCheckout){let i=await this.getSubmodulePaths();for(let a of i){let s=await this.git.cwd({path:a,root:!1}).branch();Object.keys(s.branches).includes(r)&&await this.git.cwd({path:a,root:!1}).checkout(r)}}}async createBranch(r){await this.git.checkout(["-b",r])}async deleteBranch(r,n){await this.git.branch([n?"-D":"-d",r])}async branchIsMerged(r){return!(await this.git.branch(["--no-merged"])).all.contains(r)}async init(){await this.git.init(!1)}async clone(r,n,i){await this.git.clone(r,Be.join(this.app.vault.adapter.getBasePath(),n),i?["--depth",`${i}`]:[])}async setConfig(r,n){n==null?await this.git.raw(["config","--local","--unset",r]):await this.git.addConfig(r,n)}async getConfig(r){let i=(await this.git.listConfig("local")).all[r];if(typeof i=="string"||i==null)return i;throw new Error("Config value is not a string")}async fetch(r){await this.git.fetch(r!=null?[r]:[])}async setRemote(r,n){(await this.getRemotes()).includes(r)?await this.git.remote(["set-url",r,n]):await this.git.remote(["add",r,n])}async getRemoteBranches(r){let n=await this.git.branch(["-r","--list",`${r}*`]),i=[];for(let a in n.branches)i.push(n.branches[a].name);return i}async getRemotes(){let r=await this.git.remote([]);return r?r.trim().split(` -`):[]}async removeRemote(r){await this.git.removeRemote(r)}async updateUpstreamBranch(r){try{await this.git.branch(["--set-upstream-to",r])}catch(n){try{await this.git.branch(["--set-upstream",r])}catch(i){await this.git.push(["--set-upstream",...Ii(r)])}}}updateGitPath(r){return this.setGitInstance()}updateBasePath(r){return this.setGitInstance(!0)}async getDiffString(r,n=!1,i){return n?await this.git.diff(["--cached","--",r]):i?await this.git.show([`${i}`,"--",r]):await this.git.diff(["--",r])}async diff(r,n,i){return await this.git.diff([`${n}..${i}`,"--",r])}async rawCommand(r){let n=r.split(" ");return await this.git.raw(n[0],...n.slice(1))}async getSubmoduleOfFile(r){if(!await this.app.vault.adapter.exists(Be.dirname(r)))return;let n=await this.git.raw(["-C",Be.dirname(r),"rev-parse","--show-toplevel"],c=>c&&console.warn("get-submodule-of-file",c==null?void 0:c.message));if(n=n.trim(),(await this.git.raw(["-C",Be.dirname(r),"rev-parse","--show-superproject-working-tree"],c=>c&&console.warn("get-submodule-of-file",c==null?void 0:c.message))).trim()==="")return;let s=this.app.vault.adapter.getFullPath(Be.normalize(r)),o=Be.relative(n,s);return{submodule:n,relativeFilepath:o}}async getLastCommitTime(){let r=await this.git.log({n:1});if(r!=null&&r.latest!=null)return new Date(r.latest.date)}isGitInstalled(){let r=this.plugin.localStorage.getGitPath(),n=(0,qg.spawnSync)(r||"git",["--version"],{stdio:"ignore"});if(n.error)if(Xn.Platform.isWin&&!r){this.plugin.log(`Git not found in PATH. Checking standard installation path(${Vu}) of Git for Windows.`);let i=(0,qg.spawnSync)(Vu,["--version"],{stdio:"ignore"});if(i.error)return console.error(i.error),!1;this.useDefaultWindowsGitPath=!0}else return console.error(n.error),!1;else this.useDefaultWindowsGitPath=!1;return!0}convertErrors(r){if(r instanceof wr){let n=String(r.message);if(n.contains("Could not resolve host")||n.contains("Unable to resolve host")||n.match(/ssh: connect to host .*? port .*?: Operation timed out/)!=null||n.match(/ssh: connect to host .*? port .*?: Network is unreachable/)!=null||n.match(/ssh: connect to host .*? port .*?: Undefined error: 0/)!=null)throw new Is(n)}throw r}async isFileTrackedByLFS(r){try{return(await this.git.raw(["check-attr","filter",r])).includes("filter: lfs")}catch(n){let i=n instanceof Error?n.message:String(n);return this.plugin.displayError(`Error checking LFS status: ${i}`),!1}}},wT={hash:"000000",isZeroCommit:!0,summary:""};function Mj(e){let r=e.replace(`\r +`+i}return t}};var Ce=class extends Ys{constructor(r){super(r);this.useDefaultWindowsGitPath=!1}async setGitInstance(r=!1){var n;if(this.isGitInstalled()){let i=this.app.vault.adapter,a=i.getBasePath(),s=a;this.plugin.settings.basePath&&(await i.exists((0,Jn.normalizePath)(this.plugin.settings.basePath))?s=De.join(a,this.plugin.settings.basePath):r||new Jn.Notice("ObsidianGit: Base path does not exist")),this.absoluteRepoPath=s,this.git=xx({baseDir:s,binary:this.plugin.localStorage.getGitPath()||(this.useDefaultWindowsGitPath?Gu:void 0),config:["core.quotepath=off"],unsafe:{allowUnsafeCustomBinary:!0}});let o=this.plugin.localStorage.getPATHPaths(),l=this.plugin.localStorage.getEnvVars(),c=this.plugin.settings.gitDir;if(o.length>0){let v=process.env.PATH+":"+o.join(":");process.env.PATH=v}c&&(process.env.GIT_DIR=c);for(let v of l){let[y,b]=v.split("=");process.env[y]=b}let u="simple-git",f=",",h=((n=localStorage.debug)!=null?n:"").split(f);if(!h.includes(u)&&!h.includes(`-${u}`)&&(h.push(u),xT.default.enable(h.join(f))),await this.git.checkIsRepo()){let v=await this.git.revparse("--show-cdup"),y=(0,Yl.resolve)(s+Yl.sep+v);this.absoluteRepoPath=y,await this.git.cwd(y)}let p=De.join(a,this.app.vault.configDir,"plugins","obsidian-git"),m=De.join(p,wa);process.env.SSH_ASKPASS==null&&(process.env.SSH_ASKPASS=m),process.env.OBSIDIAN_GIT_CREDENTIALS_INPUT=De.join(p,zu),process.env.SSH_ASKPASS==m&&this.askpass().catch(v=>this.plugin.displayError(v))}}getRelativeVaultPath(r){let i=this.app.vault.adapter.getBasePath(),a=De.join(this.absoluteRepoPath,r),s=De.relative(i,a);return Jn.Platform.isWin&&(s=s.replace(/\\/g,"/")),s}getRelativeRepoPath(r,n=!0){if(n){let a=this.plugin.app.vault.adapter.getBasePath(),s=this.absoluteRepoPath,o=De.join(a,r),l=De.relative(s,o);return Jn.Platform.isWin&&(l=l.replace(/\\/g,"/")),l}return r}async askpass(){let r=this.app.vault.adapter,n=r.getBasePath(),i=De.join(n,this.app.vault.configDir,"plugins","obsidian-git"),a=this.app.vault.configDir+"/plugins/obsidian-git/";await this.addAskPassScriptToExclude(),await _r.writeFile(De.join(i,wa),Ex),await _r.chmod(De.join(i,wa),493),this.watchAbortController=new AbortController;let{signal:s}=this.watchAbortController;try{let o=_r.watch(i,{signal:s});for await(let l of o){if(l.filename!=zu)continue;let c=a+zu;if(!await r.exists(c))continue;let u=await r.read(c),f;u.length>60&&(f=new Jn.Notice(u,999999));let d=await new $e(this.plugin,{allowEmpty:!0,obscure:!0,placeholder:u.length>60?"Enter a response to the message.":u}).openAndGetResult();f==null||f.hide(),await r.exists(c)&&await r.write(`${c}.response`,d!=null?d:"")}}catch(o){this.plugin.displayError(o),await _r.rm(De.join(i,wa),{force:!0}),await _r.rm(De.join(i,`${wa}.response`),{force:!0}),await new Promise(l=>setTimeout(l,5e3)),this.plugin.log("Retry watch for ask pass"),await this.askpass()}}async addAskPassScriptToExclude(){try{let r=await this.git.revparse(["--path-format=absolute","--git-path","info/exclude"]),n=De.join(this.app.vault.configDir,"plugins","obsidian-git",wa),i=this.getRelativeRepoPath(n,!0);(await _r.readFile(r,"utf-8")).split(` +`).some(l=>l.contains(i))||await _r.appendFile(r,i+` +`)}catch(r){console.error("Error while adding askpass script to exclude file:",r)}}unload(){var r;(r=this.watchAbortController)==null||r.abort()}async status(){this.plugin.setPluginState({gitAction:1});let r=await this.git.status();this.plugin.setPluginState({gitAction:0});let n=r.files.map(i=>{let a=this.formatPath(i);return{path:a.path,from:a.from,index:i.index==="?"?"U":i.index,workingDir:i.working_dir==="?"?"U":i.working_dir,vaultPath:this.getRelativeVaultPath(a.path)}});return{all:n,changed:n.filter(i=>i.workingDir!==" "),staged:n.filter(i=>i.index!==" "&&i.index!="U"),conflicted:r.conflicted.map(i=>this.formatPath({path:i}).path)}}async submoduleAwareHeadRevisonInContainingDirectory(r){let n=this.getRelativeRepoPath(r),a=["-C",De.dirname(n),"rev-parse","HEAD"],s=this.git.raw(a);return s.catch(o=>console.warn("obsidian-git: rev-parse error:",o)),s}async getSubmodulePaths(){return new Promise(r=>{this.git.outputHandler((n,i,a,s)=>{if(!(s.contains("submodule")&&s.contains("foreach")))return;let o="",l=this.app.vault.adapter.getBasePath()+(this.plugin.settings.basePath?"/"+this.plugin.settings.basePath:"");i.on("data",c=>{o+=c.toString("utf8")}),i.on("end",()=>{let u=o.split(` +`).map(f=>{let d=f.match(/'([^']*)'/);if(d!=null)return l+"/"+d[1]+Yl.sep}).filter(f=>!!f);u.reverse(),r(u)})}),this.git.subModule(["foreach","--recursive",""]).then(()=>{this.git.outputHandler(()=>{})},n=>this.plugin.displayError(n))})}formatPath(r,n=!1){function i(a){if(a!=null)return a.startsWith('"')&&a.endsWith('"')?a.substring(1,a.length-1):a}return n?{from:i(r.from),path:i(r.path)}:{path:i(r.path)}}async blame(r,n,i){if(r=this.getRelativeRepoPath(r),!await this.isTracked(r))return"untracked";let a=await this.getSubmoduleOfFile(r),s=a?["-C",a.submodule]:[],o=a?a.relativeFilepath:r;s.push("blame","--porcelain"),i&&s.push("-w");let l=`-C${Uu}`;switch(n){case"inactive":break;case"same-commit":s.push("-C",l);break;case"all-commits":s.push("-C","-C",l);break;default:Ii(n)}s.push("--",o);let c=await this.git.raw(s);return $B(c)}async isTracked(r){let n=await this.getSubmoduleOfFile(r),i=n?["-C",n.submodule]:[],a=n?n.relativeFilepath:r;return i.push("ls-files","--",a),this.git.raw(i).then(s=>s.trim()!=="")}async commitAll({message:r}){if(this.plugin.settings.updateSubmodules){this.plugin.setPluginState({gitAction:4});let i=await this.getSubmodulePaths();for(let a of i)await this.git.cwd({path:a,root:!1}).add("-A"),await this.git.cwd({path:a,root:!1}).commit(await this.formatCommitMessage(r))}this.plugin.setPluginState({gitAction:3}),await this.git.add("-A"),this.plugin.setPluginState({gitAction:4});let n=await this.git.commit(await this.formatCommitMessage(r));return this.app.workspace.trigger("obsidian-git:head-change"),n.summary.changes}async commit({message:r,amend:n}){this.plugin.setPluginState({gitAction:4});let i=(await this.git.commit(await this.formatCommitMessage(r),n?["--amend"]:[])).summary.changes;return this.app.workspace.trigger("obsidian-git:head-change"),this.plugin.setPluginState({gitAction:0}),i}async stage(r,n){this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.git.add(["--",r]),this.plugin.setPluginState({gitAction:0})}async stageAll({dir:r}){this.plugin.setPluginState({gitAction:3}),await this.git.add(r!=null?r:"-A"),this.plugin.setPluginState({gitAction:0})}async unstageAll({dir:r}){this.plugin.setPluginState({gitAction:3}),await this.git.reset(r!=null?["--",r]:[]),this.plugin.setPluginState({gitAction:0})}async unstage(r,n){this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.git.reset(["--",r]),this.plugin.setPluginState({gitAction:0})}async discard(r){this.plugin.setPluginState({gitAction:3}),await this.isTracked(r)?await this.git.checkout(["--",r]):await this.app.vault.adapter.rmdir(this.getRelativeVaultPath(r),!0),this.plugin.setPluginState({gitAction:0})}async hashObject(r){r=this.getRelativeRepoPath(r);let n=await this.getSubmoduleOfFile(r),i=n?["-C",n.submodule]:[],a=n?n.relativeFilepath:r;return i.push("hash-object","--",a),this.git.raw(i)}async discardAll({dir:r}){return this.discard(r!=null?r:".")}async pull(){this.plugin.setPluginState({gitAction:2});try{this.plugin.settings.updateSubmodules&&await this.git.subModule(["update","--remote","--merge","--recursive"]);let r=await this.branchInfo(),n=await this.git.revparse([r.current]);if(!r.tracking&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring pull of main repo and updating submodules only.");return}await this.git.fetch();let i=await this.git.revparse([r.tracking]);if(n!==i){if(this.plugin.settings.syncMethod==="merge"||this.plugin.settings.syncMethod==="rebase")try{switch(this.plugin.settings.syncMethod){case"merge":await this.git.merge([r.tracking]);break;case"rebase":await this.git.rebase([r.tracking])}}catch(o){this.plugin.displayError(`Pull failed (${this.plugin.settings.syncMethod}): ${"message"in o?o.message:o}`);return}else if(this.plugin.settings.syncMethod==="reset")try{await this.git.raw(["update-ref",`refs/heads/${r.current}`,i]),await this.unstageAll({})}catch(o){this.plugin.displayError(`Sync failed (${this.plugin.settings.syncMethod}): ${"message"in o?o.message:o}`)}this.app.workspace.trigger("obsidian-git:head-change");let a=await this.git.revparse([r.current]);return(await this.git.diff([`${n}..${a}`,"--name-only"])).split(/\r\n|\r|\n/).filter(o=>o.length>0).map(o=>({path:o,workingDir:"P",vaultPath:this.getRelativeVaultPath(o)}))}else return[]}catch(r){this.convertErrors(r)}}async push(){this.plugin.setPluginState({gitAction:5});try{if(this.plugin.settings.updateSubmodules){let s=await this.git.env({...process.env,OBSIDIAN_GIT:1}).subModule(["foreach","--recursive",`tracking=$(git for-each-ref --format='%(upstream:short)' "$(git symbolic-ref -q HEAD)"); echo $tracking; if [ ! -z "$(git diff --shortstat $tracking)" ]; then git push; fi`]);console.log(s)}let r=await this.git.status(),n=r.tracking,i=r.current;if(!n&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring push of main repo and updating submodules only.");return}let a=(await this.git.diffSummary([i,n,"--"])).changed;return await this.git.env({...process.env,OBSIDIAN_GIT:1}).push(),a}catch(r){this.convertErrors(r)}}async getUnpushedCommits(){let r=await this.git.status(),n=r.tracking,i=r.current;return n==null||i==null?0:(await this.git.diffSummary([i,n,"--"])).changed}async canPush(){if(this.plugin.settings.updateSubmodules===!0)return!0;let r=await this.git.status(),n=r.tracking,i=r.current;return n?(await this.git.diffSummary([i,n,"--"])).changed!==0:!1}async checkRequirements(){return this.isGitInstalled()?await this.git.checkIsRepo()?"valid":"missing-repo":"missing-git"}async branchInfo(){let r=await this.git.status(),n=await this.git.branch(["--no-color"]);return{current:r.current||void 0,tracking:r.tracking||void 0,branches:n.all}}async getRemoteUrl(r){try{return await this.git.remote(["get-url",r])||void 0}catch(n){if(String(n).contains(r))return;throw n}}async log(r,n=!0,i,a){let s;r&&(s=this.getRelativeRepoPath(r,n));let o={file:s,maxCount:i,"--diff-merges":"first-parent","--name-status":null};return a&&(o[a]=null),(await this.git.log(o)).all.map(c=>{var u,f,d,h;return{...c,author:{name:c.author_name,email:c.author_email},refs:c.refs.split(", ").filter(p=>p.length>0),diff:{...c.diff,files:(f=(u=c.diff)==null?void 0:u.files.map(p=>({...p,status:p.status,path:p.file,hash:c.hash,vaultPath:this.getRelativeVaultPath(p.file),fromPath:p.from,fromVaultPath:p.from!=null?this.getRelativeVaultPath(p.from):void 0,binary:p.binary})))!=null?f:[]},fileName:(h=(d=c.diff)==null?void 0:d.files.first())==null?void 0:h.file}})}async show(r,n,i=!0){let a=this.getRelativeRepoPath(n,i);return this.git.show([r+":"+a])}async checkout(r,n){if(n&&(r=`${n}/${r}`),await this.git.checkout(r),this.plugin.settings.submoduleRecurseCheckout){let i=await this.getSubmodulePaths();for(let a of i){let s=await this.git.cwd({path:a,root:!1}).branch();Object.keys(s.branches).includes(r)&&await this.git.cwd({path:a,root:!1}).checkout(r)}}}async createBranch(r){await this.git.checkout(["-b",r])}async deleteBranch(r,n){await this.git.branch([n?"-D":"-d",r])}async branchIsMerged(r){return!(await this.git.branch(["--no-merged"])).all.contains(r)}async init(){await this.git.init(!1)}async clone(r,n,i){await this.git.clone(r,De.join(this.app.vault.adapter.getBasePath(),n),i?["--depth",`${i}`]:[])}async setConfig(r,n){n==null?await this.git.raw(["config","--local","--unset",r]):await this.git.addConfig(r,n)}async getConfig(r){let i=(await this.git.listConfig("local")).all[r];if(typeof i=="string"||i==null)return i;throw new Error("Config value is not a string")}async fetch(r){await this.git.fetch(r!=null?[r]:[])}async setRemote(r,n){(await this.getRemotes()).includes(r)?await this.git.remote(["set-url",r,n]):await this.git.remote(["add",r,n])}async getRemoteBranches(r){let n=await this.git.branch(["-r","--list",`${r}*`]),i=[];for(let a in n.branches)i.push(n.branches[a].name);return i}async getRemotes(){let r=await this.git.remote([]);return r?r.trim().split(` +`):[]}async removeRemote(r){await this.git.removeRemote(r)}async updateUpstreamBranch(r){try{await this.git.branch(["--set-upstream-to",r])}catch(n){try{await this.git.branch(["--set-upstream",r])}catch(i){await this.git.push(["--set-upstream",...Fi(r)])}}}updateGitPath(r){return this.setGitInstance()}updateBasePath(r){return this.setGitInstance(!0)}async getDiffString(r,n=!1,i){return n?await this.git.diff(["--cached","--",r]):i?await this.git.show([`${i}`,"--",r]):await this.git.diff(["--",r])}async diff(r,n,i){return await this.git.diff([`${n}..${i}`,"--",r])}async rawCommand(r){let n=r.split(" ");return await this.git.raw(n[0],...n.slice(1))}async getSubmoduleOfFile(r){if(!await this.app.vault.adapter.exists(De.dirname(r)))return;let n=await this.git.raw(["-C",De.dirname(r),"rev-parse","--show-toplevel"],l=>l&&console.warn("get-submodule-of-file",l==null?void 0:l.message));if(n=n.trim(),(await this.git.raw(["-C",De.dirname(r),"rev-parse","--show-superproject-working-tree"],l=>l&&console.warn("get-submodule-of-file",l==null?void 0:l.message))).trim()==="")return;let s=this.app.vault.adapter.getFullPath(De.normalize(r)),o=De.relative(n,s);return{submodule:n,relativeFilepath:o}}async getLastCommitTime(){let r=await this.git.log({n:1});if(r!=null&&r.latest!=null)return new Date(r.latest.date)}isGitInstalled(){let r=this.plugin.localStorage.getGitPath(),n=(0,Yg.spawnSync)(r||"git",["--version"],{stdio:"ignore"});if(n.error)if(Jn.Platform.isWin&&!r){this.plugin.log(`Git not found in PATH. Checking standard installation path(${Gu}) of Git for Windows.`);let i=(0,Yg.spawnSync)(Gu,["--version"],{stdio:"ignore"});if(i.error)return console.error(i.error),!1;this.useDefaultWindowsGitPath=!0}else return console.error(n.error),!1;else this.useDefaultWindowsGitPath=!1;return!0}convertErrors(r){if(r instanceof wr){let n=String(r.message);if(n.contains("Could not resolve host")||n.contains("Unable to resolve host")||n.match(/ssh: connect to host .*? port .*?: Operation timed out/)!=null||n.match(/ssh: connect to host .*? port .*?: Network is unreachable/)!=null||n.match(/ssh: connect to host .*? port .*?: Undefined error: 0/)!=null)throw new $s(n)}throw r}async isFileTrackedByLFS(r){try{return(await this.git.raw(["check-attr","filter",r])).includes("filter: lfs")}catch(n){let i=n instanceof Error?n.message:String(n);return this.plugin.displayError(`Error checking LFS status: ${i}`),!1}}},ST={hash:"000000",isZeroCommit:!0,summary:""};function $B(e){let r=e.replace(`\r `,` `).split(` -`),n={commits:new Map,hashPerLine:[void 0],originalFileLineNrPerLine:[void 0],finalFileLineNrPerLine:[void 0],groupSizePerStartingLine:new Map},i=1;for(let a=0;a=4&&r.groupSizePerStartingLine.set(t,parseInt(e[3])),parseInt(e[2])!==t)throw Error(`git-blame output is out of order: ${t} vs ${e[2]}`);return n}function Ij(e,t,r){let n=e[0],i=e.slice(1).join(" "),a=t.hashPerLine[r],s=t.commits.get(a)||{hash:a,author:{},committer:{},previous:{}};switch(n){case"summary":s.summary=i;break;case"author":s.author.name=i;break;case"author-mail":s.author.email=vT(i);break;case"author-time":s.author.epochSeconds=parseInt(i);break;case"author-tz":s.author.tz=i;break;case"committer":s.committer.name=i;break;case"committer-mail":s.committer.email=vT(i);break;case"committer-time":s.committer.epochSeconds=parseInt(i);break;case"committer-tz":s.committer.tz=i;break;case"previous":s.previous.commitHash=i;break;case"filename":s.previous.filename=i;break}t.commits.set(a,s)}function Fj(e){if(e.summary===void 0)throw Error(`Summary not provided for commit: ${e.hash}`);Wg(e.author)&&(e.author=void 0),Wg(e.committer)&&(e.committer=void 0),Wg(e.previous)&&(e.previous=void 0),e.isZeroCommit=!!e.hash.match(/^0*$/)}function Wg(e){return!e||Object.keys(e).length===0}function gT(e){return e.length>0&&e[0].trim()===e[0]}function vT(e){let t=e.startsWith("<")?e.substring(1):e;return t.endsWith(">")?t.substring(0,t.length-1):t}g();var eC=require("@codemirror/state");g();var IT=require("@codemirror/state"),Xf=require("obsidian");g();var Yg=class{constructor(){this.eventsPerFilepath=new Map;this.startRemoveStalesSubscribersInterval()}ifFilepathDefinedTransformSubscribers(t,r){if(t)return this.ensureInitialized(t),r(this.eventsPerFilepath.get(t))}forEachSubscriber(t){this.eventsPerFilepath.forEach(r=>r.forEach(t))}ensureInitialized(t){this.eventsPerFilepath.get(t)||this.eventsPerFilepath.set(t,new Set)}startRemoveStalesSubscribersInterval(){this.removeStalesSubscribersTimer=window.setInterval(()=>this==null?void 0:this.forEachSubscriber(t=>t==null?void 0:t.removeIfStale()),6e4)}clear(){window.clearInterval(this.removeStalesSubscribersTimer),this.eventsPerFilepath.clear()}},Ws=new Yg;g();var Wf=require("@codemirror/state"),CT=ze(Xg());g();var V=require("obsidian");g();g();function nn(){}nn.prototype={diff:function(t,r){var n,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i.callback;typeof i=="function"&&(a=i,i={});var s=this;function o(E){return E=s.postProcess(E,i),a?(setTimeout(function(){a(E)},0),!0):E}t=this.castInput(t,i),r=this.castInput(r,i),t=this.removeEmpty(this.tokenize(t,i)),r=this.removeEmpty(this.tokenize(r,i));var c=r.length,l=t.length,u=1,f=c+l;i.maxEditLength!=null&&(f=Math.min(f,i.maxEditLength));var d=(n=i.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+d,p=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(p[0],r,t,0,i);if(p[0].oldPos+1>=l&&m+1>=c)return o(bT(s,p[0].lastComponent,r,t,s.useLongestToken));var v=-1/0,y=1/0;function b(){for(var E=Math.max(v,-u);E<=Math.min(y,u);E+=2){var _=void 0,k=p[E-1],w=p[E+1];k&&(p[E-1]=void 0);var A=!1;if(w){var S=w.oldPos-E;A=w&&0<=S&&S=l&&m+1>=c)return o(bT(s,_.lastComponent,r,t,s.useLongestToken));p[E]=_,_.oldPos+1>=l&&(y=Math.min(y,E-1)),m+1>=c&&(v=Math.max(v,E+1))}u++}if(a)(function E(){setTimeout(function(){if(u>f||Date.now()>h)return a();b()||E()},0)})();else for(;u<=f&&Date.now()<=h;){var x=b();if(x)return x}},addToPath:function(t,r,n,i,a){var s=t.lastComponent;return s&&!a.oneChangePerToken&&s.added===r&&s.removed===n?{oldPos:t.oldPos+i,lastComponent:{count:s.count+1,added:r,removed:n,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:r,removed:n,previousComponent:s}}},extractCommon:function(t,r,n,i,a){for(var s=r.length,o=n.length,c=t.oldPos,l=c-i,u=0;l+1h.length?m:h}),f.value=e.join(d)}else f.value=e.join(r.slice(l,l+f.count));l+=f.count,f.added||(u+=f.count)}}return a}var JW=new nn;function _T(e,t){var r;for(r=0;rt.length&&(r=e.length-t.length);var n=t.length;e.length0&&t[s]!=t[a];)a=i[a];t[s]==t[a]&&a++}a=0;for(var o=r;o0&&e[o]!=t[a];)a=i[a];e[o]==t[a]&&a++}return a}var Nf="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",Lj=new RegExp("[".concat(Nf,"]+|\\s+|[^").concat(Nf,"]"),"ug"),Bf=new nn;Bf.equals=function(e,t,r){return r.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()};Bf.tokenize=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r;if(t.intlSegmenter){if(t.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=Array.from(t.intlSegmenter.segment(e),function(a){return a.segment})}else r=e.match(Lj)||[];var n=[],i=null;return r.forEach(function(a){/\s/.test(a)?i==null?n.push(a):n.push(n.pop()+a):/\s/.test(i)?n[n.length-1]==i?n.push(n.pop()+a):n.push(i+a):n.push(a),i=a}),n};Bf.join=function(e){return e.map(function(t,r){return r==0?t:t.replace(/^\s+/,"")}).join("")};Bf.postProcess=function(e,t){if(!e||t.oneChangePerToken)return e;var r=null,n=null,i=null;return e.forEach(function(a){a.added?n=a:a.removed?i=a:((n||i)&&ET(r,i,n,a),r=a,n=null,i=null)}),(n||i)&&ET(r,i,n,null),e};function ET(e,t,r,n){if(t&&r){var i=t.value.match(/^\s*/)[0],a=t.value.match(/\s*$/)[0],s=r.value.match(/^\s*/)[0],o=r.value.match(/\s*$/)[0];if(e){var c=_T(i,s);e.value=Jg(e.value,s,c),t.value=Wl(t.value,c),r.value=Wl(r.value,c)}if(n){var l=xT(a,o);n.value=Kg(n.value,o,l),t.value=Df(t.value,l),r.value=Df(r.value,l)}}else if(r)e&&(r.value=r.value.replace(/^\s*/,"")),n&&(n.value=n.value.replace(/^\s*/,""));else if(e&&n){var u=n.value.match(/^\s*/)[0],f=t.value.match(/^\s*/)[0],d=t.value.match(/\s*$/)[0],h=_T(u,f);t.value=Wl(t.value,h);var p=xT(Wl(u,h),d);t.value=Df(t.value,p),n.value=Kg(n.value,u,p),e.value=Jg(e.value,u,u.slice(0,u.length-p.length))}else if(n){var m=n.value.match(/^\s*/)[0],v=t.value.match(/\s*$/)[0],y=ST(v,m);t.value=Df(t.value,y)}else if(e){var b=e.value.match(/\s*$/)[0],x=t.value.match(/^\s*/)[0],E=ST(b,x);t.value=Wl(t.value,E)}}var Dj=new nn;Dj.tokenize=function(e){var t=new RegExp("(\\r?\\n)|[".concat(Nf,"]+|[^\\S\\n\\r]+|[^").concat(Nf,"]"),"ug");return e.match(t)||[]};var Hf=new nn;Hf.tokenize=function(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,` -`));var r=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i=4&&r.groupSizePerStartingLine.set(t,parseInt(e[3])),parseInt(e[2])!==t)throw Error(`git-blame output is out of order: ${t} vs ${e[2]}`);return n}function DB(e,t,r){let n=e[0],i=e.slice(1).join(" "),a=t.hashPerLine[r],s=t.commits.get(a)||{hash:a,author:{},committer:{},previous:{}};switch(n){case"summary":s.summary=i;break;case"author":s.author.name=i;break;case"author-mail":s.author.email=_T(i);break;case"author-time":s.author.epochSeconds=parseInt(i);break;case"author-tz":s.author.tz=i;break;case"committer":s.committer.name=i;break;case"committer-mail":s.committer.email=_T(i);break;case"committer-time":s.committer.epochSeconds=parseInt(i);break;case"committer-tz":s.committer.tz=i;break;case"previous":s.previous.commitHash=i;break;case"filename":s.previous.filename=i;break}t.commits.set(a,s)}function NB(e){if(e.summary===void 0)throw Error(`Summary not provided for commit: ${e.hash}`);qg(e.author)&&(e.author=void 0),qg(e.committer)&&(e.committer=void 0),qg(e.previous)&&(e.previous=void 0),e.isZeroCommit=!!e.hash.match(/^0*$/)}function qg(e){return!e||Object.keys(e).length===0}function bT(e){return e.length>0&&e[0].trim()===e[0]}function _T(e){let t=e.startsWith("<")?e.substring(1):e;return t.endsWith(">")?t.substring(0,t.length-1):t}g();var iC=require("@codemirror/state");g();var DT=require("@codemirror/state"),qf=require("obsidian");g();var Xg=class{constructor(){this.eventsPerFilepath=new Map;this.startRemoveStalesSubscribersInterval()}ifFilepathDefinedTransformSubscribers(t,r){if(t)return this.ensureInitialized(t),r(this.eventsPerFilepath.get(t))}forEachSubscriber(t){this.eventsPerFilepath.forEach(r=>r.forEach(t))}ensureInitialized(t){this.eventsPerFilepath.get(t)||this.eventsPerFilepath.set(t,new Set)}startRemoveStalesSubscribersInterval(){this.removeStalesSubscribersTimer=window.setInterval(()=>this==null?void 0:this.forEachSubscriber(t=>t==null?void 0:t.removeIfStale()),6e4)}clear(){window.clearInterval(this.removeStalesSubscribersTimer),this.eventsPerFilepath.clear()}},Xs=new Xg;g();var zf=require("@codemirror/state"),OT=ze(Zg());g();var U=require("obsidian");g();g();function an(){}an.prototype={diff:function(t,r){var n,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i.callback;typeof i=="function"&&(a=i,i={});var s=this;function o(E){return E=s.postProcess(E,i),a?(setTimeout(function(){a(E)},0),!0):E}t=this.castInput(t,i),r=this.castInput(r,i),t=this.removeEmpty(this.tokenize(t,i)),r=this.removeEmpty(this.tokenize(r,i));var l=r.length,c=t.length,u=1,f=l+c;i.maxEditLength!=null&&(f=Math.min(f,i.maxEditLength));var d=(n=i.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+d,p=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(p[0],r,t,0,i);if(p[0].oldPos+1>=c&&m+1>=l)return o(ET(s,p[0].lastComponent,r,t,s.useLongestToken));var v=-1/0,y=1/0;function b(){for(var E=Math.max(v,-u);E<=Math.min(y,u);E+=2){var _=void 0,k=p[E-1],w=p[E+1];k&&(p[E-1]=void 0);var A=!1;if(w){var S=w.oldPos-E;A=w&&0<=S&&S=c&&m+1>=l)return o(ET(s,_.lastComponent,r,t,s.useLongestToken));p[E]=_,_.oldPos+1>=c&&(y=Math.min(y,E-1)),m+1>=l&&(v=Math.max(v,E+1))}u++}if(a)(function E(){setTimeout(function(){if(u>f||Date.now()>h)return a();b()||E()},0)})();else for(;u<=f&&Date.now()<=h;){var x=b();if(x)return x}},addToPath:function(t,r,n,i,a){var s=t.lastComponent;return s&&!a.oneChangePerToken&&s.added===r&&s.removed===n?{oldPos:t.oldPos+i,lastComponent:{count:s.count+1,added:r,removed:n,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:r,removed:n,previousComponent:s}}},extractCommon:function(t,r,n,i,a){for(var s=r.length,o=n.length,l=t.oldPos,c=l-i,u=0;c+1h.length?m:h}),f.value=e.join(d)}else f.value=e.join(r.slice(c,c+f.count));c+=f.count,f.added||(u+=f.count)}}return a}var tq=new an;function AT(e,t){var r;for(r=0;rt.length&&(r=e.length-t.length);var n=t.length;e.length0&&t[s]!=t[a];)a=i[a];t[s]==t[a]&&a++}a=0;for(var o=r;o0&&e[o]!=t[a];)a=i[a];e[o]==t[a]&&a++}return a}var Lf="a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",jB=new RegExp("[".concat(Lf,"]+|\\s+|[^").concat(Lf,"]"),"ug"),Nf=new an;Nf.equals=function(e,t,r){return r.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()};Nf.tokenize=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r;if(t.intlSegmenter){if(t.intlSegmenter.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');r=Array.from(t.intlSegmenter.segment(e),function(a){return a.segment})}else r=e.match(jB)||[];var n=[],i=null;return r.forEach(function(a){/\s/.test(a)?i==null?n.push(a):n.push(n.pop()+a):/\s/.test(i)?n[n.length-1]==i?n.push(n.pop()+a):n.push(i+a):n.push(a),i=a}),n};Nf.join=function(e){return e.map(function(t,r){return r==0?t:t.replace(/^\s+/,"")}).join("")};Nf.postProcess=function(e,t){if(!e||t.oneChangePerToken)return e;var r=null,n=null,i=null;return e.forEach(function(a){a.added?n=a:a.removed?i=a:((n||i)&&CT(r,i,n,a),r=a,n=null,i=null)}),(n||i)&&CT(r,i,n,null),e};function CT(e,t,r,n){if(t&&r){var i=t.value.match(/^\s*/)[0],a=t.value.match(/\s*$/)[0],s=r.value.match(/^\s*/)[0],o=r.value.match(/\s*$/)[0];if(e){var l=AT(i,s);e.value=Qg(e.value,s,l),t.value=Xl(t.value,l),r.value=Xl(r.value,l)}if(n){var c=kT(a,o);n.value=Jg(n.value,o,c),t.value=$f(t.value,c),r.value=$f(r.value,c)}}else if(r)e&&(r.value=r.value.replace(/^\s*/,"")),n&&(n.value=n.value.replace(/^\s*/,""));else if(e&&n){var u=n.value.match(/^\s*/)[0],f=t.value.match(/^\s*/)[0],d=t.value.match(/\s*$/)[0],h=AT(u,f);t.value=Xl(t.value,h);var p=kT(Xl(u,h),d);t.value=$f(t.value,p),n.value=Jg(n.value,u,p),e.value=Qg(e.value,u,u.slice(0,u.length-p.length))}else if(n){var m=n.value.match(/^\s*/)[0],v=t.value.match(/\s*$/)[0],y=TT(v,m);t.value=$f(t.value,y)}else if(e){var b=e.value.match(/\s*$/)[0],x=t.value.match(/^\s*/)[0],E=TT(b,x);t.value=Xl(t.value,E)}}var HB=new an;HB.tokenize=function(e){var t=new RegExp("(\\r?\\n)|[".concat(Lf,"]+|[^\\S\\n\\r]+|[^").concat(Lf,"]"),"ug");return e.match(t)||[]};var Bf=new an;Bf.tokenize=function(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,` +`));var r=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;ie.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?f(O.lines.slice(-s.context)):[],h-=m.length,p-=m.length)}(P=m).push.apply(P,Zg(T.map(function(ee){return(S.added?"+":"-")+ee}))),S.added?y+=T.length:v+=T.length}else{if(h)if(T.length<=s.context*2&&xe.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?f(I.lines.slice(-s.context)):[],h-=m.length,p-=m.length)}(P=m).push.apply(P,Kg(T.map(function(J){return(S.added?"+":"-")+J}))),S.added?y+=T.length:v+=T.length}else{if(h)if(T.length<=s.context*2&&x(0,Fi.normalizePath)(a.substring(t.length))):i=n,i}async mkdir(t){return this.adapter.mkdir(t)}async rmdir(t,r){var n,i;return this.adapter.rmdir(t,(i=(n=r==null?void 0:r.options)==null?void 0:n.recursive)!=null?i:!1)}async stat(t){if(t.endsWith(this.gitDir+"/index")){if(this.index!==void 0&&this.indexctime!=null&&this.indexmtime!=null)return{isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1,size:this.index.length,type:"file",ctimeMs:this.indexctime,mtimeMs:this.indexmtime};{let n=await this.adapter.stat(t);if(n==null)throw{code:"ENOENT"};return this.indexctime=n.ctime,this.indexmtime=n.mtime,{ctimeMs:n.ctime,mtimeMs:n.mtime,size:n.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1}}}t==="."&&(t="/");let r=this.vault.getAbstractFileByPath(t);if(this.maybeLog("Stat: "+t),r instanceof Fi.TFile)return this.maybeLog("Reuse stat"),{ctimeMs:r.stat.ctime,mtimeMs:r.stat.mtime,size:r.stat.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1};{let n=await this.adapter.stat(t);if(n)return{ctimeMs:n.ctime,mtimeMs:n.mtime,size:n.size,type:n.type==="folder"?"directory":n.type,isFile:()=>n.type==="file",isDirectory:()=>n.type==="folder",isSymbolicLink:()=>!1};throw{code:"ENOENT"}}}async unlink(t){return this.adapter.remove(t)}async lstat(t){return this.stat(t)}async readlink(t){throw new Error(`readlink of (${t}) is not implemented.`)}async symlink(t){throw new Error(`symlink of (${t}) is not implemented.`)}async saveAndClear(){this.index!==void 0&&await this.adapter.writeBinary(this.plugin.gitManager.getRelativeVaultPath(this.gitDir+"/index"),this.index,{ctime:this.indexctime,mtime:this.indexmtime}),this.clearIndex()}clearIndex(){this.index=void 0,this.indexctime=void 0,this.indexmtime=void 0}get gitDir(){return this.plugin.settings.gitDir||".git"}maybeLog(t){}};var an=class extends Vs{constructor(r){super(r);this.FILE=0;this.HEAD=1;this.WORKDIR=2;this.STAGE=3;this.status_mapping={"000":" ","003":"AD","020":"??","022":"A ","023":"AM",100:"D ",101:" D",103:"MD",110:"DA",111:" ",113:"MM",120:"DA",121:" M",122:"M ",123:"MM"};this.noticeLength=999999;this.fs=new Gf(this.app.vault,this.plugin)}getRepo(){return{fs:this.fs,dir:this.plugin.settings.basePath,gitdir:this.plugin.settings.gitDir||void 0,onAuth:()=>{var r,n;return{username:(r=this.plugin.localStorage.getUsername())!=null?r:void 0,password:(n=this.plugin.localStorage.getPassword())!=null?n:void 0}},onAuthFailure:async()=>{new _a.Notice("Authentication failed. Please try with different credentials");let r=await new Fe(this.plugin,{placeholder:"Specify your username"}).openAndGetResult();if(r){let n=await new Fe(this.plugin,{placeholder:"Specify your password/personal access token"}).openAndGetResult();if(n)return this.plugin.localStorage.setUsername(r),this.plugin.localStorage.setPassword(n),{username:r,password:n}}return{cancel:!0}},http:{async request({url:r,method:n,headers:i,body:a}){let s;a&&(s=(await Jj(a)).buffer);let o=await(0,_a.requestUrl)({url:r,method:n,headers:i,body:s,throw:!1});return{url:r,method:n,headers:o.headers,body:[new Uint8Array(o.arrayBuffer)],statusCode:o.status,statusMessage:o.status.toString()}}}}}async wrapFS(r){try{let n=await r;return await this.fs.saveAndClear(),n}catch(n){throw await this.fs.saveAndClear(),n}}async status(){let r,n=window.setTimeout(()=>{r=new _a.Notice("This takes longer: Getting status",this.noticeLength)},2e4);try{this.plugin.setPluginState({gitAction:1});let i=(await this.wrapFS(ie.statusMatrix({...this.getRepo()}))).map(c=>this.getFileStatusResult(c)),a=i.filter(c=>c.workingDir!==" "),s=i.filter(c=>c.index!==" "&&c.index!=="U"),o=[];return window.clearTimeout(n),r==null||r.hide(),{all:i,changed:a,staged:s,conflicted:o}}catch(i){throw window.clearTimeout(n),r==null||r.hide(),this.plugin.displayError(i),i}}async commitAll({message:r,status:n,unstagedFiles:i}){try{return await this.checkAuthorInfo(),await this.stageAll({status:n,unstagedFiles:i}),this.commit({message:r})}catch(a){throw this.plugin.displayError(a),a}}async commit({message:r}){try{await this.checkAuthorInfo(),this.plugin.setPluginState({gitAction:4});let n=await this.formatCommitMessage(r),i=this.plugin.localStorage.getConflict(),a;if(i){let s=await this.branchInfo();a=[s.current,s.tracking]}await this.wrapFS(ie.commit({...this.getRepo(),message:n,parent:a})),this.plugin.localStorage.setConflict(!1);return}catch(n){throw this.plugin.displayError(n),n}}async stage(r,n){let i=this.getRelativeRepoPath(r,n),a;n?a=r:a=this.getRelativeVaultPath(r);try{this.plugin.setPluginState({gitAction:3}),await this.app.vault.adapter.exists(a)?await this.wrapFS(ie.add({...this.getRepo(),filepath:i})):await this.wrapFS(ie.remove({...this.getRepo(),filepath:i}))}catch(s){throw this.plugin.displayError(s),s}}async stageAll({dir:r,status:n,unstagedFiles:i}){try{if(n)await Promise.all(n.changed.map(a=>a.workingDir!=="D"?this.wrapFS(ie.add({...this.getRepo(),filepath:a.path})):ie.remove({...this.getRepo(),filepath:a.path})));else{let a=i!=null?i:await this.getUnstagedFiles(r!=null?r:".");await Promise.all(a.map(({path:s,deleted:o})=>o?ie.remove({...this.getRepo(),filepath:s}):this.wrapFS(ie.add({...this.getRepo(),filepath:s}))))}}catch(a){throw this.plugin.displayError(a),a}}async unstage(r,n){try{this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.wrapFS(ie.resetIndex({...this.getRepo(),filepath:r}))}catch(i){throw this.plugin.displayError(i),i}}async unstageAll({dir:r,status:n}){try{let i;n?i=n.staged.map(a=>a.path):i=(await this.getStagedFiles(r!=null?r:".")).map(({path:s})=>s),await this.wrapFS(Promise.all(i.map(a=>ie.resetIndex({...this.getRepo(),filepath:a}))))}catch(i){throw this.plugin.displayError(i),i}}async discard(r){try{this.plugin.setPluginState({gitAction:3}),await this.wrapFS(ie.checkout({...this.getRepo(),filepaths:[r],force:!0}))}catch(n){throw this.plugin.displayError(n),n}}async discardAll({dir:r,status:n}){let i=[];n?r!=null?i=n.changed.filter(a=>a.path.startsWith(r)).map(a=>a.path):i=n.changed.map(a=>a.path):i=(await this.getUnstagedFiles(r)).map(({path:a})=>a);try{await this.wrapFS(ie.checkout({...this.getRepo(),filepaths:i,force:!0}))}catch(a){throw this.plugin.displayError(a),a}}getProgressText(r,n){let i=`${r} progress:`;return n.phase&&(i=`${i} ${n.phase}:`),n.loaded&&(i=`${i} ${n.loaded}`,n.total&&(i=`${i} of ${n.total}`)),i}resolveRef(r){return this.wrapFS(ie.resolveRef({...this.getRepo(),ref:r}))}async pull(){let r=this.showNotice("Initializing pull");try{this.plugin.setPluginState({gitAction:2});let n=await this.resolveRef("HEAD");await this.fetch();let i=await this.branchInfo();await this.checkAuthorInfo(),(await this.wrapFS(ie.merge({...this.getRepo(),ours:i.current,theirs:i.tracking,abortOnConflict:!1}))).alreadyMerged||await this.wrapFS(ie.checkout({...this.getRepo(),ref:i.current,onProgress:c=>{r!==void 0&&(r.noticeEl.innerText=this.getProgressText("Checkout",c))},remote:i.remote})),r==null||r.hide();let s=await this.resolveRef("HEAD"),o=await this.getFileChangesCount(n,s);return this.showNotice("Finished pull",!1),o.map(c=>({path:c.path,workingDir:"P",index:"P",vaultPath:this.getRelativeVaultPath(c.path)}))}catch(n){throw r==null||r.hide(),n instanceof gl.MergeConflictError&&await this.plugin.handleConflict(n.data.filepaths.map(i=>this.getRelativeVaultPath(i))),this.plugin.displayError(n),n}}async push(){if(!await this.canPush())return 0;let r=this.showNotice("Initializing push");try{this.plugin.setPluginState({gitAction:1});let n=await this.branchInfo(),i=n.tracking,a=n.current,s=(await this.getFileChangesCount(a,i)).length;return this.plugin.setPluginState({gitAction:5}),await this.wrapFS(ie.push({...this.getRepo(),onProgress:o=>{r!==void 0&&(r.noticeEl.innerText=this.getProgressText("Pushing",o))}})),r==null||r.hide(),s}catch(n){throw r==null||r.hide(),this.plugin.displayError(n),n}}async getUnpushedCommits(){let r=await this.branchInfo(),n=r.tracking,i=r.current;if(n==null||i==null)return 0;let a=await this.resolveRef(i),s=await this.resolveRef(n);return(await this.getFileChangesCount(a,s)).length}async canPush(){let r=await this.branchInfo(),n=r.tracking,i=r.current,a=await this.resolveRef(i),s=await this.resolveRef(n);return a!=s}async checkRequirements(){return await this.plugin.app.vault.adapter.exists(`${this.getRepo().dir}/.git/HEAD`)?"valid":"missing-repo"}async branchInfo(){var r,n;try{let i=await ie.currentBranch(this.getRepo())||"",a=await ie.listBranches(this.getRepo()),s=(r=await this.getConfig(`branch.${i}.remote`))!=null?r:"origin",o=(n=await this.getConfig(`branch.${i}.merge`))==null?void 0:n.split("refs/heads")[1],c=o?s+o:void 0;return{current:i,tracking:c,branches:a,remote:s}}catch(i){throw this.plugin.displayError(i),i}}async getCurrentRemote(){var i;let r=await ie.currentBranch(this.getRepo())||"";return(i=await this.getConfig(`branch.${r}.remote`))!=null?i:"origin"}async checkout(r,n){try{return this.wrapFS(ie.checkout({...this.getRepo(),ref:r,force:!!n,remote:n}))}catch(i){throw this.plugin.displayError(i),i}}async createBranch(r){try{await this.wrapFS(ie.branch({...this.getRepo(),ref:r,checkout:!0}))}catch(n){throw this.plugin.displayError(n),n}}async deleteBranch(r){try{await this.wrapFS(ie.deleteBranch({...this.getRepo(),ref:r}))}catch(n){throw this.plugin.displayError(n),n}}branchIsMerged(r){return Promise.resolve(!0)}async init(){try{await this.wrapFS(ie.init(this.getRepo()))}catch(r){throw this.plugin.displayError(r),r}}async clone(r,n,i){let a=this.showNotice("Initializing clone");try{await this.wrapFS(ie.clone({...this.getRepo(),dir:n,url:r,depth:i,onProgress:s=>{a!==void 0&&(a.noticeEl.innerText=this.getProgressText("Cloning",s))}})),a==null||a.hide()}catch(s){throw a==null||a.hide(),this.plugin.displayError(s),s}}async setConfig(r,n){try{return this.wrapFS(ie.setConfig({...this.getRepo(),path:r,value:n}))}catch(i){throw this.plugin.displayError(i),i}}async getConfig(r){try{return this.wrapFS(ie.getConfig({...this.getRepo(),path:r}))}catch(n){throw this.plugin.displayError(n),n}}async fetch(r){let n=this.showNotice("Initializing fetch");try{let i={...this.getRepo(),onProgress:a=>{n!==void 0&&(n.noticeEl.innerText=this.getProgressText("Fetching",a))},remote:r!=null?r:await this.getCurrentRemote()};await this.wrapFS(ie.fetch(i)),n==null||n.hide()}catch(i){throw this.plugin.displayError(i),n==null||n.hide(),i}}async setRemote(r,n){try{await this.wrapFS(ie.addRemote({...this.getRepo(),remote:r,url:n,force:!0}))}catch(i){throw this.plugin.displayError(i),i}}async getRemoteBranches(r){let n=[];return n.push(...await this.wrapFS(ie.listBranches({...this.getRepo(),remote:r}))),n.remove("HEAD"),n=n.map(i=>`${r}/${i}`),n}async getRemotes(){return(await this.wrapFS(ie.listRemotes({...this.getRepo()}))).map(r=>r.remote)}async removeRemote(r){await this.wrapFS(ie.deleteRemote({...this.getRepo(),remote:r}))}async getRemoteUrl(r){var n;return(n=(await this.wrapFS(ie.listRemotes({...this.getRepo()}))).filter(i=>i.remote==r)[0])==null?void 0:n.url}async log(r,n=!0,i,a){let s=await this.wrapFS(ie.log({...this.getRepo(),depth:i,ref:a}));return Promise.all(s.map(async o=>{let c=o.commit.message.split(` +`});return t?r.pop():r.push(r.pop().slice(0,-1)),r}var Sa=require("obsidian");g();var $i=require("obsidian"),Hf=class{constructor(t,r){this.plugin=r;this.promises={};this.adapter=t.adapter,this.vault=t,this.lastBasePath=this.plugin.settings.basePath,this.promises.readFile=this.readFile.bind(this),this.promises.writeFile=this.writeFile.bind(this),this.promises.readdir=this.readdir.bind(this),this.promises.mkdir=this.mkdir.bind(this),this.promises.rmdir=this.rmdir.bind(this),this.promises.stat=this.stat.bind(this),this.promises.unlink=this.unlink.bind(this),this.promises.lstat=this.lstat.bind(this),this.promises.readlink=this.readlink.bind(this),this.promises.symlink=this.symlink.bind(this)}async readFile(t,r){var n;if(this.maybeLog("Read: "+t+JSON.stringify(r)),r=="utf8"||r.encoding=="utf8"){let i=this.vault.getAbstractFileByPath(t);return i instanceof $i.TFile?(this.maybeLog("Reuse"),this.vault.read(i)):this.adapter.read(t)}else{if(t.endsWith(this.gitDir+"/index"))return this.plugin.settings.basePath!=this.lastBasePath?(this.clearIndex(),this.lastBasePath=this.plugin.settings.basePath,this.adapter.readBinary(t)):(n=this.index)!=null?n:this.adapter.readBinary(t);let i=this.vault.getAbstractFileByPath(t);return i instanceof $i.TFile?(this.maybeLog("Reuse"),this.vault.readBinary(i)):this.adapter.readBinary(t)}}async writeFile(t,r){if(this.maybeLog("Write: "+t),typeof r=="string"){let n=this.vault.getAbstractFileByPath(t);return n instanceof $i.TFile?this.vault.modify(n,r):this.adapter.write(t,r)}else if(t.endsWith(this.gitDir+"/index"))this.index=r,this.indexmtime=Date.now();else{let n=this.vault.getAbstractFileByPath(t);return n instanceof $i.TFile?this.vault.modifyBinary(n,r):this.adapter.writeBinary(t,r)}}async readdir(t){t==="."&&(t="/");let r=await this.adapter.list(t),n=[...r.files,...r.folders],i;return t!=="/"?i=n.map(a=>(0,$i.normalizePath)(a.substring(t.length))):i=n,i}async mkdir(t){return this.adapter.mkdir(t)}async rmdir(t,r){var n,i;return this.adapter.rmdir(t,(i=(n=r==null?void 0:r.options)==null?void 0:n.recursive)!=null?i:!1)}async stat(t){if(t.endsWith(this.gitDir+"/index")){if(this.index!==void 0&&this.indexctime!=null&&this.indexmtime!=null)return{isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1,size:this.index.length,type:"file",ctimeMs:this.indexctime,mtimeMs:this.indexmtime};{let n=await this.adapter.stat(t);if(n==null)throw{code:"ENOENT"};return this.indexctime=n.ctime,this.indexmtime=n.mtime,{ctimeMs:n.ctime,mtimeMs:n.mtime,size:n.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1}}}t==="."&&(t="/");let r=this.vault.getAbstractFileByPath(t);if(this.maybeLog("Stat: "+t),r instanceof $i.TFile)return this.maybeLog("Reuse stat"),{ctimeMs:r.stat.ctime,mtimeMs:r.stat.mtime,size:r.stat.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1};{let n=await this.adapter.stat(t);if(n)return{ctimeMs:n.ctime,mtimeMs:n.mtime,size:n.size,type:n.type==="folder"?"directory":n.type,isFile:()=>n.type==="file",isDirectory:()=>n.type==="folder",isSymbolicLink:()=>!1};throw{code:"ENOENT"}}}async unlink(t){return this.adapter.remove(t)}async lstat(t){return this.stat(t)}async readlink(t){throw new Error(`readlink of (${t}) is not implemented.`)}async symlink(t){throw new Error(`symlink of (${t}) is not implemented.`)}async saveAndClear(){this.index!==void 0&&await this.adapter.writeBinary(this.plugin.gitManager.getRelativeVaultPath(this.gitDir+"/index"),this.index,{ctime:this.indexctime,mtime:this.indexmtime}),this.clearIndex()}clearIndex(){this.index=void 0,this.indexctime=void 0,this.indexmtime=void 0}get gitDir(){return this.plugin.settings.gitDir||".git"}maybeLog(t){}};var sn=class extends Ys{constructor(r){super(r);this.FILE=0;this.HEAD=1;this.WORKDIR=2;this.STAGE=3;this.status_mapping={"000":" ","003":"AD","020":"??","022":"A ","023":"AM",100:"D ",101:" D",103:"MD",110:"DA",111:" ",113:"MM",120:"DA",121:" M",122:"M ",123:"MM"};this.noticeLength=999999;this.fs=new Hf(this.app.vault,this.plugin)}getRepo(){return{fs:this.fs,dir:this.plugin.settings.basePath,gitdir:this.plugin.settings.gitDir||void 0,onAuth:()=>{var r,n;return{username:(r=this.plugin.localStorage.getUsername())!=null?r:void 0,password:(n=this.plugin.localStorage.getPassword())!=null?n:void 0}},onAuthFailure:async()=>{new Sa.Notice("Authentication failed. Please try with different credentials");let r=await new $e(this.plugin,{placeholder:"Specify your username"}).openAndGetResult();if(r){let n=await new $e(this.plugin,{placeholder:"Specify your password/personal access token"}).openAndGetResult();if(n)return this.plugin.localStorage.setUsername(r),this.plugin.localStorage.setPassword(n),{username:r,password:n}}return{cancel:!0}},http:{async request({url:r,method:n,headers:i,body:a}){let s;a&&(s=(await rj(a)).buffer);let o=await(0,Sa.requestUrl)({url:r,method:n,headers:i,body:s,throw:!1});return{url:r,method:n,headers:o.headers,body:[new Uint8Array(o.arrayBuffer)],statusCode:o.status,statusMessage:o.status.toString()}}}}}async wrapFS(r){try{let n=await r;return await this.fs.saveAndClear(),n}catch(n){throw await this.fs.saveAndClear(),n}}async status(){let r,n=window.setTimeout(()=>{r=new Sa.Notice("This takes longer: Getting status",this.noticeLength)},2e4);try{this.plugin.setPluginState({gitAction:1});let i=(await this.wrapFS(ie.statusMatrix({...this.getRepo()}))).map(l=>this.getFileStatusResult(l)),a=i.filter(l=>l.workingDir!==" "),s=i.filter(l=>l.index!==" "&&l.index!=="U"),o=[];return window.clearTimeout(n),r==null||r.hide(),{all:i,changed:a,staged:s,conflicted:o}}catch(i){throw window.clearTimeout(n),r==null||r.hide(),this.plugin.displayError(i),i}}async commitAll({message:r,status:n,unstagedFiles:i}){try{return await this.checkAuthorInfo(),await this.stageAll({status:n,unstagedFiles:i}),this.commit({message:r})}catch(a){throw this.plugin.displayError(a),a}}async commit({message:r}){try{await this.checkAuthorInfo(),this.plugin.setPluginState({gitAction:4});let n=await this.formatCommitMessage(r),i=this.plugin.localStorage.getConflict(),a;if(i){let s=await this.branchInfo();a=[s.current,s.tracking]}await this.wrapFS(ie.commit({...this.getRepo(),message:n,parent:a})),this.plugin.localStorage.setConflict(!1);return}catch(n){throw this.plugin.displayError(n),n}}async stage(r,n){let i=this.getRelativeRepoPath(r,n),a;n?a=r:a=this.getRelativeVaultPath(r);try{this.plugin.setPluginState({gitAction:3}),await this.app.vault.adapter.exists(a)?await this.wrapFS(ie.add({...this.getRepo(),filepath:i})):await this.wrapFS(ie.remove({...this.getRepo(),filepath:i}))}catch(s){throw this.plugin.displayError(s),s}}async stageAll({dir:r,status:n,unstagedFiles:i}){try{if(n)await Promise.all(n.changed.map(a=>a.workingDir!=="D"?this.wrapFS(ie.add({...this.getRepo(),filepath:a.path})):ie.remove({...this.getRepo(),filepath:a.path})));else{let a=i!=null?i:await this.getUnstagedFiles(r!=null?r:".");await Promise.all(a.map(({path:s,deleted:o})=>o?ie.remove({...this.getRepo(),filepath:s}):this.wrapFS(ie.add({...this.getRepo(),filepath:s}))))}}catch(a){throw this.plugin.displayError(a),a}}async unstage(r,n){try{this.plugin.setPluginState({gitAction:3}),r=this.getRelativeRepoPath(r,n),await this.wrapFS(ie.resetIndex({...this.getRepo(),filepath:r}))}catch(i){throw this.plugin.displayError(i),i}}async unstageAll({dir:r,status:n}){try{let i;n?i=n.staged.map(a=>a.path):i=(await this.getStagedFiles(r!=null?r:".")).map(({path:s})=>s),await this.wrapFS(Promise.all(i.map(a=>ie.resetIndex({...this.getRepo(),filepath:a}))))}catch(i){throw this.plugin.displayError(i),i}}async discard(r){try{this.plugin.setPluginState({gitAction:3}),await this.wrapFS(ie.checkout({...this.getRepo(),filepaths:[r],force:!0}))}catch(n){throw this.plugin.displayError(n),n}}async discardAll({dir:r,status:n}){let i=[];n?r!=null?i=n.changed.filter(a=>a.path.startsWith(r)).map(a=>a.path):i=n.changed.map(a=>a.path):i=(await this.getUnstagedFiles(r)).map(({path:a})=>a);try{await this.wrapFS(ie.checkout({...this.getRepo(),filepaths:i,force:!0}))}catch(a){throw this.plugin.displayError(a),a}}getProgressText(r,n){let i=`${r} progress:`;return n.phase&&(i=`${i} ${n.phase}:`),n.loaded&&(i=`${i} ${n.loaded}`,n.total&&(i=`${i} of ${n.total}`)),i}resolveRef(r){return this.wrapFS(ie.resolveRef({...this.getRepo(),ref:r}))}async pull(){let r=this.showNotice("Initializing pull");try{this.plugin.setPluginState({gitAction:2});let n=await this.resolveRef("HEAD");await this.fetch();let i=await this.branchInfo();await this.checkAuthorInfo(),(await this.wrapFS(ie.merge({...this.getRepo(),ours:i.current,theirs:i.tracking,abortOnConflict:!1}))).alreadyMerged||await this.wrapFS(ie.checkout({...this.getRepo(),ref:i.current,onProgress:l=>{r!==void 0&&(r.noticeEl.innerText=this.getProgressText("Checkout",l))},remote:i.remote})),r==null||r.hide();let s=await this.resolveRef("HEAD"),o=await this.getFileChangesCount(n,s);return this.showNotice("Finished pull",!1),o.map(l=>({path:l.path,workingDir:"P",index:"P",vaultPath:this.getRelativeVaultPath(l.path)}))}catch(n){throw r==null||r.hide(),n instanceof wl.MergeConflictError&&await this.plugin.handleConflict(n.data.filepaths.map(i=>this.getRelativeVaultPath(i))),this.plugin.displayError(n),n}}async push(){if(!await this.canPush())return 0;let r=this.showNotice("Initializing push");try{this.plugin.setPluginState({gitAction:1});let n=await this.branchInfo(),i=n.tracking,a=n.current,s=(await this.getFileChangesCount(a,i)).length;return this.plugin.setPluginState({gitAction:5}),await this.wrapFS(ie.push({...this.getRepo(),onProgress:o=>{r!==void 0&&(r.noticeEl.innerText=this.getProgressText("Pushing",o))}})),r==null||r.hide(),s}catch(n){throw r==null||r.hide(),this.plugin.displayError(n),n}}async getUnpushedCommits(){let r=await this.branchInfo(),n=r.tracking,i=r.current;if(n==null||i==null)return 0;let a=await this.resolveRef(i),s=await this.resolveRef(n);return(await this.getFileChangesCount(a,s)).length}async canPush(){let r=await this.branchInfo(),n=r.tracking,i=r.current,a=await this.resolveRef(i),s=await this.resolveRef(n);return a!=s}async checkRequirements(){return await this.plugin.app.vault.adapter.exists(`${this.getRepo().dir}/.git/HEAD`)?"valid":"missing-repo"}async branchInfo(){var r,n;try{let i=await ie.currentBranch(this.getRepo())||"",a=await ie.listBranches(this.getRepo()),s=(r=await this.getConfig(`branch.${i}.remote`))!=null?r:"origin",o=(n=await this.getConfig(`branch.${i}.merge`))==null?void 0:n.split("refs/heads")[1],l=o?s+o:void 0;return{current:i,tracking:l,branches:a,remote:s}}catch(i){throw this.plugin.displayError(i),i}}async getCurrentRemote(){var i;let r=await ie.currentBranch(this.getRepo())||"";return(i=await this.getConfig(`branch.${r}.remote`))!=null?i:"origin"}async checkout(r,n){try{return this.wrapFS(ie.checkout({...this.getRepo(),ref:r,force:!!n,remote:n}))}catch(i){throw this.plugin.displayError(i),i}}async createBranch(r){try{await this.wrapFS(ie.branch({...this.getRepo(),ref:r,checkout:!0}))}catch(n){throw this.plugin.displayError(n),n}}async deleteBranch(r){try{await this.wrapFS(ie.deleteBranch({...this.getRepo(),ref:r}))}catch(n){throw this.plugin.displayError(n),n}}branchIsMerged(r){return Promise.resolve(!0)}async init(){try{await this.wrapFS(ie.init(this.getRepo()))}catch(r){throw this.plugin.displayError(r),r}}async clone(r,n,i){let a=this.showNotice("Initializing clone");try{await this.wrapFS(ie.clone({...this.getRepo(),dir:n,url:r,depth:i,onProgress:s=>{a!==void 0&&(a.noticeEl.innerText=this.getProgressText("Cloning",s))}})),a==null||a.hide()}catch(s){throw a==null||a.hide(),this.plugin.displayError(s),s}}async setConfig(r,n){try{return this.wrapFS(ie.setConfig({...this.getRepo(),path:r,value:n}))}catch(i){throw this.plugin.displayError(i),i}}async getConfig(r){try{return this.wrapFS(ie.getConfig({...this.getRepo(),path:r}))}catch(n){throw this.plugin.displayError(n),n}}async fetch(r){let n=this.showNotice("Initializing fetch");try{let i={...this.getRepo(),onProgress:a=>{n!==void 0&&(n.noticeEl.innerText=this.getProgressText("Fetching",a))},remote:r!=null?r:await this.getCurrentRemote()};await this.wrapFS(ie.fetch(i)),n==null||n.hide()}catch(i){throw this.plugin.displayError(i),n==null||n.hide(),i}}async setRemote(r,n){try{await this.wrapFS(ie.addRemote({...this.getRepo(),remote:r,url:n,force:!0}))}catch(i){throw this.plugin.displayError(i),i}}async getRemoteBranches(r){let n=[];return n.push(...await this.wrapFS(ie.listBranches({...this.getRepo(),remote:r}))),n.remove("HEAD"),n=n.map(i=>`${r}/${i}`),n}async getRemotes(){return(await this.wrapFS(ie.listRemotes({...this.getRepo()}))).map(r=>r.remote)}async removeRemote(r){await this.wrapFS(ie.deleteRemote({...this.getRepo(),remote:r}))}async getRemoteUrl(r){var n;return(n=(await this.wrapFS(ie.listRemotes({...this.getRepo()}))).filter(i=>i.remote==r)[0])==null?void 0:n.url}async log(r,n=!0,i,a){let s=await this.wrapFS(ie.log({...this.getRepo(),depth:i,ref:a}));return Promise.all(s.map(async o=>{let l=o.commit.message.split(` -`);return{message:c[0],author:{name:o.commit.author.name,email:o.commit.author.email},body:c.slice(1).join(` +`);return{message:l[0],author:{name:o.commit.author.name,email:o.commit.author.email},body:l.slice(1).join(` -`),date:new Date(o.commit.committer.timestamp).toDateString(),diff:{changed:0,files:(await this.getFileChangesCount(o.commit.parent.first(),o.oid)).map(l=>({path:l.path,status:l.type,vaultPath:this.getRelativeVaultPath(l.path),hash:o.oid}))},hash:o.oid,refs:[]}}))}updateBasePath(r){return this.getRepo().dir=r,Promise.resolve()}async updateUpstreamBranch(r){let[n,i]=Ii(r),a=await this.branchInfo();await this.wrapFS(ie.push({...this.getRepo(),remote:n,remoteRef:i})),await this.setConfig(`branch.${a.current}.merge`,`refs/heads/${i}`)}updateGitPath(r){return Promise.resolve()}async getFileChangesCount(r,n){return this.walkDifference({walkers:[ie.TREE({ref:r}),ie.TREE({ref:n})]})}async walkDifference({walkers:r,dir:n}){return await this.wrapFS(ie.walk({...this.getRepo(),trees:r,map:async function(a,[s,o]){if(!Ug(a,n))return null;if(await(s==null?void 0:s.type())==="tree"||await(o==null?void 0:o.type())==="tree")return;let c=await(s==null?void 0:s.oid()),l=await(o==null?void 0:o.oid()),u="equal";if(c!==l&&(u="M"),c===void 0&&(u="A"),l===void 0&&(u="D"),c===void 0&&l===void 0&&(console.log("Something weird happened:"),console.log(s),console.log(o)),u!=="equal")return{path:a,type:u}}}))}async getStagedFiles(r="."){return(await this.walkDifference({walkers:[ie.TREE({ref:"HEAD"}),ie.STAGE()],dir:r})).map(i=>({vaultPath:this.getRelativeVaultPath(i.path),path:i.path}))}async getUnstagedFiles(r="."){let n,i=window.setTimeout(()=>{n=new _a.Notice("This takes longer: Getting status",this.noticeLength)},2e4);try{let a=this.getRepo(),s=await this.wrapFS(ie.walk({...a,trees:[ie.WORKDIR(),ie.STAGE()],map:async function(o,[c,l]){if(!l&&c&&await ie.isIgnored({...a,filepath:o})||!Ug(o,r))return null;let[u,f]=await Promise.all([c&&c.type(),l&&l.type()]),d=[u,f].includes("blob");if((u==="tree"||u==="special")&&!d)return;if(f==="commit")return null;if((f==="tree"||f==="special")&&!d)return;let h=f==="blob"?await l.oid():void 0,p;return u==="blob"&&f!=="blob"?p="42":u==="blob"&&(p=await c.oid()),p?p!==h?{path:o,deleted:!1}:null:{path:o,deleted:!0}}}));return window.clearTimeout(i),n==null||n.hide(),s}catch(a){throw window.clearTimeout(i),n==null||n.hide(),this.plugin.displayError(a),a}}async getDiffString(r,n=!1,i){let a=this.getRelativeVaultPath(r),s=async(l,[u])=>{if(r==l){let f=await u.oid();return(await ie.readBlob({...this.getRepo(),oid:f})).blob}};if(i){let l=await wl({...this.getRepo(),filepath:r,oid:i}).then(h=>new TextDecoder().decode(h.blob)).catch(h=>{if(!(h instanceof ie.Errors.NotFoundError))throw h}),u=await ie.readCommit({...this.getRepo(),oid:i}),f=await wl({...this.getRepo(),filepath:r,oid:u.commit.parent.first()}).then(h=>new TextDecoder().decode(h.blob)).catch(h=>{if(!(h instanceof ie.Errors.NotFoundError))throw h});return Uf(a,f!=null?f:"",l!=null?l:"")}let o=(await ie.walk({...this.getRepo(),trees:[ie.STAGE()],map:s})).first(),c=new TextDecoder().decode(o);if(n){let l=await this.resolveRef("HEAD").then(f=>wl({...this.getRepo(),filepath:r,oid:f})).then(f=>new TextDecoder().decode(f.blob)).catch(f=>{if(!(f instanceof ie.Errors.NotFoundError))throw f});return Uf(a,l!=null?l:"",c)}else{let l;return await this.app.vault.adapter.exists(a)?l=await this.app.vault.adapter.read(a):l="",Uf(a,c,l)}}async getLastCommitTime(){let r=this.getRepo(),n=await this.resolveRef("HEAD"),a=(await ie.readCommit({...r,oid:n})).commit.committer.timestamp;return new Date(a*1e3)}getFileStatusResult(r){let n=this.status_mapping[`${r[this.HEAD]}${r[this.WORKDIR]}${r[this.STAGE]}`];return{index:n[0]=="?"?"U":n[0],workingDir:n[1]=="?"?"U":n[1],path:r[this.FILE],vaultPath:this.getRelativeVaultPath(r[this.FILE])}}async checkAuthorInfo(){let r=await this.getConfig("user.name"),n=await this.getConfig("user.email");if(!r||!n)throw Error("Git author name and email are not set. Please set both fields in the settings.")}showNotice(r,n=!0){if(!this.plugin.settings.disablePopups)return new _a.Notice(r,n?this.noticeLength:void 0)}};function Xj(e){let t=[e];return{next(){return Promise.resolve({done:t.length===0,value:t.pop()})},return(){return t=[],{}},[Symbol.asyncIterator](){return this}}}function Zj(e){return e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]?e[Symbol.iterator]():e.next?e:Xj(e)}async function Kj(e,t){let r=Zj(e);for(;;){let{value:n,done:i}=await r.next();if(n&&await t(n),i)break}r.return&&r.return()}async function Jj(e){let t=0,r=[];await Kj(e,a=>{r.push(a),t+=a.byteLength});let n=new Uint8Array(t),i=0;for(let a of r)n.set(a,i),i+=a.byteLength;return n}var Qj="https://momentjs.com/docs/#/parsing/string-format/",eB="https://publish.obsidian.md/git-doc/Line+Authoring",zf=class extends V.PluginSettingTab{constructor(r,n){super(r,n);this.plugin=n;this.lineAuthorColorSettings=new Map}get settings(){return this.plugin.settings}display(){let{containerEl:r}=this,n=this.plugin,i;n.settings.differentIntervalCommitAndPush?i="commit":i="commit-and-sync";let a=n.gitReady;r.empty(),a||(r.createEl("p",{text:"Git is not ready. When all settings are correct you can configure commit-sync, etc."}),r.createEl("br"));let s;if(a){new V.Setting(r).setName("Automatic").setHeading(),new V.Setting(r).setName("Split timers for automatic commit and sync").setDesc("Enable to use one interval for commit and another for sync.").addToggle(u=>u.setValue(n.settings.differentIntervalCommitAndPush).onChange(async f=>{n.settings.differentIntervalCommitAndPush=f,await n.saveSettings(),n.automaticsManager.reload("commit","push"),this.display()})),new V.Setting(r).setName(`Auto ${i} interval (minutes)`).setDesc(`${n.settings.differentIntervalCommitAndPush?"Commit":"Commit and sync"} changes every X minutes. Set to 0 (default) to disable. (See below setting for further configuration!)`).addText(u=>{u.inputEl.type="number",u.setValue(String(n.settings.autoSaveInterval)),u.setPlaceholder(String(ar.autoSaveInterval)),u.onChange(async f=>{n.settings.autoSaveInterval=Number(f),await n.saveSettings(),n.automaticsManager.reload("commit")})}),s=new V.Setting(r).setName(`Auto ${i} after stopping file edits`).setDesc(`Requires the ${i} interval not to be 0. - If turned on, do auto ${i} every ${pT(n.settings.autoSaveInterval)} after stopping file edits. - This also prevents auto ${i} while editing a file. If turned off, it's independent from the last file edit.`).addToggle(u=>u.setValue(n.settings.autoBackupAfterFileChange).onChange(async f=>{n.settings.autoBackupAfterFileChange=f,this.display(),await n.saveSettings(),n.automaticsManager.reload("commit")})),this.mayDisableSetting(s,n.settings.setLastSaveToLastCommit),s=new V.Setting(r).setName(`Auto ${i} after latest commit`).setDesc(`If turned on, sets last auto ${i} timestamp to the latest commit timestamp. This reduces the frequency of auto ${i} when doing manual commits.`).addToggle(u=>u.setValue(n.settings.setLastSaveToLastCommit).onChange(async f=>{n.settings.setLastSaveToLastCommit=f,await n.saveSettings(),n.automaticsManager.reload("commit"),this.display()})),this.mayDisableSetting(s,n.settings.autoBackupAfterFileChange),s=new V.Setting(r).setName("Auto push interval (minutes)").setDesc("Push commits every X minutes. Set to 0 (default) to disable.").addText(u=>{u.inputEl.type="number",u.setValue(String(n.settings.autoPushInterval)),u.setPlaceholder(String(ar.autoPushInterval)),u.onChange(async f=>{n.settings.autoPushInterval=Number(f),await n.saveSettings(),n.automaticsManager.reload("push")})}),this.mayDisableSetting(s,!n.settings.differentIntervalCommitAndPush),new V.Setting(r).setName("Auto pull interval (minutes)").setDesc("Pull changes every X minutes. Set to 0 (default) to disable.").addText(u=>{u.inputEl.type="number",u.setValue(String(n.settings.autoPullInterval)),u.setPlaceholder(String(ar.autoPullInterval)),u.onChange(async f=>{n.settings.autoPullInterval=Number(f),await n.saveSettings(),n.automaticsManager.reload("pull")})}),new V.Setting(r).setName(`Specify custom commit message on auto ${i}`).setDesc("You will get a pop up to specify your message.").addToggle(u=>u.setValue(n.settings.customMessageOnAutoBackup).onChange(async f=>{n.settings.customMessageOnAutoBackup=f,await n.saveSettings(),this.display()})),s=new V.Setting(r).setName(`Commit message on auto ${i}`).setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(u=>u.setPlaceholder("vault backup: {{date}}").setValue(n.settings.autoCommitMessage).onChange(async f=>{n.settings.autoCommitMessage=f,await n.saveSettings()})),this.mayDisableSetting(s,n.settings.customMessageOnAutoBackup),new V.Setting(r).setName("Commit message").setHeading(),new V.Setting(r).setName("Commit message on manual commit").setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(u=>u.setPlaceholder("vault backup: {{date}}").setValue(n.settings.commitMessage?n.settings.commitMessage:"").onChange(async f=>{n.settings.commitMessage=f,await n.saveSettings()}));let l=new V.Setting(r).setName("{{date}} placeholder format").addMomentFormat(u=>u.setDefaultFormat(n.settings.commitDateFormat).setValue(n.settings.commitDateFormat).onChange(async f=>{n.settings.commitDateFormat=f,await n.saveSettings()}));l.descEl.innerHTML=` - Specify custom date format. E.g. "${_m}. See Moment.js for more formats.`,new V.Setting(r).setName("{{hostname}} placeholder replacement").setDesc("Specify custom hostname for every device.").addText(u=>{var f;return u.setValue((f=n.localStorage.getHostname())!=null?f:"").onChange(d=>{n.localStorage.setHostname(d)})}),new V.Setting(r).setName("Preview commit message").addButton(u=>u.setButtonText("Preview").onClick(async()=>{let f=await n.gitManager.formatCommitMessage(n.settings.commitMessage);new V.Notice(`${f}`)})),new V.Setting(r).setName("List filenames affected by commit in the commit body").addToggle(u=>u.setValue(n.settings.listChangedFilesInMessageBody).onChange(async f=>{n.settings.listChangedFilesInMessageBody=f,await n.saveSettings()})),new V.Setting(r).setName("Pull").setHeading(),n.gitManager instanceof Te&&new V.Setting(r).setName("Merge strategy").setDesc("Decide how to integrate commits from your remote branch into your local branch.").addDropdown(u=>{let f={merge:"Merge",rebase:"Rebase",reset:"Other sync service (Only updates the HEAD without touching the working directory)"};u.addOptions(f),u.setValue(n.settings.syncMethod),u.onChange(async d=>{n.settings.syncMethod=d,await n.saveSettings()})}),new V.Setting(r).setName("Pull on startup").setDesc("Automatically pull commits when Obsidian starts.").addToggle(u=>u.setValue(n.settings.autoPullOnBoot).onChange(async f=>{n.settings.autoPullOnBoot=f,await n.saveSettings()})),new V.Setting(r).setName("Commit-and-sync").setDesc("Commit-and-sync with default settings means staging everything -> committing -> pulling -> pushing. Ideally this is a single action that you do regularly to keep your local and remote repository in sync.").setHeading(),s=new V.Setting(r).setName("Push on commit-and-sync").setDesc(`Most of the time you want to push after committing. Turning this off turns a commit-and-sync action into commit ${n.settings.pullBeforePush?"and pull ":""}only. It will still be called commit-and-sync.`).addToggle(u=>u.setValue(!n.settings.disablePush).onChange(async f=>{n.settings.disablePush=!f,this.display(),await n.saveSettings()})),new V.Setting(r).setName("Pull on commit-and-sync").setDesc(`On commit-and-sync, pull commits as well. Turning this off turns a commit-and-sync action into commit ${n.settings.disablePush?"":"and push "}only.`).addToggle(u=>u.setValue(n.settings.pullBeforePush).onChange(async f=>{n.settings.pullBeforePush=f,this.display(),await n.saveSettings()})),n.gitManager instanceof Te&&(new V.Setting(r).setName("Line author information").setHeading(),this.addLineAuthorInfoSettings())}new V.Setting(r).setName("History view").setHeading(),new V.Setting(r).setName("Show Author").setDesc("Show the author of the commit in the history view.").addDropdown(l=>{let u={hide:"Hide",full:"Full",initials:"Initials"};l.addOptions(u),l.setValue(n.settings.authorInHistoryView),l.onChange(async f=>{n.settings.authorInHistoryView=f,await n.saveSettings(),await n.refresh()})}),new V.Setting(r).setName("Show Date").setDesc("Show the date of the commit in the history view. The {{date}} placeholder format is used to display the date.").addToggle(l=>l.setValue(n.settings.dateInHistoryView).onChange(async u=>{n.settings.dateInHistoryView=u,await n.saveSettings(),await n.refresh()})),new V.Setting(r).setName("Source control view").setHeading(),new V.Setting(r).setName("Automatically refresh source control view on file changes").setDesc("On slower machines this may cause lags. If so, just disable this option.").addToggle(l=>l.setValue(n.settings.refreshSourceControl).onChange(async u=>{n.settings.refreshSourceControl=u,await n.saveSettings()})),new V.Setting(r).setName("Source control view refresh interval").setDesc("Milliseconds to wait after file change before refreshing the Source Control View.").addText(l=>{l.inputEl.type="number",l.setValue(String(n.settings.refreshSourceControlTimer)),l.setPlaceholder(String(ar.refreshSourceControlTimer)),l.onChange(async u=>{n.settings.refreshSourceControlTimer=Math.max(Number(u),500),await n.saveSettings(),n.setRefreshDebouncer()})}),new V.Setting(r).setName("Miscellaneous").setHeading(),n.gitManager instanceof Te&&new V.Setting(r).setName("Diff view style").setDesc('Set the style for the diff view. Note that the actual diff in "Split" mode is not generated by Git, but the editor itself instead so it may differ from the diff generated by Git. One advantage of this is that you can edit the text in that view.').addDropdown(l=>{let u={split:"Split",git_unified:"Unified"};l.addOptions(u),l.setValue(n.settings.diffStyle),l.onChange(async f=>{n.settings.diffStyle=f,await n.saveSettings()})}),new V.Setting(r).setName("Disable notifications").setDesc("Disable notifications for git operations to minimize distraction (refer to status bar for updates). Errors are still shown as notifications even if you enable this setting.").addToggle(l=>l.setValue(n.settings.disablePopups).onChange(async u=>{n.settings.disablePopups=u,this.display(),await n.saveSettings()})),n.settings.disablePopups||new V.Setting(r).setName("Hide notifications for no changes").setDesc("Don't show notifications when there are no changes to commit or push.").addToggle(l=>l.setValue(n.settings.disablePopupsForNoChanges).onChange(async u=>{n.settings.disablePopupsForNoChanges=u,await n.saveSettings()})),new V.Setting(r).setName("Show status bar").setDesc("Obsidian must be restarted for the changes to take affect.").addToggle(l=>l.setValue(n.settings.showStatusBar).onChange(async u=>{n.settings.showStatusBar=u,await n.saveSettings()})),new V.Setting(r).setName("Show stage/unstage button in file menu").addToggle(l=>l.setValue(n.settings.showFileMenu).onChange(async u=>{n.settings.showFileMenu=u,await n.saveSettings()})),new V.Setting(r).setName("Show branch status bar").setDesc("Obsidian must be restarted for the changes to take affect.").addToggle(l=>l.setValue(n.settings.showBranchStatusBar).onChange(async u=>{n.settings.showBranchStatusBar=u,await n.saveSettings()})),new V.Setting(r).setName("Show the count of modified files in the status bar").addToggle(l=>l.setValue(n.settings.changedFilesInStatusBar).onChange(async u=>{n.settings.changedFilesInStatusBar=u,await n.saveSettings()})),n.gitManager instanceof an?new V.Setting(r).setName("Authentication/commit author").setHeading():new V.Setting(r).setName("Commit author").setHeading(),n.gitManager instanceof an&&new V.Setting(r).setName("Username on your git server. E.g. your username on GitHub").addText(l=>{var u;l.setValue((u=n.localStorage.getUsername())!=null?u:""),l.onChange(f=>{n.localStorage.setUsername(f)})}),n.gitManager instanceof an&&new V.Setting(r).setName("Password/Personal access token").setDesc("Type in your password. You won't be able to see it again.").addText(l=>{l.inputEl.autocapitalize="off",l.inputEl.autocomplete="off",l.inputEl.spellcheck=!1,l.onChange(u=>{n.localStorage.setPassword(u)})}),n.gitReady&&new V.Setting(r).setName("Author name for commit").addText(async l=>{var u;l.setValue((u=await n.gitManager.getConfig("user.name"))!=null?u:""),l.onChange(async f=>{await n.gitManager.setConfig("user.name",f==""?void 0:f)})}),n.gitReady&&new V.Setting(r).setName("Author email for commit").addText(async l=>{var u;l.setValue((u=await n.gitManager.getConfig("user.email"))!=null?u:""),l.onChange(async f=>{await n.gitManager.setConfig("user.email",f==""?void 0:f)})}),new V.Setting(r).setName("Advanced").setDesc("These settings usually don't need to be changed, but may be requried for special setups.").setHeading(),n.gitManager instanceof Te&&(new V.Setting(r).setName("Update submodules").setDesc('"Commit-and-sync" and "pull" takes care of submodules. Missing features: Conflicted files, count of pulled/pushed/committed files. Tracking branch needs to be set for each submodule.').addToggle(l=>l.setValue(n.settings.updateSubmodules).onChange(async u=>{n.settings.updateSubmodules=u,await n.saveSettings()})),n.settings.updateSubmodules&&new V.Setting(r).setName("Submodule recurse checkout/switch").setDesc("Whenever a checkout happens on the root repository, recurse the checkout on the submodules (if the branches exist).").addToggle(l=>l.setValue(n.settings.submoduleRecurseCheckout).onChange(async u=>{n.settings.submoduleRecurseCheckout=u,await n.saveSettings()}))),n.gitManager instanceof Te&&new V.Setting(r).setName("Custom Git binary path").addText(l=>{var u;l.setValue((u=n.localStorage.getGitPath())!=null?u:""),l.setPlaceholder("git"),l.onChange(f=>{n.localStorage.setGitPath(f),n.gitManager.updateGitPath(f||"git").catch(d=>n.displayError(d))})}),n.gitManager instanceof Te&&new V.Setting(r).setName("Additional environment variables").setDesc("Use each line for a new environment variable in the format KEY=VALUE .").addTextArea(l=>{l.setPlaceholder("GIT_DIR=/path/to/git/dir"),l.setValue(n.localStorage.getEnvVars().join(` -`)),l.onChange(u=>{n.localStorage.setEnvVars(u.split(` -`))})}),n.gitManager instanceof Te&&new V.Setting(r).setName("Additional PATH environment variable paths").setDesc("Use each line for one path").addTextArea(l=>{l.setValue(n.localStorage.getPATHPaths().join(` -`)),l.onChange(u=>{n.localStorage.setPATHPaths(u.split(` -`))})}),n.gitManager instanceof Te&&new V.Setting(r).setName("Reload with new environment variables").setDesc("Removing previously added environment variables will not take effect until Obsidian is restarted.").addButton(l=>{l.setButtonText("Reload"),l.setCta(),l.onClick(async()=>{await n.gitManager.setGitInstance()})}),new V.Setting(r).setName("Custom base path (Git repository path)").setDesc(` +`),date:new Date(o.commit.committer.timestamp).toDateString(),diff:{changed:0,files:(await this.getFileChangesCount(o.commit.parent.first(),o.oid)).map(c=>({path:c.path,status:c.type,vaultPath:this.getRelativeVaultPath(c.path),hash:o.oid}))},hash:o.oid,refs:[]}}))}updateBasePath(r){return this.getRepo().dir=r,Promise.resolve()}async updateUpstreamBranch(r){let[n,i]=Fi(r),a=await this.branchInfo();await this.wrapFS(ie.push({...this.getRepo(),remote:n,remoteRef:i})),await this.setConfig(`branch.${a.current}.merge`,`refs/heads/${i}`)}updateGitPath(r){return Promise.resolve()}async getFileChangesCount(r,n){return this.walkDifference({walkers:[ie.TREE({ref:r}),ie.TREE({ref:n})]})}async walkDifference({walkers:r,dir:n}){return await this.wrapFS(ie.walk({...this.getRepo(),trees:r,map:async function(a,[s,o]){if(!Gg(a,n))return null;if(await(s==null?void 0:s.type())==="tree"||await(o==null?void 0:o.type())==="tree")return;let l=await(s==null?void 0:s.oid()),c=await(o==null?void 0:o.oid()),u="equal";if(l!==c&&(u="M"),l===void 0&&(u="A"),c===void 0&&(u="D"),l===void 0&&c===void 0&&(console.log("Something weird happened:"),console.log(s),console.log(o)),u!=="equal")return{path:a,type:u}}}))}async getStagedFiles(r="."){return(await this.walkDifference({walkers:[ie.TREE({ref:"HEAD"}),ie.STAGE()],dir:r})).map(i=>({vaultPath:this.getRelativeVaultPath(i.path),path:i.path}))}async getUnstagedFiles(r="."){let n,i=window.setTimeout(()=>{n=new Sa.Notice("This takes longer: Getting status",this.noticeLength)},2e4);try{let a=this.getRepo(),s=await this.wrapFS(ie.walk({...a,trees:[ie.WORKDIR(),ie.STAGE()],map:async function(o,[l,c]){if(!c&&l&&await ie.isIgnored({...a,filepath:o})||!Gg(o,r))return null;let[u,f]=await Promise.all([l&&l.type(),c&&c.type()]),d=[u,f].includes("blob");if((u==="tree"||u==="special")&&!d)return;if(f==="commit")return null;if((f==="tree"||f==="special")&&!d)return;let h=f==="blob"?await c.oid():void 0,p;return u==="blob"&&f!=="blob"?p="42":u==="blob"&&(p=await l.oid()),p?p!==h?{path:o,deleted:!1}:null:{path:o,deleted:!0}}}));return window.clearTimeout(i),n==null||n.hide(),s}catch(a){throw window.clearTimeout(i),n==null||n.hide(),this.plugin.displayError(a),a}}async getDiffString(r,n=!1,i){let a=this.getRelativeVaultPath(r),s=async(c,[u])=>{if(r==c){let f=await u.oid();return(await ie.readBlob({...this.getRepo(),oid:f})).blob}};if(i){let c=await xl({...this.getRepo(),filepath:r,oid:i}).then(h=>new TextDecoder().decode(h.blob)).catch(h=>{if(!(h instanceof ie.Errors.NotFoundError))throw h}),u=await ie.readCommit({...this.getRepo(),oid:i}),f=await xl({...this.getRepo(),filepath:r,oid:u.commit.parent.first()}).then(h=>new TextDecoder().decode(h.blob)).catch(h=>{if(!(h instanceof ie.Errors.NotFoundError))throw h});return jf(a,f!=null?f:"",c!=null?c:"")}let o=(await ie.walk({...this.getRepo(),trees:[ie.STAGE()],map:s})).first(),l=new TextDecoder().decode(o);if(n){let c=await this.resolveRef("HEAD").then(f=>xl({...this.getRepo(),filepath:r,oid:f})).then(f=>new TextDecoder().decode(f.blob)).catch(f=>{if(!(f instanceof ie.Errors.NotFoundError))throw f});return jf(a,c!=null?c:"",l)}else{let c;return await this.app.vault.adapter.exists(a)?c=await this.app.vault.adapter.read(a):c="",jf(a,l,c)}}async getLastCommitTime(){let r=this.getRepo(),n=await this.resolveRef("HEAD"),a=(await ie.readCommit({...r,oid:n})).commit.committer.timestamp;return new Date(a*1e3)}getFileStatusResult(r){let n=this.status_mapping[`${r[this.HEAD]}${r[this.WORKDIR]}${r[this.STAGE]}`];return{index:n[0]=="?"?"U":n[0],workingDir:n[1]=="?"?"U":n[1],path:r[this.FILE],vaultPath:this.getRelativeVaultPath(r[this.FILE])}}async checkAuthorInfo(){let r=await this.getConfig("user.name"),n=await this.getConfig("user.email");if(!r||!n)throw Error("Git author name and email are not set. Please set both fields in the settings.")}showNotice(r,n=!0){if(!this.plugin.settings.disablePopups)return new Sa.Notice(r,n?this.noticeLength:void 0)}};function QB(e){let t=[e];return{next(){return Promise.resolve({done:t.length===0,value:t.pop()})},return(){return t=[],{}},[Symbol.asyncIterator](){return this}}}function ej(e){return e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]?e[Symbol.iterator]():e.next?e:QB(e)}async function tj(e,t){let r=ej(e);for(;;){let{value:n,done:i}=await r.next();if(n&&await t(n),i)break}r.return&&r.return()}async function rj(e){let t=0,r=[];await tj(e,a=>{r.push(a),t+=a.byteLength});let n=new Uint8Array(t),i=0;for(let a of r)n.set(a,i),i+=a.byteLength;return n}var nj="https://momentjs.com/docs/#/parsing/string-format/",ij="https://publish.obsidian.md/git-doc/Line+Authoring",Uf=class extends U.PluginSettingTab{constructor(r,n){super(r,n);this.plugin=n;this.lineAuthorColorSettings=new Map}get settings(){return this.plugin.settings}display(){let{containerEl:r}=this,n=this.plugin,i;n.settings.differentIntervalCommitAndPush?i="commit":i="commit-and-sync";let a=n.gitReady;r.empty(),a||(r.createEl("p",{text:"Git is not ready. When all settings are correct you can configure commit-sync, etc."}),r.createEl("br"));let s;if(a){new U.Setting(r).setName("Automatic").setHeading(),new U.Setting(r).setName("Split timers for automatic commit and sync").setDesc("Enable to use one interval for commit and another for sync.").addToggle(u=>u.setValue(n.settings.differentIntervalCommitAndPush).onChange(async f=>{n.settings.differentIntervalCommitAndPush=f,await n.saveSettings(),n.automaticsManager.reload("commit","push"),this.refreshDisplayWithDelay()})),new U.Setting(r).setName(`Auto ${i} interval (minutes)`).setDesc(`${n.settings.differentIntervalCommitAndPush?"Commit":"Commit and sync"} changes every X minutes. Set to 0 (default) to disable. (See below setting for further configuration!)`).addText(u=>{u.inputEl.type="number",this.setNonDefaultValue({text:u,settingsProperty:"autoSaveInterval"}),u.setPlaceholder(String(Ye.autoSaveInterval)),u.onChange(async f=>{f!==""?n.settings.autoSaveInterval=Number(f):n.settings.autoSaveInterval=Ye.autoSaveInterval,await n.saveSettings(),n.automaticsManager.reload("commit")})}),s=new U.Setting(r).setName(`Auto ${i} after stopping file edits`).setDesc(`Requires the ${i} interval not to be 0. + If turned on, do auto ${i} every ${vT(n.settings.autoSaveInterval)} after stopping file edits. + This also prevents auto ${i} while editing a file. If turned off, it's independent from the last file edit.`).addToggle(u=>u.setValue(n.settings.autoBackupAfterFileChange).onChange(async f=>{n.settings.autoBackupAfterFileChange=f,this.refreshDisplayWithDelay(),await n.saveSettings(),n.automaticsManager.reload("commit")})),this.mayDisableSetting(s,n.settings.setLastSaveToLastCommit),s=new U.Setting(r).setName(`Auto ${i} after latest commit`).setDesc(`If turned on, sets last auto ${i} timestamp to the latest commit timestamp. This reduces the frequency of auto ${i} when doing manual commits.`).addToggle(u=>u.setValue(n.settings.setLastSaveToLastCommit).onChange(async f=>{n.settings.setLastSaveToLastCommit=f,await n.saveSettings(),n.automaticsManager.reload("commit"),this.refreshDisplayWithDelay()})),this.mayDisableSetting(s,n.settings.autoBackupAfterFileChange),s=new U.Setting(r).setName("Auto push interval (minutes)").setDesc("Push commits every X minutes. Set to 0 (default) to disable.").addText(u=>{u.inputEl.type="number",this.setNonDefaultValue({text:u,settingsProperty:"autoPushInterval"}),u.setPlaceholder(String(Ye.autoPushInterval)),u.onChange(async f=>{f!==""?n.settings.autoPushInterval=Number(f):n.settings.autoPushInterval=Ye.autoPushInterval,await n.saveSettings(),n.automaticsManager.reload("push")})}),this.mayDisableSetting(s,!n.settings.differentIntervalCommitAndPush),new U.Setting(r).setName("Auto pull interval (minutes)").setDesc("Pull changes every X minutes. Set to 0 (default) to disable.").addText(u=>{u.inputEl.type="number",this.setNonDefaultValue({text:u,settingsProperty:"autoPullInterval"}),u.setPlaceholder(String(Ye.autoPullInterval)),u.onChange(async f=>{f!==""?n.settings.autoPullInterval=Number(f):n.settings.autoPullInterval=Ye.autoPullInterval,await n.saveSettings(),n.automaticsManager.reload("pull")})}),new U.Setting(r).setName(`Specify custom commit message on auto ${i}`).setDesc("You will get a pop up to specify your message.").addToggle(u=>u.setValue(n.settings.customMessageOnAutoBackup).onChange(async f=>{n.settings.customMessageOnAutoBackup=f,await n.saveSettings(),this.refreshDisplayWithDelay()})),s=new U.Setting(r).setName(`Commit message on auto ${i}`).setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(u=>{u.setPlaceholder(Ye.autoCommitMessage).onChange(async f=>{f===""?n.settings.autoCommitMessage=Ye.autoCommitMessage:n.settings.autoCommitMessage=f,await n.saveSettings()}),this.setNonDefaultValue({text:u,settingsProperty:"autoCommitMessage"})}),this.mayDisableSetting(s,n.settings.customMessageOnAutoBackup),new U.Setting(r).setName("Commit message").setHeading(),new U.Setting(r).setName("Commit message on manual commit").setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(u=>{u.setPlaceholder(Ye.commitMessage).onChange(async f=>{f===""?n.settings.commitMessage=Ye.commitMessage:n.settings.commitMessage=f,await n.saveSettings()}),this.setNonDefaultValue({text:u,settingsProperty:"commitMessage"})});let c=new U.Setting(r).setName("{{date}} placeholder format").addMomentFormat(u=>u.setDefaultFormat(n.settings.commitDateFormat).setValue(n.settings.commitDateFormat).onChange(async f=>{n.settings.commitDateFormat=f,await n.saveSettings()}));c.descEl.innerHTML=` + Specify custom date format. E.g. "${xm}. See Moment.js for more formats.`,new U.Setting(r).setName("{{hostname}} placeholder replacement").setDesc("Specify custom hostname for every device.").addText(u=>{var f;return u.setValue((f=n.localStorage.getHostname())!=null?f:"").onChange(d=>{n.localStorage.setHostname(d)})}),new U.Setting(r).setName("Preview commit message").addButton(u=>u.setButtonText("Preview").onClick(async()=>{let f=await n.gitManager.formatCommitMessage(n.settings.commitMessage);new U.Notice(`${f}`)})),new U.Setting(r).setName("List filenames affected by commit in the commit body").addToggle(u=>u.setValue(n.settings.listChangedFilesInMessageBody).onChange(async f=>{n.settings.listChangedFilesInMessageBody=f,await n.saveSettings()})),new U.Setting(r).setName("Pull").setHeading(),n.gitManager instanceof Ce&&new U.Setting(r).setName("Merge strategy").setDesc("Decide how to integrate commits from your remote branch into your local branch.").addDropdown(u=>{let f={merge:"Merge",rebase:"Rebase",reset:"Other sync service (Only updates the HEAD without touching the working directory)"};u.addOptions(f),u.setValue(n.settings.syncMethod),u.onChange(async d=>{n.settings.syncMethod=d,await n.saveSettings()})}),new U.Setting(r).setName("Pull on startup").setDesc("Automatically pull commits when Obsidian starts.").addToggle(u=>u.setValue(n.settings.autoPullOnBoot).onChange(async f=>{n.settings.autoPullOnBoot=f,await n.saveSettings()})),new U.Setting(r).setName("Commit-and-sync").setDesc("Commit-and-sync with default settings means staging everything -> committing -> pulling -> pushing. Ideally this is a single action that you do regularly to keep your local and remote repository in sync.").setHeading(),s=new U.Setting(r).setName("Push on commit-and-sync").setDesc(`Most of the time you want to push after committing. Turning this off turns a commit-and-sync action into commit ${n.settings.pullBeforePush?"and pull ":""}only. It will still be called commit-and-sync.`).addToggle(u=>u.setValue(!n.settings.disablePush).onChange(async f=>{n.settings.disablePush=!f,this.refreshDisplayWithDelay(),await n.saveSettings()})),new U.Setting(r).setName("Pull on commit-and-sync").setDesc(`On commit-and-sync, pull commits as well. Turning this off turns a commit-and-sync action into commit ${n.settings.disablePush?"":"and push "}only.`).addToggle(u=>u.setValue(n.settings.pullBeforePush).onChange(async f=>{n.settings.pullBeforePush=f,this.refreshDisplayWithDelay(),await n.saveSettings()})),n.gitManager instanceof Ce&&(new U.Setting(r).setName("Line author information").setHeading(),this.addLineAuthorInfoSettings())}new U.Setting(r).setName("History view").setHeading(),new U.Setting(r).setName("Show Author").setDesc("Show the author of the commit in the history view.").addDropdown(c=>{let u={hide:"Hide",full:"Full",initials:"Initials"};c.addOptions(u),c.setValue(n.settings.authorInHistoryView),c.onChange(async f=>{n.settings.authorInHistoryView=f,await n.saveSettings(),await n.refresh()})}),new U.Setting(r).setName("Show Date").setDesc("Show the date of the commit in the history view. The {{date}} placeholder format is used to display the date.").addToggle(c=>c.setValue(n.settings.dateInHistoryView).onChange(async u=>{n.settings.dateInHistoryView=u,await n.saveSettings(),await n.refresh()})),new U.Setting(r).setName("Source control view").setHeading(),new U.Setting(r).setName("Automatically refresh source control view on file changes").setDesc("On slower machines this may cause lags. If so, just disable this option.").addToggle(c=>c.setValue(n.settings.refreshSourceControl).onChange(async u=>{n.settings.refreshSourceControl=u,await n.saveSettings()})),new U.Setting(r).setName("Source control view refresh interval").setDesc("Milliseconds to wait after file change before refreshing the Source Control View.").addText(c=>{c.inputEl.type="number",this.setNonDefaultValue({text:c,settingsProperty:"refreshSourceControlTimer"}),c.setPlaceholder(String(Ye.refreshSourceControlTimer)),c.onChange(async f=>{f!==""&&Number.isInteger(Number(f))?n.settings.refreshSourceControlTimer=Math.max(Number(f),500):n.settings.refreshSourceControlTimer=Ye.refreshSourceControlTimer,await n.saveSettings(),n.setRefreshDebouncer()})}),new U.Setting(r).setName("Miscellaneous").setHeading(),n.gitManager instanceof Ce&&new U.Setting(r).setName("Diff view style").setDesc('Set the style for the diff view. Note that the actual diff in "Split" mode is not generated by Git, but the editor itself instead so it may differ from the diff generated by Git. One advantage of this is that you can edit the text in that view.').addDropdown(c=>{let u={split:"Split",git_unified:"Unified"};c.addOptions(u),c.setValue(n.settings.diffStyle),c.onChange(async f=>{n.settings.diffStyle=f,await n.saveSettings()})}),new U.Setting(r).setName("Disable informative notifications").setDesc("Disable informative notifications for git operations to minimize distraction (refer to status bar for updates).").addToggle(c=>c.setValue(n.settings.disablePopups).onChange(async u=>{n.settings.disablePopups=u,this.refreshDisplayWithDelay(),await n.saveSettings()})),new U.Setting(r).setName("Disable error notifications").setDesc("Disable errror notifications of any kind to minimize distraction (refer to status bar for updates).").addToggle(c=>c.setValue(!n.settings.showErrorNotices).onChange(async u=>{n.settings.showErrorNotices=!u,await n.saveSettings()})),n.settings.disablePopups||new U.Setting(r).setName("Hide notifications for no changes").setDesc("Don't show notifications when there are no changes to commit or push.").addToggle(c=>c.setValue(n.settings.disablePopupsForNoChanges).onChange(async u=>{n.settings.disablePopupsForNoChanges=u,await n.saveSettings()})),new U.Setting(r).setName("Show status bar").setDesc("Obsidian must be restarted for the changes to take affect.").addToggle(c=>c.setValue(n.settings.showStatusBar).onChange(async u=>{n.settings.showStatusBar=u,await n.saveSettings()})),new U.Setting(r).setName("File menu integration").setDesc('Add "Stage", "Unstage" and "Add to .gitignore" actions to the file menu.').addToggle(c=>c.setValue(n.settings.showFileMenu).onChange(async u=>{n.settings.showFileMenu=u,await n.saveSettings()})),new U.Setting(r).setName("Show branch status bar").setDesc("Obsidian must be restarted for the changes to take affect.").addToggle(c=>c.setValue(n.settings.showBranchStatusBar).onChange(async u=>{n.settings.showBranchStatusBar=u,await n.saveSettings()})),new U.Setting(r).setName("Show the count of modified files in the status bar").addToggle(c=>c.setValue(n.settings.changedFilesInStatusBar).onChange(async u=>{n.settings.changedFilesInStatusBar=u,await n.saveSettings()})),n.gitManager instanceof sn?new U.Setting(r).setName("Authentication/commit author").setHeading():new U.Setting(r).setName("Commit author").setHeading(),n.gitManager instanceof sn&&new U.Setting(r).setName("Username on your git server. E.g. your username on GitHub").addText(c=>{var u;c.setValue((u=n.localStorage.getUsername())!=null?u:""),c.onChange(f=>{n.localStorage.setUsername(f)})}),n.gitManager instanceof sn&&new U.Setting(r).setName("Password/Personal access token").setDesc("Type in your password. You won't be able to see it again.").addText(c=>{c.inputEl.autocapitalize="off",c.inputEl.autocomplete="off",c.inputEl.spellcheck=!1,c.onChange(u=>{n.localStorage.setPassword(u)})}),n.gitReady&&new U.Setting(r).setName("Author name for commit").addText(async c=>{var u;c.setValue((u=await n.gitManager.getConfig("user.name"))!=null?u:""),c.onChange(async f=>{await n.gitManager.setConfig("user.name",f==""?void 0:f)})}),n.gitReady&&new U.Setting(r).setName("Author email for commit").addText(async c=>{var u;c.setValue((u=await n.gitManager.getConfig("user.email"))!=null?u:""),c.onChange(async f=>{await n.gitManager.setConfig("user.email",f==""?void 0:f)})}),new U.Setting(r).setName("Advanced").setDesc("These settings usually don't need to be changed, but may be requried for special setups.").setHeading(),n.gitManager instanceof Ce&&(new U.Setting(r).setName("Update submodules").setDesc('"Commit-and-sync" and "pull" takes care of submodules. Missing features: Conflicted files, count of pulled/pushed/committed files. Tracking branch needs to be set for each submodule.').addToggle(c=>c.setValue(n.settings.updateSubmodules).onChange(async u=>{n.settings.updateSubmodules=u,await n.saveSettings()})),n.settings.updateSubmodules&&new U.Setting(r).setName("Submodule recurse checkout/switch").setDesc("Whenever a checkout happens on the root repository, recurse the checkout on the submodules (if the branches exist).").addToggle(c=>c.setValue(n.settings.submoduleRecurseCheckout).onChange(async u=>{n.settings.submoduleRecurseCheckout=u,await n.saveSettings()}))),n.gitManager instanceof Ce&&new U.Setting(r).setName("Custom Git binary path").addText(c=>{var u;c.setValue((u=n.localStorage.getGitPath())!=null?u:""),c.setPlaceholder("git"),c.onChange(f=>{n.localStorage.setGitPath(f),n.gitManager.updateGitPath(f||"git").catch(d=>n.displayError(d))})}),n.gitManager instanceof Ce&&new U.Setting(r).setName("Additional environment variables").setDesc("Use each line for a new environment variable in the format KEY=VALUE .").addTextArea(c=>{c.setPlaceholder("GIT_DIR=/path/to/git/dir"),c.setValue(n.localStorage.getEnvVars().join(` +`)),c.onChange(u=>{n.localStorage.setEnvVars(u.split(` +`))})}),n.gitManager instanceof Ce&&new U.Setting(r).setName("Additional PATH environment variable paths").setDesc("Use each line for one path").addTextArea(c=>{c.setValue(n.localStorage.getPATHPaths().join(` +`)),c.onChange(u=>{n.localStorage.setPATHPaths(u.split(` +`))})}),n.gitManager instanceof Ce&&new U.Setting(r).setName("Reload with new environment variables").setDesc("Removing previously added environment variables will not take effect until Obsidian is restarted.").addButton(c=>{c.setButtonText("Reload"),c.setCta(),c.onClick(async()=>{await n.gitManager.setGitInstance()})}),new U.Setting(r).setName("Custom base path (Git repository path)").setDesc(` Sets the relative path to the vault from which the Git binary should be executed. Mostly used to set the path to the Git repository, which is only required if the Git repository is below the vault root directory. Use "\\" instead of "/" on Windows. - `).addText(l=>{l.setValue(n.settings.basePath),l.setPlaceholder("directory/directory-with-git-repo"),l.onChange(async u=>{n.settings.basePath=u,await n.saveSettings(),n.gitManager.updateBasePath(u||"").catch(f=>n.displayError(f))})}),new V.Setting(r).setName("Custom Git directory path (Instead of '.git')").setDesc('Requires restart of Obsidian to take effect. Use "\\" instead of "/" on Windows.').addText(l=>{l.setValue(n.settings.gitDir),l.setPlaceholder(".git"),l.onChange(async u=>{n.settings.gitDir=u,await n.saveSettings()})}),new V.Setting(r).setName("Disable on this device").setDesc("Disables the plugin on this device. This setting is not synced.").addToggle(l=>l.setValue(n.localStorage.getPluginDisabled()).onChange(u=>{n.localStorage.setPluginDisabled(u),u?n.unloadPlugin():n.init({fromReload:!0}).catch(f=>n.displayError(f)),new V.Notice("Obsidian must be restarted for the changes to take affect.")})),new V.Setting(r).setName("Support").setHeading(),new V.Setting(r).setName("Donate").setDesc("If you like this Plugin, consider donating to support continued development.").addButton(l=>{l.buttonEl.outerHTML="Buy Me a Coffee at ko-fi.com"});let o=r.createDiv();o.setAttr("align","center"),o.setAttr("style","margin: var(--size-4-2)");let c=o.createEl("button");if(c.setText("Copy Debug Information"),c.onclick=async()=>{await window.navigator.clipboard.writeText(JSON.stringify({settings:this.plugin.settings,pluginVersion:this.plugin.manifest.version},null,4)),new V.Notice("Debug information copied to clipboard. May contain sensitive information!")},V.Platform.isDesktopApp){let l=r.createDiv();l.setAttr("align","center"),l.setText(`Debugging and logging: -You can always see the logs of this and every other plugin by opening the console with`);let u=r.createDiv();u.setAttr("align","center"),u.addClass("obsidian-git-shortcuts"),V.Platform.isMacOS===!0?u.createEl("kbd",{text:"CMD (\u2318) + OPTION (\u2325) + I"}):u.createEl("kbd",{text:"CTRL + SHIFT + I"})}}mayDisableSetting(r,n){n&&(r.setDisabled(n),r.setClass("obsidian-git-disabled"))}configureLineAuthorShowStatus(r){this.settings.lineAuthor.show=r,this.plugin.saveSettings(),r?this.plugin.lineAuthoringFeature.activateFeature():this.plugin.lineAuthoringFeature.deactivateFeature()}async lineAuthorSettingHandler(r,n){this.settings.lineAuthor[r]=n,await this.plugin.saveSettings(),this.plugin.lineAuthoringFeature.refreshLineAuthorViews()}beforeSaveSettings(){let r=this.settings.lineAuthor;r.authorDisplay!=="hide"&&(r.lastShownAuthorDisplay=r.authorDisplay),r.dateTimeFormatOptions!=="hide"&&(r.lastShownDateTimeFormatOptions=r.dateTimeFormatOptions)}addLineAuthorInfoSettings(){let r=new V.Setting(this.containerEl).setName("Show commit authoring information next to each line");if(this.plugin.lineAuthoringFeature.isAvailableOnCurrentPlatform()||r.setDesc("Only available on desktop currently.").setDisabled(!0),r.descEl.innerHTML=` - Feature guide and quick examples
- The commit hash, author name and authoring date can all be individually toggled.
Hide everything, to only show the age-colored sidebar.`,r.addToggle(n=>n.setValue(this.settings.lineAuthor.show).onChange(i=>{this.configureLineAuthorShowStatus(i),this.display()})),this.settings.lineAuthor.show){let n=new V.Setting(this.containerEl).setName("Follow movement and copies across files and commits").setDesc("").addDropdown(a=>{a.addOptions({inactive:"Do not follow (default)","same-commit":"Follow within same commit","all-commits":"Follow within all commits (maybe slow)"}),a.setValue(this.settings.lineAuthor.followMovement),a.onChange(s=>this.lineAuthorSettingHandler("followMovement",s))});if(n.descEl.innerHTML=` + `).addText(c=>{c.setValue(n.settings.basePath),c.setPlaceholder("directory/directory-with-git-repo"),c.onChange(async u=>{n.settings.basePath=u,await n.saveSettings(),n.gitManager.updateBasePath(u||"").catch(f=>n.displayError(f))})}),new U.Setting(r).setName("Custom Git directory path (Instead of '.git')").setDesc('Requires restart of Obsidian to take effect. Use "\\" instead of "/" on Windows.').addText(c=>{c.setValue(n.settings.gitDir),c.setPlaceholder(".git"),c.onChange(async u=>{n.settings.gitDir=u,await n.saveSettings()})}),new U.Setting(r).setName("Disable on this device").setDesc("Disables the plugin on this device. This setting is not synced.").addToggle(c=>c.setValue(n.localStorage.getPluginDisabled()).onChange(u=>{n.localStorage.setPluginDisabled(u),u?n.unloadPlugin():n.init({fromReload:!0}).catch(f=>n.displayError(f)),new U.Notice("Obsidian must be restarted for the changes to take affect.")})),new U.Setting(r).setName("Support").setHeading(),new U.Setting(r).setName("Donate").setDesc("If you like this Plugin, consider donating to support continued development.").addButton(c=>{c.buttonEl.outerHTML="Buy Me a Coffee at ko-fi.com"});let o=r.createDiv();o.setAttr("align","center"),o.setAttr("style","margin: var(--size-4-2)");let l=o.createEl("button");if(l.setText("Copy Debug Information"),l.onclick=async()=>{await window.navigator.clipboard.writeText(JSON.stringify({settings:this.plugin.settings,pluginVersion:this.plugin.manifest.version},null,4)),new U.Notice("Debug information copied to clipboard. May contain sensitive information!")},U.Platform.isDesktopApp){let c=r.createDiv();c.setAttr("align","center"),c.setText(`Debugging and logging: +You can always see the logs of this and every other plugin by opening the console with`);let u=r.createDiv();u.setAttr("align","center"),u.addClass("obsidian-git-shortcuts"),U.Platform.isMacOS===!0?u.createEl("kbd",{text:"CMD (\u2318) + OPTION (\u2325) + I"}):u.createEl("kbd",{text:"CTRL + SHIFT + I"})}}mayDisableSetting(r,n){n&&(r.setDisabled(n),r.setClass("obsidian-git-disabled"))}configureLineAuthorShowStatus(r){this.settings.lineAuthor.show=r,this.plugin.saveSettings(),r?this.plugin.lineAuthoringFeature.activateFeature():this.plugin.lineAuthoringFeature.deactivateFeature()}async lineAuthorSettingHandler(r,n){this.settings.lineAuthor[r]=n,await this.plugin.saveSettings(),this.plugin.lineAuthoringFeature.refreshLineAuthorViews()}beforeSaveSettings(){let r=this.settings.lineAuthor;r.authorDisplay!=="hide"&&(r.lastShownAuthorDisplay=r.authorDisplay),r.dateTimeFormatOptions!=="hide"&&(r.lastShownDateTimeFormatOptions=r.dateTimeFormatOptions)}addLineAuthorInfoSettings(){let r=new U.Setting(this.containerEl).setName("Show commit authoring information next to each line");if(this.plugin.lineAuthoringFeature.isAvailableOnCurrentPlatform()||r.setDesc("Only available on desktop currently.").setDisabled(!0),r.descEl.innerHTML=` + Feature guide and quick examples
+ The commit hash, author name and authoring date can all be individually toggled.
Hide everything, to only show the age-colored sidebar.`,r.addToggle(n=>n.setValue(this.settings.lineAuthor.show).onChange(i=>{this.configureLineAuthorShowStatus(i),this.refreshDisplayWithDelay()})),this.settings.lineAuthor.show){let n=new U.Setting(this.containerEl).setName("Follow movement and copies across files and commits").setDesc("").addDropdown(a=>{a.addOptions({inactive:"Do not follow (default)","same-commit":"Follow within same commit","all-commits":"Follow within all commits (maybe slow)"}),a.setValue(this.settings.lineAuthor.followMovement),a.onChange(s=>this.lineAuthorSettingHandler("followMovement",s))});if(n.descEl.innerHTML=` By default (deactivated), each line only shows the newest commit where it was changed.
With same commit, cut-copy-paste-ing of text is followed within the same commit and the original commit of authoring will be shown. @@ -171,14 +173,14 @@ You can always see the logs of this and every other plugin by opening the consol With all commits, cut-copy-paste-ing text inbetween multiple commits will be detected.
It uses git-blame and - for matches (at least ${zu} characters) within the same (or all) commit(s), the originating commit's information is shown.`,new V.Setting(this.containerEl).setName("Show commit hash").addToggle(a=>{a.setValue(this.settings.lineAuthor.showCommitHash),a.onChange(s=>this.lineAuthorSettingHandler("showCommitHash",s))}),new V.Setting(this.containerEl).setName("Author name display").setDesc("If and how the author is displayed").addDropdown(a=>{let s={hide:"Hide",initials:"Initials (default)","first name":"First name","last name":"Last name",full:"Full name"};a.addOptions(s),a.setValue(this.settings.lineAuthor.authorDisplay),a.onChange(async o=>this.lineAuthorSettingHandler("authorDisplay",o))}),new V.Setting(this.containerEl).setName("Authoring date display").setDesc("If and how the date and time of authoring the line is displayed").addDropdown(a=>{let s={hide:"Hide",date:"Date (default)",datetime:"Date and time","natural language":"Natural language",custom:"Custom"};a.addOptions(s),a.setValue(this.settings.lineAuthor.dateTimeFormatOptions),a.onChange(async o=>{await this.lineAuthorSettingHandler("dateTimeFormatOptions",o),this.display()})}),this.settings.lineAuthor.dateTimeFormatOptions==="custom"){let a=new V.Setting(this.containerEl);a.setName("Custom authoring date format").addText(s=>{s.setValue(this.settings.lineAuthor.dateTimeFormatCustomString),s.setPlaceholder("YYYY-MM-DD HH:mm"),s.onChange(async o=>{await this.lineAuthorSettingHandler("dateTimeFormatCustomString",o),a.descEl.innerHTML=this.previewCustomDateTimeDescriptionHtml(o)})}),a.descEl.innerHTML=this.previewCustomDateTimeDescriptionHtml(this.settings.lineAuthor.dateTimeFormatCustomString)}new V.Setting(this.containerEl).setName("Authoring date display timezone").addDropdown(a=>{let s={"viewer-local":"My local (default)","author-local":"Author's local",utc0000:"UTC+0000/Z"};a.addOptions(s),a.setValue(this.settings.lineAuthor.dateTimeTimezone),a.onChange(async o=>this.lineAuthorSettingHandler("dateTimeTimezone",o))}).descEl.innerHTML=` + for matches (at least ${Uu} characters) within the same (or all) commit(s), the originating commit's information is shown.`,new U.Setting(this.containerEl).setName("Show commit hash").addToggle(a=>{a.setValue(this.settings.lineAuthor.showCommitHash),a.onChange(s=>this.lineAuthorSettingHandler("showCommitHash",s))}),new U.Setting(this.containerEl).setName("Author name display").setDesc("If and how the author is displayed").addDropdown(a=>{let s={hide:"Hide",initials:"Initials (default)","first name":"First name","last name":"Last name",full:"Full name"};a.addOptions(s),a.setValue(this.settings.lineAuthor.authorDisplay),a.onChange(async o=>this.lineAuthorSettingHandler("authorDisplay",o))}),new U.Setting(this.containerEl).setName("Authoring date display").setDesc("If and how the date and time of authoring the line is displayed").addDropdown(a=>{let s={hide:"Hide",date:"Date (default)",datetime:"Date and time","natural language":"Natural language",custom:"Custom"};a.addOptions(s),a.setValue(this.settings.lineAuthor.dateTimeFormatOptions),a.onChange(async o=>{await this.lineAuthorSettingHandler("dateTimeFormatOptions",o),this.refreshDisplayWithDelay()})}),this.settings.lineAuthor.dateTimeFormatOptions==="custom"){let a=new U.Setting(this.containerEl);a.setName("Custom authoring date format").addText(s=>{s.setValue(this.settings.lineAuthor.dateTimeFormatCustomString),s.setPlaceholder("YYYY-MM-DD HH:mm"),s.onChange(async o=>{await this.lineAuthorSettingHandler("dateTimeFormatCustomString",o),a.descEl.innerHTML=this.previewCustomDateTimeDescriptionHtml(o)})}),a.descEl.innerHTML=this.previewCustomDateTimeDescriptionHtml(this.settings.lineAuthor.dateTimeFormatCustomString)}new U.Setting(this.containerEl).setName("Authoring date display timezone").addDropdown(a=>{let s={"viewer-local":"My local (default)","author-local":"Author's local",utc0000:"UTC+0000/Z"};a.addOptions(s),a.setValue(this.settings.lineAuthor.dateTimeTimezone),a.onChange(async o=>this.lineAuthorSettingHandler("dateTimeTimezone",o))}).descEl.innerHTML=` The time-zone in which the authoring date should be shown. Either your local time-zone (default), the author's time-zone during commit creation or UTC\xB100:00. - `;let i=new V.Setting(this.containerEl).setName("Oldest age in coloring");i.descEl.innerHTML=this.previewOldestAgeDescriptionHtml(this.settings.lineAuthor.coloringMaxAge)[0],i.addText(a=>{a.setPlaceholder("1y"),a.setValue(this.settings.lineAuthor.coloringMaxAge),a.onChange(async s=>{let[o,c]=this.previewOldestAgeDescriptionHtml(s);i.descEl.innerHTML=o,c&&(await this.lineAuthorSettingHandler("coloringMaxAge",s),this.refreshColorSettingsName("oldest"))})}),this.createColorSetting("newest"),this.createColorSetting("oldest"),new V.Setting(this.containerEl).setName("Text color").addText(a=>{a.setValue(this.settings.lineAuthor.textColorCss),a.onChange(async s=>{await this.lineAuthorSettingHandler("textColorCss",s)})}).descEl.innerHTML=` + `;let i=new U.Setting(this.containerEl).setName("Oldest age in coloring");i.descEl.innerHTML=this.previewOldestAgeDescriptionHtml(this.settings.lineAuthor.coloringMaxAge)[0],i.addText(a=>{a.setPlaceholder("1y"),a.setValue(this.settings.lineAuthor.coloringMaxAge),a.onChange(async s=>{let[o,l]=this.previewOldestAgeDescriptionHtml(s);i.descEl.innerHTML=o,l&&(await this.lineAuthorSettingHandler("coloringMaxAge",s),this.refreshColorSettingsName("oldest"))})}),this.createColorSetting("newest"),this.createColorSetting("oldest"),new U.Setting(this.containerEl).setName("Text color").addText(a=>{a.setValue(this.settings.lineAuthor.textColorCss),a.onChange(async s=>{await this.lineAuthorSettingHandler("textColorCss",s)})}).descEl.innerHTML=` The CSS color of the gutter text.
- + It is higly recommended to use CSS variables @@ -190,7 +192,7 @@ You can always see the logs of this and every other plugin by opening the consol See: List of available CSS variables in Obsidian - `,new V.Setting(this.containerEl).setName("Ignore whitespace and newlines in changes").addToggle(a=>{a.setValue(this.settings.lineAuthor.ignoreWhitespace),a.onChange(s=>this.lineAuthorSettingHandler("ignoreWhitespace",s))}).descEl.innerHTML=` + `,new U.Setting(this.containerEl).setName("Ignore whitespace and newlines in changes").addToggle(a=>{a.setValue(this.settings.lineAuthor.ignoreWhitespace),a.onChange(s=>this.lineAuthorSettingHandler("ignoreWhitespace",s))}).descEl.innerHTML=` Whitespace and newlines are interpreted as part of the document and in changes by default (hence not ignored). @@ -201,19 +203,22 @@ You can always see the logs of this and every other plugin by opening the consol If you don't care about purely-whitespace changes (e.g. list nesting / quote indentation changes), then activating this will provide more meaningful change detection. - `}}createColorSetting(r){let n=new V.Setting(this.containerEl).setName("").addText(i=>{let a=i0(r,this.settings.lineAuthor),s=i0(r,ar.lineAuthor);i.setPlaceholder(Gg(s)),i.setValue(Gg(a)),i.onChange(async o=>{let c=lT(o);if(c!==void 0){let l=r==="newest"?"colorNew":"colorOld";await this.lineAuthorSettingHandler(l,c)}this.refreshColorSettingsDesc(r,c)})});this.lineAuthorColorSettings.set(r,n),this.refreshColorSettingsName(r),this.refreshColorSettingsDesc(r,i0(r,this.settings.lineAuthor))}refreshColorSettingsName(r){let n=this.lineAuthorColorSettings.get(r);if(n){let i=r==="oldest"?`oldest (${this.settings.lineAuthor.coloringMaxAge} or older)`:"newest";n.nameEl.innerText=`Color for ${i} commits`}}refreshColorSettingsDesc(r,n){let i=this.lineAuthorColorSettings.get(r);i&&(i.descEl.innerHTML=this.colorSettingPreviewDescHtml(r,this.settings.lineAuthor,n!==void 0))}colorSettingPreviewDescHtml(r,n,i){let a=i?a0(r,n):"rgba(127,127,127,0.3)",s=V.moment.unix(V.moment.now()/1e3).format("YYYY-MM-DD"),o=i?`abcdef Author Name ${s}`:"invalid color";return`Supports 'rgb(r,g,b)', 'hsl(h,s,l)', hex (#) and + `}}createColorSetting(r){let n=new U.Setting(this.containerEl).setName("").addText(i=>{let a=a0(r,this.settings.lineAuthor),s=a0(r,Ye.lineAuthor);i.setPlaceholder(zg(s)),i.setValue(zg(a)),i.onChange(async o=>{let l=fT(o);if(l!==void 0){let c=r==="newest"?"colorNew":"colorOld";await this.lineAuthorSettingHandler(c,l)}this.refreshColorSettingsDesc(r,l)})});this.lineAuthorColorSettings.set(r,n),this.refreshColorSettingsName(r),this.refreshColorSettingsDesc(r,a0(r,this.settings.lineAuthor))}refreshColorSettingsName(r){let n=this.lineAuthorColorSettings.get(r);if(n){let i=r==="oldest"?`oldest (${this.settings.lineAuthor.coloringMaxAge} or older)`:"newest";n.nameEl.innerText=`Color for ${i} commits`}}refreshColorSettingsDesc(r,n){let i=this.lineAuthorColorSettings.get(r);i&&(i.descEl.innerHTML=this.colorSettingPreviewDescHtml(r,this.settings.lineAuthor,n!==void 0))}colorSettingPreviewDescHtml(r,n,i){let a=i?s0(r,n):"rgba(127,127,127,0.3)",s=U.moment.unix(U.moment.now()/1e3).format("YYYY-MM-DD"),o=i?`abcdef Author Name ${s}`:"invalid color";return`Supports 'rgb(r,g,b)', 'hsl(h,s,l)', hex (#) and named colors (e.g. 'black', 'purple'). Color preview: ${`
${o}
`}`}previewCustomDateTimeDescriptionHtml(r){let n=(0,V.moment)().format(r);return`
Format string to display the authoring date.
Currently: ${n}`}previewOldestAgeDescriptionHtml(r){let n=Vf(r);return[`The oldest age in the line author coloring. Everything older will have the same color. -
Smallest valid age is "1d". Currently: ${n!==void 0?`${n.asDays()} days`:"invalid!"}`,n]}};function i0(e,t){return e==="oldest"?t.colorOld:t.colorNew}function Vf(e){let t=V.moment.duration("P"+e.toUpperCase());return t.isValid()&&t.asDays()&&t.asDays()>=1?t:void 0}function PT(e,t,r){if(!(e===void 0||t===void 0||r===void 0))return`head${e}-obj${t}-path${r}`}var RT=Wf.Annotation.define();function MT(e,t,r){return r.update({annotations:RT.of({key:e,la:t,lineOffsetsFromUnsavedChanges:new Map})})}function tB(e){return e.annotation(RT)}var qs=Wf.StateField.define({create:e=>{},update:(e,t)=>{var r;return(r=tB(t))!=null?r:rB(t,e)},compare:(e,t)=>(e==null?void 0:e.key)===(t==null?void 0:t.key)});function qf(e){var a;let t=CT.sha256.create();if(!e)return t;let{la:r,key:n,lineOffsetsFromUnsavedChanges:i}=e;t.update(r==="untracked"?"t":"f"),t.update(n);for(let[s,o]of(a=i.entries())!=null?a:[])t.update([s,o]);return t}var Dr={get:void 0,save:void 0};function OT(e,t){Dr.get=e,Dr.save=t}function Yf(e){var t,r;return(r=(t=Vf(e.coloringMaxAge))==null?void 0:t.asDays())!=null?r:Vf(ar.lineAuthor.coloringMaxAge).asDays()}function rB(e,t){if(t)return e.changes.empty||e.changes.iterChanges((r,n,i,a)=>{var p;let s=e.startState.doc,{newDoc:o}=e,c=s.lineAt(r).number,l=s.lineAt(n).number,u=o.lineAt(i).number,f=o.lineAt(a).number,d=l-c+1,h=f-u+1;for(let m=u;m<=f;m++){let v=(p=t.lineOffsetsFromUnsavedChanges.get(m))!=null?p:0,y=f===m,b=h-d;y&&(v+=b),t.lineOffsetsFromUnsavedChanges.set(m,v)}}),t}var s0=class{constructor(t){this.state=t;this.subscribeMe()}notifyLineAuthoring(t,r){if(this.view===void 0){console.warn(`Git: View is not defined for editor cache key. Unforeseen situation. id: ${t}`);return}let n=this.view.state,i=MT(t,r,n);this.view.dispatch(i)}updateToNewState(t){let r=this.lastSeenPath&&this.filepath!=this.lastSeenPath;return this.state=t,r&&(this.unsubscribeMe(this.lastSeenPath),this.subscribeMe()),this}removeIfStale(){this.view.destroyed&&this.unsubscribeMe(this.lastSeenPath)}subscribeMe(){this.filepath!==void 0&&(Ws.ifFilepathDefinedTransformSubscribers(this.filepath,t=>t.add(this)),this.lastSeenPath=this.filepath)}unsubscribeMe(t){Ws.ifFilepathDefinedTransformSubscribers(t,r=>r.delete(this))}get filepath(){var t,r;return(r=(t=this.state.field(Xf.editorInfoField))==null?void 0:t.file)==null?void 0:r.path}get view(){return this.state.field(Xf.editorEditorField)}},FT=IT.StateField.define({create:e=>new s0(e),update:(e,t)=>e.updateToNewState(t.state),compare:(e,t)=>e===t});g();function $T(){Ys=void 0,o0=[],Zf=0,Jf.clear(),Qf.clear(),Xs.clear()}var Ys,Kf=()=>Ys;function LT(e,t){var i;let r=t.length;if(r<((i=Ys==null?void 0:Ys.length)!=null?i:0))return;Ys={gutter:e,length:r,text:t};let n=Dr.get();r!==n.gutterSpacingFallbackLength&&(n.gutterSpacingFallbackLength=r,Dr.save(n))}var o0=[],nB=15,Zf=0;function DT(e){o0[Zf]=e,Zf=(Zf+1)%nB}function NT(){return uT(o0)}var Jf=new Map,Qf=new Map,Xs=new Set;g();var KT=require("@codemirror/state"),JT=require("@codemirror/view");g();var f0=require("@codemirror/view"),qT=ze(Xg()),rd=require("obsidian");g();g();var ed={x:-10,y:-10};function jT(){ed.x===-10&&window.addEventListener("mousedown",e=>{ed.x=e.clientX,ed.y=e.clientY})}function BT(){for(let e of Xs)if(iB(e,ed))return e}function iB(e,t){let{x:r,y:n,width:i,height:a}=e.getBoundingClientRect();return r<=t.x&&t.x<=r+i&&n<=t.y&&t.y<=n+a}g();var Yl={};var HT="data-commit";function UT(e,t,r){if(t.hasFocus())return;let n=BT();if(!n)return;let i=sB(n);i&&(!i.isZeroCommit&&!i.isWaitingGutter&&aB(i,e),l0("showCommitHash",e),l0("authorDisplay",e),l0("dateTimeFormatOptions",e))}function aB(e,t){t.addItem(r=>r.setTitle("Copy commit hash").setIcon("copy").setSection("obs-git-line-author-copy").onClick(n=>navigator.clipboard.writeText(e.hash)))}function l0(e,t){var c,l;let r,n,i=Yl.plugin.settings.lineAuthor,a=i[e],s=typeof a=="boolean"?a:a!=="hide",o=ar.lineAuthor[e];if(e==="showCommitHash")r="Show commit hash",n=a;else if(e==="authorDisplay"){let u=(c=i.lastShownAuthorDisplay)!=null?c:o;r="Show author "+(s?a:u),n=s?"hide":u}else if(e==="dateTimeFormatOptions"){let u=(l=i.lastShownDateTimeFormatOptions)!=null?l:o;r="Show "+(s?a:u),r+=r.contains("date")?"":" date",n=s?"hide":u}else Oi(e);t.addItem(u=>u.setTitle(r).setSection("obs-git-line-author-configure").setChecked(s).onClick(f=>{var d,h;return(h=(d=Yl.plugin)==null?void 0:d.settingsTab)==null?void 0:h.lineAuthorSettingHandler(e,n)}))}function GT(e,t,r){r.setAttr(HT,JSON.stringify({hash:e.hash,isZeroCommit:e.isZeroCommit,isWaitingGutter:t}))}function sB(e){let t=e.getAttr(HT);return t?JSON.parse(t):void 0}g();function a0(e,t){return e==="oldest"?td(0,!1,t).color:td(void 0,!0,t).color}function td(e,t,r){let n=Yf(r),i=Date.now()/1e3,a=e!=null?e:0,o=(t?0:i-a)/60/60/24,c=Math.pow(Math.clamp(o/n,0,1),1/2.3),l=oB(),u=r.colorNew,f=r.colorOld,d=l?.4:1,h=c0(u.r,f.r,c)*d,p=c0(u.g,f.g,c)*d,m=c0(u.b,f.b,c)*d;return{color:`rgba(${h},${p},${m},${l?.75:.25})`,daysSinceCommit:o}}function c0(e,t,r){return e+(t-e)*r}function oB(){var e;return((e=window.app)==null?void 0:e.getTheme())==="obsidian"}function zT(e){document.body.style.setProperty("--obs-git-gutter-text",e.textColorCss)}g();function VT(e,t,r){let n;for(let i=t;i<=r;i++){let a=e.hashPerLine[i],s=e.commits.get(a);(!n||s.isZeroCommit||lB(s,n))&&(n=s)}return n}function lB(e,t){var i,a,s,o;let r=(a=(i=e.author)==null?void 0:i.epochSeconds)!=null?a:0,n=(o=(s=t.author)==null?void 0:s.epochSeconds)!=null?o:0;return r>n}var WT="-",cB="+",uB=3,fB="*",dB=/\S/g,hB="%",Zs=class e extends f0.GutterMarker{constructor(r){super();this.text=r}eq(r){return r instanceof e&&this.text===r.text}toDOM(){return document.createTextNode(this.text)}destroy(r){document.body.contains(r)||r.remove()}},u0=class extends f0.GutterMarker{constructor(r,n,i,a,s,o){super();this.lineAuthoring=r;this.startLine=n;this.endLine=i;this.key=a;this.settings=s;this.options=o;this.point=!1;this.elementClass="obs-git-blame-gutter"}eq(r){return this.key===(r==null?void 0:r.key)&&this.startLine===(r==null?void 0:r.startLine)&&this.endLine===(r==null?void 0:r.endLine)&&(this==null?void 0:this.options)===(r==null?void 0:r.options)}toDOM(){var r;return this.precomputedDomProvider=(r=this.precomputedDomProvider)!=null?r:this.computeDom(),this.precomputedDomProvider()}destroy(r){document.body.contains(r)||(r.remove(),Xs.delete(r))}computeDom(){let r=VT(this.lineAuthoring,this.startLine,this.endLine),n=r.isZeroCommit?"":this.renderNonZeroCommit(r);return!r.isZeroCommit&&this.options!=="waiting-for-result"?LT(this,n):n=this.adaptTextForFakeCommit(r,n,this.options),this.createHtmlNode(r,n,this.options==="waiting-for-result")}createHtmlNode(r,n,i){var l;let a=window.createDiv();a.innerText=n;let{color:s,daysSinceCommit:o}=td((l=r==null?void 0:r.author)==null?void 0:l.epochSeconds,r==null?void 0:r.isZeroCommit,this.settings);a.style.backgroundColor=s,GT(r,i,a);function c(){let u=a.cloneNode(!0);return Xs.add(u),i||DT(o),u}return c}renderNonZeroCommit(r){let n=this.settings.showCommitHash?this.renderHash(r):"",i=this.settings.authorDisplay==="hide"?"":`${this.renderAuthorName(r,this.settings.authorDisplay)}`,a=this.settings.dateTimeFormatOptions==="hide"?"":`${this.renderAuthoringDate(r,this.settings.dateTimeFormatOptions,this.settings.dateTimeFormatCustomString,this.settings.dateTimeTimezone)}`;return[n,i,a].filter(o=>o.length>=1).join(" ")}renderHash(r){return r.hash.substring(0,6)}renderAuthorName(r,n){var o,c,l,u;let i=(c=(o=r==null?void 0:r.author)==null?void 0:o.name)!=null?c:"",a=i.split(" ").filter(f=>f.length>=1),s;switch(n){case"initials":s=a.map(f=>f[0].toUpperCase()).join("");break;case"first name":s=(l=a.first())!=null?l:WT;break;case"last name":s=(u=a.last())!=null?u:WT;break;case"full":s=i;break;default:return Oi(n)}return fT(r==null?void 0:r.author,r==null?void 0:r.committer)||(s=s+fB),s}renderAuthoringDate(r,n,i,a){var l;let s="?";if(((l=r==null?void 0:r.author)==null?void 0:l.epochSeconds)===void 0)return s;let o;switch(n){case"date":o=Gu;break;case"datetime":o=bm;break;case"custom":o=i;break;case"natural language":o=u=>{let f=u.diff((0,rd.moment)());return rd.moment.duration(f).humanize(!0)};break;default:return Oi(n)}let c=rd.moment.unix(r.author.epochSeconds);switch(a){case"viewer-local":break;case"author-local":c=c.utcOffset(r.author.tz),typeof o=="string"&&(o+=" Z");break;case"utc0000":c=c.utc(),typeof o=="string"&&(o+="[Z]");break;default:return Oi(a)}return typeof o=="string"?c.format(o):o(c)}adaptTextForFakeCommit(r,n,i){var c,l,u,f;let a=(l=(c=Kf())==null?void 0:c.text)!=null?l:n,s=i!=="waiting-for-result"&&r.isZeroCommit?cB:hB;n=a.replace(dB,s);let o=(f=(u=Dr.get())==null?void 0:u.gutterSpacingFallbackLength)!=null?f:n.length;if(n=dT(n,o,s),i!=="waiting-for-result"&&r.isZeroCommit){let d=Math.min(o,uB);n=hT(n,o-d)}return n}};function xa(e,t,r,n,i,a){let s=qT.sha256.create();s.update(Object.values(i).join(",")),s.update(`s${t}-e${r}-k${n}-o${a}`);let o=s.hex(),c=Jf.get(o);if(c)return c;let l=new u0(e,t,r,n,i,a);return Jf.set(o,l),l}g();var YT=require("obsidian");function d0(){var t,r;let e=(r=(t=Dr.get())==null?void 0:t.gutterSpacingFallbackLength)!=null?r:ar.lineAuthor.gutterSpacingFallbackLength;return new Zs(Array(e).fill("-").join(""))}function h0(e){let{lineAuthoring:t,ageForInitialRender:r}=pB(e);return xa(t,1,1,"initialGutter"+r,e,"waiting-for-result")}function pB(e){var a;let t=(a=NT())!=null?a:Yf(e)*.25,r=(0,YT.moment)().add(-t,"days"),n={name:"",epochSeconds:cT(r),tz:"+0000"},i={hash:"waiting-for-result",author:n,committer:n,isZeroCommit:!1};return{lineAuthoring:{hashPerLine:[void 0,"waiting-for-result"],commits:new Map([["waiting-for-result",i]])},ageForInitialRender:t}}g();function XT(e,t){return xa({hashPerLine:[void 0,"000000"],commits:new Map([["000000",wT]])},1,1,e,t)}var p0=new Zs(""),QT=(0,JT.gutter)({class:"line-author-gutter-container",markers(e){let t=e.state.field(qs,!1);return mB(e,t)},lineMarkerChange(e){let t=qf(e.state.field(qs));return qf(e.startState.field(qs))!==t},renderEmptyElements:!0,initialSpacer:e=>(ZT(e),d0()),updateSpacer:(e,t)=>{var r,n;return ZT(t.view),(n=(r=Kf())==null?void 0:r.gutter)!=null?n:d0()}});function mB(e,t){let r=qf(t),n=e.state.doc,i=new Map;for(let u=1;u<=n.lines;u++){let f=n.line(u).from,d=e.lineBlockAt(f).to;i.set(u,[f,d]),r.update([f,d,0])}let a=Dr.get();r.update("s"+Object.values(Dr).join(","));let s=r.hex(),o=Qf.get(s);if(o)return o;let{result:c,allowCache:l}=gB(n,i,a,t);return l&&Qf.set(s,c),c}function gB(e,t,r,n){let i=!0,a=e.lines,s=[];function o(f,d,h){return s.push(h.range(f,d))}let c=vB(a,n),l=e.length===0,u=e.iterLines(a,a+1).next().value==="";for(let f=1;f<=a;f++){let[d,h]=t.get(f),p=e.lineAt(h).number;if(l){o(d,h,p0);continue}if(f===a&&u){o(d,h,p0);continue}if(n===void 0){o(d,h,h0(r)),i=!1;continue}let{key:m,la:v}=n;if(v==="untracked"){o(d,h,XT(v,r));continue}let y=v.hashPerLine.length-1,b=c[f],x=c[p];if(x&&x>y&&o(d,h,p0),b!==void 0&&zg(1,b,y)&&x!==void 0&&zg(1,x,y)){o(d,h,xa(v,b,x,m,r));continue}if(y<1){o(d,h,h0(r)),i=!1;continue}let E=Math.clamp(b!=null?b:f,1,y),_=Math.clamp(x!=null?x:p,1,y);o(d,h,xa(v,E,_,m+"computing",r,"waiting-for-result"))}return{result:KT.RangeSet.of(s,!0),allowCache:i}}function vB(e,t){if(!(t!=null&&t.lineOffsetsFromUnsavedChanges))return Array.from(new Array(e+1),i=>i);let r=[void 0],n=0;for(let i=1;i<=e;i++){let a=t.lineOffsetsFromUnsavedChanges.get(i);n+=a!=null?a:0,r[i]=a===void 0?i-n:void 0}return r}function ZT(e){e.dom.querySelectorAll(".cm-gutters").forEach(r=>{r!=null&&r.style&&(r.style.marginLeft||(r.style.marginLeft="unset"))})}var nd=class{constructor(t){this.plugin=t;this.lineAuthorings=new Map}async trackChanged(t){return this.trackChangedHelper(t).catch(r=>(console.warn("Git: Error in trackChanged."+r),Promise.reject(r)))}async trackChangedHelper(t){if(t){if(t.path===void 0){console.warn("Git: Attempted to track change of undefined filepath. Unforeseen situation.");return}return this.computeLineAuthorInfo(t.path)}}destroy(){this.lineAuthorings.clear(),Ws.clear(),$T()}async computeLineAuthorInfo(t){let r=this.plugin.lineAuthoringFeature.isAvailableOnCurrentPlatform().gitManager,n=await r.submoduleAwareHeadRevisonInContainingDirectory(t),i=await r.hashObject(t),a=PT(n,i,t);if(a!==void 0){if(!this.lineAuthorings.has(a)){let s=await r.blame(t,this.plugin.settings.lineAuthor.followMovement,this.plugin.settings.lineAuthor.ignoreWhitespace);this.lineAuthorings.set(a,s)}this.notifyComputationResultToSubscribers(t,a)}}notifyComputationResultToSubscribers(t,r){Ws.ifFilepathDefinedTransformSubscribers(t,n=>n.forEach(i=>i.notifyLineAuthoring(r,this.lineAuthorings.get(r))))}},tC=eC.Prec.high([FT,qs,QT]);var id=class{constructor(t){this.plg=t;this.codeMirrorExtensions=[];this.handleWorkspaceLeaf=t=>{if(!this.lineAuthorInfoProvider){console.warn("Git: undefined lineAuthorInfoProvider. Unexpected situation.");return}let r=t==null?void 0:t.view;!(r instanceof Sa.MarkdownView)||r.file==null||(r==null?void 0:r.allowNoFile)===!0||this.lineAuthorInfoProvider.trackChanged(r.file).catch(console.error)}}onLoadPlugin(){this.plg.registerEditorExtension(this.codeMirrorExtensions),OT(()=>this.plg.settings.lineAuthor,t=>{this.plg.settings.lineAuthor=t,this.plg.saveSettings()})}conditionallyActivateBySettings(){this.plg.settings.lineAuthor.show&&this.activateFeature()}activateFeature(){try{if(!this.isAvailableOnCurrentPlatform().available)return;zT(this.plg.settings.lineAuthor),this.lineAuthorInfoProvider=new nd(this.plg),this.createEventHandlers(),this.activateCodeMirrorExtensions(),console.log(this.plg.manifest.name+": Enabled line authoring.")}catch(t){console.warn("Git: Error while loading line authoring feature.",t),this.deactivateFeature()}}deactivateFeature(){var t;this.destroyEventHandlers(),this.deactivateCodeMirrorExtensions(),(t=this.lineAuthorInfoProvider)==null||t.destroy(),this.lineAuthorInfoProvider=void 0,console.log(this.plg.manifest.name+": Disabled line authoring.")}isAvailableOnCurrentPlatform(){return{available:this.plg.useSimpleGit&&Sa.Platform.isDesktopApp,gitManager:this.plg.gitManager instanceof Te?this.plg.gitManager:void 0}}refreshLineAuthorViews(){this.plg.settings.lineAuthor.show&&(this.deactivateFeature(),this.activateFeature())}activateCodeMirrorExtensions(){this.codeMirrorExtensions.push(tC),this.plg.app.workspace.updateOptions(),this.plg.app.workspace.iterateAllLeaves(this.handleWorkspaceLeaf)}deactivateCodeMirrorExtensions(){for(let t of this.codeMirrorExtensions)this.codeMirrorExtensions.remove(t);this.plg.app.workspace.updateOptions()}createEventHandlers(){this.gutterContextMenuEvent=this.createGutterContextMenuHandler(),this.fileOpenEvent=this.createFileOpenEvent(),this.workspaceLeafChangeEvent=this.createWorkspaceLeafChangeEvent(),this.fileModificationEvent=this.createVaultFileModificationHandler(),this.refreshOnCssChangeEvent=this.createCssRefreshHandler(),this.fileRenameEvent=this.createFileRenameEvent(),jT(),this.plg.registerEvent(this.gutterContextMenuEvent),this.plg.registerEvent(this.refreshOnCssChangeEvent),this.plg.registerEvent(this.fileOpenEvent),this.plg.registerEvent(this.workspaceLeafChangeEvent),this.plg.registerEvent(this.fileModificationEvent),this.plg.registerEvent(this.fileRenameEvent)}destroyEventHandlers(){this.plg.app.workspace.offref(this.refreshOnCssChangeEvent),this.plg.app.workspace.offref(this.fileOpenEvent),this.plg.app.workspace.offref(this.workspaceLeafChangeEvent),this.plg.app.workspace.offref(this.refreshOnCssChangeEvent),this.plg.app.vault.offref(this.fileRenameEvent),this.plg.app.workspace.offref(this.gutterContextMenuEvent)}createFileOpenEvent(){return this.plg.app.workspace.on("file-open",t=>{var r;return void((r=this.lineAuthorInfoProvider)==null?void 0:r.trackChanged(t).catch(console.error))})}createWorkspaceLeafChangeEvent(){return this.plg.app.workspace.on("active-leaf-change",this.handleWorkspaceLeaf)}createFileRenameEvent(){return this.plg.app.vault.on("rename",(t,r)=>{var n;return t instanceof Sa.TFile&&((n=this.lineAuthorInfoProvider)==null?void 0:n.trackChanged(t))})}createVaultFileModificationHandler(){return this.plg.app.vault.on("modify",t=>{var r;return t instanceof Sa.TFile&&((r=this.lineAuthorInfoProvider)==null?void 0:r.trackChanged(t))})}createCssRefreshHandler(){return this.plg.app.workspace.on("css-change",()=>this.refreshLineAuthorViews())}createGutterContextMenuHandler(){return this.plg.app.workspace.on("editor-menu",UT)}};g();var ad=class{constructor(t){this.plugin=t;this.tasks=[]}addTask(t,r){this.tasks.push({task:t,onFinished:r!=null?r:()=>{}}),this.tasks.length===1&&this.handleTask()}handleTask(){if(this.tasks.length>0){let t=this.tasks[0];t.task().then(r=>{t.onFinished(r),this.tasks.shift(),this.handleTask()},r=>{this.plugin.displayError(r),t.onFinished(void 0),this.tasks.shift(),this.handleTask()})}}clear(){this.tasks=[]}};g();var Nr=require("obsidian");var sd=class{constructor(t,r){this.statusBarEl=t;this.plugin=r;this.messages=[];this.base="obsidian-git-statusbar-";this.statusBarEl.setAttribute("data-tooltip-position","top"),r.registerEvent(r.app.workspace.on("obsidian-git:refreshed",()=>{this.refreshCommitTimestamp().catch(console.error)}))}displayMessage(t,r){this.messages.push({message:`Git: ${t.slice(0,100)}`,timeout:r}),this.display()}display(){this.messages.length>0&&!this.currentMessage?(this.currentMessage=this.messages.shift(),this.statusBarEl.addClass(this.base+"message"),this.statusBarEl.ariaLabel="",this.statusBarEl.setText(this.currentMessage.message),this.lastMessageTimestamp=Date.now()):this.currentMessage?Date.now()-this.lastMessageTimestamp>=this.currentMessage.timeout&&(this.currentMessage=null,this.lastMessageTimestamp=null):this.displayState()}displayState(){switch((this.statusBarEl.getText().length>3||!this.statusBarEl.hasChildNodes())&&(this.statusBarEl.empty(),this.conflictEl=this.statusBarEl.createDiv(),this.conflictEl.setAttribute("data-tooltip-position","top"),this.conflictEl.style.float="left",this.iconEl=this.statusBarEl.createDiv(),this.iconEl.style.float="left",this.textEl=this.statusBarEl.createDiv(),this.textEl.style.float="right",this.textEl.style.marginLeft="5px"),this.plugin.localStorage.getConflict()?((0,Nr.setIcon)(this.conflictEl,"alert-circle"),this.conflictEl.ariaLabel="You have merge conflicts. Resolve them and commit afterwards.",this.conflictEl.style.marginRight="5px",this.conflictEl.addClass(this.base+"conflict")):(this.conflictEl.empty(),this.conflictEl.style.marginRight=""),this.plugin.state.gitAction){case 0:this.displayFromNow();break;case 1:this.statusBarEl.ariaLabel="Checking repository status...",(0,Nr.setIcon)(this.iconEl,"refresh-cw"),this.statusBarEl.addClass(this.base+"status");break;case 3:this.statusBarEl.ariaLabel="Adding files...",(0,Nr.setIcon)(this.iconEl,"archive"),this.statusBarEl.addClass(this.base+"add");break;case 4:this.statusBarEl.ariaLabel="Committing changes...",(0,Nr.setIcon)(this.iconEl,"git-commit"),this.statusBarEl.addClass(this.base+"commit");break;case 5:this.statusBarEl.ariaLabel="Pushing changes...",(0,Nr.setIcon)(this.iconEl,"upload"),this.statusBarEl.addClass(this.base+"push");break;case 2:this.statusBarEl.ariaLabel="Pulling changes...",(0,Nr.setIcon)(this.iconEl,"download"),this.statusBarEl.addClass(this.base+"pull");break;default:this.statusBarEl.ariaLabel="Failed on initialization!",(0,Nr.setIcon)(this.iconEl,"alert-triangle"),this.statusBarEl.addClass(this.base+"failed-init");break}}displayFromNow(){var n;let t=this.lastCommitTimestamp,r=this.plugin.state.offlineMode;if(t){let i=(0,Nr.moment)(t).fromNow();this.statusBarEl.ariaLabel=`${r?"Offline: ":""}Last Commit: ${i}`,(n=this.unPushedCommits)!=null&&n&&(this.statusBarEl.ariaLabel+=` -(${this.unPushedCommits} unpushed commits)`)}else this.statusBarEl.ariaLabel=r?"Git is offline":"Git is ready";r?(0,Nr.setIcon)(this.iconEl,"globe"):(0,Nr.setIcon)(this.iconEl,"check"),this.plugin.settings.changedFilesInStatusBar&&this.plugin.cachedStatus&&this.textEl.setText(this.plugin.cachedStatus.changed.length.toString()),this.statusBarEl.addClass(this.base+"idle")}async refreshCommitTimestamp(){this.lastCommitTimestamp=await this.plugin.gitManager.getLastCommitTime(),this.unPushedCommits=await this.plugin.gitManager.getUnpushedCommits()}remove(){this.statusBarEl.remove()}};g();var ld=require("obsidian"),od=class extends ld.SuggestModal{constructor(r){super(r.app);this.plugin=r;this.resolve=null;this.setPlaceholder("Type your message and select optional the version with the added date.")}openAndGetResult(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(r){let n=(0,ld.moment)().format(this.plugin.settings.commitDateFormat);return r==""&&(r="..."),[r,`${n}: ${r}`,`${r}: ${n}`]}renderSuggestion(r,n){n.innerText=r}onChooseSuggestion(r,n){this.resolve&&this.resolve(r)}};g();var rC=require("obsidian"),Xl=class{constructor(t){this.plugin=t}saveLastAuto(t,r){r==="backup"?this.plugin.localStorage.setLastAutoBackup(t.toString()):r==="pull"?this.plugin.localStorage.setLastAutoPull(t.toString()):r==="push"&&this.plugin.localStorage.setLastAutoPush(t.toString())}loadLastAuto(){var t,r,n;return{backup:new Date((t=this.plugin.localStorage.getLastAutoBackup())!=null?t:""),pull:new Date((r=this.plugin.localStorage.getLastAutoPull())!=null?r:""),push:new Date((n=this.plugin.localStorage.getLastAutoPush())!=null?n:"")}}async init(){await this.setUpAutoCommitAndSync();let t=this.loadLastAuto();if(this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0){let r=this.diff(this.plugin.settings.autoPushInterval,t.push);this.startAutoPush(r)}if(this.plugin.settings.autoPullInterval>0){let r=this.diff(this.plugin.settings.autoPullInterval,t.pull);this.startAutoPull(r)}}unload(){this.clearAutoPull(),this.clearAutoPush(),this.clearAutoCommitAndSync()}reload(...t){t.contains("commit")&&(this.clearAutoCommitAndSync(),this.plugin.settings.autoSaveInterval>0&&this.startAutoCommitAndSync(this.plugin.settings.autoSaveInterval)),t.contains("push")&&(this.clearAutoPush(),this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0&&this.startAutoPush(this.plugin.settings.autoPushInterval)),t.contains("pull")&&(this.clearAutoPull(),this.plugin.settings.autoPullInterval>0&&this.startAutoPull(this.plugin.settings.autoPullInterval))}async setUpAutoCommitAndSync(){if(this.plugin.settings.setLastSaveToLastCommit){this.clearAutoCommitAndSync();let t=await this.plugin.gitManager.getLastCommitTime();t&&this.saveLastAuto(t,"backup")}if(!this.timeoutIDCommitAndSync&&!this.plugin.autoCommitDebouncer){let t=this.loadLastAuto();if(this.plugin.settings.autoSaveInterval>0){let r=this.diff(this.plugin.settings.autoSaveInterval,t.backup);this.startAutoCommitAndSync(r)}}}startAutoCommitAndSync(t){let r=(t!=null?t:this.plugin.settings.autoSaveInterval)*6e4;this.plugin.settings.autoBackupAfterFileChange?t===0?this.doAutoCommitAndSync():this.plugin.autoCommitDebouncer=(0,rC.debounce)(()=>this.doAutoCommitAndSync(),r,!0):(r>2147483647&&(r=2147483647),this.timeoutIDCommitAndSync=window.setTimeout(()=>this.doAutoCommitAndSync(),r))}doAutoCommitAndSync(){this.plugin.promiseQueue.addTask(async()=>{if(this.plugin.settings.setLastSaveToLastCommit){let t=await this.plugin.gitManager.getLastCommitTime();if(t){this.saveLastAuto(t,"backup");let r=this.diff(this.plugin.settings.autoSaveInterval,t);if(r>0)return this.startAutoCommitAndSync(r),!1}}return this.plugin.settings.differentIntervalCommitAndPush?await this.plugin.commit({fromAuto:!0}):await this.plugin.commitAndSync(!0),!0},t=>{t!==!1&&(this.saveLastAuto(new Date,"backup"),this.startAutoCommitAndSync())})}startAutoPull(t){let r=(t!=null?t:this.plugin.settings.autoPullInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPull=window.setTimeout(()=>this.doAutoPull(),r)}doAutoPull(){this.plugin.promiseQueue.addTask(()=>this.plugin.pullChangesFromRemote(),()=>{this.saveLastAuto(new Date,"pull"),this.startAutoPull()})}startAutoPush(t){let r=(t!=null?t:this.plugin.settings.autoPushInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPush=window.setTimeout(()=>this.doAutoPush(),r)}doAutoPush(){this.plugin.promiseQueue.addTask(()=>this.plugin.push(),()=>{this.saveLastAuto(new Date,"push"),this.startAutoPush()})}clearAutoCommitAndSync(){var r;let t=!1;return this.timeoutIDCommitAndSync&&(window.clearTimeout(this.timeoutIDCommitAndSync),this.timeoutIDCommitAndSync=void 0,t=!0),this.plugin.autoCommitDebouncer&&((r=this.plugin.autoCommitDebouncer)==null||r.cancel(),this.plugin.autoCommitDebouncer=void 0,t=!0),t}clearAutoPull(){return this.timeoutIDPull?(window.clearTimeout(this.timeoutIDPull),this.timeoutIDPull=void 0,!0):!1}clearAutoPush(){return this.timeoutIDPush?(window.clearTimeout(this.timeoutIDPush),this.timeoutIDPush=void 0,!0):!1}diff(t,r){let i=t-Math.round((new Date().getTime()-r.getTime())/1e3/60);return Math.max(0,i)}};g();var Kl=require("obsidian");g();var Zl=require("obsidian");async function nC(e,t,r){let n=await aC(t,r);if(n.result==="failure"){new Zl.Notice(n.reason);return}let{isGitHub:i,branch:a,repo:s,user:o,filePath:c}=n;if(i){let l=e.getCursor("from").line+1,u=e.getCursor("to").line+1;l===u?window.open(`https://github.com/${o}/${s}/blob/${a}/${c}?plain=1#L${l}`):window.open(`https://github.com/${o}/${s}/blob/${a}/${c}?plain=1#L${l}-L${u}`)}else new Zl.Notice("It seems like you are not using GitHub")}async function iC(e,t){let r=await aC(e,t);if(r.result==="failure"){new Zl.Notice(r.reason);return}let{isGitHub:n,branch:i,repo:a,user:s,filePath:o}=r;n?window.open(`https://github.com/${s}/${a}/commits/${i}/${o}`):new Zl.Notice("It seems like you are not using GitHub")}async function aC(e,t){let r=await t.branchInfo(),n=r.tracking,i=r.current,a,s=t.getRelativeRepoPath(e.path);if(t instanceof Te){let c=await t.getSubmoduleOfFile(t.getRelativeRepoPath(e.path));if(c){s=c.relativeFilepath;let l=await t.git.cwd({path:c.submodule,root:!1}).status();if(n=l.tracking||void 0,i=l.current||void 0,n){let u=n.substring(0,n.indexOf("/")),f=await t.git.cwd({path:c.submodule,root:!1}).getConfig(`remote.${u}.url`,"local");if(f.value!=null)a=f.value;else return{result:"failure",reason:"Failed to get remote url of submodule"}}}}if(n==null)return{result:"failure",reason:"Remote branch is not configured"};if(i==null)return{result:"failure",reason:"Failed to get current branch name"};if(a==null){let c=n.substring(0,n.indexOf("/"));if(a=await t.getConfig(`remote.${c}.url`),a==null)return{result:"failure",reason:"Failed to get remote url"}}let o=a.match(/(?:^https:\/\/github\.com\/(.+)\/(.+?)(?:\.git)?$)|(?:^[a-zA-Z]+@github\.com:(.+)\/(.+?)(?:\.git)?$)/);if(o==null)return{result:"failure",reason:"Could not parse remote url"};{let[c,l,u,f,d]=o;return{result:"success",isGitHub:!!c,repo:u||d,user:l||f,branch:i,filePath:s}}}g();var sC=require("obsidian"),cd=class extends sC.FuzzySuggestModal{constructor(t,r){super(t.app),this.plugin=t,this.changedFiles=r,this.setPlaceholder("Not supported files will be opened by default app!")}getItems(){return this.changedFiles}getItemText(t){if(t.index=="U"&&t.workingDir=="U")return`Untracked | ${t.vaultPath}`;let r="",n="";return t.workingDir!=" "&&(r=`Working Dir: ${t.workingDir} `),t.index!=" "&&(n=`Index: ${t.index}`),`${r}${n} | ${t.vaultPath}`}onChooseItem(t,r){this.plugin.app.metadataCache.getFirstLinkpathDest(t.vaultPath,"")==null?this.app.openWithDefaultApp(t.vaultPath):this.plugin.app.workspace.openLinkText(t.vaultPath,"/")}};g();var oC=require("obsidian"),ud=class extends oC.Modal{constructor(r,n){super(r);this.content=n;this.resolve=null}openAndGetReslt(){return new Promise(r=>{this.resolve=r,this.open()})}onOpen(){let{contentEl:r,titleEl:n}=this;n.setText("Edit .gitignore");let i=r.createDiv(),a=i.createEl("textarea",{text:this.content,cls:["obsidian-git-textarea"],attr:{rows:10,cols:30,wrap:"off"}});i.createEl("button",{cls:["mod-cta","obsidian-git-center-button"],text:"Save"}).addEventListener("click",()=>{this.resolve(a.value),this.close()})}onClose(){let{contentEl:r}=this;r.empty(),this.resolve&&this.resolve(void 0)}};function lC(e){let t=e.app;e.addCommand({id:"edit-gitignore",name:"Edit .gitignore",callback:async()=>{let r=e.gitManager.getRelativeVaultPath(".gitignore");await t.vault.adapter.exists(r)||await t.vault.adapter.write(r,"");let n=await t.vault.adapter.read(r),a=await new ud(t,n).openAndGetReslt();a!==void 0&&(await t.vault.adapter.write(r,a),await e.refresh())}}),e.addCommand({id:"open-git-view",name:"Open source control view",callback:async()=>{var i;let r=t.workspace.getLeavesOfType(St.type),n;r.length===0?(n=(i=t.workspace.getRightLeaf(!1))!=null?i:t.workspace.getLeaf(),await n.setViewState({type:St.type})):n=r.first(),await t.workspace.revealLeaf(n),t.workspace.trigger("obsidian-git:refresh")}}),e.addCommand({id:"open-history-view",name:"Open history view",callback:async()=>{var i;let r=t.workspace.getLeavesOfType($r.type),n;r.length===0?(n=(i=t.workspace.getRightLeaf(!1))!=null?i:t.workspace.getLeaf(),await n.setViewState({type:$r.type})):n=r.first(),await t.workspace.revealLeaf(n),t.workspace.trigger("obsidian-git:refresh")}}),e.addCommand({id:"open-diff-view",name:"Open diff view",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;{let i=e.gitManager.getRelativeRepoPath(n.path,!0);e.tools.openDiff({aFile:i,aRef:""})}}}),e.addCommand({id:"view-file-on-github",name:"Open file on GitHub",editorCallback:(r,{file:n})=>{if(n)return nC(r,n,e.gitManager)}}),e.addCommand({id:"view-history-on-github",name:"Open file history on GitHub",editorCallback:(r,{file:n})=>{if(n)return iC(n,e.gitManager)}}),e.addCommand({id:"pull",name:"Pull",callback:()=>e.promiseQueue.addTask(()=>e.pullChangesFromRemote())}),e.addCommand({id:"fetch",name:"Fetch",callback:()=>e.promiseQueue.addTask(()=>e.fetch())}),e.addCommand({id:"switch-to-remote-branch",name:"Switch to remote branch",callback:()=>e.promiseQueue.addTask(()=>e.switchRemoteBranch())}),e.addCommand({id:"add-to-gitignore",name:"Add file to .gitignore",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;e.addFileToGitignore(n.path).catch(i=>e.displayError(i))}}),e.addCommand({id:"push",name:"Commit-and-sync",callback:()=>e.promiseQueue.addTask(()=>e.commitAndSync(!1))}),e.addCommand({id:"backup-and-close",name:"Commit-and-sync and then close Obsidian",callback:()=>e.promiseQueue.addTask(async()=>{await e.commitAndSync(!1),window.close()})}),e.addCommand({id:"commit-push-specified-message",name:"Commit-and-sync with specific message",callback:()=>e.promiseQueue.addTask(()=>e.commitAndSync(!1,!0))}),e.addCommand({id:"commit",name:"Commit all changes",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1}))}),e.addCommand({id:"commit-specified-message",name:"Commit all changes with specific message",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1,requestCustomMessage:!0}))}),e.addCommand({id:"commit-staged",name:"Commit staged",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1,requestCustomMessage:!1,onlyStaged:!0}))}),Kl.Platform.isDesktopApp&&e.addCommand({id:"commit-amend-staged-specified-message",name:"Amend staged",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:!0,amend:!0}))}),e.addCommand({id:"commit-staged-specified-message",name:"Commit staged with specific message",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:!0}))}),e.addCommand({id:"push2",name:"Push",callback:()=>e.promiseQueue.addTask(()=>e.push())}),e.addCommand({id:"stage-current-file",name:"Stage current file",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;e.promiseQueue.addTask(()=>e.stageFile(n))}}),e.addCommand({id:"unstage-current-file",name:"Unstage current file",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;e.promiseQueue.addTask(()=>e.unstageFile(n))}}),e.addCommand({id:"edit-remotes",name:"Edit remotes",callback:()=>e.editRemotes().catch(r=>e.displayError(r))}),e.addCommand({id:"remove-remote",name:"Remove remote",callback:()=>e.removeRemote().catch(r=>e.displayError(r))}),e.addCommand({id:"set-upstream-branch",name:"Set upstream branch",callback:()=>e.setUpstreamBranch().catch(r=>e.displayError(r))}),e.addCommand({id:"delete-repo",name:"CAUTION: Delete repository",callback:async()=>{await t.vault.adapter.exists(`${e.settings.basePath}/.git`)?await new Fe(e,{options:["NO","YES"],placeholder:"Do you really want to delete the repository (.git directory)? plugin action cannot be undone.",onlySelection:!0}).openAndGetResult()==="YES"&&(await t.vault.adapter.rmdir(`${e.settings.basePath}/.git`,!0),new Kl.Notice("Successfully deleted repository. Reloading plugin..."),e.unloadPlugin(),await e.init({fromReload:!0})):new Kl.Notice("No repository found")}}),e.addCommand({id:"init-repo",name:"Initialize a new repo",callback:()=>e.createNewRepo().catch(r=>e.displayError(r))}),e.addCommand({id:"clone-repo",name:"Clone an existing remote repo",callback:()=>e.cloneNewRepo().catch(r=>e.displayError(r))}),e.addCommand({id:"list-changed-files",name:"List changed files",callback:async()=>{if(await e.isAllInitialized())try{let r=await e.updateCachedStatus();if(r.changed.length+r.staged.length>500){e.displayError("Too many changes to display");return}new cd(e,r.all).open()}catch(r){e.displayError(r)}}}),e.addCommand({id:"switch-branch",name:"Switch branch",callback:()=>{e.switchBranch().catch(r=>e.displayError(r))}}),e.addCommand({id:"create-branch",name:"Create new branch",callback:()=>{e.createBranch().catch(r=>e.displayError(r))}}),e.addCommand({id:"delete-branch",name:"Delete branch",callback:()=>{e.deleteBranch().catch(r=>e.displayError(r))}}),e.addCommand({id:"discard-all",name:"CAUTION: Discard all changes",callback:async()=>{if(!await e.isAllInitialized())return!1;await new Fe(e,{options:["NO","YES"],placeholder:"Do you want to discard all changes to tracked files? plugin action cannot be undone.",onlySelection:!0}).openAndGetResult()==="YES"&&e.promiseQueue.addTask(()=>e.discardAll())}}),e.addCommand({id:"raw-command",name:"Raw command",checkCallback:r=>{let n=e.gitManager;if(r)return n instanceof Te;e.tools.runRawCommand().catch(i=>e.displayError(i))}}),e.addCommand({id:"toggle-line-author-info",name:"Toggle line author information",callback:()=>{var r;return(r=e.settingsTab)==null?void 0:r.configureLineAuthorShowStatus(!e.settings.lineAuthor.show)}})}g();var fd=class{constructor(t){this.plugin=t;this.prefix=this.plugin.manifest.id+":",this.app=t.app}migrate(){let t=["password","hostname","conflict","lastAutoPull","lastAutoBackup","lastAutoPush","gitPath","pluginDisabled"];for(let r of t){let n=localStorage.getItem(this.prefix+r);this.app.loadLocalStorage(this.prefix+r)==null&&n!=null&&n!=null&&(this.app.saveLocalStorage(this.prefix+r,n),localStorage.removeItem(this.prefix+r))}}getPassword(){return this.app.loadLocalStorage(this.prefix+"password")}setPassword(t){return this.app.saveLocalStorage(this.prefix+"password",t)}getUsername(){return this.app.loadLocalStorage(this.prefix+"username")}setUsername(t){return this.app.saveLocalStorage(this.prefix+"username",t)}getHostname(){return this.app.loadLocalStorage(this.prefix+"hostname")}setHostname(t){return this.app.saveLocalStorage(this.prefix+"hostname",t)}getConflict(){return this.app.loadLocalStorage(this.prefix+"conflict")=="true"}setConflict(t){return this.app.saveLocalStorage(this.prefix+"conflict",`${t}`)}getLastAutoPull(){return this.app.loadLocalStorage(this.prefix+"lastAutoPull")}setLastAutoPull(t){return this.app.saveLocalStorage(this.prefix+"lastAutoPull",t)}getLastAutoBackup(){return this.app.loadLocalStorage(this.prefix+"lastAutoBackup")}setLastAutoBackup(t){return this.app.saveLocalStorage(this.prefix+"lastAutoBackup",t)}getLastAutoPush(){return this.app.loadLocalStorage(this.prefix+"lastAutoPush")}setLastAutoPush(t){return this.app.saveLocalStorage(this.prefix+"lastAutoPush",t)}getGitPath(){return this.app.loadLocalStorage(this.prefix+"gitPath")}setGitPath(t){return this.app.saveLocalStorage(this.prefix+"gitPath",t)}getPATHPaths(){var t,r;return(r=(t=this.app.loadLocalStorage(this.prefix+"PATHPaths"))==null?void 0:t.split(":"))!=null?r:[]}setPATHPaths(t){return this.app.saveLocalStorage(this.prefix+"PATHPaths",t.join(":"))}getEnvVars(){var t;return JSON.parse((t=this.app.loadLocalStorage(this.prefix+"envVars"))!=null?t:"[]")}setEnvVars(t){return this.app.saveLocalStorage(this.prefix+"envVars",JSON.stringify(t))}getPluginDisabled(){return this.app.loadLocalStorage(this.prefix+"pluginDisabled")=="true"}setPluginDisabled(t){return this.app.saveLocalStorage(this.prefix+"pluginDisabled",`${t}`)}};g();g();g();g();var He;(function(e){e.INSERT="insert",e.DELETE="delete",e.CONTEXT="context"})(He||(He={}));var cC={LINE_BY_LINE:"line-by-line",SIDE_BY_SIDE:"side-by-side"},uC={LINES:"lines",WORDS:"words",NONE:"none"},fC={WORD:"word",CHAR:"char"},Ea;(function(e){e.AUTO="auto",e.DARK="dark",e.LIGHT="light"})(Ea||(Ea={}));g();var yB=["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"],wB=RegExp("["+yB.join("\\")+"]","g");function dC(e){return e.replace(wB,"\\$&")}function m0(e){return e&&e.replace(/\\/g,"/")}function hC(e){let t,r,n,i=0;for(t=0,n=e.length;t1?r[r.length-1]:t}function mC(e,t){return t.reduce((r,n)=>r||e.startsWith(n),!1)}var gC=["a/","b/","i/","w/","c/","o/"];function $i(e,t,r){let n=r!==void 0?[...gC,r]:gC,i=t?new RegExp(`^${dC(t)} "?(.+?)"?$`):new RegExp('^"?(.+?)"?$'),[,a=""]=i.exec(e)||[],s=n.find(c=>a.indexOf(c)===0);return(s?a.slice(s.length):a).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function bB(e,t){return $i(e,"---",t)}function _B(e,t){return $i(e,"+++",t)}function vC(e,t={}){let r=[],n=null,i=null,a=null,s=null,o=null,c=null,l=null,u="--- ",f="+++ ",d="@@",h=/^old mode (\d{6})/,p=/^new mode (\d{6})/,m=/^deleted file mode (\d{6})/,v=/^new file mode (\d{6})/,y=/^copy from "?(.+)"?/,b=/^copy to "?(.+)"?/,x=/^rename from "?(.+)"?/,E=/^rename to "?(.+)"?/,_=/^similarity index (\d+)%/,k=/^dissimilarity index (\d+)%/,w=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,A=/^Binary files (.*) and (.*) differ/,S=/^GIT binary patch/,T=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,P=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,O=/^new file mode (\d{6})/,j=/^deleted file mode (\d{6}),(\d{6})/,D=e.replace(/\\ No newline at end of file/g,"").replace(/\r\n?/g,` + >${o}`}`}previewCustomDateTimeDescriptionHtml(r){let n=(0,U.moment)().format(r);return`Format string to display the authoring date.
Currently: ${n}`}previewOldestAgeDescriptionHtml(r){let n=Gf(r);return[`The oldest age in the line author coloring. Everything older will have the same color. +
Smallest valid age is "1d". Currently: ${n!==void 0?`${n.asDays()} days`:"invalid!"}`,n]}setNonDefaultValue({settingsProperty:r,text:n}){let i=this.plugin.settings[r];Ye[r]!==i&&n.setValue(String(i))}refreshDisplayWithDelay(r=80){setTimeout(()=>this.display(),r)}};function a0(e,t){return e==="oldest"?t.colorOld:t.colorNew}function Gf(e){let t=U.moment.duration("P"+e.toUpperCase());return t.isValid()&&t.asDays()&&t.asDays()>=1?t:void 0}function IT(e,t,r){if(!(e===void 0||t===void 0||r===void 0))return`head${e}-obj${t}-path${r}`}var FT=zf.Annotation.define();function $T(e,t,r){return r.update({annotations:FT.of({key:e,la:t,lineOffsetsFromUnsavedChanges:new Map})})}function aj(e){return e.annotation(FT)}var Zs=zf.StateField.define({create:e=>{},update:(e,t)=>{var r;return(r=aj(t))!=null?r:sj(t,e)},compare:(e,t)=>(e==null?void 0:e.key)===(t==null?void 0:t.key)});function Vf(e){var a;let t=OT.sha256.create();if(!e)return t;let{la:r,key:n,lineOffsetsFromUnsavedChanges:i}=e;t.update(r==="untracked"?"t":"f"),t.update(n);for(let[s,o]of(a=i.entries())!=null?a:[])t.update([s,o]);return t}var Nr={get:void 0,save:void 0};function LT(e,t){Nr.get=e,Nr.save=t}function Wf(e){var t,r;return(r=(t=Gf(e.coloringMaxAge))==null?void 0:t.asDays())!=null?r:Gf(Ye.lineAuthor.coloringMaxAge).asDays()}function sj(e,t){if(t)return e.changes.empty||e.changes.iterChanges((r,n,i,a)=>{var p;let s=e.startState.doc,{newDoc:o}=e,l=s.lineAt(r).number,c=s.lineAt(n).number,u=o.lineAt(i).number,f=o.lineAt(a).number,d=c-l+1,h=f-u+1;for(let m=u;m<=f;m++){let v=(p=t.lineOffsetsFromUnsavedChanges.get(m))!=null?p:0,y=f===m,b=h-d;y&&(v+=b),t.lineOffsetsFromUnsavedChanges.set(m,v)}}),t}var o0=class{constructor(t){this.state=t;this.subscribeMe()}notifyLineAuthoring(t,r){if(this.view===void 0){console.warn(`Git: View is not defined for editor cache key. Unforeseen situation. id: ${t}`);return}let n=this.view.state,i=$T(t,r,n);this.view.dispatch(i)}updateToNewState(t){let r=this.lastSeenPath&&this.filepath!=this.lastSeenPath;return this.state=t,r&&(this.unsubscribeMe(this.lastSeenPath),this.subscribeMe()),this}removeIfStale(){this.view.destroyed&&this.unsubscribeMe(this.lastSeenPath)}subscribeMe(){this.filepath!==void 0&&(Xs.ifFilepathDefinedTransformSubscribers(this.filepath,t=>t.add(this)),this.lastSeenPath=this.filepath)}unsubscribeMe(t){Xs.ifFilepathDefinedTransformSubscribers(t,r=>r.delete(this))}get filepath(){var t,r;return(r=(t=this.state.field(qf.editorInfoField))==null?void 0:t.file)==null?void 0:r.path}get view(){return this.state.field(qf.editorEditorField)}},NT=DT.StateField.define({create:e=>new o0(e),update:(e,t)=>e.updateToNewState(t.state),compare:(e,t)=>e===t});g();function BT(){Ks=void 0,l0=[],Yf=0,Zf.clear(),Kf.clear(),Js.clear()}var Ks,Xf=()=>Ks;function jT(e,t){var i;let r=t.length;if(r<((i=Ks==null?void 0:Ks.length)!=null?i:0))return;Ks={gutter:e,length:r,text:t};let n=Nr.get();r!==n.gutterSpacingFallbackLength&&(n.gutterSpacingFallbackLength=r,Nr.save(n))}var l0=[],oj=15,Yf=0;function HT(e){l0[Yf]=e,Yf=(Yf+1)%oj}function UT(){return hT(l0)}var Zf=new Map,Kf=new Map,Js=new Set;g();var tC=require("@codemirror/state"),rC=require("@codemirror/view");g();var d0=require("@codemirror/view"),KT=ze(Zg()),ed=require("obsidian");g();g();var Jf={x:-10,y:-10};function GT(){Jf.x===-10&&window.addEventListener("mousedown",e=>{Jf.x=e.clientX,Jf.y=e.clientY})}function zT(){for(let e of Js)if(lj(e,Jf))return e}function lj(e,t){let{x:r,y:n,width:i,height:a}=e.getBoundingClientRect();return r<=t.x&&t.x<=r+i&&n<=t.y&&t.y<=n+a}g();var Kl={};var VT="data-commit";function WT(e,t,r){if(t.hasFocus())return;let n=zT();if(!n)return;let i=uj(n);i&&(!i.isZeroCommit&&!i.isWaitingGutter&&cj(i,e),c0("showCommitHash",e),c0("authorDisplay",e),c0("dateTimeFormatOptions",e))}function cj(e,t){t.addItem(r=>r.setTitle("Copy commit hash").setIcon("copy").setSection("obs-git-line-author-copy").onClick(n=>navigator.clipboard.writeText(e.hash)))}function c0(e,t){var l,c;let r,n,i=Kl.plugin.settings.lineAuthor,a=i[e],s=typeof a=="boolean"?a:a!=="hide",o=Ye.lineAuthor[e];if(e==="showCommitHash")r="Show commit hash",n=a;else if(e==="authorDisplay"){let u=(l=i.lastShownAuthorDisplay)!=null?l:o;r="Show author "+(s?a:u),n=s?"hide":u}else if(e==="dateTimeFormatOptions"){let u=(c=i.lastShownDateTimeFormatOptions)!=null?c:o;r="Show "+(s?a:u),r+=r.contains("date")?"":" date",n=s?"hide":u}else Ii(e);t.addItem(u=>u.setTitle(r).setSection("obs-git-line-author-configure").setChecked(s).onClick(f=>{var d,h;return(h=(d=Kl.plugin)==null?void 0:d.settingsTab)==null?void 0:h.lineAuthorSettingHandler(e,n)}))}function qT(e,t,r){r.setAttr(VT,JSON.stringify({hash:e.hash,isZeroCommit:e.isZeroCommit,isWaitingGutter:t}))}function uj(e){let t=e.getAttr(VT);return t?JSON.parse(t):void 0}g();function s0(e,t){return e==="oldest"?Qf(0,!1,t).color:Qf(void 0,!0,t).color}function Qf(e,t,r){let n=Wf(r),i=Date.now()/1e3,a=e!=null?e:0,o=(t?0:i-a)/60/60/24,l=Math.pow(Math.clamp(o/n,0,1),1/2.3),c=fj(),u=r.colorNew,f=r.colorOld,d=c?.4:1,h=u0(u.r,f.r,l)*d,p=u0(u.g,f.g,l)*d,m=u0(u.b,f.b,l)*d;return{color:`rgba(${h},${p},${m},${c?.75:.25})`,daysSinceCommit:o}}function u0(e,t,r){return e+(t-e)*r}function fj(){var e;return((e=window.app)==null?void 0:e.getTheme())==="obsidian"}function YT(e){document.body.style.setProperty("--obs-git-gutter-text",e.textColorCss)}g();function XT(e,t,r){let n;for(let i=t;i<=r;i++){let a=e.hashPerLine[i],s=e.commits.get(a);(!n||s.isZeroCommit||dj(s,n))&&(n=s)}return n}function dj(e,t){var i,a,s,o;let r=(a=(i=e.author)==null?void 0:i.epochSeconds)!=null?a:0,n=(o=(s=t.author)==null?void 0:s.epochSeconds)!=null?o:0;return r>n}var ZT="-",hj="+",pj=3,mj="*",gj=/\S/g,vj="%",Qs=class e extends d0.GutterMarker{constructor(r){super();this.text=r}eq(r){return r instanceof e&&this.text===r.text}toDOM(){return document.createTextNode(this.text)}destroy(r){r&&(document.body.contains(r)||r.remove())}},f0=class extends d0.GutterMarker{constructor(r,n,i,a,s,o){super();this.lineAuthoring=r;this.startLine=n;this.endLine=i;this.key=a;this.settings=s;this.options=o;this.point=!1;this.elementClass="obs-git-blame-gutter"}eq(r){return this.key===(r==null?void 0:r.key)&&this.startLine===(r==null?void 0:r.startLine)&&this.endLine===(r==null?void 0:r.endLine)&&(this==null?void 0:this.options)===(r==null?void 0:r.options)}toDOM(){var r;return this.precomputedDomProvider=(r=this.precomputedDomProvider)!=null?r:this.computeDom(),this.precomputedDomProvider()}destroy(r){r&&(document.body.contains(r)||(Js.delete(r),r.remove()))}computeDom(){let r=XT(this.lineAuthoring,this.startLine,this.endLine),n=r.isZeroCommit?"":this.renderNonZeroCommit(r);return!r.isZeroCommit&&this.options!=="waiting-for-result"?jT(this,n):n=this.adaptTextForFakeCommit(r,n,this.options),this.createHtmlNode(r,n,this.options==="waiting-for-result")}createHtmlNode(r,n,i){var c;let a=window.createDiv();a.innerText=n;let{color:s,daysSinceCommit:o}=Qf((c=r==null?void 0:r.author)==null?void 0:c.epochSeconds,r==null?void 0:r.isZeroCommit,this.settings);a.style.backgroundColor=s,qT(r,i,a);function l(){let u=a.cloneNode(!0);return Js.add(u),i||HT(o),u}return l}renderNonZeroCommit(r){let n=this.settings.showCommitHash?this.renderHash(r):"",i=this.settings.authorDisplay==="hide"?"":`${this.renderAuthorName(r,this.settings.authorDisplay)}`,a=this.settings.dateTimeFormatOptions==="hide"?"":`${this.renderAuthoringDate(r,this.settings.dateTimeFormatOptions,this.settings.dateTimeFormatCustomString,this.settings.dateTimeTimezone)}`;return[n,i,a].filter(o=>o.length>=1).join(" ")}renderHash(r){return r.hash.substring(0,6)}renderAuthorName(r,n){var o,l,c,u;let i=(l=(o=r==null?void 0:r.author)==null?void 0:o.name)!=null?l:"",a=i.split(" ").filter(f=>f.length>=1),s;switch(n){case"initials":s=a.map(f=>f[0].toUpperCase()).join("");break;case"first name":s=(c=a.first())!=null?c:ZT;break;case"last name":s=(u=a.last())!=null?u:ZT;break;case"full":s=i;break;default:return Ii(n)}return pT(r==null?void 0:r.author,r==null?void 0:r.committer)||(s=s+mj),s}renderAuthoringDate(r,n,i,a){var c;let s="?";if(((c=r==null?void 0:r.author)==null?void 0:c.epochSeconds)===void 0)return s;let o;switch(n){case"date":o=Hu;break;case"datetime":o=_m;break;case"custom":o=i;break;case"natural language":o=u=>{let f=u.diff((0,ed.moment)());return ed.moment.duration(f).humanize(!0)};break;default:return Ii(n)}let l=ed.moment.unix(r.author.epochSeconds);switch(a){case"viewer-local":break;case"author-local":l=l.utcOffset(r.author.tz),typeof o=="string"&&(o+=" Z");break;case"utc0000":l=l.utc(),typeof o=="string"&&(o+="[Z]");break;default:return Ii(a)}return typeof o=="string"?l.format(o):o(l)}adaptTextForFakeCommit(r,n,i){var l,c,u,f;let a=(c=(l=Xf())==null?void 0:l.text)!=null?c:n,s=i!=="waiting-for-result"&&r.isZeroCommit?hj:vj;n=a.replace(gj,s);let o=(f=(u=Nr.get())==null?void 0:u.gutterSpacingFallbackLength)!=null?f:n.length;if(n=mT(n,o,s),i!=="waiting-for-result"&&r.isZeroCommit){let d=Math.min(o,pj);n=gT(n,o-d)}return n}};function Ea(e,t,r,n,i,a){let s=KT.sha256.create();s.update(Object.values(i).join(",")),s.update(`s${t}-e${r}-k${n}-o${a}`);let o=s.hex(),l=Zf.get(o);if(l)return l;let c=new f0(e,t,r,n,i,a);return Zf.set(o,c),c}g();var JT=require("obsidian");function h0(){var t,r;let e=(r=(t=Nr.get())==null?void 0:t.gutterSpacingFallbackLength)!=null?r:Ye.lineAuthor.gutterSpacingFallbackLength;return new Qs(Array(e).fill("-").join(""))}function p0(e){let{lineAuthoring:t,ageForInitialRender:r}=yj(e);return Ea(t,1,1,"initialGutter"+r,e,"waiting-for-result")}function yj(e){var a;let t=(a=UT())!=null?a:Wf(e)*.25,r=(0,JT.moment)().add(-t,"days"),n={name:"",epochSeconds:dT(r),tz:"+0000"},i={hash:"waiting-for-result",author:n,committer:n,isZeroCommit:!1};return{lineAuthoring:{hashPerLine:[void 0,"waiting-for-result"],commits:new Map([["waiting-for-result",i]])},ageForInitialRender:t}}g();function QT(e,t){return Ea({hashPerLine:[void 0,"000000"],commits:new Map([["000000",ST]])},1,1,e,t)}var m0=new Qs(""),nC=(0,rC.gutter)({class:"line-author-gutter-container",markers(e){let t=e.state.field(Zs,!1);return wj(e,t)},lineMarkerChange(e){let t=Vf(e.state.field(Zs));return Vf(e.startState.field(Zs))!==t},renderEmptyElements:!0,initialSpacer:e=>(eC(e),h0()),updateSpacer:(e,t)=>{var r,n;return eC(t.view),(n=(r=Xf())==null?void 0:r.gutter)!=null?n:h0()}});function wj(e,t){let r=Vf(t),n=e.state.doc,i=new Map;for(let u=1;u<=n.lines;u++){let f=n.line(u).from,d=e.lineBlockAt(f).to;i.set(u,[f,d]),r.update([f,d,0])}let a=Nr.get();r.update("s"+Object.values(Nr).join(","));let s=r.hex(),o=Kf.get(s);if(o)return o;let{result:l,allowCache:c}=bj(n,i,a,t);return c&&Kf.set(s,l),l}function bj(e,t,r,n){let i=!0,a=e.lines,s=[];function o(f,d,h){return s.push(h.range(f,d))}let l=_j(a,n),c=e.length===0,u=e.iterLines(a,a+1).next().value==="";for(let f=1;f<=a;f++){let[d,h]=t.get(f),p=e.lineAt(h).number;if(c){o(d,h,m0);continue}if(f===a&&u){o(d,h,m0);continue}if(n===void 0){o(d,h,p0(r)),i=!1;continue}let{key:m,la:v}=n;if(v==="untracked"){o(d,h,QT(v,r));continue}let y=v.hashPerLine.length-1,b=l[f],x=l[p];if(x&&x>y&&o(d,h,m0),b!==void 0&&Vg(1,b,y)&&x!==void 0&&Vg(1,x,y)){o(d,h,Ea(v,b,x,m,r));continue}if(y<1){o(d,h,p0(r)),i=!1;continue}let E=Math.clamp(b!=null?b:f,1,y),_=Math.clamp(x!=null?x:p,1,y);o(d,h,Ea(v,E,_,m+"computing",r,"waiting-for-result"))}return{result:tC.RangeSet.of(s,!0),allowCache:i}}function _j(e,t){if(!(t!=null&&t.lineOffsetsFromUnsavedChanges))return Array.from(new Array(e+1),i=>i);let r=[void 0],n=0;for(let i=1;i<=e;i++){let a=t.lineOffsetsFromUnsavedChanges.get(i);n+=a!=null?a:0,r[i]=a===void 0?i-n:void 0}return r}function eC(e){e.dom.querySelectorAll(".cm-gutters").forEach(r=>{r!=null&&r.style&&(r.style.marginLeft||(r.style.marginLeft="unset"))})}var td=class{constructor(t){this.plugin=t;this.lineAuthorings=new Map}async trackChanged(t){return this.trackChangedHelper(t).catch(r=>(console.warn("Git: Error in trackChanged."+r),Promise.reject(r)))}async trackChangedHelper(t){if(t){if(t.path===void 0){console.warn("Git: Attempted to track change of undefined filepath. Unforeseen situation.");return}return this.computeLineAuthorInfo(t.path)}}destroy(){this.lineAuthorings.clear(),Xs.clear(),BT()}async computeLineAuthorInfo(t){let r=this.plugin.lineAuthoringFeature.isAvailableOnCurrentPlatform().gitManager,n=await r.submoduleAwareHeadRevisonInContainingDirectory(t),i=await r.hashObject(t),a=IT(n,i,t);if(a!==void 0){if(!this.lineAuthorings.has(a)){let s=await r.blame(t,this.plugin.settings.lineAuthor.followMovement,this.plugin.settings.lineAuthor.ignoreWhitespace);this.lineAuthorings.set(a,s)}this.notifyComputationResultToSubscribers(t,a)}}notifyComputationResultToSubscribers(t,r){Xs.ifFilepathDefinedTransformSubscribers(t,n=>n.forEach(i=>i.notifyLineAuthoring(r,this.lineAuthorings.get(r))))}},aC=iC.Prec.high([NT,Zs,nC]);var rd=class{constructor(t){this.plg=t;this.codeMirrorExtensions=[];this.handleWorkspaceLeaf=t=>{if(!this.lineAuthorInfoProvider){console.warn("Git: undefined lineAuthorInfoProvider. Unexpected situation.");return}let r=t==null?void 0:t.view;!(r instanceof Aa.MarkdownView)||r.file==null||(r==null?void 0:r.allowNoFile)===!0||this.lineAuthorInfoProvider.trackChanged(r.file).catch(console.error)}}onLoadPlugin(){this.plg.registerEditorExtension(this.codeMirrorExtensions),LT(()=>this.plg.settings.lineAuthor,t=>{this.plg.settings.lineAuthor=t,this.plg.saveSettings()})}conditionallyActivateBySettings(){this.plg.settings.lineAuthor.show&&this.activateFeature()}activateFeature(){try{if(!this.isAvailableOnCurrentPlatform().available)return;YT(this.plg.settings.lineAuthor),this.lineAuthorInfoProvider=new td(this.plg),this.createEventHandlers(),this.activateCodeMirrorExtensions(),console.log(this.plg.manifest.name+": Enabled line authoring.")}catch(t){console.warn("Git: Error while loading line authoring feature.",t),this.deactivateFeature()}}deactivateFeature(){var t;this.destroyEventHandlers(),this.deactivateCodeMirrorExtensions(),(t=this.lineAuthorInfoProvider)==null||t.destroy(),this.lineAuthorInfoProvider=void 0,console.log(this.plg.manifest.name+": Disabled line authoring.")}isAvailableOnCurrentPlatform(){return{available:this.plg.useSimpleGit&&Aa.Platform.isDesktopApp,gitManager:this.plg.gitManager instanceof Ce?this.plg.gitManager:void 0}}refreshLineAuthorViews(){this.plg.settings.lineAuthor.show&&(this.deactivateFeature(),this.activateFeature())}activateCodeMirrorExtensions(){this.codeMirrorExtensions.push(aC),this.plg.app.workspace.updateOptions(),this.plg.app.workspace.iterateAllLeaves(this.handleWorkspaceLeaf)}deactivateCodeMirrorExtensions(){for(let t of this.codeMirrorExtensions)this.codeMirrorExtensions.remove(t);this.plg.app.workspace.updateOptions()}createEventHandlers(){this.gutterContextMenuEvent=this.createGutterContextMenuHandler(),this.fileOpenEvent=this.createFileOpenEvent(),this.workspaceLeafChangeEvent=this.createWorkspaceLeafChangeEvent(),this.fileModificationEvent=this.createVaultFileModificationHandler(),this.refreshOnCssChangeEvent=this.createCssRefreshHandler(),this.fileRenameEvent=this.createFileRenameEvent(),GT(),this.plg.registerEvent(this.gutterContextMenuEvent),this.plg.registerEvent(this.refreshOnCssChangeEvent),this.plg.registerEvent(this.fileOpenEvent),this.plg.registerEvent(this.workspaceLeafChangeEvent),this.plg.registerEvent(this.fileModificationEvent),this.plg.registerEvent(this.fileRenameEvent)}destroyEventHandlers(){this.plg.app.workspace.offref(this.refreshOnCssChangeEvent),this.plg.app.workspace.offref(this.fileOpenEvent),this.plg.app.workspace.offref(this.workspaceLeafChangeEvent),this.plg.app.workspace.offref(this.refreshOnCssChangeEvent),this.plg.app.vault.offref(this.fileRenameEvent),this.plg.app.workspace.offref(this.gutterContextMenuEvent)}createFileOpenEvent(){return this.plg.app.workspace.on("file-open",t=>{var r;return void((r=this.lineAuthorInfoProvider)==null?void 0:r.trackChanged(t).catch(console.error))})}createWorkspaceLeafChangeEvent(){return this.plg.app.workspace.on("active-leaf-change",this.handleWorkspaceLeaf)}createFileRenameEvent(){return this.plg.app.vault.on("rename",(t,r)=>{var n;return t instanceof Aa.TFile&&((n=this.lineAuthorInfoProvider)==null?void 0:n.trackChanged(t))})}createVaultFileModificationHandler(){return this.plg.app.vault.on("modify",t=>{var r;return t instanceof Aa.TFile&&((r=this.lineAuthorInfoProvider)==null?void 0:r.trackChanged(t))})}createCssRefreshHandler(){return this.plg.app.workspace.on("css-change",()=>this.refreshLineAuthorViews())}createGutterContextMenuHandler(){return this.plg.app.workspace.on("editor-menu",WT)}};g();var nd=class{constructor(t){this.plugin=t;this.tasks=[]}addTask(t,r){this.tasks.push({task:t,onFinished:r!=null?r:()=>{}}),this.tasks.length===1&&this.handleTask()}handleTask(){if(this.tasks.length>0){let t=this.tasks[0];t.task().then(r=>{t.onFinished(r),this.tasks.shift(),this.handleTask()},r=>{this.plugin.displayError(r),t.onFinished(void 0),this.tasks.shift(),this.handleTask()})}}clear(){this.tasks=[]}};g();var Br=require("obsidian");var id=class{constructor(t,r){this.statusBarEl=t;this.plugin=r;this.messages=[];this.base="obsidian-git-statusbar-";this.statusBarEl.setAttribute("data-tooltip-position","top"),r.registerEvent(r.app.workspace.on("obsidian-git:refreshed",()=>{this.refreshCommitTimestamp().catch(console.error)}))}displayMessage(t,r){this.messages.push({message:`Git: ${t.slice(0,100)}`,timeout:r}),this.display()}display(){this.messages.length>0&&!this.currentMessage?(this.currentMessage=this.messages.shift(),this.statusBarEl.addClass(this.base+"message"),this.statusBarEl.ariaLabel="",this.statusBarEl.setText(this.currentMessage.message),this.lastMessageTimestamp=Date.now()):this.currentMessage?Date.now()-this.lastMessageTimestamp>=this.currentMessage.timeout&&(this.currentMessage=null,this.lastMessageTimestamp=null):this.displayState()}displayState(){switch((this.statusBarEl.getText().length>3||!this.statusBarEl.hasChildNodes())&&(this.statusBarEl.empty(),this.conflictEl=this.statusBarEl.createDiv(),this.conflictEl.setAttribute("data-tooltip-position","top"),this.conflictEl.style.float="left",this.iconEl=this.statusBarEl.createDiv(),this.iconEl.style.float="left",this.textEl=this.statusBarEl.createDiv(),this.textEl.style.float="right",this.textEl.style.marginLeft="5px"),this.plugin.localStorage.getConflict()?((0,Br.setIcon)(this.conflictEl,"alert-circle"),this.conflictEl.ariaLabel="You have merge conflicts. Resolve them and commit afterwards.",this.conflictEl.style.marginRight="5px",this.conflictEl.addClass(this.base+"conflict")):(this.conflictEl.empty(),this.conflictEl.style.marginRight=""),this.plugin.state.gitAction){case 0:this.displayFromNow();break;case 1:this.statusBarEl.ariaLabel="Checking repository status...",(0,Br.setIcon)(this.iconEl,"refresh-cw"),this.statusBarEl.addClass(this.base+"status");break;case 3:this.statusBarEl.ariaLabel="Adding files...",(0,Br.setIcon)(this.iconEl,"archive"),this.statusBarEl.addClass(this.base+"add");break;case 4:this.statusBarEl.ariaLabel="Committing changes...",(0,Br.setIcon)(this.iconEl,"git-commit"),this.statusBarEl.addClass(this.base+"commit");break;case 5:this.statusBarEl.ariaLabel="Pushing changes...",(0,Br.setIcon)(this.iconEl,"upload"),this.statusBarEl.addClass(this.base+"push");break;case 2:this.statusBarEl.ariaLabel="Pulling changes...",(0,Br.setIcon)(this.iconEl,"download"),this.statusBarEl.addClass(this.base+"pull");break;default:this.statusBarEl.ariaLabel="Failed on initialization!",(0,Br.setIcon)(this.iconEl,"alert-triangle"),this.statusBarEl.addClass(this.base+"failed-init");break}}displayFromNow(){var n;let t=this.lastCommitTimestamp,r=this.plugin.state.offlineMode;if(t){let i=(0,Br.moment)(t).fromNow();this.statusBarEl.ariaLabel=`${r?"Offline: ":""}Last Commit: ${i}`,(n=this.unPushedCommits)!=null&&n&&(this.statusBarEl.ariaLabel+=` +(${this.unPushedCommits} unpushed commits)`)}else this.statusBarEl.ariaLabel=r?"Git is offline":"Git is ready";r?(0,Br.setIcon)(this.iconEl,"globe"):(0,Br.setIcon)(this.iconEl,"check"),this.plugin.settings.changedFilesInStatusBar&&this.plugin.cachedStatus&&this.textEl.setText(this.plugin.cachedStatus.changed.length.toString()),this.statusBarEl.addClass(this.base+"idle")}async refreshCommitTimestamp(){this.lastCommitTimestamp=await this.plugin.gitManager.getLastCommitTime(),this.unPushedCommits=await this.plugin.gitManager.getUnpushedCommits()}remove(){this.statusBarEl.remove()}};g();var sd=require("obsidian"),ad=class extends sd.SuggestModal{constructor(r){super(r.app);this.plugin=r;this.resolve=null;this.setPlaceholder("Type your message and select optional the version with the added date.")}openAndGetResult(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(r){let n=(0,sd.moment)().format(this.plugin.settings.commitDateFormat);return r==""&&(r="..."),[r,`${n}: ${r}`,`${r}: ${n}`]}renderSuggestion(r,n){n.innerText=r}onChooseSuggestion(r,n){this.resolve&&this.resolve(r)}};g();var sC=require("obsidian"),Jl=class{constructor(t){this.plugin=t}saveLastAuto(t,r){r==="backup"?this.plugin.localStorage.setLastAutoBackup(t.toString()):r==="pull"?this.plugin.localStorage.setLastAutoPull(t.toString()):r==="push"&&this.plugin.localStorage.setLastAutoPush(t.toString())}loadLastAuto(){var t,r,n;return{backup:new Date((t=this.plugin.localStorage.getLastAutoBackup())!=null?t:""),pull:new Date((r=this.plugin.localStorage.getLastAutoPull())!=null?r:""),push:new Date((n=this.plugin.localStorage.getLastAutoPush())!=null?n:"")}}async init(){await this.setUpAutoCommitAndSync();let t=this.loadLastAuto();if(this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0){let r=this.diff(this.plugin.settings.autoPushInterval,t.push);this.startAutoPush(r)}if(this.plugin.settings.autoPullInterval>0){let r=this.diff(this.plugin.settings.autoPullInterval,t.pull);this.startAutoPull(r)}}unload(){this.clearAutoPull(),this.clearAutoPush(),this.clearAutoCommitAndSync()}reload(...t){t.contains("commit")&&(this.clearAutoCommitAndSync(),this.plugin.settings.autoSaveInterval>0&&this.startAutoCommitAndSync(this.plugin.settings.autoSaveInterval)),t.contains("push")&&(this.clearAutoPush(),this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0&&this.startAutoPush(this.plugin.settings.autoPushInterval)),t.contains("pull")&&(this.clearAutoPull(),this.plugin.settings.autoPullInterval>0&&this.startAutoPull(this.plugin.settings.autoPullInterval))}async setUpAutoCommitAndSync(){if(this.plugin.settings.setLastSaveToLastCommit){this.clearAutoCommitAndSync();let t=await this.plugin.gitManager.getLastCommitTime();t&&this.saveLastAuto(t,"backup")}if(!this.timeoutIDCommitAndSync&&!this.plugin.autoCommitDebouncer){let t=this.loadLastAuto();if(this.plugin.settings.autoSaveInterval>0){let r=this.diff(this.plugin.settings.autoSaveInterval,t.backup);this.startAutoCommitAndSync(r)}}}startAutoCommitAndSync(t){let r=(t!=null?t:this.plugin.settings.autoSaveInterval)*6e4;this.plugin.settings.autoBackupAfterFileChange?t===0?this.doAutoCommitAndSync():this.plugin.autoCommitDebouncer=(0,sC.debounce)(()=>this.doAutoCommitAndSync(),r,!0):(r>2147483647&&(r=2147483647),this.timeoutIDCommitAndSync=window.setTimeout(()=>this.doAutoCommitAndSync(),r))}doAutoCommitAndSync(){this.plugin.promiseQueue.addTask(async()=>{if(this.plugin.settings.setLastSaveToLastCommit){let t=await this.plugin.gitManager.getLastCommitTime();if(t){this.saveLastAuto(t,"backup");let r=this.diff(this.plugin.settings.autoSaveInterval,t);if(r>0)return this.startAutoCommitAndSync(r),!1}}return this.plugin.settings.differentIntervalCommitAndPush?await this.plugin.commit({fromAuto:!0}):await this.plugin.commitAndSync({fromAutoBackup:!0}),!0},t=>{t!==!1&&(this.saveLastAuto(new Date,"backup"),this.startAutoCommitAndSync())})}startAutoPull(t){let r=(t!=null?t:this.plugin.settings.autoPullInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPull=window.setTimeout(()=>this.doAutoPull(),r)}doAutoPull(){this.plugin.promiseQueue.addTask(()=>this.plugin.pullChangesFromRemote(),()=>{this.saveLastAuto(new Date,"pull"),this.startAutoPull()})}startAutoPush(t){let r=(t!=null?t:this.plugin.settings.autoPushInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPush=window.setTimeout(()=>this.doAutoPush(),r)}doAutoPush(){this.plugin.promiseQueue.addTask(()=>this.plugin.push(),()=>{this.saveLastAuto(new Date,"push"),this.startAutoPush()})}clearAutoCommitAndSync(){var r;let t=!1;return this.timeoutIDCommitAndSync&&(window.clearTimeout(this.timeoutIDCommitAndSync),this.timeoutIDCommitAndSync=void 0,t=!0),this.plugin.autoCommitDebouncer&&((r=this.plugin.autoCommitDebouncer)==null||r.cancel(),this.plugin.autoCommitDebouncer=void 0,t=!0),t}clearAutoPull(){return this.timeoutIDPull?(window.clearTimeout(this.timeoutIDPull),this.timeoutIDPull=void 0,!0):!1}clearAutoPush(){return this.timeoutIDPush?(window.clearTimeout(this.timeoutIDPush),this.timeoutIDPush=void 0,!0):!1}diff(t,r){let i=t-Math.round((new Date().getTime()-r.getTime())/1e3/60);return Math.max(0,i)}};g();var ka=require("obsidian");g();var Ql=require("obsidian");async function oC(e,t,r){let n=await cC(t,r);if(n.result==="failure"){new Ql.Notice(n.reason);return}let{isGitHub:i,branch:a,repo:s,user:o,filePath:l}=n;if(i){let c=e.getCursor("from").line+1,u=e.getCursor("to").line+1;c===u?window.open(`https://github.com/${o}/${s}/blob/${a}/${l}?plain=1#L${c}`):window.open(`https://github.com/${o}/${s}/blob/${a}/${l}?plain=1#L${c}-L${u}`)}else new Ql.Notice("It seems like you are not using GitHub")}async function lC(e,t){let r=await cC(e,t);if(r.result==="failure"){new Ql.Notice(r.reason);return}let{isGitHub:n,branch:i,repo:a,user:s,filePath:o}=r;n?window.open(`https://github.com/${s}/${a}/commits/${i}/${o}`):new Ql.Notice("It seems like you are not using GitHub")}async function cC(e,t){let r=await t.branchInfo(),n=r.tracking,i=r.current,a,s=t.getRelativeRepoPath(e.path);if(t instanceof Ce){let l=await t.getSubmoduleOfFile(t.getRelativeRepoPath(e.path));if(l){s=l.relativeFilepath;let c=await t.git.cwd({path:l.submodule,root:!1}).status();if(n=c.tracking||void 0,i=c.current||void 0,n){let u=n.substring(0,n.indexOf("/")),f=await t.git.cwd({path:l.submodule,root:!1}).getConfig(`remote.${u}.url`,"local");if(f.value!=null)a=f.value;else return{result:"failure",reason:"Failed to get remote url of submodule"}}}}if(n==null)return{result:"failure",reason:"Remote branch is not configured"};if(i==null)return{result:"failure",reason:"Failed to get current branch name"};if(a==null){let l=n.substring(0,n.indexOf("/"));if(a=await t.getConfig(`remote.${l}.url`),a==null)return{result:"failure",reason:"Failed to get remote url"}}let o=a.match(/(?:^https:\/\/github\.com\/(.+)\/(.+?)(?:\.git)?$)|(?:^[a-zA-Z]+@github\.com:(.+)\/(.+?)(?:\.git)?$)/);if(o==null)return{result:"failure",reason:"Could not parse remote url"};{let[l,c,u,f,d]=o;return{result:"success",isGitHub:!!l,repo:u||d,user:c||f,branch:i,filePath:s}}}g();var uC=require("obsidian"),od=class extends uC.FuzzySuggestModal{constructor(t,r){super(t.app),this.plugin=t,this.changedFiles=r,this.setPlaceholder("Not supported files will be opened by default app!")}getItems(){return this.changedFiles}getItemText(t){if(t.index=="U"&&t.workingDir=="U")return`Untracked | ${t.vaultPath}`;let r="",n="";return t.workingDir!=" "&&(r=`Working Dir: ${t.workingDir} `),t.index!=" "&&(n=`Index: ${t.index}`),`${r}${n} | ${t.vaultPath}`}onChooseItem(t,r){this.plugin.app.metadataCache.getFirstLinkpathDest(t.vaultPath,"")==null?this.app.openWithDefaultApp(t.vaultPath):this.plugin.app.workspace.openLinkText(t.vaultPath,"/")}};g();var fC=require("obsidian"),ld=class extends fC.Modal{constructor(r,n){super(r);this.content=n;this.resolve=null}openAndGetReslt(){return new Promise(r=>{this.resolve=r,this.open()})}onOpen(){let{contentEl:r,titleEl:n}=this;n.setText("Edit .gitignore");let i=r.createDiv(),a=i.createEl("textarea",{text:this.content,cls:["obsidian-git-textarea"],attr:{rows:10,cols:30,wrap:"off"}});i.createEl("button",{cls:["mod-cta","obsidian-git-center-button"],text:"Save"}).addEventListener("click",()=>{this.resolve(a.value),this.close()})}onClose(){let{contentEl:r}=this;r.empty(),this.resolve&&this.resolve(void 0)}};function dC(e){let t=e.app;e.addCommand({id:"edit-gitignore",name:"Edit .gitignore",callback:async()=>{let r=e.gitManager.getRelativeVaultPath(".gitignore");await t.vault.adapter.exists(r)||await t.vault.adapter.write(r,"");let n=await t.vault.adapter.read(r),a=await new ld(t,n).openAndGetReslt();a!==void 0&&(await t.vault.adapter.write(r,a),await e.refresh())}}),e.addCommand({id:"open-git-view",name:"Open source control view",callback:async()=>{var i;let r=t.workspace.getLeavesOfType(kt.type),n;r.length===0?(n=(i=t.workspace.getRightLeaf(!1))!=null?i:t.workspace.getLeaf(),await n.setViewState({type:kt.type})):n=r.first(),await t.workspace.revealLeaf(n),t.workspace.trigger("obsidian-git:refresh")}}),e.addCommand({id:"open-history-view",name:"Open history view",callback:async()=>{var i;let r=t.workspace.getLeavesOfType(Lr.type),n;r.length===0?(n=(i=t.workspace.getRightLeaf(!1))!=null?i:t.workspace.getLeaf(),await n.setViewState({type:Lr.type})):n=r.first(),await t.workspace.revealLeaf(n),t.workspace.trigger("obsidian-git:refresh")}}),e.addCommand({id:"open-diff-view",name:"Open diff view",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;{let i=e.gitManager.getRelativeRepoPath(n.path,!0);e.tools.openDiff({aFile:i,aRef:""})}}}),e.addCommand({id:"view-file-on-github",name:"Open file on GitHub",editorCallback:(r,{file:n})=>{if(n)return oC(r,n,e.gitManager)}}),e.addCommand({id:"view-history-on-github",name:"Open file history on GitHub",editorCallback:(r,{file:n})=>{if(n)return lC(n,e.gitManager)}}),e.addCommand({id:"pull",name:"Pull",callback:()=>e.promiseQueue.addTask(()=>e.pullChangesFromRemote())}),e.addCommand({id:"fetch",name:"Fetch",callback:()=>e.promiseQueue.addTask(()=>e.fetch())}),e.addCommand({id:"switch-to-remote-branch",name:"Switch to remote branch",callback:()=>e.promiseQueue.addTask(()=>e.switchRemoteBranch())}),e.addCommand({id:"add-to-gitignore",name:"Add file to .gitignore",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;e.addFileToGitignore(n.path,n instanceof ka.TFolder).catch(i=>e.displayError(i))}}),e.addCommand({id:"push",name:"Commit-and-sync",callback:()=>e.promiseQueue.addTask(()=>e.commitAndSync({fromAutoBackup:!1}))}),e.addCommand({id:"backup-and-close",name:"Commit-and-sync and then close Obsidian",callback:()=>e.promiseQueue.addTask(async()=>{await e.commitAndSync({fromAutoBackup:!1}),window.close()})}),e.addCommand({id:"commit-push-specified-message",name:"Commit-and-sync with specific message",callback:()=>e.promiseQueue.addTask(()=>e.commitAndSync({fromAutoBackup:!1,requestCustomMessage:!0}))}),e.addCommand({id:"commit",name:"Commit all changes",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1}))}),e.addCommand({id:"commit-specified-message",name:"Commit all changes with specific message",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1,requestCustomMessage:!0}))}),e.addCommand({id:"commit-staged",name:"Commit staged",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1,requestCustomMessage:!1,onlyStaged:!0}))}),ka.Platform.isDesktopApp&&e.addCommand({id:"commit-amend-staged-specified-message",name:"Amend staged",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:!0,amend:!0}))}),e.addCommand({id:"commit-staged-specified-message",name:"Commit staged with specific message",callback:()=>e.promiseQueue.addTask(()=>e.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:!0}))}),e.addCommand({id:"push2",name:"Push",callback:()=>e.promiseQueue.addTask(()=>e.push())}),e.addCommand({id:"stage-current-file",name:"Stage current file",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;e.promiseQueue.addTask(()=>e.stageFile(n))}}),e.addCommand({id:"unstage-current-file",name:"Unstage current file",checkCallback:r=>{let n=t.workspace.getActiveFile();if(r)return n!==null;e.promiseQueue.addTask(()=>e.unstageFile(n))}}),e.addCommand({id:"edit-remotes",name:"Edit remotes",callback:()=>e.editRemotes().catch(r=>e.displayError(r))}),e.addCommand({id:"remove-remote",name:"Remove remote",callback:()=>e.removeRemote().catch(r=>e.displayError(r))}),e.addCommand({id:"set-upstream-branch",name:"Set upstream branch",callback:()=>e.setUpstreamBranch().catch(r=>e.displayError(r))}),e.addCommand({id:"delete-repo",name:"CAUTION: Delete repository",callback:async()=>{await t.vault.adapter.exists(`${e.settings.basePath}/.git`)?await new $e(e,{options:["NO","YES"],placeholder:"Do you really want to delete the repository (.git directory)? plugin action cannot be undone.",onlySelection:!0}).openAndGetResult()==="YES"&&(await t.vault.adapter.rmdir(`${e.settings.basePath}/.git`,!0),new ka.Notice("Successfully deleted repository. Reloading plugin..."),e.unloadPlugin(),await e.init({fromReload:!0})):new ka.Notice("No repository found")}}),e.addCommand({id:"init-repo",name:"Initialize a new repo",callback:()=>e.createNewRepo().catch(r=>e.displayError(r))}),e.addCommand({id:"clone-repo",name:"Clone an existing remote repo",callback:()=>e.cloneNewRepo().catch(r=>e.displayError(r))}),e.addCommand({id:"list-changed-files",name:"List changed files",callback:async()=>{if(await e.isAllInitialized())try{let r=await e.updateCachedStatus();if(r.changed.length+r.staged.length>500){e.displayError("Too many changes to display");return}new od(e,r.all).open()}catch(r){e.displayError(r)}}}),e.addCommand({id:"switch-branch",name:"Switch branch",callback:()=>{e.switchBranch().catch(r=>e.displayError(r))}}),e.addCommand({id:"create-branch",name:"Create new branch",callback:()=>{e.createBranch().catch(r=>e.displayError(r))}}),e.addCommand({id:"delete-branch",name:"Delete branch",callback:()=>{e.deleteBranch().catch(r=>e.displayError(r))}}),e.addCommand({id:"discard-all",name:"CAUTION: Discard all changes",callback:async()=>{if(!await e.isAllInitialized())return!1;await new $e(e,{options:["NO","YES"],placeholder:"Do you want to discard all changes to tracked files? plugin action cannot be undone.",onlySelection:!0}).openAndGetResult()==="YES"&&e.promiseQueue.addTask(()=>e.discardAll())}}),e.addCommand({id:"raw-command",name:"Raw command",checkCallback:r=>{let n=e.gitManager;if(r)return n instanceof Ce;e.tools.runRawCommand().catch(i=>e.displayError(i))}}),e.addCommand({id:"toggle-line-author-info",name:"Toggle line author information",callback:()=>{var r;return(r=e.settingsTab)==null?void 0:r.configureLineAuthorShowStatus(!e.settings.lineAuthor.show)}})}g();var cd=class{constructor(t){this.plugin=t;this.prefix=this.plugin.manifest.id+":",this.app=t.app}migrate(){let t=["password","hostname","conflict","lastAutoPull","lastAutoBackup","lastAutoPush","gitPath","pluginDisabled"];for(let r of t){let n=localStorage.getItem(this.prefix+r);this.app.loadLocalStorage(this.prefix+r)==null&&n!=null&&n!=null&&(this.app.saveLocalStorage(this.prefix+r,n),localStorage.removeItem(this.prefix+r))}}getPassword(){return this.app.loadLocalStorage(this.prefix+"password")}setPassword(t){return this.app.saveLocalStorage(this.prefix+"password",t)}getUsername(){return this.app.loadLocalStorage(this.prefix+"username")}setUsername(t){return this.app.saveLocalStorage(this.prefix+"username",t)}getHostname(){return this.app.loadLocalStorage(this.prefix+"hostname")}setHostname(t){return this.app.saveLocalStorage(this.prefix+"hostname",t)}getConflict(){return this.app.loadLocalStorage(this.prefix+"conflict")=="true"}setConflict(t){return this.app.saveLocalStorage(this.prefix+"conflict",`${t}`)}getLastAutoPull(){return this.app.loadLocalStorage(this.prefix+"lastAutoPull")}setLastAutoPull(t){return this.app.saveLocalStorage(this.prefix+"lastAutoPull",t)}getLastAutoBackup(){return this.app.loadLocalStorage(this.prefix+"lastAutoBackup")}setLastAutoBackup(t){return this.app.saveLocalStorage(this.prefix+"lastAutoBackup",t)}getLastAutoPush(){return this.app.loadLocalStorage(this.prefix+"lastAutoPush")}setLastAutoPush(t){return this.app.saveLocalStorage(this.prefix+"lastAutoPush",t)}getGitPath(){return this.app.loadLocalStorage(this.prefix+"gitPath")}setGitPath(t){return this.app.saveLocalStorage(this.prefix+"gitPath",t)}getPATHPaths(){var t,r;return(r=(t=this.app.loadLocalStorage(this.prefix+"PATHPaths"))==null?void 0:t.split(":"))!=null?r:[]}setPATHPaths(t){return this.app.saveLocalStorage(this.prefix+"PATHPaths",t.join(":"))}getEnvVars(){var t;return JSON.parse((t=this.app.loadLocalStorage(this.prefix+"envVars"))!=null?t:"[]")}setEnvVars(t){return this.app.saveLocalStorage(this.prefix+"envVars",JSON.stringify(t))}getPluginDisabled(){return this.app.loadLocalStorage(this.prefix+"pluginDisabled")=="true"}setPluginDisabled(t){return this.app.saveLocalStorage(this.prefix+"pluginDisabled",`${t}`)}};g();var eo=require("obsidian");var ec=class{constructor(t){this.plugin=t}async hasTooBigFiles(t){let r=await this.plugin.gitManager.branchInfo(),n=r.tracking?Fi(r.tracking)[0]:null;if(!n)return!1;let i=await this.plugin.gitManager.getRemoteUrl(n);if(i!=null&&i.includes("github.com")){let a=[],s=this.plugin.gitManager;for(let o of t){let l=this.plugin.app.vault.getAbstractFileByPath(o.vaultPath),c=!1;if(l instanceof eo.TFile)l.stat.size>=1e8&&(c=!0);else{let u=await this.plugin.app.vault.adapter.stat(o.vaultPath);u&&u.size>=1e8&&(c=!0)}if(c){let u=!1;s instanceof Ce&&(u=await s.isFileTrackedByLFS(o.path)),u||a.push(o)}}if(a.length>0)return this.plugin.displayError(`Aborted commit, because the following files are too big: +- ${a.map(o=>o.vaultPath).join(` +- `)} +Please remove them or add to .gitignore.`),!0}return!1}async writeAndOpenFile(t){t!==void 0&&await this.plugin.app.vault.adapter.write(Fs,t);let r=!1;this.plugin.app.workspace.iterateAllLeaves(n=>{n.getDisplayText()!=""&&Fs.startsWith(n.getDisplayText())&&(r=!0)}),r||await this.plugin.app.workspace.openLinkText(Fs,"/",!0)}openDiff({aFile:t,bFile:r,aRef:n,bRef:i,event:a}){var l,c;let s=this.plugin.settings.diffStyle;eo.Platform.isMobileApp&&(s="git_unified");let o={aFile:t,bFile:r!=null?r:t,aRef:n,bRef:i};s=="split"?(l=nn(this.plugin.app,a))==null||l.setViewState({type:ki.type,active:!0,state:o}):s=="git_unified"&&((c=nn(this.plugin.app,a))==null||c.setViewState({type:Ti.type,active:!0,state:o}))}async runRawCommand(){let t=this.plugin.gitManager;if(!(t instanceof Ce))return;let n=await new $e(this.plugin,{placeholder:"push origin master",allowEmpty:!1}).openAndGetResult();n!==void 0&&this.plugin.promiseQueue.addTask(async()=>{let i=new eo.Notice(`Running '${n}'...`,999999);try{let a=await t.rawCommand(n);a?(i.setMessage(a),window.setTimeout(()=>i.hide(),5e3)):i.hide()}catch(a){throw i.hide(),a}})}};g();g();g();g();var je;(function(e){e.INSERT="insert",e.DELETE="delete",e.CONTEXT="context"})(je||(je={}));var hC={LINE_BY_LINE:"line-by-line",SIDE_BY_SIDE:"side-by-side"},pC={LINES:"lines",WORDS:"words",NONE:"none"},mC={WORD:"word",CHAR:"char"},Ta;(function(e){e.AUTO="auto",e.DARK="dark",e.LIGHT="light"})(Ta||(Ta={}));g();var xj=["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"],Sj=RegExp("["+xj.join("\\")+"]","g");function gC(e){return e.replace(Sj,"\\$&")}function g0(e){return e&&e.replace(/\\/g,"/")}function vC(e){let t,r,n,i=0;for(t=0,n=e.length;t1?r[r.length-1]:t}function wC(e,t){return t.reduce((r,n)=>r||e.startsWith(n),!1)}var bC=["a/","b/","i/","w/","c/","o/"];function Li(e,t,r){let n=r!==void 0?[...bC,r]:bC,i=t?new RegExp(`^${gC(t)} "?(.+?)"?$`):new RegExp('^"?(.+?)"?$'),[,a=""]=i.exec(e)||[],s=n.find(l=>a.indexOf(l)===0);return(s?a.slice(s.length):a).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function Ej(e,t){return Li(e,"---",t)}function Aj(e,t){return Li(e,"+++",t)}function _C(e,t={}){let r=[],n=null,i=null,a=null,s=null,o=null,l=null,c=null,u="--- ",f="+++ ",d="@@",h=/^old mode (\d{6})/,p=/^new mode (\d{6})/,m=/^deleted file mode (\d{6})/,v=/^new file mode (\d{6})/,y=/^copy from "?(.+)"?/,b=/^copy to "?(.+)"?/,x=/^rename from "?(.+)"?/,E=/^rename to "?(.+)"?/,_=/^similarity index (\d+)%/,k=/^dissimilarity index (\d+)%/,w=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,A=/^Binary files (.*) and (.*) differ/,S=/^GIT binary patch/,T=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,P=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,I=/^new file mode (\d{6})/,N=/^deleted file mode (\d{6}),(\d{6})/,L=e.replace(/\\ No newline at end of file/g,"").replace(/\r\n?/g,` `).split(` -`);function Q(){i!==null&&n!==null&&(n.blocks.push(i),i=null)}function de(){n!==null&&(!n.oldName&&c!==null&&(n.oldName=c),!n.newName&&l!==null&&(n.newName=l),n.newName&&(r.push(n),n=null)),c=null,l=null}function ee(){Q(),de(),n={blocks:[],deletedLines:0,addedLines:0}}function J(F){Q();let G;n!==null&&((G=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(F))?(n.isCombined=!1,a=parseInt(G[1],10),o=parseInt(G[2],10)):(G=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(F))?(n.isCombined=!0,a=parseInt(G[1],10),s=parseInt(G[2],10),o=parseInt(G[3],10)):(F.startsWith(d)&&console.error("Failed to parse lines, starting in 0!"),a=0,o=0,n.isCombined=!1)),i={lines:[],oldStartLine:a,oldStartLine2:s,newStartLine:o,header:F}}function Pe(F){if(n===null||i===null||a===null||o===null)return;let G={content:F},N=n.isCombined?["+ "," +","++"]:["+"],Me=n.isCombined?["- "," -","--"]:["-"];mC(F,N)?(n.addedLines++,G.type=He.INSERT,G.oldNumber=void 0,G.newNumber=o++):mC(F,Me)?(n.deletedLines++,G.type=He.DELETE,G.oldNumber=a++,G.newNumber=void 0):(G.type=He.CONTEXT,G.oldNumber=a++,G.newNumber=o++),i.lines.push(G)}function me(F,G){let N=G;for(;N{if(!F||F.startsWith("*"))return;let N,Me=D[G-1],Dt=D[G+1],_t=D[G+2];if(F.startsWith("diff --git")||F.startsWith("diff --combined")){if(ee(),(N=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(F))&&(c=$i(N[1],void 0,t.dstPrefix),l=$i(N[2],void 0,t.srcPrefix)),n===null)throw new Error("Where is my file !!!");n.isGitDiff=!0;return}if(F.startsWith("Binary files")&&!(n!=null&&n.isGitDiff)){if(ee(),(N=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(F))&&(c=$i(N[1],void 0,t.dstPrefix),l=$i(N[2],void 0,t.srcPrefix)),n===null)throw new Error("Where is my file !!!");n.isBinary=!0;return}if((!n||!n.isGitDiff&&n&&F.startsWith(u)&&Dt.startsWith(f)&&_t.startsWith(d))&&ee(),n!=null&&n.isTooBig)return;if(n&&(typeof t.diffMaxChanges=="number"&&n.addedLines+n.deletedLines>t.diffMaxChanges||typeof t.diffMaxLineLength=="number"&&F.length>t.diffMaxLineLength)){n.isTooBig=!0,n.addedLines=0,n.deletedLines=0,n.blocks=[],i=null;let st=typeof t.diffTooBigMessage=="function"?t.diffTooBigMessage(r.length):"Diff too big to be displayed";J(st);return}if(F.startsWith(u)&&Dt.startsWith(f)||F.startsWith(f)&&Me.startsWith(u)){if(n&&!n.oldName&&F.startsWith("--- ")&&(N=bB(F,t.srcPrefix))){n.oldName=N,n.language=pC(n.oldName,n.language);return}if(n&&!n.newName&&F.startsWith("+++ ")&&(N=_B(F,t.dstPrefix))){n.newName=N,n.language=pC(n.newName,n.language);return}}if(n&&(F.startsWith(d)||n.isGitDiff&&n.oldName&&n.newName&&!i)){J(F);return}if(i&&(F.startsWith("+")||F.startsWith("-")||F.startsWith(" "))){Pe(F);return}let Ee=!me(F,G);if(n===null)throw new Error("Where is my file !!!");(N=h.exec(F))?n.oldMode=N[1]:(N=p.exec(F))?n.newMode=N[1]:(N=m.exec(F))?(n.deletedFileMode=N[1],n.isDeleted=!0):(N=v.exec(F))?(n.newFileMode=N[1],n.isNew=!0):(N=y.exec(F))?(Ee&&(n.oldName=N[1]),n.isCopy=!0):(N=b.exec(F))?(Ee&&(n.newName=N[1]),n.isCopy=!0):(N=x.exec(F))?(Ee&&(n.oldName=N[1]),n.isRename=!0):(N=E.exec(F))?(Ee&&(n.newName=N[1]),n.isRename=!0):(N=A.exec(F))?(n.isBinary=!0,n.oldName=$i(N[1],void 0,t.srcPrefix),n.newName=$i(N[2],void 0,t.dstPrefix),J("Binary file")):S.test(F)?(n.isBinary=!0,J(F)):(N=_.exec(F))?n.unchangedPercentage=parseInt(N[1],10):(N=k.exec(F))?n.changedPercentage=parseInt(N[1],10):(N=w.exec(F))?(n.checksumBefore=N[1],n.checksumAfter=N[2],N[3]&&(n.mode=N[3])):(N=T.exec(F))?(n.checksumBefore=[N[2],N[3]],n.checksumAfter=N[1]):(N=P.exec(F))?(n.oldMode=[N[2],N[3]],n.newMode=N[1]):(N=O.exec(F))?(n.newFileMode=N[1],n.isNew=!0):(N=j.exec(F))&&(n.deletedFileMode=N[1],n.isDeleted=!0)}),Q(),de(),r}g();g();g();function Kn(){}Kn.prototype={diff:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.callback;typeof n=="function"&&(i=n,n={}),this.options=n;var a=this;function s(m){return i?(setTimeout(function(){i(void 0,m)},0),!0):m}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var o=r.length,c=t.length,l=1,u=o+c;n.maxEditLength&&(u=Math.min(u,n.maxEditLength));var f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],r,t,0);if(f[0].newPos+1>=o&&d+1>=c)return s([{value:this.join(r),count:r.length}]);function h(){for(var m=-1*l;m<=l;m+=2){var v=void 0,y=f[m-1],b=f[m+1],x=(b?b.newPos:0)-m;y&&(f[m-1]=void 0);var E=y&&y.newPos+1=o&&x+1>=c)return s(SB(a,v.components,r,t,a.useLongestToken));f[m]=v}l++}if(i)(function m(){setTimeout(function(){if(l>u)return i();h()||m()},0)})();else for(;l<=u;){var p=h();if(p)return p}},pushComponent:function(t,r,n){var i=t[t.length-1];i&&i.added===r&&i.removed===n?t[t.length-1]={count:i.count+1,added:r,removed:n}:t.push({count:1,added:r,removed:n})},extractCommon:function(t,r,n,i){for(var a=r.length,s=n.length,o=t.newPos,c=o-i,l=0;o+1h.length?m:h}),l.value=e.join(u)}else l.value=e.join(r.slice(o,o+l.count));o+=l.count,l.added||(c+=l.count)}}var d=t[s-1];return s>1&&typeof d.value=="string"&&(d.added||d.removed)&&e.equals("",d.value)&&(t[s-2].value+=d.value,t.pop()),t}function EB(e){return{newPos:e.newPos,components:e.components.slice(0)}}var AB=new Kn;function bC(e,t,r){return AB.diff(e,t,r)}var yC=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,wC=/\S/,y0=new Kn;y0.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!wC.test(e)&&!wC.test(t)};y0.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r{let n=e(t).trim(),i=e(r).trim();return RB(n,i)/(n.length+i.length)}}function Js(e){function t(n,i,a=new Map){let s=1/0,o;for(let c=0;c0||o.indexB>0)&&(x=v.concat(x)),(n.length>d||i.length>h)&&(x=x.concat(b)),x}return r}var Et={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},Aa={matching:uC.NONE,matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:fC.WORD,colorScheme:Ea.LIGHT},Cn="/",SC=Ks(e=>e.value),MB=Js(SC);function b0(e){return e.indexOf("dev/null")!==-1}function OB(e){return e.replace(/(]*>((.|\n)*?)<\/ins>)/g,"")}function IB(e){return e.replace(/(]*>((.|\n)*?)<\/del>)/g,"")}function Qs(e){switch(e){case He.CONTEXT:return Et.CONTEXT;case He.INSERT:return Et.INSERTS;case He.DELETE:return Et.DELETES}}function eo(e){switch(e){case Ea.DARK:return"d2h-dark-color-scheme";case Ea.AUTO:return"d2h-auto-color-scheme";case Ea.LIGHT:default:return"d2h-light-color-scheme"}}function FB(e){return e?2:1}function Li(e){return e.slice(0).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function jr(e,t,r=!0){let n=FB(t);return{prefix:e.substring(0,n),content:r?Li(e.substring(n)):e.substring(n)}}function ka(e){let t=m0(e.oldName),r=m0(e.newName);if(t!==r&&!b0(t)&&!b0(r)){let n=[],i=[],a=t.split(Cn),s=r.split(Cn),o=a.length,c=s.length,l=0,u=o-1,f=c-1;for(;ll&&f>l&&a[u]===s[f];)i.unshift(s[f]),u-=1,f-=1;let d=n.join(Cn),h=i.join(Cn),p=a.slice(l,u+1).join(Cn),m=s.slice(l,f+1).join(Cn);return d.length&&h.length?d+Cn+"{"+p+" \u2192 "+m+"}"+Cn+h:d.length?d+Cn+"{"+p+" \u2192 "+m+"}":h.length?"{"+p+" \u2192 "+m+"}"+Cn+h:t+" \u2192 "+r}else return b0(r)?t:r}function to(e){return`d2h-${hC(ka(e)).toString().slice(-6)}`}function ro(e){let t="file-changed";return e.isRename||e.isCopy?t="file-renamed":e.isNew?t="file-added":e.isDeleted?t="file-deleted":e.newName!==e.oldName&&(t="file-renamed"),t}function hd(e,t,r,n={}){let{matching:i,maxLineLengthHighlight:a,matchWordsThreshold:s,diffStyle:o}=Object.assign(Object.assign({},Aa),n),c=jr(e,r,!1),l=jr(t,r,!1);if(c.content.length>a||l.content.length>a)return{oldLine:{prefix:c.prefix,content:Li(c.content)},newLine:{prefix:l.prefix,content:Li(l.content)}};let u=o==="char"?bC(c.content,l.content):_C(c.content,l.content),f=[];if(o==="word"&&i==="words"){let h=u.filter(v=>v.removed),p=u.filter(v=>v.added);MB(p,h).forEach(v=>{v[0].length===1&&v[1].length===1&&SC(v[0][0],v[1][0]){let m=p.added?"ins":p.removed?"del":null,v=f.indexOf(p)>-1?' class="d2h-change"':"",y=Li(p.value);return m!==null?`${h}<${m}${v}>${y}`:`${h}${y}`},"");return{oldLine:{prefix:c.prefix,content:OB(d)},newLine:{prefix:l.prefix,content:IB(d)}}}var EC="file-summary",$B="icon",LB={colorScheme:Aa.colorScheme},pd=class{constructor(t,r={}){this.hoganUtils=t,this.config=Object.assign(Object.assign({},LB),r)}render(t){let r=t.map(n=>this.hoganUtils.render(EC,"line",{fileHtmlId:to(n),oldName:n.oldName,newName:n.newName,fileName:ka(n),deletedLines:"-"+n.deletedLines,addedLines:"+"+n.addedLines},{fileIcon:this.hoganUtils.template($B,ro(n))})).join(` -`);return this.hoganUtils.render(EC,"wrapper",{colorScheme:eo(this.config.colorScheme),filesNumber:t.length,files:r})}};g();var x0=Object.assign(Object.assign({},Aa),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),Ql="generic",AC="line-by-line",DB="icon",NB="tag",ec=class{constructor(t,r={}){this.hoganUtils=t,this.config=Object.assign(Object.assign({},x0),r)}render(t){let r=t.map(n=>{let i;return n.blocks.length?i=this.generateFileHtml(n):i=this.generateEmptyDiff(),this.makeFileDiffHtml(n,i)}).join(` -`);return this.hoganUtils.render(Ql,"wrapper",{colorScheme:eo(this.config.colorScheme),content:r})}makeFileDiffHtml(t,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(t.blocks)&&t.blocks.length===0)return"";let n=this.hoganUtils.template(AC,"file-diff"),i=this.hoganUtils.template(Ql,"file-path"),a=this.hoganUtils.template(DB,"file"),s=this.hoganUtils.template(NB,ro(t));return n.render({file:t,fileHtmlId:to(t),diffs:r,filePath:i.render({fileDiffName:ka(t)},{fileIcon:a,fileTag:s})})}generateEmptyDiff(){return this.hoganUtils.render(Ql,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:Et})}generateFileHtml(t){let r=Js(Ks(n=>jr(n.content,t.isCombined).content));return t.blocks.map(n=>{let i=this.hoganUtils.render(Ql,"block-header",{CSSLineClass:Et,blockHeader:t.isTooBig?n.header:Li(n.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(n).forEach(([a,s,o])=>{if(s.length&&o.length&&!a.length)this.applyRematchMatching(s,o,r).map(([c,l])=>{let{left:u,right:f}=this.processChangedLines(t,t.isCombined,c,l);i+=u,i+=f});else if(a.length)a.forEach(c=>{let{prefix:l,content:u}=jr(c.content,t.isCombined);i+=this.generateSingleLineHtml(t,{type:Et.CONTEXT,prefix:l,content:u,oldNumber:c.oldNumber,newNumber:c.newNumber})});else if(s.length||o.length){let{left:c,right:l}=this.processChangedLines(t,t.isCombined,s,o);i+=c,i+=l}else console.error("Unknown state reached while processing groups of lines",a,s,o)}),i}).join(` -`)}applyLineGroupping(t){let r=[],n=[],i=[];for(let a=0;a0)&&(r.push([[],n,i]),n=[],i=[]),s.type===He.CONTEXT?r.push([[s],[],[]]):s.type===He.INSERT&&n.length===0?r.push([[],[],[s]]):s.type===He.INSERT&&n.length>0?i.push(s):s.type===He.DELETE&&n.push(s)}return(n.length||i.length)&&(r.push([[],n,i]),n=[],i=[]),r}applyRematchMatching(t,r,n){let i=t.length*r.length,a=Math.max.apply(null,[0].concat(t.concat(r).map(o=>o.content.length)));return i{let i;return n.blocks.length?i=this.generateFileHtml(n):i=this.generateEmptyDiff(),this.makeFileDiffHtml(n,i)}).join(` -`);return this.hoganUtils.render(tc,"wrapper",{colorScheme:eo(this.config.colorScheme),content:r})}makeFileDiffHtml(t,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(t.blocks)&&t.blocks.length===0)return"";let n=this.hoganUtils.template(jB,"file-diff"),i=this.hoganUtils.template(tc,"file-path"),a=this.hoganUtils.template(BB,"file"),s=this.hoganUtils.template(HB,ro(t));return n.render({file:t,fileHtmlId:to(t),diffs:r,filePath:i.render({fileDiffName:ka(t)},{fileIcon:a,fileTag:s})})}generateEmptyDiff(){return{right:"",left:this.hoganUtils.render(tc,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:Et})}}generateFileHtml(t){let r=Js(Ks(n=>jr(n.content,t.isCombined).content));return t.blocks.map(n=>{let i={left:this.makeHeaderHtml(n.header,t),right:this.makeHeaderHtml("")};return this.applyLineGroupping(n).forEach(([a,s,o])=>{if(s.length&&o.length&&!a.length)this.applyRematchMatching(s,o,r).map(([c,l])=>{let{left:u,right:f}=this.processChangedLines(t.isCombined,c,l);i.left+=u,i.right+=f});else if(a.length)a.forEach(c=>{let{prefix:l,content:u}=jr(c.content,t.isCombined),{left:f,right:d}=this.generateLineHtml({type:Et.CONTEXT,prefix:l,content:u,number:c.oldNumber},{type:Et.CONTEXT,prefix:l,content:u,number:c.newNumber});i.left+=f,i.right+=d});else if(s.length||o.length){let{left:c,right:l}=this.processChangedLines(t.isCombined,s,o);i.left+=c,i.right+=l}else console.error("Unknown state reached while processing groups of lines",a,s,o)}),i}).reduce((n,i)=>({left:n.left+i.left,right:n.right+i.right}),{left:"",right:""})}applyLineGroupping(t){let r=[],n=[],i=[];for(let a=0;a0)&&(r.push([[],n,i]),n=[],i=[]),s.type===He.CONTEXT?r.push([[s],[],[]]):s.type===He.INSERT&&n.length===0?r.push([[],[],[s]]):s.type===He.INSERT&&n.length>0?i.push(s):s.type===He.DELETE&&n.push(s)}return(n.length||i.length)&&(r.push([[],n,i]),n=[],i=[]),r}applyRematchMatching(t,r,n){let i=t.length*r.length,a=Math.max.apply(null,[0].concat(t.concat(r).map(o=>o.content.length)));return i'),n.b(` +`);function ee(){i!==null&&n!==null&&(n.blocks.push(i),i=null)}function fe(){n!==null&&(!n.oldName&&l!==null&&(n.oldName=l),!n.newName&&c!==null&&(n.newName=c),n.newName&&(r.push(n),n=null)),l=null,c=null}function J(){ee(),fe(),n={blocks:[],deletedLines:0,addedLines:0}}function Q(z){ee();let Y;n!==null&&((Y=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(z))?(n.isCombined=!1,a=parseInt(Y[1],10),o=parseInt(Y[2],10)):(Y=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(z))?(n.isCombined=!0,a=parseInt(Y[1],10),s=parseInt(Y[2],10),o=parseInt(Y[3],10)):(z.startsWith(d)&&console.error("Failed to parse lines, starting in 0!"),a=0,o=0,n.isCombined=!1)),i={lines:[],oldStartLine:a,oldStartLine2:s,newStartLine:o,header:z}}function Pe(z){if(n===null||i===null||a===null||o===null)return;let Y={content:z},O=n.isCombined?["+ "," +","++"]:["+"],he=n.isCombined?["- "," -","--"]:["-"];wC(z,O)?(n.addedLines++,Y.type=je.INSERT,Y.oldNumber=void 0,Y.newNumber=o++):wC(z,he)?(n.deletedLines++,Y.type=je.DELETE,Y.oldNumber=a++,Y.newNumber=void 0):(Y.type=je.CONTEXT,Y.oldNumber=a++,Y.newNumber=o++),i.lines.push(Y)}function ge(z,Y){let O=Y;for(;O{if(!z||z.startsWith("*"))return;let O,he=L[Y-1],Ge=L[Y+1],gt=L[Y+2];if(z.startsWith("diff --git")||z.startsWith("diff --combined")){if(J(),(O=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(z))&&(l=Li(O[1],void 0,t.dstPrefix),c=Li(O[2],void 0,t.srcPrefix)),n===null)throw new Error("Where is my file !!!");n.isGitDiff=!0;return}if(z.startsWith("Binary files")&&!(n!=null&&n.isGitDiff)){if(J(),(O=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(z))&&(l=Li(O[1],void 0,t.dstPrefix),c=Li(O[2],void 0,t.srcPrefix)),n===null)throw new Error("Where is my file !!!");n.isBinary=!0;return}if((!n||!n.isGitDiff&&n&&z.startsWith(u)&&Ge.startsWith(f)&>.startsWith(d))&&J(),n!=null&&n.isTooBig)return;if(n&&(typeof t.diffMaxChanges=="number"&&n.addedLines+n.deletedLines>t.diffMaxChanges||typeof t.diffMaxLineLength=="number"&&z.length>t.diffMaxLineLength)){n.isTooBig=!0,n.addedLines=0,n.deletedLines=0,n.blocks=[],i=null;let ct=typeof t.diffTooBigMessage=="function"?t.diffTooBigMessage(r.length):"Diff too big to be displayed";Q(ct);return}if(z.startsWith(u)&&Ge.startsWith(f)||z.startsWith(f)&&he.startsWith(u)){if(n&&!n.oldName&&z.startsWith("--- ")&&(O=Ej(z,t.srcPrefix))){n.oldName=O,n.language=yC(n.oldName,n.language);return}if(n&&!n.newName&&z.startsWith("+++ ")&&(O=Aj(z,t.dstPrefix))){n.newName=O,n.language=yC(n.newName,n.language);return}}if(n&&(z.startsWith(d)||n.isGitDiff&&n.oldName&&n.newName&&!i)){Q(z);return}if(i&&(z.startsWith("+")||z.startsWith("-")||z.startsWith(" "))){Pe(z);return}let Re=!ge(z,Y);if(n===null)throw new Error("Where is my file !!!");(O=h.exec(z))?n.oldMode=O[1]:(O=p.exec(z))?n.newMode=O[1]:(O=m.exec(z))?(n.deletedFileMode=O[1],n.isDeleted=!0):(O=v.exec(z))?(n.newFileMode=O[1],n.isNew=!0):(O=y.exec(z))?(Re&&(n.oldName=O[1]),n.isCopy=!0):(O=b.exec(z))?(Re&&(n.newName=O[1]),n.isCopy=!0):(O=x.exec(z))?(Re&&(n.oldName=O[1]),n.isRename=!0):(O=E.exec(z))?(Re&&(n.newName=O[1]),n.isRename=!0):(O=A.exec(z))?(n.isBinary=!0,n.oldName=Li(O[1],void 0,t.srcPrefix),n.newName=Li(O[2],void 0,t.dstPrefix),Q("Binary file")):S.test(z)?(n.isBinary=!0,Q(z)):(O=_.exec(z))?n.unchangedPercentage=parseInt(O[1],10):(O=k.exec(z))?n.changedPercentage=parseInt(O[1],10):(O=w.exec(z))?(n.checksumBefore=O[1],n.checksumAfter=O[2],O[3]&&(n.mode=O[3])):(O=T.exec(z))?(n.checksumBefore=[O[2],O[3]],n.checksumAfter=O[1]):(O=P.exec(z))?(n.oldMode=[O[2],O[3]],n.newMode=O[1]):(O=I.exec(z))?(n.newFileMode=O[1],n.isNew=!0):(O=N.exec(z))&&(n.deletedFileMode=O[1],n.isDeleted=!0)}),ee(),fe(),r}g();g();g();function Qn(){}Qn.prototype={diff:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.callback;typeof n=="function"&&(i=n,n={}),this.options=n;var a=this;function s(m){return i?(setTimeout(function(){i(void 0,m)},0),!0):m}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var o=r.length,l=t.length,c=1,u=o+l;n.maxEditLength&&(u=Math.min(u,n.maxEditLength));var f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],r,t,0);if(f[0].newPos+1>=o&&d+1>=l)return s([{value:this.join(r),count:r.length}]);function h(){for(var m=-1*c;m<=c;m+=2){var v=void 0,y=f[m-1],b=f[m+1],x=(b?b.newPos:0)-m;y&&(f[m-1]=void 0);var E=y&&y.newPos+1=o&&x+1>=l)return s(Tj(a,v.components,r,t,a.useLongestToken));f[m]=v}c++}if(i)(function m(){setTimeout(function(){if(c>u)return i();h()||m()},0)})();else for(;c<=u;){var p=h();if(p)return p}},pushComponent:function(t,r,n){var i=t[t.length-1];i&&i.added===r&&i.removed===n?t[t.length-1]={count:i.count+1,added:r,removed:n}:t.push({count:1,added:r,removed:n})},extractCommon:function(t,r,n,i){for(var a=r.length,s=n.length,o=t.newPos,l=o-i,c=0;o+1h.length?m:h}),c.value=e.join(u)}else c.value=e.join(r.slice(o,o+c.count));o+=c.count,c.added||(l+=c.count)}}var d=t[s-1];return s>1&&typeof d.value=="string"&&(d.added||d.removed)&&e.equals("",d.value)&&(t[s-2].value+=d.value,t.pop()),t}function Cj(e){return{newPos:e.newPos,components:e.components.slice(0)}}var Pj=new Qn;function EC(e,t,r){return Pj.diff(e,t,r)}var xC=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,SC=/\S/,w0=new Qn;w0.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!SC.test(e)&&!SC.test(t)};w0.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r{let n=e(t).trim(),i=e(r).trim();return Fj(n,i)/(n.length+i.length)}}function ro(e){function t(n,i,a=new Map){let s=1/0,o;for(let l=0;l0||o.indexB>0)&&(x=v.concat(x)),(n.length>d||i.length>h)&&(x=x.concat(b)),x}return r}var Tt={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},Ca={matching:pC.NONE,matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:mC.WORD,colorScheme:Ta.LIGHT},Pn="/",TC=to(e=>e.value),$j=ro(TC);function _0(e){return e.indexOf("dev/null")!==-1}function Lj(e){return e.replace(/(]*>((.|\n)*?)<\/ins>)/g,"")}function Dj(e){return e.replace(/(]*>((.|\n)*?)<\/del>)/g,"")}function no(e){switch(e){case je.CONTEXT:return Tt.CONTEXT;case je.INSERT:return Tt.INSERTS;case je.DELETE:return Tt.DELETES}}function io(e){switch(e){case Ta.DARK:return"d2h-dark-color-scheme";case Ta.AUTO:return"d2h-auto-color-scheme";case Ta.LIGHT:default:return"d2h-light-color-scheme"}}function Nj(e){return e?2:1}function Di(e){return e.slice(0).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function jr(e,t,r=!0){let n=Nj(t);return{prefix:e.substring(0,n),content:r?Di(e.substring(n)):e.substring(n)}}function Pa(e){let t=g0(e.oldName),r=g0(e.newName);if(t!==r&&!_0(t)&&!_0(r)){let n=[],i=[],a=t.split(Pn),s=r.split(Pn),o=a.length,l=s.length,c=0,u=o-1,f=l-1;for(;cc&&f>c&&a[u]===s[f];)i.unshift(s[f]),u-=1,f-=1;let d=n.join(Pn),h=i.join(Pn),p=a.slice(c,u+1).join(Pn),m=s.slice(c,f+1).join(Pn);return d.length&&h.length?d+Pn+"{"+p+" \u2192 "+m+"}"+Pn+h:d.length?d+Pn+"{"+p+" \u2192 "+m+"}":h.length?"{"+p+" \u2192 "+m+"}"+Pn+h:t+" \u2192 "+r}else return _0(r)?t:r}function ao(e){return`d2h-${vC(Pa(e)).toString().slice(-6)}`}function so(e){let t="file-changed";return e.isRename||e.isCopy?t="file-renamed":e.isNew?t="file-added":e.isDeleted?t="file-deleted":e.newName!==e.oldName&&(t="file-renamed"),t}function fd(e,t,r,n={}){let{matching:i,maxLineLengthHighlight:a,matchWordsThreshold:s,diffStyle:o}=Object.assign(Object.assign({},Ca),n),l=jr(e,r,!1),c=jr(t,r,!1);if(l.content.length>a||c.content.length>a)return{oldLine:{prefix:l.prefix,content:Di(l.content)},newLine:{prefix:c.prefix,content:Di(c.content)}};let u=o==="char"?EC(l.content,c.content):AC(l.content,c.content),f=[];if(o==="word"&&i==="words"){let h=u.filter(v=>v.removed),p=u.filter(v=>v.added);$j(p,h).forEach(v=>{v[0].length===1&&v[1].length===1&&TC(v[0][0],v[1][0]){let m=p.added?"ins":p.removed?"del":null,v=f.indexOf(p)>-1?' class="d2h-change"':"",y=Di(p.value);return m!==null?`${h}<${m}${v}>${y}`:`${h}${y}`},"");return{oldLine:{prefix:l.prefix,content:Lj(d)},newLine:{prefix:c.prefix,content:Dj(d)}}}var CC="file-summary",Bj="icon",jj={colorScheme:Ca.colorScheme},dd=class{constructor(t,r={}){this.hoganUtils=t,this.config=Object.assign(Object.assign({},jj),r)}render(t){let r=t.map(n=>this.hoganUtils.render(CC,"line",{fileHtmlId:ao(n),oldName:n.oldName,newName:n.newName,fileName:Pa(n),deletedLines:"-"+n.deletedLines,addedLines:"+"+n.addedLines},{fileIcon:this.hoganUtils.template(Bj,so(n))})).join(` +`);return this.hoganUtils.render(CC,"wrapper",{colorScheme:io(this.config.colorScheme),filesNumber:t.length,files:r})}};g();var S0=Object.assign(Object.assign({},Ca),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),rc="generic",PC="line-by-line",Hj="icon",Uj="tag",nc=class{constructor(t,r={}){this.hoganUtils=t,this.config=Object.assign(Object.assign({},S0),r)}render(t){let r=t.map(n=>{let i;return n.blocks.length?i=this.generateFileHtml(n):i=this.generateEmptyDiff(),this.makeFileDiffHtml(n,i)}).join(` +`);return this.hoganUtils.render(rc,"wrapper",{colorScheme:io(this.config.colorScheme),content:r})}makeFileDiffHtml(t,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(t.blocks)&&t.blocks.length===0)return"";let n=this.hoganUtils.template(PC,"file-diff"),i=this.hoganUtils.template(rc,"file-path"),a=this.hoganUtils.template(Hj,"file"),s=this.hoganUtils.template(Uj,so(t));return n.render({file:t,fileHtmlId:ao(t),diffs:r,filePath:i.render({fileDiffName:Pa(t)},{fileIcon:a,fileTag:s})})}generateEmptyDiff(){return this.hoganUtils.render(rc,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:Tt})}generateFileHtml(t){let r=ro(to(n=>jr(n.content,t.isCombined).content));return t.blocks.map(n=>{let i=this.hoganUtils.render(rc,"block-header",{CSSLineClass:Tt,blockHeader:t.isTooBig?n.header:Di(n.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(n).forEach(([a,s,o])=>{if(s.length&&o.length&&!a.length)this.applyRematchMatching(s,o,r).map(([l,c])=>{let{left:u,right:f}=this.processChangedLines(t,t.isCombined,l,c);i+=u,i+=f});else if(a.length)a.forEach(l=>{let{prefix:c,content:u}=jr(l.content,t.isCombined);i+=this.generateSingleLineHtml(t,{type:Tt.CONTEXT,prefix:c,content:u,oldNumber:l.oldNumber,newNumber:l.newNumber})});else if(s.length||o.length){let{left:l,right:c}=this.processChangedLines(t,t.isCombined,s,o);i+=l,i+=c}else console.error("Unknown state reached while processing groups of lines",a,s,o)}),i}).join(` +`)}applyLineGroupping(t){let r=[],n=[],i=[];for(let a=0;a0)&&(r.push([[],n,i]),n=[],i=[]),s.type===je.CONTEXT?r.push([[s],[],[]]):s.type===je.INSERT&&n.length===0?r.push([[],[],[s]]):s.type===je.INSERT&&n.length>0?i.push(s):s.type===je.DELETE&&n.push(s)}return(n.length||i.length)&&(r.push([[],n,i]),n=[],i=[]),r}applyRematchMatching(t,r,n){let i=t.length*r.length,a=Math.max.apply(null,[0].concat(t.concat(r).map(o=>o.content.length)));return i{let i;return n.blocks.length?i=this.generateFileHtml(n):i=this.generateEmptyDiff(),this.makeFileDiffHtml(n,i)}).join(` +`);return this.hoganUtils.render(ic,"wrapper",{colorScheme:io(this.config.colorScheme),content:r})}makeFileDiffHtml(t,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(t.blocks)&&t.blocks.length===0)return"";let n=this.hoganUtils.template(Gj,"file-diff"),i=this.hoganUtils.template(ic,"file-path"),a=this.hoganUtils.template(zj,"file"),s=this.hoganUtils.template(Vj,so(t));return n.render({file:t,fileHtmlId:ao(t),diffs:r,filePath:i.render({fileDiffName:Pa(t)},{fileIcon:a,fileTag:s})})}generateEmptyDiff(){return{right:"",left:this.hoganUtils.render(ic,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:Tt})}}generateFileHtml(t){let r=ro(to(n=>jr(n.content,t.isCombined).content));return t.blocks.map(n=>{let i={left:this.makeHeaderHtml(n.header,t),right:this.makeHeaderHtml("")};return this.applyLineGroupping(n).forEach(([a,s,o])=>{if(s.length&&o.length&&!a.length)this.applyRematchMatching(s,o,r).map(([l,c])=>{let{left:u,right:f}=this.processChangedLines(t.isCombined,l,c);i.left+=u,i.right+=f});else if(a.length)a.forEach(l=>{let{prefix:c,content:u}=jr(l.content,t.isCombined),{left:f,right:d}=this.generateLineHtml({type:Tt.CONTEXT,prefix:c,content:u,number:l.oldNumber},{type:Tt.CONTEXT,prefix:c,content:u,number:l.newNumber});i.left+=f,i.right+=d});else if(s.length||o.length){let{left:l,right:c}=this.processChangedLines(t.isCombined,s,o);i.left+=l,i.right+=c}else console.error("Unknown state reached while processing groups of lines",a,s,o)}),i}).reduce((n,i)=>({left:n.left+i.left,right:n.right+i.right}),{left:"",right:""})}applyLineGroupping(t){let r=[],n=[],i=[];for(let a=0;a0)&&(r.push([[],n,i]),n=[],i=[]),s.type===je.CONTEXT?r.push([[s],[],[]]):s.type===je.INSERT&&n.length===0?r.push([[],[],[s]]):s.type===je.INSERT&&n.length>0?i.push(s):s.type===je.DELETE&&n.push(s)}return(n.length||i.length)&&(r.push([[],n,i]),n=[],i=[]),r}applyRematchMatching(t,r,n){let i=t.length*r.length,a=Math.max.apply(null,[0].concat(t.concat(r).map(o=>o.content.length)));return i'),n.b(` `+r),n.b(' '),n.b(` `+r),n.b(n.rp("'),n.b(n.v(n.f("fileName",e,t,0))),n.b(""),n.b(` `+r),n.b(' '),n.b(` @@ -221,7 +226,7 @@ You can always see the logs of this and every other plugin by opening the consol `+r),n.b(' '),n.b(n.v(n.f("deletedLines",e,t,0))),n.b(""),n.b(` `+r),n.b(" "),n.b(` `+r),n.b(" "),n.b(` -`+r),n.b(""),n.fl()},partials:{"'),n.b(` +`+r),n.b(""),n.fl()},partials:{"'),n.b(` `+r),n.b('
'),n.b(` `+r),n.b(' Files changed ('),n.b(n.v(n.f("filesNumber",e,t,0))),n.b(")"),n.b(` `+r),n.b(' hide'),n.b(` @@ -230,24 +235,24 @@ You can always see the logs of this and every other plugin by opening the consol `+r),n.b('
    '),n.b(` `+r),n.b(" "),n.b(n.t(n.f("files",e,t,0))),n.b(` `+r),n.b("
"),n.b(` -`+r),n.b("
"),n.fl()},partials:{},subs:{}});nt["generic-block-header"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b(""),n.b(` +`+r),n.b(""),n.fl()},partials:{},subs:{}});st["generic-block-header"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b(""),n.b(` `+r),n.b(' '),n.b(` `+r),n.b(' '),n.b(` `+r),n.b('
'),n.s(n.f("blockHeader",e,t,1),e,t,0,156,173,"{{ }}")&&(n.rs(e,t,function(i,a,s){s.b(s.t(s.f("blockHeader",i,a,0)))}),e.pop()),n.s(n.f("blockHeader",e,t,1),e,t,1,0,0,"")||n.b(" "),n.b("
"),n.b(` `+r),n.b(" "),n.b(` -`+r),n.b(""),n.fl()},partials:{},subs:{}});nt["generic-empty-diff"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b(""),n.b(` +`+r),n.b(""),n.fl()},partials:{},subs:{}});st["generic-empty-diff"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b(""),n.b(` `+r),n.b(' '),n.b(` `+r),n.b('
'),n.b(` `+r),n.b(" File without changes"),n.b(` `+r),n.b("
"),n.b(` `+r),n.b(" "),n.b(` -`+r),n.b(""),n.fl()},partials:{},subs:{}});nt["generic-file-path"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b(''),n.b(` +`+r),n.b(""),n.fl()},partials:{},subs:{}});st["generic-file-path"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b(''),n.b(` `+r),n.b(n.rp("'),n.b(n.v(n.f("fileDiffName",e,t,0))),n.b(""),n.b(` `+r),n.b(n.rp(""),n.b(` `+r),n.b('"),n.fl()},partials:{""),n.b(` +`+r),n.b(""),n.fl()},partials:{""),n.b(` `+r),n.b(' '),n.b(` `+r),n.b(" "),n.b(n.t(n.f("lineNumber",e,t,0))),n.b(` `+r),n.b(" "),n.b(` @@ -259,23 +264,23 @@ You can always see the logs of this and every other plugin by opening the consol `+r)}),e.pop()),n.s(n.f("content",e,t,1),e,t,1,0,0,"")||(n.b('
'),n.b(` `+r)),n.b(" "),n.b(` `+r),n.b(" "),n.b(` -`+r),n.b(""),n.fl()},partials:{},subs:{}});nt["generic-wrapper"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(` +`+r),n.b(""),n.fl()},partials:{},subs:{}});st["generic-wrapper"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(` `+r),n.b(" "),n.b(n.t(n.f("content",e,t,0))),n.b(` -`+r),n.b("
"),n.fl()},partials:{},subs:{}});nt["icon-file-added"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(` +`+r),n.b(""),n.fl()},partials:{},subs:{}});st["line-by-line-file-diff"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(` `+r),n.b('
'),n.b(` `+r),n.b(" "),n.b(n.t(n.f("filePath",e,t,0))),n.b(` `+r),n.b("
"),n.b(` @@ -288,8 +293,8 @@ You can always see the logs of this and every other plugin by opening the consol `+r),n.b(" "),n.b(` `+r),n.b("
"),n.b(` `+r),n.b("
"),n.b(` -`+r),n.b("
"),n.fl()},partials:{},subs:{}});nt["line-by-line-numbers"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(n.v(n.f("oldNumber",e,t,0))),n.b("
"),n.b(` -`+r),n.b('
'),n.b(n.v(n.f("newNumber",e,t,0))),n.b("
"),n.fl()},partials:{},subs:{}});nt["side-by-side-file-diff"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(` +`+r),n.b("
"),n.fl()},partials:{},subs:{}});st["line-by-line-numbers"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(n.v(n.f("oldNumber",e,t,0))),n.b("
"),n.b(` +`+r),n.b('
'),n.b(n.v(n.f("newNumber",e,t,0))),n.b("
"),n.fl()},partials:{},subs:{}});st["side-by-side-file-diff"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('
'),n.b(` `+r),n.b('
'),n.b(` `+r),n.b(" "),n.b(n.t(n.f("filePath",e,t,0))),n.b(` `+r),n.b("
"),n.b(` @@ -313,58 +318,55 @@ You can always see the logs of this and every other plugin by opening the consol `+r),n.b("
"),n.b(` `+r),n.b(" "),n.b(` `+r),n.b(" "),n.b(` -`+r),n.b(""),n.fl()},partials:{},subs:{}});nt["tag-file-added"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('ADDED'),n.fl()},partials:{},subs:{}});nt["tag-file-changed"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('CHANGED'),n.fl()},partials:{},subs:{}});nt["tag-file-deleted"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('DELETED'),n.fl()},partials:{},subs:{}});nt["tag-file-renamed"]=new lt.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('RENAMED'),n.fl()},partials:{},subs:{}});var nc=class{constructor({compiledTemplates:t={},rawTemplates:r={}}){let n=Object.entries(r).reduce((i,[a,s])=>{let o=T0.compile(s,{asString:!1});return Object.assign(Object.assign({},i),{[a]:o})},{});this.preCompiledTemplates=Object.assign(Object.assign(Object.assign({},nt),t),n)}static compile(t){return T0.compile(t,{asString:!1})}render(t,r,n,i,a){let s=this.templateKey(t,r);try{return this.preCompiledTemplates[s].render(n,i,a)}catch(o){throw new Error(`Could not find template to render '${s}'`)}}template(t,r){return this.preCompiledTemplates[this.templateKey(t,r)]}templateKey(t,r){return`${t}-${r}`}};var GB=Object.assign(Object.assign(Object.assign({},x0),S0),{outputFormat:cC.LINE_BY_LINE,drawFileList:!0});function PC(e,t={}){let r=Object.assign(Object.assign({},GB),t),n=typeof e=="string"?vC(e,r):e,i=new nc(r),{colorScheme:a}=r,s={colorScheme:a},o=r.drawFileList?new pd(i,s).render(n):"",c=r.outputFormat==="side-by-side"?new rc(i,r).render(n):new ec(i,r).render(n);return o+c}var gd=require("obsidian");var Ta=class extends gd.ItemView{constructor(r,n){super(r);this.plugin=n;this.gettingDiff=!1;this.parser=new DOMParser,this.navigation=!0,this.gitRefreshRef=this.app.workspace.on("obsidian-git:status-changed",()=>{this.refresh().catch(console.error)})}getViewType(){return ki.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let n=this.state.bFile.split("/").last();return n!=null&&n.endsWith(".md")&&(n=n.slice(0,-3)),`Diff: ${n}`}return ki.name}getIcon(){return ki.icon}async setState(r,n){this.state=r,gd.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await this.refresh()}getState(){return this.state}onClose(){return this.app.workspace.offref(this.gitRefreshRef),this.app.workspace.offref(this.gitViewRefreshRef),super.onClose()}async onOpen(){return await this.refresh(),super.onOpen()}async refresh(){var r;if((r=this.state)!=null&&r.bFile&&!this.gettingDiff&&this.plugin.gitManager){this.gettingDiff=!0;try{let n=await this.plugin.gitManager.getDiffString(this.state.bFile,this.state.aRef=="HEAD",this.state.bRef);this.contentEl.empty();let i=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);if(!n){if(this.plugin.gitManager instanceof Te&&await this.plugin.gitManager.isTracked(this.state.bFile))n=[`--- ${this.state.aFile}`,`+++ ${this.state.bFile}`,""].join(` +`+r),n.b(""),n.fl()},partials:{},subs:{}});st["tag-file-added"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('ADDED'),n.fl()},partials:{},subs:{}});st["tag-file-changed"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('CHANGED'),n.fl()},partials:{},subs:{}});st["tag-file-deleted"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('DELETED'),n.fl()},partials:{},subs:{}});st["tag-file-renamed"]=new ut.Template({code:function(e,t,r){var n=this;return n.b(r=r||""),n.b('RENAMED'),n.fl()},partials:{},subs:{}});var sc=class{constructor({compiledTemplates:t={},rawTemplates:r={}}){let n=Object.entries(r).reduce((i,[a,s])=>{let o=C0.compile(s,{asString:!1});return Object.assign(Object.assign({},i),{[a]:o})},{});this.preCompiledTemplates=Object.assign(Object.assign(Object.assign({},st),t),n)}static compile(t){return C0.compile(t,{asString:!1})}render(t,r,n,i,a){let s=this.templateKey(t,r);try{return this.preCompiledTemplates[s].render(n,i,a)}catch(o){throw new Error(`Could not find template to render '${s}'`)}}template(t,r){return this.preCompiledTemplates[this.templateKey(t,r)]}templateKey(t,r){return`${t}-${r}`}};var qj=Object.assign(Object.assign(Object.assign({},S0),E0),{outputFormat:hC.LINE_BY_LINE,drawFileList:!0});function IC(e,t={}){let r=Object.assign(Object.assign({},qj),t),n=typeof e=="string"?_C(e,r):e,i=new sc(r),{colorScheme:a}=r,s={colorScheme:a},o=r.drawFileList?new dd(i,s).render(n):"",l=r.outputFormat==="side-by-side"?new ac(i,r).render(n):new nc(i,r).render(n);return o+l}var pd=require("obsidian");var Ra=class extends pd.ItemView{constructor(r,n){super(r);this.plugin=n;this.gettingDiff=!1;this.parser=new DOMParser,this.navigation=!0,this.gitRefreshRef=this.app.workspace.on("obsidian-git:status-changed",()=>{this.refresh().catch(console.error)})}getViewType(){return Ti.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let n=this.state.bFile.split("/").last();return n!=null&&n.endsWith(".md")&&(n=n.slice(0,-3)),`Diff: ${n}`}return Ti.name}getIcon(){return Ti.icon}async setState(r,n){this.state=r,pd.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await this.refresh()}getState(){return this.state}onClose(){return this.app.workspace.offref(this.gitRefreshRef),this.app.workspace.offref(this.gitViewRefreshRef),super.onClose()}async onOpen(){return await this.refresh(),super.onOpen()}async refresh(){var r;if((r=this.state)!=null&&r.bFile&&!this.gettingDiff&&this.plugin.gitManager){this.gettingDiff=!0;try{let n=await this.plugin.gitManager.getDiffString(this.state.bFile,this.state.aRef=="HEAD",this.state.bRef);this.contentEl.empty();let i=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);if(!n){if(this.plugin.gitManager instanceof Ce&&await this.plugin.gitManager.isTracked(this.state.bFile))n=[`--- ${this.state.aFile}`,`+++ ${this.state.bFile}`,""].join(` `);else if(await this.app.vault.adapter.exists(i)){let a=await this.app.vault.adapter.read(i);n=[...`--- /dev/null +++ ${this.state.bFile} @@ -0,0 +1,${a.split(` `).length} @@`.split(` `),...a.split(` `).map(o=>`+${o}`)].join(` -`)}}if(n){let a=this.parser.parseFromString(PC(n),"text/html").querySelector(".d2h-file-diff");this.contentEl.append(a)}else{let a=this.contentEl.createDiv({cls:"obsidian-git-center"});a.createSpan({text:"\u26A0\uFE0F",attr:{style:"font-size: 2em"}}),a.createEl("br"),a.createSpan({text:"File not found: "+this.state.bFile})}}finally{this.gettingDiff=!1}}}};g();var W3=require("obsidian");g();g();g();var RC="5";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(RC);g();g();var no="[",Ca="[!",Pa="]",Di={};var ct=Symbol(),qt=Symbol("filename"),MC=Symbol("hmr");g();g();var zB=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory"];var oZ=[...zB,"formNoValidate","isMap","noModule","playsInline","readOnly","value","inert","volume","defaultValue","defaultChecked","srcObject"];var VB=["touchstart","touchmove"];function OC(e){return VB.includes(e)}g();g();g();var vd=!0;g();var z=!1;g();var sn=Array.isArray,ic=Array.from,C0=Object.keys,Mt=Object.defineProperty,Br=Object.getOwnPropertyDescriptor,P0=Object.getOwnPropertyDescriptors,R0=Object.prototype,IC=Array.prototype,Ra=Object.getPrototypeOf;function M0(e){return typeof e=="function"}var _r=()=>{};function yd(e){for(var t=0;ts.map(v=>m.replace(/&/,v))).reduce((m,v)=>m.concat(v)),p,l);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");a(i(h),p,u,d)}else p!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+p+";")}(u.length||d)&&l.push((n&&!f&&!c?s.map(n):s).join(", ")+" {"+u.join(" ")+"}")}for(let s in t)a(i(s),t[s],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let t=$C[FC]||1;return $C[FC]=t+1,P0+t.toString(36)}static mount(t,r,n){let i=t[R0],a=n&&n.nonce;i?a&&i.setNonce(a):i=new M0(t,a),i.mount(Array.isArray(r)?r:[r],t)}},LC=new Map,M0=class{constructor(t,r){let n=t.ownerDocument||t,i=n.defaultView;if(!t.head&&t.adoptedStyleSheets&&i.CSSStyleSheet){let a=LC.get(n);if(a)return t[R0]=a;this.sheet=new i.CSSStyleSheet,LC.set(n,this)}else this.styleTag=n.createElement("style"),r&&this.styleTag.setAttribute("nonce",r);this.modules=[],t[R0]=this}mount(t,r){let n=this.sheet,i=0,a=0;for(let s=0;s-1&&(this.modules.splice(l,1),a--,l=-1),l==-1){if(this.modules.splice(a++,0,o),n)for(let c=0;cc){let f=e.slice(t,r).indexOf(n.slice(i,a));if(f>-1)return[new ft(t,t+f,i,i),new ft(t+f+c,r,a,a)]}else if(c>l){let f=n.slice(i,a).indexOf(e.slice(t,r));if(f>-1)return[new ft(t,t,i,i+f),new ft(r,r,i+f+l,a)]}if(l==1||c==1)return[new ft(t,r,i,a)];let u=r3(e,t,r,n,i,a);if(u){let[f,d,h]=u;return Oa(e,t,f,n,i,d).concat(Oa(e,f+h,r,n,d+h,a))}return Xj(e,t,r,n,i,a)}var oc=1e9;function Xj(e,t,r,n,i,a){let s=r-t,o=a-i;if(oc<1e9&&Math.min(s,o)>oc*16)return Math.min(s,o)>oc*64?[new ft(t,r,i,a)]:DC(e,t,r,n,i,a);let l=Math.ceil((s+o)/2);O0.reset(l),I0.reset(l);let c=(h,p)=>e.charCodeAt(t+h)==n.charCodeAt(i+p),u=(h,p)=>e.charCodeAt(r-h-1)==n.charCodeAt(a-p-1),f=(s-o)%2!=0?I0:null,d=f?null:O0;for(let h=0;hoc)return DC(e,t,r,n,i,a);let p=O0.advance(h,s,o,l,f,!1,c)||I0.advance(h,s,o,l,d,!0,u);if(p)return Zj(e,t,r,t+p[0],n,i,a,i+p[1])}return[new ft(t,r,i,a)]}var bd=class{constructor(){this.vec=[]}reset(t){this.len=t<<1;for(let r=0;rr)this.end+=2;else if(f>n)this.start+=2;else if(a){let d=i+(r-n)-l;if(d>=0&&d=r-u)return[h,i+h-d]}else{let h=r-a.vec[d];if(u>=h)return[u,f]}}}return null}},O0=new bd,I0=new bd;function Zj(e,t,r,n,i,a,s,o){let l=!1;return!co(e,n)&&++n==r&&(l=!0),!co(i,o)&&++o==s&&(l=!0),l?[new ft(t,r,a,s)]:Oa(e,t,n,i,a,o).concat(Oa(e,n,r,i,o,s))}function t3(e,t){let r=1,n=Math.min(e,t);for(;rr||u>a||e.slice(o,c)!=n.slice(l,u)){if(s==1)return o-t-(co(e,o)?0:1);s=s>>1}else{if(c==r||u==a)return c-t;o=c,l=u}}}function B0(e,t,r,n,i,a){if(t==r||i==a||e.charCodeAt(r-1)!=n.charCodeAt(a-1))return 0;let s=t3(r-t,a-i);for(let o=r,l=a;;){let c=o-s,u=l-s;if(c>1}else{if(c==t||u==i)return r-c;o=c,l=u}}}function F0(e,t,r,n,i,a,s,o){let l=n.slice(i,a),c=null;for(;;){if(c||s=r)break;let d=e.slice(u,f),h=-1;for(;(h=l.indexOf(d,h+1))!=-1;){let p=N0(e,f,r,n,i+h+d.length,a),m=B0(e,t,u,n,i,i+h),v=d.length+p+m;(!c||c[2]>1}}function r3(e,t,r,n,i,a){let s=r-t,o=a-i;if(si.fromA-t&&n.toB>i.fromB-t&&(e[r-1]=new ft(n.fromA,i.toA,n.fromB,i.toB),e.splice(r--,1))}}function Kj(e,t,r){for(;;){n3(r,1);let n=!1;for(let i=0;i3||o>3){let l=i==e.length-1?t.length:e[i+1].fromA,c=a.fromA-n,u=l-a.toA,f=BC(t,a.fromA,Math.min(c,5)),d=NC(t,a.toA,Math.min(u,5)),h=a.fromA-f,p=d-a.toA;if(!s||!o){let m=Math.max(s,o),[v,y,b]=s?[t,a.fromA,a.toA]:[r,a.fromB,a.toB];h&&p&&(m>h&&t.slice(f,a.fromA)==v.slice(b-h,b)?(a=e[i]=new ft(f,f+s,a.fromB-h,a.toB-h),f=a.fromA,d=NC(t,a.toA,Math.min(l-a.toA,5))):m>p&&t.slice(a.toA,d)==v.slice(y,y+p)&&(a=e[i]=new ft(d-s,d,a.fromB+p,a.toB+p),d=a.toA,f=BC(t,a.fromA,Math.min(a.fromA-n,5))),h=a.fromA-f,p=d-a.toA)}if(h||p)a=e[i]=new ft(a.fromA-h,a.toA+p,a.fromB-h,a.toB+p);else if(s){if(!o){let m=HC(t,a.fromA,a.toA),v,y=m<0?-1:jC(t,a.toA,a.fromA);m>-1&&(v=m-a.fromA)<=u&&t.slice(a.fromA,m)==t.slice(a.toA,a.toA+v)?a=e[i]=a.offset(v):y>-1&&(v=a.toA-y)<=c&&t.slice(a.fromA-v,a.fromA)==t.slice(y,a.toA)&&(a=e[i]=a.offset(-v))}}else{let m=HC(r,a.fromB,a.toB),v,y=m<0?-1:jC(r,a.toB,a.fromB);m>-1&&(v=m-a.fromB)<=u&&r.slice(a.fromB,m)==r.slice(a.toB,a.toB+v)?a=e[i]=a.offset(v):y>-1&&(v=a.toB-y)<=c&&r.slice(a.fromB-v,a.fromB)==r.slice(y,a.toB)&&(a=e[i]=a.offset(-v))}n=a.toA}}return n3(e,3),e}var Ma;try{Ma=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch(e){}function i3(e){return e>48&&e<58||e>64&&e<91||e>96&&e<123}function a3(e,t){if(t==e.length)return 0;let r=e.charCodeAt(t);return r<192?i3(r)?1:0:Ma?!o3(r)||t==e.length-1?Ma.test(String.fromCharCode(r))?1:0:Ma.test(e.slice(t,t+2))?2:0:0}function s3(e,t){if(!t)return 0;let r=e.charCodeAt(t-1);return r<192?i3(r)?1:0:Ma?!l3(r)||t==1?Ma.test(String.fromCharCode(r))?1:0:Ma.test(e.slice(t-2,t))?2:0:0}function NC(e,t,r){if(t==e.length||!s3(e,t))return t;for(let n=t,i=t+r;;){let a=a3(e,n);if(!a)return n;if(n+=a,n>i)return t}}function BC(e,t,r){if(!t||!a3(e,t))return t;for(let n=t,i=t-r;;){let a=s3(e,n);if(!a)return n;if(n-=a,ne>=55296&&e<=56319,l3=e=>e>=56320&&e<=57343;function co(e,t){return!t||t==e.length||!o3(e.charCodeAt(t-1))||!l3(e.charCodeAt(t))}function Qj(e,t,r){var n;return oc=((n=r==null?void 0:r.scanLimit)!==null&&n!==void 0?n:1e9)>>1,Kj(e,t,Oa(e,0,e.length,t,0,t.length))}function c3(e,t,r){return Jj(Qj(e,t,r),e,t)}var Rn=Ee.Facet.define({combine:e=>e[0]}),$0=Ee.StateEffect.define(),uo=Ee.StateField.define({create(e){return null},update(e,t){for(let r of t.effects)r.is($0)&&(e=r.value);return e}});var lo=class e{constructor(t,r,n,i,a){this.changes=t,this.fromA=r,this.toA=n,this.fromB=i,this.toB=a}offset(t,r){return t||r?new e(this.changes,this.fromA+t,this.toA+t,this.fromB+r,this.toB+r):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(t,r,n){return u3(c3(t.toString(),r.toString(),n),t,r,0,0)}static updateA(t,r,n,i,a){return WC(VC(t,i,!0,n.length),t,r,n,a)}static updateB(t,r,n,i,a){return WC(VC(t,i,!1,r.length),t,r,n,a)}};function UC(e,t,r,n){let i=r.lineAt(e),a=n.lineAt(t);return i.to==e&&a.to==t&&eu+1&&m>f+1)break;d.push(h.offset(-l+n,-c+i)),[u,f]=GC(h.toA+n,h.toB+i,t,r),s++}a.push(new lo(d,l,Math.max(l,u),c,Math.max(c,f)))}return a}var gd=1e3;function zC(e,t,r,n){let i=0,a=e.length;for(;;){if(i==a){let u=0,f=0;i&&({toA:u,toB:f}=e[i-1]);let d=t-(r?u:f);return[u+d,f+d]}let s=i+a>>1,o=e[s],[l,c]=r?[o.fromA,o.toA]:[o.fromB,o.toB];if(l>t)a=s;else if(c<=t)i=s+1;else return n?[o.fromA,o.fromB]:[o.toA,o.toB]}}function VC(e,t,r,n){let i=[];return t.iterChangedRanges((a,s,o,l)=>{let c=0,u=r?t.length:n,f=0,d=r?n:t.length;a>gd&&([c,f]=zC(e,a-gd,r,!0)),s=c?i[i.length-1]={fromA:p.fromA,fromB:p.fromB,toA:u,toB:d,diffA:p.diffA+m,diffB:p.diffB+v}:i.push({fromA:c,toA:u,fromB:f,toB:d,diffA:m,diffB:v})}),i}function WC(e,t,r,n,i){if(!e.length)return t;let a=[];for(let s=0,o=0,l=0,c=0;;s++){let u=s==e.length?null:e[s],f=u?u.fromA+o:r.length,d=u?u.fromB+l:n.length;for(;cf||v.toB+l>d)break;a.push(v.offset(o,l)),c++}if(!u)break;let h=u.toA+o+u.diffA,p=u.toB+l+u.diffB,m=c3(r.sliceString(f,h),n.sliceString(d,p),i);for(let v of u3(m,r,n,f,d))a.push(v);for(o+=u.diffA,l+=u.diffB;ch&&v.fromB+l>p)break;c++}}return a}var e7={scanLimit:500},f3=Me.ViewPlugin.fromClass(class{constructor(e){({deco:this.deco,gutter:this.gutter}=XC(e))}update(e){(e.docChanged||e.viewportChanged||t7(e.startState,e.state)||r7(e.startState,e.state))&&({deco:this.deco,gutter:this.gutter}=XC(e.view))}},{decorations:e=>e.deco}),vd=Ee.Prec.low((0,Me.gutter)({class:"cm-changeGutter",markers:e=>{var t;return((t=e.plugin(f3))===null||t===void 0?void 0:t.gutter)||Ee.RangeSet.empty}}));function t7(e,t){return e.field(uo,!1)!=t.field(uo,!1)}function r7(e,t){return e.facet(Rn)!=t.facet(Rn)}var qC=Me.Decoration.line({class:"cm-changedLine"}),n7=Me.Decoration.mark({class:"cm-changedText"}),i7=Me.Decoration.mark({tagName:"ins",class:"cm-insertedLine"}),a7=Me.Decoration.mark({tagName:"del",class:"cm-deletedLine"}),YC=new class extends Me.GutterMarker{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function s7(e,t,r,n,i,a){let s=r?e.fromA:e.fromB,o=r?e.toA:e.toB,l=0;if(s!=o){i.add(s,s,qC),i.add(s,o,r?a7:i7),a&&a.add(s,s,YC);for(let c=t.iterRange(s,o-1),u=s;!c.next().done;){if(c.lineBreak){u++,i.add(u,u,qC),a&&a.add(u,u,YC);continue}let f=u+c.value.length;if(n)for(;l=c)break;(a?u.toA:u.toB)>l&&s7(u,e.state.doc,a,n,s,o)}return{deco:s.finish(),gutter:o&&o.finish()}}var oo=class extends Me.WidgetType{constructor(t){super(),this.height=t}eq(t){return this.height==t.height}toDOM(){let t=document.createElement("div");return t.className="cm-mergeSpacer",t.style.height=this.height+"px",t}updateDOM(t){return t.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},_d=Ee.StateEffect.define({map:(e,t)=>e.map(t)}),lc=Ee.StateField.define({create:()=>Me.Decoration.none,update:(e,t)=>{for(let r of t.effects)if(r.is(_d))return r.value;return e.map(t.changes)},provide:e=>Me.EditorView.decorations.from(e)}),yd=.01;function ZC(e,t){if(e.size!=t.size)return!1;let r=e.iter(),n=t.iter();for(;r.value;){if(r.from!=n.from||Math.abs(r.value.spec.widget.height-n.value.spec.widget.height)>1)return!1;r.next(),n.next()}return!0}function o7(e,t,r){let n=new Ee.RangeSetBuilder,i=new Ee.RangeSetBuilder,a=e.state.field(lc).iter(),s=t.state.field(lc).iter(),o=0,l=0,c=0,u=0,f=e.viewport,d=t.viewport;for(let v=0;;v++){let y=vyd&&(u+=k,i.add(l,l,Me.Decoration.widget({widget:new oo(k),block:!0,side:-1})))}if(b>o+1e3&&of.from&&ld.from){let E=Math.min(f.from-o,d.from-l);o+=E,l+=E,v--}else if(y)o=y.toA,l=y.toB;else break;for(;a.value&&a.fromyd&&i.add(t.state.doc.length,t.state.doc.length,Me.Decoration.widget({widget:new oo(h),block:!0,side:1}));let p=n.finish(),m=i.finish();ZC(p,e.state.field(lc))||e.dispatch({effects:_d.of(p)}),ZC(m,t.state.field(lc))||t.dispatch({effects:_d.of(m)})}var L0=Ee.StateEffect.define({map:(e,t)=>t.mapPos(e)}),D0=class extends Me.WidgetType{constructor(t){super(),this.lines=t}eq(t){return this.lines==t.lines}toDOM(t){let r=document.createElement("div");return r.className="cm-collapsedLines",r.textContent=t.state.phrase("$ unchanged lines",this.lines),r.addEventListener("click",n=>{let i=t.posAtDOM(n.target);t.dispatch({effects:L0.of(i)});let{side:a,sibling:s}=t.state.facet(Rn);s&&s().dispatch({effects:L0.of(l7(i,t.state.field(uo),a=="a"))})}),r}ignoreEvent(t){return t instanceof MouseEvent}get estimatedHeight(){return 27}};function l7(e,t,r){let n=0,i=0;for(let a=0;;a++){let s=a=e)return i+(e-n);[n,i]=r?[s.toA,s.toB]:[s.toB,s.toA]}}var c7=Ee.StateField.define({create(e){return Me.Decoration.none},update(e,t){e=e.map(t.changes);for(let r of t.effects)r.is(L0)&&(e=e.update({filter:n=>n!=r.value}));return e},provide:e=>Me.EditorView.decorations.from(e)});function KC({margin:e=3,minSize:t=4}){return c7.init(r=>u7(r,e,t))}function u7(e,t,r){let n=new Ee.RangeSetBuilder,i=e.facet(Rn).side=="a",a=e.field(uo),s=1;for(let o=0;;o++){let l=o=r&&n.add(e.doc.line(c).from,e.doc.line(u).to,Me.Decoration.replace({widget:new D0(f),block:!0})),!l)break;s=e.doc.lineAt(Math.min(e.doc.length,i?l.toA:l.toB)).number}return n.finish()}var f7=Me.EditorView.styleModule.of(new md({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),d7=Me.EditorView.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb2266, #22bb2266) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff8866, #88ff8866) bottom/100% 2px no-repeat"},".cm-insertedLine, .cm-deletedLine":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"\u299A"',marginInlineEnd:"7px"},"&:after":{content:'"\u299A"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"}}),JC=new Ee.Compartment,wd=new Ee.Compartment,xd=class{constructor(t){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=t.diffConfig||e7;let r=[Ee.Prec.low(f3),d7,f7,lc,Me.EditorView.updateListener.of(f=>{this.measuring<0&&(f.heightChanged||f.viewportChanged)&&!f.transactions.some(d=>d.effects.some(h=>h.is(_d)))&&this.measure()})],n=[Rn.of({side:"a",sibling:()=>this.b,highlightChanges:t.highlightChanges!==!1,markGutter:t.gutter!==!1})];t.gutter!==!1&&n.push(vd);let i=Ee.EditorState.create({doc:t.a.doc,selection:t.a.selection,extensions:[t.a.extensions||[],Me.EditorView.editorAttributes.of({class:"cm-merge-a"}),wd.of(n),r]}),a=[Rn.of({side:"b",sibling:()=>this.a,highlightChanges:t.highlightChanges!==!1,markGutter:t.gutter!==!1})];t.gutter!==!1&&a.push(vd);let s=Ee.EditorState.create({doc:t.b.doc,selection:t.b.selection,extensions:[t.b.extensions||[],Me.EditorView.editorAttributes.of({class:"cm-merge-b"}),wd.of(a),r]});this.chunks=lo.build(i.doc,s.doc,this.diffConf);let o=[uo.init(()=>this.chunks),JC.of(t.collapseUnchanged?KC(t.collapseUnchanged):[])];i=i.update({effects:Ee.StateEffect.appendConfig.of(o)}).state,s=s.update({effects:Ee.StateEffect.appendConfig.of(o)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let l=t.orientation||"a-b",c=document.createElement("div");c.className="cm-mergeViewEditor";let u=document.createElement("div");u.className="cm-mergeViewEditor",this.editorDOM.appendChild(l=="a-b"?c:u),this.editorDOM.appendChild(l=="a-b"?u:c),this.a=new Me.EditorView({state:i,parent:c,root:t.root,dispatchTransactions:f=>this.dispatch(f,this.a)}),this.b=new Me.EditorView({state:s,parent:u,root:t.root,dispatchTransactions:f=>this.dispatch(f,this.b)}),this.setupRevertControls(!!t.revertControls,t.revertControls=="b-to-a",t.renderRevertControl),t.parent&&t.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(t,r){if(t.some(n=>n.docChanged)){let n=t[t.length-1],i=t.reduce((s,o)=>s.compose(o.changes),Ee.ChangeSet.empty(t[0].startState.doc.length));this.chunks=r==this.a?lo.updateA(this.chunks,n.newDoc,this.b.state.doc,i,this.diffConf):lo.updateB(this.chunks,this.a.state.doc,n.newDoc,i,this.diffConf),r.update([...t,n.state.update({effects:$0.of(this.chunks)})]);let a=r==this.a?this.b:this.a;a.update([a.state.update({effects:$0.of(this.chunks)})]),this.scheduleMeasure()}else r.update(t)}reconfigure(t){if("diffConfig"in t&&(this.diffConf=t.diffConfig),"orientation"in t){let a=t.orientation!="b-a";if(a!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let s=this.a.dom.parentNode,o=this.b.dom.parentNode;s.remove(),o.remove(),this.editorDOM.insertBefore(a?s:o,this.editorDOM.firstChild),this.editorDOM.appendChild(a?o:s),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in t||"renderRevertControl"in t){let a=!!this.revertDOM,s=this.revertToA,o=this.renderRevert;"revertControls"in t&&(a=!!t.revertControls,s=t.revertControls=="b-to-a"),"renderRevertControl"in t&&(o=t.renderRevertControl),this.setupRevertControls(a,s,o)}let r="highlightChanges"in t,n="gutter"in t,i="collapseUnchanged"in t;if(r||n||i){let a=[],s=[];if(r||n){let o=this.a.state.facet(Rn),l=n?t.gutter!==!1:o.markGutter,c=r?t.highlightChanges!==!1:o.highlightChanges;a.push(wd.reconfigure([Rn.of({side:"a",sibling:()=>this.b,highlightChanges:c,markGutter:l}),l?vd:[]])),s.push(wd.reconfigure([Rn.of({side:"b",sibling:()=>this.a,highlightChanges:c,markGutter:l}),l?vd:[]]))}if(i){let o=JC.reconfigure(t.collapseUnchanged?KC(t.collapseUnchanged):[]);a.push(o),s.push(o)}this.a.dispatch({effects:a}),this.b.dispatch({effects:s})}this.scheduleMeasure()}setupRevertControls(t,r,n){this.revertToA=r,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=n,!t&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):t&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",i=>this.revertClicked(i)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let t=this.dom.ownerDocument.defaultView||window;this.measuring=t.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){o7(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let t=this.revertDOM,r=t.firstChild,n=this.a.viewport,i=this.b.viewport;for(let a=0;an.to||s.fromB>i.to)break;if(s.fromA-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}};function QC(e){let t=e.nextSibling;return e.remove(),t}var Sd=require("@codemirror/search"),fo=require("@codemirror/state"),Hr=require("@codemirror/view");var Ia=class extends ho.ItemView{constructor(r,n){super(r);this.plugin=n;this.refreshing=!1;this.ignoreNextModification=!1;this.navigation=!0,this.registerEvent(this.app.workspace.on("obsidian-git:status-changed",()=>{this.mergeView?this.updateRefEditors().catch(console.error):this.createMergeView().catch(console.error)})),this.intervalRef=window.setInterval(()=>{this.mergeView&&this.updateRefEditors().catch(console.error)},30*1e3),this.registerEvent(this.app.vault.on("modify",i=>{this.state.bRef==null&&i.path===this.state.bFile&&(this.ignoreNextModification?this.ignoreNextModification=!1:this.updateModifiableEditor().catch(console.error))})),this.registerEvent(this.app.vault.on("delete",i=>{this.state.bRef==null&&i.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("create",i=>{this.state.bRef==null&&i.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("rename",(i,a)=>{this.state.bRef==null&&(i.path===this.state.bFile||a===this.state.bFile)&&this.createMergeView().catch(console.error)})),this.fileSaveDebouncer=(0,ho.debounce)(i=>{let a=this.state.bFile;a&&(this.ignoreNextModification=!0,this.plugin.app.vault.adapter.write(a,i).catch(s=>this.plugin.displayError(s)))},1e3,!1)}getViewType(){return ki.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let n=this.state.bFile.split("/").last();return n!=null&&n.endsWith(".md")&&(n=n.slice(0,-3)),`Diff: ${n}`}return ki.name}getIcon(){return ki.icon}async setState(r,n){this.state=r,ho.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await super.setState(r,n),await this.createMergeView()}getState(){return this.state}onClose(){return window.clearInterval(this.intervalRef),super.onClose()}async onOpen(){return await this.createMergeView(),super.onOpen()}async gitShow(r,n){try{return await this.plugin.gitManager.show(r,n,!1)}catch(i){if(i instanceof wr&&(i.message.includes("does not exist")||i.message.includes("unknown revision or path")||i.message.includes("exists on disk, but not in")||i.message.includes("fatal: bad object")))return i.message.includes("fatal: bad object")&&this.plugin.displayError(i.message),"";throw i}}async bShouldBeEditable(){if(this.state.bRef!=null)return!1;let r=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);return await this.app.vault.adapter.exists(r)}async updateModifiableEditor(){if(!this.mergeView||this.refreshing)return;let r=this.mergeView.b;this.refreshing=!0;let n=await this.app.vault.adapter.read(this.state.bFile);if(n!=r.state.doc.toString()){let i=r.state.update({changes:{from:0,to:r.state.doc.length,insert:n},annotations:[fo.Transaction.remote.of(!0)]});r.dispatch(i)}this.refreshing=!1}async updateRefEditors(){if(!this.mergeView||this.refreshing)return;let r=this.mergeView.a,n=this.mergeView.b;this.refreshing=!0;let i=await this.gitShow(this.state.aRef,this.state.aFile),a;if(this.state.bRef!=null&&(a=await this.gitShow(this.state.bRef,this.state.bFile)),i!=r.state.doc.toString()){let s=r.state.update({changes:{from:0,to:r.state.doc.length,insert:i}});r.dispatch(s)}if(a!=null&&a!=n.state.doc.toString()){let s=n.state.update({changes:{from:0,to:n.state.doc.length,insert:a}});n.dispatch(s)}this.refreshing=!1}async createMergeView(){var r,n,i;if((r=this.state)!=null&&r.aFile&&((n=this.state)!=null&&n.bFile)&&!this.refreshing&&this.plugin.gitManager){this.refreshing=!0,(i=this.mergeView)==null||i.destroy();let a=this.containerEl.children[1];a.empty(),this.contentEl.addClass("git-split-diff-view"),this.bIsEditable=await this.bShouldBeEditable();let s=await this.gitShow(this.state.aRef,this.state.aFile),o;if(this.state.bRef!=null)o=await this.gitShow(this.state.bRef,this.state.bFile);else{let p=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);await this.app.vault.adapter.exists(p)?o=await this.app.vault.adapter.read(p):o=""}let l=[(0,Hr.lineNumbers)(),(0,Sd.highlightSelectionMatches)(),(0,Hr.drawSelection)(),Hr.keymap.of([...po.standardKeymap,po.indentWithTab]),(0,po.history)(),(0,Sd.search)(),Hr.EditorView.lineWrapping],c=this,u=Hr.ViewPlugin.define(p=>({update(m){if(m.docChanged&&!m.transactions.some(v=>v.annotation(fo.Transaction.remote))){let v=p.state.doc.toString();c.fileSaveDebouncer(v)}}})),f={doc:s,extensions:[...l,Hr.EditorView.editable.of(!1),fo.EditorState.readOnly.of(!0)]},d=[...l];this.bIsEditable?d.push(u):d.push(Hr.EditorView.editable.of(!1),fo.EditorState.readOnly.of(!0));let h={doc:o,extensions:d};a.addClasses(["cm-s-obsidian","mod-cm6","markdown-source-view","cm-content"]),this.mergeView=new xd({b:h,a:f,collapseUnchanged:{minSize:6,margin:4},diffConfig:{scanLimit:this.bIsEditable?1e3:1e4},parent:a}),this.refreshing=!1}}};g();var CP=require("obsidian");g();g();g();var d3="5";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(d3);g();g();var mo="[",Fa="[!",$a="]",Ni={};var dt=Symbol(),Yt=Symbol("filename"),h3=Symbol("hmr");g();g();var h7=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory"];var MZ=[...h7,"formNoValidate","isMap","noModule","playsInline","readOnly","value","inert","volume","defaultValue","defaultChecked","srcObject"];var p7=["touchstart","touchmove"];function p3(e){return p7.includes(e)}g();g();g();var Ed=!0;g();var G=!1;g();var on=Array.isArray,cc=Array.from,j0=Object.keys,It=Object.defineProperty,Ur=Object.getOwnPropertyDescriptor,H0=Object.getOwnPropertyDescriptors,U0=Object.prototype,m3=Array.prototype,La=Object.getPrototypeOf;function G0(e){return typeof e=="function"}var xr=()=>{};function Ad(e){for(var t=0;t0)){let n=Array.from(Oa);var r=ri;ao(!0);try{for(let i of n)i.f&1024&&Xt(i,4096),Bi(i)&&Fa(i)}finally{ao(r)}Oa.clear()}return t}function YC(e,t){var r=e.reactions;if(r!==null)for(var n=ji(),i=r.length,a=0;a0)){let n=Array.from(Na);var r=ii;vo(!0);try{for(let i of n)i.f&1024&&Zt(i,4096),Hi(i)&&ja(i)}finally{vo(r)}Na.clear()}return t}function R3(e,t){var r=e.reactions;if(r!==null)for(var n=ji(),i=r.length,a=0;an.line)return a.component}}return null}var JB=Symbol("ADD_OWNER");function N0(e,t){if(t.owners!==null)for(;e;){if(e.owners===null){t.owners=null;break}for(let r of e.owners)t.owners.add(r);e=e.parent}}function e3(e,t){return e.owners===null?!0:e.owners.has(t)||e.parent!==null&&e3(e.parent,t)}function t3(e){var t,r;return(r=(t=e==null?void 0:e.owners)==null?void 0:t.values().next().value)!=null?r:t3(e.parent)}var QB=!1;function r3(e){if(QB)return;let t=QC();if(t&&!e3(e,t)){let r=t3(e);r[qt]!==t[qt]?D0(t[qt],r[qt]):D0()}}function be(e,t=null,r){var l,u;var n=null;if(z&&Qn&&(n=ei("CreatedAt")),typeof e!="object"||e===null||xr in e)return e;let i=Ra(e);if(i!==R0&&i!==IC)return e;var a=new Map,s=sn(e),o=ut(0);s&&a.set("length",ut(e.length,n));var c;if(z)if(c={parent:t,owners:null},r){let f=(u=(l=r.v)==null?void 0:l[Ma])==null?void 0:u.owners;c.owners=f?new Set(f):null}else c.owners=t===null?he!==null?new Set([he.function]):null:new Set;return new Proxy(e,{defineProperty(f,d,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&GC();var p=a.get(d);return p===void 0?(p=ut(h.value,n),a.set(d,p)):re(p,be(h.value,c)),!0},deleteProperty(f,d){var h=a.get(d);if(h===void 0)d in f&&a.set(d,ut(ct,n));else{if(s&&typeof d=="string"){var p=a.get("length"),m=Number(d);Number.isInteger(m)&&m=_.v&&re(_,k+1)}n3(o)}return!0},ownKeys(f){R(o);var d=Reflect.ownKeys(f).filter(m=>{var v=a.get(m);return v===void 0||v.v!==ct});for(var[h,p]of a)p.v!==ct&&!(h in f)&&d.push(h);return d},setPrototypeOf(){zC()}})}function n3(e,t=1){re(e,e.v+t)}function Ed(e){return e!==null&&typeof e=="object"&&xr in e?e[xr]:e}function i3(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(a,s){let o=r.call(this,a,s);if(o===-1){for(let c=s!=null?s:0;c{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var j0,a3,s3,o3;function Ad(){if(j0===void 0){j0=window,a3=document;var e=Element.prototype,t=Node.prototype;s3=Br(t,"firstChild").get,o3=Br(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0,z&&(e.__svelte_meta=null,i3())}}function Vr(e=""){return document.createTextNode(e)}function kt(e){return s3.call(e)}function It(e){return o3.call(e)}function H(e,t){if(!ae)return kt(e);var r=kt(ue);if(r===null)r=ue.appendChild(Vr());else if(t&&r.nodeType!==3){var n=Vr();return r==null||r.before(n),Qe(n),n}return Qe(r),r}function cr(e,t){var i,a;if(!ae){var r=kt(e);return r instanceof Comment&&r.data===""?It(r):r}if(t&&((i=ue)==null?void 0:i.nodeType)!==3){var n=Vr();return(a=ue)==null||a.before(n),Qe(n),n}return ue}function Z(e,t=1,r=!1){let n=ae?ue:e;for(var i;t--;)i=n,n=It(n);if(!ae)return n;var a=n==null?void 0:n.nodeType;if(r&&a!==3){var s=Vr();return n===null?i==null||i.after(s):n.before(s),Qe(s),s}return Qe(n),n}function fo(e){e.textContent=""}g();function Ye(e){var i;var t=2050;te===null?t|=256:te.f|=1048576;var r=fe!==null&&fe.f&2?fe:null;let n={children:null,ctx:he,deps:null,equals:bd,f:t,fn:e,reactions:null,v:null,version:0,parent:r!=null?r:te};return z&&Qn&&(n.created=ei("CreatedAt")),r!==null&&((i=r.children)!=null?i:r.children=[]).push(n),n}function G0(e){let t=Ye(e);return t.equals=io,t}function H0(e){var t=e.children;if(t!==null){e.children=null;for(var r=0;r{Ft(t)}}function u3(e){let t=La(64,e,!0);return(r={})=>new Promise(n=>{r.outro?cn(t,()=>{Ft(t),n(void 0)}):(Ft(t),n(void 0))})}function Sr(e){return La(4,e,!1)}function lr(e){return La(8,e,!0)}function xe(e){return z&&Mt(e,"name",{value:"{expression}"}),ur(e)}function ur(e,t=0){return La(24|t,e,!0)}function Lt(e,t=!0){return La(40,e,!0,t)}function Z0(e){var t=e.teardown;if(t!==null){let r=Cd,n=fe;W0(!0),Tt(null);try{t.call(null)}finally{W0(r),Tt(n)}}}function K0(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var r=0;r{Ft(e),t&&t()})}function ev(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function Td(e,t,r){if(!(e.f&8192)){if(e.f^=8192,e.transitions!==null)for(let s of e.transitions)(s.is_global||r)&&t.push(s);for(var n=e.first;n!==null;){var i=n.next,a=(n.f&65536)!==0||(n.f&32)!==0;Td(n,t,a?r:!1),n=i}}}function Gi(e){d3(e,!0)}function d3(e,t){if(e.f&8192){Bi(e)&&Fa(e),e.f^=8192;for(var r=e.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;d3(r,i?t:!1),r=n}if(e.transitions!==null)for(let a of e.transitions)(a.is_global||t)&&a.in()}}g();var Pd=!1,p3=!1,tv=[],h3=[];function m3(){Pd=!1;let e=tv.slice();tv=[],yd(e)}function r7(){p3=!1;let e=h3.slice();h3=[],yd(e)}function fr(e){Pd||(Pd=!0,queueMicrotask(m3)),tv.push(e)}function g3(){Pd&&m3(),p3&&r7()}g();function uc(e){if(z){let t=new Error(`lifecycle_outside_component +https://svelte.dev/e/state_proxy_equality_mismatch`,dc,hc):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}var ae=!1;function or(e){ae=e}var ue;function tt(e){if(e===null)throw bo(),Ni;return ue=e}function Ft(){return tt($t(ue))}function B(e){if(ae){if($t(ue)!==null)throw bo(),Ni;ue=e}}function _o(e=1){if(ae){for(var t=e,r=ue;t--;)r=$t(r);ue=r}}function xo(){for(var e=0,t=ue;;){if(t.nodeType===8){var r=t.data;if(r===$a){if(e===0)return t;e-=1}else(r===mo||r===Fa)&&(e+=1)}var n=$t(t);t.remove(),t=n}}g();g();g();var v7={},y7=/at (?:.+ \()?(.+):(\d+):(\d+)\)?$/,w7=/@(.+):(\d+):(\d+)$/;function b7(){var r;let e=new Error().stack;if(!e)return null;let t=[];for(let n of e.split(` +`)){let i=(r=y7.exec(n))!=null?r:w7.exec(n);i&&t.push({file:i[1],line:+i[2],column:+i[3]})}return t}function $3(){var t;let e=(t=b7())==null?void 0:t.slice(4);if(!e)return null;for(let r=0;rn.line)return a.component}}return null}var _7=Symbol("ADD_OWNER");function Z0(e,t){if(t.owners!==null)for(;e;){if(e.owners===null){t.owners=null;break}for(let r of e.owners)t.owners.add(r);e=e.parent}}function L3(e,t){return e.owners===null?!0:e.owners.has(t)||e.parent!==null&&L3(e.parent,t)}function D3(e){var t,r;return(r=(t=e==null?void 0:e.owners)==null?void 0:t.values().next().value)!=null?r:D3(e.parent)}var x7=!1;function N3(e){if(x7)return;let t=$3();if(t&&!L3(e,t)){let r=D3(e);r[Yt]!==t[Yt]?X0(t[Yt],r[Yt]):X0()}}function _e(e,t=null,r){var c,u;var n=null;if(G&&ti&&(n=ri("CreatedAt")),typeof e!="object"||e===null||Sr in e)return e;let i=La(e);if(i!==U0&&i!==m3)return e;var a=new Map,s=on(e),o=ht(0);s&&a.set("length",ht(e.length,n));var l;if(G)if(l={parent:t,owners:null},r){let f=(u=(c=r.v)==null?void 0:c[Da])==null?void 0:u.owners;l.owners=f?new Set(f):null}else l.owners=t===null?pe!==null?new Set([pe.function]):null:new Set;return new Proxy(e,{defineProperty(f,d,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&A3();var p=a.get(d);return p===void 0?(p=ht(h.value,n),a.set(d,p)):re(p,_e(h.value,l)),!0},deleteProperty(f,d){var h=a.get(d);if(h===void 0)d in f&&a.set(d,ht(dt,n));else{if(s&&typeof d=="string"){var p=a.get("length"),m=Number(d);Number.isInteger(m)&&m=_.v&&re(_,k+1)}B3(o)}return!0},ownKeys(f){R(o);var d=Reflect.ownKeys(f).filter(m=>{var v=a.get(m);return v===void 0||v.v!==dt});for(var[h,p]of a)p.v!==dt&&!(h in f)&&d.push(h);return d},setPrototypeOf(){k3()}})}function B3(e,t=1){re(e,e.v+t)}function Md(e){return e!==null&&typeof e=="object"&&Sr in e?e[Sr]:e}function j3(){let e=Array.prototype,t=Array.__svelte_cleanup;t&&t();let{indexOf:r,lastIndexOf:n,includes:i}=e;e.indexOf=function(a,s){let o=r.call(this,a,s);if(o===-1){for(let l=s!=null?s:0;l{e.indexOf=r,e.lastIndexOf=n,e.includes=i}}var K0,H3,U3,G3;function Od(){if(K0===void 0){K0=window,H3=document;var e=Element.prototype,t=Node.prototype;U3=Ur(t,"firstChild").get,G3=Ur(t,"nextSibling").get,e.__click=void 0,e.__className="",e.__attributes=null,e.__styles=null,e.__e=void 0,Text.prototype.__t=void 0,G&&(e.__svelte_meta=null,j3())}}function qr(e=""){return document.createTextNode(e)}function Pt(e){return U3.call(e)}function $t(e){return G3.call(e)}function j(e,t){if(!ae)return Pt(e);var r=Pt(ue);if(r===null)r=ue.appendChild(qr());else if(t&&r.nodeType!==3){var n=qr();return r==null||r.before(n),tt(n),n}return tt(r),r}function cr(e,t){var i,a;if(!ae){var r=Pt(e);return r instanceof Comment&&r.data===""?$t(r):r}if(t&&((i=ue)==null?void 0:i.nodeType)!==3){var n=qr();return(a=ue)==null||a.before(n),tt(n),n}return ue}function Z(e,t=1,r=!1){let n=ae?ue:e;for(var i;t--;)i=n,n=$t(n);if(!ae)return n;var a=n==null?void 0:n.nodeType;if(r&&a!==3){var s=qr();return n===null?i==null||i.after(s):n.before(s),tt(s),s}return tt(n),n}function So(e){e.textContent=""}g();function Xe(e){var i;var t=2050;te===null?t|=256:te.f|=1048576;var r=de!==null&&de.f&2?de:null;let n={children:null,ctx:pe,deps:null,equals:Td,f:t,fn:e,reactions:null,v:null,version:0,parent:r!=null?r:te};return G&&ti&&(n.created=ri("CreatedAt")),r!==null&&((i=r.children)!=null?i:r.children=[]).push(n),n}function tv(e){let t=Xe(e);return t.equals=go,t}function Q0(e){var t=e.children;if(t!==null){e.children=null;for(var r=0;r{Lt(t)}}function W3(e){let t=Ua(64,e,!0);return(r={})=>new Promise(n=>{r.outro?un(t,()=>{Lt(t),n(void 0)}):(Lt(t),n(void 0))})}function Er(e){return Ua(4,e,!1)}function lr(e){return Ua(8,e,!0)}function Ae(e){return G&&It(e,"name",{value:"{expression}"}),ur(e)}function ur(e,t=0){return Ua(24|t,e,!0)}function Nt(e,t=!0){return Ua(40,e,!0,t)}function lv(e){var t=e.teardown;if(t!==null){let r=$d,n=de;iv(!0),Rt(null);try{t.call(null)}finally{iv(r),Rt(n)}}}function cv(e){var t=e.deriveds;if(t!==null){e.deriveds=null;for(var r=0;r{Lt(e),t&&t()})}function dv(e,t){var r=e.length;if(r>0){var n=()=>--r||t();for(var i of e)i.out(n)}else t()}function Fd(e,t,r){if(!(e.f&8192)){if(e.f^=8192,e.transitions!==null)for(let s of e.transitions)(s.is_global||r)&&t.push(s);for(var n=e.first;n!==null;){var i=n.next,a=(n.f&65536)!==0||(n.f&32)!==0;Fd(n,t,a?r:!1),n=i}}}function zi(e){Y3(e,!0)}function Y3(e,t){if(e.f&8192){Hi(e)&&ja(e),e.f^=8192;for(var r=e.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;Y3(r,i?t:!1),r=n}if(e.transitions!==null)for(let a of e.transitions)(a.is_global||t)&&a.in()}}g();var Ld=!1,Z3=!1,hv=[],X3=[];function K3(){Ld=!1;let e=hv.slice();hv=[],Ad(e)}function A7(){Z3=!1;let e=X3.slice();X3=[],Ad(e)}function fr(e){Ld||(Ld=!0,queueMicrotask(K3)),hv.push(e)}function J3(){Ld&&K3(),Z3&&A7()}g();function mc(e){if(G){let t=new Error(`lifecycle_outside_component \`${e}(...)\` can only be used during component initialisation -https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var x3=0,a7=1,v3=new WeakSet,Rd=!1,Md=x3,fc=!1,po=null,ri=!1,Cd=!1;function ao(e){ri=e}function W0(e){Cd=e}var Da=[],mo=0,dc=[],fe=null;function Tt(e){fe=e}var te=null;function it(e){te=e}var on=null;function XC(e){on=e}var At=null,Er=0,ti=null;function ZC(e){ti=e}var S3=1,ni=!1,sc=null;var he=null;var zr=null;function _d(){return++S3}function ji(){return!Jn||he!==null&&he.l===null}function Bi(e){var s,o,c,l;var t=e.f;if(t&2048)return!0;if(t&4096){var r=e.deps,n=(t&256)!==0;if(r!==null){var i;if(t&512){for(i=0;ie.version)return!0}}(!n||te!==null&&!ni)&&Xt(e,1024)}return!1}function y3(e,t){for(var r=t;r!==null;){if(r.f&128)try{r.fn(e);return}catch(n){r.f^=128}r=r.parent}throw Rd=!1,e}function w3(e){return(e.f&16384)===0&&(e.parent===null||(e.parent.f&128)===0)}function go(e,t,r,n){var u,f;if(Rd){if(r===null&&(Rd=!1),w3(t))throw e;return}if(r!==null&&(Rd=!0),!z||n===null||!(e instanceof Error)||v3.has(e)){y3(e,t);return}v3.add(e);let i=[],a=(u=t.fn)==null?void 0:u.name;a&&i.push(a);let s=n;for(;s!==null;){if(z){var o=(f=s.function)==null?void 0:f[qt];if(o){let d=o.split("/").pop();i.push(d)}}s=s.p}let c=/Firefox/.test(navigator.userAgent)?" ":" ";Mt(e,"message",{value:e.message+` +https://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}var iP=0,C7=1,Q3=new WeakSet,Dd=!1,Nd=iP,gc=!1,Ao=null,ii=!1,$d=!1;function vo(e){ii=e}function iv(e){$d=e}var Ga=[],ko=0,vc=[],de=null;function Rt(e){de=e}var te=null;function ot(e){te=e}var ln=null;function M3(e){ln=e}var Ct=null,Ar=0,ni=null;function O3(e){ni=e}var aP=1,ai=!1,fc=null;var pe=null;var Wr=null;function Cd(){return++aP}function ji(){return!ei||pe!==null&&pe.l===null}function Hi(e){var s,o,l,c;var t=e.f;if(t&2048)return!0;if(t&4096){var r=e.deps,n=(t&256)!==0;if(r!==null){var i;if(t&512){for(i=0;ie.version)return!0}}(!n||te!==null&&!ai)&&Zt(e,1024)}return!1}function eP(e,t){for(var r=t;r!==null;){if(r.f&128)try{r.fn(e);return}catch(n){r.f^=128}r=r.parent}throw Dd=!1,e}function tP(e){return(e.f&16384)===0&&(e.parent===null||(e.parent.f&128)===0)}function To(e,t,r,n){var u,f;if(Dd){if(r===null&&(Dd=!1),tP(t))throw e;return}if(r!==null&&(Dd=!0),!G||n===null||!(e instanceof Error)||Q3.has(e)){eP(e,t);return}Q3.add(e);let i=[],a=(u=t.fn)==null?void 0:u.name;a&&i.push(a);let s=n;for(;s!==null;){if(G){var o=(f=s.function)==null?void 0:f[Yt];if(o){let d=o.split("/").pop();i.push(d)}}s=s.p}let l=/Firefox/.test(navigator.userAgent)?" ":" ";It(e,"message",{value:e.message+` ${i.map(d=>` -${c}in ${d}`).join("")} -`}),Mt(e,"component_stack",{value:i});let l=e.stack;if(l){let d=l.split(` -`),h=[];for(let p=0;p0)for(u.length=Er+At.length,f=0;fe.fn)),dc=[]}function E3(){if(mo>1e3){mo=0;try{jC()}catch(e){if(z&&Mt(e,"stack",{value:""}),po!==null)if(z)try{go(e,po,null,null)}catch(t){throw b3(),t}else go(e,po,null,null);else throw z&&b3(),e}}mo++}function A3(e){var t=e.length;if(t!==0){E3();var r=ri;ri=!0;try{for(var n=0;n1001)return;let e=Da;Da=[],A3(e),fc||(mo=0,po=null,z&&(dc=[]))}function oo(e){Md===x3&&(fc||(fc=!0,queueMicrotask(l7))),po=e;for(var t=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024))return;t.f^=1024}}Da.push(t)}function k3(e,t){var r=e.first,n=[];e:for(;r!==null;){var i=r.f,a=(i&32)!==0,s=a&&(i&1024)!==0,o=r.next;if(!s&&!(i&8192))if(i&8){if(a)r.f^=1024;else try{Bi(r)&&Fa(r)}catch(f){go(f,r,null,r.ctx)}var c=r.first;if(c!==null){r=c;continue}}else i&4&&n.push(r);if(o===null){let f=r.parent;for(;f!==null;){if(e===f)break e;var l=f.next;if(l!==null){r=l;continue e}f=f.parent}}r=o}for(var u=0;u0||i.length>0)&&vo(),mo=0,po=null,z&&(dc=[]),n}finally{Md=t,Da=r}}function R(e){var f,d;var t=e.f,r=(t&2)!==0;if(r&&t&16384){var n=z0(e);return cc(e),n}if(sc!==null&&sc.add(e),fe!==null){on!==null&&on.includes(e)&&VC();var i=fe.deps;At===null&&i!==null&&i[Er]===e?Er++:At===null?At=[e]:At.push(e),ti!==null&&te!==null&&te.f&1024&&!(te.f&32)&&ti.includes(e)&&(Xt(te,2048),oo(te))}else if(r&&e.deps===null)for(var a=e,s=a.parent,o=a;s!==null;)if(s.f&2){var c=s;o=c,s=c.parent}else{var l=s;(f=l.deriveds)!=null&&f.includes(o)||((d=l.deriveds)!=null?d:l.deriveds=[]).push(o);break}if(r&&(a=e,Bi(a)&&V0(a)),z&&Qn&&ac!==null&&fe!==null&&ac.reaction===fe){if(e.debug)e.debug();else if(e.created){var u=ac.entries.get(e);u===void 0&&(u={read:[]},ac.entries.set(e,u)),u.read.push(ei("TracedAt"))}}return e.v}function Ue(e){let t=fe;try{return fe=null,e()}finally{fe=t}}var c7=-7169;function Xt(e,t){e.f=e.f&c7|t}function Xe(e,t=!1,r){he={p:he,c:null,e:null,m:!1,s:e,x:null,l:null},Jn&&!t&&(he.l={s:null,u:null,r1:[],r2:ut(!1)}),z&&(he.function=r,zr=r)}function Ze(e){var s,o;let t=he;if(t!==null){e!==void 0&&(t.x=e);let c=t.e;if(c!==null){var r=te,n=fe;t.e=null;try{for(var i=0;i{if(r!==void 0)return r;UC(t)},set:n=>{r=n}})}};e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}g();var T3=new Map;function C3(e,t){var r=T3.get(e);r||(r=new Set,T3.set(e,r)),r.add(t)}g();g();g();g();g();g();function rv(e){ae&&kt(e)!==null&&fo(e)}var P3=!1;function nv(){P3||(P3=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(let r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function Fd(e){var t=fe,r=te;Tt(null),it(null);try{return e()}finally{Tt(t),it(r)}}function iv(e,t,r,n=r){e.addEventListener(t,()=>Fd(r));let i=e.__on_r;i?e.__on_r=()=>{i(),n(!0)}:e.__on_r=()=>n(!0),nv()}var av=new Set,$d=new Set;function R3(e,t,r,n){function i(a){if(n.capture||yo.call(t,a),!a.cancelBubble)return Fd(()=>r.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?fr(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function Ar(e,t,r,n,i){var a={capture:n,passive:i},s=R3(e,t,r,a);(t===document.body||t===window||t===document)&&qr(()=>{t.removeEventListener(e,s,a)})}function dt(e){for(var t=0;t{throw x});throw d}}finally{e.__root=t,delete e.currentTarget,Tt(u),it(f)}}}g();var f7;function M3(){f7=void 0}g();g();function Ld(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function Mn(e,t){var r=te;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function se(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,a=!e.startsWith("");return()=>{if(ae)return Mn(ue,null),ue;i===void 0&&(i=Ld(a?e:""+e),r||(i=kt(i)));var s=n?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=kt(s),c=s.lastChild;Mn(o,c)}else Mn(s,s);return s}}function ii(){if(ae)return Mn(ue,null),ue;var e=document.createDocumentFragment(),t=document.createComment(""),r=Vr();return e.append(t,r),Mn(t,r),e}function ne(e,t){if(ae){te.nodes_end=ue,Ot();return}e!==null&&e.before(t)}var Dd=!0;function Oe(e,t){var n;var r=t==null?"":typeof t=="object"?t+"":t;r!==((n=e.__t)!=null?n:e.__t=e.nodeValue)&&(e.__t=r,e.nodeValue=r==null?"":r+"")}function zi(e,t){return O3(e,t)}function ov(e,t){var s;Ad(),t.intro=(s=t.intro)!=null?s:!1;let r=t.target,n=ae,i=ue;try{for(var a=kt(r);a&&(a.nodeType!==8||a.data!==no);)a=It(a);if(!a)throw Di;or(!0),Qe(a),Ot();let o=O3(e,{...t,anchor:a});if(ue===null||ue.nodeType!==8||ue.data!==Pa)throw lo(),Di;return or(!1),o}catch(o){if(o===Di)return t.recover===!1&&BC(),Ad(),fo(r),or(!1),zi(e,t);throw o}finally{or(n),Qe(i),M3()}}var wo=new Map;function O3(e,{target:t,anchor:r,props:n={},events:i,context:a,intro:s=!0}){Ad();var o=new Set,c=f=>{for(var d=0;d{var f=r!=null?r:t.appendChild(Vr());return Lt(()=>{if(a){Xe({});var d=he;d.c=a}i&&(n.$$events=i),ae&&Mn(f,null),Dd=s,l=e(f,n)||{},Dd=!0,ae&&(te.nodes_end=ue),a&&Ze()}),()=>{var p;for(var d of o){t.removeEventListener(d,yo);var h=wo.get(d);--h===0?(document.removeEventListener(d,yo),wo.delete(d)):wo.set(d,h)}$d.delete(c),f!==r&&((p=f.parentNode)==null||p.removeChild(f))}});return sv.set(l,u),l}var sv=new WeakMap;function ai(e,t){let r=sv.get(e);return r?(sv.delete(e),r(t)):(z&&JC(),Promise.resolve())}g();g();g();g();function ge(e,t,r=!1){ae&&Ot();var n=e,i=null,a=null,s=ct,o=r?65536:0,c=!1;let l=(f,d=!0)=>{c=!0,u(d,f)},u=(f,d)=>{if(s===(s=f))return;let h=!1;if(ae){let p=n.data===Ca;!!s===p&&(n=uo(),Qe(n),or(!1),h=!0)}s?(i?Gi(i):d&&(i=Lt(()=>d(n))),a&&cn(a,()=>{a=null})):(a?Gi(a):d&&(a=Lt(()=>d(n))),i&&cn(i,()=>{i=null})),h&&or(!0)};ur(()=>{c=!1,t(l),c||u(null,null)},o),ae&&(n=ue)}g();g();g();var hc=null;function kr(e,t){return t}function w7(e,t,r,n){for(var i=[],a=t.length,s=0;s0&&i.length===0&&r!==null;if(o){var c=r.parentNode;fo(c),c.append(r),n.clear(),Vi(e,t[0].prev,t[a-1].next)}ev(i,()=>{for(var l=0;l{var d=r(),h=sn(d)?d:d==null?[]:ic(d),p=h.length;if(f&&p===0)return;f=p===0;let m=!1;if(ae){var v=s.data===Ca;v!==(p===0)&&(s=uo(),Qe(s),or(!1),m=!0)}if(ae){for(var y=null,b,x=0;x0&&Qe(uo())}if(!ae){var k=fe;b7(h,o,s,i,t,(k.f&8192)!==0,n,r)}a!==null&&(p===0?u?Gi(u):u=Lt(()=>a(s)):u!==null&&cn(u,()=>{u=null})),m&&or(!0),r()}),ae&&(s=ue)}function b7(e,t,r,n,i,a,s,o){var Q,de,ee,J;var c=(i&8)!==0,l=(i&3)!==0,u=e.length,f=t.items,d=t.first,h=d,p,m=null,v,y=[],b=[],x,E,_,k;if(c)for(k=0;k0){var D=i&4&&u===0?r:null;if(c){for(k=0;k{var Pe;if(v!==void 0)for(_ of v)(Pe=_.a)==null||Pe.apply()}),te.first=t.first&&t.first.e,te.last=m&&m.e}function _7(e,t,r,n){n&1&&so(e.v,t),n&2?so(e.i,r):e.i=r}function $3(e,t,r,n,i,a,s,o,c,l){var u=hc,f=(c&1)!==0,d=(c&16)===0,h=f?d?Ni(i):ut(i):i,p=c&2?ut(s):s;z&&f&&(h.debug=()=>{var v=typeof p=="number"?s:p.v;l()[v]});var m={i:p,v:h,k:a,a:null,e:null,prev:r,next:n};hc=m;try{return m.e=Lt(()=>o(e,h,p),ae),m.e.prev=r&&r.e,m.e.next=n&&n.e,r===null?t.first=m:(r.next=m,r.e.next=m.e),n!==null&&(n.prev=m,n.e.prev=m.e),m}finally{hc=u}}function I3(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,i=t?t.e.nodes_start:r,a=e.e.nodes_start;a!==n;){var s=It(a);i.before(a),a=s}}function Vi(e,t,r){t===null?e.first=r:(t.next=r,t.e.next=r&&r.e),r!==null&&(r.prev=t,r.e.prev=t&&t.e)}g();g();g();g();g();g();function gt(e,t){fr(()=>{var i;var r=e.getRootNode(),n=r.host?r:(i=r.head)!=null?i:r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){let a=document.createElement("style");a.id=t.hash,a.textContent=t.code,n.appendChild(a),z&&C3(t.hash,a)}})}g();g();g();g();g();function pe(e,t,r,n){var a;var i=(a=e.__attributes)!=null?a:e.__attributes={};if(ae&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")){n||k7(e,t,r!=null?r:"");return}i[t]!==(i[t]=r)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[FC]=r),r==null?e.removeAttribute(t):typeof r!="string"&&A7(e).includes(t)?e[t]=r:e.setAttribute(t,r))}var D3=new Map;function A7(e){var t=D3.get(e.nodeName);if(t)return t;D3.set(e.nodeName,t=[]);for(var r,n=e,i=Element.prototype;i!==n;){r=P0(n);for(var a in r)r[a].set&&t.push(a);n=Ra(n)}return t}function k7(e,t,r){var n;z&&(t==="srcset"&&T7(e,r)||uv((n=e.getAttribute(t))!=null?n:"",r)||KC(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function uv(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function N3(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function T7(e,t){var r=N3(e.srcset),n=N3(t);return n.length===r.length&&n.every(([i,a],s)=>a===r[s][1]&&(uv(r[s][0],i)||uv(i,r[s][0])))}g();function at(e,t,r){if(r){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}g();g();g();g();var C7=vd?()=>performance.now():()=>Date.now(),un={tick:e=>(vd?requestAnimationFrame:_r)(e),now:()=>C7(),tasks:new Set};function j3(){let e=un.now();un.tasks.forEach(t=>{t.c(e)||(un.tasks.delete(t),t.f())}),un.tasks.size!==0&&un.tick(j3)}function B3(e){let t;return un.tasks.size===0&&un.tick(j3),{promise:new Promise(r=>{un.tasks.add(t={c:e,f:r})}),abort(){un.tasks.delete(t)}}}function Nd(e,t){e.dispatchEvent(new CustomEvent(t))}function O7(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;let t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function H3(e){let t={},r=e.split(";");for(let n of r){let[i,a]=n.split(":");if(!i||a===void 0)break;let s=O7(i.trim());t[s]=a.trim()}return t}var I7=e=>e;function fn(e,t,r,n){var b;var i=(e&1)!==0,a=(e&2)!==0,s=i&&a,o=(e&4)!==0,c=s?"both":i?"in":"out",l,u=t.inert,f,d;function h(){var _;var x=fe,E=te;Tt(null),it(null);try{return l!=null?l:l=r()(t,(_=n==null?void 0:n())!=null?_:{},{direction:c})}finally{Tt(x),it(E)}}var p={is_global:o,in(){var x;if(t.inert=u,!i){d==null||d.abort(),(x=d==null?void 0:d.reset)==null||x.call(d);return}a||f==null||f.abort(),Nd(t,"introstart"),f=fv(t,h(),d,1,()=>{Nd(t,"introend"),f==null||f.abort(),f=l=void 0})},out(x){if(!a){x==null||x(),l=void 0;return}t.inert=!0,Nd(t,"outrostart"),d=fv(t,h(),f,0,()=>{Nd(t,"outroend"),x==null||x()})},stop:()=>{f==null||f.abort(),d==null||d.abort()}},m=te;if(((b=m.transitions)!=null?b:m.transitions=[]).push(p),i&&Dd){var v=o;if(!v){for(var y=m.parent;y&&y.f&65536;)for(;(y=y.parent)&&!(y.f&16););v=!y||(y.f&32768)!==0}v&&Sr(()=>{Ue(()=>p.in())})}}function fv(e,t,r,n,i){var a=n===1;if(M0(t)){var s,o=!1;return fr(()=>{if(!o){var v=t({direction:a?"in":"out"});s=fv(e,v,r,n,i)}}),{abort:()=>{o=!0,s==null||s.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(r==null||r.deactivate(),!(t!=null&&t.duration))return i(),{abort:_r,deactivate:_r,reset:_r,t:()=>n};let{delay:c=0,css:l,tick:u,easing:f=I7}=t;var d=[];if(a&&r===void 0&&(u&&u(0,1),l)){var h=H3(l(0,1));d.push(h,h)}var p=()=>1-n,m=e.animate(d,{duration:c});return m.onfinish=()=>{var A;var v=(A=r==null?void 0:r.t())!=null?A:1-n;r==null||r.abort();var y=n-v,b=t.duration*Math.abs(y),x=[];if(b>0){if(l)for(var E=Math.ceil(b/16.666666666666668),_=0;_<=E;_+=1){var k=v+y*f(_/E),w=l(k,1-k);x.push(H3(w))}p=()=>{var S=m.currentTime;return v+y*f(S/b)},u&&B3(()=>{if(m.playState!=="running")return!1;var S=p();return u(S,1-S),!0})}m=e.animate(x,{duration:b,fill:"forwards"}),m.onfinish=()=>{p=()=>n,u==null||u(n,1-n),i()}},{abort:()=>{m&&(m.cancel(),m.effect=null,m.onfinish=_r)},deactivate:()=>{i=_r},reset:()=>{n===0&&(u==null||u(1,0))},t:()=>p()}}g();g();function pv(e,t,r=t){var n=ji();iv(e,"input",i=>{z&&e.type==="checkbox"&&I0();var a=i?e.defaultValue:e.value;if(a=dv(e)?hv(a):a,r(a),n&&a!==(a=t())){var s=e.selectionStart,o=e.selectionEnd;e.value=a!=null?a:"",o!==null&&(e.selectionStart=s,e.selectionEnd=Math.min(o,e.value.length))}}),(ae&&e.defaultValue!==e.value||Ue(t)==null&&e.value)&&r(dv(e)?hv(e.value):e.value),lr(()=>{z&&e.type==="checkbox"&&I0();var i=t();dv(e)&&i===hv(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i!=null?i:"")})}function dv(e){var t=e.type;return t==="number"||t==="range"}function hv(e){return e===""?null:+e}g();g();g();g();g();g();function U3(e,t){return e===t||(e==null?void 0:e[xr])===t}function Ge(e={},t,r,n){return Sr(()=>{var i,a;return lr(()=>{i=a,a=(n==null?void 0:n())||[],Ue(()=>{e!==r(...a)&&(t(e,...a),i&&U3(r(...i),e)&&t(null,...i))})}),()=>{fr(()=>{a&&U3(r(...a),e)&&t(null,...a)})}}),e}g();g();g();g();g();g();g();g();g();function mv(e){he===null&&uc("onMount"),Jn&&he.l!==null?B7(he).m.push(e):$t(()=>{let t=Ue(e);if(typeof t=="function")return t})}function G3(e){he===null&&uc("onDestroy"),mv(()=>()=>Ue(e))}function B7(e){var r;var t=e.l;return(r=t.u)!=null?r:t.u={a:[],b:[],m:[]}}var Bd=!1;function gv(e){var t=Bd;try{return Bd=!1,[e(),Bd]}finally{Bd=t}}function z3(e){for(var t=te,r=te;t!==null&&!(t.f&96);)t=t.parent;try{return it(t),e()}finally{it(r)}}function si(e,t,r,n){var w,A;var i=(r&1)!==0,a=!Jn||(r&2)!==0,s=(r&8)!==0,o=(r&16)!==0,c=!1,l;s?[l,c]=gv(()=>e[t]):l=e[t];var u=xr in e||wd in e,f=(A=(w=Br(e,t))==null?void 0:w.set)!=null?A:u&&s&&t in e?S=>e[t]=S:void 0,d=n,h=!0,p=!1,m=()=>(p=!0,h&&(h=!1,o?d=Ue(n):d=n),d);l===void 0&&n!==void 0&&(f&&a&&HC(t),l=m(),f&&f(l));var v;if(a)v=()=>{var S=e[t];return S===void 0?m():(h=!0,p=!1,S)};else{var y=z3(()=>(i?Ye:G0)(()=>e[t]));y.f|=131072,v=()=>{var S=R(y);return S!==void 0&&(d=void 0),S===void 0?d:S}}if(!(r&4))return v;if(f){var b=e.$$legacy;return function(S,T){return arguments.length>0?((!a||!T||b||c)&&f(T?v():S),S):v()}}var x=!1,E=!1,_=Ni(l),k=z3(()=>Ye(()=>{var S=v(),T=R(_);return x?(x=!1,E=!0,T):(E=!1,_.v=S)}));return i||(k.equals=io),function(S,T){if(sc!==null&&(x=E,v(),R(_)),arguments.length>0){let P=T?R(k):a&&s?be(S):S;return k.equals(P)||(x=!0,re(_,P),p&&d!==void 0&&(d=P),Ue(()=>R(k))),S}return R(k)}}g();g();g();g();function V3(e){return new vv(e)}var oi,Yr,vv=class{constructor(t){Pc(this,oi);Pc(this,Yr);var a,s;var r=new Map,n=(o,c)=>{var l=Ni(c);return r.set(o,l),l};let i=new Proxy({...t.props||{},$$events:{}},{get(o,c){var l;return R((l=r.get(c))!=null?l:n(c,Reflect.get(o,c)))},has(o,c){var l;return c===wd?!0:(R((l=r.get(c))!=null?l:n(c,Reflect.get(o,c))),Reflect.has(o,c))},set(o,c,l){var u;return re((u=r.get(c))!=null?u:n(c,l),l),Reflect.set(o,c,l)}});Rc(this,Yr,(t.hydrate?ov:zi)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:(a=t.intro)!=null?a:!1,recover:t.recover})),(!((s=t==null?void 0:t.props)!=null&&s.$$host)||t.sync===!1)&&vo(),Rc(this,oi,i.$$events);for(let o of Object.keys(Bt(this,Yr)))o==="$set"||o==="$destroy"||o==="$on"||Mt(this,o,{get(){return Bt(this,Yr)[o]},set(c){Bt(this,Yr)[o]=c},enumerable:!0});Bt(this,Yr).$set=o=>{Object.assign(i,o)},Bt(this,Yr).$destroy=()=>{ai(Bt(this,Yr))}}$set(t){Bt(this,Yr).$set(t)}$on(t,r){Bt(this,oi)[t]=Bt(this,oi)[t]||[];let n=(...i)=>r.call(this,...i);return Bt(this,oi)[t].push(n),()=>{Bt(this,oi)[t]=Bt(this,oi)[t].filter(i=>i!==n)}}$destroy(){Bt(this,Yr).$destroy()}};oi=new WeakMap,Yr=new WeakMap;var Q7;typeof HTMLElement=="function"&&(Q7=class extends HTMLElement{constructor(t,r,n){super();Cr(this,"$$ctor");Cr(this,"$$s");Cr(this,"$$c");Cr(this,"$$cn",!1);Cr(this,"$$d",{});Cr(this,"$$r",!1);Cr(this,"$$p_d",{});Cr(this,"$$l",{});Cr(this,"$$l_u",new Map);Cr(this,"$$me");this.$$ctor=t,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){let i=this.$$c.$on(t,r);this.$$l_u.set(r,i)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){let i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return a=>{let s=document.createElement("slot");i!=="default"&&(s.name=i),ne(a,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let r={},n=e9(this);for(let i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(let i of this.attributes){let a=this.$$g_p(i.name);a in this.$$d||(this.$$d[a]=yv(a,i.value,this.$$p_d,"toProp"))}for(let i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=V3({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=X0(()=>{lr(()=>{var i;this.$$r=!0;for(let a of C0(this.$$c)){if(!((i=this.$$p_d[a])!=null&&i.reflect))continue;this.$$d[a]=this.$$c[a];let s=yv(a,this.$$d[a],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,s)}this.$$r=!1})});for(let i in this.$$l)for(let a of this.$$l[i]){let s=this.$$c.$on(i,a);this.$$l_u.set(a,s)}this.$$l={}}}attributeChangedCallback(t,r,n){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=yv(t,n,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return C0(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function yv(e,t,r,n){var a;let i=(a=r[e])==null?void 0:a.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function e9(e){let t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}g();g();g();function bo(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(u){try{l(n.next(u))}catch(f){s(f)}}function c(u){try{l(n.throw(u))}catch(f){s(f)}}function l(u){u.done?a(u.value):i(u.value).then(o,c)}l((n=n.apply(e,t||[])).next())})}var _v=require("obsidian");g();var wv=require("obsidian");g();function r9(e){let t=e-1;return t*t*t+1}function In(e,{delay:t=0,duration:r=400,easing:n=r9,axis:i="y"}={}){let a=getComputedStyle(e),s=+a.opacity,o=i==="y"?"height":"width",c=parseFloat(a[o]),l=i==="y"?["top","bottom"]:["left","right"],u=l.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),f=parseFloat(a[`padding${u[0]}`]),d=parseFloat(a[`padding${u[1]}`]),h=parseFloat(a[`margin${u[0]}`]),p=parseFloat(a[`margin${u[1]}`]),m=parseFloat(a[`border${u[0]}Width`]),v=parseFloat(a[`border${u[1]}Width`]);return{delay:t,duration:r,easing:n,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*s};${o}: ${y*c}px;padding-${l[0]}: ${y*f}px;padding-${l[1]}: ${y*d}px;margin-${l[0]}: ${y*h}px;margin-${l[1]}: ${y*p}px;border-${l[0]}-width: ${y*m}px;border-${l[1]}-width: ${y*v}px;`}}g();var pc=require("obsidian");var n9=se('
'),i9=se('
'),a9={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function mc(e,t){Xe(t,!0),gt(e,a9);let r=be([]),n=Ye(()=>t.view.leaf.getRoot().side=="left"?"right":"left");$t(()=>{for(let y of r)y&&(0,pc.setIcon)(y,y.getAttr("data-icon"))});function i(y){y.stopPropagation(),zs(t.diff.path)?a(y):s(y)}function a(y){var b;y.stopPropagation();let x=t.view.app.vault.getAbstractFileByPath(t.diff.vaultPath);x instanceof pc.TFile&&((b=rn(t.view.app,y))===null||b===void 0||b.openFile(x).catch(E=>t.view.plugin.displayError(E)))}function s(y){var b;t.view.plugin.tools.openDiff({event:y,aFile:(b=t.diff.fromPath)!==null&&b!==void 0?b:t.diff.path,aRef:`${t.diff.hash}^`,bFile:t.diff.path,bRef:t.diff.hash})}var o=i9();o.__click=i;var c=H(o),l=H(c),u=H(l,!0);xe(()=>Oe(u,Tn(t.diff.vaultPath))),B(l);var f=Z(l,2),d=H(f),h=H(d);{var p=y=>{var b=n9();b.__click=a,Ge(b,x=>r[0]=x,()=>r==null?void 0:r[0]),Ar("auxclick",b,a),ne(y,b)};ge(h,y=>{t.view.app.vault.getAbstractFileByPath(t.diff.vaultPath)instanceof pc.TFile&&y(p)})}B(d);var m=Z(d,2),v=H(m,!0);B(m),B(f),B(c),B(o),xe(()=>{pe(c,"data-path",t.diff.vaultPath),pe(c,"data-tooltip-position",R(n)),pe(c,"aria-label",t.diff.vaultPath),pe(m,"data-type",t.diff.status),Oe(v,t.diff.status)}),Ar("auxclick",o,y=>{y.stopPropagation(),y.button==2?kn(t.view.app,y,t.diff.vaultPath,t.view.leaf,"git-history"):i(y)}),ne(e,o),Ze()}dt(["click"]);g();var s9=se("
"),o9=(e,t,r)=>t(R(r)),l9=se(''),c9=se(''),u9=se('
'),f9={hash:"svelte-1lnl15d",code:"main.svelte-1lnl15d .nav-folder-title-content:where(.svelte-1lnl15d) {display:flex;align-items:center;}"};function gc(e,t){Xe(t,!0),gt(e,f9);let r=si(t,"topLevel",3,!1),n=be({}),i=Ye(()=>t.view.leaf.getRoot().side=="left"?"right":"left");function a(o){n[o.title]=!n[o.title]}var s=u9();Tr(s,21,()=>t.hierarchy.children,kr,(o,c)=>{var l=ii(),u=cr(l);{var f=h=>{var p=s9(),m=H(p);mc(m,{get diff(){return R(c).data},get view(){return t.view}}),B(p),ne(h,p)},d=h=>{var p=c9(),m=H(p);m.__click=[o9,a,c];var v=Z(H(m),2),y=Z(v,2),b=H(y,!0);B(y),B(m);var x=Z(m,2);{var E=_=>{var k=l9(),w=H(k);gc(w,{get hierarchy(){return R(c)},get plugin(){return t.plugin},get view(){return t.view}}),B(k),fn(3,k,()=>In,()=>({duration:150})),ne(_,k)};ge(x,_=>{n[R(c).title]||_(E)})}B(p),xe(()=>{at(p,"is-collapsed",n[R(c).title]),pe(m,"data-tooltip-position",R(i)),pe(m,"aria-label",R(c).vaultPath),at(v,"is-collapsed",n[R(c).title]),Oe(b,R(c).title)}),ne(h,p)};ge(u,h=>{R(c).data?h(f):h(d,!1)})}ne(o,l)}),B(s),xe(()=>at(s,"topLevel",r())),ne(e,s),Ze()}dt(["click"]);var d9=(e,t)=>re(t,!R(t)),h9=se('
'),p9=se('
'),m9=se('
'),g9=se(''),v9=se('
'),y9={hash:"svelte-45h",code:""};function bv(e,t){Xe(t,!0),gt(e,y9);let r=Ye(()=>({title:"",path:"",vaultPath:"",children:t.plugin.gitManager.getTreeStructure(t.log.diff.files)})),n=Ye(()=>t.view.leaf.getRoot().side=="left"?"right":"left"),i=ft(!0);function a(_){let k=_.author.name;if(t.plugin.settings.authorInHistoryView=="full")return k;if(t.plugin.settings.authorInHistoryView=="initials")return k.split(" ").filter(A=>A.length>0).map(A=>A[0].toUpperCase()).join("")}var s=v9(),o=H(s),c=H(o);xe(()=>{var _;return pe(c,"aria-label",`${t.log.refs.length>0?t.log.refs.join(", ")+` +${l}in ${d}`).join("")} +`}),It(e,"component_stack",{value:i});let c=e.stack;if(c){let d=c.split(` +`),h=[];for(let p=0;p0)for(u.length=Ar+Ct.length,f=0;fe.fn)),vc=[]}function sP(){if(ko>1e3){ko=0;try{_3()}catch(e){if(G&&It(e,"stack",{value:""}),Ao!==null)if(G)try{To(e,Ao,null,null)}catch(t){throw rP(),t}else To(e,Ao,null,null);else throw G&&rP(),e}}ko++}function oP(e){var t=e.length;if(t!==0){sP();var r=ii;ii=!0;try{for(var n=0;n1001)return;let e=Ga;Ga=[],oP(e),gc||(ko=0,Ao=null,G&&(vc=[]))}function wo(e){Nd===iP&&(gc||(gc=!0,queueMicrotask(M7))),Ao=e;for(var t=e;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024))return;t.f^=1024}}Ga.push(t)}function lP(e,t){var r=e.first,n=[];e:for(;r!==null;){var i=r.f,a=(i&32)!==0,s=a&&(i&1024)!==0,o=r.next;if(!s&&!(i&8192))if(i&8){if(a)r.f^=1024;else try{Hi(r)&&ja(r)}catch(f){To(f,r,null,r.ctx)}var l=r.first;if(l!==null){r=l;continue}}else i&4&&n.push(r);if(o===null){let f=r.parent;for(;f!==null;){if(e===f)break e;var c=f.next;if(c!==null){r=c;continue e}f=f.parent}}r=o}for(var u=0;u0||i.length>0)&&Co(),ko=0,Ao=null,G&&(vc=[]),n}finally{Nd=t,Ga=r}}function R(e){var f,d;var t=e.f,r=(t&2)!==0;if(r&&t&16384){var n=rv(e);return pc(e),n}if(fc!==null&&fc.add(e),de!==null){ln!==null&&ln.includes(e)&&T3();var i=de.deps;Ct===null&&i!==null&&i[Ar]===e?Ar++:Ct===null?Ct=[e]:Ct.push(e),ni!==null&&te!==null&&te.f&1024&&!(te.f&32)&&ni.includes(e)&&(Zt(te,2048),wo(te))}else if(r&&e.deps===null)for(var a=e,s=a.parent,o=a;s!==null;)if(s.f&2){var l=s;o=l,s=l.parent}else{var c=s;(f=c.deriveds)!=null&&f.includes(o)||((d=c.deriveds)!=null?d:c.deriveds=[]).push(o);break}if(r&&(a=e,Hi(a)&&nv(a)),G&&ti&&uc!==null&&de!==null&&uc.reaction===de){if(e.debug)e.debug();else if(e.created){var u=uc.entries.get(e);u===void 0&&(u={read:[]},uc.entries.set(e,u)),u.read.push(ri("TracedAt"))}}return e.v}function He(e){let t=de;try{return de=null,e()}finally{de=t}}var O7=-7169;function Zt(e,t){e.f=e.f&O7|t}function Ze(e,t=!1,r){pe={p:pe,c:null,e:null,m:!1,s:e,x:null,l:null},ei&&!t&&(pe.l={s:null,u:null,r1:[],r2:ht(!1)}),G&&(pe.function=r,Wr=r)}function Ke(e){var s,o;let t=pe;if(t!==null){e!==void 0&&(t.x=e);let l=t.e;if(l!==null){var r=te,n=de;t.e=null;try{for(var i=0;i{if(r!==void 0)return r;E3(t)},set:n=>{r=n}})}};e("$state"),e("$effect"),e("$derived"),e("$inspect"),e("$props"),e("$bindable")}g();var cP=new Map;function uP(e,t){var r=cP.get(e);r||(r=new Set,cP.set(e,r)),r.add(t)}g();g();g();g();g();g();function pv(e){ae&&Pt(e)!==null&&So(e)}var fP=!1;function mv(){fP||(fP=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(let r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function Hd(e){var t=de,r=te;Rt(null),ot(null);try{return e()}finally{Rt(t),ot(r)}}function gv(e,t,r,n=r){e.addEventListener(t,()=>Hd(r));let i=e.__on_r;i?e.__on_r=()=>{i(),n(!0)}:e.__on_r=()=>n(!0),mv()}var vv=new Set,Ud=new Set;function dP(e,t,r,n){function i(a){if(n.capture||Po.call(t,a),!a.cancelBubble)return Hd(()=>r.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?fr(()=>{t.addEventListener(e,i,n)}):t.addEventListener(e,i,n),i}function kr(e,t,r,n,i){var a={capture:n,passive:i},s=dP(e,t,r,a);(t===document.body||t===window||t===document)&&Xr(()=>{t.removeEventListener(e,s,a)})}function mt(e){for(var t=0;t{throw x});throw d}}finally{e.__root=t,delete e.currentTarget,Rt(u),ot(f)}}}g();var F7;function hP(){F7=void 0}g();g();function Gd(e){var t=document.createElement("template");return t.innerHTML=e,t.content}function In(e,t){var r=te;r.nodes_start===null&&(r.nodes_start=e,r.nodes_end=t)}function se(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,a=!e.startsWith("");return()=>{if(ae)return In(ue,null),ue;i===void 0&&(i=Gd(a?e:""+e),r||(i=Pt(i)));var s=n?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=Pt(s),l=s.lastChild;In(o,l)}else In(s,s);return s}}function si(){if(ae)return In(ue,null),ue;var e=document.createDocumentFragment(),t=document.createComment(""),r=qr();return e.append(t,r),In(t,r),e}function ne(e,t){if(ae){te.nodes_end=ue,Ft();return}e!==null&&e.before(t)}var zd=!0;function Oe(e,t){var n;var r=t==null?"":typeof t=="object"?t+"":t;r!==((n=e.__t)!=null?n:e.__t=e.nodeValue)&&(e.__t=r,e.nodeValue=r==null?"":r+"")}function Vi(e,t){return pP(e,t)}function wv(e,t){var s;Od(),t.intro=(s=t.intro)!=null?s:!1;let r=t.target,n=ae,i=ue;try{for(var a=Pt(r);a&&(a.nodeType!==8||a.data!==mo);)a=$t(a);if(!a)throw Ni;or(!0),tt(a),Ft();let o=pP(e,{...t,anchor:a});if(ue===null||ue.nodeType!==8||ue.data!==$a)throw bo(),Ni;return or(!1),o}catch(o){if(o===Ni)return t.recover===!1&&x3(),Od(),So(r),or(!1),Vi(e,t);throw o}finally{or(n),tt(i),hP()}}var Ro=new Map;function pP(e,{target:t,anchor:r,props:n={},events:i,context:a,intro:s=!0}){Od();var o=new Set,l=f=>{for(var d=0;d{var f=r!=null?r:t.appendChild(qr());return Nt(()=>{if(a){Ze({});var d=pe;d.c=a}i&&(n.$$events=i),ae&&In(f,null),zd=s,c=e(f,n)||{},zd=!0,ae&&(te.nodes_end=ue),a&&Ke()}),()=>{var p;for(var d of o){t.removeEventListener(d,Po);var h=Ro.get(d);--h===0?(document.removeEventListener(d,Po),Ro.delete(d)):Ro.set(d,h)}Ud.delete(l),f!==r&&((p=f.parentNode)==null||p.removeChild(f))}});return yv.set(c,u),c}var yv=new WeakMap;function oi(e,t){let r=yv.get(e);return r?(yv.delete(e),r(t)):(G&&F3(),Promise.resolve())}g();g();g();g();function ye(e,t,r=!1){ae&&Ft();var n=e,i=null,a=null,s=dt,o=r?65536:0,l=!1;let c=(f,d=!0)=>{l=!0,u(d,f)},u=(f,d)=>{if(s===(s=f))return;let h=!1;if(ae){let p=n.data===Fa;!!s===p&&(n=xo(),tt(n),or(!1),h=!0)}s?(i?zi(i):d&&(i=Nt(()=>d(n))),a&&un(a,()=>{a=null})):(a?zi(a):d&&(a=Nt(()=>d(n))),i&&un(i,()=>{i=null})),h&&or(!0)};ur(()=>{l=!1,t(c),l||u(null,null)},o),ae&&(n=ue)}g();g();g();var yc=null;function Tr(e,t){return t}function U7(e,t,r,n){for(var i=[],a=t.length,s=0;s0&&i.length===0&&r!==null;if(o){var l=r.parentNode;So(l),l.append(r),n.clear(),Wi(e,t[0].prev,t[a-1].next)}dv(i,()=>{for(var c=0;c{var d=r(),h=on(d)?d:d==null?[]:cc(d),p=h.length;if(f&&p===0)return;f=p===0;let m=!1;if(ae){var v=s.data===Fa;v!==(p===0)&&(s=xo(),tt(s),or(!1),m=!0)}if(ae){for(var y=null,b,x=0;x0&&tt(xo())}if(!ae){var k=de;G7(h,o,s,i,t,(k.f&8192)!==0,n,r)}a!==null&&(p===0?u?zi(u):u=Nt(()=>a(s)):u!==null&&un(u,()=>{u=null})),m&&or(!0),r()}),ae&&(s=ue)}function G7(e,t,r,n,i,a,s,o){var ee,fe,J,Q;var l=(i&8)!==0,c=(i&3)!==0,u=e.length,f=t.items,d=t.first,h=d,p,m=null,v,y=[],b=[],x,E,_,k;if(l)for(k=0;k0){var L=i&4&&u===0?r:null;if(l){for(k=0;k{var Pe;if(v!==void 0)for(_ of v)(Pe=_.a)==null||Pe.apply()}),te.first=t.first&&t.first.e,te.last=m&&m.e}function z7(e,t,r,n){n&1&&yo(e.v,t),n&2?yo(e.i,r):e.i=r}function vP(e,t,r,n,i,a,s,o,l,c){var u=yc,f=(l&1)!==0,d=(l&16)===0,h=f?d?Bi(i):ht(i):i,p=l&2?ht(s):s;G&&f&&(h.debug=()=>{var v=typeof p=="number"?s:p.v;c()[v]});var m={i:p,v:h,k:a,a:null,e:null,prev:r,next:n};yc=m;try{return m.e=Nt(()=>o(e,h,p),ae),m.e.prev=r&&r.e,m.e.next=n&&n.e,r===null?t.first=m:(r.next=m,r.e.next=m.e),n!==null&&(n.prev=m,n.e.prev=m.e),m}finally{yc=u}}function mP(e,t,r){for(var n=e.next?e.next.e.nodes_start:r,i=t?t.e.nodes_start:r,a=e.e.nodes_start;a!==n;){var s=$t(a);i.before(a),a=s}}function Wi(e,t,r){t===null?e.first=r:(t.next=r,t.e.next=r&&r.e),r!==null&&(r.prev=t,r.e.prev=t&&t.e)}g();g();g();g();g();g();function wt(e,t){fr(()=>{var i;var r=e.getRootNode(),n=r.host?r:(i=r.head)!=null?i:r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){let a=document.createElement("style");a.id=t.hash,a.textContent=t.code,n.appendChild(a),G&&uP(t.hash,a)}})}g();g();g();g();g();function me(e,t,r,n){var a;var i=(a=e.__attributes)!=null?a:e.__attributes={};if(ae&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")){n||X7(e,t,r!=null?r:"");return}i[t]!==(i[t]=r)&&(t==="style"&&"__styles"in e&&(e.__styles={}),t==="loading"&&(e[g3]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Y7(e).includes(t)?e[t]=r:e.setAttribute(t,r))}var wP=new Map;function Y7(e){var t=wP.get(e.nodeName);if(t)return t;wP.set(e.nodeName,t=[]);for(var r,n=e,i=Element.prototype;i!==n;){r=H0(n);for(var a in r)r[a].set&&t.push(a);n=La(n)}return t}function X7(e,t,r){var n;G&&(t==="srcset"&&Z7(e,r)||xv((n=e.getAttribute(t))!=null?n:"",r)||I3(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(r)))}function xv(e,t){return e===t?!0:new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function bP(e){return e.split(",").map(t=>t.trim().split(" ").filter(Boolean))}function Z7(e,t){var r=bP(e.srcset),n=bP(t);return n.length===r.length&&n.every(([i,a],s)=>a===r[s][1]&&(xv(r[s][0],i)||xv(i,r[s][0])))}g();function lt(e,t,r){if(r){if(e.classList.contains(t))return;e.classList.add(t)}else{if(!e.classList.contains(t))return;e.classList.remove(t)}}g();g();g();g();var K7=Ed?()=>performance.now():()=>Date.now(),fn={tick:e=>(Ed?requestAnimationFrame:xr)(e),now:()=>K7(),tasks:new Set};function _P(){let e=fn.now();fn.tasks.forEach(t=>{t.c(e)||(fn.tasks.delete(t),t.f())}),fn.tasks.size!==0&&fn.tick(_P)}function xP(e){let t;return fn.tasks.size===0&&fn.tick(_P),{promise:new Promise(r=>{fn.tasks.add(t={c:e,f:r})}),abort(){fn.tasks.delete(t)}}}function Vd(e,t){e.dispatchEvent(new CustomEvent(t))}function t9(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;let t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function SP(e){let t={},r=e.split(";");for(let n of r){let[i,a]=n.split(":");if(!i||a===void 0)break;let s=t9(i.trim());t[s]=a.trim()}return t}var r9=e=>e;function dn(e,t,r,n){var b;var i=(e&1)!==0,a=(e&2)!==0,s=i&&a,o=(e&4)!==0,l=s?"both":i?"in":"out",c,u=t.inert,f,d;function h(){var _;var x=de,E=te;Rt(null),ot(null);try{return c!=null?c:c=r()(t,(_=n==null?void 0:n())!=null?_:{},{direction:l})}finally{Rt(x),ot(E)}}var p={is_global:o,in(){var x;if(t.inert=u,!i){d==null||d.abort(),(x=d==null?void 0:d.reset)==null||x.call(d);return}a||f==null||f.abort(),Vd(t,"introstart"),f=Sv(t,h(),d,1,()=>{Vd(t,"introend"),f==null||f.abort(),f=c=void 0})},out(x){if(!a){x==null||x(),c=void 0;return}t.inert=!0,Vd(t,"outrostart"),d=Sv(t,h(),f,0,()=>{Vd(t,"outroend"),x==null||x()})},stop:()=>{f==null||f.abort(),d==null||d.abort()}},m=te;if(((b=m.transitions)!=null?b:m.transitions=[]).push(p),i&&zd){var v=o;if(!v){for(var y=m.parent;y&&y.f&65536;)for(;(y=y.parent)&&!(y.f&16););v=!y||(y.f&32768)!==0}v&&Er(()=>{He(()=>p.in())})}}function Sv(e,t,r,n,i){var a=n===1;if(G0(t)){var s,o=!1;return fr(()=>{if(!o){var v=t({direction:a?"in":"out"});s=Sv(e,v,r,n,i)}}),{abort:()=>{o=!0,s==null||s.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(r==null||r.deactivate(),!(t!=null&&t.duration))return i(),{abort:xr,deactivate:xr,reset:xr,t:()=>n};let{delay:l=0,css:c,tick:u,easing:f=r9}=t;var d=[];if(a&&r===void 0&&(u&&u(0,1),c)){var h=SP(c(0,1));d.push(h,h)}var p=()=>1-n,m=e.animate(d,{duration:l});return m.onfinish=()=>{var A;var v=(A=r==null?void 0:r.t())!=null?A:1-n;r==null||r.abort();var y=n-v,b=t.duration*Math.abs(y),x=[];if(b>0){if(c)for(var E=Math.ceil(b/16.666666666666668),_=0;_<=E;_+=1){var k=v+y*f(_/E),w=c(k,1-k);x.push(SP(w))}p=()=>{var S=m.currentTime;return v+y*f(S/b)},u&&xP(()=>{if(m.playState!=="running")return!1;var S=p();return u(S,1-S),!0})}m=e.animate(x,{duration:b,fill:"forwards"}),m.onfinish=()=>{p=()=>n,u==null||u(n,1-n),i()}},{abort:()=>{m&&(m.cancel(),m.effect=null,m.onfinish=xr)},deactivate:()=>{i=xr},reset:()=>{n===0&&(u==null||u(1,0))},t:()=>p()}}g();g();function kv(e,t,r=t){var n=ji();gv(e,"input",i=>{G&&e.type==="checkbox"&&V0();var a=i?e.defaultValue:e.value;if(a=Ev(e)?Av(a):a,r(a),n&&a!==(a=t())){var s=e.selectionStart,o=e.selectionEnd;e.value=a!=null?a:"",o!==null&&(e.selectionStart=s,e.selectionEnd=Math.min(o,e.value.length))}}),(ae&&e.defaultValue!==e.value||He(t)==null&&e.value)&&r(Ev(e)?Av(e.value):e.value),lr(()=>{G&&e.type==="checkbox"&&V0();var i=t();Ev(e)&&i===Av(e.value)||e.type==="date"&&!i&&!e.value||i!==e.value&&(e.value=i!=null?i:"")})}function Ev(e){var t=e.type;return t==="number"||t==="range"}function Av(e){return e===""?null:+e}g();g();g();g();g();g();function EP(e,t){return e===t||(e==null?void 0:e[Sr])===t}function Ue(e={},t,r,n){return Er(()=>{var i,a;return lr(()=>{i=a,a=(n==null?void 0:n())||[],He(()=>{e!==r(...a)&&(t(e,...a),i&&EP(r(...i),e)&&t(null,...i))})}),()=>{fr(()=>{a&&EP(r(...a),e)&&t(null,...a)})}}),e}g();g();g();g();g();g();g();g();g();function Tv(e){pe===null&&mc("onMount"),ei&&pe.l!==null?c9(pe).m.push(e):Dt(()=>{let t=He(e);if(typeof t=="function")return t})}function AP(e){pe===null&&mc("onDestroy"),Tv(()=>()=>He(e))}function c9(e){var r;var t=e.l;return(r=t.u)!=null?r:t.u={a:[],b:[],m:[]}}var qd=!1;function Cv(e){var t=qd;try{return qd=!1,[e(),qd]}finally{qd=t}}function kP(e){for(var t=te,r=te;t!==null&&!(t.f&96);)t=t.parent;try{return ot(t),e()}finally{ot(r)}}function Fn(e,t,r,n){var w,A;var i=(r&1)!==0,a=!ei||(r&2)!==0,s=(r&8)!==0,o=(r&16)!==0,l=!1,c;s?[c,l]=Cv(()=>e[t]):c=e[t];var u=Sr in e||kd in e,f=(A=(w=Ur(e,t))==null?void 0:w.set)!=null?A:u&&s&&t in e?S=>e[t]=S:void 0,d=n,h=!0,p=!1,m=()=>(p=!0,h&&(h=!1,o?d=He(n):d=n),d);c===void 0&&n!==void 0&&(f&&a&&S3(t),c=m(),f&&f(c));var v;if(a)v=()=>{var S=e[t];return S===void 0?m():(h=!0,p=!1,S)};else{var y=kP(()=>(i?Xe:tv)(()=>e[t]));y.f|=131072,v=()=>{var S=R(y);return S!==void 0&&(d=void 0),S===void 0?d:S}}if(!(r&4))return v;if(f){var b=e.$$legacy;return function(S,T){return arguments.length>0?((!a||!T||b||l)&&f(T?v():S),S):v()}}var x=!1,E=!1,_=Bi(c),k=kP(()=>Xe(()=>{var S=v(),T=R(_);return x?(x=!1,E=!0,T):(E=!1,_.v=S)}));return i||(k.equals=go),function(S,T){if(fc!==null&&(x=E,v(),R(_)),arguments.length>0){let P=T?R(k):a&&s?_e(S):S;return k.equals(P)||(x=!0,re(_,P),p&&d!==void 0&&(d=P),He(()=>R(k))),S}return R(k)}}g();g();g();g();function TP(e){return new Pv(e)}var li,Zr,Pv=class{constructor(t){Tc(this,li);Tc(this,Zr);var a,s;var r=new Map,n=(o,l)=>{var c=Bi(l);return r.set(o,c),c};let i=new Proxy({...t.props||{},$$events:{}},{get(o,l){var c;return R((c=r.get(l))!=null?c:n(l,Reflect.get(o,l)))},has(o,l){var c;return l===kd?!0:(R((c=r.get(l))!=null?c:n(l,Reflect.get(o,l))),Reflect.has(o,l))},set(o,l,c){var u;return re((u=r.get(l))!=null?u:n(l,c),c),Reflect.set(o,l,c)}});Cc(this,Zr,(t.hydrate?wv:Vi)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:(a=t.intro)!=null?a:!1,recover:t.recover})),(!((s=t==null?void 0:t.props)!=null&&s.$$host)||t.sync===!1)&&Co(),Cc(this,li,i.$$events);for(let o of Object.keys(Ht(this,Zr)))o==="$set"||o==="$destroy"||o==="$on"||It(this,o,{get(){return Ht(this,Zr)[o]},set(l){Ht(this,Zr)[o]=l},enumerable:!0});Ht(this,Zr).$set=o=>{Object.assign(i,o)},Ht(this,Zr).$destroy=()=>{oi(Ht(this,Zr))}}$set(t){Ht(this,Zr).$set(t)}$on(t,r){Ht(this,li)[t]=Ht(this,li)[t]||[];let n=(...i)=>r.call(this,...i);return Ht(this,li)[t].push(n),()=>{Ht(this,li)[t]=Ht(this,li)[t].filter(i=>i!==n)}}$destroy(){Ht(this,Zr).$destroy()}};li=new WeakMap,Zr=new WeakMap;var x9;typeof HTMLElement=="function"&&(x9=class extends HTMLElement{constructor(t,r,n){super();Pr(this,"$$ctor");Pr(this,"$$s");Pr(this,"$$c");Pr(this,"$$cn",!1);Pr(this,"$$d",{});Pr(this,"$$r",!1);Pr(this,"$$p_d",{});Pr(this,"$$l",{});Pr(this,"$$l_u",new Map);Pr(this,"$$me");this.$$ctor=t,this.$$s=r,n&&this.attachShadow({mode:"open"})}addEventListener(t,r,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(r),this.$$c){let i=this.$$c.$on(t,r);this.$$l_u.set(r,i)}super.addEventListener(t,r,n)}removeEventListener(t,r,n){if(super.removeEventListener(t,r,n),this.$$c){let i=this.$$l_u.get(r);i&&(i(),this.$$l_u.delete(r))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(i){return a=>{let s=document.createElement("slot");i!=="default"&&(s.name=i),ne(a,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let r={},n=S9(this);for(let i of this.$$s)i in n&&(i==="default"&&!this.$$d.children?(this.$$d.children=t(i),r.default=!0):r[i]=t(i));for(let i of this.attributes){let a=this.$$g_p(i.name);a in this.$$d||(this.$$d[a]=Rv(a,i.value,this.$$p_d,"toProp"))}for(let i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=TP({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:r,$$host:this}}),this.$$me=ov(()=>{lr(()=>{var i;this.$$r=!0;for(let a of j0(this.$$c)){if(!((i=this.$$p_d[a])!=null&&i.reflect))continue;this.$$d[a]=this.$$c[a];let s=Rv(a,this.$$d[a],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[a].attribute||a):this.setAttribute(this.$$p_d[a].attribute||a,s)}this.$$r=!1})});for(let i in this.$$l)for(let a of this.$$l[i]){let s=this.$$c.$on(i,a);this.$$l_u.set(a,s)}this.$$l={}}}attributeChangedCallback(t,r,n){var i;this.$$r||(t=this.$$g_p(t),this.$$d[t]=Rv(t,n,this.$$p_d,"toProp"),(i=this.$$c)==null||i.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return j0(this.$$p_d).find(r=>this.$$p_d[r].attribute===t||!this.$$p_d[r].attribute&&r.toLowerCase()===t)||t}});function Rv(e,t,r,n){var a;let i=(a=r[e])==null?void 0:a.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function S9(e){let t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}g();g();g();function Mo(e,t,r,n){function i(a){return a instanceof r?a:new r(function(s){s(a)})}return new(r||(r=Promise))(function(a,s){function o(u){try{c(n.next(u))}catch(f){s(f)}}function l(u){try{c(n.throw(u))}catch(f){s(f)}}function c(u){u.done?a(u.value):i(u.value).then(o,l)}c((n=n.apply(e,t||[])).next())})}var Iv=require("obsidian");g();var Mv=require("obsidian");g();function A9(e){let t=e-1;return t*t*t+1}function Ln(e,{delay:t=0,duration:r=400,easing:n=A9,axis:i="y"}={}){let a=getComputedStyle(e),s=+a.opacity,o=i==="y"?"height":"width",l=parseFloat(a[o]),c=i==="y"?["top","bottom"]:["left","right"],u=c.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),f=parseFloat(a[`padding${u[0]}`]),d=parseFloat(a[`padding${u[1]}`]),h=parseFloat(a[`margin${u[0]}`]),p=parseFloat(a[`margin${u[1]}`]),m=parseFloat(a[`border${u[0]}Width`]),v=parseFloat(a[`border${u[1]}Width`]);return{delay:t,duration:r,easing:n,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*s};${o}: ${y*l}px;padding-${c[0]}: ${y*f}px;padding-${c[1]}: ${y*d}px;margin-${c[0]}: ${y*h}px;margin-${c[1]}: ${y*p}px;border-${c[0]}-width: ${y*m}px;border-${c[1]}-width: ${y*v}px;`}}g();var Yd=require("obsidian");var k9=se('
'),T9=se('
'),C9={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function wc(e,t){Ze(t,!0),wt(e,C9);let r=_e([]),n=Xe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");Dt(()=>{for(let y of r)y&&(0,Yd.setIcon)(y,y.getAttr("data-icon"))});function i(y){y.stopPropagation(),Ws(t.diff.path)?a(y):s(y)}function a(y){var b;y.stopPropagation();let x=t.view.app.vault.getAbstractFileByPath(t.diff.vaultPath);x instanceof Yd.TFile&&((b=nn(t.view.app,y))===null||b===void 0||b.openFile(x).catch(E=>t.view.plugin.displayError(E)))}function s(y){var b;t.view.plugin.tools.openDiff({event:y,aFile:(b=t.diff.fromPath)!==null&&b!==void 0?b:t.diff.path,aRef:`${t.diff.hash}^`,bFile:t.diff.path,bRef:t.diff.hash})}var o=T9();o.__click=i;var l=j(o),c=j(l),u=j(c,!0);Ae(()=>Oe(u,Cn(t.diff.vaultPath))),B(c);var f=Z(c,2),d=j(f),h=j(d);{var p=y=>{var b=k9();b.__click=a,Ue(b,x=>r[0]=x,()=>r==null?void 0:r[0]),kr("auxclick",b,a),ne(y,b)};ye(h,y=>{qs(t.diff.vaultPath,t.view.app)&&y(p)})}B(d);var m=Z(d,2),v=j(m,!0);B(m),B(f),B(l),B(o),Ae(()=>{me(l,"data-path",t.diff.vaultPath),me(l,"data-tooltip-position",R(n)),me(l,"aria-label",t.diff.vaultPath),me(m,"data-type",t.diff.status),Oe(v,t.diff.status)}),kr("auxclick",o,y=>{y.stopPropagation(),y.button==2?Tn(t.view.app,y,t.diff.vaultPath,t.view.leaf,"git-history"):i(y)}),ne(e,o),Ke()}mt(["click"]);g();var P9=se("
"),R9=(e,t,r)=>t(R(r)),M9=se(''),O9=se(''),I9=se('
'),F9={hash:"svelte-1lnl15d",code:"main.svelte-1lnl15d .nav-folder-title-content:where(.svelte-1lnl15d) {display:flex;align-items:center;}"};function bc(e,t){Ze(t,!0),wt(e,F9);let r=Fn(t,"topLevel",3,!1),n=_e({}),i=Xe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");function a(o){n[o.title]=!n[o.title]}var s=I9();Cr(s,21,()=>t.hierarchy.children,Tr,(o,l)=>{var c=si(),u=cr(c);{var f=h=>{var p=P9(),m=j(p);wc(m,{get diff(){return R(l).data},get view(){return t.view}}),B(p),ne(h,p)},d=h=>{var p=O9(),m=j(p);m.__click=[R9,a,l];var v=Z(j(m),2),y=Z(v,2),b=j(y,!0);B(y),B(m);var x=Z(m,2);{var E=_=>{var k=M9(),w=j(k);bc(w,{get hierarchy(){return R(l)},get plugin(){return t.plugin},get view(){return t.view}}),B(k),dn(3,k,()=>Ln,()=>({duration:150})),ne(_,k)};ye(x,_=>{n[R(l).title]||_(E)})}B(p),Ae(()=>{lt(p,"is-collapsed",n[R(l).title]),me(m,"data-tooltip-position",R(i)),me(m,"aria-label",R(l).vaultPath),lt(v,"is-collapsed",n[R(l).title]),Oe(b,R(l).title)}),ne(h,p)};ye(u,h=>{R(l).data?h(f):h(d,!1)})}ne(o,c)}),B(s),Ae(()=>lt(s,"topLevel",r())),ne(e,s),Ke()}mt(["click"]);var $9=(e,t)=>re(t,!R(t)),L9=se('
'),D9=se('
'),N9=se('
'),B9=se(''),j9=se('
'),H9={hash:"svelte-45h",code:""};function Ov(e,t){Ze(t,!0),wt(e,H9);let r=Xe(()=>({title:"",path:"",vaultPath:"",children:t.plugin.gitManager.getTreeStructure(t.log.diff.files)})),n=Xe(()=>t.view.leaf.getRoot().side=="left"?"right":"left"),i=pt(!0);function a(_){let k=_.author.name;if(t.plugin.settings.authorInHistoryView=="full")return k;if(t.plugin.settings.authorInHistoryView=="initials")return k.split(" ").filter(A=>A.length>0).map(A=>A[0].toUpperCase()).join("")}var s=j9(),o=j(s),l=j(o);Ae(()=>{var _;return me(l,"aria-label",`${t.log.refs.length>0?t.log.refs.join(", ")+` `:""}${(_=t.log.author)==null?void 0:_.name} -${(0,wv.moment)(t.log.date).format(t.plugin.settings.commitDateFormat)} -${t.log.message}`)}),c.__click=[d9,i];var l=H(c),u=Z(l,2),f=H(u);{var d=_=>{var k=h9(),w=H(k,!0);xe(()=>Oe(w,t.log.refs.join(", "))),B(k),ne(_,k)};ge(f,_=>{t.log.refs.length>0&&_(d)})}var h=Z(f,2);{var p=_=>{var k=p9(),w=H(k,!0);xe(()=>Oe(w,a(t.log))),B(k),ne(_,k)};ge(h,_=>{var k;t.plugin.settings.authorInHistoryView!="hide"&&((k=t.log.author)!=null&&k.name)&&_(p)})}var m=Z(h,2);{var v=_=>{var k=m9(),w=H(k,!0);xe(()=>Oe(w,(0,wv.moment)(t.log.date).format(t.plugin.settings.commitDateFormat))),B(k),ne(_,k)};ge(m,_=>{t.plugin.settings.dateInHistoryView&&_(v)})}var y=Z(m,2),b=H(y,!0);B(y),B(u),B(c);var x=Z(c,2);{var E=_=>{var k=g9(),w=H(k);{var A=T=>{gc(T,{get hierarchy(){return R(r)},get plugin(){return t.plugin},get view(){return t.view},topLevel:!0})},S=T=>{var P=ii(),O=cr(P);Tr(O,17,()=>t.log.diff.files,kr,(j,D)=>{mc(j,{get view(){return t.view},get diff(){return R(D)}})}),ne(T,P)};ge(w,T=>{t.showTree?T(A):T(S,!1)})}B(k),fn(3,k,()=>In,()=>({duration:150})),ne(_,k)};ge(x,_=>{R(i)||_(E)})}B(o),B(s),xe(()=>{at(o,"is-collapsed",R(i)),pe(c,"data-tooltip-position",R(n)),at(l,"is-collapsed",R(i)),Oe(b,t.log.message)}),ne(e,s),Ze()}dt(["click"]);function w9(e,t){t().catch(console.error)}var b9=(e,t,r,n)=>{re(t,!R(t)),(0,_v.setIcon)(r[0],R(t)?"list":"folder"),n(n().settings.treeStructure=R(t),!0),n().saveSettings()},_9=se(''),x9=se('
'),S9={hash:"svelte-45h",code:""};function xv(e,t){Xe(t,!0),gt(e,S9);let r=si(t,"plugin",15),n=ft(!1),i=be([]),a=ft(void 0),s=ft(be(r().settings.treeStructure)),o,c;$t(()=>{c&&c.empty()}),o=t.view.app.workspace.on("obsidian-git:head-change",()=>void l().catch(console.error)),$t(()=>{i.forEach(x=>(0,_v.setIcon)(x,x.getAttr("data-icon")))}),G3(()=>{t.view.app.workspace.offref(o)}),mv(()=>{let x=new IntersectionObserver(_=>{_[0].isIntersecting&&!R(n)&&u().catch(console.error)}),E=document.querySelector("#sentinel");return E&&x.observe(E),()=>{x.disconnect()}}),l().catch(console.error);function l(){return bo(this,void 0,void 0,function*(){var x;if(!r().gitReady){re(a,void 0);return}re(n,!0);let E=r().gitManager instanceof Te,_;((x=R(a)===null||R(a)===void 0?void 0:R(a).length)!==null&&x!==void 0?x:0)==0?_=E?50:10:_=R(a).length,re(a,be(yield r().gitManager.log(void 0,!1,_))),re(n,!1)})}function u(){return bo(this,void 0,void 0,function*(){var x;if(!r().gitReady||R(a)===void 0)return;re(n,!0);let _=r().gitManager instanceof Te?50:10,k=yield r().gitManager.log(void 0,!1,_,(x=R(a).last())===null||x===void 0?void 0:x.hash);R(a).push(...k.slice(1)),re(n,!1)})}var f=x9(),d=H(f),h=H(d),p=H(h);p.__click=[b9,s,i,r],Ge(p,x=>i[0]=x,()=>i==null?void 0:i[0]);var m=Z(p,2);m.__click=[w9,l],Ge(m,x=>i[1]=x,()=>i==null?void 0:i[1]),B(h),B(d);var v=Z(d,2),y=H(v);{var b=x=>{var E=_9();Tr(E,21,()=>R(a),kr,(_,k)=>{bv(_,{get view(){return t.view},get showTree(){return R(s)},get log(){return R(k)},get plugin(){return r()}})}),B(E),ne(x,E)};ge(y,x=>{R(a)&&x(b)})}B(v),co(4),B(f),xe(()=>{pe(p,"data-icon",R(s)?"list":"folder"),at(m,"loading",R(n))}),ne(e,f),Ze()}dt(["click"]);var vc=class extends W3.ItemView{constructor(t,r){super(t),this.plugin=r,this.hoverPopover=null}getViewType(){return $r.type}getDisplayText(){return $r.name}getIcon(){return $r.icon}onClose(){return this._view&&ai(this._view),super.onClose()}reload(){this._view&&ai(this._view),this._view=zi(xv,{target:this.contentEl,props:{plugin:this.plugin,view:this}})}onOpen(){return this.reload(),super.onOpen()}};g();var q3=require("obsidian"),Hd=class extends q3.FuzzySuggestModal{constructor(r,n){super(r.app);this.branches=n;this.setPlaceholder("Select branch to checkout")}getItems(){return this.branches}getItemText(r){return r}onChooseItem(r,n){this.resolve(r)}openAndGetReslt(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}};g();var Q3=require("obsidian");g();var Ec=require("obsidian");g();var Y3=require("obsidian"),Wi=class extends Y3.Modal{constructor(r,n,i){super(r);this.deletion=n;this.filename=i;this.resolve=null}myOpen(){return this.open(),new Promise(r=>{this.resolve=r})}onOpen(){let{contentEl:r,titleEl:n}=this;n.setText(`${this.deletion?"Delete":"Discard"} this file?`),r.createEl("p").setText(`Do you really want to ${this.deletion?"delete":"discard the changes of"} "${this.filename}"`);let i=r.createDiv({cls:"modal-button-container"}),a=i.createEl("button",{cls:"mod-warning",text:this.deletion?"Delete":"Discard"});a.addEventListener("click",()=>{this.resolve&&this.resolve(!0),this.close()}),a.addEventListener("keypress",()=>{this.resolve&&this.resolve(!0),this.close()});let s=i.createEl("button",{text:"Cancel"});s.addEventListener("click",()=>(this.resolve&&this.resolve(!1),this.close())),s.addEventListener("keypress",()=>(this.resolve&&this.resolve(!1),this.close()))}onClose(){let{contentEl:r}=this;r.empty()}};g();var wc=require("obsidian");g();g();var E9=ze(X3()),qi=require("obsidian");function Na(e,t,r){let n=e.target;app.workspace.trigger("hover-link",{event:e,source:t.getViewType(),hoverParent:t,targetEl:n,linktext:r})}function A9(e,t){t.view.app.vault.getAbstractFileByPath(t.change.vaultPath)&&Na(e,t.view,t.change.vaultPath)}function k9(e,t){e.stopPropagation(),t.manager.stage(t.change.path,!1).catch(r=>t.view.plugin.displayError(r)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}function T9(e,t){e.stopPropagation();let r=t.change.workingDir=="U";new Wi(t.view.app,r,t.change.vaultPath).myOpen().then(n=>{if(n===!0)return r?t.view.app.vault.adapter.remove(t.change.vaultPath).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")}):t.manager.discard(t.change.path).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})},n=>t.view.plugin.displayError(n))}var C9=se('
'),P9=se('
'),R9={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function bc(e,t){Xe(t,!0),gt(e,R9);let r=be([]),n=Ye(()=>t.view.leaf.getRoot().side=="left"?"right":"left");$t(()=>{for(let x of r)x&&(0,wc.setIcon)(x,x.getAttr("data-icon"))});function i(x){x.stopPropagation(),zs(t.change.path)?a(x):s(x)}function a(x){var E;x.stopPropagation();let _=t.view.app.vault.getAbstractFileByPath(t.change.vaultPath);_ instanceof wc.TFile&&((E=rn(t.view.app,x))===null||E===void 0||E.openFile(_).catch(k=>t.view.plugin.displayError(k)))}function s(x){x.stopPropagation(),t.view.plugin.tools.openDiff({aFile:t.change.path,aRef:"",event:x})}var o=P9();o.__mouseover=[A9,t],o.__click=i;var c=H(o),l=H(c),u=H(l,!0);xe(()=>Oe(u,Tn(t.change.vaultPath))),B(l);var f=Z(l,2),d=H(f),h=H(d);{var p=x=>{var E=C9();E.__click=a,Ge(E,_=>r[0]=_,()=>r==null?void 0:r[0]),Ar("auxclick",E,a),ne(x,E)};ge(h,x=>{t.view.app.vault.getAbstractFileByPath(t.change.vaultPath)instanceof wc.TFile&&x(p)})}var m=Z(h,2);m.__click=[T9,t],Ge(m,x=>r[1]=x,()=>r==null?void 0:r[1]);var v=Z(m,2);v.__click=[k9,t],Ge(v,x=>r[2]=x,()=>r==null?void 0:r[2]),B(d);var y=Z(d,2),b=H(y,!0);B(y),B(f),B(c),B(o),xe(()=>{pe(c,"data-path",t.change.vaultPath),pe(c,"data-tooltip-position",R(n)),pe(c,"aria-label",t.change.vaultPath),pe(y,"data-type",t.change.workingDir),Oe(b,t.change.workingDir)}),Ar("auxclick",o,x=>{x.stopPropagation(),x.button==2?kn(t.view.app,x,t.change.vaultPath,t.view.leaf,"git-source-control"):i(x)}),ne(e,o),Ze()}dt(["mouseover","click"]);g();var Z3=require("obsidian");function M9(e,t){t.view.app.vault.getAbstractFileByPath(t.change.vaultPath)&&Na(e,t.view,t.change.vaultPath)}var O9=se('
'),I9={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function _c(e,t){Xe(t,!0),gt(e,I9);let r=Ye(()=>t.view.leaf.getRoot().side=="left"?"right":"left");function n(f){var d;f.stopPropagation();let h=t.view.app.vault.getAbstractFileByPath(t.change.vaultPath);h instanceof Z3.TFile&&((d=rn(t.view.app,f))===null||d===void 0||d.openFile(h).catch(p=>t.view.plugin.displayError(p)))}var i=O9();i.__mouseover=[M9,t],i.__click=n;var a=H(i),s=H(a),o=H(s,!0);xe(()=>Oe(o,Tn(t.change.vaultPath))),B(s);var c=Z(s,2),l=H(c),u=H(l,!0);B(l),B(c),B(a),B(i),xe(()=>{pe(a,"data-path",t.change.vaultPath),pe(a,"data-tooltip-position",R(r)),pe(a,"aria-label",t.change.vaultPath),pe(l,"data-type",t.change.workingDir),Oe(u,t.change.workingDir)}),Ar("auxclick",i,f=>{f.stopPropagation(),f.button==2?kn(t.view.app,f,t.change.vaultPath,t.view.leaf,"git-source-control"):n(f)}),ne(e,i),Ze()}dt(["mouseover","click"]);g();var xc=require("obsidian");function F9(e,t){t.view.app.vault.getFileByPath(t.change.vaultPath)&&Na(e,t.view,t.change.vaultPath)}function $9(e,t){e.stopPropagation(),t.manager.unstage(t.change.path,!1).catch(r=>t.view.plugin.displayError(r)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}var L9=se('
'),D9=se('
'),N9={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function Sc(e,t){Xe(t,!0),gt(e,N9);let r=be([]),n=Ye(()=>t.view.leaf.getRoot().side=="left"?"right":"left");$t(()=>{for(let b of r)b&&(0,xc.setIcon)(b,b.getAttr("data-icon"))});function i(b){b.stopPropagation(),zs(t.change.path)?a(b):s(b)}function a(b){var x;b.stopPropagation();let E=t.view.app.vault.getAbstractFileByPath(t.change.vaultPath);E instanceof xc.TFile&&((x=rn(t.view.app,b))===null||x===void 0||x.openFile(E).catch(_=>t.view.plugin.displayError(_)))}function s(b){b.stopPropagation(),t.view.plugin.tools.openDiff({aFile:t.change.path,aRef:"HEAD",bRef:"",event:b})}var o=D9();o.__mouseover=[F9,t],o.__click=i;var c=H(o),l=H(c),u=H(l,!0);xe(()=>Oe(u,Tn(t.change.vaultPath))),B(l);var f=Z(l,2),d=H(f),h=H(d);{var p=b=>{var x=L9();x.__click=a,Ge(x,E=>r[0]=E,()=>r==null?void 0:r[0]),ne(b,x)};ge(h,b=>{t.view.app.vault.getAbstractFileByPath(t.change.vaultPath)instanceof xc.TFile&&b(p)})}var m=Z(h,2);m.__click=[$9,t],Ge(m,b=>r[1]=b,()=>r==null?void 0:r[1]),B(d);var v=Z(d,2),y=H(v,!0);B(v),B(f),B(c),B(o),xe(()=>{pe(c,"data-path",t.change.vaultPath),pe(c,"data-tooltip-position",R(n)),pe(c,"aria-label",t.change.vaultPath),pe(v,"data-type",t.change.index),Oe(y,t.change.index)}),Ar("auxclick",o,b=>{b.stopPropagation(),b.button==2?kn(t.view.app,b,t.change.vaultPath,t.view.leaf,"git-source-control"):i(b)}),ne(e,o),Ze()}dt(["mouseover","click"]);g();g();var j9=se(''),B9=se("
");function ja(e,t){Xe(t,!0);var r=B9(),n=H(r);{var i=a=>{var s=j9(),o=H(s),c=H(o),l=H(c,!0);B(c),B(o),B(s),xe(()=>{pe(o,"aria-label","And "+(t.files.length-500)+" more files"),Oe(l,"And "+(t.files.length-500)+" more files")}),ne(a,s)};ge(n,a=>{t.files.length>500&&a(i)})}B(r),ne(e,r),Ze()}var U9=se("
"),G9=(e,t,r)=>t(R(r)),z9=(e,t,r)=>t(e,R(r).path),V9=se('
'),W9=(e,t,r)=>t(e,R(r)),q9=(e,t,r)=>t(e,R(r).path),Y9=se('
',1),X9=se(''),Z9=se(''),K9=se('
'),J9={hash:"svelte-hup5mn",code:"main.svelte-hup5mn .nav-folder-title:where(.svelte-hup5mn) {align-items:center;}"};function Ba(e,t){Xe(t,!0),gt(e,J9);var r,n;let i=si(t,"topLevel",3,!1),a=be({});for(let p of t.hierarchy.children)a[p.title]=((n=(r=p.children)===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0)>100;let s=Ye(()=>t.view.leaf.getRoot().side=="left"?"right":"left");function o(p,m){p.stopPropagation(),t.plugin.gitManager.stageAll({dir:m}).catch(v=>t.plugin.displayError(v)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}function c(p,m){p.stopPropagation(),t.plugin.gitManager.unstageAll({dir:m}).catch(v=>t.plugin.displayError(v)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}function l(p,m){p.stopPropagation(),new Wi(t.view.app,!1,m.vaultPath).myOpen().then(v=>{if(v===!0)return t.plugin.gitManager.discardAll({dir:m.path,status:t.plugin.cachedStatus}).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})},v=>t.plugin.displayError(v))}function u(p){a[p.title]=!a[p.title]}var f=K9(),d=H(f);Tr(d,17,()=>zl(t.hierarchy.children,500),kr,(p,m)=>{var v=ii(),y=cr(v);{var b=E=>{var _=U9(),k=H(_);{var w=S=>{Sc(S,{get change(){return R(m).data},get manager(){return t.plugin.gitManager},get view(){return t.view}})},A=S=>{var T=ii(),P=cr(T);{var O=D=>{bc(D,{get change(){return R(m).data},get manager(){return t.plugin.gitManager},get view(){return t.view}})},j=D=>{var Q=ii(),de=cr(Q);{var ee=J=>{_c(J,{get change(){return R(m).data},get view(){return t.view}})};ge(de,J=>{t.fileType==2&&J(ee)},!0)}ne(D,Q)};ge(P,D=>{t.fileType==1?D(O):D(j,!1)},!0)}ne(S,T)};ge(k,S=>{t.fileType==0?S(w):S(A,!1)})}B(_),ne(E,_)},x=E=>{var _=Z9();_.__click=[G9,u,m];var k=H(_),w=Z(H(k),2),A=Z(w,2),S=H(A,!0);B(A);var T=Z(A,2),P=H(T),O=H(P);{var j=ee=>{var J=V9();J.__click=[z9,c,m],ne(ee,J)},D=ee=>{var J=Y9(),Pe=cr(J);Pe.__click=[W9,l,m];var me=Z(Pe,2);me.__click=[q9,o,m],ne(ee,J)};ge(O,ee=>{t.fileType==0?ee(j):ee(D,!1)})}co(2),B(P),B(T),B(k);var Q=Z(k,2);{var de=ee=>{var J=X9(),Pe=H(J);Ba(Pe,{get hierarchy(){return R(m)},get plugin(){return t.plugin},get view(){return t.view},get fileType(){return t.fileType}}),B(J),fn(3,J,()=>In,()=>({duration:150})),ne(ee,J)};ge(Q,ee=>{a[R(m).title]||ee(de)})}B(_),xe(()=>{at(_,"is-collapsed",a[R(m).title]),pe(k,"data-tooltip-position",R(s)),pe(k,"aria-label",R(m).vaultPath),at(w,"is-collapsed",a[R(m).title]),Oe(S,R(m).title)}),Ar("auxclick",_,ee=>kn(t.view.app,ee,R(m).vaultPath,t.view.leaf,"git-source-control")),ne(E,_)};ge(y,E=>{R(m).data?E(b):E(x,!1)})}ne(p,v)});var h=Z(d,2);ja(h,{get files(){return t.hierarchy.children}}),B(f),xe(()=>at(f,"topLevel",i())),ne(e,f),Ze()}dt(["click"]);function Q9(e,t,r,n,i,a){return bo(this,void 0,void 0,function*(){if(re(t,!0),R(r)){if(yield n().tools.hasTooBigFiles(R(r).staged))return n().setPluginState({gitAction:0}),!1;n().promiseQueue.addTask(()=>n().gitManager.commit({message:R(i)}).then(()=>re(i,be(n().settings.commitMessage))).finally(a))}})}function eH(e,t,r,n,i,a){re(t,!0),R(r)&&n().promiseQueue.addTask(()=>n().commitAndSync(!1,!1,R(i)).then(()=>{re(i,be(n().settings.commitMessage))}).finally(a))}function K3(e,t,r,n,i){re(t,!0),r().promiseQueue.addTask(()=>r().gitManager.stageAll({status:R(n)}).finally(i))}function J3(e,t,r,n,i){re(t,!0),r().promiseQueue.addTask(()=>r().gitManager.unstageAll({status:R(n)}).finally(i))}function tH(e,t,r,n){re(t,!0),r().promiseQueue.addTask(()=>r().push().finally(n))}function rH(e,t,r,n){re(t,!0),r().promiseQueue.addTask(()=>r().pullChangesFromRemote().finally(n))}function nH(e,t,r){e.stopPropagation(),new Wi(t.view.app,!1,r().gitManager.getRelativeVaultPath("/")).myOpen().then(n=>{n===!0&&r().promiseQueue.addTask(()=>r().gitManager.discardAll({status:r().cachedStatus}).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")}))},console.error)}var iH=(e,t,r,n)=>{re(t,!R(t)),(0,Ec.setIcon)(r[6],R(t)?"list":"folder"),n().settings.treeStructure=R(t),n().saveSettings()},aH=(e,t)=>re(t,""),sH=se('
'),oH=(e,t)=>re(t,!R(t)),lH=se(" ",1),cH=se(''),uH=(e,t)=>re(t,!R(t)),fH=se(" ",1),dH=se(''),hH=(e,t)=>re(t,!R(t)),pH=se(" ",1),mH=se(''),gH=se(''),vH=se(''),yH=se('
'),wH={hash:"svelte-11adhly",code:`.commit-msg-input.svelte-11adhly {width:100%;overflow:hidden;resize:none;padding:7px 5px;background-color:var(--background-modifier-form-field);}.git-commit-msg.svelte-11adhly {position:relative;padding:0;width:calc(100% - var(--size-4-8));margin:4px auto;}main.svelte-11adhly .git-tools:where(.svelte-11adhly) .files-count:where(.svelte-11adhly) {padding-left:var(--size-2-1);width:11px;display:flex;align-items:center;justify-content:center;}.nav-folder-title.svelte-11adhly {align-items:center;}.git-commit-msg-clear-button.svelte-11adhly {position:absolute;background:transparent;border-radius:50%;color:var(--search-clear-button-color);cursor:var(--cursor);top:-4px;right:2px;bottom:0px;line-height:0;height:var(--input-height);width:28px;margin:auto;padding:0 0;text-align:center;display:flex;justify-content:center;align-items:center;transition:color 0.15s ease-in-out;}.git-commit-msg-clear-button.svelte-11adhly:after {content:"";height:var(--search-clear-button-size);width:var(--search-clear-button-size);display:block;background-color:currentColor;mask-image:url("data:image/svg+xml,");mask-repeat:no-repeat;-webkit-mask-image:url("data:image/svg+xml,");-webkit-mask-repeat:no-repeat;}`};function Ev(e,t){Xe(t,!0),gt(e,wH);let r=si(t,"plugin",7),n=ft(!1),i=ft(void 0),a=ft(be([])),s=ft(be(r().settings.commitMessage)),o=be([]),c=ft(void 0),l=ft(void 0),u=ft(void 0),f=ft(!0),d=ft(!0),h=ft(!0),p=ft(0),m=ft(be(r().settings.treeStructure));t.view.registerEvent(t.view.app.workspace.on("obsidian-git:loading-status",()=>re(n,!0))),t.view.registerEvent(t.view.app.workspace.on("obsidian-git:status-changed",()=>void v().catch(console.error))),t.view.plugin.cachedStatus==null?t.view.plugin.refresh().catch(console.error):v().catch(console.error),$t(()=>{o.forEach(F=>(0,Ec.setIcon)(F,F.getAttr("data-icon")))}),$t(()=>{o.forEach(F=>{var G,N;!F||F.id!="push"||(Ec.Platform.isMobile?(F.removeClass("button-border"),R(p)>0&&F.addClass("button-border")):((G=F.firstElementChild)===null||G===void 0||G.removeAttribute("color"),R(p)>0&&((N=F.firstElementChild)===null||N===void 0||N.setAttr("color","var(--text-accent)"))))})});function v(){return bo(this,void 0,void 0,function*(){if(!r().gitReady){re(i,void 0);return}if(re(p,be(yield r().gitManager.getUnpushedCommits())),re(i,be(r().cachedStatus)),re(n,!1),r().lastPulledFiles&&r().lastPulledFiles!=R(a)&&(re(a,be(r().lastPulledFiles)),re(u,be({title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(R(a))}))),R(i)){let F=(G,N)=>G.vaultPath.split("/").last().localeCompare(Tn(N.vaultPath));R(i).changed.sort(F),R(i).staged.sort(F),re(c,be({title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(R(i).changed)})),re(l,be({title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(R(i).staged)}))}else re(c,void 0),re(l,void 0)})}function y(){t.view.app.workspace.trigger("obsidian-git:refresh")}let b=Ye(()=>(R(s).match(/\n/g)||[]).length+1||1);var x=yH(),E=H(x),_=H(E),k=H(_);k.__click=[eH,n,i,r,s,y],Ge(k,F=>o[0]=F,()=>o==null?void 0:o[0]);var w=Z(k,2);w.__click=[Q9,n,i,r,s,y],Ge(w,F=>o[1]=F,()=>o==null?void 0:o[1]);var A=Z(w,2);A.__click=[K3,n,r,i,y],Ge(A,F=>o[2]=F,()=>o==null?void 0:o[2]);var S=Z(A,2);S.__click=[J3,n,r,i,y],Ge(S,F=>o[3]=F,()=>o==null?void 0:o[3]);var T=Z(S,2);T.__click=[tH,n,r,y],Ge(T,F=>o[4]=F,()=>o==null?void 0:o[4]);var P=Z(T,2);P.__click=[rH,n,r,y],Ge(P,F=>o[5]=F,()=>o==null?void 0:o[5]);var O=Z(P,2);O.__click=[iH,m,o,r],Ge(O,F=>o[6]=F,()=>o==null?void 0:o[6]);var j=Z(O,2);j.__click=y,Ge(j,F=>o[7]=F,()=>o==null?void 0:o[7]),B(_),B(E);var D=Z(E,2),Q=H(D);rv(Q);var de=Z(Q,2);{var ee=F=>{var G=sH();G.__click=[aH,s],pe(G,"aria-label","Clear"),ne(F,G)};ge(de,F=>{R(s)&&F(ee)})}B(D);var J=Z(D,2),Pe=H(J);{var me=F=>{var G=vH(),N=H(G),Me=H(N);Me.__click=[oH,d];var Dt=H(Me),_t=Z(Dt,4),Ee=H(_t),st=H(Ee);st.__click=[J3,n,r,i,y],Ge(st,Nt=>o[8]=Nt,()=>o==null?void 0:o[8]),B(Ee);var ot=Z(Ee,2),Ct=H(ot,!0);B(ot),B(_t),B(Me);var $e=Z(Me,2);{var U=Nt=>{var Zt=cH(),li=H(Zt);{var Va=jt=>{Ba(jt,{get hierarchy(){return R(l)},get plugin(){return r()},get view(){return t.view},get fileType(){return 0},topLevel:!0})},Po=jt=>{var Yi=lH(),$n=cr(Yi);Tr($n,17,()=>zl(R(i).staged,500),kr,(Ro,Mo)=>{Sc(Ro,{get change(){return R(Mo)},get view(){return t.view},get manager(){return r().gitManager}})});var ci=Z($n,2);ja(ci,{get files(){return R(i).staged}}),ne(jt,Yi)};ge(li,jt=>{R(m)?jt(Va):jt(Po,!1)})}B(Zt),fn(3,Zt,()=>In,()=>({duration:150})),ne(Nt,Zt)};ge($e,Nt=>{R(d)&&Nt(U)})}B(N);var Le=Z(N,2),L=H(Le);L.__click=[uH,f];var Y=H(L),ye=Z(Y,4),De=H(ye),vt=H(De);vt.__click=[nH,t,r];var za=Z(vt,2);za.__click=[K3,n,r,i,y],Ge(za,Nt=>o[9]=Nt,()=>o==null?void 0:o[9]),B(De);var Lv=Z(De,2),IP=H(Lv,!0);B(Lv),B(ye),B(L);var FP=Z(L,2);{var $P=Nt=>{var Zt=dH(),li=H(Zt);{var Va=jt=>{Ba(jt,{get hierarchy(){return R(c)},get plugin(){return r()},get view(){return t.view},get fileType(){return 1},topLevel:!0})},Po=jt=>{var Yi=fH(),$n=cr(Yi);Tr($n,17,()=>zl(R(i).changed,500),kr,(Ro,Mo)=>{bc(Ro,{get change(){return R(Mo)},get view(){return t.view},get manager(){return r().gitManager}})});var ci=Z($n,2);ja(ci,{get files(){return R(i).changed}}),ne(jt,Yi)};ge(li,jt=>{R(m)?jt(Va):jt(Po,!1)})}B(Zt),fn(3,Zt,()=>In,()=>({duration:150})),ne(Nt,Zt)};ge(FP,Nt=>{R(f)&&Nt($P)})}B(Le);var LP=Z(Le,2);{var DP=Nt=>{var Zt=gH(),li=H(Zt);li.__click=[hH,h];var Va=Z(H(li),4),Po=H(Va,!0);B(Va),B(li);var jt=Z(li,2);{var Yi=$n=>{var ci=mH(),Ro=H(ci);{var Mo=Wa=>{Ba(Wa,{get hierarchy(){return R(u)},get plugin(){return r()},get view(){return t.view},get fileType(){return 2},topLevel:!0})},NP=Wa=>{var Dv=pH(),Nv=cr(Dv);Tr(Nv,17,()=>R(a),kr,(BP,HP)=>{_c(BP,{get change(){return R(HP)},get view(){return t.view}})});var jP=Z(Nv,2);ja(jP,{get files(){return R(a)}}),ne(Wa,Dv)};ge(Ro,Wa=>{R(m)?Wa(Mo):Wa(NP,!1)})}B(ci),fn(3,ci,()=>In,()=>({duration:150})),ne($n,ci)};ge(jt,$n=>{R(h)&&$n(Yi)})}B(Zt),xe(()=>{at(Zt,"is-collapsed",!R(h)),Oe(Po,R(a).length)}),ne(Nt,Zt)};ge(LP,Nt=>{R(a).length>0&&R(u)&&Nt(DP)})}B(G),xe(()=>{at(N,"is-collapsed",!R(d)),at(Dt,"is-collapsed",!R(d)),Oe(Ct,R(i).staged.length),at(Le,"is-collapsed",!R(f)),at(Y,"is-collapsed",!R(f)),Oe(IP,R(i).changed.length)}),ne(F,G)};ge(Pe,F=>{R(i)&&R(l)&&R(c)&&F(me)})}B(J),B(x),xe(()=>{pe(x,"data-type",St.type),pe(O,"data-icon",R(m)?"list":"folder"),at(j,"loading",R(n)),pe(Q,"rows",R(b))}),pv(Q,()=>R(s),F=>re(s,F)),ne(e,x),Ze()}dt(["click"]);var Ac=class extends Q3.ItemView{constructor(t,r){super(t),this.plugin=r,this.hoverPopover=null}getViewType(){return St.type}getDisplayText(){return St.name}getIcon(){return St.icon}onClose(){return this._view&&ai(this._view),super.onClose()}reload(){this._view&&ai(this._view),this._view=zi(Ev,{target:this.contentEl,props:{plugin:this.plugin,view:this}})}onOpen(){return this.reload(),super.onOpen()}};g();var Ud=class{constructor(t,r){this.statusBarEl=t;this.plugin=r;this.statusBarEl.addClass("mod-clickable"),this.statusBarEl.onClickEvent(n=>{this.plugin.switchBranch().catch(i=>r.displayError(i))})}async display(){if(this.plugin.gitReady){let t=await this.plugin.gitManager.branchInfo();t.current!=null?this.statusBarEl.setText(t.current):this.statusBarEl.empty()}else this.statusBarEl.empty()}remove(){this.statusBarEl.remove()}};g();var _o=require("obsidian");var kc=class{constructor(t){this.plugin=t}async hasTooBigFiles(t){let r=await this.plugin.gitManager.branchInfo(),n=r.tracking?Ii(r.tracking)[0]:null;if(!n)return!1;let i=await this.plugin.gitManager.getRemoteUrl(n);if(i!=null&&i.includes("github.com")){let a=[],s=this.plugin.gitManager;for(let o of t){let c=this.plugin.app.vault.getAbstractFileByPath(o.vaultPath),l=!1;if(c instanceof _o.TFile)c.stat.size>=1e8&&(l=!0);else{let u=await this.plugin.app.vault.adapter.stat(o.vaultPath);u&&u.size>=1e8&&(l=!0)}if(l){let u=!1;s instanceof Te&&(u=await s.isFileTrackedByLFS(o.path)),u||a.push(o)}}if(a.length>0)return this.plugin.displayError(`Aborted commit, because the following files are too big: -- ${a.map(o=>o.vaultPath).join(` -- `)} -Please remove them or add to .gitignore.`),!0}return!1}async writeAndOpenFile(t){t!==void 0&&await this.plugin.app.vault.adapter.write(Ms,t);let r=!1;this.plugin.app.workspace.iterateAllLeaves(n=>{n.getDisplayText()!=""&&Ms.startsWith(n.getDisplayText())&&(r=!0)}),r||await this.plugin.app.workspace.openLinkText(Ms,"/",!0)}openDiff({aFile:t,bFile:r,aRef:n,bRef:i,event:a}){var c,l;let s=this.plugin.settings.diffStyle;_o.Platform.isMobileApp&&(s="git_unified");let o={aFile:t,bFile:r!=null?r:t,aRef:n,bRef:i};s=="split"?(c=rn(this.plugin.app,a))==null||c.setViewState({type:Ai.type,active:!0,state:o}):s=="git_unified"&&((l=rn(this.plugin.app,a))==null||l.setViewState({type:ki.type,active:!0,state:o}))}async runRawCommand(){let t=this.plugin.gitManager;if(!(t instanceof Te))return;let n=await new Fe(this.plugin,{placeholder:"push origin master",allowEmpty:!1}).openAndGetResult();n!==void 0&&this.plugin.promiseQueue.addTask(async()=>{let i=new _o.Notice(`Running '${n}'...`,999999);try{let a=await t.rawCommand(n);a?(i.setMessage(a),window.setTimeout(()=>i.hide(),5e3)):i.hide()}catch(a){throw i.hide(),a}})}};g();var To=require("obsidian");var Xr=require("@codemirror/view"),ko=require("@codemirror/state");g();var Re=require("@codemirror/view"),Se=require("@codemirror/state");g();var Av="\u037C",eP=typeof Symbol=="undefined"?"__"+Av:Symbol.for(Av),kv=typeof Symbol=="undefined"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),tP=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:{},Gd=class{constructor(t,r){this.rules=[];let{finish:n}=r||{};function i(s){return/^@/.test(s)?[s]:s.split(/,\s*/)}function a(s,o,c,l){let u=[],f=/^@(\w+)\b/.exec(s[0]),d=f&&f[1]=="keyframes";if(f&&o==null)return c.push(s[0]+";");for(let h in o){let p=o[h];if(/&/.test(h))a(h.split(/,\s*/).map(m=>s.map(v=>m.replace(/&/,v))).reduce((m,v)=>m.concat(v)),p,c);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+h+") should be a primitive value.");a(i(h),p,u,d)}else p!=null&&u.push(h.replace(/_.*/,"").replace(/[A-Z]/g,m=>"-"+m.toLowerCase())+": "+p+";")}(u.length||d)&&c.push((n&&!f&&!l?s.map(n):s).join(", ")+" {"+u.join(" ")+"}")}for(let s in t)a(i(s),t[s],this.rules)}getRules(){return this.rules.join(` -`)}static newName(){let t=tP[eP]||1;return tP[eP]=t+1,Av+t.toString(36)}static mount(t,r,n){let i=t[kv],a=n&&n.nonce;i?a&&i.setNonce(a):i=new Tv(t,a),i.mount(Array.isArray(r)?r:[r],t)}},rP=new Map,Tv=class{constructor(t,r){let n=t.ownerDocument||t,i=n.defaultView;if(!t.head&&t.adoptedStyleSheets&&i.CSSStyleSheet){let a=rP.get(n);if(a)return t[kv]=a;this.sheet=new i.CSSStyleSheet,rP.set(n,this)}else this.styleTag=n.createElement("style"),r&&this.styleTag.setAttribute("nonce",r);this.modules=[],t[kv]=this}mount(t,r){let n=this.sheet,i=0,a=0;for(let s=0;s-1&&(this.modules.splice(c,1),a--,c=-1),c==-1){if(this.modules.splice(a++,0,o),n)for(let l=0;ll){let f=e.slice(t,r).indexOf(n.slice(i,a));if(f>-1)return[new ht(t,t+f,i,i),new ht(t+f+l,r,a,a)]}else if(l>c){let f=n.slice(i,a).indexOf(e.slice(t,r));if(f>-1)return[new ht(t,t,i,i+f),new ht(r,r,i+f+c,a)]}if(c==1||l==1)return[new ht(t,r,i,a)];let u=xP(e,t,r,n,i,a);if(u){let[f,d,h]=u;return Ua(e,t,f,n,i,d).concat(Ua(e,f+h,r,n,d+h,a))}return _H(e,t,r,n,i,a)}var Tc=1e9;function _H(e,t,r,n,i,a){let s=r-t,o=a-i;if(Tc<1e9&&Math.min(s,o)>Tc*16)return Math.min(s,o)>Tc*64?[new ht(t,r,i,a)]:nP(e,t,r,n,i,a);let c=Math.ceil((s+o)/2);Cv.reset(c),Pv.reset(c);let l=(h,p)=>e.charCodeAt(t+h)==n.charCodeAt(i+p),u=(h,p)=>e.charCodeAt(r-h-1)==n.charCodeAt(a-p-1),f=(s-o)%2!=0?Pv:null,d=f?null:Cv;for(let h=0;hTc)return nP(e,t,r,n,i,a);let p=Cv.advance(h,s,o,c,f,!1,l)||Pv.advance(h,s,o,c,d,!0,u);if(p)return xH(e,t,r,t+p[0],n,i,a,i+p[1])}return[new ht(t,r,i,a)]}var Yd=class{constructor(){this.vec=[]}reset(t){this.len=t<<1;for(let r=0;rr)this.end+=2;else if(f>n)this.start+=2;else if(a){let d=i+(r-n)-c;if(d>=0&&d=r-u)return[h,i+h-d]}else{let h=r-a.vec[d];if(u>=h)return[u,f]}}}return null}},Cv=new Yd,Pv=new Yd;function xH(e,t,r,n,i,a,s,o){let c=!1;return!Eo(e,n)&&++n==r&&(c=!0),!Eo(i,o)&&++o==s&&(c=!0),c?[new ht(t,r,a,s)]:Ua(e,t,n,i,a,o).concat(Ua(e,n,r,i,o,s))}function _P(e,t){let r=1,n=Math.min(e,t);for(;rr||u>a||e.slice(o,l)!=n.slice(c,u)){if(s==1)return o-t-(Eo(e,o)?0:1);s=s>>1}else{if(l==r||u==a)return l-t;o=l,c=u}}}function $v(e,t,r,n,i,a){if(t==r||i==a||e.charCodeAt(r-1)!=n.charCodeAt(a-1))return 0;let s=_P(r-t,a-i);for(let o=r,c=a;;){let l=o-s,u=c-s;if(l>1}else{if(l==t||u==i)return r-l;o=l,c=u}}}function Rv(e,t,r,n,i,a,s,o){let c=n.slice(i,a),l=null;for(;;){if(l||s=r)break;let d=e.slice(u,f),h=-1;for(;(h=c.indexOf(d,h+1))!=-1;){let p=Fv(e,f,r,n,i+h+d.length,a),m=$v(e,t,u,n,i,i+h),v=d.length+p+m;(!l||l[2]>1}}function xP(e,t,r,n,i,a){let s=r-t,o=a-i;if(si.fromA-t&&n.toB>i.fromB-t&&(e[r-1]=new ht(n.fromA,i.toA,n.fromB,i.toB),e.splice(r--,1))}}function SH(e,t,r){for(;;){SP(r,1);let n=!1;for(let i=0;i3||o>3){let c=i==e.length-1?t.length:e[i+1].fromA,l=a.fromA-n,u=c-a.toA,f=aP(t,a.fromA,Math.min(l,5)),d=iP(t,a.toA,Math.min(u,5)),h=a.fromA-f,p=d-a.toA;if(!s||!o){let m=Math.max(s,o),[v,y,b]=s?[t,a.fromA,a.toA]:[r,a.fromB,a.toB];h&&p&&(m>h&&t.slice(f,a.fromA)==v.slice(b-h,b)?(a=e[i]=new ht(f,f+s,a.fromB-h,a.toB-h),f=a.fromA,d=iP(t,a.toA,Math.min(c-a.toA,5))):m>p&&t.slice(a.toA,d)==v.slice(y,y+p)&&(a=e[i]=new ht(d-s,d,a.fromB+p,a.toB+p),d=a.toA,f=aP(t,a.fromA,Math.min(a.fromA-n,5))),h=a.fromA-f,p=d-a.toA)}if(h||p)a=e[i]=new ht(a.fromA-h,a.toA+p,a.fromB-h,a.toB+p);else if(s){if(!o){let m=oP(t,a.fromA,a.toA),v,y=m<0?-1:sP(t,a.toA,a.fromA);m>-1&&(v=m-a.fromA)<=u&&t.slice(a.fromA,m)==t.slice(a.toA,a.toA+v)?a=e[i]=a.offset(v):y>-1&&(v=a.toA-y)<=l&&t.slice(a.fromA-v,a.fromA)==t.slice(y,a.toA)&&(a=e[i]=a.offset(-v))}}else{let m=oP(r,a.fromB,a.toB),v,y=m<0?-1:sP(r,a.toB,a.fromB);m>-1&&(v=m-a.fromB)<=u&&r.slice(a.fromB,m)==r.slice(a.toB,a.toB+v)?a=e[i]=a.offset(v):y>-1&&(v=a.toB-y)<=l&&r.slice(a.fromB-v,a.fromB)==r.slice(y,a.toB)&&(a=e[i]=a.offset(-v))}n=a.toA}}return SP(e,3),e}var Ha;try{Ha=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch(e){}function EP(e){return e>48&&e<58||e>64&&e<91||e>96&&e<123}function AP(e,t){if(t==e.length)return 0;let r=e.charCodeAt(t);return r<192?EP(r)?1:0:Ha?!TP(r)||t==e.length-1?Ha.test(String.fromCharCode(r))?1:0:Ha.test(e.slice(t,t+2))?2:0:0}function kP(e,t){if(!t)return 0;let r=e.charCodeAt(t-1);return r<192?EP(r)?1:0:Ha?!CP(r)||t==1?Ha.test(String.fromCharCode(r))?1:0:Ha.test(e.slice(t-2,t))?2:0:0}function iP(e,t,r){if(t==e.length||!kP(e,t))return t;for(let n=t,i=t+r;;){let a=AP(e,n);if(!a)return n;if(n+=a,n>i)return t}}function aP(e,t,r){if(!t||!AP(e,t))return t;for(let n=t,i=t-r;;){let a=kP(e,n);if(!a)return n;if(n-=a,ne>=55296&&e<=56319,CP=e=>e>=56320&&e<=57343;function Eo(e,t){return!t||t==e.length||!TP(e.charCodeAt(t-1))||!CP(e.charCodeAt(t))}function AH(e,t,r){var n;return Tc=((n=r==null?void 0:r.scanLimit)!==null&&n!==void 0?n:1e9)>>1,SH(e,t,Ua(e,0,e.length,t,0,t.length))}function PP(e,t,r){return EH(AH(e,t,r),e,t)}var Fn=Se.Facet.define({combine:e=>e[0]}),Mv=Se.StateEffect.define(),Ao=Se.StateField.define({create(e){return null},update(e,t){for(let r of t.effects)r.is(Mv)&&(e=r.value);return e}});var So=class e{constructor(t,r,n,i,a){this.changes=t,this.fromA=r,this.toA=n,this.fromB=i,this.toB=a}offset(t,r){return t||r?new e(this.changes,this.fromA+t,this.toA+t,this.fromB+r,this.toB+r):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(t,r,n){return RP(PP(t.toString(),r.toString(),n),t,r,0,0)}static updateA(t,r,n,i,a){return dP(fP(t,i,!0,n.length),t,r,n,a)}static updateB(t,r,n,i,a){return dP(fP(t,i,!1,r.length),t,r,n,a)}};function lP(e,t,r,n){let i=r.lineAt(e),a=n.lineAt(t);return i.to==e&&a.to==t&&eu+1&&m>f+1)break;d.push(h.offset(-c+n,-l+i)),[u,f]=cP(h.toA+n,h.toB+i,t,r),s++}a.push(new So(d,c,Math.max(c,u),l,Math.max(l,f)))}return a}var zd=1e3;function uP(e,t,r,n){let i=0,a=e.length;for(;;){if(i==a){let u=0,f=0;i&&({toA:u,toB:f}=e[i-1]);let d=t-(r?u:f);return[u+d,f+d]}let s=i+a>>1,o=e[s],[c,l]=r?[o.fromA,o.toA]:[o.fromB,o.toB];if(c>t)a=s;else if(l<=t)i=s+1;else return n?[o.fromA,o.fromB]:[o.toA,o.toB]}}function fP(e,t,r,n){let i=[];return t.iterChangedRanges((a,s,o,c)=>{let l=0,u=r?t.length:n,f=0,d=r?n:t.length;a>zd&&([l,f]=uP(e,a-zd,r,!0)),s=l?i[i.length-1]={fromA:p.fromA,fromB:p.fromB,toA:u,toB:d,diffA:p.diffA+m,diffB:p.diffB+v}:i.push({fromA:l,toA:u,fromB:f,toB:d,diffA:m,diffB:v})}),i}function dP(e,t,r,n,i){if(!e.length)return t;let a=[];for(let s=0,o=0,c=0,l=0;;s++){let u=s==e.length?null:e[s],f=u?u.fromA+o:r.length,d=u?u.fromB+c:n.length;for(;lf||v.toB+c>d)break;a.push(v.offset(o,c)),l++}if(!u)break;let h=u.toA+o+u.diffA,p=u.toB+c+u.diffB,m=PP(r.sliceString(f,h),n.sliceString(d,p),i);for(let v of RP(m,r,n,f,d))a.push(v);for(o+=u.diffA,c+=u.diffB;lh&&v.fromB+c>p)break;l++}}return a}var kH={scanLimit:500},MP=Re.ViewPlugin.fromClass(class{constructor(e){({deco:this.deco,gutter:this.gutter}=mP(e))}update(e){(e.docChanged||e.viewportChanged||TH(e.startState,e.state)||CH(e.startState,e.state))&&({deco:this.deco,gutter:this.gutter}=mP(e.view))}},{decorations:e=>e.deco}),Vd=Se.Prec.low((0,Re.gutter)({class:"cm-changeGutter",markers:e=>{var t;return((t=e.plugin(MP))===null||t===void 0?void 0:t.gutter)||Se.RangeSet.empty}}));function TH(e,t){return e.field(Ao,!1)!=t.field(Ao,!1)}function CH(e,t){return e.facet(Fn)!=t.facet(Fn)}var hP=Re.Decoration.line({class:"cm-changedLine"}),PH=Re.Decoration.mark({class:"cm-changedText"}),RH=Re.Decoration.mark({tagName:"ins",class:"cm-insertedLine"}),MH=Re.Decoration.mark({tagName:"del",class:"cm-deletedLine"}),pP=new class extends Re.GutterMarker{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function OH(e,t,r,n,i,a){let s=r?e.fromA:e.fromB,o=r?e.toA:e.toB,c=0;if(s!=o){i.add(s,s,hP),i.add(s,o,r?MH:RH),a&&a.add(s,s,pP);for(let l=t.iterRange(s,o-1),u=s;!l.next().done;){if(l.lineBreak){u++,i.add(u,u,hP),a&&a.add(u,u,pP);continue}let f=u+l.value.length;if(n)for(;c=l)break;(a?u.toA:u.toB)>c&&OH(u,e.state.doc,a,n,s,o)}return{deco:s.finish(),gutter:o&&o.finish()}}var xo=class extends Re.WidgetType{constructor(t){super(),this.height=t}eq(t){return this.height==t.height}toDOM(){let t=document.createElement("div");return t.className="cm-mergeSpacer",t.style.height=this.height+"px",t}updateDOM(t){return t.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},Xd=Se.StateEffect.define({map:(e,t)=>e.map(t)}),Cc=Se.StateField.define({create:()=>Re.Decoration.none,update:(e,t)=>{for(let r of t.effects)if(r.is(Xd))return r.value;return e.map(t.changes)},provide:e=>Re.EditorView.decorations.from(e)}),Wd=.01;function gP(e,t){if(e.size!=t.size)return!1;let r=e.iter(),n=t.iter();for(;r.value;){if(r.from!=n.from||Math.abs(r.value.spec.widget.height-n.value.spec.widget.height)>1)return!1;r.next(),n.next()}return!0}function IH(e,t,r){let n=new Se.RangeSetBuilder,i=new Se.RangeSetBuilder,a=e.state.field(Cc).iter(),s=t.state.field(Cc).iter(),o=0,c=0,l=0,u=0,f=e.viewport,d=t.viewport;for(let v=0;;v++){let y=vWd&&(u+=k,i.add(c,c,Re.Decoration.widget({widget:new xo(k),block:!0,side:-1})))}if(b>o+1e3&&of.from&&cd.from){let E=Math.min(f.from-o,d.from-c);o+=E,c+=E,v--}else if(y)o=y.toA,c=y.toB;else break;for(;a.value&&a.fromWd&&i.add(t.state.doc.length,t.state.doc.length,Re.Decoration.widget({widget:new xo(h),block:!0,side:1}));let p=n.finish(),m=i.finish();gP(p,e.state.field(Cc))||e.dispatch({effects:Xd.of(p)}),gP(m,t.state.field(Cc))||t.dispatch({effects:Xd.of(m)})}var Ov=Se.StateEffect.define({map:(e,t)=>t.mapPos(e)}),Iv=class extends Re.WidgetType{constructor(t){super(),this.lines=t}eq(t){return this.lines==t.lines}toDOM(t){let r=document.createElement("div");return r.className="cm-collapsedLines",r.textContent=t.state.phrase("$ unchanged lines",this.lines),r.addEventListener("click",n=>{let i=t.posAtDOM(n.target);t.dispatch({effects:Ov.of(i)});let{side:a,sibling:s}=t.state.facet(Fn);s&&s().dispatch({effects:Ov.of(FH(i,t.state.field(Ao),a=="a"))})}),r}ignoreEvent(t){return t instanceof MouseEvent}get estimatedHeight(){return 27}};function FH(e,t,r){let n=0,i=0;for(let a=0;;a++){let s=a=e)return i+(e-n);[n,i]=r?[s.toA,s.toB]:[s.toB,s.toA]}}var $H=Se.StateField.define({create(e){return Re.Decoration.none},update(e,t){e=e.map(t.changes);for(let r of t.effects)r.is(Ov)&&(e=e.update({filter:n=>n!=r.value}));return e},provide:e=>Re.EditorView.decorations.from(e)});function vP({margin:e=3,minSize:t=4}){return $H.init(r=>LH(r,e,t))}function LH(e,t,r){let n=new Se.RangeSetBuilder,i=e.facet(Fn).side=="a",a=e.field(Ao),s=1;for(let o=0;;o++){let c=o=r&&n.add(e.doc.line(l).from,e.doc.line(u).to,Re.Decoration.replace({widget:new Iv(f),block:!0})),!c)break;s=e.doc.lineAt(Math.min(e.doc.length,i?c.toA:c.toB)).number}return n.finish()}var DH=Re.EditorView.styleModule.of(new Gd({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),NH=Re.EditorView.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb2266, #22bb2266) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff8866, #88ff8866) bottom/100% 2px no-repeat"},".cm-insertedLine, .cm-deletedLine":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"\u299A"',marginInlineEnd:"7px"},"&:after":{content:'"\u299A"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"}}),yP=new Se.Compartment,qd=new Se.Compartment,Zd=class{constructor(t){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=t.diffConfig||kH;let r=[Se.Prec.low(MP),NH,DH,Cc,Re.EditorView.updateListener.of(f=>{this.measuring<0&&(f.heightChanged||f.viewportChanged)&&!f.transactions.some(d=>d.effects.some(h=>h.is(Xd)))&&this.measure()})],n=[Fn.of({side:"a",sibling:()=>this.b,highlightChanges:t.highlightChanges!==!1,markGutter:t.gutter!==!1})];t.gutter!==!1&&n.push(Vd);let i=Se.EditorState.create({doc:t.a.doc,selection:t.a.selection,extensions:[t.a.extensions||[],Re.EditorView.editorAttributes.of({class:"cm-merge-a"}),qd.of(n),r]}),a=[Fn.of({side:"b",sibling:()=>this.a,highlightChanges:t.highlightChanges!==!1,markGutter:t.gutter!==!1})];t.gutter!==!1&&a.push(Vd);let s=Se.EditorState.create({doc:t.b.doc,selection:t.b.selection,extensions:[t.b.extensions||[],Re.EditorView.editorAttributes.of({class:"cm-merge-b"}),qd.of(a),r]});this.chunks=So.build(i.doc,s.doc,this.diffConf);let o=[Ao.init(()=>this.chunks),yP.of(t.collapseUnchanged?vP(t.collapseUnchanged):[])];i=i.update({effects:Se.StateEffect.appendConfig.of(o)}).state,s=s.update({effects:Se.StateEffect.appendConfig.of(o)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let c=t.orientation||"a-b",l=document.createElement("div");l.className="cm-mergeViewEditor";let u=document.createElement("div");u.className="cm-mergeViewEditor",this.editorDOM.appendChild(c=="a-b"?l:u),this.editorDOM.appendChild(c=="a-b"?u:l),this.a=new Re.EditorView({state:i,parent:l,root:t.root,dispatchTransactions:f=>this.dispatch(f,this.a)}),this.b=new Re.EditorView({state:s,parent:u,root:t.root,dispatchTransactions:f=>this.dispatch(f,this.b)}),this.setupRevertControls(!!t.revertControls,t.revertControls=="b-to-a",t.renderRevertControl),t.parent&&t.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(t,r){if(t.some(n=>n.docChanged)){let n=t[t.length-1],i=t.reduce((s,o)=>s.compose(o.changes),Se.ChangeSet.empty(t[0].startState.doc.length));this.chunks=r==this.a?So.updateA(this.chunks,n.newDoc,this.b.state.doc,i,this.diffConf):So.updateB(this.chunks,this.a.state.doc,n.newDoc,i,this.diffConf),r.update([...t,n.state.update({effects:Mv.of(this.chunks)})]);let a=r==this.a?this.b:this.a;a.update([a.state.update({effects:Mv.of(this.chunks)})]),this.scheduleMeasure()}else r.update(t)}reconfigure(t){if("diffConfig"in t&&(this.diffConf=t.diffConfig),"orientation"in t){let a=t.orientation!="b-a";if(a!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let s=this.a.dom.parentNode,o=this.b.dom.parentNode;s.remove(),o.remove(),this.editorDOM.insertBefore(a?s:o,this.editorDOM.firstChild),this.editorDOM.appendChild(a?o:s),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in t||"renderRevertControl"in t){let a=!!this.revertDOM,s=this.revertToA,o=this.renderRevert;"revertControls"in t&&(a=!!t.revertControls,s=t.revertControls=="b-to-a"),"renderRevertControl"in t&&(o=t.renderRevertControl),this.setupRevertControls(a,s,o)}let r="highlightChanges"in t,n="gutter"in t,i="collapseUnchanged"in t;if(r||n||i){let a=[],s=[];if(r||n){let o=this.a.state.facet(Fn),c=n?t.gutter!==!1:o.markGutter,l=r?t.highlightChanges!==!1:o.highlightChanges;a.push(qd.reconfigure([Fn.of({side:"a",sibling:()=>this.b,highlightChanges:l,markGutter:c}),c?Vd:[]])),s.push(qd.reconfigure([Fn.of({side:"b",sibling:()=>this.a,highlightChanges:l,markGutter:c}),c?Vd:[]]))}if(i){let o=yP.reconfigure(t.collapseUnchanged?vP(t.collapseUnchanged):[]);a.push(o),s.push(o)}this.a.dispatch({effects:a}),this.b.dispatch({effects:s})}this.scheduleMeasure()}setupRevertControls(t,r,n){this.revertToA=r,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=n,!t&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):t&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",i=>this.revertClicked(i)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let t=this.dom.ownerDocument.defaultView||window;this.measuring=t.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){IH(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let t=this.revertDOM,r=t.firstChild,n=this.a.viewport,i=this.b.viewport;for(let a=0;an.to||s.fromB>i.to)break;if(s.fromA-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}};function wP(e){let t=e.nextSibling;return e.remove(),t}var Co=require("@codemirror/commands"),Kd=require("@codemirror/search");var Ga=class extends To.ItemView{constructor(r,n){super(r);this.plugin=n;this.refreshing=!1;this.ignoreNextModification=!1;this.navigation=!0,this.registerEvent(this.app.workspace.on("obsidian-git:status-changed",()=>{this.mergeView?this.updateRefEditors().catch(console.error):this.createMergeView().catch(console.error)})),this.intervalRef=window.setInterval(()=>{this.mergeView&&this.updateRefEditors().catch(console.error)},30*1e3),this.registerEvent(this.app.vault.on("modify",i=>{this.state.bRef==null&&i.path===this.state.bFile&&(this.ignoreNextModification?this.ignoreNextModification=!1:this.updateModifiableEditor().catch(console.error))})),this.registerEvent(this.app.vault.on("delete",i=>{this.state.bRef==null&&i.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("create",i=>{this.state.bRef==null&&i.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("rename",(i,a)=>{this.state.bRef==null&&(i.path===this.state.bFile||a===this.state.bFile)&&this.createMergeView().catch(console.error)})),this.fileSaveDebouncer=(0,To.debounce)(i=>{let a=this.state.bFile;a&&(this.ignoreNextModification=!0,this.plugin.app.vault.adapter.write(a,i).catch(s=>this.plugin.displayError(s)))},1e3,!1)}getViewType(){return Ai.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let n=this.state.bFile.split("/").last();return n!=null&&n.endsWith(".md")&&(n=n.slice(0,-3)),`Diff: ${n}`}return Ai.name}getIcon(){return Ai.icon}async setState(r,n){this.state=r,To.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await super.setState(r,n),await this.createMergeView()}getState(){return this.state}onClose(){return window.clearInterval(this.intervalRef),super.onClose()}async onOpen(){return await this.createMergeView(),super.onOpen()}async gitShow(r,n){try{return await this.plugin.gitManager.show(r,n,!1)}catch(i){if(i instanceof wr&&(i.message.includes("does not exist")||i.message.includes("unknown revision or path")||i.message.includes("exists on disk, but not in")||i.message.includes("fatal: bad object")))return i.message.includes("fatal: bad object")&&this.plugin.displayError(i.message),"";throw i}}async bShouldBeEditable(){if(this.state.bRef!=null)return!1;let r=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);return await this.app.vault.adapter.exists(r)}async updateModifiableEditor(){if(!this.mergeView||this.refreshing)return;let r=this.mergeView.b;this.refreshing=!0;let n=await this.app.vault.adapter.read(this.state.bFile);if(n!=r.state.doc.toString()){let i=r.state.update({changes:{from:0,to:r.state.doc.length,insert:n},annotations:[ko.Transaction.remote.of(!0)]});r.dispatch(i)}this.refreshing=!1}async updateRefEditors(){if(!this.mergeView||this.refreshing)return;let r=this.mergeView.a,n=this.mergeView.b;this.refreshing=!0;let i=await this.gitShow(this.state.aRef,this.state.aFile),a;if(this.state.bRef!=null&&(a=await this.gitShow(this.state.bRef,this.state.bFile)),i!=r.state.doc.toString()){let s=r.state.update({changes:{from:0,to:r.state.doc.length,insert:i}});r.dispatch(s)}if(a!=null&&a!=n.state.doc.toString()){let s=n.state.update({changes:{from:0,to:n.state.doc.length,insert:a}});n.dispatch(s)}this.refreshing=!1}async createMergeView(){var r,n,i;if((r=this.state)!=null&&r.aFile&&((n=this.state)!=null&&n.bFile)&&!this.refreshing&&this.plugin.gitManager){this.refreshing=!0,(i=this.mergeView)==null||i.destroy();let a=this.containerEl.children[1];a.empty(),this.contentEl.addClass("git-split-diff-view"),this.bIsEditable=await this.bShouldBeEditable();let s=await this.gitShow(this.state.aRef,this.state.aFile),o;if(this.state.bRef!=null)o=await this.gitShow(this.state.bRef,this.state.bFile);else{let p=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);await this.app.vault.adapter.exists(p)?o=await this.app.vault.adapter.read(p):o=""}let c=[(0,Xr.lineNumbers)(),(0,Kd.highlightSelectionMatches)(),(0,Xr.drawSelection)(),Xr.keymap.of([...Co.standardKeymap,Co.indentWithTab]),(0,Co.history)(),(0,Kd.search)(),Xr.EditorView.lineWrapping],l=this,u=Xr.ViewPlugin.define(p=>({update(m){if(m.docChanged&&!m.transactions.some(v=>v.annotation(ko.Transaction.remote))){let v=p.state.doc.toString();l.fileSaveDebouncer(v)}}})),f={doc:s,extensions:[...c,Xr.EditorView.editable.of(!1),ko.EditorState.readOnly.of(!0)]},d=[...c];this.bIsEditable?d.push(u):d.push(Xr.EditorView.editable.of(!1),ko.EditorState.readOnly.of(!0));let h={doc:o,extensions:d};a.addClasses(["cm-s-obsidian","mod-cm6","markdown-source-view","cm-content"]),this.mergeView=new Zd({b:h,a:f,diffConfig:{scanLimit:this.bIsEditable?1e3:1e4},parent:a}),this.refreshing=!1}}};var Jd=class extends Ce.Plugin{constructor(){super(...arguments);this.automaticsManager=new Xl(this);this.tools=new kc(this);this.localStorage=new fd(this);this.state={gitAction:0,offlineMode:!1};this.gitReady=!1;this.promiseQueue=new ad(this);this.intervalsToClear=[];this.lineAuthoringFeature=new id(this)}setPluginState(r){var n;this.state=Object.assign(this.state,r),(n=this.statusBar)==null||n.display()}async updateCachedStatus(){var r,n;return this.app.workspace.trigger("obsidian-git:loading-status"),this.cachedStatus=await this.gitManager.status(),this.cachedStatus.conflicted.length>0?(this.localStorage.setConflict(!0),await((r=this.branchBar)==null?void 0:r.display())):(this.localStorage.setConflict(!1),await((n=this.branchBar)==null?void 0:n.display())),this.app.workspace.trigger("obsidian-git:status-changed",this.cachedStatus),this.cachedStatus}async refresh(){if(!this.gitReady)return;let r=this.app.workspace.getLeavesOfType(St.type),n=this.app.workspace.getLeavesOfType($r.type);(this.settings.changedFilesInStatusBar||r.some(i=>{var a;return!((a=i.isDeferred)!=null&&a)})||n.some(i=>{var a;return!((a=i.isDeferred)!=null&&a)}))&&await this.updateCachedStatus().catch(i=>this.displayError(i)),this.app.workspace.trigger("obsidian-git:refreshed")}refreshUpdatedHead(){this.lineAuthoringFeature.refreshLineAuthorViews()}async onload(){console.log("loading "+this.manifest.name+" plugin: v"+this.manifest.version),Yl.plugin=this,this.localStorage.migrate(),await this.loadSettings(),await this.migrateSettings(),this.settingsTab=new zf(this.app,this),this.addSettingTab(this.settingsTab),this.localStorage.getPluginDisabled()||(this.registerStuff(),this.app.workspace.onLayoutReady(()=>this.init({fromReload:!1}).catch(r=>this.displayError(r))))}onExternalSettingsChange(){this.reloadSettings().catch(r=>this.displayError(r))}async reloadSettings(){let r=JSON.stringify(this.settings);await this.loadSettings();let n=JSON.stringify(this.settings);r!==n&&(this.log("Reloading settings"),this.unloadPlugin(),await this.init({fromReload:!0}),this.app.workspace.getLeavesOfType(St.type).forEach(i=>{var a;if(!((a=i.isDeferred)!=null&&a))return i.view.reload()}),this.app.workspace.getLeavesOfType($r.type).forEach(i=>{var a;if(!((a=i.isDeferred)!=null&&a))return i.view.reload()}))}registerStuff(){this.registerEvent(this.app.workspace.on("obsidian-git:refresh",()=>{this.refresh().catch(r=>this.displayError(r))})),this.registerEvent(this.app.workspace.on("obsidian-git:head-change",()=>{this.refreshUpdatedHead()})),this.registerEvent(this.app.workspace.on("file-menu",(r,n,i)=>{this.handleFileMenu(r,n,i,"file-manu")})),this.registerEvent(this.app.workspace.on("obsidian-git:menu",(r,n,i)=>{this.handleFileMenu(r,n,i,"obsidian-git:menu")})),this.registerEvent(this.app.workspace.on("active-leaf-change",r=>{this.onActiveLeafChange(r)})),this.registerEvent(this.app.vault.on("modify",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("delete",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("create",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("rename",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerView(St.type,r=>new Ac(r,this)),this.registerView($r.type,r=>new vc(r,this)),this.registerView(ki.type,r=>new Ta(r,this)),this.registerView(Ai.type,r=>new Ga(r,this)),this.addRibbonIcon("git-pull-request","Open Git source control",async()=>{var i;let r=this.app.workspace.getLeavesOfType(St.type),n;r.length===0?(n=(i=this.app.workspace.getRightLeaf(!1))!=null?i:this.app.workspace.getLeaf(),await n.setViewState({type:St.type})):n=r.first(),await this.app.workspace.revealLeaf(n)}),this.registerHoverLinkSource(St.type,{display:"Git View",defaultMod:!0}),this.lineAuthoringFeature.onLoadPlugin(),this.setRefreshDebouncer(),lC(this)}setRefreshDebouncer(){var r;(r=this.debRefresh)==null||r.cancel(),this.debRefresh=(0,Ce.debounce)(()=>{this.settings.refreshSourceControl&&this.refresh().catch(console.error)},this.settings.refreshSourceControlTimer,!0)}async addFileToGitignore(r){return await this.app.vault.adapter.append(this.gitManager.getRelativeVaultPath(".gitignore"),` -`+this.gitManager.getRelativeRepoPath(r,!0)),this.refresh()}handleFileMenu(r,n,i,a){if(!this.gitReady||!this.settings.showFileMenu||!n)return;let s;if(typeof n=="string"?s=n:s=n.path,i=="file-explorer-context-menu"&&(r.addItem(o=>{o.setTitle("Git: Stage").setIcon("plus-circle").setSection("action").onClick(c=>{this.promiseQueue.addTask(async()=>{n instanceof Ce.TFile?await this.gitManager.stage(n.path,!0):await this.gitManager.stageAll({dir:this.gitManager.getRelativeRepoPath(s,!0)}),this.displayMessage(`Staged ${s}`)})})}),r.addItem(o=>{o.setTitle("Git: Unstage").setIcon("minus-circle").setSection("action").onClick(c=>{this.promiseQueue.addTask(async()=>{n instanceof Ce.TFile?await this.gitManager.unstage(n.path,!0):await this.gitManager.unstageAll({dir:this.gitManager.getRelativeRepoPath(s,!0)}),this.displayMessage(`Unstaged ${s}`)})})}),r.addItem(o=>{o.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(c=>{this.addFileToGitignore(s).catch(l=>this.displayError(l))})})),i=="git-source-control"){r.addItem(c=>{c.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(l=>{this.addFileToGitignore(s).catch(u=>this.displayError(u))})});let o=this.app.vault.adapter;a==="obsidian-git:menu"&&o instanceof Ce.FileSystemAdapter&&(r.addItem(c=>{c.setTitle("Open in default app").setIcon("arrow-up-right").setSection("action").onClick(l=>{this.app.openWithDefaultApp(s)})}),r.addItem(c=>{c.setTitle("Show in system explorer").setIcon("arrow-up-right").setSection("action").onClick(l=>{window.electron.shell.showItemInFolder(OP.join(o.getBasePath(),s))})}))}}async migrateSettings(){this.settings.mergeOnPull!=null&&(this.settings.syncMethod=this.settings.mergeOnPull?"merge":"rebase",this.settings.mergeOnPull=void 0,await this.saveSettings()),this.settings.autoCommitMessage===void 0&&(this.settings.autoCommitMessage=this.settings.commitMessage,await this.saveSettings()),this.settings.gitPath!=null&&(this.localStorage.setGitPath(this.settings.gitPath),this.settings.gitPath=void 0,await this.saveSettings()),this.settings.username!=null&&(this.localStorage.setPassword(this.settings.username),this.settings.username=void 0,await this.saveSettings())}unloadPlugin(){var r,n;this.gitReady=!1,this.lineAuthoringFeature.deactivateFeature(),this.automaticsManager.unload(),(r=this.branchBar)==null||r.remove(),(n=this.statusBar)==null||n.remove(),this.gitManager.unload(),this.promiseQueue.clear();for(let i of this.intervalsToClear)window.clearInterval(i);this.intervalsToClear=[],this.debRefresh.cancel()}onunload(){this.unloadPlugin(),console.log("unloading "+this.manifest.name+" plugin")}async loadSettings(){let r=await this.loadData();r==null&&(r={showedMobileNotice:!0}),this.settings=Ex(ar,r)}async saveSettings(){var r;(r=this.settingsTab)==null||r.beforeSaveSettings(),await this.saveData(this.settings)}get useSimpleGit(){return Ce.Platform.isDesktopApp}async init({fromReload:r=!1}){var n;if(this.settings.showStatusBar){let i=this.addStatusBarItem();this.statusBar=new sd(i,this),this.intervalsToClear.push(window.setInterval(()=>{var a;return(a=this.statusBar)==null?void 0:a.display()},1e3))}try{this.useSimpleGit?(this.gitManager=new Te(this),await this.gitManager.setGitInstance()):this.gitManager=new an(this);let i=await this.gitManager.checkRequirements();switch(i){case"missing-git":this.displayError(`Cannot run git command. Trying to run: '${this.localStorage.getGitPath()||"git"}' .`);break;case"missing-repo":new Ce.Notice("Can't find a valid git repository. Please create one via the given command or clone an existing repo.",1e4);break;case"valid":if(this.gitReady=!0,this.setPluginState({gitAction:0}),Ce.Platform.isDesktop&&this.settings.showBranchStatusBar){let a=this.addStatusBarItem();this.branchBar=new Ud(a,this),this.intervalsToClear.push(window.setInterval(()=>{var s;return void((s=this.branchBar)==null?void 0:s.display().catch(console.error))},6e4))}await((n=this.branchBar)==null?void 0:n.display()),this.lineAuthoringFeature.conditionallyActivateBySettings(),this.app.workspace.trigger("obsidian-git:refresh"),this.app.workspace.trigger("obsidian-git:head-change"),!r&&this.settings.autoPullOnBoot&&this.promiseQueue.addTask(()=>this.pullChangesFromRemote()),await this.automaticsManager.init();break;default:this.log("Something weird happened. The 'checkRequirements' result is "+i)}}catch(i){this.displayError(i),console.error(i)}}async createNewRepo(){try{await this.gitManager.init(),new Ce.Notice("Initialized new repo"),await this.init({fromReload:!0})}catch(r){this.displayError(r)}}async cloneNewRepo(){let n=await new Fe(this,{placeholder:"Enter remote URL"}).openAndGetResult();if(n){let i="Vault Root",a=await new Fe(this,{options:this.gitManager instanceof an?[i]:[],placeholder:"Enter directory for clone. It needs to be empty or not existent.",allowEmpty:this.gitManager instanceof an}).openAndGetResult();if(a==null)return;if(a===i&&(a="."),a=(0,Ce.normalizePath)(a),a==="/"&&(a="."),a==="."){let f=await new Fe(this,{options:["NO","YES"],placeholder:`Does your remote repo contain a ${this.app.vault.configDir} directory at the root?`,onlySelection:!0}).openAndGetResult();if(f===void 0){new Ce.Notice("Aborted clone");return}else if(f==="YES"){let d="DELETE ALL YOUR LOCAL CONFIG AND PLUGINS";if(await new Fe(this,{options:["Abort clone",d],placeholder:`To avoid conflicts, the local ${this.app.vault.configDir} directory needs to be deleted.`,onlySelection:!0}).openAndGetResult()===d)await this.app.vault.adapter.rmdir(this.app.vault.configDir,!0);else{new Ce.Notice("Aborted clone");return}}}let s=await new Fe(this,{placeholder:"Specify depth of clone. Leave empty for full clone.",allowEmpty:!0}).openAndGetResult(),o;if(s!==""&&(o=parseInt(s),isNaN(o))){new Ce.Notice("Invalid depth. Aborting clone.");return}new Ce.Notice(`Cloning new repo into "${a}"`);let c=this.settings.basePath,l=a&&a!==".";l&&(this.settings.basePath=a);try{await this.gitManager.clone(Vg(n),a,o),new Ce.Notice("Cloned new repo."),new Ce.Notice("Please restart Obsidian"),l&&await this.saveSettings()}catch(u){this.displayError(u),this.settings.basePath=c,await this.saveSettings()}}}async isAllInitialized(){return this.gitReady||await this.init({fromReload:!0}),this.gitReady}async pullChangesFromRemote(){if(!await this.isAllInitialized())return;let r=await this.pull();if(r!==!1){if(r||this.displayMessage("Pull: Everything is up-to-date"),this.gitManager instanceof Te){let n=await this.updateCachedStatus();n.conflicted.length>0&&(this.displayError(`You have conflicts in ${n.conflicted.length} ${n.conflicted.length==1?"file":"files"}`),await this.handleConflict(n.conflicted))}this.app.workspace.trigger("obsidian-git:refresh"),this.setPluginState({gitAction:0})}}async commitAndSync(r,n=!1,i){!await this.isAllInitialized()||(this.settings.syncMethod=="reset"&&this.settings.pullBeforePush&&await this.pull(),!await this.commit({fromAuto:r,requestCustomMessage:n,commitMessage:i}))||(this.settings.syncMethod!="reset"&&this.settings.pullBeforePush&&await this.pull(),this.settings.disablePush||(await this.remotesAreSet()&&await this.gitManager.canPush()?await this.push():this.displayMessage("No commits to push")),this.setPluginState({gitAction:0}))}async commit({fromAuto:r,requestCustomMessage:n=!1,onlyStaged:i=!1,commitMessage:a,amend:s=!1}){if(!await this.isAllInitialized())return!1;try{let o=this.localStorage.getConflict(),c,l,u;if(this.gitManager instanceof Te){if(await this.mayDeleteConflictFile(),l=await this.updateCachedStatus(),l.conflicted.length==0&&(o=!1),r&&l.conflicted.length>0)return this.displayError(`Did not commit, because you have conflicts in ${l.conflicted.length} ${l.conflicted.length==1?"file":"files"}. Please resolve them and commit per command.`),await this.handleConflict(l.conflicted),!1;c=[...l.changed,...l.staged]}else{if(r&&o)return this.displayError("Did not commit, because you have conflicts. Please resolve them and commit per command."),!1;if(o)await this.mayDeleteConflictFile(),l=await this.updateCachedStatus(),c=[...l.changed,...l.staged];else{let f=this.gitManager;i?c=await f.getStagedFiles():(u=await f.getUnstagedFiles(),c=u.map(({path:d})=>({vaultPath:this.gitManager.getRelativeVaultPath(d),path:d})))}}if(await this.tools.hasTooBigFiles(c))return this.setPluginState({gitAction:0}),!1;if(c.length!==0||o){let f=a!=null?a:a=r?this.settings.autoCommitMessage:this.settings.commitMessage;if(r&&this.settings.customMessageOnAutoBackup||n){!this.settings.disablePopups&&r&&new Ce.Notice("Auto backup: Please enter a custom commit message. Leave empty to abort");let p=await new od(this).openAndGetResult();if(p!=null&&p!=""&&p!="...")f=p;else return this.setPluginState({gitAction:0}),!1}let d;i?d=await this.gitManager.commit({message:f,amend:s}):d=await this.gitManager.commitAll({message:f,status:l,unstagedFiles:u,amend:s}),this.gitManager instanceof Te&&await this.updateCachedStatus();let h=!1;d===void 0&&(h=!0,d=c.length),this.displayMessage(`Committed${h?" approx.":""} ${d} ${d==1?"file":"files"}`)}else this.displayMessage("No changes to commit");return this.app.workspace.trigger("obsidian-git:refresh"),!0}catch(o){return this.displayError(o),!1}}async push(){if(!await this.isAllInitialized()||!await this.remotesAreSet())return!1;let r=this.localStorage.getConflict();try{this.gitManager instanceof Te&&await this.mayDeleteConflictFile();let n;if(this.gitManager instanceof Te&&(n=await this.updateCachedStatus()).conflicted.length>0)return this.displayError(`Cannot push. You have conflicts in ${n.conflicted.length} ${n.conflicted.length==1?"file":"files"}`),await this.handleConflict(n.conflicted),!1;if(this.gitManager instanceof an&&r)return this.displayError("Cannot push. You have conflicts"),!1;this.log("Pushing....");let i=await this.gitManager.push();return i!==void 0&&(i>0?this.displayMessage(`Pushed ${i} ${i==1?"file":"files"} to remote`):this.displayMessage("No commits to push")),this.setPluginState({offlineMode:!1}),this.app.workspace.trigger("obsidian-git:refresh"),!0}catch(n){return n instanceof Is?this.handleNoNetworkError(n):this.displayError(n),!1}}async pull(){if(!await this.remotesAreSet())return!1;try{this.log("Pulling....");let r=await this.gitManager.pull()||[];return this.setPluginState({offlineMode:!1}),r.length>0&&(this.displayMessage(`Pulled ${r.length} ${r.length==1?"file":"files"} from remote`),this.lastPulledFiles=r),r.length}catch(r){return this.displayError(r),!1}}async fetch(){if(await this.remotesAreSet())try{await this.gitManager.fetch(),this.displayMessage("Fetched from remote"),this.setPluginState({offlineMode:!1}),this.app.workspace.trigger("obsidian-git:refresh")}catch(r){this.displayError(r)}}async mayDeleteConflictFile(){let r=this.app.vault.getAbstractFileByPath(Ms);r&&(this.app.workspace.iterateAllLeaves(n=>{var i;n.view instanceof Ce.MarkdownView&&((i=n.view.file)==null?void 0:i.path)==r.path&&n.detach()}),await this.app.vault.delete(r))}async stageFile(r){return await this.isAllInitialized()?(await this.gitManager.stage(r.path,!0),this.displayMessage(`Staged ${r.path}`),this.app.workspace.trigger("obsidian-git:refresh"),this.setPluginState({gitAction:0}),!0):!1}async unstageFile(r){return await this.isAllInitialized()?(await this.gitManager.unstage(r.path,!0),this.displayMessage(`Unstaged ${r.path}`),this.app.workspace.trigger("obsidian-git:refresh"),this.setPluginState({gitAction:0}),!0):!1}async switchBranch(){var i;if(!await this.isAllInitialized())return;let r=await this.gitManager.branchInfo(),n=await new Hd(this,r.branches).openAndGetReslt();if(n!=null)return await this.gitManager.checkout(n),this.displayMessage(`Switched to ${n}`),this.app.workspace.trigger("obsidian-git:refresh"),await((i=this.branchBar)==null?void 0:i.display()),n}async switchRemoteBranch(){var a;if(!await this.isAllInitialized())return;let r=await this.selectRemoteBranch()||"",[n,i]=Ii(r);if(i!=null&&n!=null)return await this.gitManager.checkout(i,n),this.displayMessage(`Switched to ${r}`),await((a=this.branchBar)==null?void 0:a.display()),r}async createBranch(){var n;if(!await this.isAllInitialized())return;let r=await new Fe(this,{placeholder:"Create new branch"}).openAndGetResult();if(r!=null)return await this.gitManager.createBranch(r),this.displayMessage(`Created new branch ${r}`),await((n=this.branchBar)==null?void 0:n.display()),r}async deleteBranch(){var i;if(!await this.isAllInitialized())return;let r=await this.gitManager.branchInfo();r.current&&r.branches.remove(r.current);let n=await new Fe(this,{options:r.branches,placeholder:"Delete branch",onlySelection:!0}).openAndGetResult();if(n!=null){let a=!1;if(!await this.gitManager.branchIsMerged(n)){let o=await new Fe(this,{options:["YES","NO"],placeholder:"This branch isn't merged into HEAD. Force delete?",onlySelection:!0}).openAndGetResult();if(o!=="YES")return;a=o==="YES"}return await this.gitManager.deleteBranch(n,a),this.displayMessage(`Deleted branch ${n}`),await((i=this.branchBar)==null?void 0:i.display()),n}}async remotesAreSet(){return this.settings.updateSubmodules||(await this.gitManager.branchInfo()).tracking?!0:(new Ce.Notice("No upstream branch is set. Please select one."),await this.setUpstreamBranch())}async setUpstreamBranch(){let r=await this.selectRemoteBranch();return r==null?(this.displayError("Aborted. No upstream-branch is set!",1e4),this.setPluginState({gitAction:0}),!1):(await this.gitManager.updateUpstreamBranch(r),this.displayMessage(`Set upstream branch to ${r}`),this.setPluginState({gitAction:0}),!0)}async discardAll(){await this.gitManager.discardAll({status:this.cachedStatus}),new Ce.Notice("All local changes have been discarded. New files remain untouched."),this.app.workspace.trigger("obsidian-git:refresh")}async handleConflict(r){this.localStorage.setConflict(!0);let n;r!==void 0&&(n=["# Conflicts","Please resolve them and commit them using the commands `Git: Commit all changes` followed by `Git: Push`","(This file will automatically be deleted before commit)","[[#Additional Instructions]] available below file list","",...r.map(i=>{let a=this.app.vault.getAbstractFileByPath(i);return a instanceof Ce.TFile?`- [[${this.app.metadataCache.fileToLinktext(a,"/")}]]`:`- Not a file: ${i}`}),` +${(0,Mv.moment)(t.log.date).format(t.plugin.settings.commitDateFormat)} +${t.log.message}`)}),l.__click=[$9,i];var c=j(l),u=Z(c,2),f=j(u);{var d=_=>{var k=L9(),w=j(k,!0);Ae(()=>Oe(w,t.log.refs.join(", "))),B(k),ne(_,k)};ye(f,_=>{t.log.refs.length>0&&_(d)})}var h=Z(f,2);{var p=_=>{var k=D9(),w=j(k,!0);Ae(()=>Oe(w,a(t.log))),B(k),ne(_,k)};ye(h,_=>{var k;t.plugin.settings.authorInHistoryView!="hide"&&((k=t.log.author)!=null&&k.name)&&_(p)})}var m=Z(h,2);{var v=_=>{var k=N9(),w=j(k,!0);Ae(()=>Oe(w,(0,Mv.moment)(t.log.date).format(t.plugin.settings.commitDateFormat))),B(k),ne(_,k)};ye(m,_=>{t.plugin.settings.dateInHistoryView&&_(v)})}var y=Z(m,2),b=j(y,!0);B(y),B(u),B(l);var x=Z(l,2);{var E=_=>{var k=B9(),w=j(k);{var A=T=>{bc(T,{get hierarchy(){return R(r)},get plugin(){return t.plugin},get view(){return t.view},topLevel:!0})},S=T=>{var P=si(),I=cr(P);Cr(I,17,()=>t.log.diff.files,Tr,(N,L)=>{wc(N,{get view(){return t.view},get diff(){return R(L)}})}),ne(T,P)};ye(w,T=>{t.showTree?T(A):T(S,!1)})}B(k),dn(3,k,()=>Ln,()=>({duration:150})),ne(_,k)};ye(x,_=>{R(i)||_(E)})}B(o),B(s),Ae(()=>{lt(o,"is-collapsed",R(i)),me(l,"data-tooltip-position",R(n)),lt(c,"is-collapsed",R(i)),Oe(b,t.log.message)}),ne(e,s),Ke()}mt(["click"]);function U9(e,t){t().catch(console.error)}var G9=(e,t,r,n)=>{re(t,!R(t)),(0,Iv.setIcon)(r[0],R(t)?"list":"folder"),n(n().settings.treeStructure=R(t),!0),n().saveSettings()},z9=se(''),V9=se('
'),W9={hash:"svelte-45h",code:""};function Fv(e,t){Ze(t,!0),wt(e,W9);let r=Fn(t,"plugin",15),n=pt(!1),i=_e([]),a=pt(void 0),s=pt(_e(r().settings.treeStructure)),o,l;Dt(()=>{l&&l.empty()}),o=t.view.app.workspace.on("obsidian-git:head-change",()=>void c().catch(console.error)),Dt(()=>{i.forEach(x=>(0,Iv.setIcon)(x,x.getAttr("data-icon")))}),AP(()=>{t.view.app.workspace.offref(o)}),Tv(()=>{let x=new IntersectionObserver(_=>{_[0].isIntersecting&&!R(n)&&u().catch(console.error)}),E=document.querySelector("#sentinel");return E&&x.observe(E),()=>{x.disconnect()}}),c().catch(console.error);function c(){return Mo(this,void 0,void 0,function*(){var x;if(!r().gitReady){re(a,void 0);return}re(n,!0);let E=r().gitManager instanceof Ce,_;((x=R(a)===null||R(a)===void 0?void 0:R(a).length)!==null&&x!==void 0?x:0)==0?_=E?50:10:_=R(a).length,re(a,_e(yield r().gitManager.log(void 0,!1,_))),re(n,!1)})}function u(){return Mo(this,void 0,void 0,function*(){var x;if(!r().gitReady||R(a)===void 0)return;re(n,!0);let _=r().gitManager instanceof Ce?50:10,k=yield r().gitManager.log(void 0,!1,_,(x=R(a).last())===null||x===void 0?void 0:x.hash);R(a).push(...k.slice(1)),re(n,!1)})}var f=V9(),d=j(f),h=j(d),p=j(h);p.__click=[G9,s,i,r],Ue(p,x=>i[0]=x,()=>i==null?void 0:i[0]);var m=Z(p,2);m.__click=[U9,c],Ue(m,x=>i[1]=x,()=>i==null?void 0:i[1]),B(h),B(d);var v=Z(d,2),y=j(v);{var b=x=>{var E=z9();Cr(E,21,()=>R(a),Tr,(_,k)=>{Ov(_,{get view(){return t.view},get showTree(){return R(s)},get log(){return R(k)},get plugin(){return r()}})}),B(E),ne(x,E)};ye(y,x=>{R(a)&&x(b)})}_o(4),B(v),B(f),Ae(()=>{me(p,"data-icon",R(s)?"list":"folder"),lt(m,"loading",R(n))}),ne(e,f),Ke()}mt(["click"]);var _c=class extends CP.ItemView{constructor(t,r){super(t),this.plugin=r,this.hoverPopover=null}getViewType(){return Lr.type}getDisplayText(){return Lr.name}getIcon(){return Lr.icon}onClose(){return this._view&&oi(this._view),super.onClose()}reload(){this._view&&oi(this._view),this._view=Vi(Fv,{target:this.contentEl,props:{plugin:this.plugin,view:this}})}onOpen(){return this.reload(),super.onOpen()}};g();var PP=require("obsidian"),Xd=class extends PP.FuzzySuggestModal{constructor(r,n){super(r.app);this.branches=n;this.setPlaceholder("Select branch to checkout")}getItems(){return this.branches}getItemText(r){return r}onChooseItem(r,n){this.resolve(r)}openAndGetReslt(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}};g();var $P=require("obsidian");g();var qa=require("obsidian");g();var RP=require("obsidian"),qi=class extends RP.Modal{constructor(r,n,i){super(r);this.deletion=n;this.filename=i;this.resolve=null}myOpen(){return this.open(),new Promise(r=>{this.resolve=r})}onOpen(){let{contentEl:r,titleEl:n}=this;n.setText(`${this.deletion?"Delete":"Discard"} this file?`),r.createEl("p").setText(`Do you really want to ${this.deletion?"delete":"discard the changes of"} "${this.filename}"`);let i=r.createDiv({cls:"modal-button-container"}),a=i.createEl("button",{cls:"mod-warning",text:this.deletion?"Delete":"Discard"});a.addEventListener("click",()=>{this.resolve&&this.resolve(!0),this.close()}),a.addEventListener("keypress",()=>{this.resolve&&this.resolve(!0),this.close()});let s=i.createEl("button",{text:"Cancel"});s.addEventListener("click",()=>(this.resolve&&this.resolve(!1),this.close())),s.addEventListener("keypress",()=>(this.resolve&&this.resolve(!1),this.close()))}onClose(){let{contentEl:r}=this;r.empty()}};g();var Zd=require("obsidian");g();g();var q9=ze(MP()),Yi=require("obsidian");function za(e,t,r){let n=e.target;app.workspace.trigger("hover-link",{event:e,source:t.getViewType(),hoverParent:t,targetEl:n,linktext:r})}function Y9(e,t){t.view.app.vault.getAbstractFileByPath(t.change.vaultPath)&&za(e,t.view,t.change.vaultPath)}function X9(e,t){e.stopPropagation(),t.manager.stage(t.change.path,!1).catch(r=>t.view.plugin.displayError(r)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}function Z9(e,t){e.stopPropagation();let r=t.change.workingDir=="U";new qi(t.view.app,r,t.change.vaultPath).myOpen().then(n=>{if(n===!0)return r?t.view.app.vault.adapter.remove(t.change.vaultPath).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")}):t.manager.discard(t.change.path).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})},n=>t.view.plugin.displayError(n))}var K9=se('
'),J9=se('
'),Q9={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function Sc(e,t){Ze(t,!0),wt(e,Q9);let r=_e([]),n=Xe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");Dt(()=>{for(let x of r)x&&(0,Zd.setIcon)(x,x.getAttr("data-icon"))});function i(x){x.stopPropagation(),Ws(t.change.path)?a(x):s(x)}function a(x){var E;x.stopPropagation();let _=t.view.app.vault.getAbstractFileByPath(t.change.vaultPath);_ instanceof Zd.TFile&&((E=nn(t.view.app,x))===null||E===void 0||E.openFile(_).catch(k=>t.view.plugin.displayError(k)))}function s(x){x.stopPropagation(),t.view.plugin.tools.openDiff({aFile:t.change.path,aRef:"",event:x})}var o=J9();o.__mouseover=[Y9,t],o.__click=i;var l=j(o),c=j(l),u=j(c,!0);Ae(()=>Oe(u,Cn(t.change.vaultPath))),B(c);var f=Z(c,2),d=j(f),h=j(d);{var p=x=>{var E=K9();E.__click=a,Ue(E,_=>r[0]=_,()=>r==null?void 0:r[0]),kr("auxclick",E,a),ne(x,E)};ye(h,x=>{qs(t.change.vaultPath,t.view.app)&&x(p)})}var m=Z(h,2);m.__click=[Z9,t],Ue(m,x=>r[1]=x,()=>r==null?void 0:r[1]);var v=Z(m,2);v.__click=[X9,t],Ue(v,x=>r[2]=x,()=>r==null?void 0:r[2]),B(d);var y=Z(d,2),b=j(y,!0);B(y),B(f),B(l),B(o),Ae(()=>{me(l,"data-path",t.change.vaultPath),me(l,"data-tooltip-position",R(n)),me(l,"aria-label",t.change.vaultPath),me(y,"data-type",t.change.workingDir),Oe(b,t.change.workingDir)}),kr("auxclick",o,x=>{x.stopPropagation(),x.button==2?Tn(t.view.app,x,t.change.vaultPath,t.view.leaf,"git-source-control"):i(x)}),ne(e,o),Ke()}mt(["mouseover","click"]);g();var OP=require("obsidian");function eH(e,t){t.view.app.vault.getAbstractFileByPath(t.change.vaultPath)&&za(e,t.view,t.change.vaultPath)}var tH=se('
'),rH={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function Ec(e,t){Ze(t,!0),wt(e,rH);let r=Xe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");function n(f){var d;f.stopPropagation();let h=t.view.app.vault.getAbstractFileByPath(t.change.vaultPath);h instanceof OP.TFile&&((d=nn(t.view.app,f))===null||d===void 0||d.openFile(h).catch(p=>t.view.plugin.displayError(p)))}var i=tH();i.__mouseover=[eH,t],i.__click=n;var a=j(i),s=j(a),o=j(s,!0);Ae(()=>Oe(o,Cn(t.change.vaultPath))),B(s);var l=Z(s,2),c=j(l),u=j(c,!0);B(c),B(l),B(a),B(i),Ae(()=>{me(a,"data-path",t.change.vaultPath),me(a,"data-tooltip-position",R(r)),me(a,"aria-label",t.change.vaultPath),me(c,"data-type",t.change.workingDir),Oe(u,t.change.workingDir)}),kr("auxclick",i,f=>{f.stopPropagation(),f.button==2?Tn(t.view.app,f,t.change.vaultPath,t.view.leaf,"git-source-control"):n(f)}),ne(e,i),Ke()}mt(["mouseover","click"]);g();var Kd=require("obsidian");function nH(e,t){t.view.app.vault.getFileByPath(t.change.vaultPath)&&za(e,t.view,t.change.vaultPath)}function iH(e,t){e.stopPropagation(),t.manager.unstage(t.change.path,!1).catch(r=>t.view.plugin.displayError(r)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}var aH=se('
'),sH=se('
'),oH={hash:"svelte-1wbh8tp",code:"main.svelte-1wbh8tp .nav-file-title:where(.svelte-1wbh8tp) {align-items:center;}"};function Ac(e,t){Ze(t,!0),wt(e,oH);let r=_e([]),n=Xe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");Dt(()=>{for(let b of r)b&&(0,Kd.setIcon)(b,b.getAttr("data-icon"))});function i(b){b.stopPropagation(),Ws(t.change.path)?a(b):s(b)}function a(b){var x;b.stopPropagation();let E=t.view.app.vault.getAbstractFileByPath(t.change.vaultPath);E instanceof Kd.TFile&&((x=nn(t.view.app,b))===null||x===void 0||x.openFile(E).catch(_=>t.view.plugin.displayError(_)))}function s(b){b.stopPropagation(),t.view.plugin.tools.openDiff({aFile:t.change.path,aRef:"HEAD",bRef:"",event:b})}var o=sH();o.__mouseover=[nH,t],o.__click=i;var l=j(o),c=j(l),u=j(c,!0);Ae(()=>Oe(u,Cn(t.change.vaultPath))),B(c);var f=Z(c,2),d=j(f),h=j(d);{var p=b=>{var x=aH();x.__click=a,Ue(x,E=>r[0]=E,()=>r==null?void 0:r[0]),ne(b,x)};ye(h,b=>{qs(t.change.vaultPath,t.view.app)&&b(p)})}var m=Z(h,2);m.__click=[iH,t],Ue(m,b=>r[1]=b,()=>r==null?void 0:r[1]),B(d);var v=Z(d,2),y=j(v,!0);B(v),B(f),B(l),B(o),Ae(()=>{me(l,"data-path",t.change.vaultPath),me(l,"data-tooltip-position",R(n)),me(l,"aria-label",t.change.vaultPath),me(v,"data-type",t.change.index),Oe(y,t.change.index)}),kr("auxclick",o,b=>{b.stopPropagation(),b.button==2?Tn(t.view.app,b,t.change.vaultPath,t.view.leaf,"git-source-control"):i(b)}),ne(e,o),Ke()}mt(["mouseover","click"]);g();g();var lH=se(''),cH=se("
");function Va(e,t){Ze(t,!0);var r=cH(),n=j(r);{var i=a=>{var s=lH(),o=j(s),l=j(o),c=j(l,!0);B(l),B(o),B(s),Ae(()=>{me(o,"aria-label","And "+(t.files.length-500)+" more files"),Oe(c,"And "+(t.files.length-500)+" more files")}),ne(a,s)};ye(n,a=>{t.files.length>500&&a(i)})}B(r),ne(e,r),Ke()}var fH=se("
"),dH=(e,t,r)=>t(R(r)),hH=(e,t,r)=>t(e,R(r).path),pH=se('
'),mH=(e,t,r)=>t(e,R(r)),gH=(e,t,r)=>t(e,R(r).path),vH=se('
',1),yH=se(''),wH=se(''),bH=se('
'),_H={hash:"svelte-hup5mn",code:"main.svelte-hup5mn .nav-folder-title:where(.svelte-hup5mn) {align-items:center;}"};function Wa(e,t){Ze(t,!0),wt(e,_H);var r,n;let i=Fn(t,"topLevel",3,!1),a=_e({});for(let p of t.hierarchy.children)a[p.title]=((n=(r=p.children)===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0)>100;let s=Xe(()=>t.view.leaf.getRoot().side=="left"?"right":"left");function o(p,m){p.stopPropagation(),t.plugin.gitManager.stageAll({dir:m}).catch(v=>t.plugin.displayError(v)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}function l(p,m){p.stopPropagation(),t.plugin.gitManager.unstageAll({dir:m}).catch(v=>t.plugin.displayError(v)).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})}function c(p,m){p.stopPropagation(),new qi(t.view.app,!1,m.vaultPath).myOpen().then(v=>{if(v===!0)return t.plugin.gitManager.discardAll({dir:m.path,status:t.plugin.cachedStatus}).finally(()=>{t.view.app.workspace.trigger("obsidian-git:refresh")})},v=>t.plugin.displayError(v))}function u(p){a[p.title]=!a[p.title]}var f=bH(),d=j(f);Cr(d,17,()=>ql(t.hierarchy.children,500),Tr,(p,m)=>{var v=si(),y=cr(v);{var b=E=>{var _=fH(),k=j(_);{var w=S=>{Ac(S,{get change(){return R(m).data},get manager(){return t.plugin.gitManager},get view(){return t.view}})},A=S=>{var T=si(),P=cr(T);{var I=L=>{Sc(L,{get change(){return R(m).data},get manager(){return t.plugin.gitManager},get view(){return t.view}})},N=L=>{var ee=si(),fe=cr(ee);{var J=Q=>{Ec(Q,{get change(){return R(m).data},get view(){return t.view}})};ye(fe,Q=>{t.fileType==2&&Q(J)},!0)}ne(L,ee)};ye(P,L=>{t.fileType==1?L(I):L(N,!1)},!0)}ne(S,T)};ye(k,S=>{t.fileType==0?S(w):S(A,!1)})}B(_),ne(E,_)},x=E=>{var _=wH();_.__click=[dH,u,m];var k=j(_),w=Z(j(k),2),A=Z(w,2),S=j(A,!0);B(A);var T=Z(A,2),P=j(T),I=j(P);{var N=J=>{var Q=pH();Q.__click=[hH,l,m],ne(J,Q)},L=J=>{var Q=vH(),Pe=cr(Q);Pe.__click=[mH,c,m];var ge=Z(Pe,2);ge.__click=[gH,o,m],ne(J,Q)};ye(I,J=>{t.fileType==0?J(N):J(L,!1)})}_o(2),B(P),B(T),B(k);var ee=Z(k,2);{var fe=J=>{var Q=yH(),Pe=j(Q);Wa(Pe,{get hierarchy(){return R(m)},get plugin(){return t.plugin},get view(){return t.view},get fileType(){return t.fileType}}),B(Q),dn(3,Q,()=>Ln,()=>({duration:150})),ne(J,Q)};ye(ee,J=>{a[R(m).title]||J(fe)})}B(_),Ae(()=>{lt(_,"is-collapsed",a[R(m).title]),me(k,"data-tooltip-position",R(s)),me(k,"aria-label",R(m).vaultPath),lt(w,"is-collapsed",a[R(m).title]),Oe(S,R(m).title)}),kr("auxclick",_,J=>Tn(t.view.app,J,R(m).vaultPath,t.view.leaf,"git-source-control")),ne(E,_)};ye(y,E=>{R(m).data?E(b):E(x,!1)})}ne(p,v)});var h=Z(d,2);Va(h,{get files(){return t.hierarchy.children}}),B(f),Ae(()=>lt(f,"topLevel",i())),ne(e,f),Ke()}mt(["click"]);function xH(e,t,r,n,i,a){return Mo(this,void 0,void 0,function*(){if(re(t,!0),R(r)){if(yield n().tools.hasTooBigFiles(R(r).staged))return n().setPluginState({gitAction:0}),!1;n().promiseQueue.addTask(()=>n().gitManager.commit({message:R(i)}).then(()=>re(i,_e(n().settings.commitMessage))).finally(a))}})}function IP(e,t,r,n,i){re(t,!0),r().promiseQueue.addTask(()=>r().gitManager.stageAll({status:R(n)}).finally(i))}function FP(e,t,r,n,i){re(t,!0),r().promiseQueue.addTask(()=>r().gitManager.unstageAll({status:R(n)}).finally(i))}function SH(e,t,r,n){re(t,!0),r().promiseQueue.addTask(()=>r().push().finally(n))}function EH(e,t,r,n){re(t,!0),r().promiseQueue.addTask(()=>r().pullChangesFromRemote().finally(n))}function AH(e,t,r){e.stopPropagation(),new qi(t().app,!1,r().gitManager.getRelativeVaultPath("/")).myOpen().then(n=>{n===!0&&r().promiseQueue.addTask(()=>r().gitManager.discardAll({status:r().cachedStatus}).finally(()=>{t().app.workspace.trigger("obsidian-git:refresh")}))},console.error)}var kH=(e,t,r,n)=>{re(t,!R(t)),(0,qa.setIcon)(r[6],R(t)?"list":"folder"),n().settings.treeStructure=R(t),n().saveSettings()},TH=(e,t)=>re(t,""),CH=se('
'),PH=(e,t)=>re(t,!R(t)),RH=se(" ",1),MH=se(''),OH=(e,t)=>re(t,!R(t)),IH=se(" ",1),FH=se(''),$H=(e,t)=>re(t,!R(t)),LH=se(" ",1),DH=se(''),NH=se(''),BH=se(''),jH=se('
'),HH={hash:"svelte-11adhly",code:`.commit-msg-input.svelte-11adhly {width:100%;overflow:hidden;resize:none;padding:7px 5px;background-color:var(--background-modifier-form-field);}.git-commit-msg.svelte-11adhly {position:relative;padding:0;width:calc(100% - var(--size-4-8));margin:4px auto;}main.svelte-11adhly .git-tools:where(.svelte-11adhly) .files-count:where(.svelte-11adhly) {padding-left:var(--size-2-1);width:11px;display:flex;align-items:center;justify-content:center;}.nav-folder-title.svelte-11adhly {align-items:center;}.git-commit-msg-clear-button.svelte-11adhly {position:absolute;background:transparent;border-radius:50%;color:var(--search-clear-button-color);cursor:var(--cursor);top:-4px;right:2px;bottom:0px;line-height:0;height:var(--input-height);width:28px;margin:auto;padding:0 0;text-align:center;display:flex;justify-content:center;align-items:center;transition:color 0.15s ease-in-out;}.git-commit-msg-clear-button.svelte-11adhly:after {content:"";height:var(--search-clear-button-size);width:var(--search-clear-button-size);display:block;background-color:currentColor;mask-image:url("data:image/svg+xml,");mask-repeat:no-repeat;-webkit-mask-image:url("data:image/svg+xml,");-webkit-mask-repeat:no-repeat;}`};function Lv(e,t){Ze(t,!0),wt(e,HH);let r=Fn(t,"plugin",7),n=Fn(t,"view",7),i=pt(!1),a=pt(void 0),s=pt(_e([])),o=pt(_e(r().settings.commitMessage)),l=_e([]),c=pt(void 0),u=pt(void 0),f=pt(void 0),d=pt(!0),h=pt(!0),p=pt(!0),m=pt(0),v=pt(_e(r().settings.treeStructure));n().registerEvent(n().app.workspace.on("obsidian-git:loading-status",()=>re(i,!0))),n().registerEvent(n().app.workspace.on("obsidian-git:status-changed",()=>void b().catch(console.error))),n().plugin.cachedStatus==null?n().plugin.refresh().catch(console.error):b().catch(console.error),Dt(()=>{l.forEach(O=>(0,qa.setIcon)(O,O.getAttr("data-icon")))}),Dt(()=>{l.forEach(O=>{var he,Ge;!O||O.id!="push"||(qa.Platform.isMobile?(O.removeClass("button-border"),R(m)>0&&O.addClass("button-border")):((he=O.firstElementChild)===null||he===void 0||he.removeAttribute("color"),R(m)>0&&((Ge=O.firstElementChild)===null||Ge===void 0||Ge.setAttr("color","var(--text-accent)"))))})}),n().scope=new qa.Scope(r().app.scope),n().scope.register(["Ctrl"],"Enter",O=>y());function y(){if(re(i,!0),R(a)){let O=R(a).staged.length>0;r().promiseQueue.addTask(()=>r().commitAndSync({fromAutoBackup:!1,commitMessage:R(o),onlyStaged:O}).then(()=>{re(o,_e(r().settings.commitMessage))}).finally(x))}}function b(){return Mo(this,void 0,void 0,function*(){if(!r().gitReady){re(a,void 0);return}if(re(m,_e(yield r().gitManager.getUnpushedCommits())),re(a,_e(r().cachedStatus)),re(i,!1),r().lastPulledFiles&&r().lastPulledFiles!=R(s)&&(re(s,_e(r().lastPulledFiles)),re(f,_e({title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(R(s))}))),R(a)){let O=(he,Ge)=>he.vaultPath.split("/").last().localeCompare(Cn(Ge.vaultPath));R(a).changed.sort(O),R(a).staged.sort(O),re(c,_e({title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(R(a).changed)})),re(u,_e({title:"",path:"",vaultPath:"",children:r().gitManager.getTreeStructure(R(a).staged)}))}else re(c,void 0),re(u,void 0)})}function x(){n().app.workspace.trigger("obsidian-git:refresh")}let E=Xe(()=>(R(o).match(/\n/g)||[]).length+1||1);var _=jH(),k=j(_),w=j(k),A=j(w);A.__click=y,Ue(A,O=>l[0]=O,()=>l==null?void 0:l[0]);var S=Z(A,2);S.__click=[xH,i,a,r,o,x],Ue(S,O=>l[1]=O,()=>l==null?void 0:l[1]);var T=Z(S,2);T.__click=[IP,i,r,a,x],Ue(T,O=>l[2]=O,()=>l==null?void 0:l[2]);var P=Z(T,2);P.__click=[FP,i,r,a,x],Ue(P,O=>l[3]=O,()=>l==null?void 0:l[3]);var I=Z(P,2);I.__click=[SH,i,r,x],Ue(I,O=>l[4]=O,()=>l==null?void 0:l[4]);var N=Z(I,2);N.__click=[EH,i,r,x],Ue(N,O=>l[5]=O,()=>l==null?void 0:l[5]);var L=Z(N,2);L.__click=[kH,v,l,r],Ue(L,O=>l[6]=O,()=>l==null?void 0:l[6]);var ee=Z(L,2);ee.__click=x,Ue(ee,O=>l[7]=O,()=>l==null?void 0:l[7]),B(w),B(k);var fe=Z(k,2),J=j(fe);pv(J);var Q=Z(J,2);{var Pe=O=>{var he=CH();he.__click=[TH,o],me(he,"aria-label","Clear"),ne(O,he)};ye(Q,O=>{R(o)&&O(Pe)})}B(fe);var ge=Z(fe,2),z=j(ge);{var Y=O=>{var he=BH(),Ge=j(he),gt=j(Ge);gt.__click=[PH,h];var Re=j(gt),ct=Z(Re,4),rt=j(ct),Et=j(rt);Et.__click=[FP,i,r,a,x],Ue(Et,Bt=>l[8]=Bt,()=>l==null?void 0:l[8]),B(rt);var Ie=Z(rt,2),H=j(Ie,!0);B(Ie),B(ct),B(gt);var Je=Z(gt,2);{var D=Bt=>{var Kt=MH(),ci=j(Kt);{var Ya=jt=>{Wa(jt,{get hierarchy(){return R(u)},get plugin(){return r()},get view(){return n()},get fileType(){return 0},topLevel:!0})},Oo=jt=>{var Zi=RH(),Dn=cr(Zi);Cr(Dn,17,()=>ql(R(a).staged,500),Tr,(Io,Fo)=>{Ac(Io,{get change(){return R(Fo)},get view(){return n()},get manager(){return r().gitManager}})});var ui=Z(Dn,2);Va(ui,{get files(){return R(a).staged}}),ne(jt,Zi)};ye(ci,jt=>{R(v)?jt(Ya):jt(Oo,!1)})}B(Kt),dn(3,Kt,()=>Ln,()=>({duration:150})),ne(Bt,Kt)};ye(Je,Bt=>{R(h)&&Bt(D)})}B(Ge);var q=Z(Ge,2),ve=j(q);ve.__click=[OH,d];var Ne=j(ve),bt=Z(Ne,4),Xi=j(bt),Dv=j(Xi);Dv.__click=[AH,n,r];var Nv=Z(Dv,2);Nv.__click=[IP,i,r,a,x],Ue(Nv,Bt=>l[9]=Bt,()=>l==null?void 0:l[9]),B(Xi);var Bv=Z(Xi,2),DP=j(Bv,!0);B(Bv),B(bt),B(ve);var NP=Z(ve,2);{var BP=Bt=>{var Kt=FH(),ci=j(Kt);{var Ya=jt=>{Wa(jt,{get hierarchy(){return R(c)},get plugin(){return r()},get view(){return n()},get fileType(){return 1},topLevel:!0})},Oo=jt=>{var Zi=IH(),Dn=cr(Zi);Cr(Dn,17,()=>ql(R(a).changed,500),Tr,(Io,Fo)=>{Sc(Io,{get change(){return R(Fo)},get view(){return n()},get manager(){return r().gitManager}})});var ui=Z(Dn,2);Va(ui,{get files(){return R(a).changed}}),ne(jt,Zi)};ye(ci,jt=>{R(v)?jt(Ya):jt(Oo,!1)})}B(Kt),dn(3,Kt,()=>Ln,()=>({duration:150})),ne(Bt,Kt)};ye(NP,Bt=>{R(d)&&Bt(BP)})}B(q);var jP=Z(q,2);{var HP=Bt=>{var Kt=NH(),ci=j(Kt);ci.__click=[$H,p];var Ya=Z(j(ci),4),Oo=j(Ya,!0);B(Ya),B(ci);var jt=Z(ci,2);{var Zi=Dn=>{var ui=DH(),Io=j(ui);{var Fo=Xa=>{Wa(Xa,{get hierarchy(){return R(f)},get plugin(){return r()},get view(){return n()},get fileType(){return 2},topLevel:!0})},UP=Xa=>{var jv=LH(),Hv=cr(jv);Cr(Hv,17,()=>R(s),Tr,(zP,VP)=>{Ec(zP,{get change(){return R(VP)},get view(){return n()}})});var GP=Z(Hv,2);Va(GP,{get files(){return R(s)}}),ne(Xa,jv)};ye(Io,Xa=>{R(v)?Xa(Fo):Xa(UP,!1)})}B(ui),dn(3,ui,()=>Ln,()=>({duration:150})),ne(Dn,ui)};ye(jt,Dn=>{R(p)&&Dn(Zi)})}B(Kt),Ae(()=>{lt(Kt,"is-collapsed",!R(p)),Oe(Oo,R(s).length)}),ne(Bt,Kt)};ye(jP,Bt=>{R(s).length>0&&R(f)&&Bt(HP)})}B(he),Ae(()=>{lt(Ge,"is-collapsed",!R(h)),lt(Re,"is-collapsed",!R(h)),Oe(H,R(a).staged.length),lt(q,"is-collapsed",!R(d)),lt(Ne,"is-collapsed",!R(d)),Oe(DP,R(a).changed.length)}),ne(O,he)};ye(z,O=>{R(a)&&R(u)&&R(c)&&O(Y)})}B(ge),B(_),Ae(()=>{me(_,"data-type",kt.type),me(L,"data-icon",R(v)?"list":"folder"),lt(ee,"loading",R(i)),me(J,"rows",R(E))}),kv(J,()=>R(o),O=>re(o,O)),ne(e,_),Ke()}mt(["click"]);var kc=class extends $P.ItemView{constructor(t,r){super(t),this.plugin=r,this.hoverPopover=null}getViewType(){return kt.type}getDisplayText(){return kt.name}getIcon(){return kt.icon}onClose(){return this._view&&oi(this._view),super.onClose()}reload(){this._view&&oi(this._view),this._view=Vi(Lv,{target:this.contentEl,props:{plugin:this.plugin,view:this}})}onOpen(){return this.reload(),super.onOpen()}};g();var Jd=class{constructor(t,r){this.statusBarEl=t;this.plugin=r;this.statusBarEl.addClass("mod-clickable"),this.statusBarEl.onClickEvent(n=>{this.plugin.switchBranch().catch(i=>r.displayError(i))})}async display(){if(this.plugin.gitReady){let t=await this.plugin.gitManager.branchInfo();t.current!=null?this.statusBarEl.setText(t.current):this.statusBarEl.empty()}else this.statusBarEl.empty()}remove(){this.statusBarEl.remove()}};var Qd=class extends xe.Plugin{constructor(){super(...arguments);this.automaticsManager=new Jl(this);this.tools=new ec(this);this.localStorage=new cd(this);this.state={gitAction:0,offlineMode:!1};this.gitReady=!1;this.promiseQueue=new nd(this);this.intervalsToClear=[];this.lineAuthoringFeature=new rd(this)}setPluginState(r){var n;this.state=Object.assign(this.state,r),(n=this.statusBar)==null||n.display()}async updateCachedStatus(){var r,n;return this.app.workspace.trigger("obsidian-git:loading-status"),this.cachedStatus=await this.gitManager.status(),this.cachedStatus.conflicted.length>0?(this.localStorage.setConflict(!0),await((r=this.branchBar)==null?void 0:r.display())):(this.localStorage.setConflict(!1),await((n=this.branchBar)==null?void 0:n.display())),this.app.workspace.trigger("obsidian-git:status-changed",this.cachedStatus),this.cachedStatus}async refresh(){if(!this.gitReady)return;let r=this.app.workspace.getLeavesOfType(kt.type),n=this.app.workspace.getLeavesOfType(Lr.type);(this.settings.changedFilesInStatusBar||r.some(i=>{var a;return!((a=i.isDeferred)!=null&&a)})||n.some(i=>{var a;return!((a=i.isDeferred)!=null&&a)}))&&await this.updateCachedStatus().catch(i=>this.displayError(i)),this.app.workspace.trigger("obsidian-git:refreshed")}refreshUpdatedHead(){this.lineAuthoringFeature.refreshLineAuthorViews()}async onload(){console.log("loading "+this.manifest.name+" plugin: v"+this.manifest.version),Kl.plugin=this,this.localStorage.migrate(),await this.loadSettings(),await this.migrateSettings(),this.settingsTab=new Uf(this.app,this),this.addSettingTab(this.settingsTab),this.localStorage.getPluginDisabled()||(this.registerStuff(),this.app.workspace.onLayoutReady(()=>this.init({fromReload:!1}).catch(r=>this.displayError(r))))}onExternalSettingsChange(){this.reloadSettings().catch(r=>this.displayError(r))}async reloadSettings(){let r=JSON.stringify(this.settings);await this.loadSettings();let n=JSON.stringify(this.settings);r!==n&&(this.log("Reloading settings"),this.unloadPlugin(),await this.init({fromReload:!0}),this.app.workspace.getLeavesOfType(kt.type).forEach(i=>{var a;if(!((a=i.isDeferred)!=null&&a))return i.view.reload()}),this.app.workspace.getLeavesOfType(Lr.type).forEach(i=>{var a;if(!((a=i.isDeferred)!=null&&a))return i.view.reload()}))}registerStuff(){this.registerEvent(this.app.workspace.on("obsidian-git:refresh",()=>{this.refresh().catch(r=>this.displayError(r))})),this.registerEvent(this.app.workspace.on("obsidian-git:head-change",()=>{this.refreshUpdatedHead()})),this.registerEvent(this.app.workspace.on("file-menu",(r,n,i)=>{this.handleFileMenu(r,n,i,"file-manu")})),this.registerEvent(this.app.workspace.on("obsidian-git:menu",(r,n,i)=>{this.handleFileMenu(r,n,i,"obsidian-git:menu")})),this.registerEvent(this.app.workspace.on("active-leaf-change",r=>{this.onActiveLeafChange(r)})),this.registerEvent(this.app.vault.on("modify",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("delete",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("create",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerEvent(this.app.vault.on("rename",()=>{var r;this.debRefresh(),(r=this.autoCommitDebouncer)==null||r.call(this)})),this.registerView(kt.type,r=>new kc(r,this)),this.registerView(Lr.type,r=>new _c(r,this)),this.registerView(Ti.type,r=>new Ra(r,this)),this.registerView(ki.type,r=>new Ia(r,this)),this.addRibbonIcon("git-pull-request","Open Git source control",async()=>{var i;let r=this.app.workspace.getLeavesOfType(kt.type),n;r.length===0?(n=(i=this.app.workspace.getRightLeaf(!1))!=null?i:this.app.workspace.getLeaf(),await n.setViewState({type:kt.type})):n=r.first(),await this.app.workspace.revealLeaf(n)}),this.registerHoverLinkSource(kt.type,{display:"Git View",defaultMod:!0}),this.lineAuthoringFeature.onLoadPlugin(),this.setRefreshDebouncer(),dC(this)}setRefreshDebouncer(){var r;(r=this.debRefresh)==null||r.cancel(),this.debRefresh=(0,xe.debounce)(()=>{this.settings.refreshSourceControl&&this.refresh().catch(console.error)},this.settings.refreshSourceControlTimer,!0)}async addFileToGitignore(r,n){let i=this.gitManager.getRelativeRepoPath(r,!0),a=yT({isFolder:n,gitRelativePath:i});return await this.app.vault.adapter.append(this.gitManager.getRelativeVaultPath(".gitignore"),` +`+a),this.refresh()}handleFileMenu(r,n,i,a){if(!this.gitReady||!this.settings.showFileMenu||!n)return;let s;if(typeof n=="string"?s=n:s=n.path,i=="file-explorer-context-menu"&&(r.addItem(o=>{o.setTitle("Git: Stage").setIcon("plus-circle").setSection("action").onClick(l=>{this.promiseQueue.addTask(async()=>{n instanceof xe.TFile?await this.gitManager.stage(n.path,!0):await this.gitManager.stageAll({dir:this.gitManager.getRelativeRepoPath(s,!0)}),this.displayMessage(`Staged ${s}`)})})}),r.addItem(o=>{o.setTitle("Git: Unstage").setIcon("minus-circle").setSection("action").onClick(l=>{this.promiseQueue.addTask(async()=>{n instanceof xe.TFile?await this.gitManager.unstage(n.path,!0):await this.gitManager.unstageAll({dir:this.gitManager.getRelativeRepoPath(s,!0)}),this.displayMessage(`Unstaged ${s}`)})})}),r.addItem(o=>{o.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(l=>{this.addFileToGitignore(s,n instanceof xe.TFolder).catch(c=>this.displayError(c))})})),i=="git-source-control"){r.addItem(l=>{l.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(c=>{this.addFileToGitignore(s,n instanceof xe.TFolder).catch(u=>this.displayError(u))})});let o=this.app.vault.adapter;a==="obsidian-git:menu"&&o instanceof xe.FileSystemAdapter&&(r.addItem(l=>{l.setTitle("Open in default app").setIcon("arrow-up-right").setSection("action").onClick(c=>{this.app.openWithDefaultApp(s)})}),r.addItem(l=>{l.setTitle("Show in system explorer").setIcon("arrow-up-right").setSection("action").onClick(c=>{window.electron.shell.showItemInFolder(LP.join(o.getBasePath(),s))})}))}}async migrateSettings(){this.settings.mergeOnPull!=null&&(this.settings.syncMethod=this.settings.mergeOnPull?"merge":"rebase",this.settings.mergeOnPull=void 0,await this.saveSettings()),this.settings.autoCommitMessage===void 0&&(this.settings.autoCommitMessage=this.settings.commitMessage,await this.saveSettings()),this.settings.gitPath!=null&&(this.localStorage.setGitPath(this.settings.gitPath),this.settings.gitPath=void 0,await this.saveSettings()),this.settings.username!=null&&(this.localStorage.setPassword(this.settings.username),this.settings.username=void 0,await this.saveSettings())}unloadPlugin(){var r,n;this.gitReady=!1,this.lineAuthoringFeature.deactivateFeature(),this.automaticsManager.unload(),(r=this.branchBar)==null||r.remove(),(n=this.statusBar)==null||n.remove(),this.statusBar=void 0,this.branchBar=void 0,this.gitManager.unload(),this.promiseQueue.clear();for(let i of this.intervalsToClear)window.clearInterval(i);this.intervalsToClear=[],this.debRefresh.cancel()}onunload(){this.unloadPlugin(),console.log("unloading "+this.manifest.name+" plugin")}async loadSettings(){let r=await this.loadData();r==null&&(r={showedMobileNotice:!0}),this.settings=Tx(Ye,r)}async saveSettings(){var r;(r=this.settingsTab)==null||r.beforeSaveSettings(),await this.saveData(this.settings)}get useSimpleGit(){return xe.Platform.isDesktopApp}async init({fromReload:r=!1}){var n;if(this.settings.showStatusBar&&!this.statusBar){let i=this.addStatusBarItem();this.statusBar=new id(i,this),this.intervalsToClear.push(window.setInterval(()=>{var a;return(a=this.statusBar)==null?void 0:a.display()},1e3))}try{this.useSimpleGit?(this.gitManager=new Ce(this),await this.gitManager.setGitInstance()):this.gitManager=new sn(this);let i=await this.gitManager.checkRequirements();switch(i){case"missing-git":this.displayError(`Cannot run git command. Trying to run: '${this.localStorage.getGitPath()||"git"}' .`);break;case"missing-repo":new xe.Notice("Can't find a valid git repository. Please create one via the given command or clone an existing repo.",1e4);break;case"valid":if(this.gitReady=!0,this.setPluginState({gitAction:0}),xe.Platform.isDesktop&&this.settings.showBranchStatusBar&&!this.branchBar){let a=this.addStatusBarItem();this.branchBar=new Jd(a,this),this.intervalsToClear.push(window.setInterval(()=>{var s;return void((s=this.branchBar)==null?void 0:s.display().catch(console.error))},6e4))}await((n=this.branchBar)==null?void 0:n.display()),this.lineAuthoringFeature.conditionallyActivateBySettings(),this.app.workspace.trigger("obsidian-git:refresh"),this.app.workspace.trigger("obsidian-git:head-change"),!r&&this.settings.autoPullOnBoot&&this.promiseQueue.addTask(()=>this.pullChangesFromRemote()),await this.automaticsManager.init();break;default:this.log("Something weird happened. The 'checkRequirements' result is "+i)}}catch(i){this.displayError(i),console.error(i)}}async createNewRepo(){try{await this.gitManager.init(),new xe.Notice("Initialized new repo"),await this.init({fromReload:!0})}catch(r){this.displayError(r)}}async cloneNewRepo(){let n=await new $e(this,{placeholder:"Enter remote URL"}).openAndGetResult();if(n){let i="Vault Root",a=await new $e(this,{options:this.gitManager instanceof sn?[i]:[],placeholder:"Enter directory for clone. It needs to be empty or not existent.",allowEmpty:this.gitManager instanceof sn}).openAndGetResult();if(a==null)return;if(a===i&&(a="."),a=(0,xe.normalizePath)(a),a==="/"&&(a="."),a==="."){let f=await new $e(this,{options:["NO","YES"],placeholder:`Does your remote repo contain a ${this.app.vault.configDir} directory at the root?`,onlySelection:!0}).openAndGetResult();if(f===void 0){new xe.Notice("Aborted clone");return}else if(f==="YES"){let d="DELETE ALL YOUR LOCAL CONFIG AND PLUGINS";if(await new $e(this,{options:["Abort clone",d],placeholder:`To avoid conflicts, the local ${this.app.vault.configDir} directory needs to be deleted.`,onlySelection:!0}).openAndGetResult()===d)await this.app.vault.adapter.rmdir(this.app.vault.configDir,!0);else{new xe.Notice("Aborted clone");return}}}let s=await new $e(this,{placeholder:"Specify depth of clone. Leave empty for full clone.",allowEmpty:!0}).openAndGetResult(),o;if(s!==""&&(o=parseInt(s),isNaN(o))){new xe.Notice("Invalid depth. Aborting clone.");return}new xe.Notice(`Cloning new repo into "${a}"`);let l=this.settings.basePath,c=a&&a!==".";c&&(this.settings.basePath=a);try{await this.gitManager.clone(Wg(n),a,o),new xe.Notice("Cloned new repo."),new xe.Notice("Please restart Obsidian"),c&&await this.saveSettings()}catch(u){this.displayError(u),this.settings.basePath=l,await this.saveSettings()}}}async isAllInitialized(){return this.gitReady||await this.init({fromReload:!0}),this.gitReady}async pullChangesFromRemote(){if(!await this.isAllInitialized())return;let r=await this.pull();if(r!==!1){if(r||this.displayMessage("Pull: Everything is up-to-date"),this.gitManager instanceof Ce){let n=await this.updateCachedStatus();n.conflicted.length>0&&(this.displayError(`You have conflicts in ${n.conflicted.length} ${n.conflicted.length==1?"file":"files"}`),await this.handleConflict(n.conflicted))}this.app.workspace.trigger("obsidian-git:refresh"),this.setPluginState({gitAction:0})}}async commitAndSync({fromAutoBackup:r,requestCustomMessage:n=!1,commitMessage:i,onlyStaged:a=!1}){!await this.isAllInitialized()||(this.settings.syncMethod=="reset"&&this.settings.pullBeforePush&&await this.pull(),!await this.commit({fromAuto:r,requestCustomMessage:n,commitMessage:i,onlyStaged:a}))||(this.settings.syncMethod!="reset"&&this.settings.pullBeforePush&&await this.pull(),this.settings.disablePush||(await this.remotesAreSet()&&await this.gitManager.canPush()?await this.push():this.displayMessage("No commits to push")),this.setPluginState({gitAction:0}))}async commit({fromAuto:r,requestCustomMessage:n=!1,onlyStaged:i=!1,commitMessage:a,amend:s=!1}){if(!await this.isAllInitialized())return!1;try{let o=this.localStorage.getConflict(),l,c,u;if(this.gitManager instanceof Ce){if(await this.mayDeleteConflictFile(),c=await this.updateCachedStatus(),c.conflicted.length==0&&(o=!1),r&&c.conflicted.length>0)return this.displayError(`Did not commit, because you have conflicts in ${c.conflicted.length} ${c.conflicted.length==1?"file":"files"}. Please resolve them and commit per command.`),await this.handleConflict(c.conflicted),!1;l=[...c.changed,...c.staged]}else{if(r&&o)return this.displayError("Did not commit, because you have conflicts. Please resolve them and commit per command."),!1;if(o)await this.mayDeleteConflictFile(),c=await this.updateCachedStatus(),l=[...c.changed,...c.staged];else{let f=this.gitManager;i?l=await f.getStagedFiles():(u=await f.getUnstagedFiles(),l=u.map(({path:d})=>({vaultPath:this.gitManager.getRelativeVaultPath(d),path:d})))}}if(await this.tools.hasTooBigFiles(l))return this.setPluginState({gitAction:0}),!1;if(l.length!==0||o){let f=a!=null?a:a=r?this.settings.autoCommitMessage:this.settings.commitMessage;if(r&&this.settings.customMessageOnAutoBackup||n){!this.settings.disablePopups&&r&&new xe.Notice("Auto backup: Please enter a custom commit message. Leave empty to abort");let p=await new ad(this).openAndGetResult();if(p!=null&&p!=""&&p!="...")f=p;else return this.setPluginState({gitAction:0}),!1}let d;i?d=await this.gitManager.commit({message:f,amend:s}):d=await this.gitManager.commitAll({message:f,status:c,unstagedFiles:u,amend:s}),this.gitManager instanceof Ce&&await this.updateCachedStatus();let h=!1;d===void 0&&(h=!0,d=l.length),this.displayMessage(`Committed${h?" approx.":""} ${d} ${d==1?"file":"files"}`)}else this.displayMessage("No changes to commit");return this.app.workspace.trigger("obsidian-git:refresh"),!0}catch(o){return this.displayError(o),!1}}async push(){if(!await this.isAllInitialized()||!await this.remotesAreSet())return!1;let r=this.localStorage.getConflict();try{this.gitManager instanceof Ce&&await this.mayDeleteConflictFile();let n;if(this.gitManager instanceof Ce&&(n=await this.updateCachedStatus()).conflicted.length>0)return this.displayError(`Cannot push. You have conflicts in ${n.conflicted.length} ${n.conflicted.length==1?"file":"files"}`),await this.handleConflict(n.conflicted),!1;if(this.gitManager instanceof sn&&r)return this.displayError("Cannot push. You have conflicts"),!1;this.log("Pushing....");let i=await this.gitManager.push();return i!==void 0&&(i>0?this.displayMessage(`Pushed ${i} ${i==1?"file":"files"} to remote`):this.displayMessage("No commits to push")),this.setPluginState({offlineMode:!1}),this.app.workspace.trigger("obsidian-git:refresh"),!0}catch(n){return n instanceof $s?this.handleNoNetworkError(n):this.displayError(n),!1}}async pull(){if(!await this.remotesAreSet())return!1;try{this.log("Pulling....");let r=await this.gitManager.pull()||[];return this.setPluginState({offlineMode:!1}),r.length>0&&(this.displayMessage(`Pulled ${r.length} ${r.length==1?"file":"files"} from remote`),this.lastPulledFiles=r),r.length}catch(r){return this.displayError(r),!1}}async fetch(){if(await this.remotesAreSet())try{await this.gitManager.fetch(),this.displayMessage("Fetched from remote"),this.setPluginState({offlineMode:!1}),this.app.workspace.trigger("obsidian-git:refresh")}catch(r){this.displayError(r)}}async mayDeleteConflictFile(){let r=this.app.vault.getAbstractFileByPath(Fs);r&&(this.app.workspace.iterateAllLeaves(n=>{var i;n.view instanceof xe.MarkdownView&&((i=n.view.file)==null?void 0:i.path)==r.path&&n.detach()}),await this.app.vault.delete(r))}async stageFile(r){return await this.isAllInitialized()?(await this.gitManager.stage(r.path,!0),this.displayMessage(`Staged ${r.path}`),this.app.workspace.trigger("obsidian-git:refresh"),this.setPluginState({gitAction:0}),!0):!1}async unstageFile(r){return await this.isAllInitialized()?(await this.gitManager.unstage(r.path,!0),this.displayMessage(`Unstaged ${r.path}`),this.app.workspace.trigger("obsidian-git:refresh"),this.setPluginState({gitAction:0}),!0):!1}async switchBranch(){var i;if(!await this.isAllInitialized())return;let r=await this.gitManager.branchInfo(),n=await new Xd(this,r.branches).openAndGetReslt();if(n!=null)return await this.gitManager.checkout(n),this.displayMessage(`Switched to ${n}`),this.app.workspace.trigger("obsidian-git:refresh"),await((i=this.branchBar)==null?void 0:i.display()),n}async switchRemoteBranch(){var a;if(!await this.isAllInitialized())return;let r=await this.selectRemoteBranch()||"",[n,i]=Fi(r);if(i!=null&&n!=null)return await this.gitManager.checkout(i,n),this.displayMessage(`Switched to ${r}`),await((a=this.branchBar)==null?void 0:a.display()),r}async createBranch(){var n;if(!await this.isAllInitialized())return;let r=await new $e(this,{placeholder:"Create new branch"}).openAndGetResult();if(r!=null)return await this.gitManager.createBranch(r),this.displayMessage(`Created new branch ${r}`),await((n=this.branchBar)==null?void 0:n.display()),r}async deleteBranch(){var i;if(!await this.isAllInitialized())return;let r=await this.gitManager.branchInfo();r.current&&r.branches.remove(r.current);let n=await new $e(this,{options:r.branches,placeholder:"Delete branch",onlySelection:!0}).openAndGetResult();if(n!=null){let a=!1;if(!await this.gitManager.branchIsMerged(n)){let o=await new $e(this,{options:["YES","NO"],placeholder:"This branch isn't merged into HEAD. Force delete?",onlySelection:!0}).openAndGetResult();if(o!=="YES")return;a=o==="YES"}return await this.gitManager.deleteBranch(n,a),this.displayMessage(`Deleted branch ${n}`),await((i=this.branchBar)==null?void 0:i.display()),n}}async remotesAreSet(){return this.settings.updateSubmodules||(await this.gitManager.branchInfo()).tracking?!0:(new xe.Notice("No upstream branch is set. Please select one."),await this.setUpstreamBranch())}async setUpstreamBranch(){let r=await this.selectRemoteBranch();return r==null?(this.displayError("Aborted. No upstream-branch is set!",1e4),this.setPluginState({gitAction:0}),!1):(await this.gitManager.updateUpstreamBranch(r),this.displayMessage(`Set upstream branch to ${r}`),this.setPluginState({gitAction:0}),!0)}async discardAll(){await this.gitManager.discardAll({status:this.cachedStatus}),new xe.Notice("All local changes have been discarded. New files remain untouched."),this.app.workspace.trigger("obsidian-git:refresh")}async handleConflict(r){this.localStorage.setConflict(!0);let n;r!==void 0&&(n=["# Conflicts","Please resolve them and commit them using the commands `Git: Commit all changes` followed by `Git: Push`","(This file will automatically be deleted before commit)","[[#Additional Instructions]] available below file list","",...r.map(i=>{let a=this.app.vault.getAbstractFileByPath(i);return a instanceof xe.TFile?`- [[${this.app.metadataCache.fileToLinktext(a,"/")}]]`:`- Not a file: ${i}`}),` # Additional Instructions I strongly recommend to use "Source mode" for viewing the conflicted files. For simple conflicts, in each file listed above replace every occurrence of the following text blocks with the desired text. @@ -375,7 +377,7 @@ I strongly recommend to use "Source mode" for viewing the conflicted files. For File changes in remote repository >>>>>>> origin/main \`\`\``]),await this.tools.writeAndOpenFile(n==null?void 0:n.join(` -`))}async editRemotes(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),i=await new Fe(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}).openAndGetResult();if(i){let a=await this.gitManager.getRemoteUrl(i),o=await new Fe(this,{initialValue:a}).openAndGetResult();if(o)return await this.gitManager.setRemote(i,Vg(o)),i}}async selectRemoteBranch(){let r=await this.gitManager.getRemotes(),n;r.length===0&&(n=await this.editRemotes(),n==null&&(r=await this.gitManager.getRemotes()));let i=new Fe(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}),a=n!=null?n:await i.openAndGetResult();if(a){this.displayMessage("Fetching remote branches"),await this.gitManager.fetch(a);let s=await this.gitManager.getRemoteBranches(a);return await new Fe(this,{options:s,placeholder:"Select or create a new remote branch by typing its name and selecting it"}).openAndGetResult()}}async removeRemote(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),i=await new Fe(this,{options:r,placeholder:"Select a remote"}).openAndGetResult();i&&await this.gitManager.removeRemote(i)}onActiveLeafChange(r){var s,o;let n=r==null?void 0:r.view;if(!(n!=null&&n.getState().file)&&!(n instanceof Ta||n instanceof Ga))return;let i=this.app.workspace.getLeavesOfType(St.type).first(),a=this.app.workspace.getLeavesOfType($r.type).first();if((s=i==null?void 0:i.view.containerEl.querySelector("div.nav-file-title.is-active"))==null||s.removeClass("is-active"),(o=a==null?void 0:a.view.containerEl.querySelector("div.nav-file-title.is-active"))==null||o.removeClass("is-active"),(r==null?void 0:r.view)instanceof Ta||(r==null?void 0:r.view)instanceof Ga){let c=r.view.state.bFile;this.lastDiffViewState=r.view.getState();let l;i&&r.view.state.aRef=="HEAD"?l=i.view.containerEl.querySelector(`div.staged div.nav-file-title[data-path='${c}']`):i&&r.view.state.aRef==""?l=i.view.containerEl.querySelector(`div.changes div.nav-file-title[data-path='${c}']`):a&&(l=a.view.containerEl.querySelector(`div.nav-file-title[data-path='${c}']`)),l==null||l.addClass("is-active")}else this.lastDiffViewState=void 0}handleNoNetworkError(r){this.state.offlineMode?this.log("Encountered network error, but already in offline mode"):this.displayError("Git: Going into offline mode. Future network errors will no longer be displayed.",2e3),this.setPluginState({gitAction:0,offlineMode:!0})}displayMessage(r,n=4*1e3){var i;(i=this.statusBar)==null||i.displayMessage(r.toLowerCase(),n),this.settings.disablePopups||(!this.settings.disablePopupsForNoChanges||!r.startsWith("No changes"))&&new Ce.Notice(r,5*1e3),this.log(r)}displayError(r,n=10*1e3){var a;if(r instanceof gl.UserCanceledError){new Ce.Notice("Aborted");return}let i;r instanceof Error?i=r:i=new Error(String(r)),this.setPluginState({gitAction:0}),new Ce.Notice(i.message,n),console.error(`${this.manifest.id}:`,i.stack),(a=this.statusBar)==null||a.displayMessage(i.message.toLowerCase(),n)}log(...r){console.log(`${this.manifest.id}:`,...r)}}; +`))}async editRemotes(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),i=await new $e(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}).openAndGetResult();if(i){let a=await this.gitManager.getRemoteUrl(i),o=await new $e(this,{initialValue:a}).openAndGetResult();if(o)return await this.gitManager.setRemote(i,Wg(o)),i}}async selectRemoteBranch(){let r=await this.gitManager.getRemotes(),n;r.length===0&&(n=await this.editRemotes(),n==null&&(r=await this.gitManager.getRemotes()));let i=new $e(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}),a=n!=null?n:await i.openAndGetResult();if(a){this.displayMessage("Fetching remote branches"),await this.gitManager.fetch(a);let s=await this.gitManager.getRemoteBranches(a);return await new $e(this,{options:s,placeholder:"Select or create a new remote branch by typing its name and selecting it"}).openAndGetResult()}}async removeRemote(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),i=await new $e(this,{options:r,placeholder:"Select a remote"}).openAndGetResult();i&&await this.gitManager.removeRemote(i)}onActiveLeafChange(r){var s,o;let n=r==null?void 0:r.view;if(!(n!=null&&n.getState().file)&&!(n instanceof Ra||n instanceof Ia))return;let i=this.app.workspace.getLeavesOfType(kt.type).first(),a=this.app.workspace.getLeavesOfType(Lr.type).first();if((s=i==null?void 0:i.view.containerEl.querySelector("div.nav-file-title.is-active"))==null||s.removeClass("is-active"),(o=a==null?void 0:a.view.containerEl.querySelector("div.nav-file-title.is-active"))==null||o.removeClass("is-active"),(r==null?void 0:r.view)instanceof Ra||(r==null?void 0:r.view)instanceof Ia){let l=r.view.state.bFile;this.lastDiffViewState=r.view.getState();let c;i&&r.view.state.aRef=="HEAD"?c=i.view.containerEl.querySelector(`div.staged div.nav-file-title[data-path='${l}']`):i&&r.view.state.aRef==""?c=i.view.containerEl.querySelector(`div.changes div.nav-file-title[data-path='${l}']`):a&&(c=a.view.containerEl.querySelector(`div.nav-file-title[data-path='${l}']`)),c==null||c.addClass("is-active")}else this.lastDiffViewState=void 0}handleNoNetworkError(r){this.state.offlineMode?this.log("Encountered network error, but already in offline mode"):this.displayError("Git: Going into offline mode. Future network errors will no longer be displayed.",2e3),this.setPluginState({gitAction:0,offlineMode:!0})}displayMessage(r,n=4*1e3){var i;(i=this.statusBar)==null||i.displayMessage(r.toLowerCase(),n),this.settings.disablePopups||(!this.settings.disablePopupsForNoChanges||!r.startsWith("No changes"))&&new xe.Notice(r,5*1e3),this.log(r)}displayError(r,n=10*1e3){var a;if(r instanceof wl.UserCanceledError){new xe.Notice("Aborted");return}let i;r instanceof Error?i=r:i=new Error(String(r)),this.setPluginState({gitAction:0}),this.settings.showErrorNotices&&new xe.Notice(i.message,n),console.error(`${this.manifest.id}:`,i.stack),(a=this.statusBar)==null||a.displayMessage(i.message.toLowerCase(),n)}log(...r){console.log(`${this.manifest.id}:`,...r)}}; /*! Bundled license information: ieee754/index.js: diff --git a/.obsidian/plugins/obsidian-git/manifest.json b/.obsidian/plugins/obsidian-git/manifest.json index 563cdfc..58ddbd0 100644 --- a/.obsidian/plugins/obsidian-git/manifest.json +++ b/.obsidian/plugins/obsidian-git/manifest.json @@ -6,5 +6,5 @@ "description": "Integrate Git version control with automatic backup and other advanced features.", "isDesktopOnly": false, "fundingUrl": "https://ko-fi.com/vinzent", - "version": "2.32.1" + "version": "2.33.0" } diff --git a/.obsidian/plugins/obsidian-git/styles.css b/.obsidian/plugins/obsidian-git/styles.css index f0a7c38..9c490e7 100644 --- a/.obsidian/plugins/obsidian-git/styles.css +++ b/.obsidian/plugins/obsidian-git/styles.css @@ -574,3 +574,32 @@ .git-split-diff-view .cm-insertedLine .cm-changedText { background-color: #22bb2230; } + +/* Limits the scrollbar to the view body */ +.git-view { + display: flex; + flex-direction: column; + position: relative; + height: 100%; +} + +.git-obscure-prompt[git-is-obscured="true"] #git-show-password:after { + -webkit-mask-image: url('data:image/svg+xml,'); +} + +.git-obscure-prompt[git-is-obscured="false"] #git-show-password:after { + -webkit-mask-image: url('data:image/svg+xml,'); +} + +/* Override styling of Codemirror merge view "collapsed lines" indicator */ +.git-split-diff-view .ͼ2 .cm-collapsedLines { + background: var(--interactive-normal); + border-radius: var(--radius-m); + color: var(--text-accent); + font-size: var(--font-small); + padding: var(--size-4-1) var(--size-4-1); +} +.git-split-diff-view .ͼ2 .cm-collapsedLines:hover { + background: var(--interactive-hover); + color: var(--text-accent-hover); +} diff --git a/.obsidian/plugins/obsidian-quiet-outline/main.js b/.obsidian/plugins/obsidian-quiet-outline/main.js index fbe76ce..2946b8d 100644 --- a/.obsidian/plugins/obsidian-quiet-outline/main.js +++ b/.obsidian/plugins/obsidian-quiet-outline/main.js @@ -3,34 +3,34 @@ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ -var Hy=Object.create;var Oa=Object.defineProperty;var Vy=Object.getOwnPropertyDescriptor;var Fy=Object.getOwnPropertyNames;var jy=Object.getPrototypeOf,Wy=Object.prototype.hasOwnProperty;var zo=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ky=(e,t)=>{for(var o in t)Oa(e,o,{get:t[o],enumerable:!0})},dp=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Fy(t))!Wy.call(e,n)&&n!==o&&Oa(e,n,{get:()=>t[n],enumerable:!(r=Vy(t,n))||r.enumerable});return e};var Uy=(e,t,o)=>(o=e!=null?Hy(jy(e)):{},dp(t||!e||!e.__esModule?Oa(o,"default",{value:e,enumerable:!0}):o,e)),qy=e=>dp(Oa({},"__esModule",{value:!0}),e);var Hx=zo((qi,Bx)=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.default=void 0;var ZE={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},QE=function(e,t,o){var r,n=ZE[e];return typeof n=="string"?r=n:t===1?r=n.one:r=n.other.replace("{{count}}",t.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+r:r+" ago":r},JE=QE;qi.default=JE;Bx.exports=qi.default});var Fx=zo((Xl,Vx)=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.default=eD;function eD(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=t.width?String(t.width):e.defaultWidth,r=e.formats[o]||e.formats[e.defaultWidth];return r}}Vx.exports=Xl.default});var Wx=zo((Gi,jx)=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.default=void 0;var dd=tD(Fx());function tD(e){return e&&e.__esModule?e:{default:e}}var oD={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},rD={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},nD={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},iD={date:(0,dd.default)({formats:oD,defaultWidth:"full"}),time:(0,dd.default)({formats:rD,defaultWidth:"full"}),dateTime:(0,dd.default)({formats:nD,defaultWidth:"full"})},aD=iD;Gi.default=aD;jx.exports=Gi.default});var Ux=zo((Yi,Kx)=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.default=void 0;var lD={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},sD=function(e,t,o,r){return lD[e]},cD=sD;Yi.default=cD;Kx.exports=Yi.default});var Gx=zo((Zl,qx)=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});Zl.default=dD;function dD(e){return function(t,o){var r=o||{},n=r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,l=r.width?String(r.width):a;i=e.formattingValues[l]||e.formattingValues[a]}else{var s=e.defaultWidth,c=r.width?String(r.width):e.defaultWidth;i=e.values[c]||e.values[s]}var d=e.argumentCallback?e.argumentCallback(t):t;return i[d]}}qx.exports=Zl.default});var Xx=zo((Zi,Yx)=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.default=void 0;var Xi=uD(Gx());function uD(e){return e&&e.__esModule?e:{default:e}}var fD={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},pD={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},mD={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},hD={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},gD={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},xD={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},vD=function(e,t){var o=Number(e),r=o%100;if(r>20||r<10)switch(r%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},bD={ordinalNumber:vD,era:(0,Xi.default)({values:fD,defaultWidth:"wide"}),quarter:(0,Xi.default)({values:pD,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,Xi.default)({values:mD,defaultWidth:"wide"}),day:(0,Xi.default)({values:hD,defaultWidth:"wide"}),dayPeriod:(0,Xi.default)({values:gD,defaultWidth:"wide",formattingValues:xD,defaultFormattingWidth:"wide"})},yD=bD;Zi.default=yD;Yx.exports=Zi.default});var Qx=zo((Ql,Zx)=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.default=CD;function CD(e){return function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=o.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;var a=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?kD(l,function(u){return u.test(a)}):wD(l,function(u){return u.test(a)}),c;c=e.valueCallback?e.valueCallback(s):s,c=o.valueCallback?o.valueCallback(c):c;var d=t.slice(a.length);return{value:c,rest:d}}}function wD(e,t){for(var o in e)if(e.hasOwnProperty(o)&&t(e[o]))return o}function kD(e,t){for(var o=0;o{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.default=SD;function SD(e){return function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var n=r[0],i=t.match(e.parsePattern);if(!i)return null;var a=e.valueCallback?e.valueCallback(i[0]):i[0];a=o.valueCallback?o.valueCallback(a):a;var l=t.slice(n.length);return{value:a,rest:l}}}Jx.exports=Jl.default});var rv=zo((Ji,ov)=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.default=void 0;var Qi=tv(Qx()),_D=tv(ev());function tv(e){return e&&e.__esModule?e:{default:e}}var ED=/^(\d+)(th|st|nd|rd)?/i,DD=/\d+/i,TD={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},OD={any:[/^b/i,/^(a|c)/i]},PD={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ND={any:[/1/i,/2/i,/3/i,/4/i]},RD={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ID={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},AD={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},MD={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},$D={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},LD={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},zD={ordinalNumber:(0,_D.default)({matchPattern:ED,parsePattern:DD,valueCallback:function(e){return parseInt(e,10)}}),era:(0,Qi.default)({matchPatterns:TD,defaultMatchWidth:"wide",parsePatterns:OD,defaultParseWidth:"any"}),quarter:(0,Qi.default)({matchPatterns:PD,defaultMatchWidth:"wide",parsePatterns:ND,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,Qi.default)({matchPatterns:RD,defaultMatchWidth:"wide",parsePatterns:ID,defaultParseWidth:"any"}),day:(0,Qi.default)({matchPatterns:AD,defaultMatchWidth:"wide",parsePatterns:MD,defaultParseWidth:"any"}),dayPeriod:(0,Qi.default)({matchPatterns:$D,defaultMatchWidth:"any",parsePatterns:LD,defaultParseWidth:"any"})},BD=zD;Ji.default=BD;ov.exports=Ji.default});var iv=zo((ta,nv)=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.default=void 0;var HD=ea(Hx()),VD=ea(Wx()),FD=ea(Ux()),jD=ea(Xx()),WD=ea(rv());function ea(e){return e&&e.__esModule?e:{default:e}}var KD={code:"en-US",formatDistance:HD.default,formatLong:VD.default,formatRelative:FD.default,localize:jD.default,match:WD.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},UD=KD;ta.default=UD;nv.exports=ta.default});var QP={};Ky(QP,{default:()=>ZP});module.exports=qy(QP);var ni=require("obsidian");var G0=require("obsidian");function Sn(e,t){let o=Object.create(null),r=e.split(",");for(let n=0;n!!o[n.toLowerCase()]:n=>!!o[n]}function vr(e){if(Ne(e)){let t={};for(let o=0;o{if(o){let r=o.split(Yy);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function qr(e){let t="";if(yt(e))t=e;else if(Ne(e))for(let o=0;oyt(e)?e:e==null?"":Ne(e)||it(e)&&(e.toString===gp||!Ae(e.toString))?JSON.stringify(e,mp,2):String(e),mp=(e,t)=>t&&t.__v_isRef?mp(e,t.value):br(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[r,n])=>(o[`${r} =>`]=n,o),{})}:Na(t)?{[`Set(${t.size})`]:[...t.values()]}:it(t)&&!Ne(t)&&!Fs(t)?String(t):t,nt={},Gr=[],io=()=>{},hp=()=>!1,Qy=/^on[^a-z]/,_n=e=>Qy.test(e),ci=e=>e.startsWith("onUpdate:"),kt=Object.assign,Pa=(e,t)=>{let o=e.indexOf(t);o>-1&&e.splice(o,1)},Jy=Object.prototype.hasOwnProperty,Ue=(e,t)=>Jy.call(e,t),Ne=Array.isArray,br=e=>Ia(e)==="[object Map]",Na=e=>Ia(e)==="[object Set]";var Ae=e=>typeof e=="function",yt=e=>typeof e=="string",Ra=e=>typeof e=="symbol",it=e=>e!==null&&typeof e=="object",Hs=e=>it(e)&&Ae(e.then)&&Ae(e.catch),gp=Object.prototype.toString,Ia=e=>gp.call(e),Vs=e=>Ia(e).slice(8,-1),Fs=e=>Ia(e)==="[object Object]",Aa=e=>yt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,di=Sn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var Ma=e=>{let t=Object.create(null);return o=>t[o]||(t[o]=e(o))},eC=/-(\w)/g,Bo=Ma(e=>e.replace(eC,(t,o)=>o?o.toUpperCase():"")),tC=/\B([A-Z])/g,yr=Ma(e=>e.replace(tC,"-$1").toLowerCase()),ui=Ma(e=>e.charAt(0).toUpperCase()+e.slice(1)),fi=Ma(e=>e?`on${ui(e)}`:""),Yr=(e,t)=>!Object.is(e,t),pi=(e,t)=>{for(let o=0;o{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:o})},Dn=e=>{let t=parseFloat(e);return isNaN(t)?e:t},up,xp=()=>up||(up=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});var Ho,hi=class{constructor(t=!1){this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=Ho,!t&&Ho&&(this.index=(Ho.scopes||(Ho.scopes=[])).push(this)-1)}run(t){if(this.active){let o=Ho;try{return Ho=this,t()}finally{Ho=o}}}on(){Ho=this}off(){Ho=this.parent}stop(t){if(this.active){let o,r;for(o=0,r=this.effects.length;o{let t=new Set(e);return t.w=0,t.n=0,t},_p=e=>(e.w&kr)>0,Ep=e=>(e.n&kr)>0,rC=({deps:e})=>{if(e.length)for(let t=0;t{let{deps:t}=e;if(t.length){let o=0;for(let r=0;r{(u==="length"||u>=c)&&l.push(d)})}else switch(o!==void 0&&l.push(a.get(o)),t){case"add":Ne(e)?Aa(o)&&l.push(a.get("length")):(l.push(a.get(Xr)),br(e)&&l.push(a.get(Ks)));break;case"delete":Ne(e)||(l.push(a.get(Xr)),br(e)&&l.push(a.get(Ks)));break;case"set":br(e)&&l.push(a.get(Xr));break}let s=void 0;if(l.length===1)l[0]&&Us(l[0]);else{let c=[];for(let d of l)d&&c.push(...d);Us(Xs(c))}}function Us(e,t){let o=Ne(e)?e:[...e];for(let r of o)r.computed&&bp(r,t);for(let r of o)r.computed||bp(r,t)}function bp(e,t){(e!==Eo||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}var iC=Sn("__proto__,__v_isRef,__isVue"),Op=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ra)),aC=Zs(),lC=Zs(!1,!0),sC=Zs(!0);var yp=cC();function cC(){let e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...o){let r=Ve(this);for(let i=0,a=this.length;i{e[t]=function(...o){_r();let r=Ve(this)[t].apply(this,o);return Er(),r}}),e}function Zs(e=!1,t=!1){return function(r,n,i){if(n==="__v_isReactive")return!e;if(n==="__v_isReadonly")return e;if(n==="__v_isShallow")return t;if(n==="__v_raw"&&i===(e?t?_C:Ap:t?Ip:Rp).get(r))return r;let a=Ne(r);if(!e&&a&&Ue(yp,n))return Reflect.get(yp,n,i);let l=Reflect.get(r,n,i);return(Ra(n)?Op.has(n):iC(n))||(e||Jt(r,"get",n),t)?l:Et(l)?a&&Aa(n)?l:l.value:it(l)?e?Dr(l):Fo(l):l}}var dC=Pp(),uC=Pp(!0);function Pp(e=!1){return function(o,r,n,i){let a=o[r];if(Sr(a)&&Et(a)&&!Et(n))return!1;if(!e&&(!Tn(n)&&!Sr(n)&&(a=Ve(a),n=Ve(n)),!Ne(o)&&Et(a)&&!Et(n)))return a.value=n,!0;let l=Ne(o)&&Aa(r)?Number(r)e,Va=e=>Reflect.getPrototypeOf(e);function $a(e,t,o=!1,r=!1){e=e.__v_raw;let n=Ve(e),i=Ve(t);o||(t!==i&&Jt(n,"get",t),Jt(n,"get",i));let{has:a}=Va(n),l=r?Qs:o?oc:gi;if(a.call(n,t))return l(e.get(t));if(a.call(n,i))return l(e.get(i));e!==n&&e.get(t)}function La(e,t=!1){let o=this.__v_raw,r=Ve(o),n=Ve(e);return t||(e!==n&&Jt(r,"has",e),Jt(r,"has",n)),e===n?o.has(e):o.has(e)||o.has(n)}function za(e,t=!1){return e=e.__v_raw,!t&&Jt(Ve(e),"iterate",Xr),Reflect.get(e,"size",e)}function Cp(e){e=Ve(e);let t=Ve(this);return Va(t).has.call(t,e)||(t.add(e),Vo(t,"add",e,e)),this}function wp(e,t){t=Ve(t);let o=Ve(this),{has:r,get:n}=Va(o),i=r.call(o,e);i||(e=Ve(e),i=r.call(o,e));let a=n.call(o,e);return o.set(e,t),i?Yr(t,a)&&Vo(o,"set",e,t,a):Vo(o,"add",e,t),this}function kp(e){let t=Ve(this),{has:o,get:r}=Va(t),n=o.call(t,e);n||(e=Ve(e),n=o.call(t,e));let i=r?r.call(t,e):void 0,a=t.delete(e);return n&&Vo(t,"delete",e,void 0,i),a}function Sp(){let e=Ve(this),t=e.size!==0,o=void 0,r=e.clear();return t&&Vo(e,"clear",void 0,void 0,o),r}function Ba(e,t){return function(r,n){let i=this,a=i.__v_raw,l=Ve(a),s=t?Qs:e?oc:gi;return!e&&Jt(l,"iterate",Xr),a.forEach((c,d)=>r.call(n,s(c),s(d),i))}}function Ha(e,t,o){return function(...r){let n=this.__v_raw,i=Ve(n),a=br(i),l=e==="entries"||e===Symbol.iterator&&a,s=e==="keys"&&a,c=n[e](...r),d=o?Qs:t?oc:gi;return!t&&Jt(i,"iterate",s?Ks:Xr),{next(){let{value:u,done:p}=c.next();return p?{value:u,done:p}:{value:l?[d(u[0]),d(u[1])]:d(u),done:p}},[Symbol.iterator](){return this}}}}function Cr(e){return function(...t){return e==="delete"?!1:this}}function xC(){let e={get(i){return $a(this,i)},get size(){return za(this)},has:La,add:Cp,set:wp,delete:kp,clear:Sp,forEach:Ba(!1,!1)},t={get(i){return $a(this,i,!1,!0)},get size(){return za(this)},has:La,add:Cp,set:wp,delete:kp,clear:Sp,forEach:Ba(!1,!0)},o={get(i){return $a(this,i,!0)},get size(){return za(this,!0)},has(i){return La.call(this,i,!0)},add:Cr("add"),set:Cr("set"),delete:Cr("delete"),clear:Cr("clear"),forEach:Ba(!0,!1)},r={get(i){return $a(this,i,!0,!0)},get size(){return za(this,!0)},has(i){return La.call(this,i,!0)},add:Cr("add"),set:Cr("set"),delete:Cr("delete"),clear:Cr("clear"),forEach:Ba(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=Ha(i,!1,!1),o[i]=Ha(i,!0,!1),t[i]=Ha(i,!1,!0),r[i]=Ha(i,!0,!0)}),[e,o,t,r]}var[vC,bC,yC,CC]=xC();function Js(e,t){let o=t?e?CC:yC:e?bC:vC;return(r,n,i)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_raw"?r:Reflect.get(Ue(o,n)&&n in r?o:r,n,i)}var wC={get:Js(!1,!1)},kC={get:Js(!1,!0)},SC={get:Js(!0,!1)};var Rp=new WeakMap,Ip=new WeakMap,Ap=new WeakMap,_C=new WeakMap;function EC(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function DC(e){return e.__v_skip||!Object.isExtensible(e)?0:EC(Vs(e))}function Fo(e){return Sr(e)?e:tc(e,!1,Np,wC,Rp)}function ec(e){return tc(e,!1,gC,kC,Ip)}function Dr(e){return tc(e,!0,hC,SC,Ap)}function tc(e,t,o,r,n){if(!it(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let i=n.get(e);if(i)return i;let a=DC(e);if(a===0)return e;let l=new Proxy(e,a===2?r:o);return n.set(e,l),l}function Tr(e){return Sr(e)?Tr(e.__v_raw):!!(e&&e.__v_isReactive)}function Sr(e){return!!(e&&e.__v_isReadonly)}function Tn(e){return!!(e&&e.__v_isShallow)}function Fa(e){return Tr(e)||Sr(e)}function Ve(e){let t=e&&e.__v_raw;return t?Ve(t):e}function Qr(e){return En(e,"__v_skip",!0),e}var gi=e=>it(e)?Fo(e):e,oc=e=>it(e)?Dr(e):e;function Mp(e){wr&&Eo&&(e=Ve(e),Tp(e.dep||(e.dep=Xs())))}function $p(e,t){e=Ve(e),e.dep&&Us(e.dep)}function Et(e){return!!(e&&e.__v_isRef===!0)}function X(e){return TC(e,!1)}function TC(e,t){return Et(e)?e:new qs(e,t)}var qs=class{constructor(t,o){this.__v_isShallow=o,this.dep=void 0,this.__v_isRef=!0,this._rawValue=o?t:Ve(t),this._value=o?t:gi(t)}get value(){return Mp(this),this._value}set value(t){let o=this.__v_isShallow||Tn(t)||Sr(t);t=o?t:Ve(t),Yr(t,this._rawValue)&&(this._rawValue=t,this._value=o?t:gi(t),$p(this,t))}};function go(e){return Et(e)?e.value:e}var OC={get:(e,t,o)=>go(Reflect.get(e,t,o)),set:(e,t,o,r)=>{let n=e[t];return Et(n)&&!Et(o)?(n.value=o,!0):Reflect.set(e,t,o,r)}};function ja(e){return Tr(e)?e:new Proxy(e,OC)}var Gs=class{constructor(t,o,r){this._object=t,this._key=o,this._defaultValue=r,this.__v_isRef=!0}get value(){let t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}};function Re(e,t,o){let r=e[t];return Et(r)?r:new Gs(e,t,o)}var Lp,Ys=class{constructor(t,o,r,n){this._setter=o,this.dep=void 0,this.__v_isRef=!0,this[Lp]=!1,this._dirty=!0,this.effect=new Zr(t,()=>{this._dirty||(this._dirty=!0,$p(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=r}get value(){let t=Ve(this);return Mp(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}};Lp="__v_isReadonly";function zp(e,t,o=!1){let r,n,i=Ae(e);return i?(r=e,n=io):(r=e.get,n=e.set),new Ys(r,n,i||!n,o)}var PC;PC="__v_isReadonly";var xi=[];function Jp(e,...t){}function NC(){let e=xi[xi.length-1];if(!e)return[];let t=[];for(;e;){let o=t[0];o&&o.vnode===e?o.recurseCount++:t.push({vnode:e,recurseCount:0});let r=e.component&&e.component.parent;e=r&&r.vnode}return t}function RC(e){let t=[];return e.forEach((o,r)=>{t.push(...r===0?[]:[` -`],...IC(o))}),t}function IC({vnode:e,recurseCount:t}){let o=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,n=` at <${Em(e.component,e.type,r)}`,i=">"+o;return e.props?[n,...AC(e.props),i]:[n+i]}function AC(e){let t=[],o=Object.keys(e);return o.slice(0,3).forEach(r=>{t.push(...em(r,e[r]))}),o.length>3&&t.push(" ..."),t}function em(e,t,o){return yt(t)?(t=JSON.stringify(t),o?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?o?t:[`${e}=${t}`]:Et(t)?(t=em(e,Ve(t.value),!0),o?t:[`${e}=Ref<`,t,">"]):Ae(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Ve(t),o?t:[`${e}=`,t])}function lr(e,t,o,r){let n;try{n=r?e(...r):e()}catch(i){Ya(i,t,o)}return n}function ao(e,t,o,r){if(Ae(e)){let i=lr(e,t,o,r);return i&&Hs(i)&&i.catch(a=>{Ya(a,t,o)}),i}let n=[];for(let i=0;i>>1;Si(jt[r])Ko&&jt.splice(t,1)}function zC(e){Ne(e)?On.push(...e):(!ar||!ar.includes(e,e.allowRecurse?on+1:on))&&On.push(e),om()}function Bp(e,t=ki?Ko+1:0){for(;tSi(o)-Si(r)),on=0;one.id==null?1/0:e.id,BC=(e,t)=>{let o=Si(e)-Si(t);if(o===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return o};function nm(e){ac=!1,ki=!0,jt.sort(BC);let t=io;try{for(Ko=0;Koyt(f)?f.trim():f)),u&&(n=o.map(Dn))}let l,s=r[l=fi(t)]||r[l=fi(Bo(t))];!s&&i&&(s=r[l=fi(yr(t))]),s&&ao(s,e,6,n);let c=r[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,ao(c,e,6,n)}}function im(e,t,o=!1){let r=t.emitsCache,n=r.get(e);if(n!==void 0)return n;let i=e.emits,a={},l=!1;if(!Ae(e)){let s=c=>{let d=im(c,t,!0);d&&(l=!0,kt(a,d))};!o&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return!i&&!l?(it(e)&&r.set(e,null),null):(Ne(i)?i.forEach(s=>a[s]=null):kt(a,i),it(e)&&r.set(e,a),a)}function Xa(e,t){return!e||!_n(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ue(e,t[0].toLowerCase()+t.slice(1))||Ue(e,yr(t))||Ue(e,t))}var Wt=null,am=null;function qa(e){let t=Wt;return Wt=e,am=e&&e.type.__scopeId||null,t}function ln(e,t=Wt,o){if(!t||e._n)return e;let r=(...n)=>{r._d&&Yp(-1);let i=qa(t),a;try{a=e(...n)}finally{qa(i),r._d&&Yp(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function rc(e){let{type:t,vnode:o,proxy:r,withProxy:n,props:i,propsOptions:[a],slots:l,attrs:s,emit:c,render:d,renderCache:u,data:p,setupState:f,ctx:m,inheritAttrs:y}=e,w,g,O=qa(e);try{if(o.shapeFlag&4){let v=n||r;w=Wo(d.call(v,v,u,i,f,p,m)),g=s}else{let v=t;w=Wo(v.length>1?v(i,{attrs:s,slots:l,emit:c}):v(i,null)),g=t.props?s:VC(s)}}catch(v){wi.length=0,Ya(v,e,1),w=ft(Kt)}let j=w,S;if(g&&y!==!1){let v=Object.keys(g),{shapeFlag:D}=j;v.length&&D&7&&(a&&v.some(ci)&&(g=FC(g,a)),j=Pr(j,g))}return o.dirs&&(j=Pr(j),j.dirs=j.dirs?j.dirs.concat(o.dirs):o.dirs),o.transition&&(j.transition=o.transition),w=j,qa(O),w}var VC=e=>{let t;for(let o in e)(o==="class"||o==="style"||_n(o))&&((t||(t={}))[o]=e[o]);return t},FC=(e,t)=>{let o={};for(let r in e)(!ci(r)||!(r.slice(9)in t))&&(o[r]=e[r]);return o};function jC(e,t,o){let{props:r,children:n,component:i}=e,{props:a,children:l,patchFlag:s}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(o&&s>=0){if(s&1024)return!0;if(s&16)return r?Hp(r,a,c):!!a;if(s&8){let d=t.dynamicProps;for(let u=0;ue.__isSuspense;function UC(e,t){t&&t.pendingBranch?Ne(e)?t.effects.push(...e):t.effects.push(e):zC(e)}function Yt(e,t){if(zt){let o=zt.provides,r=zt.parent&&zt.parent.provides;r===o&&(o=zt.provides=Object.create(r)),o[e]=t}}function ke(e,t,o=!1){let r=zt||Wt;if(r){let n=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(n&&e in n)return n[e];if(arguments.length>1)return o&&Ae(t)?t.call(r.proxy):t}}function At(e,t){return Za(e,null,t)}function lm(e,t){return Za(e,null,{flush:"post"})}var Wa={};function Ze(e,t,o){return Za(e,t,o)}function Za(e,t,{immediate:o,deep:r,flush:n,onTrack:i,onTrigger:a}=nt){let l=S=>{Jp("Invalid watch source: ",S,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},s=zt,c,d=!1,u=!1;if(Et(e)?(c=()=>e.value,d=Tn(e)):Tr(e)?(c=()=>e,r=!0):Ne(e)?(u=!0,d=e.some(S=>Tr(S)||Tn(S)),c=()=>e.map(S=>{if(Et(S))return S.value;if(Tr(S))return nn(S);if(Ae(S))return lr(S,s,2)})):Ae(e)?t?c=()=>lr(e,s,2):c=()=>{if(!(s&&s.isUnmounted))return p&&p(),ao(e,s,3,[f])}:c=io,t&&r){let S=c;c=()=>nn(S())}let p,f=S=>{p=O.onStop=()=>{lr(S,s,4)}},m;if(Ei)if(f=io,t?o&&ao(t,s,3,[c(),u?[]:void 0,f]):c(),n==="sync"){let S=$w();m=S.__watcherHandles||(S.__watcherHandles=[])}else return io;let y=u?new Array(e.length).fill(Wa):Wa,w=()=>{if(O.active)if(t){let S=O.run();(r||d||(u?S.some((v,D)=>Yr(v,y[D])):Yr(S,y)))&&(p&&p(),ao(t,s,3,[S,y===Wa?void 0:u&&y[0]===Wa?[]:y,f]),y=S)}else O.run()};w.allowRecurse=!!t;let g;n==="sync"?g=w:n==="post"?g=()=>eo(w,s&&s.suspense):(w.pre=!0,s&&(w.id=s.uid),g=()=>mc(w));let O=new Zr(c,g);t?o?w():y=O.run():n==="post"?eo(O.run.bind(O),s&&s.suspense):O.run();let j=()=>{O.stop(),s&&s.scope&&Pa(s.scope.effects,O)};return m&&m.push(j),j}function qC(e,t,o){let r=this.proxy,n=yt(e)?e.includes(".")?sm(r,e):()=>r[e]:e.bind(r,r),i;Ae(t)?i=t:(i=t.handler,o=t);let a=zt;In(this);let l=Za(n,i.bind(r),o);return a?In(a):an(),l}function sm(e,t){let o=t.split(".");return()=>{let r=e;for(let n=0;n{nn(o,t)});else if(Fs(e))for(let o in e)nn(e[o],t);return e}function hc(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return tt(()=>{e.isMounted=!0}),Pt(()=>{e.isUnmounting=!0}),e}var xo=[Function,Array],GC={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:xo,onEnter:xo,onAfterEnter:xo,onEnterCancelled:xo,onBeforeLeave:xo,onLeave:xo,onAfterLeave:xo,onLeaveCancelled:xo,onBeforeAppear:xo,onAppear:xo,onAfterAppear:xo,onAppearCancelled:xo},setup(e,{slots:t}){let o=Uo(),r=hc(),n;return()=>{let i=t.default&&Qa(t.default(),!0);if(!i||!i.length)return;let a=i[0];if(i.length>1){let y=!1;for(let w of i)if(w.type!==Kt){a=w,y=!0;break}}let l=Ve(e),{mode:s}=l;if(r.isLeaving)return nc(a);let c=Vp(a);if(!c)return nc(a);let d=Pn(c,l,r,o);Nn(c,d);let u=o.subTree,p=u&&Vp(u),f=!1,{getTransitionKey:m}=c.type;if(m){let y=m();n===void 0?n=y:y!==n&&(n=y,f=!0)}if(p&&p.type!==Kt&&(!rn(c,p)||f)){let y=Pn(p,l,r,o);if(Nn(p,y),s==="out-in")return r.isLeaving=!0,y.afterLeave=()=>{r.isLeaving=!1,o.update.active!==!1&&o.update()},nc(a);s==="in-out"&&c.type!==Kt&&(y.delayLeave=(w,g,O)=>{let j=cm(r,p);j[String(p.key)]=p,w._leaveCb=()=>{g(),w._leaveCb=void 0,delete d.delayedLeave},d.delayedLeave=O})}return a}}},gc=GC;function cm(e,t){let{leavingVNodes:o}=e,r=o.get(t.type);return r||(r=Object.create(null),o.set(t.type,r)),r}function Pn(e,t,o,r){let{appear:n,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:s,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:u,onLeave:p,onAfterLeave:f,onLeaveCancelled:m,onBeforeAppear:y,onAppear:w,onAfterAppear:g,onAppearCancelled:O}=t,j=String(e.key),S=cm(o,e),v=(k,A)=>{k&&ao(k,r,9,A)},D=(k,A)=>{let E=A[1];v(k,A),Ne(k)?k.every(z=>z.length<=1)&&E():k.length<=1&&E()},x={mode:i,persisted:a,beforeEnter(k){let A=l;if(!o.isMounted)if(n)A=y||l;else return;k._leaveCb&&k._leaveCb(!0);let E=S[j];E&&rn(e,E)&&E.el._leaveCb&&E.el._leaveCb(),v(A,[k])},enter(k){let A=s,E=c,z=d;if(!o.isMounted)if(n)A=w||s,E=g||c,z=O||d;else return;let M=!1,se=k._enterCb=ye=>{M||(M=!0,ye?v(z,[k]):v(E,[k]),x.delayedLeave&&x.delayedLeave(),k._enterCb=void 0)};A?D(A,[k,se]):se()},leave(k,A){let E=String(e.key);if(k._enterCb&&k._enterCb(!0),o.isUnmounting)return A();v(u,[k]);let z=!1,M=k._leaveCb=se=>{z||(z=!0,A(),se?v(m,[k]):v(f,[k]),k._leaveCb=void 0,S[E]===e&&delete S[E])};S[E]=e,p?D(p,[k,M]):M()},clone(k){return Pn(k,t,o,r)}};return x}function nc(e){if(Ja(e))return e=Pr(e),e.children=null,e}function Vp(e){return Ja(e)?e.children?e.children[0]:void 0:e}function Nn(e,t){e.shapeFlag&6&&e.component?Nn(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Qa(e,t=!1,o){let r=[],n=0;for(let i=0;i1)for(let i=0;i!!e.type.__asyncLoader;var Ja=e=>e.type.__isKeepAlive;function xc(e,t){dm(e,"a",t)}function YC(e,t){dm(e,"da",t)}function dm(e,t,o=zt){let r=e.__wdc||(e.__wdc=()=>{let n=o;for(;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(el(t,r,o),o){let n=o.parent;for(;n&&n.parent;)Ja(n.parent.vnode)&&XC(r,t,o,n),n=n.parent}}function XC(e,t,o,r){let n=el(t,e,r,!0);sn(()=>{Pa(r[t],n)},o)}function el(e,t,o=zt,r=!1){if(o){let n=o[e]||(o[e]=[]),i=t.__weh||(t.__weh=(...a)=>{if(o.isUnmounted)return;_r(),In(o);let l=ao(t,o,e,a);return an(),Er(),l});return r?n.unshift(i):n.push(i),i}}var sr=e=>(t,o=zt)=>(!Ei||e==="sp")&&el(e,(...r)=>t(...r),o),cr=sr("bm"),tt=sr("m"),vc=sr("bu"),bc=sr("u"),Pt=sr("bum"),sn=sr("um"),ZC=sr("sp"),QC=sr("rtg"),JC=sr("rtc");function ew(e,t=zt){el("ec",e,t)}function tl(e,t){let o=Wt;if(o===null)return e;let r=il(o)||o.proxy,n=e.dirs||(e.dirs=[]);for(let i=0;iRn(t)?!(t.type===Kt||t.type===St&&!um(t.children)):!0)?e:null}var lc=e=>e?Sm(e)?il(e)||e.proxy:lc(e.parent):null,bi=kt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>lc(e.parent),$root:e=>lc(e.root),$emit:e=>e.emit,$options:e=>yc(e),$forceUpdate:e=>e.f||(e.f=()=>mc(e.update)),$nextTick:e=>e.n||(e.n=Bt.bind(e.proxy)),$watch:e=>qC.bind(e)});var ic=(e,t)=>e!==nt&&!e.__isScriptSetup&&Ue(e,t),ow={get({_:e},t){let{ctx:o,setupState:r,data:n,props:i,accessCache:a,type:l,appContext:s}=e,c;if(t[0]!=="$"){let f=a[t];if(f!==void 0)switch(f){case 1:return r[t];case 2:return n[t];case 4:return o[t];case 3:return i[t]}else{if(ic(r,t))return a[t]=1,r[t];if(n!==nt&&Ue(n,t))return a[t]=2,n[t];if((c=e.propsOptions[0])&&Ue(c,t))return a[t]=3,i[t];if(o!==nt&&Ue(o,t))return a[t]=4,o[t];sc&&(a[t]=0)}}let d=bi[t],u,p;if(d)return t==="$attrs"&&Jt(e,"get",t),d(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(o!==nt&&Ue(o,t))return a[t]=4,o[t];if(p=s.config.globalProperties,Ue(p,t))return p[t]},set({_:e},t,o){let{data:r,setupState:n,ctx:i}=e;return ic(n,t)?(n[t]=o,!0):r!==nt&&Ue(r,t)?(r[t]=o,!0):Ue(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=o,!0)},has({_:{data:e,setupState:t,accessCache:o,ctx:r,appContext:n,propsOptions:i}},a){let l;return!!o[a]||e!==nt&&Ue(e,a)||ic(t,a)||(l=i[0])&&Ue(l,a)||Ue(r,a)||Ue(bi,a)||Ue(n.config.globalProperties,a)},defineProperty(e,t,o){return o.get!=null?e._.accessCache[t]=0:Ue(o,"value")&&this.set(e,t,o.value,null),Reflect.defineProperty(e,t,o)}};var sc=!0;function rw(e){let t=yc(e),o=e.proxy,r=e.ctx;sc=!1,t.beforeCreate&&Fp(t.beforeCreate,e,"bc");let{data:n,computed:i,methods:a,watch:l,provide:s,inject:c,created:d,beforeMount:u,mounted:p,beforeUpdate:f,updated:m,activated:y,deactivated:w,beforeDestroy:g,beforeUnmount:O,destroyed:j,unmounted:S,render:v,renderTracked:D,renderTriggered:x,errorCaptured:k,serverPrefetch:A,expose:E,inheritAttrs:z,components:M,directives:se,filters:ye}=t;if(c&&nw(c,r,null,e.appContext.config.unwrapInjectedRef),a)for(let ce in a){let we=a[ce];Ae(we)&&(r[ce]=we.bind(o))}if(n){let ce=n.call(o,o);it(ce)&&(e.data=Fo(ce))}if(sc=!0,i)for(let ce in i){let we=i[ce],Me=Ae(we)?we.bind(o,o):Ae(we.get)?we.get.bind(o,o):io,Be=!Ae(we)&&Ae(we.set)?we.set.bind(o):io,Le=F({get:Me,set:Be});Object.defineProperty(r,ce,{enumerable:!0,configurable:!0,get:()=>Le.value,set:Je=>Le.value=Je})}if(l)for(let ce in l)fm(l[ce],r,o,ce);if(s){let ce=Ae(s)?s.call(o):s;Reflect.ownKeys(ce).forEach(we=>{Yt(we,ce[we])})}d&&Fp(d,e,"c");function fe(ce,we){Ne(we)?we.forEach(Me=>ce(Me.bind(o))):we&&ce(we.bind(o))}if(fe(cr,u),fe(tt,p),fe(vc,f),fe(bc,m),fe(xc,y),fe(YC,w),fe(ew,k),fe(JC,D),fe(QC,x),fe(Pt,O),fe(sn,S),fe(ZC,A),Ne(E))if(E.length){let ce=e.exposed||(e.exposed={});E.forEach(we=>{Object.defineProperty(ce,we,{get:()=>o[we],set:Me=>o[we]=Me})})}else e.exposed||(e.exposed={});v&&e.render===io&&(e.render=v),z!=null&&(e.inheritAttrs=z),M&&(e.components=M),se&&(e.directives=se)}function nw(e,t,o=io,r=!1){Ne(e)&&(e=cc(e));for(let n in e){let i=e[n],a;it(i)?"default"in i?a=ke(i.from||n,i.default,!0):a=ke(i.from||n):a=ke(i),Et(a)&&r?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>a.value,set:l=>a.value=l}):t[n]=a}}function Fp(e,t,o){ao(Ne(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,o)}function fm(e,t,o,r){let n=r.includes(".")?sm(o,r):()=>o[r];if(yt(e)){let i=t[e];Ae(i)&&Ze(n,i)}else if(Ae(e))Ze(n,e.bind(o));else if(it(e))if(Ne(e))e.forEach(i=>fm(i,t,o,r));else{let i=Ae(e.handler)?e.handler.bind(o):t[e.handler];Ae(i)&&Ze(n,i,e)}}function yc(e){let t=e.type,{mixins:o,extends:r}=t,{mixins:n,optionsCache:i,config:{optionMergeStrategies:a}}=e.appContext,l=i.get(t),s;return l?s=l:!n.length&&!o&&!r?s=t:(s={},n.length&&n.forEach(c=>Ga(s,c,a,!0)),Ga(s,t,a)),it(t)&&i.set(t,s),s}function Ga(e,t,o,r=!1){let{mixins:n,extends:i}=t;i&&Ga(e,i,o,!0),n&&n.forEach(a=>Ga(e,a,o,!0));for(let a in t)if(!(r&&a==="expose")){let l=iw[a]||o&&o[a];e[a]=l?l(e[a],t[a]):t[a]}return e}var iw={data:jp,props:tn,emits:tn,methods:tn,computed:tn,beforeCreate:Gt,created:Gt,beforeMount:Gt,mounted:Gt,beforeUpdate:Gt,updated:Gt,beforeDestroy:Gt,beforeUnmount:Gt,destroyed:Gt,unmounted:Gt,activated:Gt,deactivated:Gt,errorCaptured:Gt,serverPrefetch:Gt,components:tn,directives:tn,watch:lw,provide:jp,inject:aw};function jp(e,t){return t?e?function(){return kt(Ae(e)?e.call(this,this):e,Ae(t)?t.call(this,this):t)}:t:e}function aw(e,t){return tn(cc(e),cc(t))}function cc(e){if(Ne(e)){let t={};for(let o=0;o0)&&!(a&16)){if(a&8){let d=e.vnode.dynamicProps;for(let u=0;u{s=!0;let[p,f]=mm(u,t,!0);kt(a,p),f&&l.push(...f)};!o&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!s)return it(e)&&r.set(e,Gr),Gr;if(Ne(i))for(let d=0;d-1,f[1]=y<0||m-1||Ue(f,"default"))&&l.push(u)}}}let c=[a,l];return it(e)&&r.set(e,c),c}function Wp(e){return e[0]!=="$"}function Kp(e){let t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function Up(e,t){return Kp(e)===Kp(t)}function qp(e,t){return Ne(t)?t.findIndex(o=>Up(o,e)):Ae(t)&&Up(t,e)?0:-1}var hm=e=>e[0]==="_"||e==="$stable",Cc=e=>Ne(e)?e.map(Wo):[Wo(e)],dw=(e,t,o)=>{if(t._n)return t;let r=ln((...n)=>Cc(t(...n)),o);return r._c=!1,r},gm=(e,t,o)=>{let r=e._ctx;for(let n in e){if(hm(n))continue;let i=e[n];if(Ae(i))t[n]=dw(n,i,r);else if(i!=null){let a=Cc(i);t[n]=()=>a}}},xm=(e,t)=>{let o=Cc(t);e.slots.default=()=>o},uw=(e,t)=>{if(e.vnode.shapeFlag&32){let o=t._;o?(e.slots=Ve(t),En(t,"_",o)):gm(t,e.slots={})}else e.slots={},t&&xm(e,t);En(e.slots,rl,1)},fw=(e,t,o)=>{let{vnode:r,slots:n}=e,i=!0,a=nt;if(r.shapeFlag&32){let l=t._;l?o&&l===1?i=!1:(kt(n,t),!o&&l===1&&delete n._):(i=!t.$stable,gm(t,n)),a=t}else t&&(xm(e,t),a={default:1});if(i)for(let l in n)!hm(l)&&!(l in a)&&delete n[l]};function vm(){return{app:null,config:{isNativeTag:hp,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var pw=0;function mw(e,t){return function(r,n=null){Ae(r)||(r=Object.assign({},r)),n!=null&&!it(n)&&(n=null);let i=vm(),a=new Set,l=!1,s=i.app={_uid:pw++,_component:r,_props:n,_container:null,_context:i,_instance:null,version:Lw,get config(){return i.config},set config(c){},use(c,...d){return a.has(c)||(c&&Ae(c.install)?(a.add(c),c.install(s,...d)):Ae(c)&&(a.add(c),c(s,...d))),s},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),s},component(c,d){return d?(i.components[c]=d,s):i.components[c]},directive(c,d){return d?(i.directives[c]=d,s):i.directives[c]},mount(c,d,u){if(!l){let p=ft(r,n);return p.appContext=i,d&&t?t(p,c):e(p,c,u),l=!0,s._container=c,c.__vue_app__=s,il(p.component)||p.component.proxy}},unmount(){l&&(e(null,s._container),delete s._container.__vue_app__)},provide(c,d){return i.provides[c]=d,s}};return s}}function uc(e,t,o,r,n=!1){if(Ne(e)){e.forEach((p,f)=>uc(p,t&&(Ne(t)?t[f]:t),o,r,n));return}if(vi(r)&&!n)return;let i=r.shapeFlag&4?il(r.component)||r.component.proxy:r.el,a=n?null:i,{i:l,r:s}=e,c=t&&t.r,d=l.refs===nt?l.refs={}:l.refs,u=l.setupState;if(c!=null&&c!==s&&(yt(c)?(d[c]=null,Ue(u,c)&&(u[c]=null)):Et(c)&&(c.value=null)),Ae(s))lr(s,l,12,[a,d]);else{let p=yt(s),f=Et(s);if(p||f){let m=()=>{if(e.f){let y=p?Ue(u,s)?u[s]:d[s]:s.value;n?Ne(y)&&Pa(y,i):Ne(y)?y.includes(i)||y.push(i):p?(d[s]=[i],Ue(u,s)&&(u[s]=d[s])):(s.value=[i],e.k&&(d[e.k]=s.value))}else p?(d[s]=a,Ue(u,s)&&(u[s]=a)):f&&(s.value=a,e.k&&(d[e.k]=a))};a?(m.id=-1,eo(m,o)):m()}}}function hw(){let e=[]}var eo=UC;function bm(e){return gw(e)}function gw(e,t){hw();let o=xp();o.__VUE__=!0;let{insert:r,remove:n,patchProp:i,createElement:a,createText:l,createComment:s,setText:c,setElementText:d,parentNode:u,nextSibling:p,setScopeId:f=io,insertStaticContent:m}=e,y=(h,C,L,q=null,K=null,ne=null,oe=!1,H=null,Q=!!C.dynamicChildren)=>{if(h===C)return;h&&!rn(h,C)&&(q=vt(h),Xe(h,K,ne,!0),h=null),C.patchFlag===-2&&(Q=!1,C.dynamicChildren=null);let{type:Y,ref:N,shapeFlag:$}=C;switch(Y){case ol:w(h,C,L,q);break;case Kt:g(h,C,L,q);break;case Ci:h==null&&O(C,L,q,oe);break;case St:se(h,C,L,q,K,ne,oe,H,Q);break;default:$&1?D(h,C,L,q,K,ne,oe,H,Q):$&6?ye(h,C,L,q,K,ne,oe,H,Q):($&64||$&128)&&Y.process(h,C,L,q,K,ne,oe,H,Q,ot)}N!=null&&K&&uc(N,h&&h.ref,ne,C||h,!C)},w=(h,C,L,q)=>{if(h==null)r(C.el=l(C.children),L,q);else{let K=C.el=h.el;C.children!==h.children&&c(K,C.children)}},g=(h,C,L,q)=>{h==null?r(C.el=s(C.children||""),L,q):C.el=h.el},O=(h,C,L,q)=>{[h.el,h.anchor]=m(h.children,C,L,q,h.el,h.anchor)},j=(h,C,L,q)=>{if(C.children!==h.children){let K=p(h.anchor);v(h),[C.el,C.anchor]=m(C.children,L,K,q)}else C.el=h.el,C.anchor=h.anchor},S=({el:h,anchor:C},L,q)=>{let K;for(;h&&h!==C;)K=p(h),r(h,L,q),h=K;r(C,L,q)},v=({el:h,anchor:C})=>{let L;for(;h&&h!==C;)L=p(h),n(h),h=L;n(C)},D=(h,C,L,q,K,ne,oe,H,Q)=>{oe=oe||C.type==="svg",h==null?x(C,L,q,K,ne,oe,H,Q):E(h,C,K,ne,oe,H,Q)},x=(h,C,L,q,K,ne,oe,H)=>{let Q,Y,{type:N,props:$,shapeFlag:V,transition:ae,dirs:pe}=h;if(Q=h.el=a(h.type,ne,$&&$.is,$),V&8?d(Q,h.children):V&16&&A(h.children,Q,null,q,K,ne&&N!=="foreignObject",oe,H),pe&&Jr(h,null,q,"created"),$){for(let W in $)W!=="value"&&!di(W)&&i(Q,W,null,$[W],ne,h.children,q,K,We);"value"in $&&i(Q,"value",null,$.value),(Y=$.onVnodeBeforeMount)&&jo(Y,q,h)}k(Q,h,h.scopeId,oe,q),pe&&Jr(h,null,q,"beforeMount");let _=(!K||K&&!K.pendingBranch)&&ae&&!ae.persisted;_&&ae.beforeEnter(Q),r(Q,C,L),((Y=$&&$.onVnodeMounted)||_||pe)&&eo(()=>{Y&&jo(Y,q,h),_&&ae.enter(Q),pe&&Jr(h,null,q,"mounted")},K)},k=(h,C,L,q,K)=>{if(L&&f(h,L),q)for(let ne=0;ne{for(let Y=Q;Y{let H=C.el=h.el,{patchFlag:Q,dynamicChildren:Y,dirs:N}=C;Q|=h.patchFlag&16;let $=h.props||nt,V=C.props||nt,ae;L&&en(L,!1),(ae=V.onVnodeBeforeUpdate)&&jo(ae,L,C,h),N&&Jr(C,h,L,"beforeUpdate"),L&&en(L,!0);let pe=K&&C.type!=="foreignObject";if(Y?z(h.dynamicChildren,Y,H,L,q,pe,ne):oe||Me(h,C,H,null,L,q,pe,ne,!1),Q>0){if(Q&16)M(H,C,$,V,L,q,K);else if(Q&2&&$.class!==V.class&&i(H,"class",null,V.class,K),Q&4&&i(H,"style",$.style,V.style,K),Q&8){let _=C.dynamicProps;for(let W=0;W<_.length;W++){let re=_[W],P=$[re],Z=V[re];(Z!==P||re==="value")&&i(H,re,P,Z,K,h.children,L,q,We)}}Q&1&&h.children!==C.children&&d(H,C.children)}else!oe&&Y==null&&M(H,C,$,V,L,q,K);((ae=V.onVnodeUpdated)||N)&&eo(()=>{ae&&jo(ae,L,C,h),N&&Jr(C,h,L,"updated")},q)},z=(h,C,L,q,K,ne,oe)=>{for(let H=0;H{if(L!==q){if(L!==nt)for(let H in L)!di(H)&&!(H in q)&&i(h,H,L[H],null,oe,C.children,K,ne,We);for(let H in q){if(di(H))continue;let Q=q[H],Y=L[H];Q!==Y&&H!=="value"&&i(h,H,Y,Q,oe,C.children,K,ne,We)}"value"in q&&i(h,"value",L.value,q.value)}},se=(h,C,L,q,K,ne,oe,H,Q)=>{let Y=C.el=h?h.el:l(""),N=C.anchor=h?h.anchor:l(""),{patchFlag:$,dynamicChildren:V,slotScopeIds:ae}=C;ae&&(H=H?H.concat(ae):ae),h==null?(r(Y,L,q),r(N,L,q),A(C.children,L,N,K,ne,oe,H,Q)):$>0&&$&64&&V&&h.dynamicChildren?(z(h.dynamicChildren,V,L,K,ne,oe,H),(C.key!=null||K&&C===K.subTree)&&wc(h,C,!0)):Me(h,C,L,N,K,ne,oe,H,Q)},ye=(h,C,L,q,K,ne,oe,H,Q)=>{C.slotScopeIds=H,h==null?C.shapeFlag&512?K.ctx.activate(C,L,q,oe,Q):Ie(C,L,q,K,ne,oe,Q):fe(h,C,Q)},Ie=(h,C,L,q,K,ne,oe)=>{let H=h.component=Ew(h,q,K);if(Ja(h)&&(H.ctx.renderer=ot),Dw(H),H.asyncDep){if(K&&K.registerDep(H,ce),!h.el){let Q=H.subTree=ft(Kt);g(null,Q,C,L)}return}ce(H,h,C,L,K,ne,oe)},fe=(h,C,L)=>{let q=C.component=h.component;if(jC(h,C,L))if(q.asyncDep&&!q.asyncResolved){we(q,C,L);return}else q.next=C,LC(q.update),q.update();else C.el=h.el,q.vnode=C},ce=(h,C,L,q,K,ne,oe)=>{let H=()=>{if(h.isMounted){let{next:N,bu:$,u:V,parent:ae,vnode:pe}=h,_=N,W;en(h,!1),N?(N.el=pe.el,we(h,N,oe)):N=pe,$&&pi($),(W=N.props&&N.props.onVnodeBeforeUpdate)&&jo(W,ae,N,pe),en(h,!0);let re=rc(h),P=h.subTree;h.subTree=re,y(P,re,u(P.el),vt(P),h,K,ne),N.el=re.el,_===null&&WC(h,re.el),V&&eo(V,K),(W=N.props&&N.props.onVnodeUpdated)&&eo(()=>jo(W,ae,N,pe),K)}else{let N,{el:$,props:V}=C,{bm:ae,m:pe,parent:_}=h,W=vi(C);if(en(h,!1),ae&&pi(ae),!W&&(N=V&&V.onVnodeBeforeMount)&&jo(N,_,C),en(h,!0),$&&Dt){let re=()=>{h.subTree=rc(h),Dt($,h.subTree,h,K,null)};W?C.type.__asyncLoader().then(()=>!h.isUnmounted&&re()):re()}else{let re=h.subTree=rc(h);y(null,re,L,q,h,K,ne),C.el=re.el}if(pe&&eo(pe,K),!W&&(N=V&&V.onVnodeMounted)){let re=C;eo(()=>jo(N,_,re),K)}(C.shapeFlag&256||_&&vi(_.vnode)&&_.vnode.shapeFlag&256)&&h.a&&eo(h.a,K),h.isMounted=!0,C=L=q=null}},Q=h.effect=new Zr(H,()=>mc(Y),h.scope),Y=h.update=()=>Q.run();Y.id=h.uid,en(h,!0),Y()},we=(h,C,L)=>{C.component=h;let q=h.vnode.props;h.vnode=C,h.next=null,cw(h,C.props,q,L),fw(h,C.children,L),_r(),Bp(),Er()},Me=(h,C,L,q,K,ne,oe,H,Q=!1)=>{let Y=h&&h.children,N=h?h.shapeFlag:0,$=C.children,{patchFlag:V,shapeFlag:ae}=C;if(V>0){if(V&128){Le(Y,$,L,q,K,ne,oe,H,Q);return}else if(V&256){Be(Y,$,L,q,K,ne,oe,H,Q);return}}ae&8?(N&16&&We(Y,K,ne),$!==Y&&d(L,$)):N&16?ae&16?Le(Y,$,L,q,K,ne,oe,H,Q):We(Y,K,ne,!0):(N&8&&d(L,""),ae&16&&A($,L,q,K,ne,oe,H,Q))},Be=(h,C,L,q,K,ne,oe,H,Q)=>{h=h||Gr,C=C||Gr;let Y=h.length,N=C.length,$=Math.min(Y,N),V;for(V=0;V<$;V++){let ae=C[V]=Q?Or(C[V]):Wo(C[V]);y(h[V],ae,L,null,K,ne,oe,H,Q)}Y>N?We(h,K,ne,!0,!1,$):A(C,L,q,K,ne,oe,H,Q,$)},Le=(h,C,L,q,K,ne,oe,H,Q)=>{let Y=0,N=C.length,$=h.length-1,V=N-1;for(;Y<=$&&Y<=V;){let ae=h[Y],pe=C[Y]=Q?Or(C[Y]):Wo(C[Y]);if(rn(ae,pe))y(ae,pe,L,null,K,ne,oe,H,Q);else break;Y++}for(;Y<=$&&Y<=V;){let ae=h[$],pe=C[V]=Q?Or(C[V]):Wo(C[V]);if(rn(ae,pe))y(ae,pe,L,null,K,ne,oe,H,Q);else break;$--,V--}if(Y>$){if(Y<=V){let ae=V+1,pe=aeV)for(;Y<=$;)Xe(h[Y],K,ne,!0),Y++;else{let ae=Y,pe=Y,_=new Map;for(Y=pe;Y<=V;Y++){let He=C[Y]=Q?Or(C[Y]):Wo(C[Y]);He.key!=null&&_.set(He.key,Y)}let W,re=0,P=V-pe+1,Z=!1,le=0,Ce=new Array(P);for(Y=0;Y=P){Xe(He,K,ne,!0);continue}let Fe;if(He.key!=null)Fe=_.get(He.key);else for(W=pe;W<=V;W++)if(Ce[W-pe]===0&&rn(He,C[W])){Fe=W;break}Fe===void 0?Xe(He,K,ne,!0):(Ce[Fe-pe]=Y+1,Fe>=le?le=Fe:Z=!0,y(He,C[Fe],L,null,K,ne,oe,H,Q),re++)}let Ke=Z?xw(Ce):Gr;for(W=Ke.length-1,Y=P-1;Y>=0;Y--){let He=pe+Y,Fe=C[He],qe=He+1{let{el:ne,type:oe,transition:H,children:Q,shapeFlag:Y}=h;if(Y&6){Je(h.component.subTree,C,L,q);return}if(Y&128){h.suspense.move(C,L,q);return}if(Y&64){oe.move(h,C,L,ot);return}if(oe===St){r(ne,C,L);for(let $=0;$H.enter(ne),K);else{let{leave:$,delayLeave:V,afterLeave:ae}=H,pe=()=>r(ne,C,L),_=()=>{$(ne,()=>{pe(),ae&&ae()})};V?V(ne,pe,_):_()}else r(ne,C,L)},Xe=(h,C,L,q=!1,K=!1)=>{let{type:ne,props:oe,ref:H,children:Q,dynamicChildren:Y,shapeFlag:N,patchFlag:$,dirs:V}=h;if(H!=null&&uc(H,null,L,h,!0),N&256){C.ctx.deactivate(h);return}let ae=N&1&&V,pe=!vi(h),_;if(pe&&(_=oe&&oe.onVnodeBeforeUnmount)&&jo(_,C,h),N&6)ze(h.component,L,q);else{if(N&128){h.suspense.unmount(L,q);return}ae&&Jr(h,null,C,"beforeUnmount"),N&64?h.type.remove(h,C,L,K,ot,q):Y&&(ne!==St||$>0&&$&64)?We(Y,C,L,!1,!0):(ne===St&&$&384||!K&&N&16)&&We(Q,C,L),q&&ct(h)}(pe&&(_=oe&&oe.onVnodeUnmounted)||ae)&&eo(()=>{_&&jo(_,C,h),ae&&Jr(h,null,C,"unmounted")},L)},ct=h=>{let{type:C,el:L,anchor:q,transition:K}=h;if(C===St){wt(L,q);return}if(C===Ci){v(h);return}let ne=()=>{n(L),K&&!K.persisted&&K.afterLeave&&K.afterLeave()};if(h.shapeFlag&1&&K&&!K.persisted){let{leave:oe,delayLeave:H}=K,Q=()=>oe(L,ne);H?H(h.el,ne,Q):Q()}else ne()},wt=(h,C)=>{let L;for(;h!==C;)L=p(h),n(h),h=L;n(C)},ze=(h,C,L)=>{let{bum:q,scope:K,update:ne,subTree:oe,um:H}=h;q&&pi(q),K.stop(),ne&&(ne.active=!1,Xe(oe,h,C,L)),H&&eo(H,C),eo(()=>{h.isUnmounted=!0},C),C&&C.pendingBranch&&!C.isUnmounted&&h.asyncDep&&!h.asyncResolved&&h.suspenseId===C.pendingId&&(C.deps--,C.deps===0&&C.resolve())},We=(h,C,L,q=!1,K=!1,ne=0)=>{for(let oe=ne;oeh.shapeFlag&6?vt(h.component.subTree):h.shapeFlag&128?h.suspense.next():p(h.anchor||h.el),Pe=(h,C,L)=>{h==null?C._vnode&&Xe(C._vnode,null,null,!0):y(C._vnode||null,h,C,null,null,null,L),Bp(),rm(),C._vnode=h},ot={p:y,um:Xe,m:Je,r:ct,mt:Ie,mc:A,pc:Me,pbc:z,n:vt,o:e},rt,Dt;return t&&([rt,Dt]=t(ot)),{render:Pe,hydrate:rt,createApp:mw(Pe,rt)}}function en({effect:e,update:t},o){e.allowRecurse=t.allowRecurse=o}function wc(e,t,o=!1){let r=e.children,n=t.children;if(Ne(r)&&Ne(n))for(let i=0;i>1,e[o[l]]0&&(t[r]=o[i-1]),o[i]=r)}}for(i=o.length,a=o[i-1];i-- >0;)o[i]=a,a=t[a];return o}var vw=e=>e.__isTeleport,yi=e=>e&&(e.disabled||e.disabled===""),Gp=e=>typeof SVGElement<"u"&&e instanceof SVGElement,fc=(e,t)=>{let o=e&&e.to;if(yt(o))if(t){let r=t(o);return r}else return null;else return o},bw={__isTeleport:!0,process(e,t,o,r,n,i,a,l,s,c){let{mc:d,pc:u,pbc:p,o:{insert:f,querySelector:m,createText:y,createComment:w}}=c,g=yi(t.props),{shapeFlag:O,children:j,dynamicChildren:S}=t;if(e==null){let v=t.el=y(""),D=t.anchor=y("");f(v,o,r),f(D,o,r);let x=t.target=fc(t.props,m),k=t.targetAnchor=y("");x&&(f(k,x),a=a||Gp(x));let A=(E,z)=>{O&16&&d(j,E,z,n,i,a,l,s)};g?A(o,D):x&&A(x,k)}else{t.el=e.el;let v=t.anchor=e.anchor,D=t.target=e.target,x=t.targetAnchor=e.targetAnchor,k=yi(e.props),A=k?o:D,E=k?v:x;if(a=a||Gp(D),S?(p(e.dynamicChildren,S,A,n,i,a,l),wc(e,t,!0)):s||u(e,t,A,E,n,i,a,l,!1),g)k||Ka(t,o,v,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let z=t.target=fc(t.props,m);z&&Ka(t,z,null,c,0)}else k&&Ka(t,D,x,c,1)}Cm(t)},remove(e,t,o,r,{um:n,o:{remove:i}},a){let{shapeFlag:l,children:s,anchor:c,targetAnchor:d,target:u,props:p}=e;if(u&&i(d),(a||!yi(p))&&(i(c),l&16))for(let f=0;f0?Do||Gr:null,Cw(),_i>0&&Do&&Do.push(e),e}function ut(e,t,o,r,n,i){return wm(pt(e,t,o,r,n,i,!0))}function Di(e,t,o,r,n){return wm(ft(e,t,o,r,n,!0))}function Rn(e){return e?e.__v_isVNode===!0:!1}function rn(e,t){return e.type===t.type&&e.key===t.key}var rl="__vInternal",km=({key:e})=>e??null,Ua=({ref:e,ref_key:t,ref_for:o})=>e!=null?yt(e)||Et(e)||Ae(e)?{i:Wt,r:e,k:t,f:!!o}:e:null;function pt(e,t=null,o=null,r=0,n=null,i=e===St?0:1,a=!1,l=!1){let s={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&km(t),ref:t&&Ua(t),scopeId:am,slotScopeIds:null,children:o,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:Wt};return l?(kc(s,o),i&128&&e.normalize(s)):o&&(s.shapeFlag|=yt(o)?8:16),_i>0&&!a&&Do&&(s.patchFlag>0||i&6)&&s.patchFlag!==32&&Do.push(s),s}var ft=ww;function ww(e,t=null,o=null,r=0,n=null,i=!1){if((!e||e===tw)&&(e=Kt),Rn(e)){let l=Pr(e,t,!0);return o&&kc(l,o),_i>0&&!i&&Do&&(l.shapeFlag&6?Do[Do.indexOf(e)]=l:Do.push(l)),l.patchFlag|=-2,l}if(Aw(e)&&(e=e.__vccOpts),t){t=kw(t);let{class:l,style:s}=t;l&&!yt(l)&&(t.class=qr(l)),it(s)&&(Fa(s)&&!Ne(s)&&(s=kt({},s)),t.style=vr(s))}let a=yt(e)?1:KC(e)?128:vw(e)?64:it(e)?4:Ae(e)?2:0;return pt(e,t,o,r,n,a,i,!0)}function kw(e){return e?Fa(e)||rl in e?kt({},e):e:null}function Pr(e,t,o=!1){let{props:r,ref:n,patchFlag:i,children:a}=e,l=t?Ti(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&km(l),ref:t&&t.ref?o&&n?Ne(n)?n.concat(Ua(t)):[n,Ua(t)]:Ua(t):n,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==St?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Pr(e.ssContent),ssFallback:e.ssFallback&&Pr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx}}function Mn(e=" ",t=0){return ft(ol,null,e,t)}function nl(e="",t=!1){return t?(Ye(),Di(Kt,null,e)):ft(Kt,null,e)}function Wo(e){return e==null||typeof e=="boolean"?ft(Kt):Ne(e)?ft(St,null,e.slice()):typeof e=="object"?Or(e):ft(ol,null,String(e))}function Or(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Pr(e)}function kc(e,t){let o=0,{shapeFlag:r}=e;if(t==null)t=null;else if(Ne(t))o=16;else if(typeof t=="object")if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),kc(e,n()),n._c&&(n._d=!0));return}else{o=32;let n=t._;!n&&!(rl in t)?t._ctx=Wt:n===3&&Wt&&(Wt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ae(t)?(t={default:t,_ctx:Wt},o=32):(t=String(t),r&64?(o=16,t=[Mn(t)]):o=8);e.children=t,e.shapeFlag|=o}function Ti(...e){let t={};for(let o=0;ozt||Wt,In=e=>{zt=e,e.scope.on()},an=()=>{zt&&zt.scope.off(),zt=null};function Sm(e){return e.vnode.shapeFlag&4}var Ei=!1;function Dw(e,t=!1){Ei=t;let{props:o,children:r}=e.vnode,n=Sm(e);sw(e,o,n,t),uw(e,r);let i=n?Tw(e,t):void 0;return Ei=!1,i}function Tw(e,t){var o;let r=e.type;e.accessCache=Object.create(null),e.proxy=Qr(new Proxy(e.ctx,ow));let{setup:n}=r;if(n){let i=e.setupContext=n.length>1?Pw(e):null;In(e),_r();let a=lr(n,e,0,[e.props,i]);if(Er(),an(),Hs(a)){if(a.then(an,an),t)return a.then(l=>{Xp(e,l,t)}).catch(l=>{Ya(l,e,0)});e.asyncDep=a}else Xp(e,a,t)}else _m(e,t)}function Xp(e,t,o){Ae(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:it(t)&&(e.setupState=ja(t)),_m(e,o)}var Zp,Qp;function _m(e,t,o){let r=e.type;if(!e.render){if(!t&&Zp&&!r.render){let n=r.template||yc(e).template;if(n){let{isCustomElement:i,compilerOptions:a}=e.appContext.config,{delimiters:l,compilerOptions:s}=r,c=kt(kt({isCustomElement:i,delimiters:l},a),s);r.render=Zp(n,c)}}e.render=r.render||io,Qp&&Qp(e)}In(e),_r(),rw(e),Er(),an()}function Ow(e){return new Proxy(e.attrs,{get(t,o){return Jt(e,"get","$attrs"),t[o]}})}function Pw(e){let t=r=>{e.exposed=r||{}},o;return{get attrs(){return o||(o=Ow(e))},slots:e.slots,emit:e.emit,expose:t}}function il(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(ja(Qr(e.exposed)),{get(t,o){if(o in t)return t[o];if(o in bi)return bi[o](e)},has(t,o){return o in t||o in bi}}))}var Nw=/(?:^|[-_])(\w)/g,Rw=e=>e.replace(Nw,t=>t.toUpperCase()).replace(/[-_]/g,"");function Iw(e,t=!0){return Ae(e)?e.displayName||e.name:e.name||t&&e.__name}function Em(e,t,o=!1){let r=Iw(t);if(!r&&t.__file){let n=t.__file.match(/([^/\\]+)\.\w+$/);n&&(r=n[1])}if(!r&&e&&e.parent){let n=i=>{for(let a in i)if(i[a]===t)return a};r=n(e.components||e.parent.type.components)||n(e.appContext.components)}return r?Rw(r):o?"App":"Anonymous"}function Aw(e){return Ae(e)&&"__vccOpts"in e}var F=(e,t)=>zp(e,t,Ei);function b(e,t,o){let r=arguments.length;return r===2?it(t)&&!Ne(t)?Rn(t)?ft(e,null,[t]):ft(e,t):ft(e,null,t):(r>3?o=Array.prototype.slice.call(arguments,2):r===3&&Rn(o)&&(o=[o]),ft(e,t,o))}var Mw=Symbol(""),$w=()=>{{let e=ke(Mw);return e}};var Lw="3.2.45";var zw="http://www.w3.org/2000/svg",dn=typeof document<"u"?document:null,Dm=dn&&dn.createElement("template"),Bw={insert:(e,t,o)=>{t.insertBefore(e,o||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,o,r)=>{let n=t?dn.createElementNS(zw,e):dn.createElement(e,o?{is:o}:void 0);return e==="select"&&r&&r.multiple!=null&&n.setAttribute("multiple",r.multiple),n},createText:e=>dn.createTextNode(e),createComment:e=>dn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>dn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,o,r,n,i){let a=o?o.previousSibling:t.lastChild;if(n&&(n===i||n.nextSibling))for(;t.insertBefore(n.cloneNode(!0),o),!(n===i||!(n=n.nextSibling)););else{Dm.innerHTML=r?`${e}`:e;let l=Dm.content;if(r){let s=l.firstChild;for(;s.firstChild;)l.appendChild(s.firstChild);l.removeChild(s)}t.insertBefore(l,o)}return[a?a.nextSibling:t.firstChild,o?o.previousSibling:t.lastChild]}};function Hw(e,t,o){let r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):o?e.setAttribute("class",t):e.className=t}function Vw(e,t,o){let r=e.style,n=yt(o);if(o&&!n){for(let i in o)Dc(r,i,o[i]);if(t&&!yt(t))for(let i in t)o[i]==null&&Dc(r,i,"")}else{let i=r.display;n?t!==o&&(r.cssText=o):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=i)}}var Tm=/\s*!important$/;function Dc(e,t,o){if(Ne(o))o.forEach(r=>Dc(e,t,r));else if(o==null&&(o=""),t.startsWith("--"))e.setProperty(t,o);else{let r=Fw(e,t);Tm.test(o)?e.setProperty(yr(r),o.replace(Tm,""),"important"):e[r]=o}}var Om=["Webkit","Moz","ms"],Sc={};function Fw(e,t){let o=Sc[t];if(o)return o;let r=Bo(t);if(r!=="filter"&&r in e)return Sc[t]=r;r=ui(r);for(let n=0;n_c||(Yw.then(()=>_c=0),_c=Date.now());function Zw(e,t){let o=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=o.attached)return;ao(Qw(r,o.value),t,5,[r])};return o.value=e,o.attached=Xw(),o}function Qw(e,t){if(Ne(t)){let o=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{o.call(e),e._stopped=!0},t.map(r=>n=>!n._stopped&&r&&r(n))}else return t}var Rm=/^on[a-z]/,Jw=(e,t,o,r,n=!1,i,a,l,s)=>{t==="class"?Hw(e,r,n):t==="style"?Vw(e,o,r):_n(t)?ci(t)||qw(e,t,o,r,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ek(e,t,r,n))?Ww(e,t,r,i,a,l,s):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),jw(e,t,r,n))};function ek(e,t,o,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&Rm.test(t)&&Ae(o)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Rm.test(t)&&yt(o)?!1:t in e}function Bm(e){let t=Uo();if(!t)return;let o=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>Oc(i,n))},r=()=>{let n=e(t.proxy);Tc(t.subTree,n),o(n)};lm(r),tt(()=>{let n=new MutationObserver(r);n.observe(t.subTree.el.parentNode,{childList:!0}),sn(()=>n.disconnect())})}function Tc(e,t){if(e.shapeFlag&128){let o=e.suspense;e=o.activeBranch,o.pendingBranch&&!o.isHydrating&&o.effects.push(()=>{Tc(o.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Oc(e.el,t);else if(e.type===St)e.children.forEach(o=>Tc(o,t));else if(e.type===Ci){let{el:o,anchor:r}=e;for(;o&&(Oc(o,t),o!==r);)o=o.nextSibling}}function Oc(e,t){if(e.nodeType===1){let o=e.style;for(let r in t)o.setProperty(`--${r}`,t[r])}}var Nr="transition",Oi="animation",To=(e,{slots:t})=>b(gc,Vm(e),t);To.displayName="Transition";var Hm={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},tk=To.props=kt({},gc.props,Hm),cn=(e,t=[])=>{Ne(e)?e.forEach(o=>o(...t)):e&&e(...t)},Im=e=>e?Ne(e)?e.some(t=>t.length>1):e.length>1:!1;function Vm(e){let t={};for(let M in e)M in Hm||(t[M]=e[M]);if(e.css===!1)return t;let{name:o="v",type:r,duration:n,enterFromClass:i=`${o}-enter-from`,enterActiveClass:a=`${o}-enter-active`,enterToClass:l=`${o}-enter-to`,appearFromClass:s=i,appearActiveClass:c=a,appearToClass:d=l,leaveFromClass:u=`${o}-leave-from`,leaveActiveClass:p=`${o}-leave-active`,leaveToClass:f=`${o}-leave-to`}=e,m=ok(n),y=m&&m[0],w=m&&m[1],{onBeforeEnter:g,onEnter:O,onEnterCancelled:j,onLeave:S,onLeaveCancelled:v,onBeforeAppear:D=g,onAppear:x=O,onAppearCancelled:k=j}=t,A=(M,se,ye)=>{Rr(M,se?d:l),Rr(M,se?c:a),ye&&ye()},E=(M,se)=>{M._isLeaving=!1,Rr(M,u),Rr(M,f),Rr(M,p),se&&se()},z=M=>(se,ye)=>{let Ie=M?x:O,fe=()=>A(se,M,ye);cn(Ie,[se,fe]),Am(()=>{Rr(se,M?s:i),dr(se,M?d:l),Im(Ie)||Mm(se,r,y,fe)})};return kt(t,{onBeforeEnter(M){cn(g,[M]),dr(M,i),dr(M,a)},onBeforeAppear(M){cn(D,[M]),dr(M,s),dr(M,c)},onEnter:z(!1),onAppear:z(!0),onLeave(M,se){M._isLeaving=!0;let ye=()=>E(M,se);dr(M,u),jm(),dr(M,p),Am(()=>{M._isLeaving&&(Rr(M,u),dr(M,f),Im(S)||Mm(M,r,w,ye))}),cn(S,[M,ye])},onEnterCancelled(M){A(M,!1),cn(j,[M])},onAppearCancelled(M){A(M,!0),cn(k,[M])},onLeaveCancelled(M){E(M),cn(v,[M])}})}function ok(e){if(e==null)return null;if(it(e))return[Ec(e.enter),Ec(e.leave)];{let t=Ec(e);return[t,t]}}function Ec(e){return Dn(e)}function dr(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e._vtc||(e._vtc=new Set)).add(t)}function Rr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));let{_vtc:o}=e;o&&(o.delete(t),o.size||(e._vtc=void 0))}function Am(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var rk=0;function Mm(e,t,o,r){let n=e._endId=++rk,i=()=>{n===e._endId&&r()};if(o)return setTimeout(i,o);let{type:a,timeout:l,propCount:s}=Fm(e,t);if(!a)return r();let c=a+"end",d=0,u=()=>{e.removeEventListener(c,p),i()},p=f=>{f.target===e&&++d>=s&&u()};setTimeout(()=>{d(o[m]||"").split(", "),n=r(`${Nr}Delay`),i=r(`${Nr}Duration`),a=$m(n,i),l=r(`${Oi}Delay`),s=r(`${Oi}Duration`),c=$m(l,s),d=null,u=0,p=0;t===Nr?a>0&&(d=Nr,u=a,p=i.length):t===Oi?c>0&&(d=Oi,u=c,p=s.length):(u=Math.max(a,c),d=u>0?a>c?Nr:Oi:null,p=d?d===Nr?i.length:s.length:0);let f=d===Nr&&/\b(transform|all)(,|$)/.test(r(`${Nr}Property`).toString());return{type:d,timeout:u,propCount:p,hasTransform:f}}function $m(e,t){for(;e.lengthLm(o)+Lm(e[r])))}function Lm(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function jm(){return document.body.offsetHeight}var Wm=new WeakMap,Km=new WeakMap,nk={name:"TransitionGroup",props:kt({},tk,{tag:String,moveClass:String}),setup(e,{slots:t}){let o=Uo(),r=hc(),n,i;return bc(()=>{if(!n.length)return;let a=e.moveClass||`${e.name||"v"}-move`;if(!sk(n[0].el,o.vnode.el,a))return;n.forEach(ik),n.forEach(ak);let l=n.filter(lk);jm(),l.forEach(s=>{let c=s.el,d=c.style;dr(c,a),d.transform=d.webkitTransform=d.transitionDuration="";let u=c._moveCb=p=>{p&&p.target!==c||(!p||/transform$/.test(p.propertyName))&&(c.removeEventListener("transitionend",u),c._moveCb=null,Rr(c,a))};c.addEventListener("transitionend",u)})}),()=>{let a=Ve(e),l=Vm(a),s=a.tag||St;n=i,i=t.default?Qa(t.default()):[];for(let c=0;c{a.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),o.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";let n=t.nodeType===1?t:t.parentNode;n.appendChild(r);let{hasTransform:i}=Fm(r);return n.removeChild(r),i}var ck=kt({patchProp:Jw},Bw),zm;function dk(){return zm||(zm=bm(ck))}var qm=(...e)=>{let t=dk().createApp(...e),{mount:o}=t;return t.mount=r=>{let n=uk(r);if(!n)return;let i=t._component;!Ae(i)&&!i.render&&!i.template&&(i.template=n.innerHTML),n.innerHTML="";let a=o(n,!1,n instanceof SVGElement);return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),a},t};function uk(e){return yt(e)?document.querySelector(e):e}var al=[],Gm=new WeakMap;function fk(){al.forEach(e=>e(...Gm.get(e))),al=[]}function Pi(e,...t){Gm.set(e,t),!al.includes(e)&&al.push(e)===1&&requestAnimationFrame(fk)}function ll(e,t){let{target:o}=e;for(;o;){if(o.dataset&&o.dataset[t]!==void 0)return!0;o=o.parentElement}return!1}function sl(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function Ir(e){if(e!=null)return typeof e=="number"?`${e}px`:e.endsWith("px")?e:`${e}px`}function $n(e,t){let o=e.trim().split(/\s+/g),r={top:o[0]};switch(o.length){case 1:r.right=o[0],r.bottom=o[0],r.left=o[0];break;case 2:r.right=o[1],r.left=o[1],r.bottom=o[0];break;case 3:r.right=o[1],r.bottom=o[2],r.left=o[1];break;case 4:r.right=o[1],r.bottom=o[2],r.left=o[3];break;default:throw new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return t===void 0?r:r[t]}var Pc={black:"#000",silver:"#C0C0C0",gray:"#808080",white:"#FFF",maroon:"#800000",red:"#F00",purple:"#800080",fuchsia:"#F0F",green:"#008000",lime:"#0F0",olive:"#808000",yellow:"#FF0",navy:"#000080",blue:"#00F",teal:"#008080",aqua:"#0FF",transparent:"#0000"};var qo="^\\s*",Go="\\s*$",Ar="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",lo="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",un="([0-9A-Fa-f])",fn="([0-9A-Fa-f]{2})",VN=new RegExp(`${qo}hsl\\s*\\(${lo},${Ar},${Ar}\\)${Go}`),FN=new RegExp(`${qo}hsv\\s*\\(${lo},${Ar},${Ar}\\)${Go}`),jN=new RegExp(`${qo}hsla\\s*\\(${lo},${Ar},${Ar},${lo}\\)${Go}`),WN=new RegExp(`${qo}hsva\\s*\\(${lo},${Ar},${Ar},${lo}\\)${Go}`),pk=new RegExp(`${qo}rgb\\s*\\(${lo},${lo},${lo}\\)${Go}`),mk=new RegExp(`${qo}rgba\\s*\\(${lo},${lo},${lo},${lo}\\)${Go}`),hk=new RegExp(`${qo}#${un}${un}${un}${Go}`),gk=new RegExp(`${qo}#${fn}${fn}${fn}${Go}`),xk=new RegExp(`${qo}#${un}${un}${un}${un}${Go}`),vk=new RegExp(`${qo}#${fn}${fn}${fn}${fn}${Go}`);function to(e){return parseInt(e,16)}function vo(e){try{let t;if(t=gk.exec(e))return[to(t[1]),to(t[2]),to(t[3]),1];if(t=pk.exec(e))return[Ht(t[1]),Ht(t[5]),Ht(t[9]),1];if(t=mk.exec(e))return[Ht(t[1]),Ht(t[5]),Ht(t[9]),Ln(t[13])];if(t=hk.exec(e))return[to(t[1]+t[1]),to(t[2]+t[2]),to(t[3]+t[3]),1];if(t=vk.exec(e))return[to(t[1]),to(t[2]),to(t[3]),Ln(to(t[4])/255)];if(t=xk.exec(e))return[to(t[1]+t[1]),to(t[2]+t[2]),to(t[3]+t[3]),Ln(to(t[4]+t[4])/255)];if(e in Pc)return vo(Pc[e]);throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function bk(e){return e>1?1:e<0?0:e}function Rc(e,t,o,r){return`rgba(${Ht(e)}, ${Ht(t)}, ${Ht(o)}, ${bk(r)})`}function Nc(e,t,o,r,n){return Ht((e*t*(1-r)+o*r)/n)}function xe(e,t){Array.isArray(e)||(e=vo(e)),Array.isArray(t)||(t=vo(t));let o=e[3],r=t[3],n=Ln(o+r-o*r);return Rc(Nc(e[0],o,t[0],r,n),Nc(e[1],o,t[1],r,n),Nc(e[2],o,t[2],r,n),n)}function te(e,t){let[o,r,n,i=1]=Array.isArray(e)?e:vo(e);return t.alpha?Rc(o,r,n,t.alpha):Rc(o,r,n,i)}function ur(e,t){let[o,r,n,i=1]=Array.isArray(e)?e:vo(e),{lightness:a=1,alpha:l=1}=t;return Ym([o*a,r*a,n*a,i*l])}function Ln(e){let t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function Ht(e){let t=Math.round(Number(e));return t>255?255:t<0?0:t}function Ym(e){let[t,o,r]=e;return 3 in e?`rgba(${Ht(t)}, ${Ht(o)}, ${Ht(r)}, ${Ln(e[3])})`:`rgba(${Ht(t)}, ${Ht(o)}, ${Ht(r)}, 1)`}function Ic(e=8){return Math.random().toString(16).slice(2,2+e)}function Ac(e,t){let o=[];for(let r=0;rSe(o,...t));else return e(...t)}var zn=(e,...t)=>typeof e=="function"?e(...t):typeof e=="string"?Mn(e):typeof e=="number"?Mn(String(e)):null;function cl(e,t){console.error(`[naive/${e}]: ${t}`)}function dl(e,t){throw new Error(`[naive/${e}]: ${t}`)}function Bn(e){return typeof e=="string"?`s-${e}`:`n-${e}`}function Ni(e){return e.some(t=>Rn(t)?!(t.type===Kt||t.type===St&&!Ni(t.children)):!0)?e:null}function Yo(e,t){return e&&Ni(e())||t()}function ul(e,t,o){return e&&Ni(e(t))||o(t)}function Xo(e,t){let o=e&&Ni(e());return t(o||null)}function fl(e){return!(e&&Ni(e()))}function Ri(e){return e.replace(/#|\(|\)|,|\s/g,"_")}function Ck(e){let t=0;for(let o=0;o{let n=Ck(r);if(n){if(n===1){e.forEach(a=>{o.push(r.replace("&",a))});return}}else{e.forEach(a=>{o.push((a&&a+" ")+r)});return}let i=[r];for(;n--;){let a=[];i.forEach(l=>{e.forEach(s=>{a.push(l.replace("&",s))})}),i=a}i.forEach(a=>o.push(a))}),o}function Sk(e,t){let o=[];return t.split(Xm).forEach(r=>{e.forEach(n=>{o.push((n&&n+" ")+r)})}),o}function Zm(e){let t=[""];return e.forEach(o=>{o=o&&o.trim(),o&&(o.includes("&")?t=kk(t,o):t=Sk(t,o))}),t.join(", ").replace(wk," ")}function Mc(e){if(!e)return;let t=e.parentElement;t&&t.removeChild(e)}function pn(e){return document.querySelector(`style[cssr-id="${e}"]`)}function Qm(e){let t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function Ii(e){return e?/^\s*@(s|m)/.test(e):!1}var _k=/[A-Z]/g;function eh(e){return e.replace(_k,t=>"-"+t.toLowerCase())}function Ek(e,t=" "){return typeof e=="object"&&e!==null?` { +var B0=Object.create;var Na=Object.defineProperty;var H0=Object.getOwnPropertyDescriptor;var V0=Object.getOwnPropertyNames;var F0=Object.getPrototypeOf,j0=Object.prototype.hasOwnProperty;var zo=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),W0=(e,t)=>{for(var o in t)Na(e,o,{get:t[o],enumerable:!0})},dp=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of V0(t))!j0.call(e,n)&&n!==o&&Na(e,n,{get:()=>t[n],enumerable:!(r=H0(t,n))||r.enumerable});return e};var K0=(e,t,o)=>(o=e!=null?B0(F0(e)):{},dp(t||!e||!e.__esModule?Na(o,"default",{value:e,enumerable:!0}):o,e)),U0=e=>dp(Na({},"__esModule",{value:!0}),e);var Hx=zo((qi,Bx)=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.default=void 0;var XE={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ZE=function(e,t,o){var r,n=XE[e];return typeof n=="string"?r=n:t===1?r=n.one:r=n.other.replace("{{count}}",t.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+r:r+" ago":r},QE=ZE;qi.default=QE;Bx.exports=qi.default});var Fx=zo((Zl,Vx)=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});Zl.default=JE;function JE(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=t.width?String(t.width):e.defaultWidth,r=e.formats[o]||e.formats[e.defaultWidth];return r}}Vx.exports=Zl.default});var Wx=zo((Gi,jx)=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.default=void 0;var dd=eD(Fx());function eD(e){return e&&e.__esModule?e:{default:e}}var tD={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},oD={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rD={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},nD={date:(0,dd.default)({formats:tD,defaultWidth:"full"}),time:(0,dd.default)({formats:oD,defaultWidth:"full"}),dateTime:(0,dd.default)({formats:rD,defaultWidth:"full"})},iD=nD;Gi.default=iD;jx.exports=Gi.default});var Ux=zo((Yi,Kx)=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0});Yi.default=void 0;var aD={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},lD=function(e,t,o,r){return aD[e]},sD=lD;Yi.default=sD;Kx.exports=Yi.default});var Gx=zo((Ql,qx)=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.default=cD;function cD(e){return function(t,o){var r=o||{},n=r.context?String(r.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,l=r.width?String(r.width):a;i=e.formattingValues[l]||e.formattingValues[a]}else{var s=e.defaultWidth,c=r.width?String(r.width):e.defaultWidth;i=e.values[c]||e.values[s]}var d=e.argumentCallback?e.argumentCallback(t):t;return i[d]}}qx.exports=Ql.default});var Xx=zo((Zi,Yx)=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.default=void 0;var Xi=dD(Gx());function dD(e){return e&&e.__esModule?e:{default:e}}var uD={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},fD={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},pD={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},mD={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},hD={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gD={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},xD=function(e,t){var o=Number(e),r=o%100;if(r>20||r<10)switch(r%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},vD={ordinalNumber:xD,era:(0,Xi.default)({values:uD,defaultWidth:"wide"}),quarter:(0,Xi.default)({values:fD,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,Xi.default)({values:pD,defaultWidth:"wide"}),day:(0,Xi.default)({values:mD,defaultWidth:"wide"}),dayPeriod:(0,Xi.default)({values:hD,defaultWidth:"wide",formattingValues:gD,defaultFormattingWidth:"wide"})},bD=vD;Zi.default=bD;Yx.exports=Zi.default});var Qx=zo((Jl,Zx)=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.default=yD;function yD(e){return function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=o.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(n);if(!i)return null;var a=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(l)?wD(l,function(u){return u.test(a)}):CD(l,function(u){return u.test(a)}),c;c=e.valueCallback?e.valueCallback(s):s,c=o.valueCallback?o.valueCallback(c):c;var d=t.slice(a.length);return{value:c,rest:d}}}function CD(e,t){for(var o in e)if(e.hasOwnProperty(o)&&t(e[o]))return o}function wD(e,t){for(var o=0;o{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.default=kD;function kD(e){return function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var n=r[0],i=t.match(e.parsePattern);if(!i)return null;var a=e.valueCallback?e.valueCallback(i[0]):i[0];a=o.valueCallback?o.valueCallback(a):a;var l=t.slice(n.length);return{value:a,rest:l}}}Jx.exports=es.default});var rv=zo((Ji,ov)=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.default=void 0;var Qi=tv(Qx()),SD=tv(ev());function tv(e){return e&&e.__esModule?e:{default:e}}var _D=/^(\d+)(th|st|nd|rd)?/i,ED=/\d+/i,DD={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},TD={any:[/^b/i,/^(a|c)/i]},OD={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ND={any:[/1/i,/2/i,/3/i,/4/i]},PD={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},RD={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ID={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},AD={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},MD={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},$D={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},LD={ordinalNumber:(0,SD.default)({matchPattern:_D,parsePattern:ED,valueCallback:function(e){return parseInt(e,10)}}),era:(0,Qi.default)({matchPatterns:DD,defaultMatchWidth:"wide",parsePatterns:TD,defaultParseWidth:"any"}),quarter:(0,Qi.default)({matchPatterns:OD,defaultMatchWidth:"wide",parsePatterns:ND,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:(0,Qi.default)({matchPatterns:PD,defaultMatchWidth:"wide",parsePatterns:RD,defaultParseWidth:"any"}),day:(0,Qi.default)({matchPatterns:ID,defaultMatchWidth:"wide",parsePatterns:AD,defaultParseWidth:"any"}),dayPeriod:(0,Qi.default)({matchPatterns:MD,defaultMatchWidth:"any",parsePatterns:$D,defaultParseWidth:"any"})},zD=LD;Ji.default=zD;ov.exports=Ji.default});var iv=zo((ta,nv)=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.default=void 0;var BD=ea(Hx()),HD=ea(Wx()),VD=ea(Ux()),FD=ea(Xx()),jD=ea(rv());function ea(e){return e&&e.__esModule?e:{default:e}}var WD={code:"en-US",formatDistance:BD.default,formatLong:HD.default,formatRelative:VD.default,localize:FD.default,match:jD.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},KD=WD;ta.default=KD;nv.exports=ta.default});var ZN={};W0(ZN,{default:()=>XN});module.exports=U0(ZN);var ni=require("obsidian");var qy=require("obsidian");function Sn(e,t){let o=Object.create(null),r=e.split(",");for(let n=0;n!!o[n.toLowerCase()]:n=>!!o[n]}function vr(e){if(Ie(e)){let t={};for(let o=0;o{if(o){let r=o.split(G0);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function qr(e){let t="";if(Ct(e))t=e;else if(Ie(e))for(let o=0;oCt(e)?e:e==null?"":Ie(e)||rt(e)&&(e.toString===gp||!$e(e.toString))?JSON.stringify(e,mp,2):String(e),mp=(e,t)=>t&&t.__v_isRef?mp(e,t.value):br(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[r,n])=>(o[`${r} =>`]=n,o),{})}:Ra(t)?{[`Set(${t.size})`]:[...t.values()]}:rt(t)&&!Ie(t)&&!Fs(t)?String(t):t,ot={},Gr=[],ao=()=>{},hp=()=>!1,Z0=/^on[^a-z]/,_n=e=>Z0.test(e),ci=e=>e.startsWith("onUpdate:"),kt=Object.assign,Pa=(e,t)=>{let o=e.indexOf(t);o>-1&&e.splice(o,1)},Q0=Object.prototype.hasOwnProperty,Ue=(e,t)=>Q0.call(e,t),Ie=Array.isArray,br=e=>Aa(e)==="[object Map]",Ra=e=>Aa(e)==="[object Set]";var $e=e=>typeof e=="function",Ct=e=>typeof e=="string",Ia=e=>typeof e=="symbol",rt=e=>e!==null&&typeof e=="object",Hs=e=>rt(e)&&$e(e.then)&&$e(e.catch),gp=Object.prototype.toString,Aa=e=>gp.call(e),Vs=e=>Aa(e).slice(8,-1),Fs=e=>Aa(e)==="[object Object]",Ma=e=>Ct(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,di=Sn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var $a=e=>{let t=Object.create(null);return o=>t[o]||(t[o]=e(o))},J0=/-(\w)/g,Bo=$a(e=>e.replace(J0,(t,o)=>o?o.toUpperCase():"")),eC=/\B([A-Z])/g,yr=$a(e=>e.replace(eC,"-$1").toLowerCase()),ui=$a(e=>e.charAt(0).toUpperCase()+e.slice(1)),fi=$a(e=>e?`on${ui(e)}`:""),Yr=(e,t)=>!Object.is(e,t),pi=(e,t)=>{for(let o=0;o{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:o})},Dn=e=>{let t=parseFloat(e);return isNaN(t)?e:t},up,xp=()=>up||(up=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});var Ho,hi=class{constructor(t=!1){this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=Ho,!t&&Ho&&(this.index=(Ho.scopes||(Ho.scopes=[])).push(this)-1)}run(t){if(this.active){let o=Ho;try{return Ho=this,t()}finally{Ho=o}}}on(){Ho=this}off(){Ho=this.parent}stop(t){if(this.active){let o,r;for(o=0,r=this.effects.length;o{let t=new Set(e);return t.w=0,t.n=0,t},_p=e=>(e.w&kr)>0,Ep=e=>(e.n&kr)>0,oC=({deps:e})=>{if(e.length)for(let t=0;t{let{deps:t}=e;if(t.length){let o=0;for(let r=0;r{(u==="length"||u>=c)&&l.push(d)})}else switch(o!==void 0&&l.push(a.get(o)),t){case"add":Ie(e)?Ma(o)&&l.push(a.get("length")):(l.push(a.get(Xr)),br(e)&&l.push(a.get(Ks)));break;case"delete":Ie(e)||(l.push(a.get(Xr)),br(e)&&l.push(a.get(Ks)));break;case"set":br(e)&&l.push(a.get(Xr));break}let s=void 0;if(l.length===1)l[0]&&Us(l[0]);else{let c=[];for(let d of l)d&&c.push(...d);Us(Xs(c))}}function Us(e,t){let o=Ie(e)?e:[...e];for(let r of o)r.computed&&bp(r,t);for(let r of o)r.computed||bp(r,t)}function bp(e,t){(e!==Eo||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}var nC=Sn("__proto__,__v_isRef,__isVue"),Op=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ia)),iC=Zs(),aC=Zs(!1,!0),lC=Zs(!0);var yp=sC();function sC(){let e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...o){let r=je(this);for(let i=0,a=this.length;i{e[t]=function(...o){_r();let r=je(this)[t].apply(this,o);return Er(),r}}),e}function Zs(e=!1,t=!1){return function(r,n,i){if(n==="__v_isReactive")return!e;if(n==="__v_isReadonly")return e;if(n==="__v_isShallow")return t;if(n==="__v_raw"&&i===(e?t?SC:Ap:t?Ip:Rp).get(r))return r;let a=Ie(r);if(!e&&a&&Ue(yp,n))return Reflect.get(yp,n,i);let l=Reflect.get(r,n,i);return(Ia(n)?Op.has(n):nC(n))||(e||eo(r,"get",n),t)?l:Tt(l)?a&&Ma(n)?l:l.value:rt(l)?e?Dr(l):Fo(l):l}}var cC=Np(),dC=Np(!0);function Np(e=!1){return function(o,r,n,i){let a=o[r];if(Sr(a)&&Tt(a)&&!Tt(n))return!1;if(!e&&(!Tn(n)&&!Sr(n)&&(a=je(a),n=je(n)),!Ie(o)&&Tt(a)&&!Tt(n)))return a.value=n,!0;let l=Ie(o)&&Ma(r)?Number(r)e,Fa=e=>Reflect.getPrototypeOf(e);function La(e,t,o=!1,r=!1){e=e.__v_raw;let n=je(e),i=je(t);o||(t!==i&&eo(n,"get",t),eo(n,"get",i));let{has:a}=Fa(n),l=r?Qs:o?oc:gi;if(a.call(n,t))return l(e.get(t));if(a.call(n,i))return l(e.get(i));e!==n&&e.get(t)}function za(e,t=!1){let o=this.__v_raw,r=je(o),n=je(e);return t||(e!==n&&eo(r,"has",e),eo(r,"has",n)),e===n?o.has(e):o.has(e)||o.has(n)}function Ba(e,t=!1){return e=e.__v_raw,!t&&eo(je(e),"iterate",Xr),Reflect.get(e,"size",e)}function Cp(e){e=je(e);let t=je(this);return Fa(t).has.call(t,e)||(t.add(e),Vo(t,"add",e,e)),this}function wp(e,t){t=je(t);let o=je(this),{has:r,get:n}=Fa(o),i=r.call(o,e);i||(e=je(e),i=r.call(o,e));let a=n.call(o,e);return o.set(e,t),i?Yr(t,a)&&Vo(o,"set",e,t,a):Vo(o,"add",e,t),this}function kp(e){let t=je(this),{has:o,get:r}=Fa(t),n=o.call(t,e);n||(e=je(e),n=o.call(t,e));let i=r?r.call(t,e):void 0,a=t.delete(e);return n&&Vo(t,"delete",e,void 0,i),a}function Sp(){let e=je(this),t=e.size!==0,o=void 0,r=e.clear();return t&&Vo(e,"clear",void 0,void 0,o),r}function Ha(e,t){return function(r,n){let i=this,a=i.__v_raw,l=je(a),s=t?Qs:e?oc:gi;return!e&&eo(l,"iterate",Xr),a.forEach((c,d)=>r.call(n,s(c),s(d),i))}}function Va(e,t,o){return function(...r){let n=this.__v_raw,i=je(n),a=br(i),l=e==="entries"||e===Symbol.iterator&&a,s=e==="keys"&&a,c=n[e](...r),d=o?Qs:t?oc:gi;return!t&&eo(i,"iterate",s?Ks:Xr),{next(){let{value:u,done:p}=c.next();return p?{value:u,done:p}:{value:l?[d(u[0]),d(u[1])]:d(u),done:p}},[Symbol.iterator](){return this}}}}function Cr(e){return function(...t){return e==="delete"?!1:this}}function gC(){let e={get(i){return La(this,i)},get size(){return Ba(this)},has:za,add:Cp,set:wp,delete:kp,clear:Sp,forEach:Ha(!1,!1)},t={get(i){return La(this,i,!1,!0)},get size(){return Ba(this)},has:za,add:Cp,set:wp,delete:kp,clear:Sp,forEach:Ha(!1,!0)},o={get(i){return La(this,i,!0)},get size(){return Ba(this,!0)},has(i){return za.call(this,i,!0)},add:Cr("add"),set:Cr("set"),delete:Cr("delete"),clear:Cr("clear"),forEach:Ha(!0,!1)},r={get(i){return La(this,i,!0,!0)},get size(){return Ba(this,!0)},has(i){return za.call(this,i,!0)},add:Cr("add"),set:Cr("set"),delete:Cr("delete"),clear:Cr("clear"),forEach:Ha(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=Va(i,!1,!1),o[i]=Va(i,!0,!1),t[i]=Va(i,!1,!0),r[i]=Va(i,!0,!0)}),[e,o,t,r]}var[xC,vC,bC,yC]=gC();function Js(e,t){let o=t?e?yC:bC:e?vC:xC;return(r,n,i)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_raw"?r:Reflect.get(Ue(o,n)&&n in r?o:r,n,i)}var CC={get:Js(!1,!1)},wC={get:Js(!1,!0)},kC={get:Js(!0,!1)};var Rp=new WeakMap,Ip=new WeakMap,Ap=new WeakMap,SC=new WeakMap;function _C(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function EC(e){return e.__v_skip||!Object.isExtensible(e)?0:_C(Vs(e))}function Fo(e){return Sr(e)?e:tc(e,!1,Pp,CC,Rp)}function ec(e){return tc(e,!1,hC,wC,Ip)}function Dr(e){return tc(e,!0,mC,kC,Ap)}function tc(e,t,o,r,n){if(!rt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let i=n.get(e);if(i)return i;let a=EC(e);if(a===0)return e;let l=new Proxy(e,a===2?r:o);return n.set(e,l),l}function Tr(e){return Sr(e)?Tr(e.__v_raw):!!(e&&e.__v_isReactive)}function Sr(e){return!!(e&&e.__v_isReadonly)}function Tn(e){return!!(e&&e.__v_isShallow)}function ja(e){return Tr(e)||Sr(e)}function je(e){let t=e&&e.__v_raw;return t?je(t):e}function Qr(e){return En(e,"__v_skip",!0),e}var gi=e=>rt(e)?Fo(e):e,oc=e=>rt(e)?Dr(e):e;function Mp(e){wr&&Eo&&(e=je(e),Tp(e.dep||(e.dep=Xs())))}function $p(e,t){e=je(e),e.dep&&Us(e.dep)}function Tt(e){return!!(e&&e.__v_isRef===!0)}function Z(e){return DC(e,!1)}function DC(e,t){return Tt(e)?e:new qs(e,t)}var qs=class{constructor(t,o){this.__v_isShallow=o,this.dep=void 0,this.__v_isRef=!0,this._rawValue=o?t:je(t),this._value=o?t:gi(t)}get value(){return Mp(this),this._value}set value(t){let o=this.__v_isShallow||Tn(t)||Sr(t);t=o?t:je(t),Yr(t,this._rawValue)&&(this._rawValue=t,this._value=o?t:gi(t),$p(this,t))}};function lo(e){return Tt(e)?e.value:e}var TC={get:(e,t,o)=>lo(Reflect.get(e,t,o)),set:(e,t,o,r)=>{let n=e[t];return Tt(n)&&!Tt(o)?(n.value=o,!0):Reflect.set(e,t,o,r)}};function Wa(e){return Tr(e)?e:new Proxy(e,TC)}var Gs=class{constructor(t,o,r){this._object=t,this._key=o,this._defaultValue=r,this.__v_isRef=!0}get value(){let t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}};function Ae(e,t,o){let r=e[t];return Tt(r)?r:new Gs(e,t,o)}var Lp,Ys=class{constructor(t,o,r,n){this._setter=o,this.dep=void 0,this.__v_isRef=!0,this[Lp]=!1,this._dirty=!0,this.effect=new Zr(t,()=>{this._dirty||(this._dirty=!0,$p(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=r}get value(){let t=je(this);return Mp(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}};Lp="__v_isReadonly";function zp(e,t,o=!1){let r,n,i=$e(e);return i?(r=e,n=ao):(r=e.get,n=e.set),new Ys(r,n,i||!n,o)}var OC;OC="__v_isReadonly";var xi=[];function Jp(e,...t){}function NC(){let e=xi[xi.length-1];if(!e)return[];let t=[];for(;e;){let o=t[0];o&&o.vnode===e?o.recurseCount++:t.push({vnode:e,recurseCount:0});let r=e.component&&e.component.parent;e=r&&r.vnode}return t}function PC(e){let t=[];return e.forEach((o,r)=>{t.push(...r===0?[]:[` +`],...RC(o))}),t}function RC({vnode:e,recurseCount:t}){let o=t>0?`... (${t} recursive calls)`:"",r=e.component?e.component.parent==null:!1,n=` at <${Em(e.component,e.type,r)}`,i=">"+o;return e.props?[n,...IC(e.props),i]:[n+i]}function IC(e){let t=[],o=Object.keys(e);return o.slice(0,3).forEach(r=>{t.push(...em(r,e[r]))}),o.length>3&&t.push(" ..."),t}function em(e,t,o){return Ct(t)?(t=JSON.stringify(t),o?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?o?t:[`${e}=${t}`]:Tt(t)?(t=em(e,je(t.value),!0),o?t:[`${e}=Ref<`,t,">"]):$e(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=je(t),o?t:[`${e}=`,t])}function lr(e,t,o,r){let n;try{n=r?e(...r):e()}catch(i){Xa(i,t,o)}return n}function so(e,t,o,r){if($e(e)){let i=lr(e,t,o,r);return i&&Hs(i)&&i.catch(a=>{Xa(a,t,o)}),i}let n=[];for(let i=0;i>>1;Si(Wt[r])Ko&&Wt.splice(t,1)}function LC(e){Ie(e)?On.push(...e):(!ar||!ar.includes(e,e.allowRecurse?on+1:on))&&On.push(e),om()}function Bp(e,t=ki?Ko+1:0){for(;tSi(o)-Si(r)),on=0;one.id==null?1/0:e.id,zC=(e,t)=>{let o=Si(e)-Si(t);if(o===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return o};function nm(e){ac=!1,ki=!0,Wt.sort(zC);let t=ao;try{for(Ko=0;KoCt(f)?f.trim():f)),u&&(n=o.map(Dn))}let l,s=r[l=fi(t)]||r[l=fi(Bo(t))];!s&&i&&(s=r[l=fi(yr(t))]),s&&so(s,e,6,n);let c=r[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,so(c,e,6,n)}}function im(e,t,o=!1){let r=t.emitsCache,n=r.get(e);if(n!==void 0)return n;let i=e.emits,a={},l=!1;if(!$e(e)){let s=c=>{let d=im(c,t,!0);d&&(l=!0,kt(a,d))};!o&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return!i&&!l?(rt(e)&&r.set(e,null),null):(Ie(i)?i.forEach(s=>a[s]=null):kt(a,i),rt(e)&&r.set(e,a),a)}function Za(e,t){return!e||!_n(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ue(e,t[0].toLowerCase()+t.slice(1))||Ue(e,yr(t))||Ue(e,t))}var Kt=null,am=null;function Ga(e){let t=Kt;return Kt=e,am=e&&e.type.__scopeId||null,t}function ln(e,t=Kt,o){if(!t||e._n)return e;let r=(...n)=>{r._d&&Yp(-1);let i=Ga(t),a;try{a=e(...n)}finally{Ga(i),r._d&&Yp(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function rc(e){let{type:t,vnode:o,proxy:r,withProxy:n,props:i,propsOptions:[a],slots:l,attrs:s,emit:c,render:d,renderCache:u,data:p,setupState:f,ctx:m,inheritAttrs:y}=e,_,h,O=Ga(e);try{if(o.shapeFlag&4){let b=n||r;_=Wo(d.call(b,b,u,i,f,p,m)),h=s}else{let b=t;_=Wo(b.length>1?b(i,{attrs:s,slots:l,emit:c}):b(i,null)),h=t.props?s:HC(s)}}catch(b){wi.length=0,Xa(b,e,1),_=dt(Ut)}let W=_,w;if(h&&y!==!1){let b=Object.keys(h),{shapeFlag:D}=W;b.length&&D&7&&(a&&b.some(ci)&&(h=VC(h,a)),W=Nr(W,h))}return o.dirs&&(W=Nr(W),W.dirs=W.dirs?W.dirs.concat(o.dirs):o.dirs),o.transition&&(W.transition=o.transition),_=W,Ga(O),_}var HC=e=>{let t;for(let o in e)(o==="class"||o==="style"||_n(o))&&((t||(t={}))[o]=e[o]);return t},VC=(e,t)=>{let o={};for(let r in e)(!ci(r)||!(r.slice(9)in t))&&(o[r]=e[r]);return o};function FC(e,t,o){let{props:r,children:n,component:i}=e,{props:a,children:l,patchFlag:s}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(o&&s>=0){if(s&1024)return!0;if(s&16)return r?Hp(r,a,c):!!a;if(s&8){let d=t.dynamicProps;for(let u=0;ue.__isSuspense;function KC(e,t){t&&t.pendingBranch?Ie(e)?t.effects.push(...e):t.effects.push(e):LC(e)}function Xt(e,t){if(zt){let o=zt.provides,r=zt.parent&&zt.parent.provides;r===o&&(o=zt.provides=Object.create(r)),o[e]=t}}function we(e,t,o=!1){let r=zt||Kt;if(r){let n=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(n&&e in n)return n[e];if(arguments.length>1)return o&&$e(t)?t.call(r.proxy):t}}function Nt(e,t){return Qa(e,null,t)}function lm(e,t){return Qa(e,null,{flush:"post"})}var Ka={};function Qe(e,t,o){return Qa(e,t,o)}function Qa(e,t,{immediate:o,deep:r,flush:n,onTrack:i,onTrigger:a}=ot){let l=w=>{Jp("Invalid watch source: ",w,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},s=zt,c,d=!1,u=!1;if(Tt(e)?(c=()=>e.value,d=Tn(e)):Tr(e)?(c=()=>e,r=!0):Ie(e)?(u=!0,d=e.some(w=>Tr(w)||Tn(w)),c=()=>e.map(w=>{if(Tt(w))return w.value;if(Tr(w))return nn(w);if($e(w))return lr(w,s,2)})):$e(e)?t?c=()=>lr(e,s,2):c=()=>{if(!(s&&s.isUnmounted))return p&&p(),so(e,s,3,[f])}:c=ao,t&&r){let w=c;c=()=>nn(w())}let p,f=w=>{p=O.onStop=()=>{lr(w,s,4)}},m;if(Ei)if(f=ao,t?o&&so(t,s,3,[c(),u?[]:void 0,f]):c(),n==="sync"){let w=Mw();m=w.__watcherHandles||(w.__watcherHandles=[])}else return ao;let y=u?new Array(e.length).fill(Ka):Ka,_=()=>{if(O.active)if(t){let w=O.run();(r||d||(u?w.some((b,D)=>Yr(b,y[D])):Yr(w,y)))&&(p&&p(),so(t,s,3,[w,y===Ka?void 0:u&&y[0]===Ka?[]:y,f]),y=w)}else O.run()};_.allowRecurse=!!t;let h;n==="sync"?h=_:n==="post"?h=()=>to(_,s&&s.suspense):(_.pre=!0,s&&(_.id=s.uid),h=()=>mc(_));let O=new Zr(c,h);t?o?_():y=O.run():n==="post"?to(O.run.bind(O),s&&s.suspense):O.run();let W=()=>{O.stop(),s&&s.scope&&Pa(s.scope.effects,O)};return m&&m.push(W),W}function UC(e,t,o){let r=this.proxy,n=Ct(e)?e.includes(".")?sm(r,e):()=>r[e]:e.bind(r,r),i;$e(t)?i=t:(i=t.handler,o=t);let a=zt;In(this);let l=Qa(n,i.bind(r),o);return a?In(a):an(),l}function sm(e,t){let o=t.split(".");return()=>{let r=e;for(let n=0;n{nn(o,t)});else if(Fs(e))for(let o in e)nn(e[o],t);return e}function hc(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Je(()=>{e.isMounted=!0}),Pt(()=>{e.isUnmounting=!0}),e}var xo=[Function,Array],qC={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:xo,onEnter:xo,onAfterEnter:xo,onEnterCancelled:xo,onBeforeLeave:xo,onLeave:xo,onAfterLeave:xo,onLeaveCancelled:xo,onBeforeAppear:xo,onAppear:xo,onAfterAppear:xo,onAppearCancelled:xo},setup(e,{slots:t}){let o=Uo(),r=hc(),n;return()=>{let i=t.default&&Ja(t.default(),!0);if(!i||!i.length)return;let a=i[0];if(i.length>1){let y=!1;for(let _ of i)if(_.type!==Ut){a=_,y=!0;break}}let l=je(e),{mode:s}=l;if(r.isLeaving)return nc(a);let c=Vp(a);if(!c)return nc(a);let d=Nn(c,l,r,o);Pn(c,d);let u=o.subTree,p=u&&Vp(u),f=!1,{getTransitionKey:m}=c.type;if(m){let y=m();n===void 0?n=y:y!==n&&(n=y,f=!0)}if(p&&p.type!==Ut&&(!rn(c,p)||f)){let y=Nn(p,l,r,o);if(Pn(p,y),s==="out-in")return r.isLeaving=!0,y.afterLeave=()=>{r.isLeaving=!1,o.update.active!==!1&&o.update()},nc(a);s==="in-out"&&c.type!==Ut&&(y.delayLeave=(_,h,O)=>{let W=cm(r,p);W[String(p.key)]=p,_._leaveCb=()=>{h(),_._leaveCb=void 0,delete d.delayedLeave},d.delayedLeave=O})}return a}}},gc=qC;function cm(e,t){let{leavingVNodes:o}=e,r=o.get(t.type);return r||(r=Object.create(null),o.set(t.type,r)),r}function Nn(e,t,o,r){let{appear:n,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:s,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:u,onLeave:p,onAfterLeave:f,onLeaveCancelled:m,onBeforeAppear:y,onAppear:_,onAfterAppear:h,onAppearCancelled:O}=t,W=String(e.key),w=cm(o,e),b=(k,A)=>{k&&so(k,r,9,A)},D=(k,A)=>{let E=A[1];b(k,A),Ie(k)?k.every(H=>H.length<=1)&&E():k.length<=1&&E()},x={mode:i,persisted:a,beforeEnter(k){let A=l;if(!o.isMounted)if(n)A=y||l;else return;k._leaveCb&&k._leaveCb(!0);let E=w[W];E&&rn(e,E)&&E.el._leaveCb&&E.el._leaveCb(),b(A,[k])},enter(k){let A=s,E=c,H=d;if(!o.isMounted)if(n)A=_||s,E=h||c,H=O||d;else return;let M=!1,le=k._enterCb=ye=>{M||(M=!0,ye?b(H,[k]):b(E,[k]),x.delayedLeave&&x.delayedLeave(),k._enterCb=void 0)};A?D(A,[k,le]):le()},leave(k,A){let E=String(e.key);if(k._enterCb&&k._enterCb(!0),o.isUnmounting)return A();b(u,[k]);let H=!1,M=k._leaveCb=le=>{H||(H=!0,A(),le?b(m,[k]):b(f,[k]),k._leaveCb=void 0,w[E]===e&&delete w[E])};w[E]=e,p?D(p,[k,M]):M()},clone(k){return Nn(k,t,o,r)}};return x}function nc(e){if(el(e))return e=Nr(e),e.children=null,e}function Vp(e){return el(e)?e.children?e.children[0]:void 0:e}function Pn(e,t){e.shapeFlag&6&&e.component?Pn(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ja(e,t=!1,o){let r=[],n=0;for(let i=0;i1)for(let i=0;i!!e.type.__asyncLoader;var el=e=>e.type.__isKeepAlive;function xc(e,t){dm(e,"a",t)}function GC(e,t){dm(e,"da",t)}function dm(e,t,o=zt){let r=e.__wdc||(e.__wdc=()=>{let n=o;for(;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(tl(t,r,o),o){let n=o.parent;for(;n&&n.parent;)el(n.parent.vnode)&&YC(r,t,o,n),n=n.parent}}function YC(e,t,o,r){let n=tl(t,e,r,!0);sn(()=>{Pa(r[t],n)},o)}function tl(e,t,o=zt,r=!1){if(o){let n=o[e]||(o[e]=[]),i=t.__weh||(t.__weh=(...a)=>{if(o.isUnmounted)return;_r(),In(o);let l=so(t,o,e,a);return an(),Er(),l});return r?n.unshift(i):n.push(i),i}}var sr=e=>(t,o=zt)=>(!Ei||e==="sp")&&tl(e,(...r)=>t(...r),o),cr=sr("bm"),Je=sr("m"),vc=sr("bu"),bc=sr("u"),Pt=sr("bum"),sn=sr("um"),XC=sr("sp"),ZC=sr("rtg"),QC=sr("rtc");function JC(e,t=zt){tl("ec",e,t)}function ol(e,t){let o=Kt;if(o===null)return e;let r=al(o)||o.proxy,n=e.dirs||(e.dirs=[]);for(let i=0;iRn(t)?!(t.type===Ut||t.type===St&&!um(t.children)):!0)?e:null}var lc=e=>e?Sm(e)?al(e)||e.proxy:lc(e.parent):null,bi=kt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>lc(e.parent),$root:e=>lc(e.root),$emit:e=>e.emit,$options:e=>yc(e),$forceUpdate:e=>e.f||(e.f=()=>mc(e.update)),$nextTick:e=>e.n||(e.n=Bt.bind(e.proxy)),$watch:e=>UC.bind(e)});var ic=(e,t)=>e!==ot&&!e.__isScriptSetup&&Ue(e,t),tw={get({_:e},t){let{ctx:o,setupState:r,data:n,props:i,accessCache:a,type:l,appContext:s}=e,c;if(t[0]!=="$"){let f=a[t];if(f!==void 0)switch(f){case 1:return r[t];case 2:return n[t];case 4:return o[t];case 3:return i[t]}else{if(ic(r,t))return a[t]=1,r[t];if(n!==ot&&Ue(n,t))return a[t]=2,n[t];if((c=e.propsOptions[0])&&Ue(c,t))return a[t]=3,i[t];if(o!==ot&&Ue(o,t))return a[t]=4,o[t];sc&&(a[t]=0)}}let d=bi[t],u,p;if(d)return t==="$attrs"&&eo(e,"get",t),d(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(o!==ot&&Ue(o,t))return a[t]=4,o[t];if(p=s.config.globalProperties,Ue(p,t))return p[t]},set({_:e},t,o){let{data:r,setupState:n,ctx:i}=e;return ic(n,t)?(n[t]=o,!0):r!==ot&&Ue(r,t)?(r[t]=o,!0):Ue(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=o,!0)},has({_:{data:e,setupState:t,accessCache:o,ctx:r,appContext:n,propsOptions:i}},a){let l;return!!o[a]||e!==ot&&Ue(e,a)||ic(t,a)||(l=i[0])&&Ue(l,a)||Ue(r,a)||Ue(bi,a)||Ue(n.config.globalProperties,a)},defineProperty(e,t,o){return o.get!=null?e._.accessCache[t]=0:Ue(o,"value")&&this.set(e,t,o.value,null),Reflect.defineProperty(e,t,o)}};var sc=!0;function ow(e){let t=yc(e),o=e.proxy,r=e.ctx;sc=!1,t.beforeCreate&&Fp(t.beforeCreate,e,"bc");let{data:n,computed:i,methods:a,watch:l,provide:s,inject:c,created:d,beforeMount:u,mounted:p,beforeUpdate:f,updated:m,activated:y,deactivated:_,beforeDestroy:h,beforeUnmount:O,destroyed:W,unmounted:w,render:b,renderTracked:D,renderTriggered:x,errorCaptured:k,serverPrefetch:A,expose:E,inheritAttrs:H,components:M,directives:le,filters:ye}=t;if(c&&rw(c,r,null,e.appContext.config.unwrapInjectedRef),a)for(let ce in a){let Ce=a[ce];$e(Ce)&&(r[ce]=Ce.bind(o))}if(n){let ce=n.call(o,o);rt(ce)&&(e.data=Fo(ce))}if(sc=!0,i)for(let ce in i){let Ce=i[ce],Ke=$e(Ce)?Ce.bind(o,o):$e(Ce.get)?Ce.get.bind(o,o):ao,He=!$e(Ce)&&$e(Ce.set)?Ce.set.bind(o):ao,Me=j({get:Ke,set:He});Object.defineProperty(r,ce,{enumerable:!0,configurable:!0,get:()=>Me.value,set:Ye=>Me.value=Ye})}if(l)for(let ce in l)fm(l[ce],r,o,ce);if(s){let ce=$e(s)?s.call(o):s;Reflect.ownKeys(ce).forEach(Ce=>{Xt(Ce,ce[Ce])})}d&&Fp(d,e,"c");function fe(ce,Ce){Ie(Ce)?Ce.forEach(Ke=>ce(Ke.bind(o))):Ce&&ce(Ce.bind(o))}if(fe(cr,u),fe(Je,p),fe(vc,f),fe(bc,m),fe(xc,y),fe(GC,_),fe(JC,k),fe(QC,D),fe(ZC,x),fe(Pt,O),fe(sn,w),fe(XC,A),Ie(E))if(E.length){let ce=e.exposed||(e.exposed={});E.forEach(Ce=>{Object.defineProperty(ce,Ce,{get:()=>o[Ce],set:Ke=>o[Ce]=Ke})})}else e.exposed||(e.exposed={});b&&e.render===ao&&(e.render=b),H!=null&&(e.inheritAttrs=H),M&&(e.components=M),le&&(e.directives=le)}function rw(e,t,o=ao,r=!1){Ie(e)&&(e=cc(e));for(let n in e){let i=e[n],a;rt(i)?"default"in i?a=we(i.from||n,i.default,!0):a=we(i.from||n):a=we(i),Tt(a)&&r?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>a.value,set:l=>a.value=l}):t[n]=a}}function Fp(e,t,o){so(Ie(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,o)}function fm(e,t,o,r){let n=r.includes(".")?sm(o,r):()=>o[r];if(Ct(e)){let i=t[e];$e(i)&&Qe(n,i)}else if($e(e))Qe(n,e.bind(o));else if(rt(e))if(Ie(e))e.forEach(i=>fm(i,t,o,r));else{let i=$e(e.handler)?e.handler.bind(o):t[e.handler];$e(i)&&Qe(n,i,e)}}function yc(e){let t=e.type,{mixins:o,extends:r}=t,{mixins:n,optionsCache:i,config:{optionMergeStrategies:a}}=e.appContext,l=i.get(t),s;return l?s=l:!n.length&&!o&&!r?s=t:(s={},n.length&&n.forEach(c=>Ya(s,c,a,!0)),Ya(s,t,a)),rt(t)&&i.set(t,s),s}function Ya(e,t,o,r=!1){let{mixins:n,extends:i}=t;i&&Ya(e,i,o,!0),n&&n.forEach(a=>Ya(e,a,o,!0));for(let a in t)if(!(r&&a==="expose")){let l=nw[a]||o&&o[a];e[a]=l?l(e[a],t[a]):t[a]}return e}var nw={data:jp,props:tn,emits:tn,methods:tn,computed:tn,beforeCreate:Yt,created:Yt,beforeMount:Yt,mounted:Yt,beforeUpdate:Yt,updated:Yt,beforeDestroy:Yt,beforeUnmount:Yt,destroyed:Yt,unmounted:Yt,activated:Yt,deactivated:Yt,errorCaptured:Yt,serverPrefetch:Yt,components:tn,directives:tn,watch:aw,provide:jp,inject:iw};function jp(e,t){return t?e?function(){return kt($e(e)?e.call(this,this):e,$e(t)?t.call(this,this):t)}:t:e}function iw(e,t){return tn(cc(e),cc(t))}function cc(e){if(Ie(e)){let t={};for(let o=0;o0)&&!(a&16)){if(a&8){let d=e.vnode.dynamicProps;for(let u=0;u{s=!0;let[p,f]=mm(u,t,!0);kt(a,p),f&&l.push(...f)};!o&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!s)return rt(e)&&r.set(e,Gr),Gr;if(Ie(i))for(let d=0;d-1,f[1]=y<0||m-1||Ue(f,"default"))&&l.push(u)}}}let c=[a,l];return rt(e)&&r.set(e,c),c}function Wp(e){return e[0]!=="$"}function Kp(e){let t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function Up(e,t){return Kp(e)===Kp(t)}function qp(e,t){return Ie(t)?t.findIndex(o=>Up(o,e)):$e(t)&&Up(t,e)?0:-1}var hm=e=>e[0]==="_"||e==="$stable",Cc=e=>Ie(e)?e.map(Wo):[Wo(e)],cw=(e,t,o)=>{if(t._n)return t;let r=ln((...n)=>Cc(t(...n)),o);return r._c=!1,r},gm=(e,t,o)=>{let r=e._ctx;for(let n in e){if(hm(n))continue;let i=e[n];if($e(i))t[n]=cw(n,i,r);else if(i!=null){let a=Cc(i);t[n]=()=>a}}},xm=(e,t)=>{let o=Cc(t);e.slots.default=()=>o},dw=(e,t)=>{if(e.vnode.shapeFlag&32){let o=t._;o?(e.slots=je(t),En(t,"_",o)):gm(t,e.slots={})}else e.slots={},t&&xm(e,t);En(e.slots,nl,1)},uw=(e,t,o)=>{let{vnode:r,slots:n}=e,i=!0,a=ot;if(r.shapeFlag&32){let l=t._;l?o&&l===1?i=!1:(kt(n,t),!o&&l===1&&delete n._):(i=!t.$stable,gm(t,n)),a=t}else t&&(xm(e,t),a={default:1});if(i)for(let l in n)!hm(l)&&!(l in a)&&delete n[l]};function vm(){return{app:null,config:{isNativeTag:hp,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var fw=0;function pw(e,t){return function(r,n=null){$e(r)||(r=Object.assign({},r)),n!=null&&!rt(n)&&(n=null);let i=vm(),a=new Set,l=!1,s=i.app={_uid:fw++,_component:r,_props:n,_container:null,_context:i,_instance:null,version:$w,get config(){return i.config},set config(c){},use(c,...d){return a.has(c)||(c&&$e(c.install)?(a.add(c),c.install(s,...d)):$e(c)&&(a.add(c),c(s,...d))),s},mixin(c){return i.mixins.includes(c)||i.mixins.push(c),s},component(c,d){return d?(i.components[c]=d,s):i.components[c]},directive(c,d){return d?(i.directives[c]=d,s):i.directives[c]},mount(c,d,u){if(!l){let p=dt(r,n);return p.appContext=i,d&&t?t(p,c):e(p,c,u),l=!0,s._container=c,c.__vue_app__=s,al(p.component)||p.component.proxy}},unmount(){l&&(e(null,s._container),delete s._container.__vue_app__)},provide(c,d){return i.provides[c]=d,s}};return s}}function uc(e,t,o,r,n=!1){if(Ie(e)){e.forEach((p,f)=>uc(p,t&&(Ie(t)?t[f]:t),o,r,n));return}if(vi(r)&&!n)return;let i=r.shapeFlag&4?al(r.component)||r.component.proxy:r.el,a=n?null:i,{i:l,r:s}=e,c=t&&t.r,d=l.refs===ot?l.refs={}:l.refs,u=l.setupState;if(c!=null&&c!==s&&(Ct(c)?(d[c]=null,Ue(u,c)&&(u[c]=null)):Tt(c)&&(c.value=null)),$e(s))lr(s,l,12,[a,d]);else{let p=Ct(s),f=Tt(s);if(p||f){let m=()=>{if(e.f){let y=p?Ue(u,s)?u[s]:d[s]:s.value;n?Ie(y)&&Pa(y,i):Ie(y)?y.includes(i)||y.push(i):p?(d[s]=[i],Ue(u,s)&&(u[s]=d[s])):(s.value=[i],e.k&&(d[e.k]=s.value))}else p?(d[s]=a,Ue(u,s)&&(u[s]=a)):f&&(s.value=a,e.k&&(d[e.k]=a))};a?(m.id=-1,to(m,o)):m()}}}function mw(){let e=[]}var to=KC;function bm(e){return hw(e)}function hw(e,t){mw();let o=xp();o.__VUE__=!0;let{insert:r,remove:n,patchProp:i,createElement:a,createText:l,createComment:s,setText:c,setElementText:d,parentNode:u,nextSibling:p,setScopeId:f=ao,insertStaticContent:m}=e,y=(g,C,z,q=null,G=null,re=null,oe=!1,F=null,Q=!!C.dynamicChildren)=>{if(g===C)return;g&&!rn(g,C)&&(q=gt(g),Xe(g,G,re,!0),g=null),C.patchFlag===-2&&(Q=!1,C.dynamicChildren=null);let{type:X,ref:P,shapeFlag:$}=C;switch(X){case rl:_(g,C,z,q);break;case Ut:h(g,C,z,q);break;case Ci:g==null&&O(C,z,q,oe);break;case St:le(g,C,z,q,G,re,oe,F,Q);break;default:$&1?D(g,C,z,q,G,re,oe,F,Q):$&6?ye(g,C,z,q,G,re,oe,F,Q):($&64||$&128)&&X.process(g,C,z,q,G,re,oe,F,Q,lt)}P!=null&&G&&uc(P,g&&g.ref,re,C||g,!C)},_=(g,C,z,q)=>{if(g==null)r(C.el=l(C.children),z,q);else{let G=C.el=g.el;C.children!==g.children&&c(G,C.children)}},h=(g,C,z,q)=>{g==null?r(C.el=s(C.children||""),z,q):C.el=g.el},O=(g,C,z,q)=>{[g.el,g.anchor]=m(g.children,C,z,q,g.el,g.anchor)},W=(g,C,z,q)=>{if(C.children!==g.children){let G=p(g.anchor);b(g),[C.el,C.anchor]=m(C.children,z,G,q)}else C.el=g.el,C.anchor=g.anchor},w=({el:g,anchor:C},z,q)=>{let G;for(;g&&g!==C;)G=p(g),r(g,z,q),g=G;r(C,z,q)},b=({el:g,anchor:C})=>{let z;for(;g&&g!==C;)z=p(g),n(g),g=z;n(C)},D=(g,C,z,q,G,re,oe,F,Q)=>{oe=oe||C.type==="svg",g==null?x(C,z,q,G,re,oe,F,Q):E(g,C,G,re,oe,F,Q)},x=(g,C,z,q,G,re,oe,F)=>{let Q,X,{type:P,props:$,shapeFlag:V,transition:ie,dirs:ue}=g;if(Q=g.el=a(g.type,re,$&&$.is,$),V&8?d(Q,g.children):V&16&&A(g.children,Q,null,q,G,re&&P!=="foreignObject",oe,F),ue&&Jr(g,null,q,"created"),$){for(let S in $)S!=="value"&&!di(S)&&i(Q,S,null,$[S],re,g.children,q,G,We);"value"in $&&i(Q,"value",null,$.value),(X=$.onVnodeBeforeMount)&&jo(X,q,g)}k(Q,g,g.scopeId,oe,q),ue&&Jr(g,null,q,"beforeMount");let Se=(!G||G&&!G.pendingBranch)&&ie&&!ie.persisted;Se&&ie.beforeEnter(Q),r(Q,C,z),((X=$&&$.onVnodeMounted)||Se||ue)&&to(()=>{X&&jo(X,q,g),Se&&ie.enter(Q),ue&&Jr(g,null,q,"mounted")},G)},k=(g,C,z,q,G)=>{if(z&&f(g,z),q)for(let re=0;re{for(let X=Q;X{let F=C.el=g.el,{patchFlag:Q,dynamicChildren:X,dirs:P}=C;Q|=g.patchFlag&16;let $=g.props||ot,V=C.props||ot,ie;z&&en(z,!1),(ie=V.onVnodeBeforeUpdate)&&jo(ie,z,C,g),P&&Jr(C,g,z,"beforeUpdate"),z&&en(z,!0);let ue=G&&C.type!=="foreignObject";if(X?H(g.dynamicChildren,X,F,z,q,ue,re):oe||Ke(g,C,F,null,z,q,ue,re,!1),Q>0){if(Q&16)M(F,C,$,V,z,q,G);else if(Q&2&&$.class!==V.class&&i(F,"class",null,V.class,G),Q&4&&i(F,"style",$.style,V.style,G),Q&8){let Se=C.dynamicProps;for(let S=0;S{ie&&jo(ie,z,C,g),P&&Jr(C,g,z,"updated")},q)},H=(g,C,z,q,G,re,oe)=>{for(let F=0;F{if(z!==q){if(z!==ot)for(let F in z)!di(F)&&!(F in q)&&i(g,F,z[F],null,oe,C.children,G,re,We);for(let F in q){if(di(F))continue;let Q=q[F],X=z[F];Q!==X&&F!=="value"&&i(g,F,X,Q,oe,C.children,G,re,We)}"value"in q&&i(g,"value",z.value,q.value)}},le=(g,C,z,q,G,re,oe,F,Q)=>{let X=C.el=g?g.el:l(""),P=C.anchor=g?g.anchor:l(""),{patchFlag:$,dynamicChildren:V,slotScopeIds:ie}=C;ie&&(F=F?F.concat(ie):ie),g==null?(r(X,z,q),r(P,z,q),A(C.children,z,P,G,re,oe,F,Q)):$>0&&$&64&&V&&g.dynamicChildren?(H(g.dynamicChildren,V,z,G,re,oe,F),(C.key!=null||G&&C===G.subTree)&&wc(g,C,!0)):Ke(g,C,z,P,G,re,oe,F,Q)},ye=(g,C,z,q,G,re,oe,F,Q)=>{C.slotScopeIds=F,g==null?C.shapeFlag&512?G.ctx.activate(C,z,q,oe,Q):Pe(C,z,q,G,re,oe,Q):fe(g,C,Q)},Pe=(g,C,z,q,G,re,oe)=>{let F=g.component=_w(g,q,G);if(el(g)&&(F.ctx.renderer=lt),Ew(F),F.asyncDep){if(G&&G.registerDep(F,ce),!g.el){let Q=F.subTree=dt(Ut);h(null,Q,C,z)}return}ce(F,g,C,z,G,re,oe)},fe=(g,C,z)=>{let q=C.component=g.component;if(FC(g,C,z))if(q.asyncDep&&!q.asyncResolved){Ce(q,C,z);return}else q.next=C,$C(q.update),q.update();else C.el=g.el,q.vnode=C},ce=(g,C,z,q,G,re,oe)=>{let F=()=>{if(g.isMounted){let{next:P,bu:$,u:V,parent:ie,vnode:ue}=g,Se=P,S;en(g,!1),P?(P.el=ue.el,Ce(g,P,oe)):P=ue,$&&pi($),(S=P.props&&P.props.onVnodeBeforeUpdate)&&jo(S,ie,P,ue),en(g,!0);let K=rc(g),T=g.subTree;g.subTree=K,y(T,K,u(T.el),gt(T),g,G,re),P.el=K.el,Se===null&&jC(g,K.el),V&&to(V,G),(S=P.props&&P.props.onVnodeUpdated)&&to(()=>jo(S,ie,P,ue),G)}else{let P,{el:$,props:V}=C,{bm:ie,m:ue,parent:Se}=g,S=vi(C);if(en(g,!1),ie&&pi(ie),!S&&(P=V&&V.onVnodeBeforeMount)&&jo(P,Se,C),en(g,!0),$&&mt){let K=()=>{g.subTree=rc(g),mt($,g.subTree,g,G,null)};S?C.type.__asyncLoader().then(()=>!g.isUnmounted&&K()):K()}else{let K=g.subTree=rc(g);y(null,K,z,q,g,G,re),C.el=K.el}if(ue&&to(ue,G),!S&&(P=V&&V.onVnodeMounted)){let K=C;to(()=>jo(P,Se,K),G)}(C.shapeFlag&256||Se&&vi(Se.vnode)&&Se.vnode.shapeFlag&256)&&g.a&&to(g.a,G),g.isMounted=!0,C=z=q=null}},Q=g.effect=new Zr(F,()=>mc(X),g.scope),X=g.update=()=>Q.run();X.id=g.uid,en(g,!0),X()},Ce=(g,C,z)=>{C.component=g;let q=g.vnode.props;g.vnode=C,g.next=null,sw(g,C.props,q,z),uw(g,C.children,z),_r(),Bp(),Er()},Ke=(g,C,z,q,G,re,oe,F,Q=!1)=>{let X=g&&g.children,P=g?g.shapeFlag:0,$=C.children,{patchFlag:V,shapeFlag:ie}=C;if(V>0){if(V&128){Me(X,$,z,q,G,re,oe,F,Q);return}else if(V&256){He(X,$,z,q,G,re,oe,F,Q);return}}ie&8?(P&16&&We(X,G,re),$!==X&&d(z,$)):P&16?ie&16?Me(X,$,z,q,G,re,oe,F,Q):We(X,G,re,!0):(P&8&&d(z,""),ie&16&&A($,z,q,G,re,oe,F,Q))},He=(g,C,z,q,G,re,oe,F,Q)=>{g=g||Gr,C=C||Gr;let X=g.length,P=C.length,$=Math.min(X,P),V;for(V=0;V<$;V++){let ie=C[V]=Q?Or(C[V]):Wo(C[V]);y(g[V],ie,z,null,G,re,oe,F,Q)}X>P?We(g,G,re,!0,!1,$):A(C,z,q,G,re,oe,F,Q,$)},Me=(g,C,z,q,G,re,oe,F,Q)=>{let X=0,P=C.length,$=g.length-1,V=P-1;for(;X<=$&&X<=V;){let ie=g[X],ue=C[X]=Q?Or(C[X]):Wo(C[X]);if(rn(ie,ue))y(ie,ue,z,null,G,re,oe,F,Q);else break;X++}for(;X<=$&&X<=V;){let ie=g[$],ue=C[V]=Q?Or(C[V]):Wo(C[V]);if(rn(ie,ue))y(ie,ue,z,null,G,re,oe,F,Q);else break;$--,V--}if(X>$){if(X<=V){let ie=V+1,ue=ieV)for(;X<=$;)Xe(g[X],G,re,!0),X++;else{let ie=X,ue=X,Se=new Map;for(X=ue;X<=V;X++){let Be=C[X]=Q?Or(C[X]):Wo(C[X]);Be.key!=null&&Se.set(Be.key,X)}let S,K=0,T=V-ue+1,L=!1,ae=0,he=new Array(T);for(X=0;X=T){Xe(Be,G,re,!0);continue}let Ge;if(Be.key!=null)Ge=Se.get(Be.key);else for(S=ue;S<=V;S++)if(he[S-ue]===0&&rn(Be,C[S])){Ge=S;break}Ge===void 0?Xe(Be,G,re,!0):(he[Ge-ue]=X+1,Ge>=ae?ae=Ge:L=!0,y(Be,C[Ge],z,null,G,re,oe,F,Q),K++)}let Ne=L?gw(he):Gr;for(S=Ne.length-1,X=T-1;X>=0;X--){let Be=ue+X,Ge=C[Be],Ve=Be+1{let{el:re,type:oe,transition:F,children:Q,shapeFlag:X}=g;if(X&6){Ye(g.component.subTree,C,z,q);return}if(X&128){g.suspense.move(C,z,q);return}if(X&64){oe.move(g,C,z,lt);return}if(oe===St){r(re,C,z);for(let $=0;$F.enter(re),G);else{let{leave:$,delayLeave:V,afterLeave:ie}=F,ue=()=>r(re,C,z),Se=()=>{$(re,()=>{ue(),ie&&ie()})};V?V(re,ue,Se):Se()}else r(re,C,z)},Xe=(g,C,z,q=!1,G=!1)=>{let{type:re,props:oe,ref:F,children:Q,dynamicChildren:X,shapeFlag:P,patchFlag:$,dirs:V}=g;if(F!=null&&uc(F,null,z,g,!0),P&256){C.ctx.deactivate(g);return}let ie=P&1&&V,ue=!vi(g),Se;if(ue&&(Se=oe&&oe.onVnodeBeforeUnmount)&&jo(Se,C,g),P&6)Le(g.component,z,q);else{if(P&128){g.suspense.unmount(z,q);return}ie&&Jr(g,null,C,"beforeUnmount"),P&64?g.type.remove(g,C,z,G,lt,q):X&&(re!==St||$>0&&$&64)?We(X,C,z,!1,!0):(re===St&&$&384||!G&&P&16)&&We(Q,C,z),q&&Dt(g)}(ue&&(Se=oe&&oe.onVnodeUnmounted)||ie)&&to(()=>{Se&&jo(Se,C,g),ie&&Jr(g,null,C,"unmounted")},z)},Dt=g=>{let{type:C,el:z,anchor:q,transition:G}=g;if(C===St){pt(z,q);return}if(C===Ci){b(g);return}let re=()=>{n(z),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(g.shapeFlag&1&&G&&!G.persisted){let{leave:oe,delayLeave:F}=G,Q=()=>oe(z,re);F?F(g.el,re,Q):Q()}else re()},pt=(g,C)=>{let z;for(;g!==C;)z=p(g),n(g),g=z;n(C)},Le=(g,C,z)=>{let{bum:q,scope:G,update:re,subTree:oe,um:F}=g;q&&pi(q),G.stop(),re&&(re.active=!1,Xe(oe,g,C,z)),F&&to(F,C),to(()=>{g.isUnmounted=!0},C),C&&C.pendingBranch&&!C.isUnmounted&&g.asyncDep&&!g.asyncResolved&&g.suspenseId===C.pendingId&&(C.deps--,C.deps===0&&C.resolve())},We=(g,C,z,q=!1,G=!1,re=0)=>{for(let oe=re;oeg.shapeFlag&6?gt(g.component.subTree):g.shapeFlag&128?g.suspense.next():p(g.anchor||g.el),Re=(g,C,z)=>{g==null?C._vnode&&Xe(C._vnode,null,null,!0):y(C._vnode||null,g,C,null,null,null,z),Bp(),rm(),C._vnode=g},lt={p:y,um:Xe,m:Ye,r:Dt,mt:Pe,mc:A,pc:Ke,pbc:H,n:gt,o:e},bt,mt;return t&&([bt,mt]=t(lt)),{render:Re,hydrate:bt,createApp:pw(Re,bt)}}function en({effect:e,update:t},o){e.allowRecurse=t.allowRecurse=o}function wc(e,t,o=!1){let r=e.children,n=t.children;if(Ie(r)&&Ie(n))for(let i=0;i>1,e[o[l]]0&&(t[r]=o[i-1]),o[i]=r)}}for(i=o.length,a=o[i-1];i-- >0;)o[i]=a,a=t[a];return o}var xw=e=>e.__isTeleport,yi=e=>e&&(e.disabled||e.disabled===""),Gp=e=>typeof SVGElement<"u"&&e instanceof SVGElement,fc=(e,t)=>{let o=e&&e.to;if(Ct(o))if(t){let r=t(o);return r}else return null;else return o},vw={__isTeleport:!0,process(e,t,o,r,n,i,a,l,s,c){let{mc:d,pc:u,pbc:p,o:{insert:f,querySelector:m,createText:y,createComment:_}}=c,h=yi(t.props),{shapeFlag:O,children:W,dynamicChildren:w}=t;if(e==null){let b=t.el=y(""),D=t.anchor=y("");f(b,o,r),f(D,o,r);let x=t.target=fc(t.props,m),k=t.targetAnchor=y("");x&&(f(k,x),a=a||Gp(x));let A=(E,H)=>{O&16&&d(W,E,H,n,i,a,l,s)};h?A(o,D):x&&A(x,k)}else{t.el=e.el;let b=t.anchor=e.anchor,D=t.target=e.target,x=t.targetAnchor=e.targetAnchor,k=yi(e.props),A=k?o:D,E=k?b:x;if(a=a||Gp(D),w?(p(e.dynamicChildren,w,A,n,i,a,l),wc(e,t,!0)):s||u(e,t,A,E,n,i,a,l,!1),h)k||Ua(t,o,b,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let H=t.target=fc(t.props,m);H&&Ua(t,H,null,c,0)}else k&&Ua(t,D,x,c,1)}Cm(t)},remove(e,t,o,r,{um:n,o:{remove:i}},a){let{shapeFlag:l,children:s,anchor:c,targetAnchor:d,target:u,props:p}=e;if(u&&i(d),(a||!yi(p))&&(i(c),l&16))for(let f=0;f0?Do||Gr:null,yw(),_i>0&&Do&&Do.push(e),e}function ct(e,t,o,r,n,i){return wm(ut(e,t,o,r,n,i,!0))}function Di(e,t,o,r,n){return wm(dt(e,t,o,r,n,!0))}function Rn(e){return e?e.__v_isVNode===!0:!1}function rn(e,t){return e.type===t.type&&e.key===t.key}var nl="__vInternal",km=({key:e})=>e??null,qa=({ref:e,ref_key:t,ref_for:o})=>e!=null?Ct(e)||Tt(e)||$e(e)?{i:Kt,r:e,k:t,f:!!o}:e:null;function ut(e,t=null,o=null,r=0,n=null,i=e===St?0:1,a=!1,l=!1){let s={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&km(t),ref:t&&qa(t),scopeId:am,slotScopeIds:null,children:o,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:Kt};return l?(kc(s,o),i&128&&e.normalize(s)):o&&(s.shapeFlag|=Ct(o)?8:16),_i>0&&!a&&Do&&(s.patchFlag>0||i&6)&&s.patchFlag!==32&&Do.push(s),s}var dt=Cw;function Cw(e,t=null,o=null,r=0,n=null,i=!1){if((!e||e===ew)&&(e=Ut),Rn(e)){let l=Nr(e,t,!0);return o&&kc(l,o),_i>0&&!i&&Do&&(l.shapeFlag&6?Do[Do.indexOf(e)]=l:Do.push(l)),l.patchFlag|=-2,l}if(Iw(e)&&(e=e.__vccOpts),t){t=ww(t);let{class:l,style:s}=t;l&&!Ct(l)&&(t.class=qr(l)),rt(s)&&(ja(s)&&!Ie(s)&&(s=kt({},s)),t.style=vr(s))}let a=Ct(e)?1:WC(e)?128:xw(e)?64:rt(e)?4:$e(e)?2:0;return ut(e,t,o,r,n,a,i,!0)}function ww(e){return e?ja(e)||nl in e?kt({},e):e:null}function Nr(e,t,o=!1){let{props:r,ref:n,patchFlag:i,children:a}=e,l=t?Ti(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&km(l),ref:t&&t.ref?o&&n?Ie(n)?n.concat(qa(t)):[n,qa(t)]:qa(t):n,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==St?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Nr(e.ssContent),ssFallback:e.ssFallback&&Nr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx}}function Mn(e=" ",t=0){return dt(rl,null,e,t)}function il(e="",t=!1){return t?(Ze(),Di(Ut,null,e)):dt(Ut,null,e)}function Wo(e){return e==null||typeof e=="boolean"?dt(Ut):Ie(e)?dt(St,null,e.slice()):typeof e=="object"?Or(e):dt(rl,null,String(e))}function Or(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Nr(e)}function kc(e,t){let o=0,{shapeFlag:r}=e;if(t==null)t=null;else if(Ie(t))o=16;else if(typeof t=="object")if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),kc(e,n()),n._c&&(n._d=!0));return}else{o=32;let n=t._;!n&&!(nl in t)?t._ctx=Kt:n===3&&Kt&&(Kt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else $e(t)?(t={default:t,_ctx:Kt},o=32):(t=String(t),r&64?(o=16,t=[Mn(t)]):o=8);e.children=t,e.shapeFlag|=o}function Ti(...e){let t={};for(let o=0;ozt||Kt,In=e=>{zt=e,e.scope.on()},an=()=>{zt&&zt.scope.off(),zt=null};function Sm(e){return e.vnode.shapeFlag&4}var Ei=!1;function Ew(e,t=!1){Ei=t;let{props:o,children:r}=e.vnode,n=Sm(e);lw(e,o,n,t),dw(e,r);let i=n?Dw(e,t):void 0;return Ei=!1,i}function Dw(e,t){var o;let r=e.type;e.accessCache=Object.create(null),e.proxy=Qr(new Proxy(e.ctx,tw));let{setup:n}=r;if(n){let i=e.setupContext=n.length>1?Ow(e):null;In(e),_r();let a=lr(n,e,0,[e.props,i]);if(Er(),an(),Hs(a)){if(a.then(an,an),t)return a.then(l=>{Xp(e,l,t)}).catch(l=>{Xa(l,e,0)});e.asyncDep=a}else Xp(e,a,t)}else _m(e,t)}function Xp(e,t,o){$e(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:rt(t)&&(e.setupState=Wa(t)),_m(e,o)}var Zp,Qp;function _m(e,t,o){let r=e.type;if(!e.render){if(!t&&Zp&&!r.render){let n=r.template||yc(e).template;if(n){let{isCustomElement:i,compilerOptions:a}=e.appContext.config,{delimiters:l,compilerOptions:s}=r,c=kt(kt({isCustomElement:i,delimiters:l},a),s);r.render=Zp(n,c)}}e.render=r.render||ao,Qp&&Qp(e)}In(e),_r(),ow(e),Er(),an()}function Tw(e){return new Proxy(e.attrs,{get(t,o){return eo(e,"get","$attrs"),t[o]}})}function Ow(e){let t=r=>{e.exposed=r||{}},o;return{get attrs(){return o||(o=Tw(e))},slots:e.slots,emit:e.emit,expose:t}}function al(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Wa(Qr(e.exposed)),{get(t,o){if(o in t)return t[o];if(o in bi)return bi[o](e)},has(t,o){return o in t||o in bi}}))}var Nw=/(?:^|[-_])(\w)/g,Pw=e=>e.replace(Nw,t=>t.toUpperCase()).replace(/[-_]/g,"");function Rw(e,t=!0){return $e(e)?e.displayName||e.name:e.name||t&&e.__name}function Em(e,t,o=!1){let r=Rw(t);if(!r&&t.__file){let n=t.__file.match(/([^/\\]+)\.\w+$/);n&&(r=n[1])}if(!r&&e&&e.parent){let n=i=>{for(let a in i)if(i[a]===t)return a};r=n(e.components||e.parent.type.components)||n(e.appContext.components)}return r?Pw(r):o?"App":"Anonymous"}function Iw(e){return $e(e)&&"__vccOpts"in e}var j=(e,t)=>zp(e,t,Ei);function v(e,t,o){let r=arguments.length;return r===2?rt(t)&&!Ie(t)?Rn(t)?dt(e,null,[t]):dt(e,t):dt(e,null,t):(r>3?o=Array.prototype.slice.call(arguments,2):r===3&&Rn(o)&&(o=[o]),dt(e,t,o))}var Aw=Symbol(""),Mw=()=>{{let e=we(Aw);return e}};var $w="3.2.45";var Lw="http://www.w3.org/2000/svg",dn=typeof document<"u"?document:null,Dm=dn&&dn.createElement("template"),zw={insert:(e,t,o)=>{t.insertBefore(e,o||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,o,r)=>{let n=t?dn.createElementNS(Lw,e):dn.createElement(e,o?{is:o}:void 0);return e==="select"&&r&&r.multiple!=null&&n.setAttribute("multiple",r.multiple),n},createText:e=>dn.createTextNode(e),createComment:e=>dn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>dn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,o,r,n,i){let a=o?o.previousSibling:t.lastChild;if(n&&(n===i||n.nextSibling))for(;t.insertBefore(n.cloneNode(!0),o),!(n===i||!(n=n.nextSibling)););else{Dm.innerHTML=r?`${e}`:e;let l=Dm.content;if(r){let s=l.firstChild;for(;s.firstChild;)l.appendChild(s.firstChild);l.removeChild(s)}t.insertBefore(l,o)}return[a?a.nextSibling:t.firstChild,o?o.previousSibling:t.lastChild]}};function Bw(e,t,o){let r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):o?e.setAttribute("class",t):e.className=t}function Hw(e,t,o){let r=e.style,n=Ct(o);if(o&&!n){for(let i in o)Dc(r,i,o[i]);if(t&&!Ct(t))for(let i in t)o[i]==null&&Dc(r,i,"")}else{let i=r.display;n?t!==o&&(r.cssText=o):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=i)}}var Tm=/\s*!important$/;function Dc(e,t,o){if(Ie(o))o.forEach(r=>Dc(e,t,r));else if(o==null&&(o=""),t.startsWith("--"))e.setProperty(t,o);else{let r=Vw(e,t);Tm.test(o)?e.setProperty(yr(r),o.replace(Tm,""),"important"):e[r]=o}}var Om=["Webkit","Moz","ms"],Sc={};function Vw(e,t){let o=Sc[t];if(o)return o;let r=Bo(t);if(r!=="filter"&&r in e)return Sc[t]=r;r=ui(r);for(let n=0;n_c||(Gw.then(()=>_c=0),_c=Date.now());function Xw(e,t){let o=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=o.attached)return;so(Zw(r,o.value),t,5,[r])};return o.value=e,o.attached=Yw(),o}function Zw(e,t){if(Ie(t)){let o=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{o.call(e),e._stopped=!0},t.map(r=>n=>!n._stopped&&r&&r(n))}else return t}var Rm=/^on[a-z]/,Qw=(e,t,o,r,n=!1,i,a,l,s)=>{t==="class"?Bw(e,r,n):t==="style"?Hw(e,o,r):_n(t)?ci(t)||Uw(e,t,o,r,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Jw(e,t,r,n))?jw(e,t,r,i,a,l,s):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Fw(e,t,r,n))};function Jw(e,t,o,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&Rm.test(t)&&$e(o)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Rm.test(t)&&Ct(o)?!1:t in e}function Bm(e){let t=Uo();if(!t)return;let o=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>Oc(i,n))},r=()=>{let n=e(t.proxy);Tc(t.subTree,n),o(n)};lm(r),Je(()=>{let n=new MutationObserver(r);n.observe(t.subTree.el.parentNode,{childList:!0}),sn(()=>n.disconnect())})}function Tc(e,t){if(e.shapeFlag&128){let o=e.suspense;e=o.activeBranch,o.pendingBranch&&!o.isHydrating&&o.effects.push(()=>{Tc(o.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Oc(e.el,t);else if(e.type===St)e.children.forEach(o=>Tc(o,t));else if(e.type===Ci){let{el:o,anchor:r}=e;for(;o&&(Oc(o,t),o!==r);)o=o.nextSibling}}function Oc(e,t){if(e.nodeType===1){let o=e.style;for(let r in t)o.setProperty(`--${r}`,t[r])}}var Pr="transition",Oi="animation",To=(e,{slots:t})=>v(gc,Vm(e),t);To.displayName="Transition";var Hm={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},ek=To.props=kt({},gc.props,Hm),cn=(e,t=[])=>{Ie(e)?e.forEach(o=>o(...t)):e&&e(...t)},Im=e=>e?Ie(e)?e.some(t=>t.length>1):e.length>1:!1;function Vm(e){let t={};for(let M in e)M in Hm||(t[M]=e[M]);if(e.css===!1)return t;let{name:o="v",type:r,duration:n,enterFromClass:i=`${o}-enter-from`,enterActiveClass:a=`${o}-enter-active`,enterToClass:l=`${o}-enter-to`,appearFromClass:s=i,appearActiveClass:c=a,appearToClass:d=l,leaveFromClass:u=`${o}-leave-from`,leaveActiveClass:p=`${o}-leave-active`,leaveToClass:f=`${o}-leave-to`}=e,m=tk(n),y=m&&m[0],_=m&&m[1],{onBeforeEnter:h,onEnter:O,onEnterCancelled:W,onLeave:w,onLeaveCancelled:b,onBeforeAppear:D=h,onAppear:x=O,onAppearCancelled:k=W}=t,A=(M,le,ye)=>{Rr(M,le?d:l),Rr(M,le?c:a),ye&&ye()},E=(M,le)=>{M._isLeaving=!1,Rr(M,u),Rr(M,f),Rr(M,p),le&&le()},H=M=>(le,ye)=>{let Pe=M?x:O,fe=()=>A(le,M,ye);cn(Pe,[le,fe]),Am(()=>{Rr(le,M?s:i),dr(le,M?d:l),Im(Pe)||Mm(le,r,y,fe)})};return kt(t,{onBeforeEnter(M){cn(h,[M]),dr(M,i),dr(M,a)},onBeforeAppear(M){cn(D,[M]),dr(M,s),dr(M,c)},onEnter:H(!1),onAppear:H(!0),onLeave(M,le){M._isLeaving=!0;let ye=()=>E(M,le);dr(M,u),jm(),dr(M,p),Am(()=>{M._isLeaving&&(Rr(M,u),dr(M,f),Im(w)||Mm(M,r,_,ye))}),cn(w,[M,ye])},onEnterCancelled(M){A(M,!1),cn(W,[M])},onAppearCancelled(M){A(M,!0),cn(k,[M])},onLeaveCancelled(M){E(M),cn(b,[M])}})}function tk(e){if(e==null)return null;if(rt(e))return[Ec(e.enter),Ec(e.leave)];{let t=Ec(e);return[t,t]}}function Ec(e){return Dn(e)}function dr(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e._vtc||(e._vtc=new Set)).add(t)}function Rr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));let{_vtc:o}=e;o&&(o.delete(t),o.size||(e._vtc=void 0))}function Am(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var ok=0;function Mm(e,t,o,r){let n=e._endId=++ok,i=()=>{n===e._endId&&r()};if(o)return setTimeout(i,o);let{type:a,timeout:l,propCount:s}=Fm(e,t);if(!a)return r();let c=a+"end",d=0,u=()=>{e.removeEventListener(c,p),i()},p=f=>{f.target===e&&++d>=s&&u()};setTimeout(()=>{d(o[m]||"").split(", "),n=r(`${Pr}Delay`),i=r(`${Pr}Duration`),a=$m(n,i),l=r(`${Oi}Delay`),s=r(`${Oi}Duration`),c=$m(l,s),d=null,u=0,p=0;t===Pr?a>0&&(d=Pr,u=a,p=i.length):t===Oi?c>0&&(d=Oi,u=c,p=s.length):(u=Math.max(a,c),d=u>0?a>c?Pr:Oi:null,p=d?d===Pr?i.length:s.length:0);let f=d===Pr&&/\b(transform|all)(,|$)/.test(r(`${Pr}Property`).toString());return{type:d,timeout:u,propCount:p,hasTransform:f}}function $m(e,t){for(;e.lengthLm(o)+Lm(e[r])))}function Lm(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function jm(){return document.body.offsetHeight}var Wm=new WeakMap,Km=new WeakMap,rk={name:"TransitionGroup",props:kt({},ek,{tag:String,moveClass:String}),setup(e,{slots:t}){let o=Uo(),r=hc(),n,i;return bc(()=>{if(!n.length)return;let a=e.moveClass||`${e.name||"v"}-move`;if(!lk(n[0].el,o.vnode.el,a))return;n.forEach(nk),n.forEach(ik);let l=n.filter(ak);jm(),l.forEach(s=>{let c=s.el,d=c.style;dr(c,a),d.transform=d.webkitTransform=d.transitionDuration="";let u=c._moveCb=p=>{p&&p.target!==c||(!p||/transform$/.test(p.propertyName))&&(c.removeEventListener("transitionend",u),c._moveCb=null,Rr(c,a))};c.addEventListener("transitionend",u)})}),()=>{let a=je(e),l=Vm(a),s=a.tag||St;n=i,i=t.default?Ja(t.default()):[];for(let c=0;c{a.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),o.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";let n=t.nodeType===1?t:t.parentNode;n.appendChild(r);let{hasTransform:i}=Fm(r);return n.removeChild(r),i}var sk=kt({patchProp:Qw},zw),zm;function ck(){return zm||(zm=bm(sk))}var qm=(...e)=>{let t=ck().createApp(...e),{mount:o}=t;return t.mount=r=>{let n=dk(r);if(!n)return;let i=t._component;!$e(i)&&!i.render&&!i.template&&(i.template=n.innerHTML),n.innerHTML="";let a=o(n,!1,n instanceof SVGElement);return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),a},t};function dk(e){return Ct(e)?document.querySelector(e):e}var ll=[],Gm=new WeakMap;function uk(){ll.forEach(e=>e(...Gm.get(e))),ll=[]}function Ni(e,...t){Gm.set(e,t),!ll.includes(e)&&ll.push(e)===1&&requestAnimationFrame(uk)}function sl(e,t){let{target:o}=e;for(;o;){if(o.dataset&&o.dataset[t]!==void 0)return!0;o=o.parentElement}return!1}function cl(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function Ir(e){if(e!=null)return typeof e=="number"?`${e}px`:e.endsWith("px")?e:`${e}px`}function $n(e,t){let o=e.trim().split(/\s+/g),r={top:o[0]};switch(o.length){case 1:r.right=o[0],r.bottom=o[0],r.left=o[0];break;case 2:r.right=o[1],r.left=o[1],r.bottom=o[0];break;case 3:r.right=o[1],r.bottom=o[2],r.left=o[1];break;case 4:r.right=o[1],r.bottom=o[2],r.left=o[3];break;default:throw new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return t===void 0?r:r[t]}var Nc={black:"#000",silver:"#C0C0C0",gray:"#808080",white:"#FFF",maroon:"#800000",red:"#F00",purple:"#800080",fuchsia:"#F0F",green:"#008000",lime:"#0F0",olive:"#808000",yellow:"#FF0",navy:"#000080",blue:"#00F",teal:"#008080",aqua:"#0FF",transparent:"#0000"};var qo="^\\s*",Go="\\s*$",Ar="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*",co="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",un="([0-9A-Fa-f])",fn="([0-9A-Fa-f]{2})",HP=new RegExp(`${qo}hsl\\s*\\(${co},${Ar},${Ar}\\)${Go}`),VP=new RegExp(`${qo}hsv\\s*\\(${co},${Ar},${Ar}\\)${Go}`),FP=new RegExp(`${qo}hsla\\s*\\(${co},${Ar},${Ar},${co}\\)${Go}`),jP=new RegExp(`${qo}hsva\\s*\\(${co},${Ar},${Ar},${co}\\)${Go}`),fk=new RegExp(`${qo}rgb\\s*\\(${co},${co},${co}\\)${Go}`),pk=new RegExp(`${qo}rgba\\s*\\(${co},${co},${co},${co}\\)${Go}`),mk=new RegExp(`${qo}#${un}${un}${un}${Go}`),hk=new RegExp(`${qo}#${fn}${fn}${fn}${Go}`),gk=new RegExp(`${qo}#${un}${un}${un}${un}${Go}`),xk=new RegExp(`${qo}#${fn}${fn}${fn}${fn}${Go}`);function oo(e){return parseInt(e,16)}function vo(e){try{let t;if(t=hk.exec(e))return[oo(t[1]),oo(t[2]),oo(t[3]),1];if(t=fk.exec(e))return[Ht(t[1]),Ht(t[5]),Ht(t[9]),1];if(t=pk.exec(e))return[Ht(t[1]),Ht(t[5]),Ht(t[9]),Ln(t[13])];if(t=mk.exec(e))return[oo(t[1]+t[1]),oo(t[2]+t[2]),oo(t[3]+t[3]),1];if(t=xk.exec(e))return[oo(t[1]),oo(t[2]),oo(t[3]),Ln(oo(t[4])/255)];if(t=gk.exec(e))return[oo(t[1]+t[1]),oo(t[2]+t[2]),oo(t[3]+t[3]),Ln(oo(t[4]+t[4])/255)];if(e in Nc)return vo(Nc[e]);throw new Error(`[seemly/rgba]: Invalid color value ${e}.`)}catch(t){throw t}}function vk(e){return e>1?1:e<0?0:e}function Rc(e,t,o,r){return`rgba(${Ht(e)}, ${Ht(t)}, ${Ht(o)}, ${vk(r)})`}function Pc(e,t,o,r,n){return Ht((e*t*(1-r)+o*r)/n)}function xe(e,t){Array.isArray(e)||(e=vo(e)),Array.isArray(t)||(t=vo(t));let o=e[3],r=t[3],n=Ln(o+r-o*r);return Rc(Pc(e[0],o,t[0],r,n),Pc(e[1],o,t[1],r,n),Pc(e[2],o,t[2],r,n),n)}function te(e,t){let[o,r,n,i=1]=Array.isArray(e)?e:vo(e);return t.alpha?Rc(o,r,n,t.alpha):Rc(o,r,n,i)}function ur(e,t){let[o,r,n,i=1]=Array.isArray(e)?e:vo(e),{lightness:a=1,alpha:l=1}=t;return Ym([o*a,r*a,n*a,i*l])}function Ln(e){let t=Math.round(Number(e)*100)/100;return t>1?1:t<0?0:t}function Ht(e){let t=Math.round(Number(e));return t>255?255:t<0?0:t}function Ym(e){let[t,o,r]=e;return 3 in e?`rgba(${Ht(t)}, ${Ht(o)}, ${Ht(r)}, ${Ln(e[3])})`:`rgba(${Ht(t)}, ${Ht(o)}, ${Ht(r)}, 1)`}function Ic(e=8){return Math.random().toString(16).slice(2,2+e)}function Ac(e,t){let o=[];for(let r=0;rke(o,...t));else return e(...t)}var zn=(e,...t)=>typeof e=="function"?e(...t):typeof e=="string"?Mn(e):typeof e=="number"?Mn(String(e)):null;function dl(e,t){console.error(`[naive/${e}]: ${t}`)}function ul(e,t){throw new Error(`[naive/${e}]: ${t}`)}function Bn(e){return typeof e=="string"?`s-${e}`:`n-${e}`}function Pi(e){return e.some(t=>Rn(t)?!(t.type===Ut||t.type===St&&!Pi(t.children)):!0)?e:null}function Yo(e,t){return e&&Pi(e())||t()}function fl(e,t,o){return e&&Pi(e(t))||o(t)}function Xo(e,t){let o=e&&Pi(e());return t(o||null)}function pl(e){return!(e&&Pi(e()))}function Ri(e){return e.replace(/#|\(|\)|,|\s/g,"_")}function yk(e){let t=0;for(let o=0;o{let n=yk(r);if(n){if(n===1){e.forEach(a=>{o.push(r.replace("&",a))});return}}else{e.forEach(a=>{o.push((a&&a+" ")+r)});return}let i=[r];for(;n--;){let a=[];i.forEach(l=>{e.forEach(s=>{a.push(l.replace("&",s))})}),i=a}i.forEach(a=>o.push(a))}),o}function kk(e,t){let o=[];return t.split(Xm).forEach(r=>{e.forEach(n=>{o.push((n&&n+" ")+r)})}),o}function Zm(e){let t=[""];return e.forEach(o=>{o=o&&o.trim(),o&&(o.includes("&")?t=wk(t,o):t=kk(t,o))}),t.join(", ").replace(Ck," ")}function Mc(e){if(!e)return;let t=e.parentElement;t&&t.removeChild(e)}function pn(e){return document.querySelector(`style[cssr-id="${e}"]`)}function Qm(e){let t=document.createElement("style");return t.setAttribute("cssr-id",e),t}function Ii(e){return e?/^\s*@(s|m)/.test(e):!1}var Sk=/[A-Z]/g;function eh(e){return e.replace(Sk,t=>"-"+t.toLowerCase())}function _k(e,t=" "){return typeof e=="object"&&e!==null?` { `+Object.entries(e).map(o=>t+` ${eh(o[0])}: ${o[1]};`).join(` `)+` -`+t+"}":`: ${e};`}function Dk(e,t,o){return typeof e=="function"?e({context:t.context,props:o}):e}function Jm(e,t,o,r){if(!t)return"";let n=Dk(t,o,r);if(!n)return"";if(typeof n=="string")return`${e} { +`+t+"}":`: ${e};`}function Ek(e,t,o){return typeof e=="function"?e({context:t.context,props:o}):e}function Jm(e,t,o,r){if(!t)return"";let n=Ek(t,o,r);if(!n)return"";if(typeof n=="string")return`${e} { ${n} }`;let i=Object.keys(n);if(i.length===0)return o.config.keepEmptyBlock?e+` { }`:"";let a=e?[e+" {"]:[];return i.forEach(l=>{let s=n[l];if(l==="raw"){a.push(` `+s+` -`);return}l=eh(l),s!=null&&a.push(` ${l}${Ek(s)}`)}),e&&a.push("}"),a.join(` +`);return}l=eh(l),s!=null&&a.push(` ${l}${_k(s)}`)}),e&&a.push("}"),a.join(` `)}function $c(e,t,o){e&&e.forEach(r=>{if(Array.isArray(r))$c(r,t,o);else if(typeof r=="function"){let n=r(t);Array.isArray(n)?$c(n,t,o):n&&o(n)}else r&&o(r)})}function th(e,t,o,r,n,i){let a=e.$,l="";if(!a||typeof a=="string")Ii(a)?l=a:t.push(a);else if(typeof a=="function"){let d=a({context:r.context,props:n});Ii(d)?l=d:t.push(d)}else if(a.before&&a.before(r.context),!a.$||typeof a.$=="string")Ii(a.$)?l=a.$:t.push(a.$);else if(a.$){let d=a.$({context:r.context,props:n});Ii(d)?l=d:t.push(d)}let s=Zm(t),c=Jm(s,e.props,r,n);l?(o.push(`${l} {`),i&&c&&i.insertRule(`${l} { ${c} } -`)):(i&&c&&i.insertRule(c),!i&&c.length&&o.push(c)),e.children&&$c(e.children,{context:r.context,props:n},d=>{if(typeof d=="string"){let u=Jm(s,{raw:d},r,n);i?i.insertRule(u):o.push(u)}else th(d,t,o,r,n,i)}),t.pop(),l&&o.push("}"),a&&a.after&&a.after(r.context)}function pl(e,t,o,r=!1){let n=[];return th(e,[],n,t,o,r?e.instance.__styleSheet:void 0),r?"":n.join(` +`)):(i&&c&&i.insertRule(c),!i&&c.length&&o.push(c)),e.children&&$c(e.children,{context:r.context,props:n},d=>{if(typeof d=="string"){let u=Jm(s,{raw:d},r,n);i?i.insertRule(u):o.push(u)}else th(d,t,o,r,n,i)}),t.pop(),l&&o.push("}"),a&&a.after&&a.after(r.context)}function ml(e,t,o,r=!1){let n=[];return th(e,[],n,t,o,r?e.instance.__styleSheet:void 0),r?"":n.join(` -`)}function Tk(e){for(var t=0,o,r=0,n=e.length;n>=4;++r,n-=4)o=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,o=(o&65535)*1540483477+((o>>>16)*59797<<16),o^=o>>>24,t=(o&65535)*1540483477+((o>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(n){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var so=Tk;typeof window<"u"&&(window.__cssrContext={});function rh(e,t,o){let{els:r}=t;if(o===void 0)r.forEach(Mc),t.els=[];else{let n=pn(o);n&&r.includes(n)&&(Mc(n),t.els=r.filter(i=>i!==n))}}function oh(e,t){e.push(t)}function nh(e,t,o,r,n,i,a,l,s){if(i&&!s){if(o===void 0){console.error("[css-render/mount]: `id` is required in `silent` mode.");return}let p=window.__cssrContext;p[o]||(p[o]=!0,pl(t,e,r,i));return}let c;if(o===void 0&&(c=t.render(r),o=so(c)),s){s.adapter(o,c??t.render(r));return}let d=pn(o);if(d!==null&&!a)return d;let u=d??Qm(o);if(c===void 0&&(c=t.render(r)),u.textContent=c,d!==null)return d;if(l){let p=document.head.querySelector(`meta[name="${l}"]`);if(p)return document.head.insertBefore(u,p),oh(t.els,u),u}return n?document.head.insertBefore(u,document.head.querySelector("style, link")):document.head.appendChild(u),oh(t.els,u),u}function Ok(e){return pl(this,this.instance,e)}function Pk(e={}){let{id:t,ssr:o,props:r,head:n=!1,silent:i=!1,force:a=!1,anchorMetaName:l}=e;return nh(this.instance,this,t,r,n,i,a,l,o)}function Nk(e={}){let{id:t}=e;rh(this.instance,this,t)}var ml=function(e,t,o,r){return{instance:e,$:t,props:o,children:r,els:[],render:Ok,mount:Pk,unmount:Nk}},ih=function(e,t,o,r){return Array.isArray(t)?ml(e,{$:null},null,t):Array.isArray(o)?ml(e,t,null,o):Array.isArray(r)?ml(e,t,o,r):ml(e,t,o,null)};function hl(e={}){let t=null,o={c:(...r)=>ih(o,...r),use:(r,...n)=>r.install(o,...n),find:pn,context:{},config:e,get __styleSheet(){if(!t){let r=document.createElement("style");return document.head.appendChild(r),t=document.styleSheets[document.styleSheets.length-1],t}return t}};return o}function Lc(e,t){if(e===void 0)return!1;if(t){let{context:{ids:o}}=t;return o.has(e)}return pn(e)!==null}var ah=hl;function Rk(e){let t=".",o="__",r="--",n;if(e){let m=e.blockPrefix;m&&(t=m),m=e.elementPrefix,m&&(o=m),m=e.modifierPrefix,m&&(r=m)}let i={install(m){n=m.c;let y=m.context;y.bem={},y.bem.b=null,y.bem.els=null}};function a(m){let y,w;return{before(g){y=g.bem.b,w=g.bem.els,g.bem.els=null},after(g){g.bem.b=y,g.bem.els=w},$({context:g,props:O}){return m=typeof m=="string"?m:m({context:g,props:O}),g.bem.b=m,`${O?.bPrefix||t}${g.bem.b}`}}}function l(m){let y;return{before(w){y=w.bem.els},after(w){w.bem.els=y},$({context:w,props:g}){return m=typeof m=="string"?m:m({context:w,props:g}),w.bem.els=m.split(",").map(O=>O.trim()),w.bem.els.map(O=>`${g?.bPrefix||t}${w.bem.b}${o}${O}`).join(", ")}}}function s(m){return{$({context:y,props:w}){m=typeof m=="string"?m:m({context:y,props:w});let g=m.split(",").map(S=>S.trim());function O(S){return g.map(v=>`&${w?.bPrefix||t}${y.bem.b}${S!==void 0?`${o}${S}`:""}${r}${v}`).join(", ")}let j=y.bem.els;return j!==null?O(j[0]):O()}}}function c(m){return{$({context:y,props:w}){m=typeof m=="string"?m:m({context:y,props:w});let g=y.bem.els;return`&:not(${w?.bPrefix||t}${y.bem.b}${g!==null&&g.length>0?`${o}${g[0]}`:""}${r}${m})`}}}return Object.assign(i,{cB:(...m)=>n(a(m[0]),m[1],m[2]),cE:(...m)=>n(l(m[0]),m[1],m[2]),cM:(...m)=>n(s(m[0]),m[1],m[2]),cNotM:(...m)=>n(c(m[0]),m[1],m[2])}),i}var lh=Rk;function Te(e,t){return e+(t==="default"?"":t.replace(/^[a-z]/,o=>o.toUpperCase()))}Te("abc","def");var Ik="n",Ai=`.${Ik}-`,Ak="__",Mk="--",sh=ah(),ch=lh({blockPrefix:Ai,elementPrefix:Ak,modifierPrefix:Mk});sh.use(ch);var{c:J,find:gI}=sh,{cB:U,cE:ee,cM:be,cNotM:oo}=ch;function gl(e){return J(({props:{bPrefix:t}})=>`${t||Ai}modal, ${t||Ai}drawer`,[e])}function xl(e){return J(({props:{bPrefix:t}})=>`${t||Ai}popover:not(${t||Ai}tooltip)`,[e])}function vl(e){let t=X(!!e.value);if(t.value)return Dr(t);let o=Ze(e,r=>{r&&(t.value=!0,o())});return Dr(t)}function $k(e){let t=F(e),o=X(t.value);return Ze(t,r=>{o.value=r}),typeof e=="function"?o:{__v_isRef:!0,get value(){return o.value},set value(r){e.set(r)}}}var Qe=$k;var dh=typeof window<"u";var Hn,Mi,Lk=()=>{var e,t;Hn=dh?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,Mi=!1,Hn!==void 0?Hn.then(()=>{Mi=!0}):Mi=!0};Lk();function bl(e){if(Mi)return;let t=!1;tt(()=>{Mi||Hn?.then(()=>{t||e()})}),Pt(()=>{t=!0})}var zk={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function Bk(e,t,o){if(e==="mousemoveoutside"){let r=n=>{t.contains(n.target)||o(n)};return{mousemove:r,touchstart:r}}else if(e==="clickoutside"){let r=!1,n=a=>{r=!t.contains(a.target)},i=a=>{r&&(t.contains(a.target)||o(a))};return{mousedown:n,mouseup:i,touchstart:n,touchend:i}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function uh(e,t,o){let r=zk[e],n=r.get(t);n===void 0&&r.set(t,n=new WeakMap);let i=n.get(o);return i===void 0&&n.set(o,i=Bk(e,t,o)),i}function fh(e,t,o,r){if(e==="mousemoveoutside"||e==="clickoutside"){let n=uh(e,t,o);return Object.keys(n).forEach(i=>{gt(i,document,n[i],r)}),!0}return!1}function ph(e,t,o,r){if(e==="mousemoveoutside"||e==="clickoutside"){let n=uh(e,t,o);return Object.keys(n).forEach(i=>{ht(i,document,n[i],r)}),!0}return!1}function Hk(){if(typeof window>"u")return{on:()=>{},off:()=>{}};let e=new WeakMap,t=new WeakMap;function o(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function n(x,k,A){let E=x[k];return x[k]=function(){return A.apply(x,arguments),E.apply(x,arguments)},x}function i(x,k){x[k]=Event.prototype[k]}let a=new WeakMap,l=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function s(){var x;return(x=a.get(this))!==null&&x!==void 0?x:null}function c(x,k){l!==void 0&&Object.defineProperty(x,"currentTarget",{configurable:!0,enumerable:!0,get:k??l.get})}let d={bubble:{},capture:{}},u={};function p(){let x=function(k){let{type:A,eventPhase:E,target:z,bubbles:M}=k;if(E===2)return;let se=E===1?"capture":"bubble",ye=z,Ie=[];for(;ye===null&&(ye=window),Ie.push(ye),ye!==window;)ye=ye.parentNode||null;let fe=d.capture[A],ce=d.bubble[A];if(n(k,"stopPropagation",o),n(k,"stopImmediatePropagation",r),c(k,s),se==="capture"){if(fe===void 0)return;for(let we=Ie.length-1;we>=0&&!e.has(k);--we){let Me=Ie[we],Be=fe.get(Me);if(Be!==void 0){a.set(k,Me);for(let Le of Be){if(t.has(k))break;Le(k)}}if(we===0&&!M&&ce!==void 0){let Le=ce.get(Me);if(Le!==void 0)for(let Je of Le){if(t.has(k))break;Je(k)}}}}else if(se==="bubble"){if(ce===void 0)return;for(let we=0;weM(k))};return x.displayName="evtdUnifiedWindowEventHandler",x}let m=p(),y=f();function w(x,k){let A=d[x];return A[k]===void 0&&(A[k]=new Map,window.addEventListener(k,m,x==="capture")),A[k]}function g(x){return u[x]===void 0&&(u[x]=new Set,window.addEventListener(x,y)),u[x]}function O(x,k){let A=x.get(k);return A===void 0&&x.set(k,A=new Set),A}function j(x,k,A,E){let z=d[k][A];if(z!==void 0){let M=z.get(x);if(M!==void 0&&M.has(E))return!0}return!1}function S(x,k){let A=u[x];return!!(A!==void 0&&A.has(k))}function v(x,k,A,E){let z;if(typeof E=="object"&&E.once===!0?z=fe=>{D(x,k,z,E),A(fe)}:z=A,fh(x,k,z,E))return;let se=E===!0||typeof E=="object"&&E.capture===!0?"capture":"bubble",ye=w(se,x),Ie=O(ye,k);if(Ie.has(z)||Ie.add(z),k===window){let fe=g(x);fe.has(z)||fe.add(z)}}function D(x,k,A,E){if(ph(x,k,A,E))return;let M=E===!0||typeof E=="object"&&E.capture===!0,se=M?"capture":"bubble",ye=w(se,x),Ie=O(ye,k);if(k===window&&!j(k,M?"bubble":"capture",x,A)&&S(x,A)){let ce=u[x];ce.delete(A),ce.size===0&&(window.removeEventListener(x,y),u[x]=void 0)}Ie.has(A)&&Ie.delete(A),Ie.size===0&&ye.delete(k),ye.size===0&&(window.removeEventListener(x,m,se==="capture"),d[se][x]=void 0)}return{on:v,off:D}}var{on:gt,off:ht}=Hk();function Xt(e,t){return Ze(e,o=>{o!==void 0&&(t.value=o)}),F(()=>e.value===void 0?t.value:e.value)}function Mr(){let e=X(!1);return tt(()=>{e.value=!0}),Dr(e)}var Vk=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function yl(){return Vk}var UI="n-internal-select-menu",mh="n-internal-select-menu-body";var hh="n-modal-body",GI="n-modal";var gh="n-drawer-body",XI="n-drawer";var xh="n-popover-body";var vh="__disabled__";function mn(e){let t=ke(hh,null),o=ke(gh,null),r=ke(xh,null),n=ke(mh,null),i=X();if(typeof document<"u"){i.value=document.fullscreenElement;let a=()=>{i.value=document.fullscreenElement};tt(()=>{gt("fullscreenchange",document,a)}),Pt(()=>{ht("fullscreenchange",document,a)})}return Qe(()=>{var a;let{to:l}=e;return l!==void 0?l===!1?vh:l===!0?i.value||"body":l:t?.value?(a=t.value.$el)!==null&&a!==void 0?a:t.value:o?.value?o.value:r?.value?r.value:n?.value?n.value:l??(i.value||"body")})}mn.tdkey=vh;mn.propTo={type:[String,Object,Boolean],default:void 0};function $i(e,t,o="default"){let r=t[o];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${o}] is empty.`);return r()}function zc(e,t=!0,o=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&o.push(Mn(String(r)));return}if(Array.isArray(r)){zc(r,t,o);return}if(r.type===St){if(r.children===null)return;Array.isArray(r.children)&&zc(r.children,t,o)}else r.type!==Kt&&o.push(r)}}),o}function Bc(e,t,o="default"){let r=t[o];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${o}] is empty.`);let n=zc(r());if(n.length===1)return n[0];throw new Error(`[vueuc/${e}]: slot[${o}] should have exactly one child.`)}var $r=null;function bh(){if($r===null&&($r=document.getElementById("v-binder-view-measurer"),$r===null)){$r=document.createElement("div"),$r.id="v-binder-view-measurer";let{style:e}=$r;e.position="fixed",e.left="0",e.right="0",e.top="0",e.bottom="0",e.pointerEvents="none",e.visibility="hidden",document.body.appendChild($r)}return $r.getBoundingClientRect()}function yh(e,t){let o=bh();return{top:t,left:e,height:0,width:0,right:o.width-e,bottom:o.height-t}}function Cl(e){let t=e.getBoundingClientRect(),o=bh();return{left:t.left-o.left,top:t.top-o.top,bottom:o.height+o.top-t.bottom,right:o.width+o.left-t.right,width:t.width,height:t.height}}function Fk(e){return e.nodeType===9?null:e.parentNode}function Hc(e){if(e===null)return null;let t=Fk(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){let{overflow:o,overflowX:r,overflowY:n}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(o+n+r))return t}return Hc(t)}var jk=ue({name:"Binder",props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){var t;Yt("VBinder",(t=Uo())===null||t===void 0?void 0:t.proxy);let o=ke("VBinder",null),r=X(null),n=g=>{r.value=g,o&&e.syncTargetWithParent&&o.setTargetRef(g)},i=[],a=()=>{let g=r.value;for(;g=Hc(g),g!==null;)i.push(g);for(let O of i)gt("scroll",O,u,!0)},l=()=>{for(let g of i)ht("scroll",g,u,!0);i=[]},s=new Set,c=g=>{s.size===0&&a(),s.has(g)||s.add(g)},d=g=>{s.has(g)&&s.delete(g),s.size===0&&l()},u=()=>{Pi(p)},p=()=>{s.forEach(g=>g())},f=new Set,m=g=>{f.size===0&>("resize",window,w),f.has(g)||f.add(g)},y=g=>{f.has(g)&&f.delete(g),f.size===0&&ht("resize",window,w)},w=()=>{f.forEach(g=>g())};return Pt(()=>{ht("resize",window,w),l()}),{targetRef:r,setTargetRef:n,addScrollListener:c,removeScrollListener:d,addResizeListener:m,removeResizeListener:y}},render(){return $i("binder",this.$slots)}}),wl=jk;var kl=ue({name:"Target",setup(){let{setTargetRef:e,syncTarget:t}=ke("VBinder");return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){let{syncTarget:e,setTargetDirective:t}=this;return e?tl(Bc("follower",this.$slots),[[t]]):Bc("follower",this.$slots)}});function Ch(e,t){console.error(`[vdirs/${e}]: ${t}`)}var Vc=class{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,o){let{elementZIndex:r}=this;if(o!==void 0){t.style.zIndex=`${o}`,r.delete(t);return}let{nextZIndex:n}=this;r.has(t)&&r.get(t)+1===this.nextZIndex||(t.style.zIndex=`${n}`,r.set(t,n),this.nextZIndex=n+1,this.squashState())}unregister(t,o){let{elementZIndex:r}=this;r.has(t)?r.delete(t):o===void 0&&Ch("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){let{elementCount:t}=this;t||(this.nextZIndex=2e3),this.nextZIndex-t>2500&&this.rearrange()}rearrange(){let t=Array.from(this.elementZIndex.entries());t.sort((o,r)=>o[1]-r[1]),this.nextZIndex=2e3,t.forEach(o=>{let r=o[0],n=this.nextZIndex++;`${n}`!==r.style.zIndex&&(r.style.zIndex=`${n}`)})}},Sl=new Vc;var Vn="@@ziContext",Wk={mounted(e,t){let{value:o={}}=t,{zIndex:r,enabled:n}=o;e[Vn]={enabled:!!n,initialized:!1},n&&(Sl.ensureZIndex(e,r),e[Vn].initialized=!0)},updated(e,t){let{value:o={}}=t,{zIndex:r,enabled:n}=o,i=e[Vn].enabled;n&&!i&&(Sl.ensureZIndex(e,r),e[Vn].initialized=!0),e[Vn].enabled=!!n},unmounted(e,t){if(!e[Vn].initialized)return;let{value:o={}}=t,{zIndex:r}=o;Sl.unregister(e,r)}},Fc=Wk;var wh=Symbol("@css-render/vue3-ssr");function Kk(e,t){return``}function Uk(e,t){let o=ke(wh,null);if(o===null){console.error("[css-render/vue3-ssr]: no ssr context found.");return}let{styles:r,ids:n}=o;n.has(e)||r!==null&&(n.add(e),r.push(Kk(e,t)))}function bo(){let e=ke(wh,null);if(e!==null)return{adapter:Uk,context:e}}function _l(e,t){console.error(`[vueuc/${e}]: ${t}`)}var{c:Zo}=hl();var Li="vueuc-style";function kh(e){return e&-e}var zi=class{constructor(t,o){this.l=t,this.min=o;let r=new Array(t+1);for(let n=0;nn)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let i=t*r;for(;t>0;)i+=o[t],t-=kh(t);return i}getBound(t){let o=0,r=this.l;for(;r>o;){let n=Math.floor((o+r)/2),i=this.sum(n);if(i>t){r=n;continue}else if(i{let{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?$i("lazy-teleport",this.$slots):b(ym,{disabled:this.disabled,to:this.mergedTo},$i("lazy-teleport",this.$slots)):null}});var El={top:"bottom",bottom:"top",left:"right",right:"left"},_h={start:"end",center:"center",end:"start"},jc={top:"height",bottom:"height",left:"width",right:"width"},qk={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},Gk={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},Yk={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},Eh={top:!0,bottom:!1,left:!0,right:!1},Dh={top:"end",bottom:"start",left:"end",right:"start"};function Th(e,t,o,r,n,i){if(!n||i)return{placement:e,top:0,left:0};let[a,l]=e.split("-"),s=l??"center",c={top:0,left:0},d=(f,m,y)=>{let w=0,g=0,O=o[f]-t[m]-t[f];return O>0&&r&&(y?g=Eh[m]?O:-O:w=Eh[m]?O:-O),{left:w,top:g}},u=a==="left"||a==="right";if(s!=="center"){let f=Yk[e],m=El[f],y=jc[f];if(o[y]>t[y]){if(t[f]+t[y]t[m]&&(s=_h[l])}else{let f=a==="bottom"||a==="top"?"left":"top",m=El[f],y=jc[f],w=(o[y]-t[y])/2;(t[f]t[m]?(s=Dh[f],c=d(y,f,u)):(s=Dh[m],c=d(y,m,u)))}let p=a;return t[a] *",{pointerEvents:"all"})])]),Dl=ue({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){let t=ke("VBinder"),o=Qe(()=>e.enabled!==void 0?e.enabled:e.show),r=X(null),n=X(null),i=()=>{let{syncTrigger:p}=e;p.includes("scroll")&&t.addScrollListener(s),p.includes("resize")&&t.addResizeListener(s)},a=()=>{t.removeScrollListener(s),t.removeResizeListener(s)};tt(()=>{o.value&&(s(),i())});let l=bo();Xk.mount({id:"vueuc/binder",head:!0,anchorMetaName:Li,ssr:l}),Pt(()=>{a()}),bl(()=>{o.value&&s()});let s=()=>{if(!o.value)return;let p=r.value;if(p===null)return;let f=t.targetRef,{x:m,y,overlap:w}=e,g=m!==void 0&&y!==void 0?yh(m,y):Cl(f);p.style.setProperty("--v-target-width",`${Math.round(g.width)}px`),p.style.setProperty("--v-target-height",`${Math.round(g.height)}px`);let{width:O,minWidth:j,placement:S,internalShift:v,flip:D}=e;p.setAttribute("v-placement",S),w?p.setAttribute("v-overlap",""):p.removeAttribute("v-overlap");let{style:x}=p;O==="target"?x.width=`${g.width}px`:O!==void 0?x.width=O:x.width="",j==="target"?x.minWidth=`${g.width}px`:j!==void 0?x.minWidth=j:x.minWidth="";let k=Cl(p),A=Cl(n.value),{left:E,top:z,placement:M}=Th(S,g,k,v,D,w),se=Oh(M,w),{left:ye,top:Ie,transform:fe}=Ph(M,A,g,z,E,w);p.setAttribute("v-placement",M),p.style.setProperty("--v-offset-left",`${Math.round(E)}px`),p.style.setProperty("--v-offset-top",`${Math.round(z)}px`),p.style.transform=`translateX(${ye}) translateY(${Ie}) ${fe}`,p.style.transformOrigin=se};Ze(o,p=>{p?(i(),c()):a()});let c=()=>{Bt().then(s).catch(p=>console.error(p))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(p=>{Ze(Re(e,p),s)}),["teleportDisabled"].forEach(p=>{Ze(Re(e,p),c)}),Ze(Re(e,"syncTrigger"),p=>{p.includes("resize")?t.addResizeListener(s):t.removeResizeListener(s),p.includes("scroll")?t.addScrollListener(s):t.removeScrollListener(s)});let d=Mr(),u=Qe(()=>{let{to:p}=e;if(p!==void 0)return p;d.value});return{VBinder:t,mergedEnabled:o,offsetContainerRef:n,followerRef:r,mergedTo:u,syncPosition:s}},render(){return b(Sh,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;let o=b("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[b("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?tl(o,[[Fc,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):o}})}});var yo=[];var Nh=function(){return yo.some(function(e){return e.activeTargets.length>0})};var Rh=function(){return yo.some(function(e){return e.skippedTargets.length>0})};var Ih="ResizeObserver loop completed with undelivered notifications.",Ah=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Ih}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Ih),window.dispatchEvent(e)};var hn;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(hn||(hn={}));var Oo=function(e){return Object.freeze(e)};var Wc=function(){function e(t,o){this.inlineSize=t,this.blockSize=o,Oo(this)}return e}();var Kc=function(){function e(t,o,r,n){return this.x=t,this.y=o,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Oo(this)}return e.prototype.toJSON=function(){var t=this,o=t.x,r=t.y,n=t.top,i=t.right,a=t.bottom,l=t.left,s=t.width,c=t.height;return{x:o,y:r,top:n,right:i,bottom:a,left:l,width:s,height:c}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}();var Bi=function(e){return e instanceof SVGElement&&"getBBox"in e},Tl=function(e){if(Bi(e)){var t=e.getBBox(),o=t.width,r=t.height;return!o&&!r}var n=e,i=n.offsetWidth,a=n.offsetHeight;return!(i||a||e.getClientRects().length)},Uc=function(e){var t,o;if(e instanceof Element)return!0;var r=(o=(t=e)===null||t===void 0?void 0:t.ownerDocument)===null||o===void 0?void 0:o.defaultView;return!!(r&&e instanceof r.Element)},Mh=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1};var gn=typeof window<"u"?window:{};var Ol=new WeakMap,$h=/auto|scroll/,Zk=/^tb|vertical/,Qk=/msie|trident/i.test(gn.navigator&&gn.navigator.userAgent),Qo=function(e){return parseFloat(e||"0")},Fn=function(e,t,o){return e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=!1),new Wc((o?t:e)||0,(o?e:t)||0)},Lh=Oo({devicePixelContentBoxSize:Fn(),borderBoxSize:Fn(),contentBoxSize:Fn(),contentRect:new Kc(0,0,0,0)}),qc=function(e,t){if(t===void 0&&(t=!1),Ol.has(e)&&!t)return Ol.get(e);if(Tl(e))return Ol.set(e,Lh),Lh;var o=getComputedStyle(e),r=Bi(e)&&e.ownerSVGElement&&e.getBBox(),n=!Qk&&o.boxSizing==="border-box",i=Zk.test(o.writingMode||""),a=!r&&$h.test(o.overflowY||""),l=!r&&$h.test(o.overflowX||""),s=r?0:Qo(o.paddingTop),c=r?0:Qo(o.paddingRight),d=r?0:Qo(o.paddingBottom),u=r?0:Qo(o.paddingLeft),p=r?0:Qo(o.borderTopWidth),f=r?0:Qo(o.borderRightWidth),m=r?0:Qo(o.borderBottomWidth),y=r?0:Qo(o.borderLeftWidth),w=u+c,g=s+d,O=y+f,j=p+m,S=l?e.offsetHeight-j-e.clientHeight:0,v=a?e.offsetWidth-O-e.clientWidth:0,D=n?w+O:0,x=n?g+j:0,k=r?r.width:Qo(o.width)-D-v,A=r?r.height:Qo(o.height)-x-S,E=k+w+v+O,z=A+g+S+j,M=Oo({devicePixelContentBoxSize:Fn(Math.round(k*devicePixelRatio),Math.round(A*devicePixelRatio),i),borderBoxSize:Fn(E,z,i),contentBoxSize:Fn(k,A,i),contentRect:new Kc(u,s,k,A)});return Ol.set(e,M),M},Pl=function(e,t,o){var r=qc(e,o),n=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case hn.DEVICE_PIXEL_CONTENT_BOX:return a;case hn.BORDER_BOX:return n;default:return i}};var Gc=function(){function e(t){var o=qc(t);this.target=t,this.contentRect=o.contentRect,this.borderBoxSize=Oo([o.borderBoxSize]),this.contentBoxSize=Oo([o.contentBoxSize]),this.devicePixelContentBoxSize=Oo([o.devicePixelContentBoxSize])}return e}();var Nl=function(e){if(Tl(e))return 1/0;for(var t=0,o=e.parentNode;o;)t+=1,o=o.parentNode;return t};var zh=function(){var e=1/0,t=[];yo.forEach(function(a){if(a.activeTargets.length!==0){var l=[];a.activeTargets.forEach(function(c){var d=new Gc(c.target),u=Nl(c.target);l.push(d),c.lastReportedSize=Pl(c.target,c.observedBox),ue?o.activeTargets.push(n):o.skippedTargets.push(n))})})};var Bh=function(){var e=0;for(Yc(e);Nh();)e=zh(),Yc(e);return Rh()&&Ah(),e>0};var Xc,Hh=[],Jk=function(){return Hh.splice(0).forEach(function(e){return e()})},Vh=function(e){if(!Xc){var t=0,o=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Jk()}).observe(o,r),Xc=function(){o.textContent=""+(t?t--:t++)}}Hh.push(e),Xc()};var Fh=function(e){Vh(function(){requestAnimationFrame(e)})};var Rl=0,eS=function(){return!!Rl},tS=250,oS={attributes:!0,characterData:!0,childList:!0,subtree:!0},jh=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Wh=function(e){return e===void 0&&(e=0),Date.now()+e},Zc=!1,rS=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var o=this;if(t===void 0&&(t=tS),!Zc){Zc=!0;var r=Wh(t);Fh(function(){var n=!1;try{n=Bh()}finally{if(Zc=!1,t=r-Wh(),!eS())return;n?o.run(1e3):t>0?o.run(t):o.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,o=function(){return t.observer&&t.observer.observe(document.body,oS)};document.body?o():gn.addEventListener("DOMContentLoaded",o)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),jh.forEach(function(o){return gn.addEventListener(o,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),jh.forEach(function(o){return gn.removeEventListener(o,t.listener,!0)}),this.stopped=!0)},e}(),Il=new rS,Qc=function(e){!Rl&&e>0&&Il.start(),Rl+=e,!Rl&&Il.stop()};var nS=function(e){return!Bi(e)&&!Mh(e)&&getComputedStyle(e).display==="inline"},Kh=function(){function e(t,o){this.target=t,this.observedBox=o||hn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Pl(this.target,this.observedBox,!0);return nS(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}();var Uh=function(){function e(t,o){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=o}return e}();var Al=new WeakMap,qh=function(e,t){for(var o=0;o=0&&(i&&yo.splice(yo.indexOf(r),1),r.observationTargets.splice(n,1),Qc(-1))},e.disconnect=function(t){var o=this,r=Al.get(t);r.observationTargets.slice().forEach(function(n){return o.unobserve(t,n.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}();var Jc=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Hi.connect(this,t)}return e.prototype.observe=function(t,o){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Uc(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Hi.observe(this,t,o)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Uc(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Hi.unobserve(this,t)},e.prototype.disconnect=function(){Hi.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();var ed=class{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new Jc(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(let o of t){let r=this.elHandlersMap.get(o.target);r!==void 0&&r(o)}}registerHandler(t,o){this.elHandlersMap.set(t,o),this.observer.observe(t)}unregisterHandler(t){this.elHandlersMap.has(t)&&(this.elHandlersMap.delete(t),this.observer.unobserve(t))}},Ml=new ed;var Po=ue({name:"ResizeObserver",props:{onResize:Function},setup(e){return{registered:!1,handleResize(t){let{onResize:o}=e;o!==void 0&&o(t)}}},mounted(){let e=this.$el;if(e===void 0){_l("resize-observer","$el does not exist.");return}if(e.nextElementSibling!==e.nextSibling&&e.nodeType===3&&e.nodeValue!==""){_l("resize-observer","$el can not be observed (it may be a text node).");return}e.nextElementSibling!==null&&(Ml.registerHandler(e.nextElementSibling,this.handleResize),this.registered=!0)},beforeUnmount(){this.registered&&Ml.unregisterHandler(this.$el.nextElementSibling)},render(){return An(this.$slots,"default")}});var iS=Zo(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[Zo("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[Zo("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),Vi=ue({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){let t=bo();iS.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:Li,ssr:t}),tt(()=>{let{defaultScrollIndex:v,defaultScrollKey:D}=e;v!=null?u({index:v}):D!=null&&u({key:D})}),xc(()=>{u({top:s.value})});let o=F(()=>{let v=new Map,{keyField:D}=e;return e.items.forEach((x,k)=>{v.set(x[D],k)}),v}),r=X(null),n=X(void 0),i=new Map,a=F(()=>{let{items:v,itemSize:D,keyField:x}=e,k=new zi(v.length,D);return v.forEach((A,E)=>{let z=A[x],M=i.get(z);M!==void 0&&k.add(E,M)}),k}),l=X(0),s=X(0),c=Qe(()=>Math.max(a.value.getBound(s.value-sl(e.paddingTop))-1,0)),d=F(()=>{let{value:v}=n;if(v===void 0)return[];let{items:D,itemSize:x}=e,k=c.value,A=Math.min(k+Math.ceil(v/x+1),D.length-1),E=[];for(let z=k;z<=A;++z)E.push(D[z]);return E}),u=v=>{let{left:D,top:x,index:k,key:A,position:E,behavior:z,debounce:M=!0}=v;if(D!==void 0||x!==void 0)f(D,x,z);else if(k!==void 0)p(k,z,M);else if(A!==void 0){let se=o.value.get(A);se!==void 0&&p(se,z,M)}else E==="bottom"?f(0,Number.MAX_SAFE_INTEGER,z):E==="top"&&f(0,0,z)};function p(v,D,x){let{value:k}=a,A=k.sum(v)+sl(e.paddingTop);if(!x)r.value.scrollTo({left:0,top:A,behavior:D});else{let{scrollTop:E,offsetHeight:z}=r.value;if(A>E){let M=k.get(v);A+M<=E+z||r.value.scrollTo({left:0,top:A+M-z,behavior:D})}else r.value.scrollTo({left:0,top:A,behavior:D})}g=v}function f(v,D,x){r.value.scrollTo({left:v,top:D,behavior:x})}function m(v,D){var x,k,A,E;if(e.ignoreItemResize||S(D.target))return;let{value:z}=a,M=o.value.get(v),se=z.get(M),ye=(A=(k=(x=D.borderBoxSize)===null||x===void 0?void 0:x[0])===null||k===void 0?void 0:k.blockSize)!==null&&A!==void 0?A:D.contentRect.height;if(ye===se)return;ye-e.itemSize===0?i.delete(v):i.set(v,ye-e.itemSize);let fe=ye-se;fe!==0&&(O!==void 0&&M<=O&&((E=r.value)===null||E===void 0||E.scrollBy(0,fe)),z.add(M,fe),l.value++)}function y(v){Pi(j);let{onScroll:D}=e;D!==void 0&&D(v)}function w(v){if(S(v.target)||v.contentRect.height===n.value)return;n.value=v.contentRect.height;let{onResize:D}=e;D!==void 0&&D(v)}let g,O;function j(){let{value:v}=r;v!=null&&(O=g??c.value,g=void 0,s.value=r.value.scrollTop)}function S(v){let D=v;for(;D!==null;){if(D.style.display==="none")return!0;D=D.parentElement}return!1}return{listHeight:n,listStyle:{overflow:"auto"},keyToIndex:o,itemsStyle:F(()=>{let{itemResizable:v}=e,D=Ir(a.value.sum());return l.value,[e.itemsStyle,{boxSizing:"content-box",height:v?"":D,minHeight:v?D:"",paddingTop:Ir(e.paddingTop),paddingBottom:Ir(e.paddingBottom)}]}),visibleItemsStyle:F(()=>(l.value,{transform:`translateY(${Ir(a.value.sum(c.value))})`})),viewportItems:d,listElRef:r,itemsElRef:X(null),scrollTo:u,handleListResize:w,handleListScroll:y,handleItemResize:m}},render(){let{itemResizable:e,keyField:t,keyToIndex:o,visibleItemsTag:r}=this;return b(Po,{onResize:this.handleListResize},{default:()=>{var n,i;return b("div",Ti(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.onWheel,ref:"listElRef"}),[this.items.length!==0?b("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[b(r,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>this.viewportItems.map(a=>{let l=a[t],s=o.get(l),c=this.$slots.default({item:a,index:s})[0];return e?b(Po,{key:l,onResize:d=>this.handleItemResize(l,d)},{default:()=>c}):(c.key=l,c)})})]):(i=(n=this.$slots).empty)===null||i===void 0?void 0:i.call(n)])}})}});var Gh="n-form-item";function Co(e,{defaultSize:t="medium",mergedSize:o,mergedDisabled:r}={}){let n=ke(Gh,null);Yt(Gh,null);let i=F(o?()=>o(n):()=>{let{size:s}=e;if(s)return s;if(n){let{mergedSize:c}=n;if(c.value!==void 0)return c.value}return t}),a=F(r?()=>r(n):()=>{let{disabled:s}=e;return s!==void 0?s:n?n.disabled.value:!1}),l=F(()=>{let{status:s}=e;return s||n?.mergedValidationStatus.value});return Pt(()=>{n&&n.restoreValidation()}),{mergedSizeRef:i,mergedDisabledRef:a,mergedStatusRef:l,nTriggerFormBlur(){n&&n.handleContentBlur()},nTriggerFormChange(){n&&n.handleContentChange()},nTriggerFormFocus(){n&&n.handleContentFocus()},nTriggerFormInput(){n&&n.handleContentInput()}}}var lS=typeof global=="object"&&global&&global.Object===Object&&global,$l=lS;var sS=typeof self=="object"&&self&&self.Object===Object&&self,cS=$l||sS||Function("return this")(),wo=cS;var dS=wo.Symbol,fr=dS;var Yh=Object.prototype,uS=Yh.hasOwnProperty,fS=Yh.toString,Fi=fr?fr.toStringTag:void 0;function pS(e){var t=uS.call(e,Fi),o=e[Fi];try{e[Fi]=void 0;var r=!0}catch{}var n=fS.call(e);return r&&(t?e[Fi]=o:delete e[Fi]),n}var Xh=pS;var mS=Object.prototype,hS=mS.toString;function gS(e){return hS.call(e)}var Zh=gS;var xS="[object Null]",vS="[object Undefined]",Qh=fr?fr.toStringTag:void 0;function bS(e){return e==null?e===void 0?vS:xS:Qh&&Qh in Object(e)?Xh(e):Zh(e)}var Jo=bS;function yS(e){return e!=null&&typeof e=="object"}var ko=yS;var CS="[object Symbol]";function wS(e){return typeof e=="symbol"||ko(e)&&Jo(e)==CS}var Jh=wS;function kS(e,t){for(var o=-1,r=e==null?0:e.length,n=Array(r);++o0){if(++t>=ZS)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var mg=e1;function t1(e){return function(){return e}}var hg=t1;var o1=function(){try{var e=Wn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Kn=o1;var r1=Kn?function(e,t){return Kn(e,"toString",{configurable:!0,enumerable:!1,value:hg(t),writable:!0})}:Ll,gg=r1;var n1=mg(gg),xg=n1;var i1=9007199254740991,a1=/^(?:0|[1-9]\d*)$/;function l1(e,t){var o=typeof e;return t=t??i1,!!t&&(o=="number"||o!="symbol"&&a1.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=g1}var Hl=x1;function v1(e){return e!=null&&Hl(e.length)&&!jn(e)}var qn=v1;function b1(e,t,o){if(!ro(o))return!1;var r=typeof t;return(r=="number"?qn(o)&&Bl(t,o.length):r=="string"&&t in o)?Lr(o[t],e):!1}var kg=b1;function y1(e){return wg(function(t,o){var r=-1,n=o.length,i=n>1?o[n-1]:void 0,a=n>2?o[2]:void 0;for(i=e.length>3&&typeof i=="function"?(n--,i):void 0,a&&kg(o[0],o[1],a)&&(i=n<3?void 0:i,n=1),t=Object(t);++r-1}var qg=M_;function $_(e,t){var o=this.__data__,r=zr(o,e);return r<0?(++this.size,o.push([e,t])):o[r][1]=t,this}var Gg=$_;function Yn(e){var t=-1,o=e==null?0:e.length;for(this.clear();++tn?0:n+t),o=o>n?n:o,o<0&&(o+=n),n=t>o?0:o-t>>>0,t>>>=0;for(var i=Array(n);++r=r?e:ix(e,t,o)}var ax=eE;var tE="\\ud800-\\udfff",oE="\\u0300-\\u036f",rE="\\ufe20-\\ufe2f",nE="\\u20d0-\\u20ff",iE=oE+rE+nE,aE="\\ufe0e\\ufe0f",lE="\\u200d",sE=RegExp("["+lE+tE+iE+aE+"]");function cE(e){return sE.test(e)}var ql=cE;function dE(e){return e.split("")}var lx=dE;var sx="\\ud800-\\udfff",uE="\\u0300-\\u036f",fE="\\ufe20-\\ufe2f",pE="\\u20d0-\\u20ff",mE=uE+fE+pE,hE="\\ufe0e\\ufe0f",gE="["+sx+"]",id="["+mE+"]",ad="\\ud83c[\\udffb-\\udfff]",xE="(?:"+id+"|"+ad+")",cx="[^"+sx+"]",dx="(?:\\ud83c[\\udde6-\\uddff]){2}",ux="[\\ud800-\\udbff][\\udc00-\\udfff]",vE="\\u200d",fx=xE+"?",px="["+hE+"]?",bE="(?:"+vE+"(?:"+[cx,dx,ux].join("|")+")"+px+fx+")*",yE=px+fx+bE,CE="(?:"+[cx+id+"?",id,dx,ux,gE].join("|")+")",wE=RegExp(ad+"(?="+ad+")|"+CE+yE,"g");function kE(e){return e.match(wE)||[]}var mx=kE;function SE(e){return ql(e)?mx(e):lx(e)}var hx=SE;function _E(e){return function(t){t=ox(t);var o=ql(t)?hx(t):void 0,r=o?o[0]:t.charAt(0),n=o?ax(o,1).join(""):t.slice(1);return r[e]()+n}}var gx=_E;var EE=gx("toUpperCase"),ld=EE;function DE(){this.__data__=new Br,this.size=0}var xx=DE;function TE(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o}var vx=TE;function OE(e){return this.__data__.get(e)}var bx=OE;function PE(e){return this.__data__.has(e)}var yx=PE;var NE=200;function RE(e,t){var o=this.__data__;if(o instanceof Br){var r=o.__data__;if(!Kl||r.length`}function Kk(e,t){let o=we(wh,null);if(o===null){console.error("[css-render/vue3-ssr]: no ssr context found.");return}let{styles:r,ids:n}=o;n.has(e)||r!==null&&(n.add(e),r.push(Wk(e,t)))}function bo(){let e=we(wh,null);if(e!==null)return{adapter:Kk,context:e}}function El(e,t){console.error(`[vueuc/${e}]: ${t}`)}var{c:Zo}=gl();var Li="vueuc-style";function kh(e){return e&-e}var zi=class{constructor(t,o){this.l=t,this.min=o;let r=new Array(t+1);for(let n=0;nn)throw new Error("[FinweckTree.sum]: `i` is larger than length.");let i=t*r;for(;t>0;)i+=o[t],t-=kh(t);return i}getBound(t){let o=0,r=this.l;for(;r>o;){let n=Math.floor((o+r)/2),i=this.sum(n);if(i>t){r=n;continue}else if(i{let{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?$i("lazy-teleport",this.$slots):v(ym,{disabled:this.disabled,to:this.mergedTo},$i("lazy-teleport",this.$slots)):null}});var Dl={top:"bottom",bottom:"top",left:"right",right:"left"},_h={start:"end",center:"center",end:"start"},jc={top:"height",bottom:"height",left:"width",right:"width"},Uk={"bottom-start":"top left",bottom:"top center","bottom-end":"top right","top-start":"bottom left",top:"bottom center","top-end":"bottom right","right-start":"top left",right:"center left","right-end":"bottom left","left-start":"top right",left:"center right","left-end":"bottom right"},qk={"bottom-start":"bottom left",bottom:"bottom center","bottom-end":"bottom right","top-start":"top left",top:"top center","top-end":"top right","right-start":"top right",right:"center right","right-end":"bottom right","left-start":"top left",left:"center left","left-end":"bottom left"},Gk={"bottom-start":"right","bottom-end":"left","top-start":"right","top-end":"left","right-start":"bottom","right-end":"top","left-start":"bottom","left-end":"top"},Eh={top:!0,bottom:!1,left:!0,right:!1},Dh={top:"end",bottom:"start",left:"end",right:"start"};function Th(e,t,o,r,n,i){if(!n||i)return{placement:e,top:0,left:0};let[a,l]=e.split("-"),s=l??"center",c={top:0,left:0},d=(f,m,y)=>{let _=0,h=0,O=o[f]-t[m]-t[f];return O>0&&r&&(y?h=Eh[m]?O:-O:_=Eh[m]?O:-O),{left:_,top:h}},u=a==="left"||a==="right";if(s!=="center"){let f=Gk[e],m=Dl[f],y=jc[f];if(o[y]>t[y]){if(t[f]+t[y]t[m]&&(s=_h[l])}else{let f=a==="bottom"||a==="top"?"left":"top",m=Dl[f],y=jc[f],_=(o[y]-t[y])/2;(t[f]<_||t[m]<_)&&(t[f]>t[m]?(s=Dh[f],c=d(y,f,u)):(s=Dh[m],c=d(y,m,u)))}let p=a;return t[a] *",{pointerEvents:"all"})])]),Tl=de({name:"Follower",inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:"bottom"},syncTrigger:{type:Array,default:["resize","scroll"]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){let t=we("VBinder"),o=et(()=>e.enabled!==void 0?e.enabled:e.show),r=Z(null),n=Z(null),i=()=>{let{syncTrigger:p}=e;p.includes("scroll")&&t.addScrollListener(s),p.includes("resize")&&t.addResizeListener(s)},a=()=>{t.removeScrollListener(s),t.removeResizeListener(s)};Je(()=>{o.value&&(s(),i())});let l=bo();Yk.mount({id:"vueuc/binder",head:!0,anchorMetaName:Li,ssr:l}),Pt(()=>{a()}),yl(()=>{o.value&&s()});let s=()=>{if(!o.value)return;let p=r.value;if(p===null)return;let f=t.targetRef,{x:m,y,overlap:_}=e,h=m!==void 0&&y!==void 0?yh(m,y):wl(f);p.style.setProperty("--v-target-width",`${Math.round(h.width)}px`),p.style.setProperty("--v-target-height",`${Math.round(h.height)}px`);let{width:O,minWidth:W,placement:w,internalShift:b,flip:D}=e;p.setAttribute("v-placement",w),_?p.setAttribute("v-overlap",""):p.removeAttribute("v-overlap");let{style:x}=p;O==="target"?x.width=`${h.width}px`:O!==void 0?x.width=O:x.width="",W==="target"?x.minWidth=`${h.width}px`:W!==void 0?x.minWidth=W:x.minWidth="";let k=wl(p),A=wl(n.value),{left:E,top:H,placement:M}=Th(w,h,k,b,D,_),le=Oh(M,_),{left:ye,top:Pe,transform:fe}=Nh(M,A,h,H,E,_);p.setAttribute("v-placement",M),p.style.setProperty("--v-offset-left",`${Math.round(E)}px`),p.style.setProperty("--v-offset-top",`${Math.round(H)}px`),p.style.transform=`translateX(${ye}) translateY(${Pe}) ${fe}`,p.style.transformOrigin=le};Qe(o,p=>{p?(i(),c()):a()});let c=()=>{Bt().then(s).catch(p=>console.error(p))};["placement","x","y","internalShift","flip","width","overlap","minWidth"].forEach(p=>{Qe(Ae(e,p),s)}),["teleportDisabled"].forEach(p=>{Qe(Ae(e,p),c)}),Qe(Ae(e,"syncTrigger"),p=>{p.includes("resize")?t.addResizeListener(s):t.removeResizeListener(s),p.includes("scroll")?t.addScrollListener(s):t.removeScrollListener(s)});let d=Mr(),u=et(()=>{let{to:p}=e;if(p!==void 0)return p;d.value});return{VBinder:t,mergedEnabled:o,offsetContainerRef:n,followerRef:r,mergedTo:u,syncPosition:s}},render(){return v(Sh,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var e,t;let o=v("div",{class:["v-binder-follower-container",this.containerClass],ref:"offsetContainerRef"},[v("div",{class:"v-binder-follower-content",ref:"followerRef"},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))]);return this.zindexable?ol(o,[[Fc,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):o}})}});var yo=[];var Ph=function(){return yo.some(function(e){return e.activeTargets.length>0})};var Rh=function(){return yo.some(function(e){return e.skippedTargets.length>0})};var Ih="ResizeObserver loop completed with undelivered notifications.",Ah=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Ih}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Ih),window.dispatchEvent(e)};var hn;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(hn||(hn={}));var Oo=function(e){return Object.freeze(e)};var Wc=function(){function e(t,o){this.inlineSize=t,this.blockSize=o,Oo(this)}return e}();var Kc=function(){function e(t,o,r,n){return this.x=t,this.y=o,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Oo(this)}return e.prototype.toJSON=function(){var t=this,o=t.x,r=t.y,n=t.top,i=t.right,a=t.bottom,l=t.left,s=t.width,c=t.height;return{x:o,y:r,top:n,right:i,bottom:a,left:l,width:s,height:c}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}();var Bi=function(e){return e instanceof SVGElement&&"getBBox"in e},Ol=function(e){if(Bi(e)){var t=e.getBBox(),o=t.width,r=t.height;return!o&&!r}var n=e,i=n.offsetWidth,a=n.offsetHeight;return!(i||a||e.getClientRects().length)},Uc=function(e){var t,o;if(e instanceof Element)return!0;var r=(o=(t=e)===null||t===void 0?void 0:t.ownerDocument)===null||o===void 0?void 0:o.defaultView;return!!(r&&e instanceof r.Element)},Mh=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1};var gn=typeof window<"u"?window:{};var Nl=new WeakMap,$h=/auto|scroll/,Xk=/^tb|vertical/,Zk=/msie|trident/i.test(gn.navigator&&gn.navigator.userAgent),Qo=function(e){return parseFloat(e||"0")},Fn=function(e,t,o){return e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=!1),new Wc((o?t:e)||0,(o?e:t)||0)},Lh=Oo({devicePixelContentBoxSize:Fn(),borderBoxSize:Fn(),contentBoxSize:Fn(),contentRect:new Kc(0,0,0,0)}),qc=function(e,t){if(t===void 0&&(t=!1),Nl.has(e)&&!t)return Nl.get(e);if(Ol(e))return Nl.set(e,Lh),Lh;var o=getComputedStyle(e),r=Bi(e)&&e.ownerSVGElement&&e.getBBox(),n=!Zk&&o.boxSizing==="border-box",i=Xk.test(o.writingMode||""),a=!r&&$h.test(o.overflowY||""),l=!r&&$h.test(o.overflowX||""),s=r?0:Qo(o.paddingTop),c=r?0:Qo(o.paddingRight),d=r?0:Qo(o.paddingBottom),u=r?0:Qo(o.paddingLeft),p=r?0:Qo(o.borderTopWidth),f=r?0:Qo(o.borderRightWidth),m=r?0:Qo(o.borderBottomWidth),y=r?0:Qo(o.borderLeftWidth),_=u+c,h=s+d,O=y+f,W=p+m,w=l?e.offsetHeight-W-e.clientHeight:0,b=a?e.offsetWidth-O-e.clientWidth:0,D=n?_+O:0,x=n?h+W:0,k=r?r.width:Qo(o.width)-D-b,A=r?r.height:Qo(o.height)-x-w,E=k+_+b+O,H=A+h+w+W,M=Oo({devicePixelContentBoxSize:Fn(Math.round(k*devicePixelRatio),Math.round(A*devicePixelRatio),i),borderBoxSize:Fn(E,H,i),contentBoxSize:Fn(k,A,i),contentRect:new Kc(u,s,k,A)});return Nl.set(e,M),M},Pl=function(e,t,o){var r=qc(e,o),n=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case hn.DEVICE_PIXEL_CONTENT_BOX:return a;case hn.BORDER_BOX:return n;default:return i}};var Gc=function(){function e(t){var o=qc(t);this.target=t,this.contentRect=o.contentRect,this.borderBoxSize=Oo([o.borderBoxSize]),this.contentBoxSize=Oo([o.contentBoxSize]),this.devicePixelContentBoxSize=Oo([o.devicePixelContentBoxSize])}return e}();var Rl=function(e){if(Ol(e))return 1/0;for(var t=0,o=e.parentNode;o;)t+=1,o=o.parentNode;return t};var zh=function(){var e=1/0,t=[];yo.forEach(function(a){if(a.activeTargets.length!==0){var l=[];a.activeTargets.forEach(function(c){var d=new Gc(c.target),u=Rl(c.target);l.push(d),c.lastReportedSize=Pl(c.target,c.observedBox),ue?o.activeTargets.push(n):o.skippedTargets.push(n))})})};var Bh=function(){var e=0;for(Yc(e);Ph();)e=zh(),Yc(e);return Rh()&&Ah(),e>0};var Xc,Hh=[],Qk=function(){return Hh.splice(0).forEach(function(e){return e()})},Vh=function(e){if(!Xc){var t=0,o=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Qk()}).observe(o,r),Xc=function(){o.textContent=""+(t?t--:t++)}}Hh.push(e),Xc()};var Fh=function(e){Vh(function(){requestAnimationFrame(e)})};var Il=0,Jk=function(){return!!Il},eS=250,tS={attributes:!0,characterData:!0,childList:!0,subtree:!0},jh=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Wh=function(e){return e===void 0&&(e=0),Date.now()+e},Zc=!1,oS=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var o=this;if(t===void 0&&(t=eS),!Zc){Zc=!0;var r=Wh(t);Fh(function(){var n=!1;try{n=Bh()}finally{if(Zc=!1,t=r-Wh(),!Jk())return;n?o.run(1e3):t>0?o.run(t):o.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,o=function(){return t.observer&&t.observer.observe(document.body,tS)};document.body?o():gn.addEventListener("DOMContentLoaded",o)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),jh.forEach(function(o){return gn.addEventListener(o,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),jh.forEach(function(o){return gn.removeEventListener(o,t.listener,!0)}),this.stopped=!0)},e}(),Al=new oS,Qc=function(e){!Il&&e>0&&Al.start(),Il+=e,!Il&&Al.stop()};var rS=function(e){return!Bi(e)&&!Mh(e)&&getComputedStyle(e).display==="inline"},Kh=function(){function e(t,o){this.target=t,this.observedBox=o||hn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Pl(this.target,this.observedBox,!0);return rS(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}();var Uh=function(){function e(t,o){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=o}return e}();var Ml=new WeakMap,qh=function(e,t){for(var o=0;o=0&&(i&&yo.splice(yo.indexOf(r),1),r.observationTargets.splice(n,1),Qc(-1))},e.disconnect=function(t){var o=this,r=Ml.get(t);r.observationTargets.slice().forEach(function(n){return o.unobserve(t,n.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}();var Jc=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Hi.connect(this,t)}return e.prototype.observe=function(t,o){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Uc(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Hi.observe(this,t,o)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Uc(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Hi.unobserve(this,t)},e.prototype.disconnect=function(){Hi.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();var ed=class{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new Jc(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(let o of t){let r=this.elHandlersMap.get(o.target);r!==void 0&&r(o)}}registerHandler(t,o){this.elHandlersMap.set(t,o),this.observer.observe(t)}unregisterHandler(t){this.elHandlersMap.has(t)&&(this.elHandlersMap.delete(t),this.observer.unobserve(t))}},$l=new ed;var No=de({name:"ResizeObserver",props:{onResize:Function},setup(e){return{registered:!1,handleResize(t){let{onResize:o}=e;o!==void 0&&o(t)}}},mounted(){let e=this.$el;if(e===void 0){El("resize-observer","$el does not exist.");return}if(e.nextElementSibling!==e.nextSibling&&e.nodeType===3&&e.nodeValue!==""){El("resize-observer","$el can not be observed (it may be a text node).");return}e.nextElementSibling!==null&&($l.registerHandler(e.nextElementSibling,this.handleResize),this.registered=!0)},beforeUnmount(){this.registered&&$l.unregisterHandler(this.$el.nextElementSibling)},render(){return An(this.$slots,"default")}});var nS=Zo(".v-vl",{maxHeight:"inherit",height:"100%",overflow:"auto",minWidth:"1px"},[Zo("&:not(.v-vl--show-scrollbar)",{scrollbarWidth:"none"},[Zo("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",{width:0,height:0,display:"none"})])]),Vi=de({name:"VirtualList",inheritAttrs:!1,props:{showScrollbar:{type:Boolean,default:!0},items:{type:Array,default:()=>[]},itemSize:{type:Number,required:!0},itemResizable:Boolean,itemsStyle:[String,Object],visibleItemsTag:{type:[String,Object],default:"div"},visibleItemsProps:Object,ignoreItemResize:Boolean,onScroll:Function,onWheel:Function,onResize:Function,defaultScrollKey:[Number,String],defaultScrollIndex:Number,keyField:{type:String,default:"key"},paddingTop:{type:[Number,String],default:0},paddingBottom:{type:[Number,String],default:0}},setup(e){let t=bo();nS.mount({id:"vueuc/virtual-list",head:!0,anchorMetaName:Li,ssr:t}),Je(()=>{let{defaultScrollIndex:b,defaultScrollKey:D}=e;b!=null?u({index:b}):D!=null&&u({key:D})}),xc(()=>{u({top:s.value})});let o=j(()=>{let b=new Map,{keyField:D}=e;return e.items.forEach((x,k)=>{b.set(x[D],k)}),b}),r=Z(null),n=Z(void 0),i=new Map,a=j(()=>{let{items:b,itemSize:D,keyField:x}=e,k=new zi(b.length,D);return b.forEach((A,E)=>{let H=A[x],M=i.get(H);M!==void 0&&k.add(E,M)}),k}),l=Z(0),s=Z(0),c=et(()=>Math.max(a.value.getBound(s.value-cl(e.paddingTop))-1,0)),d=j(()=>{let{value:b}=n;if(b===void 0)return[];let{items:D,itemSize:x}=e,k=c.value,A=Math.min(k+Math.ceil(b/x+1),D.length-1),E=[];for(let H=k;H<=A;++H)E.push(D[H]);return E}),u=b=>{let{left:D,top:x,index:k,key:A,position:E,behavior:H,debounce:M=!0}=b;if(D!==void 0||x!==void 0)f(D,x,H);else if(k!==void 0)p(k,H,M);else if(A!==void 0){let le=o.value.get(A);le!==void 0&&p(le,H,M)}else E==="bottom"?f(0,Number.MAX_SAFE_INTEGER,H):E==="top"&&f(0,0,H)};function p(b,D,x){let{value:k}=a,A=k.sum(b)+cl(e.paddingTop);if(!x)r.value.scrollTo({left:0,top:A,behavior:D});else{let{scrollTop:E,offsetHeight:H}=r.value;if(A>E){let M=k.get(b);A+M<=E+H||r.value.scrollTo({left:0,top:A+M-H,behavior:D})}else r.value.scrollTo({left:0,top:A,behavior:D})}h=b}function f(b,D,x){r.value.scrollTo({left:b,top:D,behavior:x})}function m(b,D){var x,k,A,E;if(e.ignoreItemResize||w(D.target))return;let{value:H}=a,M=o.value.get(b),le=H.get(M),ye=(A=(k=(x=D.borderBoxSize)===null||x===void 0?void 0:x[0])===null||k===void 0?void 0:k.blockSize)!==null&&A!==void 0?A:D.contentRect.height;if(ye===le)return;ye-e.itemSize===0?i.delete(b):i.set(b,ye-e.itemSize);let fe=ye-le;fe!==0&&(O!==void 0&&M<=O&&((E=r.value)===null||E===void 0||E.scrollBy(0,fe)),H.add(M,fe),l.value++)}function y(b){Ni(W);let{onScroll:D}=e;D!==void 0&&D(b)}function _(b){if(w(b.target)||b.contentRect.height===n.value)return;n.value=b.contentRect.height;let{onResize:D}=e;D!==void 0&&D(b)}let h,O;function W(){let{value:b}=r;b!=null&&(O=h??c.value,h=void 0,s.value=r.value.scrollTop)}function w(b){let D=b;for(;D!==null;){if(D.style.display==="none")return!0;D=D.parentElement}return!1}return{listHeight:n,listStyle:{overflow:"auto"},keyToIndex:o,itemsStyle:j(()=>{let{itemResizable:b}=e,D=Ir(a.value.sum());return l.value,[e.itemsStyle,{boxSizing:"content-box",height:b?"":D,minHeight:b?D:"",paddingTop:Ir(e.paddingTop),paddingBottom:Ir(e.paddingBottom)}]}),visibleItemsStyle:j(()=>(l.value,{transform:`translateY(${Ir(a.value.sum(c.value))})`})),viewportItems:d,listElRef:r,itemsElRef:Z(null),scrollTo:u,handleListResize:_,handleListScroll:y,handleItemResize:m}},render(){let{itemResizable:e,keyField:t,keyToIndex:o,visibleItemsTag:r}=this;return v(No,{onResize:this.handleListResize},{default:()=>{var n,i;return v("div",Ti(this.$attrs,{class:["v-vl",this.showScrollbar&&"v-vl--show-scrollbar"],onScroll:this.handleListScroll,onWheel:this.onWheel,ref:"listElRef"}),[this.items.length!==0?v("div",{ref:"itemsElRef",class:"v-vl-items",style:this.itemsStyle},[v(r,Object.assign({class:"v-vl-visible-items",style:this.visibleItemsStyle},this.visibleItemsProps),{default:()=>this.viewportItems.map(a=>{let l=a[t],s=o.get(l),c=this.$slots.default({item:a,index:s})[0];return e?v(No,{key:l,onResize:d=>this.handleItemResize(l,d)},{default:()=>c}):(c.key=l,c)})})]):(i=(n=this.$slots).empty)===null||i===void 0?void 0:i.call(n)])}})}});var Gh="n-form-item";function Co(e,{defaultSize:t="medium",mergedSize:o,mergedDisabled:r}={}){let n=we(Gh,null);Xt(Gh,null);let i=j(o?()=>o(n):()=>{let{size:s}=e;if(s)return s;if(n){let{mergedSize:c}=n;if(c.value!==void 0)return c.value}return t}),a=j(r?()=>r(n):()=>{let{disabled:s}=e;return s!==void 0?s:n?n.disabled.value:!1}),l=j(()=>{let{status:s}=e;return s||n?.mergedValidationStatus.value});return Pt(()=>{n&&n.restoreValidation()}),{mergedSizeRef:i,mergedDisabledRef:a,mergedStatusRef:l,nTriggerFormBlur(){n&&n.handleContentBlur()},nTriggerFormChange(){n&&n.handleContentChange()},nTriggerFormFocus(){n&&n.handleContentFocus()},nTriggerFormInput(){n&&n.handleContentInput()}}}var aS=typeof global=="object"&&global&&global.Object===Object&&global,Ll=aS;var lS=typeof self=="object"&&self&&self.Object===Object&&self,sS=Ll||lS||Function("return this")(),wo=sS;var cS=wo.Symbol,fr=cS;var Yh=Object.prototype,dS=Yh.hasOwnProperty,uS=Yh.toString,Fi=fr?fr.toStringTag:void 0;function fS(e){var t=dS.call(e,Fi),o=e[Fi];try{e[Fi]=void 0;var r=!0}catch{}var n=uS.call(e);return r&&(t?e[Fi]=o:delete e[Fi]),n}var Xh=fS;var pS=Object.prototype,mS=pS.toString;function hS(e){return mS.call(e)}var Zh=hS;var gS="[object Null]",xS="[object Undefined]",Qh=fr?fr.toStringTag:void 0;function vS(e){return e==null?e===void 0?xS:gS:Qh&&Qh in Object(e)?Xh(e):Zh(e)}var Jo=vS;function bS(e){return e!=null&&typeof e=="object"}var ko=bS;var yS="[object Symbol]";function CS(e){return typeof e=="symbol"||ko(e)&&Jo(e)==yS}var Jh=CS;function wS(e,t){for(var o=-1,r=e==null?0:e.length,n=Array(r);++o0){if(++t>=XS)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var mg=JS;function e1(e){return function(){return e}}var hg=e1;var t1=function(){try{var e=Wn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Kn=t1;var o1=Kn?function(e,t){return Kn(e,"toString",{configurable:!0,enumerable:!1,value:hg(t),writable:!0})}:zl,gg=o1;var r1=mg(gg),xg=r1;var n1=9007199254740991,i1=/^(?:0|[1-9]\d*)$/;function a1(e,t){var o=typeof e;return t=t??n1,!!t&&(o=="number"||o!="symbol"&&i1.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=h1}var Vl=g1;function x1(e){return e!=null&&Vl(e.length)&&!jn(e)}var qn=x1;function v1(e,t,o){if(!no(o))return!1;var r=typeof t;return(r=="number"?qn(o)&&Hl(t,o.length):r=="string"&&t in o)?Lr(o[t],e):!1}var kg=v1;function b1(e){return wg(function(t,o){var r=-1,n=o.length,i=n>1?o[n-1]:void 0,a=n>2?o[2]:void 0;for(i=e.length>3&&typeof i=="function"?(n--,i):void 0,a&&kg(o[0],o[1],a)&&(i=n<3?void 0:i,n=1),t=Object(t);++r-1}var qg=A_;function M_(e,t){var o=this.__data__,r=zr(o,e);return r<0?(++this.size,o.push([e,t])):o[r][1]=t,this}var Gg=M_;function Yn(e){var t=-1,o=e==null?0:e.length;for(this.clear();++tn?0:n+t),o=o>n?n:o,o<0&&(o+=n),n=t>o?0:o-t>>>0,t>>>=0;for(var i=Array(n);++r=r?e:ix(e,t,o)}var ax=J_;var eE="\\ud800-\\udfff",tE="\\u0300-\\u036f",oE="\\ufe20-\\ufe2f",rE="\\u20d0-\\u20ff",nE=tE+oE+rE,iE="\\ufe0e\\ufe0f",aE="\\u200d",lE=RegExp("["+aE+eE+nE+iE+"]");function sE(e){return lE.test(e)}var Gl=sE;function cE(e){return e.split("")}var lx=cE;var sx="\\ud800-\\udfff",dE="\\u0300-\\u036f",uE="\\ufe20-\\ufe2f",fE="\\u20d0-\\u20ff",pE=dE+uE+fE,mE="\\ufe0e\\ufe0f",hE="["+sx+"]",id="["+pE+"]",ad="\\ud83c[\\udffb-\\udfff]",gE="(?:"+id+"|"+ad+")",cx="[^"+sx+"]",dx="(?:\\ud83c[\\udde6-\\uddff]){2}",ux="[\\ud800-\\udbff][\\udc00-\\udfff]",xE="\\u200d",fx=gE+"?",px="["+mE+"]?",vE="(?:"+xE+"(?:"+[cx,dx,ux].join("|")+")"+px+fx+")*",bE=px+fx+vE,yE="(?:"+[cx+id+"?",id,dx,ux,hE].join("|")+")",CE=RegExp(ad+"(?="+ad+")|"+yE+bE,"g");function wE(e){return e.match(CE)||[]}var mx=wE;function kE(e){return Gl(e)?mx(e):lx(e)}var hx=kE;function SE(e){return function(t){t=ox(t);var o=Gl(t)?hx(t):void 0,r=o?o[0]:t.charAt(0),n=o?ax(o,1).join(""):t.slice(1);return r[e]()+n}}var gx=SE;var _E=gx("toUpperCase"),ld=_E;function EE(){this.__data__=new Br,this.size=0}var xx=EE;function DE(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o}var vx=DE;function TE(e){return this.__data__.get(e)}var bx=TE;function OE(e){return this.__data__.has(e)}var yx=OE;var NE=200;function PE(e,t){var o=this.__data__;if(o instanceof Br){var r=o.__data__;if(!Ul||r.length{let d=i?.value;o.mount({id:d===void 0?t:d+t,head:!0,props:{bPrefix:d?`.${d}-`:void 0},anchorMetaName:Fr,ssr:a}),Gl.mount({id:"n-global",head:!0,anchorMetaName:Fr,ssr:a})};a?c():cr(c)}let l=ke(Zt,null);return F(()=>{var c;let{theme:{common:d,self:u,peers:p={}}={},themeOverrides:f={},builtinThemeOverrides:m={}}=n,{common:y,peers:w}=f,{common:g=void 0,[e]:{common:O=void 0,self:j=void 0,peers:S={}}={}}=l?.mergedThemeRef.value||{},{common:v=void 0,[e]:D={}}=l?.mergedThemeOverridesRef.value||{},{common:x,peers:k={}}=D,A=Vr({},d||O||g||r.common,v,x,y),E=Vr((c=u||j||r.self)===null||c===void 0?void 0:c(A),m,D,f);return{common:A,self:E,peers:Vr({},r.peers,S,p),peerOverrides:Vr({},k,w)}})}zx.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};var Ct=zx;var Yl="n";function Mt(e={},t={defaultBordered:!0}){let o=ke(Zt,null);return{inlineThemeDisabled:o?.inlineThemeDisabled,mergedRtlRef:o?.mergedRtlRef,mergedComponentPropsRef:o?.mergedComponentPropsRef,mergedBreakpointsRef:o?.mergedBreakpointsRef,mergedBorderedRef:F(()=>{var r,n;let{bordered:i}=e;return i!==void 0?i:(n=(r=o?.mergedBorderedRef.value)!==null&&r!==void 0?r:t.defaultBordered)!==null&&n!==void 0?n:!0}),mergedClsPrefixRef:F(()=>o?.mergedClsPrefixRef.value||Yl),namespaceRef:F(()=>o?.mergedNamespaceRef.value)}}var XE={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},Transfer:{sourceTitle:"Source",targetTitle:"Target"},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (\u2190)",tipNext:"Next picture (\u2192)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipClose:"Close (Esc)"}},cd=XE;var av=Uy(iv()),qD={name:"en-US",locale:av.default},ud=qD;function Qn(e){let{mergedLocaleRef:t,mergedDateLocaleRef:o}=ke(Zt,null)||{},r=F(()=>{var i,a;return(a=(i=t?.value)===null||i===void 0?void 0:i[e])!==null&&a!==void 0?a:cd[e]});return{dateLocaleRef:F(()=>{var i;return(i=o?.value)!==null&&i!==void 0?i:ud}),localeRef:r}}function er(e,t,o){if(!t)return;let r=bo(),n=()=>{let i=o?.value;t.mount({id:i===void 0?e:i+e,head:!0,anchorMetaName:Fr,props:{bPrefix:i?`.${i}-`:void 0},ssr:r}),Gl.mount({id:"n-global",head:!0,anchorMetaName:Fr,ssr:r})};r?n():cr(n)}function qt(e,t,o,r){var n;o||dl("useThemeClass","cssVarsRef is not passed");let i=(n=ke(Zt,null))===null||n===void 0?void 0:n.mergedThemeHashRef,a=X(""),l=bo(),s,c=`__${e}`,d=()=>{let u=c,p=t?t.value:void 0,f=i?.value;f&&(u+="-"+f),p&&(u+="-"+p);let{themeOverrides:m,builtinThemeOverrides:y}=r;m&&(u+="-"+so(JSON.stringify(m))),y&&(u+="-"+so(JSON.stringify(y))),a.value=u,s=()=>{let w=o.value,g="";for(let O in w)g+=`${O}: ${w[O]};`;J(`.${u}`,g).mount({id:u,ssr:l}),s=void 0}};return At(()=>{d()}),{themeClass:a,onRender:()=>{s?.()}}}function lv(e,t){return ue({name:ld(e),setup(){var o;let r=(o=ke(Zt,null))===null||o===void 0?void 0:o.mergedIconsRef;return()=>{var n;let i=(n=r?.value)===null||n===void 0?void 0:n[e];return i?i():t}}})}var fd=ue({name:"Eye",render(){return b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},b("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),b("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}});var pd=ue({name:"EyeOff",render(){return b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},b("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),b("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),b("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),b("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),b("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}});var md=ue({name:"Empty",render(){return b("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),b("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}});var hd=ue({name:"Switcher",render(){return b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},b("path",{d:"M12 8l10 8l-10 8z"}))}});var gd=ue({name:"ChevronDown",render(){return b("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}});var xd=lv("clear",b("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},b("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},b("g",{fill:"currentColor","fill-rule":"nonzero"},b("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"})))));var So=ue({name:"BaseIconSwitchTransition",setup(e,{slots:t}){let o=Mr();return()=>b(To,{name:"icon-switch-transition",appear:o.value},t)}});var Jn=ue({name:"FadeInExpandTransition",props:{appear:Boolean,group:Boolean,mode:String,onLeave:Function,onAfterLeave:Function,onAfterEnter:Function,width:Boolean,reverse:Boolean},setup(e,{slots:t}){function o(l){e.width?l.style.maxWidth=`${l.offsetWidth}px`:l.style.maxHeight=`${l.offsetHeight}px`,l.offsetWidth}function r(l){e.width?l.style.maxWidth="0":l.style.maxHeight="0",l.offsetWidth;let{onLeave:s}=e;s&&s()}function n(l){e.width?l.style.maxWidth="":l.style.maxHeight="";let{onAfterLeave:s}=e;s&&s()}function i(l){if(l.style.transition="none",e.width){let s=l.offsetWidth;l.style.maxWidth="0",l.offsetWidth,l.style.transition="",l.style.maxWidth=`${s}px`}else if(e.reverse)l.style.maxHeight=`${l.offsetHeight}px`,l.offsetHeight,l.style.transition="",l.style.maxHeight="0";else{let s=l.offsetHeight;l.style.maxHeight="0",l.offsetWidth,l.style.transition="",l.style.maxHeight=`${s}px`}l.offsetWidth}function a(l){var s;e.width?l.style.maxWidth="":e.reverse||(l.style.maxHeight=""),(s=e.onAfterEnter)===null||s===void 0||s.call(e)}return()=>{let l=e.group?Um:To;return b(l,{name:e.width?"fade-in-width-expand-transition":"fade-in-height-expand-transition",mode:e.mode,appear:e.appear,onEnter:i,onAfterEnter:a,onBeforeLeave:o,onLeave:r,onAfterLeave:n},t)}}});var sv=U("base-icon",` + `)]);var Qt="n-config-provider";var Fr="naive-ui-style";function zx(e,t,o,r,n,i){let a=bo();if(o){let c=()=>{let d=i?.value;o.mount({id:d===void 0?t:d+t,head:!0,props:{bPrefix:d?`.${d}-`:void 0},anchorMetaName:Fr,ssr:a}),Yl.mount({id:"n-global",head:!0,anchorMetaName:Fr,ssr:a})};a?c():cr(c)}let l=we(Qt,null);return j(()=>{var c;let{theme:{common:d,self:u,peers:p={}}={},themeOverrides:f={},builtinThemeOverrides:m={}}=n,{common:y,peers:_}=f,{common:h=void 0,[e]:{common:O=void 0,self:W=void 0,peers:w={}}={}}=l?.mergedThemeRef.value||{},{common:b=void 0,[e]:D={}}=l?.mergedThemeOverridesRef.value||{},{common:x,peers:k={}}=D,A=Vr({},d||O||h||r.common,b,x,y),E=Vr((c=u||W||r.self)===null||c===void 0?void 0:c(A),m,D,f);return{common:A,self:E,peers:Vr({},r.peers,w,p),peerOverrides:Vr({},k,_)}})}zx.props={theme:Object,themeOverrides:Object,builtinThemeOverrides:Object};var wt=zx;var Xl="n";function At(e={},t={defaultBordered:!0}){let o=we(Qt,null);return{inlineThemeDisabled:o?.inlineThemeDisabled,mergedRtlRef:o?.mergedRtlRef,mergedComponentPropsRef:o?.mergedComponentPropsRef,mergedBreakpointsRef:o?.mergedBreakpointsRef,mergedBorderedRef:j(()=>{var r,n;let{bordered:i}=e;return i!==void 0?i:(n=(r=o?.mergedBorderedRef.value)!==null&&r!==void 0?r:t.defaultBordered)!==null&&n!==void 0?n:!0}),mergedClsPrefixRef:j(()=>o?.mergedClsPrefixRef.value||Xl),namespaceRef:j(()=>o?.mergedNamespaceRef.value)}}var YE={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},Transfer:{sourceTitle:"Source",targetTitle:"Target"},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (\u2190)",tipNext:"Next picture (\u2192)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipClose:"Close (Esc)"}},cd=YE;var av=K0(iv()),UD={name:"en-US",locale:av.default},ud=UD;function Qn(e){let{mergedLocaleRef:t,mergedDateLocaleRef:o}=we(Qt,null)||{},r=j(()=>{var i,a;return(a=(i=t?.value)===null||i===void 0?void 0:i[e])!==null&&a!==void 0?a:cd[e]});return{dateLocaleRef:j(()=>{var i;return(i=o?.value)!==null&&i!==void 0?i:ud}),localeRef:r}}function er(e,t,o){if(!t)return;let r=bo(),n=()=>{let i=o?.value;t.mount({id:i===void 0?e:i+e,head:!0,anchorMetaName:Fr,props:{bPrefix:i?`.${i}-`:void 0},ssr:r}),Yl.mount({id:"n-global",head:!0,anchorMetaName:Fr,ssr:r})};r?n():cr(n)}function Gt(e,t,o,r){var n;o||ul("useThemeClass","cssVarsRef is not passed");let i=(n=we(Qt,null))===null||n===void 0?void 0:n.mergedThemeHashRef,a=Z(""),l=bo(),s,c=`__${e}`,d=()=>{let u=c,p=t?t.value:void 0,f=i?.value;f&&(u+="-"+f),p&&(u+="-"+p);let{themeOverrides:m,builtinThemeOverrides:y}=r;m&&(u+="-"+uo(JSON.stringify(m))),y&&(u+="-"+uo(JSON.stringify(y))),a.value=u,s=()=>{let _=o.value,h="";for(let O in _)h+=`${O}: ${_[O]};`;J(`.${u}`,h).mount({id:u,ssr:l}),s=void 0}};return Nt(()=>{d()}),{themeClass:a,onRender:()=>{s?.()}}}function lv(e,t){return de({name:ld(e),setup(){var o;let r=(o=we(Qt,null))===null||o===void 0?void 0:o.mergedIconsRef;return()=>{var n;let i=(n=r?.value)===null||n===void 0?void 0:n[e];return i?i():t}}})}var fd=de({name:"Eye",render(){return v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},v("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),v("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}});var pd=de({name:"EyeOff",render(){return v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},v("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),v("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),v("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),v("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),v("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}});var md=de({name:"Empty",render(){return v("svg",{viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v("path",{d:"M26 7.5C26 11.0899 23.0899 14 19.5 14C15.9101 14 13 11.0899 13 7.5C13 3.91015 15.9101 1 19.5 1C23.0899 1 26 3.91015 26 7.5ZM16.8536 4.14645C16.6583 3.95118 16.3417 3.95118 16.1464 4.14645C15.9512 4.34171 15.9512 4.65829 16.1464 4.85355L18.7929 7.5L16.1464 10.1464C15.9512 10.3417 15.9512 10.6583 16.1464 10.8536C16.3417 11.0488 16.6583 11.0488 16.8536 10.8536L19.5 8.20711L22.1464 10.8536C22.3417 11.0488 22.6583 11.0488 22.8536 10.8536C23.0488 10.6583 23.0488 10.3417 22.8536 10.1464L20.2071 7.5L22.8536 4.85355C23.0488 4.65829 23.0488 4.34171 22.8536 4.14645C22.6583 3.95118 22.3417 3.95118 22.1464 4.14645L19.5 6.79289L16.8536 4.14645Z",fill:"currentColor"}),v("path",{d:"M25 22.75V12.5991C24.5572 13.0765 24.053 13.4961 23.5 13.8454V16H17.5L17.3982 16.0068C17.0322 16.0565 16.75 16.3703 16.75 16.75C16.75 18.2688 15.5188 19.5 14 19.5C12.4812 19.5 11.25 18.2688 11.25 16.75L11.2432 16.6482C11.1935 16.2822 10.8797 16 10.5 16H4.5V7.25C4.5 6.2835 5.2835 5.5 6.25 5.5H12.2696C12.4146 4.97463 12.6153 4.47237 12.865 4H6.25C4.45507 4 3 5.45507 3 7.25V22.75C3 24.5449 4.45507 26 6.25 26H21.75C23.5449 26 25 24.5449 25 22.75ZM4.5 22.75V17.5H9.81597L9.85751 17.7041C10.2905 19.5919 11.9808 21 14 21L14.215 20.9947C16.2095 20.8953 17.842 19.4209 18.184 17.5H23.5V22.75C23.5 23.7165 22.7165 24.5 21.75 24.5H6.25C5.2835 24.5 4.5 23.7165 4.5 22.75Z",fill:"currentColor"}))}});var hd=de({name:"Switcher",render(){return v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},v("path",{d:"M12 8l10 8l-10 8z"}))}});var gd=de({name:"ChevronDown",render(){return v("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},v("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}});var xd=lv("clear",v("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},v("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},v("g",{fill:"currentColor","fill-rule":"nonzero"},v("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"})))));var So=de({name:"BaseIconSwitchTransition",setup(e,{slots:t}){let o=Mr();return()=>v(To,{name:"icon-switch-transition",appear:o.value},t)}});var Jn=de({name:"FadeInExpandTransition",props:{appear:Boolean,group:Boolean,mode:String,onLeave:Function,onAfterLeave:Function,onAfterEnter:Function,width:Boolean,reverse:Boolean},setup(e,{slots:t}){function o(l){e.width?l.style.maxWidth=`${l.offsetWidth}px`:l.style.maxHeight=`${l.offsetHeight}px`,l.offsetWidth}function r(l){e.width?l.style.maxWidth="0":l.style.maxHeight="0",l.offsetWidth;let{onLeave:s}=e;s&&s()}function n(l){e.width?l.style.maxWidth="":l.style.maxHeight="";let{onAfterLeave:s}=e;s&&s()}function i(l){if(l.style.transition="none",e.width){let s=l.offsetWidth;l.style.maxWidth="0",l.offsetWidth,l.style.transition="",l.style.maxWidth=`${s}px`}else if(e.reverse)l.style.maxHeight=`${l.offsetHeight}px`,l.offsetHeight,l.style.transition="",l.style.maxHeight="0";else{let s=l.offsetHeight;l.style.maxHeight="0",l.offsetWidth,l.style.transition="",l.style.maxHeight=`${s}px`}l.offsetWidth}function a(l){var s;e.width?l.style.maxWidth="":e.reverse||(l.style.maxHeight=""),(s=e.onAfterEnter)===null||s===void 0||s.call(e)}return()=>{let l=e.group?Um:To;return v(l,{name:e.width?"fade-in-width-expand-transition":"fade-in-height-expand-transition",mode:e.mode,appear:e.appear,onEnter:i,onAfterEnter:a,onBeforeLeave:o,onLeave:r,onAfterLeave:n},t)}}});var sv=U("base-icon",` height: 1em; width: 1em; line-height: 1em; @@ -39,7 +39,7 @@ ${t} position: relative; fill: currentColor; transform: translateZ(0); -`,[J("svg",{height:"1em",width:"1em"})]);var _o=ue({name:"BaseIcon",props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){er("-base-icon",sv,Re(e,"clsPrefix"))},render(){return b("i",{class:`${this.clsPrefix}-base-icon`,onClick:this.onClick,onMousedown:this.onMousedown,onMouseup:this.onMouseup,role:this.role,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,"aria-disabled":this.ariaDisabled},this.$slots)}});var{cubicBezierEaseInOut:GD}=Ut;function co({originalTransform:e="",left:t=0,top:o=0,transition:r=`all .3s ${GD} !important`}={}){return[J("&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to",{transform:e+" scale(0.75)",left:t,top:o,opacity:0}),J("&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from",{transform:`scale(1) ${e}`,left:t,top:o,opacity:1}),J("&.icon-switch-transition-enter-active, &.icon-switch-transition-leave-active",{transformOrigin:"center",position:"absolute",left:t,top:o,transition:r})]}var cv=J([J("@keyframes loading-container-rotate",` +`,[J("svg",{height:"1em",width:"1em"})]);var _o=de({name:"BaseIcon",props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){er("-base-icon",sv,Ae(e,"clsPrefix"))},render(){return v("i",{class:`${this.clsPrefix}-base-icon`,onClick:this.onClick,onMousedown:this.onMousedown,onMouseup:this.onMouseup,role:this.role,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,"aria-disabled":this.ariaDisabled},this.$slots)}});var{cubicBezierEaseInOut:qD}=qt;function fo({originalTransform:e="",left:t=0,top:o=0,transition:r=`all .3s ${qD} !important`}={}){return[J("&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to",{transform:e+" scale(0.75)",left:t,top:o,opacity:0}),J("&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from",{transform:`scale(1) ${e}`,left:t,top:o,opacity:1}),J("&.icon-switch-transition-enter-active, &.icon-switch-transition-leave-active",{transformOrigin:"center",position:"absolute",left:t,top:o,transition:r})]}var cv=J([J("@keyframes loading-container-rotate",` to { -webkit-transform: rotate(360deg); transform: rotate(360deg); @@ -112,7 +112,7 @@ ${t} position: absolute; width: 100%; height: 100%; - `,[co()]),ee("container",` + `,[fo()]),ee("container",` display: inline-flex; position: relative; direction: ltr; @@ -171,7 +171,7 @@ ${t} left: 50%; top: 50%; transform: translateX(-50%) translateY(-50%); - `,[co({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})])])]);var jr=ue({name:"BaseLoading",props:{clsPrefix:{type:String,required:!0},scale:{type:Number,default:1},radius:{type:Number,default:100},strokeWidth:{type:Number,default:28},stroke:{type:String,default:void 0},show:{type:Boolean,default:!0}},setup(e){er("-base-loading",cv,Re(e,"clsPrefix"))},render(){let{clsPrefix:e,radius:t,strokeWidth:o,stroke:r,scale:n}=this,i=t/n;return b("div",{class:`${e}-base-loading`,role:"img","aria-label":"loading"},b(So,null,{default:()=>this.show?b("div",{key:"icon",class:`${e}-base-loading__transition-wrapper`},b("div",{class:`${e}-base-loading__container`},b("div",{class:`${e}-base-loading__container-layer`},b("div",{class:`${e}-base-loading__container-layer-left`},b("svg",{class:`${e}-base-loading__svg`,viewBox:`0 0 ${2*i} ${2*i}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},b("circle",{fill:"none",stroke:"currentColor","stroke-width":o,"stroke-linecap":"round",cx:i,cy:i,r:t-o/2,"stroke-dasharray":4.91*t,"stroke-dashoffset":2.46*t}))),b("div",{class:`${e}-base-loading__container-layer-patch`},b("svg",{class:`${e}-base-loading__svg`,viewBox:`0 0 ${2*i} ${2*i}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},b("circle",{fill:"none",stroke:"currentColor","stroke-width":o,"stroke-linecap":"round",cx:i,cy:i,r:t-o/2,"stroke-dasharray":4.91*t,"stroke-dashoffset":2.46*t}))),b("div",{class:`${e}-base-loading__container-layer-right`},b("svg",{class:`${e}-base-loading__svg`,viewBox:`0 0 ${2*i} ${2*i}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},b("circle",{fill:"none",stroke:"currentColor","stroke-width":o,"stroke-linecap":"round",cx:i,cy:i,r:t-o/2,"stroke-dasharray":4.91*t,"stroke-dashoffset":2.46*t})))))):b("div",{key:"placeholder",class:`${e}-base-loading__placeholder`},this.$slots)}))}});function vd(e){return Array.isArray(e)?e:[e]}var es={STOP:"STOP"};function bd(e,t){let o=t(e);e.children!==void 0&&o!==es.STOP&&e.children.forEach(r=>bd(r,t))}function dv(e,t={}){let{preserveGroup:o=!1}=t,r=[],n=o?a=>{a.isLeaf||(r.push(a.key),i(a.children))}:a=>{a.isLeaf||(a.isGroup||r.push(a.key),i(a.children))};function i(a){a.forEach(n)}return i(e),r}function uv(e,t){let{isLeaf:o}=e;return o!==void 0?o:!t(e)}function fv(e){return e.children}function pv(e){return e.key}function mv(){return!1}function hv(e,t){let{isLeaf:o}=e;return!(o===!1&&!Array.isArray(t(e)))}function gv(e){return e.disabled===!0}function xv(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function ts(e){var t;return e==null?[]:Array.isArray(e)?e:(t=e.checkedKeys)!==null&&t!==void 0?t:[]}function os(e){var t;return e==null||Array.isArray(e)?[]:(t=e.indeterminateKeys)!==null&&t!==void 0?t:[]}function vv(e,t){let o=new Set(e);return t.forEach(r=>{o.has(r)||o.add(r)}),Array.from(o)}function bv(e,t){let o=new Set(e);return t.forEach(r=>{o.has(r)&&o.delete(r)}),Array.from(o)}function yv(e){return e?.type==="group"}function yd(e){let t=new Map;return e.forEach((o,r)=>{t.set(o.key,r)}),o=>{var r;return(r=t.get(o))!==null&&r!==void 0?r:null}}var Cd=class extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}};function YD(e,t,o,r){return rs(t.concat(e),o,r,!1)}function XD(e,t){let o=new Set;return e.forEach(r=>{let n=t.treeNodeMap.get(r);if(n!==void 0){let i=n.parent;for(;i!==null&&!(i.disabled||o.has(i.key));)o.add(i.key),i=i.parent}}),o}function ZD(e,t,o,r){let n=rs(t,o,r,!1),i=rs(e,o,r,!0),a=XD(e,o),l=[];return n.forEach(s=>{(i.has(s)||a.has(s))&&l.push(s)}),l.forEach(s=>n.delete(s)),n}function ns(e,t){let{checkedKeys:o,keysToCheck:r,keysToUncheck:n,indeterminateKeys:i,cascade:a,leafOnly:l,checkStrategy:s,allowNotLoaded:c}=e;if(!a)return r!==void 0?{checkedKeys:vv(o,r),indeterminateKeys:Array.from(i)}:n!==void 0?{checkedKeys:bv(o,n),indeterminateKeys:Array.from(i)}:{checkedKeys:Array.from(o),indeterminateKeys:Array.from(i)};let{levelTreeNodeMap:d}=t,u;n!==void 0?u=ZD(n,o,t,c):r!==void 0?u=YD(r,o,t,c):u=rs(o,t,c,!1);let p=s==="parent",f=s==="child"||l,m=u,y=new Set,w=Math.max.apply(null,Array.from(d.keys()));for(let g=w;g>=0;g-=1){let O=g===0,j=d.get(g);for(let S of j){if(S.isLeaf)continue;let{key:v,shallowLoaded:D}=S;if(f&&D&&S.children.forEach(E=>{!E.disabled&&!E.isLeaf&&E.shallowLoaded&&m.has(E.key)&&m.delete(E.key)}),S.disabled||!D)continue;let x=!0,k=!1,A=!0;for(let E of S.children){let z=E.key;if(!E.disabled){if(A&&(A=!1),m.has(z))k=!0;else if(y.has(z)){k=!0,x=!1;break}else if(x=!1,k)break}}x&&!A?(p&&S.children.forEach(E=>{!E.disabled&&m.has(E.key)&&m.delete(E.key)}),m.add(v)):k&&y.add(v),O&&f&&m.has(v)&&m.delete(v)}}return{checkedKeys:Array.from(m),indeterminateKeys:Array.from(y)}}function rs(e,t,o,r){let{treeNodeMap:n,getChildren:i}=t,a=new Set,l=new Set(e);return e.forEach(s=>{let c=n.get(s);c!==void 0&&bd(c,d=>{if(d.disabled)return es.STOP;let{key:u}=d;if(!a.has(u)&&(a.add(u),l.add(u),xv(d.rawNode,i))){if(r)return es.STOP;if(!o)throw new Cd}})}),l}function Cv(e,{includeGroup:t=!1,includeSelf:o=!0},r){var n;let i=r.treeNodeMap,a=e==null?null:(n=i.get(e))!==null&&n!==void 0?n:null,l={keyPath:[],treeNodePath:[],treeNode:a};if(a?.ignored)return l.treeNode=null,l;for(;a;)!a.ignored&&(t||!a.isGroup)&&l.treeNodePath.push(a),a=a.parent;return l.treeNodePath.reverse(),o||l.treeNodePath.pop(),l.keyPath=l.treeNodePath.map(s=>s.key),l}function kv(e){if(e.length===0)return null;let t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function QD(e,t){let o=e.siblings,r=o.length,{index:n}=e;return t?o[(n+1)%r]:n===o.length-1?null:o[n+1]}function wv(e,t,{loop:o=!1,includeDisabled:r=!1}={}){let n=t==="prev"?JD:QD,i={reverse:t==="prev"},a=!1,l=null;function s(c){if(c!==null){if(c===e){if(!a)a=!0;else if(!e.disabled&&!e.isGroup){l=e;return}}else if((!c.disabled||r)&&!c.ignored&&!c.isGroup){l=c;return}if(c.isGroup){let d=wd(c,i);d!==null?l=d:s(n(c,o))}else{let d=n(c,!1);if(d!==null)s(d);else{let u=eT(c);u?.isGroup?s(n(u,o)):o&&s(n(c,!0))}}}}return s(e),l}function JD(e,t){let o=e.siblings,r=o.length,{index:n}=e;return t?o[(n-1+r)%r]:n===0?null:o[n-1]}function eT(e){return e.parent}function wd(e,t={}){let{reverse:o=!1}=t,{children:r}=e;if(r){let{length:n}=r,i=o?n-1:0,a=o?-1:n,l=o?-1:1;for(let s=i;s!==a;s+=l){let c=r[s];if(!c.disabled&&!c.ignored)if(c.isGroup){let d=wd(c,t);if(d!==null)return d}else return c}}return null}var Sv={getChild(){return this.ignored?null:wd(this)},getParent(){let{parent:e}=this;return e?.isGroup?e.getParent():e},getNext(e={}){return wv(this,"next",e)},getPrev(e={}){return wv(this,"prev",e)}};function ei(e,t){let o=t?new Set(t):void 0,r=[];function n(i){i.forEach(a=>{r.push(a),!(a.isLeaf||!a.children||a.ignored)&&(a.isGroup||o===void 0||o.has(a.key))&&n(a.children)})}return n(e),r}function _v(e,t){let o=e.key;for(;t;){if(t.key===o)return!0;t=t.parent}return!1}function Ev(e,t,o,r,n,i=null,a=0){let l=[];return e.forEach((s,c)=>{var d;let u=Object.create(r);if(u.rawNode=s,u.siblings=l,u.level=a,u.index=c,u.isFirstChild=c===0,u.isLastChild=c+1===e.length,u.parent=i,!u.ignored){let p=n(s);Array.isArray(p)&&(u.children=Ev(p,t,o,r,n,u,a+1))}l.push(u),t.set(u.key,u),o.has(a)||o.set(a,[]),(d=o.get(a))===null||d===void 0||d.push(u)}),l}function kd(e,t={}){var o;let r=new Map,n=new Map,{getDisabled:i=gv,getIgnored:a=mv,getIsGroup:l=yv,getKey:s=pv}=t,c=(o=t.getChildren)!==null&&o!==void 0?o:fv,d=t.ignoreEmptyChildren?S=>{let v=c(S);return Array.isArray(v)?v.length?v:null:v}:c,u=Object.assign({get key(){return s(this.rawNode)},get disabled(){return i(this.rawNode)},get isGroup(){return l(this.rawNode)},get isLeaf(){return uv(this.rawNode,d)},get shallowLoaded(){return hv(this.rawNode,d)},get ignored(){return a(this.rawNode)},contains(S){return _v(this,S)}},Sv),p=Ev(e,r,n,u,d);function f(S){if(S==null)return null;let v=r.get(S);return v&&!v.isGroup&&!v.ignored?v:null}function m(S){if(S==null)return null;let v=r.get(S);return v&&!v.ignored?v:null}function y(S,v){let D=m(S);return D?D.getPrev(v):null}function w(S,v){let D=m(S);return D?D.getNext(v):null}function g(S){let v=m(S);return v?v.getParent():null}function O(S){let v=m(S);return v?v.getChild():null}let j={treeNodes:p,treeNodeMap:r,levelTreeNodeMap:n,maxLevel:Math.max(...n.keys()),getChildren:d,getFlattenedNodes(S){return ei(p,S)},getNode:f,getPrev:y,getNext:w,getParent:g,getChild:O,getFirstAvailableNode(){return kv(p)},getPath(S,v={}){return Cv(S,v,j)},getCheckedKeys(S,v={}){let{cascade:D=!0,leafOnly:x=!1,checkStrategy:k="all",allowNotLoaded:A=!1}=v;return ns({checkedKeys:ts(S),indeterminateKeys:os(S),cascade:D,leafOnly:x,checkStrategy:k,allowNotLoaded:A},j)},check(S,v,D={}){let{cascade:x=!0,leafOnly:k=!1,checkStrategy:A="all",allowNotLoaded:E=!1}=D;return ns({checkedKeys:ts(v),indeterminateKeys:os(v),keysToCheck:S==null?[]:vd(S),cascade:x,leafOnly:k,checkStrategy:A,allowNotLoaded:E},j)},uncheck(S,v,D={}){let{cascade:x=!0,leafOnly:k=!1,checkStrategy:A="all",allowNotLoaded:E=!1}=D;return ns({checkedKeys:ts(v),indeterminateKeys:os(v),keysToUncheck:S==null?[]:vd(S),cascade:x,leafOnly:k,checkStrategy:A,allowNotLoaded:E},j)},getNonLeafKeys(S={}){return dv(p,S)}};return j}var he={neutralBase:"#000",neutralInvertBase:"#fff",neutralTextBase:"#fff",neutralPopover:"rgb(72, 72, 78)",neutralCard:"rgb(24, 24, 28)",neutralModal:"rgb(44, 44, 50)",neutralBody:"rgb(16, 16, 20)",alpha1:"0.9",alpha2:"0.82",alpha3:"0.52",alpha4:"0.38",alpha5:"0.28",alphaClose:"0.52",alphaDisabled:"0.38",alphaDisabledInput:"0.06",alphaPending:"0.09",alphaTablePending:"0.06",alphaTableStriped:"0.05",alphaPressed:"0.05",alphaAvatar:"0.18",alphaRail:"0.2",alphaProgressRail:"0.12",alphaBorder:"0.24",alphaDivider:"0.09",alphaInput:"0.1",alphaAction:"0.06",alphaTab:"0.04",alphaScrollbar:"0.2",alphaScrollbarHover:"0.3",alphaCode:"0.12",alphaTag:"0",primaryHover:"#7fe7c4",primaryDefault:"#63e2b7",primaryActive:"#5acea7",primarySuppl:"rgb(42, 148, 125)",infoHover:"#8acbec",infoDefault:"#70c0e8",infoActive:"#66afd3",infoSuppl:"rgb(56, 137, 197)",errorHover:"#e98b8b",errorDefault:"#e88080",errorActive:"#e57272",errorSuppl:"rgb(208, 58, 82)",warningHover:"#f5d599",warningDefault:"#f2c97d",warningActive:"#e6c260",warningSuppl:"rgb(240, 138, 0)",successHover:"#7fe7c4",successDefault:"#63e2b7",successActive:"#5acea7",successSuppl:"rgb(42, 148, 125)"},tT=vo(he.neutralBase),Dv=vo(he.neutralInvertBase),oT="rgba("+Dv.slice(0,3).join(", ")+", ";function Ge(e){return oT+String(e)+")"}function rT(e){let t=Array.from(Dv);return t[3]=Number(e),xe(tT,t)}var nT=Object.assign(Object.assign({name:"common"},Ut),{baseColor:he.neutralBase,primaryColor:he.primaryDefault,primaryColorHover:he.primaryHover,primaryColorPressed:he.primaryActive,primaryColorSuppl:he.primarySuppl,infoColor:he.infoDefault,infoColorHover:he.infoHover,infoColorPressed:he.infoActive,infoColorSuppl:he.infoSuppl,successColor:he.successDefault,successColorHover:he.successHover,successColorPressed:he.successActive,successColorSuppl:he.successSuppl,warningColor:he.warningDefault,warningColorHover:he.warningHover,warningColorPressed:he.warningActive,warningColorSuppl:he.warningSuppl,errorColor:he.errorDefault,errorColorHover:he.errorHover,errorColorPressed:he.errorActive,errorColorSuppl:he.errorSuppl,textColorBase:he.neutralTextBase,textColor1:Ge(he.alpha1),textColor2:Ge(he.alpha2),textColor3:Ge(he.alpha3),textColorDisabled:Ge(he.alpha4),placeholderColor:Ge(he.alpha4),placeholderColorDisabled:Ge(he.alpha5),iconColor:Ge(he.alpha4),iconColorDisabled:Ge(he.alpha5),iconColorHover:Ge(Number(he.alpha4)*1.25),iconColorPressed:Ge(Number(he.alpha4)*.8),opacity1:he.alpha1,opacity2:he.alpha2,opacity3:he.alpha3,opacity4:he.alpha4,opacity5:he.alpha5,dividerColor:Ge(he.alphaDivider),borderColor:Ge(he.alphaBorder),closeColorHover:Ge(Number(he.alphaClose)*1.25),closeColor:Ge(Number(he.alphaClose)),closeColorPressed:Ge(Number(he.alphaClose)*.8),closeColorDisabled:Ge(he.alpha4),clearColor:Ge(he.alpha4),clearColorHover:ur(Ge(he.alpha4),{alpha:1.25}),clearColorPressed:ur(Ge(he.alpha4),{alpha:.8}),scrollbarColor:Ge(he.alphaScrollbar),scrollbarColorHover:Ge(he.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:Ge(he.alphaProgressRail),railColor:Ge(he.alphaRail),popoverColor:he.neutralPopover,tableColor:he.neutralCard,cardColor:he.neutralCard,modalColor:he.neutralModal,bodyColor:he.neutralBody,tagColor:rT(he.alphaTag),avatarColor:Ge(he.alphaAvatar),invertedColor:he.neutralBase,inputColor:Ge(he.alphaInput),codeColor:Ge(he.alphaCode),tabColor:Ge(he.alphaTab),actionColor:Ge(he.alphaAction),tableHeaderColor:Ge(he.alphaAction),hoverColor:Ge(he.alphaPending),tableColorHover:Ge(he.alphaTablePending),tableColorStriped:Ge(he.alphaTableStriped),pressedColor:Ge(he.alphaPressed),opacityDisabled:he.alphaDisabled,inputColorDisabled:Ge(he.alphaDisabledInput),buttonColor2:"rgba(255, 255, 255, .06)",buttonColor2Hover:"rgba(255, 255, 255, .09)",buttonColor2Pressed:"rgba(255, 255, 255, .05)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .24), 0 3px 6px 0 rgba(0, 0, 0, .18), 0 5px 12px 4px rgba(0, 0, 0, .12)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .24), 0 6px 12px 0 rgba(0, 0, 0, .16), 0 9px 18px 8px rgba(0, 0, 0, .10)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),R=nT;var _e={neutralBase:"#FFF",neutralInvertBase:"#000",neutralTextBase:"#000",neutralPopover:"#fff",neutralCard:"#fff",neutralModal:"#fff",neutralBody:"#fff",alpha1:"0.82",alpha2:"0.72",alpha3:"0.38",alpha4:"0.24",alpha5:"0.18",alphaClose:"0.52",alphaDisabled:"0.5",alphaDisabledInput:"0.02",alphaPending:"0.05",alphaTablePending:"0.02",alphaPressed:"0.07",alphaAvatar:"0.2",alphaRail:"0.14",alphaProgressRail:".08",alphaBorder:"0.12",alphaDivider:"0.06",alphaInput:"0",alphaAction:"0.02",alphaTab:"0.04",alphaScrollbar:"0.25",alphaScrollbarHover:"0.4",alphaCode:"0.05",alphaTag:"0.02",primaryHover:"#36ad6a",primaryDefault:"#18a058",primaryActive:"#0c7a43",primarySuppl:"#36ad6a",infoHover:"#4098fc",infoDefault:"#2080f0",infoActive:"#1060c9",infoSuppl:"#4098fc",errorHover:"#de576d",errorDefault:"#d03050",errorActive:"#ab1f3f",errorSuppl:"#de576d",warningHover:"#fcb040",warningDefault:"#f0a020",warningActive:"#c97c10",warningSuppl:"#fcb040",successHover:"#36ad6a",successDefault:"#18a058",successActive:"#0c7a43",successSuppl:"#36ad6a"},iT=vo(_e.neutralBase),Ov=vo(_e.neutralInvertBase),aT="rgba("+Ov.slice(0,3).join(", ")+", ";function Tv(e){return aT+String(e)+")"}function Vt(e){let t=Array.from(Ov);return t[3]=Number(e),xe(iT,t)}var lT=Object.assign(Object.assign({name:"common"},Ut),{baseColor:_e.neutralBase,primaryColor:_e.primaryDefault,primaryColorHover:_e.primaryHover,primaryColorPressed:_e.primaryActive,primaryColorSuppl:_e.primarySuppl,infoColor:_e.infoDefault,infoColorHover:_e.infoHover,infoColorPressed:_e.infoActive,infoColorSuppl:_e.infoSuppl,successColor:_e.successDefault,successColorHover:_e.successHover,successColorPressed:_e.successActive,successColorSuppl:_e.successSuppl,warningColor:_e.warningDefault,warningColorHover:_e.warningHover,warningColorPressed:_e.warningActive,warningColorSuppl:_e.warningSuppl,errorColor:_e.errorDefault,errorColorHover:_e.errorHover,errorColorPressed:_e.errorActive,errorColorSuppl:_e.errorSuppl,textColorBase:_e.neutralTextBase,textColor1:"rgb(31, 34, 37)",textColor2:"rgb(51, 54, 57)",textColor3:"rgb(118, 124, 130)",textColorDisabled:Vt(_e.alpha4),placeholderColor:Vt(_e.alpha4),placeholderColorDisabled:Vt(_e.alpha5),iconColor:Vt(_e.alpha4),iconColorHover:ur(Vt(_e.alpha4),{lightness:.75}),iconColorPressed:ur(Vt(_e.alpha4),{lightness:.9}),iconColorDisabled:Vt(_e.alpha5),opacity1:_e.alpha1,opacity2:_e.alpha2,opacity3:_e.alpha3,opacity4:_e.alpha4,opacity5:_e.alpha5,dividerColor:"rgb(239, 239, 245)",borderColor:"rgb(224, 224, 230)",closeColor:Vt(Number(_e.alphaClose)),closeColorHover:Vt(Number(_e.alphaClose)*1.25),closeColorPressed:Vt(Number(_e.alphaClose)*.8),closeColorDisabled:Vt(_e.alpha4),clearColor:Vt(_e.alpha4),clearColorHover:ur(Vt(_e.alpha4),{lightness:.75}),clearColorPressed:ur(Vt(_e.alpha4),{lightness:.9}),scrollbarColor:Tv(_e.alphaScrollbar),scrollbarColorHover:Tv(_e.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:Vt(_e.alphaProgressRail),railColor:"rgb(219, 219, 223)",popoverColor:_e.neutralPopover,tableColor:_e.neutralCard,cardColor:_e.neutralCard,modalColor:_e.neutralModal,bodyColor:_e.neutralBody,tagColor:"rgb(250, 250, 252)",avatarColor:Vt(_e.alphaAvatar),invertedColor:"rgb(0, 20, 40)",inputColor:Vt(_e.alphaInput),codeColor:"rgb(244, 244, 248)",tabColor:"rgb(247, 247, 250)",actionColor:"rgb(250, 250, 252)",tableHeaderColor:"rgb(250, 250, 252)",hoverColor:"rgb(243, 243, 245)",tableColorHover:"rgba(0, 0, 100, 0.03)",tableColorStriped:"rgba(0, 0, 100, 0.02)",pressedColor:"rgb(237, 237, 239)",opacityDisabled:_e.alphaDisabled,inputColorDisabled:"rgb(250, 250, 252)",buttonColor2:"rgba(46, 51, 56, .05)",buttonColor2Hover:"rgba(46, 51, 56, .09)",buttonColor2Pressed:"rgba(46, 51, 56, .13)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),ge=lT;var Pv={iconSizeSmall:"34px",iconSizeMedium:"40px",iconSizeLarge:"46px",iconSizeHuge:"52px"};var Sd=e=>{let{textColorDisabled:t,iconColor:o,textColor2:r,fontSizeSmall:n,fontSizeMedium:i,fontSizeLarge:a,fontSizeHuge:l}=e;return Object.assign(Object.assign({},Pv),{fontSizeSmall:n,fontSizeMedium:i,fontSizeLarge:a,fontSizeHuge:l,textColor:t,iconColor:o,extraTextColor:r})},sT={name:"Empty",common:ge,self:Sd},uo=sT;var cT={name:"Empty",common:R,self:Sd},fo=cT;var Nv=U("empty",` + `,[fo({left:"50%",top:"50%",originalTransform:"translateX(-50%) translateY(-50%)"})])])]);var jr=de({name:"BaseLoading",props:{clsPrefix:{type:String,required:!0},scale:{type:Number,default:1},radius:{type:Number,default:100},strokeWidth:{type:Number,default:28},stroke:{type:String,default:void 0},show:{type:Boolean,default:!0}},setup(e){er("-base-loading",cv,Ae(e,"clsPrefix"))},render(){let{clsPrefix:e,radius:t,strokeWidth:o,stroke:r,scale:n}=this,i=t/n;return v("div",{class:`${e}-base-loading`,role:"img","aria-label":"loading"},v(So,null,{default:()=>this.show?v("div",{key:"icon",class:`${e}-base-loading__transition-wrapper`},v("div",{class:`${e}-base-loading__container`},v("div",{class:`${e}-base-loading__container-layer`},v("div",{class:`${e}-base-loading__container-layer-left`},v("svg",{class:`${e}-base-loading__svg`,viewBox:`0 0 ${2*i} ${2*i}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},v("circle",{fill:"none",stroke:"currentColor","stroke-width":o,"stroke-linecap":"round",cx:i,cy:i,r:t-o/2,"stroke-dasharray":4.91*t,"stroke-dashoffset":2.46*t}))),v("div",{class:`${e}-base-loading__container-layer-patch`},v("svg",{class:`${e}-base-loading__svg`,viewBox:`0 0 ${2*i} ${2*i}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},v("circle",{fill:"none",stroke:"currentColor","stroke-width":o,"stroke-linecap":"round",cx:i,cy:i,r:t-o/2,"stroke-dasharray":4.91*t,"stroke-dashoffset":2.46*t}))),v("div",{class:`${e}-base-loading__container-layer-right`},v("svg",{class:`${e}-base-loading__svg`,viewBox:`0 0 ${2*i} ${2*i}`,xmlns:"http://www.w3.org/2000/svg",style:{color:r}},v("circle",{fill:"none",stroke:"currentColor","stroke-width":o,"stroke-linecap":"round",cx:i,cy:i,r:t-o/2,"stroke-dasharray":4.91*t,"stroke-dashoffset":2.46*t})))))):v("div",{key:"placeholder",class:`${e}-base-loading__placeholder`},this.$slots)}))}});function vd(e){return Array.isArray(e)?e:[e]}var ts={STOP:"STOP"};function bd(e,t){let o=t(e);e.children!==void 0&&o!==ts.STOP&&e.children.forEach(r=>bd(r,t))}function dv(e,t={}){let{preserveGroup:o=!1}=t,r=[],n=o?a=>{a.isLeaf||(r.push(a.key),i(a.children))}:a=>{a.isLeaf||(a.isGroup||r.push(a.key),i(a.children))};function i(a){a.forEach(n)}return i(e),r}function uv(e,t){let{isLeaf:o}=e;return o!==void 0?o:!t(e)}function fv(e){return e.children}function pv(e){return e.key}function mv(){return!1}function hv(e,t){let{isLeaf:o}=e;return!(o===!1&&!Array.isArray(t(e)))}function gv(e){return e.disabled===!0}function xv(e,t){return e.isLeaf===!1&&!Array.isArray(t(e))}function os(e){var t;return e==null?[]:Array.isArray(e)?e:(t=e.checkedKeys)!==null&&t!==void 0?t:[]}function rs(e){var t;return e==null||Array.isArray(e)?[]:(t=e.indeterminateKeys)!==null&&t!==void 0?t:[]}function vv(e,t){let o=new Set(e);return t.forEach(r=>{o.has(r)||o.add(r)}),Array.from(o)}function bv(e,t){let o=new Set(e);return t.forEach(r=>{o.has(r)&&o.delete(r)}),Array.from(o)}function yv(e){return e?.type==="group"}function yd(e){let t=new Map;return e.forEach((o,r)=>{t.set(o.key,r)}),o=>{var r;return(r=t.get(o))!==null&&r!==void 0?r:null}}var Cd=class extends Error{constructor(){super(),this.message="SubtreeNotLoadedError: checking a subtree whose required nodes are not fully loaded."}};function GD(e,t,o,r){return ns(t.concat(e),o,r,!1)}function YD(e,t){let o=new Set;return e.forEach(r=>{let n=t.treeNodeMap.get(r);if(n!==void 0){let i=n.parent;for(;i!==null&&!(i.disabled||o.has(i.key));)o.add(i.key),i=i.parent}}),o}function XD(e,t,o,r){let n=ns(t,o,r,!1),i=ns(e,o,r,!0),a=YD(e,o),l=[];return n.forEach(s=>{(i.has(s)||a.has(s))&&l.push(s)}),l.forEach(s=>n.delete(s)),n}function is(e,t){let{checkedKeys:o,keysToCheck:r,keysToUncheck:n,indeterminateKeys:i,cascade:a,leafOnly:l,checkStrategy:s,allowNotLoaded:c}=e;if(!a)return r!==void 0?{checkedKeys:vv(o,r),indeterminateKeys:Array.from(i)}:n!==void 0?{checkedKeys:bv(o,n),indeterminateKeys:Array.from(i)}:{checkedKeys:Array.from(o),indeterminateKeys:Array.from(i)};let{levelTreeNodeMap:d}=t,u;n!==void 0?u=XD(n,o,t,c):r!==void 0?u=GD(r,o,t,c):u=ns(o,t,c,!1);let p=s==="parent",f=s==="child"||l,m=u,y=new Set,_=Math.max.apply(null,Array.from(d.keys()));for(let h=_;h>=0;h-=1){let O=h===0,W=d.get(h);for(let w of W){if(w.isLeaf)continue;let{key:b,shallowLoaded:D}=w;if(f&&D&&w.children.forEach(E=>{!E.disabled&&!E.isLeaf&&E.shallowLoaded&&m.has(E.key)&&m.delete(E.key)}),w.disabled||!D)continue;let x=!0,k=!1,A=!0;for(let E of w.children){let H=E.key;if(!E.disabled){if(A&&(A=!1),m.has(H))k=!0;else if(y.has(H)){k=!0,x=!1;break}else if(x=!1,k)break}}x&&!A?(p&&w.children.forEach(E=>{!E.disabled&&m.has(E.key)&&m.delete(E.key)}),m.add(b)):k&&y.add(b),O&&f&&m.has(b)&&m.delete(b)}}return{checkedKeys:Array.from(m),indeterminateKeys:Array.from(y)}}function ns(e,t,o,r){let{treeNodeMap:n,getChildren:i}=t,a=new Set,l=new Set(e);return e.forEach(s=>{let c=n.get(s);c!==void 0&&bd(c,d=>{if(d.disabled)return ts.STOP;let{key:u}=d;if(!a.has(u)&&(a.add(u),l.add(u),xv(d.rawNode,i))){if(r)return ts.STOP;if(!o)throw new Cd}})}),l}function Cv(e,{includeGroup:t=!1,includeSelf:o=!0},r){var n;let i=r.treeNodeMap,a=e==null?null:(n=i.get(e))!==null&&n!==void 0?n:null,l={keyPath:[],treeNodePath:[],treeNode:a};if(a?.ignored)return l.treeNode=null,l;for(;a;)!a.ignored&&(t||!a.isGroup)&&l.treeNodePath.push(a),a=a.parent;return l.treeNodePath.reverse(),o||l.treeNodePath.pop(),l.keyPath=l.treeNodePath.map(s=>s.key),l}function kv(e){if(e.length===0)return null;let t=e[0];return t.isGroup||t.ignored||t.disabled?t.getNext():t}function ZD(e,t){let o=e.siblings,r=o.length,{index:n}=e;return t?o[(n+1)%r]:n===o.length-1?null:o[n+1]}function wv(e,t,{loop:o=!1,includeDisabled:r=!1}={}){let n=t==="prev"?QD:ZD,i={reverse:t==="prev"},a=!1,l=null;function s(c){if(c!==null){if(c===e){if(!a)a=!0;else if(!e.disabled&&!e.isGroup){l=e;return}}else if((!c.disabled||r)&&!c.ignored&&!c.isGroup){l=c;return}if(c.isGroup){let d=wd(c,i);d!==null?l=d:s(n(c,o))}else{let d=n(c,!1);if(d!==null)s(d);else{let u=JD(c);u?.isGroup?s(n(u,o)):o&&s(n(c,!0))}}}}return s(e),l}function QD(e,t){let o=e.siblings,r=o.length,{index:n}=e;return t?o[(n-1+r)%r]:n===0?null:o[n-1]}function JD(e){return e.parent}function wd(e,t={}){let{reverse:o=!1}=t,{children:r}=e;if(r){let{length:n}=r,i=o?n-1:0,a=o?-1:n,l=o?-1:1;for(let s=i;s!==a;s+=l){let c=r[s];if(!c.disabled&&!c.ignored)if(c.isGroup){let d=wd(c,t);if(d!==null)return d}else return c}}return null}var Sv={getChild(){return this.ignored?null:wd(this)},getParent(){let{parent:e}=this;return e?.isGroup?e.getParent():e},getNext(e={}){return wv(this,"next",e)},getPrev(e={}){return wv(this,"prev",e)}};function ei(e,t){let o=t?new Set(t):void 0,r=[];function n(i){i.forEach(a=>{r.push(a),!(a.isLeaf||!a.children||a.ignored)&&(a.isGroup||o===void 0||o.has(a.key))&&n(a.children)})}return n(e),r}function _v(e,t){let o=e.key;for(;t;){if(t.key===o)return!0;t=t.parent}return!1}function Ev(e,t,o,r,n,i=null,a=0){let l=[];return e.forEach((s,c)=>{var d;let u=Object.create(r);if(u.rawNode=s,u.siblings=l,u.level=a,u.index=c,u.isFirstChild=c===0,u.isLastChild=c+1===e.length,u.parent=i,!u.ignored){let p=n(s);Array.isArray(p)&&(u.children=Ev(p,t,o,r,n,u,a+1))}l.push(u),t.set(u.key,u),o.has(a)||o.set(a,[]),(d=o.get(a))===null||d===void 0||d.push(u)}),l}function kd(e,t={}){var o;let r=new Map,n=new Map,{getDisabled:i=gv,getIgnored:a=mv,getIsGroup:l=yv,getKey:s=pv}=t,c=(o=t.getChildren)!==null&&o!==void 0?o:fv,d=t.ignoreEmptyChildren?w=>{let b=c(w);return Array.isArray(b)?b.length?b:null:b}:c,u=Object.assign({get key(){return s(this.rawNode)},get disabled(){return i(this.rawNode)},get isGroup(){return l(this.rawNode)},get isLeaf(){return uv(this.rawNode,d)},get shallowLoaded(){return hv(this.rawNode,d)},get ignored(){return a(this.rawNode)},contains(w){return _v(this,w)}},Sv),p=Ev(e,r,n,u,d);function f(w){if(w==null)return null;let b=r.get(w);return b&&!b.isGroup&&!b.ignored?b:null}function m(w){if(w==null)return null;let b=r.get(w);return b&&!b.ignored?b:null}function y(w,b){let D=m(w);return D?D.getPrev(b):null}function _(w,b){let D=m(w);return D?D.getNext(b):null}function h(w){let b=m(w);return b?b.getParent():null}function O(w){let b=m(w);return b?b.getChild():null}let W={treeNodes:p,treeNodeMap:r,levelTreeNodeMap:n,maxLevel:Math.max(...n.keys()),getChildren:d,getFlattenedNodes(w){return ei(p,w)},getNode:f,getPrev:y,getNext:_,getParent:h,getChild:O,getFirstAvailableNode(){return kv(p)},getPath(w,b={}){return Cv(w,b,W)},getCheckedKeys(w,b={}){let{cascade:D=!0,leafOnly:x=!1,checkStrategy:k="all",allowNotLoaded:A=!1}=b;return is({checkedKeys:os(w),indeterminateKeys:rs(w),cascade:D,leafOnly:x,checkStrategy:k,allowNotLoaded:A},W)},check(w,b,D={}){let{cascade:x=!0,leafOnly:k=!1,checkStrategy:A="all",allowNotLoaded:E=!1}=D;return is({checkedKeys:os(b),indeterminateKeys:rs(b),keysToCheck:w==null?[]:vd(w),cascade:x,leafOnly:k,checkStrategy:A,allowNotLoaded:E},W)},uncheck(w,b,D={}){let{cascade:x=!0,leafOnly:k=!1,checkStrategy:A="all",allowNotLoaded:E=!1}=D;return is({checkedKeys:os(b),indeterminateKeys:rs(b),keysToUncheck:w==null?[]:vd(w),cascade:x,leafOnly:k,checkStrategy:A,allowNotLoaded:E},W)},getNonLeafKeys(w={}){return dv(p,w)}};return W}var me={neutralBase:"#000",neutralInvertBase:"#fff",neutralTextBase:"#fff",neutralPopover:"rgb(72, 72, 78)",neutralCard:"rgb(24, 24, 28)",neutralModal:"rgb(44, 44, 50)",neutralBody:"rgb(16, 16, 20)",alpha1:"0.9",alpha2:"0.82",alpha3:"0.52",alpha4:"0.38",alpha5:"0.28",alphaClose:"0.52",alphaDisabled:"0.38",alphaDisabledInput:"0.06",alphaPending:"0.09",alphaTablePending:"0.06",alphaTableStriped:"0.05",alphaPressed:"0.05",alphaAvatar:"0.18",alphaRail:"0.2",alphaProgressRail:"0.12",alphaBorder:"0.24",alphaDivider:"0.09",alphaInput:"0.1",alphaAction:"0.06",alphaTab:"0.04",alphaScrollbar:"0.2",alphaScrollbarHover:"0.3",alphaCode:"0.12",alphaTag:"0",primaryHover:"#7fe7c4",primaryDefault:"#63e2b7",primaryActive:"#5acea7",primarySuppl:"rgb(42, 148, 125)",infoHover:"#8acbec",infoDefault:"#70c0e8",infoActive:"#66afd3",infoSuppl:"rgb(56, 137, 197)",errorHover:"#e98b8b",errorDefault:"#e88080",errorActive:"#e57272",errorSuppl:"rgb(208, 58, 82)",warningHover:"#f5d599",warningDefault:"#f2c97d",warningActive:"#e6c260",warningSuppl:"rgb(240, 138, 0)",successHover:"#7fe7c4",successDefault:"#63e2b7",successActive:"#5acea7",successSuppl:"rgb(42, 148, 125)"},eT=vo(me.neutralBase),Dv=vo(me.neutralInvertBase),tT="rgba("+Dv.slice(0,3).join(", ")+", ";function qe(e){return tT+String(e)+")"}function oT(e){let t=Array.from(Dv);return t[3]=Number(e),xe(eT,t)}var rT=Object.assign(Object.assign({name:"common"},qt),{baseColor:me.neutralBase,primaryColor:me.primaryDefault,primaryColorHover:me.primaryHover,primaryColorPressed:me.primaryActive,primaryColorSuppl:me.primarySuppl,infoColor:me.infoDefault,infoColorHover:me.infoHover,infoColorPressed:me.infoActive,infoColorSuppl:me.infoSuppl,successColor:me.successDefault,successColorHover:me.successHover,successColorPressed:me.successActive,successColorSuppl:me.successSuppl,warningColor:me.warningDefault,warningColorHover:me.warningHover,warningColorPressed:me.warningActive,warningColorSuppl:me.warningSuppl,errorColor:me.errorDefault,errorColorHover:me.errorHover,errorColorPressed:me.errorActive,errorColorSuppl:me.errorSuppl,textColorBase:me.neutralTextBase,textColor1:qe(me.alpha1),textColor2:qe(me.alpha2),textColor3:qe(me.alpha3),textColorDisabled:qe(me.alpha4),placeholderColor:qe(me.alpha4),placeholderColorDisabled:qe(me.alpha5),iconColor:qe(me.alpha4),iconColorDisabled:qe(me.alpha5),iconColorHover:qe(Number(me.alpha4)*1.25),iconColorPressed:qe(Number(me.alpha4)*.8),opacity1:me.alpha1,opacity2:me.alpha2,opacity3:me.alpha3,opacity4:me.alpha4,opacity5:me.alpha5,dividerColor:qe(me.alphaDivider),borderColor:qe(me.alphaBorder),closeColorHover:qe(Number(me.alphaClose)*1.25),closeColor:qe(Number(me.alphaClose)),closeColorPressed:qe(Number(me.alphaClose)*.8),closeColorDisabled:qe(me.alpha4),clearColor:qe(me.alpha4),clearColorHover:ur(qe(me.alpha4),{alpha:1.25}),clearColorPressed:ur(qe(me.alpha4),{alpha:.8}),scrollbarColor:qe(me.alphaScrollbar),scrollbarColorHover:qe(me.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:qe(me.alphaProgressRail),railColor:qe(me.alphaRail),popoverColor:me.neutralPopover,tableColor:me.neutralCard,cardColor:me.neutralCard,modalColor:me.neutralModal,bodyColor:me.neutralBody,tagColor:oT(me.alphaTag),avatarColor:qe(me.alphaAvatar),invertedColor:me.neutralBase,inputColor:qe(me.alphaInput),codeColor:qe(me.alphaCode),tabColor:qe(me.alphaTab),actionColor:qe(me.alphaAction),tableHeaderColor:qe(me.alphaAction),hoverColor:qe(me.alphaPending),tableColorHover:qe(me.alphaTablePending),tableColorStriped:qe(me.alphaTableStriped),pressedColor:qe(me.alphaPressed),opacityDisabled:me.alphaDisabled,inputColorDisabled:qe(me.alphaDisabledInput),buttonColor2:"rgba(255, 255, 255, .06)",buttonColor2Hover:"rgba(255, 255, 255, .09)",buttonColor2Pressed:"rgba(255, 255, 255, .05)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .24), 0 3px 6px 0 rgba(0, 0, 0, .18), 0 5px 12px 4px rgba(0, 0, 0, .12)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .24), 0 6px 12px 0 rgba(0, 0, 0, .16), 0 9px 18px 8px rgba(0, 0, 0, .10)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),R=rT;var _e={neutralBase:"#FFF",neutralInvertBase:"#000",neutralTextBase:"#000",neutralPopover:"#fff",neutralCard:"#fff",neutralModal:"#fff",neutralBody:"#fff",alpha1:"0.82",alpha2:"0.72",alpha3:"0.38",alpha4:"0.24",alpha5:"0.18",alphaClose:"0.52",alphaDisabled:"0.5",alphaDisabledInput:"0.02",alphaPending:"0.05",alphaTablePending:"0.02",alphaPressed:"0.07",alphaAvatar:"0.2",alphaRail:"0.14",alphaProgressRail:".08",alphaBorder:"0.12",alphaDivider:"0.06",alphaInput:"0",alphaAction:"0.02",alphaTab:"0.04",alphaScrollbar:"0.25",alphaScrollbarHover:"0.4",alphaCode:"0.05",alphaTag:"0.02",primaryHover:"#36ad6a",primaryDefault:"#18a058",primaryActive:"#0c7a43",primarySuppl:"#36ad6a",infoHover:"#4098fc",infoDefault:"#2080f0",infoActive:"#1060c9",infoSuppl:"#4098fc",errorHover:"#de576d",errorDefault:"#d03050",errorActive:"#ab1f3f",errorSuppl:"#de576d",warningHover:"#fcb040",warningDefault:"#f0a020",warningActive:"#c97c10",warningSuppl:"#fcb040",successHover:"#36ad6a",successDefault:"#18a058",successActive:"#0c7a43",successSuppl:"#36ad6a"},nT=vo(_e.neutralBase),Ov=vo(_e.neutralInvertBase),iT="rgba("+Ov.slice(0,3).join(", ")+", ";function Tv(e){return iT+String(e)+")"}function Vt(e){let t=Array.from(Ov);return t[3]=Number(e),xe(nT,t)}var aT=Object.assign(Object.assign({name:"common"},qt),{baseColor:_e.neutralBase,primaryColor:_e.primaryDefault,primaryColorHover:_e.primaryHover,primaryColorPressed:_e.primaryActive,primaryColorSuppl:_e.primarySuppl,infoColor:_e.infoDefault,infoColorHover:_e.infoHover,infoColorPressed:_e.infoActive,infoColorSuppl:_e.infoSuppl,successColor:_e.successDefault,successColorHover:_e.successHover,successColorPressed:_e.successActive,successColorSuppl:_e.successSuppl,warningColor:_e.warningDefault,warningColorHover:_e.warningHover,warningColorPressed:_e.warningActive,warningColorSuppl:_e.warningSuppl,errorColor:_e.errorDefault,errorColorHover:_e.errorHover,errorColorPressed:_e.errorActive,errorColorSuppl:_e.errorSuppl,textColorBase:_e.neutralTextBase,textColor1:"rgb(31, 34, 37)",textColor2:"rgb(51, 54, 57)",textColor3:"rgb(118, 124, 130)",textColorDisabled:Vt(_e.alpha4),placeholderColor:Vt(_e.alpha4),placeholderColorDisabled:Vt(_e.alpha5),iconColor:Vt(_e.alpha4),iconColorHover:ur(Vt(_e.alpha4),{lightness:.75}),iconColorPressed:ur(Vt(_e.alpha4),{lightness:.9}),iconColorDisabled:Vt(_e.alpha5),opacity1:_e.alpha1,opacity2:_e.alpha2,opacity3:_e.alpha3,opacity4:_e.alpha4,opacity5:_e.alpha5,dividerColor:"rgb(239, 239, 245)",borderColor:"rgb(224, 224, 230)",closeColor:Vt(Number(_e.alphaClose)),closeColorHover:Vt(Number(_e.alphaClose)*1.25),closeColorPressed:Vt(Number(_e.alphaClose)*.8),closeColorDisabled:Vt(_e.alpha4),clearColor:Vt(_e.alpha4),clearColorHover:ur(Vt(_e.alpha4),{lightness:.75}),clearColorPressed:ur(Vt(_e.alpha4),{lightness:.9}),scrollbarColor:Tv(_e.alphaScrollbar),scrollbarColorHover:Tv(_e.alphaScrollbarHover),scrollbarWidth:"5px",scrollbarHeight:"5px",scrollbarBorderRadius:"5px",progressRailColor:Vt(_e.alphaProgressRail),railColor:"rgb(219, 219, 223)",popoverColor:_e.neutralPopover,tableColor:_e.neutralCard,cardColor:_e.neutralCard,modalColor:_e.neutralModal,bodyColor:_e.neutralBody,tagColor:"rgb(250, 250, 252)",avatarColor:Vt(_e.alphaAvatar),invertedColor:"rgb(0, 20, 40)",inputColor:Vt(_e.alphaInput),codeColor:"rgb(244, 244, 248)",tabColor:"rgb(247, 247, 250)",actionColor:"rgb(250, 250, 252)",tableHeaderColor:"rgb(250, 250, 252)",hoverColor:"rgb(243, 243, 245)",tableColorHover:"rgba(0, 0, 100, 0.03)",tableColorStriped:"rgba(0, 0, 100, 0.02)",pressedColor:"rgb(237, 237, 239)",opacityDisabled:_e.alphaDisabled,inputColorDisabled:"rgb(250, 250, 252)",buttonColor2:"rgba(46, 51, 56, .05)",buttonColor2Hover:"rgba(46, 51, 56, .09)",buttonColor2Pressed:"rgba(46, 51, 56, .13)",boxShadow1:"0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)",boxShadow2:"0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)",boxShadow3:"0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)"}),ge=aT;var Nv={iconSizeSmall:"34px",iconSizeMedium:"40px",iconSizeLarge:"46px",iconSizeHuge:"52px"};var Sd=e=>{let{textColorDisabled:t,iconColor:o,textColor2:r,fontSizeSmall:n,fontSizeMedium:i,fontSizeLarge:a,fontSizeHuge:l}=e;return Object.assign(Object.assign({},Nv),{fontSizeSmall:n,fontSizeMedium:i,fontSizeLarge:a,fontSizeHuge:l,textColor:t,iconColor:o,extraTextColor:r})},lT={name:"Empty",common:ge,self:Sd},po=lT;var sT={name:"Empty",common:R,self:Sd},mo=sT;var Pv=U("empty",` display: flex; flex-direction: column; align-items: center; @@ -194,7 +194,7 @@ ${t} transition: color .3s var(--n-bezier); margin-top: 12px; color: var(--n-extra-text-color); - `)]);var dT=Object.assign(Object.assign({},Ct.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),_d=ue({name:"Empty",props:dT,setup(e){let{mergedClsPrefixRef:t,inlineThemeDisabled:o}=Mt(e),r=Ct("Empty","-empty",Nv,uo,e,t),{localeRef:n}=Qn("Empty"),i=ke(Zt,null),a=F(()=>{var d,u,p;return(d=e.description)!==null&&d!==void 0?d:(p=(u=i?.mergedComponentPropsRef.value)===null||u===void 0?void 0:u.Empty)===null||p===void 0?void 0:p.description}),l=F(()=>{var d,u;return((u=(d=i?.mergedComponentPropsRef.value)===null||d===void 0?void 0:d.Empty)===null||u===void 0?void 0:u.renderIcon)||(()=>b(md,null))}),s=F(()=>{let{size:d}=e,{common:{cubicBezierEaseInOut:u},self:{[Te("iconSize",d)]:p,[Te("fontSize",d)]:f,textColor:m,iconColor:y,extraTextColor:w}}=r.value;return{"--n-icon-size":p,"--n-font-size":f,"--n-bezier":u,"--n-text-color":m,"--n-icon-color":y,"--n-extra-text-color":w}}),c=o?qt("empty",F(()=>{let d="",{size:u}=e;return d+=u[0],d}),s,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:l,localizedDescription:F(()=>a.value||n.value.description),cssVars:o?void 0:s,themeClass:c?.themeClass,onRender:c?.onRender}},render(){let{$slots:e,mergedClsPrefix:t,onRender:o}=this;return o?.(),b("div",{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?b("div",{class:`${t}-empty__icon`},e.icon?e.icon():b(_o,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?b("div",{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?b("div",{class:`${t}-empty__extra`},e.extra()):null)}});var Ed=e=>{let{scrollbarColor:t,scrollbarColorHover:o}=e;return{color:t,colorHover:o}},uT={name:"Scrollbar",common:ge,self:Ed},_t=uT;var fT={name:"Scrollbar",common:R,self:Ed},at=fT;var{cubicBezierEaseInOut:Rv}=Ut;function Iv({name:e="fade-in",enterDuration:t="0.2s",leaveDuration:o="0.2s",enterCubicBezier:r=Rv,leaveCubicBezier:n=Rv}={}){return[J(`&.${e}-transition-enter-active`,{transition:`all ${t} ${r}!important`}),J(`&.${e}-transition-leave-active`,{transition:`all ${o} ${n}!important`}),J(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`,{opacity:0}),J(`&.${e}-transition-leave-from, &.${e}-transition-enter-to`,{opacity:1})]}var Av=U("scrollbar",` + `)]);var cT=Object.assign(Object.assign({},wt.props),{description:String,showDescription:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},size:{type:String,default:"medium"},renderIcon:Function}),_d=de({name:"Empty",props:cT,setup(e){let{mergedClsPrefixRef:t,inlineThemeDisabled:o}=At(e),r=wt("Empty","-empty",Pv,po,e,t),{localeRef:n}=Qn("Empty"),i=we(Qt,null),a=j(()=>{var d,u,p;return(d=e.description)!==null&&d!==void 0?d:(p=(u=i?.mergedComponentPropsRef.value)===null||u===void 0?void 0:u.Empty)===null||p===void 0?void 0:p.description}),l=j(()=>{var d,u;return((u=(d=i?.mergedComponentPropsRef.value)===null||d===void 0?void 0:d.Empty)===null||u===void 0?void 0:u.renderIcon)||(()=>v(md,null))}),s=j(()=>{let{size:d}=e,{common:{cubicBezierEaseInOut:u},self:{[Te("iconSize",d)]:p,[Te("fontSize",d)]:f,textColor:m,iconColor:y,extraTextColor:_}}=r.value;return{"--n-icon-size":p,"--n-font-size":f,"--n-bezier":u,"--n-text-color":m,"--n-icon-color":y,"--n-extra-text-color":_}}),c=o?Gt("empty",j(()=>{let d="",{size:u}=e;return d+=u[0],d}),s,e):void 0;return{mergedClsPrefix:t,mergedRenderIcon:l,localizedDescription:j(()=>a.value||n.value.description),cssVars:o?void 0:s,themeClass:c?.themeClass,onRender:c?.onRender}},render(){let{$slots:e,mergedClsPrefix:t,onRender:o}=this;return o?.(),v("div",{class:[`${t}-empty`,this.themeClass],style:this.cssVars},this.showIcon?v("div",{class:`${t}-empty__icon`},e.icon?e.icon():v(_o,{clsPrefix:t},{default:this.mergedRenderIcon})):null,this.showDescription?v("div",{class:`${t}-empty__description`},e.default?e.default():this.localizedDescription):null,e.extra?v("div",{class:`${t}-empty__extra`},e.extra()):null)}});var Ed=e=>{let{scrollbarColor:t,scrollbarColorHover:o}=e;return{color:t,colorHover:o}},dT={name:"Scrollbar",common:ge,self:Ed},_t=dT;var uT={name:"Scrollbar",common:R,self:Ed},nt=uT;var{cubicBezierEaseInOut:Rv}=qt;function Iv({name:e="fade-in",enterDuration:t="0.2s",leaveDuration:o="0.2s",enterCubicBezier:r=Rv,leaveCubicBezier:n=Rv}={}){return[J(`&.${e}-transition-enter-active`,{transition:`all ${t} ${r}!important`}),J(`&.${e}-transition-leave-active`,{transition:`all ${o} ${n}!important`}),J(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`,{opacity:0}),J(`&.${e}-transition-leave-from, &.${e}-transition-enter-to`,{opacity:1})]}var Av=U("scrollbar",` overflow: hidden; position: relative; z-index: auto; @@ -241,14 +241,14 @@ ${t} pointer-events: all; background-color: var(--n-scrollbar-color); transition: background-color .2s var(--n-scrollbar-bezier); - `,[Iv(),J("&:hover",{backgroundColor:"var(--n-scrollbar-color-hover)"})])])])])]);var pT=Object.assign(Object.assign({},Ct.props),{size:{type:Number,default:5},duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:String,contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function}),Mv=ue({name:"Scrollbar",props:pT,inheritAttrs:!1,setup(e){let{mergedClsPrefixRef:t,inlineThemeDisabled:o}=Mt(e),r=X(null),n=X(null),i=X(null),a=X(null),l=X(null),s=X(null),c=X(null),d=X(null),u=X(null),p=X(null),f=X(null),m=X(0),y=X(0),w=X(!1),g=X(!1),O=!1,j=!1,S,v,D=0,x=0,k=0,A=0,E=yl(),z=F(()=>{let{value:P}=d,{value:Z}=s,{value:le}=p;return P===null||Z===null||le===null?0:Math.min(P,le*P/Z+e.size*1.5)}),M=F(()=>`${z.value}px`),se=F(()=>{let{value:P}=u,{value:Z}=c,{value:le}=f;return P===null||Z===null||le===null?0:le*P/Z+e.size*1.5}),ye=F(()=>`${se.value}px`),Ie=F(()=>{let{value:P}=d,{value:Z}=m,{value:le}=s,{value:Ce}=p;if(P===null||le===null||Ce===null)return 0;{let Ke=le-P;return Ke?Z/Ke*(Ce-z.value):0}}),fe=F(()=>`${Ie.value}px`),ce=F(()=>{let{value:P}=u,{value:Z}=y,{value:le}=c,{value:Ce}=f;if(P===null||le===null||Ce===null)return 0;{let Ke=le-P;return Ke?Z/Ke*(Ce-se.value):0}}),we=F(()=>`${ce.value}px`),Me=F(()=>{let{value:P}=d,{value:Z}=s;return P!==null&&Z!==null&&Z>P}),Be=F(()=>{let{value:P}=u,{value:Z}=c;return P!==null&&Z!==null&&Z>P}),Le=F(()=>{let{container:P}=e;return P?P():n.value}),Je=F(()=>{let{content:P}=e;return P?P():i.value}),Xe=oe,ct=P=>{let{onResize:Z}=e;Z&&Z(P),oe()},wt=(P,Z)=>{if(!e.scrollable)return;if(typeof P=="number"){We(P,Z??0,0,!1,"auto");return}let{left:le,top:Ce,index:Ke,elSize:He,position:Fe,behavior:qe,el:Tt,debounce:ho=!0}=P;(le!==void 0||Ce!==void 0)&&We(le??0,Ce??0,0,!1,qe),Tt!==void 0?We(0,Tt.offsetTop,Tt.offsetHeight,ho,qe):Ke!==void 0&&He!==void 0?We(0,Ke*He,He,ho,qe):Fe==="bottom"?We(0,Number.MAX_SAFE_INTEGER,0,!1,qe):Fe==="top"&&We(0,0,0,!1,qe)},ze=(P,Z)=>{if(!e.scrollable)return;let{value:le}=Le;le&&(typeof P=="object"?le.scrollBy(P):le.scrollBy(P,Z||0))};function We(P,Z,le,Ce,Ke){let{value:He}=Le;if(He){if(Ce){let{scrollTop:Fe,offsetHeight:qe}=He;if(Z>Fe){Z+le<=Fe+qe||He.scrollTo({left:P,top:Z+le-qe,behavior:Ke});return}}He.scrollTo({left:P,top:Z,behavior:Ke})}}function vt(){h(),C(),oe()}function Pe(){ot()}function ot(){rt(),Dt()}function rt(){v!==void 0&&window.clearTimeout(v),v=window.setTimeout(()=>{g.value=!1},e.duration)}function Dt(){S!==void 0&&window.clearTimeout(S),S=window.setTimeout(()=>{w.value=!1},e.duration)}function h(){S!==void 0&&window.clearTimeout(S),w.value=!0}function C(){v!==void 0&&window.clearTimeout(v),g.value=!0}function L(P){let{onScroll:Z}=e;Z&&Z(P),q()}function q(){let{value:P}=Le;P&&(m.value=P.scrollTop,y.value=P.scrollLeft)}function K(){let{value:P}=Je;P&&(s.value=P.offsetHeight,c.value=P.offsetWidth);let{value:Z}=Le;Z&&(d.value=Z.offsetHeight,u.value=Z.offsetWidth);let{value:le}=l,{value:Ce}=a;le&&(f.value=le.offsetWidth),Ce&&(p.value=Ce.offsetHeight)}function ne(){let{value:P}=Le;P&&(m.value=P.scrollTop,y.value=P.scrollLeft,d.value=P.offsetHeight,u.value=P.offsetWidth,s.value=P.scrollHeight,c.value=P.scrollWidth);let{value:Z}=l,{value:le}=a;Z&&(f.value=Z.offsetWidth),le&&(p.value=le.offsetHeight)}function oe(){e.scrollable&&(e.useUnifiedContainer?ne():(K(),q()))}function H(P){var Z;return!(!((Z=r.value)===null||Z===void 0)&&Z.contains(P.target))}function Q(P){P.preventDefault(),P.stopPropagation(),j=!0,gt("mousemove",window,Y,!0),gt("mouseup",window,N,!0),x=y.value,k=P.clientX}function Y(P){if(!j)return;S!==void 0&&window.clearTimeout(S),v!==void 0&&window.clearTimeout(v);let{value:Z}=u,{value:le}=c,{value:Ce}=se;if(Z===null||le===null)return;let He=(P.clientX-k)*(le-Z)/(Z-Ce),Fe=le-Z,qe=x+He;qe=Math.min(Fe,qe),qe=Math.max(qe,0);let{value:Tt}=Le;if(Tt){Tt.scrollLeft=qe;let{internalOnUpdateScrollLeft:ho}=e;ho&&ho(qe)}}function N(P){P.preventDefault(),P.stopPropagation(),ht("mousemove",window,Y,!0),ht("mouseup",window,N,!0),j=!1,oe(),H(P)&&ot()}function $(P){P.preventDefault(),P.stopPropagation(),O=!0,gt("mousemove",window,V,!0),gt("mouseup",window,ae,!0),D=m.value,A=P.clientY}function V(P){if(!O)return;S!==void 0&&window.clearTimeout(S),v!==void 0&&window.clearTimeout(v);let{value:Z}=d,{value:le}=s,{value:Ce}=z;if(Z===null||le===null)return;let He=(P.clientY-A)*(le-Z)/(Z-Ce),Fe=le-Z,qe=D+He;qe=Math.min(Fe,qe),qe=Math.max(qe,0);let{value:Tt}=Le;Tt&&(Tt.scrollTop=qe)}function ae(P){P.preventDefault(),P.stopPropagation(),ht("mousemove",window,V,!0),ht("mouseup",window,ae,!0),O=!1,oe(),H(P)&&ot()}At(()=>{let{value:P}=Be,{value:Z}=Me,{value:le}=t,{value:Ce}=l,{value:Ke}=a;Ce&&(P?Ce.classList.remove(`${le}-scrollbar-rail--disabled`):Ce.classList.add(`${le}-scrollbar-rail--disabled`)),Ke&&(Z?Ke.classList.remove(`${le}-scrollbar-rail--disabled`):Ke.classList.add(`${le}-scrollbar-rail--disabled`))}),tt(()=>{e.container||oe()}),Pt(()=>{S!==void 0&&window.clearTimeout(S),v!==void 0&&window.clearTimeout(v),ht("mousemove",window,V,!0),ht("mouseup",window,ae,!0)});let pe=Ct("Scrollbar","-scrollbar",Av,_t,e,t),_=F(()=>{let{common:{cubicBezierEaseInOut:P,scrollbarBorderRadius:Z,scrollbarHeight:le,scrollbarWidth:Ce},self:{color:Ke,colorHover:He}}=pe.value;return{"--n-scrollbar-bezier":P,"--n-scrollbar-color":Ke,"--n-scrollbar-color-hover":He,"--n-scrollbar-border-radius":Z,"--n-scrollbar-width":Ce,"--n-scrollbar-height":le}}),W=o?qt("scrollbar",void 0,_,e):void 0;return Object.assign(Object.assign({},{scrollTo:wt,scrollBy:ze,sync:oe,syncUnifiedContainer:ne,handleMouseEnterWrapper:vt,handleMouseLeaveWrapper:Pe}),{mergedClsPrefix:t,containerScrollTop:m,wrapperRef:r,containerRef:n,contentRef:i,yRailRef:a,xRailRef:l,needYBar:Me,needXBar:Be,yBarSizePx:M,xBarSizePx:ye,yBarTopPx:fe,xBarLeftPx:we,isShowXBar:w,isShowYBar:g,isIos:E,handleScroll:L,handleContentResize:Xe,handleContainerResize:ct,handleYScrollMouseDown:$,handleXScrollMouseDown:Q,cssVars:o?void 0:_,themeClass:W?.themeClass,onRender:W?.onRender})},render(){var e;let{$slots:t,mergedClsPrefix:o,triggerDisplayManually:r}=this;if(!this.scrollable)return(e=t.default)===null||e===void 0?void 0:e.call(t);let n=()=>{var i,a;return(i=this.onRender)===null||i===void 0||i.call(this),b("div",Ti(this.$attrs,{role:"none",ref:"wrapperRef",class:[`${o}-scrollbar`,this.themeClass],style:this.cssVars,onMouseenter:r?void 0:this.handleMouseEnterWrapper,onMouseleave:r?void 0:this.handleMouseLeaveWrapper}),[this.container?(a=t.default)===null||a===void 0?void 0:a.call(t):b("div",{role:"none",ref:"containerRef",class:[`${o}-scrollbar-container`,this.containerClass],style:this.containerStyle,onScroll:this.handleScroll,onWheel:this.onWheel},b(Po,{onResize:this.handleContentResize},{default:()=>b("div",{ref:"contentRef",role:"none",style:[{width:this.xScrollable?"fit-content":null},this.contentStyle],class:[`${o}-scrollbar-content`,this.contentClass]},t)})),b("div",{ref:"yRailRef",class:`${o}-scrollbar-rail ${o}-scrollbar-rail--vertical`,style:this.horizontalRailStyle,"aria-hidden":!0},b(To,{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?b("div",{class:`${o}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),b("div",{ref:"xRailRef",class:`${o}-scrollbar-rail ${o}-scrollbar-rail--horizontal`,style:this.verticalRailStyle,"aria-hidden":!0},b(To,{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?b("div",{class:`${o}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,left:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])};return this.container?n():b(Po,{onResize:this.handleContainerResize},{default:n})}}),is=Mv,oa=Mv;var $v={height:"calc(var(--n-option-height) * 7.6)",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"};var Dd=e=>{let{borderRadius:t,popoverColor:o,textColor3:r,dividerColor:n,textColor2:i,primaryColorPressed:a,textColorDisabled:l,primaryColor:s,opacityDisabled:c,hoverColor:d,fontSizeSmall:u,fontSizeMedium:p,fontSizeLarge:f,fontSizeHuge:m,heightSmall:y,heightMedium:w,heightLarge:g,heightHuge:O}=e;return Object.assign(Object.assign({},$v),{optionFontSizeSmall:u,optionFontSizeMedium:p,optionFontSizeLarge:f,optionFontSizeHuge:m,optionHeightSmall:y,optionHeightMedium:w,optionHeightLarge:g,optionHeightHuge:O,borderRadius:t,color:o,groupHeaderTextColor:r,actionDividerColor:n,optionTextColor:i,optionTextColorPressed:a,optionTextColorDisabled:l,optionTextColorActive:s,optionOpacityDisabled:c,optionCheckColor:s,optionColorPending:d,optionColorActive:d,actionTextColor:i,loadingColor:s})},mT={name:"InternalSelectMenu",common:ge,peers:{Scrollbar:_t,Empty:uo},self:Dd},vn=mT;var hT={name:"InternalSelectMenu",common:R,peers:{Scrollbar:at,Empty:fo},self:Dd},No=hT;var{cubicBezierEaseIn:Lv,cubicBezierEaseOut:zv}=Ut;function Td({transformOrigin:e="inherit",duration:t=".2s",enterScale:o=".9",originalTransform:r="",originalTransition:n=""}={}){return[J("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${Lv}, transform ${t} ${Lv} ${n&&","+n}`}),J("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${zv}, transform ${t} ${zv} ${n&&","+n}`}),J("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${r} scale(${o})`}),J("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${r} scale(1)`})]}var Bv=U("base-wave",` + `,[Iv(),J("&:hover",{backgroundColor:"var(--n-scrollbar-color-hover)"})])])])])]);var fT=Object.assign(Object.assign({},wt.props),{size:{type:Number,default:5},duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:String,contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function}),Mv=de({name:"Scrollbar",props:fT,inheritAttrs:!1,setup(e){let{mergedClsPrefixRef:t,inlineThemeDisabled:o}=At(e),r=Z(null),n=Z(null),i=Z(null),a=Z(null),l=Z(null),s=Z(null),c=Z(null),d=Z(null),u=Z(null),p=Z(null),f=Z(null),m=Z(0),y=Z(0),_=Z(!1),h=Z(!1),O=!1,W=!1,w,b,D=0,x=0,k=0,A=0,E=Cl(),H=j(()=>{let{value:T}=d,{value:L}=s,{value:ae}=p;return T===null||L===null||ae===null?0:Math.min(T,ae*T/L+e.size*1.5)}),M=j(()=>`${H.value}px`),le=j(()=>{let{value:T}=u,{value:L}=c,{value:ae}=f;return T===null||L===null||ae===null?0:ae*T/L+e.size*1.5}),ye=j(()=>`${le.value}px`),Pe=j(()=>{let{value:T}=d,{value:L}=m,{value:ae}=s,{value:he}=p;if(T===null||ae===null||he===null)return 0;{let Ne=ae-T;return Ne?L/Ne*(he-H.value):0}}),fe=j(()=>`${Pe.value}px`),ce=j(()=>{let{value:T}=u,{value:L}=y,{value:ae}=c,{value:he}=f;if(T===null||ae===null||he===null)return 0;{let Ne=ae-T;return Ne?L/Ne*(he-le.value):0}}),Ce=j(()=>`${ce.value}px`),Ke=j(()=>{let{value:T}=d,{value:L}=s;return T!==null&&L!==null&&L>T}),He=j(()=>{let{value:T}=u,{value:L}=c;return T!==null&&L!==null&&L>T}),Me=j(()=>{let{container:T}=e;return T?T():n.value}),Ye=j(()=>{let{content:T}=e;return T?T():i.value}),Xe=oe,Dt=T=>{let{onResize:L}=e;L&&L(T),oe()},pt=(T,L)=>{if(!e.scrollable)return;if(typeof T=="number"){We(T,L??0,0,!1,"auto");return}let{left:ae,top:he,index:Ne,elSize:Be,position:Ge,behavior:Ve,el:$t,debounce:Ft=!0}=T;(ae!==void 0||he!==void 0)&&We(ae??0,he??0,0,!1,Ve),$t!==void 0?We(0,$t.offsetTop,$t.offsetHeight,Ft,Ve):Ne!==void 0&&Be!==void 0?We(0,Ne*Be,Be,Ft,Ve):Ge==="bottom"?We(0,Number.MAX_SAFE_INTEGER,0,!1,Ve):Ge==="top"&&We(0,0,0,!1,Ve)},Le=(T,L)=>{if(!e.scrollable)return;let{value:ae}=Me;ae&&(typeof T=="object"?ae.scrollBy(T):ae.scrollBy(T,L||0))};function We(T,L,ae,he,Ne){let{value:Be}=Me;if(Be){if(he){let{scrollTop:Ge,offsetHeight:Ve}=Be;if(L>Ge){L+ae<=Ge+Ve||Be.scrollTo({left:T,top:L+ae-Ve,behavior:Ne});return}}Be.scrollTo({left:T,top:L,behavior:Ne})}}function gt(){g(),C(),oe()}function Re(){lt()}function lt(){bt(),mt()}function bt(){b!==void 0&&window.clearTimeout(b),b=window.setTimeout(()=>{h.value=!1},e.duration)}function mt(){w!==void 0&&window.clearTimeout(w),w=window.setTimeout(()=>{_.value=!1},e.duration)}function g(){w!==void 0&&window.clearTimeout(w),_.value=!0}function C(){b!==void 0&&window.clearTimeout(b),h.value=!0}function z(T){let{onScroll:L}=e;L&&L(T),q()}function q(){let{value:T}=Me;T&&(m.value=T.scrollTop,y.value=T.scrollLeft)}function G(){let{value:T}=Ye;T&&(s.value=T.offsetHeight,c.value=T.offsetWidth);let{value:L}=Me;L&&(d.value=L.offsetHeight,u.value=L.offsetWidth);let{value:ae}=l,{value:he}=a;ae&&(f.value=ae.offsetWidth),he&&(p.value=he.offsetHeight)}function re(){let{value:T}=Me;T&&(m.value=T.scrollTop,y.value=T.scrollLeft,d.value=T.offsetHeight,u.value=T.offsetWidth,s.value=T.scrollHeight,c.value=T.scrollWidth);let{value:L}=l,{value:ae}=a;L&&(f.value=L.offsetWidth),ae&&(p.value=ae.offsetHeight)}function oe(){e.scrollable&&(e.useUnifiedContainer?re():(G(),q()))}function F(T){var L;return!(!((L=r.value)===null||L===void 0)&&L.contains(T.target))}function Q(T){T.preventDefault(),T.stopPropagation(),W=!0,xt("mousemove",window,X,!0),xt("mouseup",window,P,!0),x=y.value,k=T.clientX}function X(T){if(!W)return;w!==void 0&&window.clearTimeout(w),b!==void 0&&window.clearTimeout(b);let{value:L}=u,{value:ae}=c,{value:he}=le;if(L===null||ae===null)return;let Be=(T.clientX-k)*(ae-L)/(L-he),Ge=ae-L,Ve=x+Be;Ve=Math.min(Ge,Ve),Ve=Math.max(Ve,0);let{value:$t}=Me;if($t){$t.scrollLeft=Ve;let{internalOnUpdateScrollLeft:Ft}=e;Ft&&Ft(Ve)}}function P(T){T.preventDefault(),T.stopPropagation(),ht("mousemove",window,X,!0),ht("mouseup",window,P,!0),W=!1,oe(),F(T)&<()}function $(T){T.preventDefault(),T.stopPropagation(),O=!0,xt("mousemove",window,V,!0),xt("mouseup",window,ie,!0),D=m.value,A=T.clientY}function V(T){if(!O)return;w!==void 0&&window.clearTimeout(w),b!==void 0&&window.clearTimeout(b);let{value:L}=d,{value:ae}=s,{value:he}=H;if(L===null||ae===null)return;let Be=(T.clientY-A)*(ae-L)/(L-he),Ge=ae-L,Ve=D+Be;Ve=Math.min(Ge,Ve),Ve=Math.max(Ve,0);let{value:$t}=Me;$t&&($t.scrollTop=Ve)}function ie(T){T.preventDefault(),T.stopPropagation(),ht("mousemove",window,V,!0),ht("mouseup",window,ie,!0),O=!1,oe(),F(T)&<()}Nt(()=>{let{value:T}=He,{value:L}=Ke,{value:ae}=t,{value:he}=l,{value:Ne}=a;he&&(T?he.classList.remove(`${ae}-scrollbar-rail--disabled`):he.classList.add(`${ae}-scrollbar-rail--disabled`)),Ne&&(L?Ne.classList.remove(`${ae}-scrollbar-rail--disabled`):Ne.classList.add(`${ae}-scrollbar-rail--disabled`))}),Je(()=>{e.container||oe()}),Pt(()=>{w!==void 0&&window.clearTimeout(w),b!==void 0&&window.clearTimeout(b),ht("mousemove",window,V,!0),ht("mouseup",window,ie,!0)});let ue=wt("Scrollbar","-scrollbar",Av,_t,e,t),Se=j(()=>{let{common:{cubicBezierEaseInOut:T,scrollbarBorderRadius:L,scrollbarHeight:ae,scrollbarWidth:he},self:{color:Ne,colorHover:Be}}=ue.value;return{"--n-scrollbar-bezier":T,"--n-scrollbar-color":Ne,"--n-scrollbar-color-hover":Be,"--n-scrollbar-border-radius":L,"--n-scrollbar-width":he,"--n-scrollbar-height":ae}}),S=o?Gt("scrollbar",void 0,Se,e):void 0;return Object.assign(Object.assign({},{scrollTo:pt,scrollBy:Le,sync:oe,syncUnifiedContainer:re,handleMouseEnterWrapper:gt,handleMouseLeaveWrapper:Re}),{mergedClsPrefix:t,containerScrollTop:m,wrapperRef:r,containerRef:n,contentRef:i,yRailRef:a,xRailRef:l,needYBar:Ke,needXBar:He,yBarSizePx:M,xBarSizePx:ye,yBarTopPx:fe,xBarLeftPx:Ce,isShowXBar:_,isShowYBar:h,isIos:E,handleScroll:z,handleContentResize:Xe,handleContainerResize:Dt,handleYScrollMouseDown:$,handleXScrollMouseDown:Q,cssVars:o?void 0:Se,themeClass:S?.themeClass,onRender:S?.onRender})},render(){var e;let{$slots:t,mergedClsPrefix:o,triggerDisplayManually:r}=this;if(!this.scrollable)return(e=t.default)===null||e===void 0?void 0:e.call(t);let n=()=>{var i,a;return(i=this.onRender)===null||i===void 0||i.call(this),v("div",Ti(this.$attrs,{role:"none",ref:"wrapperRef",class:[`${o}-scrollbar`,this.themeClass],style:this.cssVars,onMouseenter:r?void 0:this.handleMouseEnterWrapper,onMouseleave:r?void 0:this.handleMouseLeaveWrapper}),[this.container?(a=t.default)===null||a===void 0?void 0:a.call(t):v("div",{role:"none",ref:"containerRef",class:[`${o}-scrollbar-container`,this.containerClass],style:this.containerStyle,onScroll:this.handleScroll,onWheel:this.onWheel},v(No,{onResize:this.handleContentResize},{default:()=>v("div",{ref:"contentRef",role:"none",style:[{width:this.xScrollable?"fit-content":null},this.contentStyle],class:[`${o}-scrollbar-content`,this.contentClass]},t)})),v("div",{ref:"yRailRef",class:`${o}-scrollbar-rail ${o}-scrollbar-rail--vertical`,style:this.horizontalRailStyle,"aria-hidden":!0},v(To,{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?v("div",{class:`${o}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),v("div",{ref:"xRailRef",class:`${o}-scrollbar-rail ${o}-scrollbar-rail--horizontal`,style:this.verticalRailStyle,"aria-hidden":!0},v(To,{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?v("div",{class:`${o}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,left:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])};return this.container?n():v(No,{onResize:this.handleContainerResize},{default:n})}}),as=Mv,oa=Mv;var $v={height:"calc(var(--n-option-height) * 7.6)",paddingSmall:"4px 0",paddingMedium:"4px 0",paddingLarge:"4px 0",paddingHuge:"4px 0",optionPaddingSmall:"0 12px",optionPaddingMedium:"0 12px",optionPaddingLarge:"0 12px",optionPaddingHuge:"0 12px",loadingSize:"18px"};var Dd=e=>{let{borderRadius:t,popoverColor:o,textColor3:r,dividerColor:n,textColor2:i,primaryColorPressed:a,textColorDisabled:l,primaryColor:s,opacityDisabled:c,hoverColor:d,fontSizeSmall:u,fontSizeMedium:p,fontSizeLarge:f,fontSizeHuge:m,heightSmall:y,heightMedium:_,heightLarge:h,heightHuge:O}=e;return Object.assign(Object.assign({},$v),{optionFontSizeSmall:u,optionFontSizeMedium:p,optionFontSizeLarge:f,optionFontSizeHuge:m,optionHeightSmall:y,optionHeightMedium:_,optionHeightLarge:h,optionHeightHuge:O,borderRadius:t,color:o,groupHeaderTextColor:r,actionDividerColor:n,optionTextColor:i,optionTextColorPressed:a,optionTextColorDisabled:l,optionTextColorActive:s,optionOpacityDisabled:c,optionCheckColor:s,optionColorPending:d,optionColorActive:d,actionTextColor:i,loadingColor:s})},pT={name:"InternalSelectMenu",common:ge,peers:{Scrollbar:_t,Empty:po},self:Dd},vn=pT;var mT={name:"InternalSelectMenu",common:R,peers:{Scrollbar:nt,Empty:mo},self:Dd},Po=mT;var{cubicBezierEaseIn:Lv,cubicBezierEaseOut:zv}=qt;function Td({transformOrigin:e="inherit",duration:t=".2s",enterScale:o=".9",originalTransform:r="",originalTransition:n=""}={}){return[J("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${Lv}, transform ${t} ${Lv} ${n&&","+n}`}),J("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${zv}, transform ${t} ${zv} ${n&&","+n}`}),J("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${r} scale(${o})`}),J("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${r} scale(1)`})]}var Bv=U("base-wave",` position: absolute; left: 0; right: 0; top: 0; bottom: 0; border-radius: inherit; -`);var as=ue({name:"BaseWave",props:{clsPrefix:{type:String,required:!0}},setup(e){er("-base-wave",Bv,Re(e,"clsPrefix"));let t=X(null),o=X(!1),r=null;return Pt(()=>{r!==null&&window.clearTimeout(r)}),{active:o,selfRef:t,play(){r!==null&&(window.clearTimeout(r),o.value=!1,r=null),Bt(()=>{var n;(n=t.value)===null||n===void 0||n.offsetHeight,o.value=!0,r=window.setTimeout(()=>{o.value=!1,r=null},1e3)})}}},render(){let{clsPrefix:e}=this;return b("div",{ref:"selfRef","aria-hidden":!0,class:[`${e}-base-wave`,this.active&&`${e}-base-wave--active`]})}});var Hv={space:"6px",spaceArrow:"10px",arrowOffset:"10px",arrowOffsetVertical:"10px",arrowHeight:"6px",padding:"8px 14px"};var Od=e=>{let{boxShadow2:t,popoverColor:o,textColor2:r,borderRadius:n,fontSize:i,dividerColor:a}=e;return Object.assign(Object.assign({},Hv),{fontSize:i,borderRadius:n,color:o,dividerColor:a,textColor:r,boxShadow:t})},gT={name:"Popover",common:ge,self:Od},Ro=gT;var xT={name:"Popover",common:R,self:Od},Qt=xT;var Vv={closeSizeSmall:"14px",closeSizeMedium:"14px",closeSizeLarge:"14px",padding:"0 7px",closeMargin:"0 0 0 3px",closeMarginRtl:"0 3px 0 0"};var vT={name:"Tag",common:R,self(e){let{textColor2:t,primaryColorHover:o,primaryColorPressed:r,primaryColor:n,infoColor:i,successColor:a,warningColor:l,errorColor:s,baseColor:c,borderColor:d,opacityDisabled:u,closeColor:p,closeColorHover:f,closeColorPressed:m,borderRadiusSmall:y,fontSizeTiny:w,fontSizeSmall:g,fontSizeMedium:O,heightTiny:j,heightSmall:S,heightMedium:v}=e;return Object.assign(Object.assign({},Vv),{heightSmall:j,heightMedium:S,heightLarge:v,borderRadius:y,opacityDisabled:u,fontSizeSmall:w,fontSizeMedium:g,fontSizeLarge:O,textColorCheckable:t,textColorHoverCheckable:o,textColorPressedCheckable:r,textColorChecked:c,colorCheckable:"#0000",colorHoverCheckable:"#0000",colorPressedCheckable:"#0000",colorChecked:n,colorCheckedHover:o,colorCheckedPressed:r,border:`1px solid ${d}`,textColor:t,color:"#0000",closeColor:p,closeColorHover:f,closeColorPressed:m,borderPrimary:`1px solid ${te(n,{alpha:.3})}`,textColorPrimary:n,colorPrimary:"#0000",closeColorPrimary:te(n,{alpha:.7}),closeColorHoverPrimary:te(n,{alpha:.85}),closeColorPressedPrimary:te(n,{alpha:.57}),borderInfo:`1px solid ${te(i,{alpha:.3})}`,textColorInfo:i,colorInfo:"#0000",closeColorInfo:te(i,{alpha:.7}),closeColorHoverInfo:te(i,{alpha:.85}),closeColorPressedInfo:te(i,{alpha:.57}),borderSuccess:`1px solid ${te(a,{alpha:.3})}`,textColorSuccess:a,colorSuccess:"#0000",closeColorSuccess:te(a,{alpha:.7}),closeColorHoverSuccess:te(a,{alpha:.85}),closeColorPressedSuccess:te(a,{alpha:.57}),borderWarning:`1px solid ${te(l,{alpha:.3})}`,textColorWarning:l,colorWarning:"#0000",closeColorWarning:te(l,{alpha:.7}),closeColorHoverWarning:te(l,{alpha:.85}),closeColorPressedWarning:te(l,{alpha:.57}),borderError:`1px solid ${te(s,{alpha:.3})}`,textColorError:s,colorError:"#0000",closeColorError:te(s,{alpha:.7}),closeColorHoverError:te(s,{alpha:.85}),closeColorPressedError:te(s,{alpha:.57})})}},ra=vT;function bn(e,t,o){if(!t)return;let r=bo(),n=F(()=>{let{value:a}=t;if(!a)return;let l=a[e];if(l)return l}),i=()=>{At(()=>{let{value:a}=o,l=`${a}${e}Rtl`;if(Lc(l,r))return;let{value:s}=n;s&&s.style.mount({id:l,head:!0,anchorMetaName:Fr,props:{bPrefix:a?`.${a}-`:void 0},ssr:r})})};return r?i():cr(i),n}var Fv=U("base-clear",` +`);var ls=de({name:"BaseWave",props:{clsPrefix:{type:String,required:!0}},setup(e){er("-base-wave",Bv,Ae(e,"clsPrefix"));let t=Z(null),o=Z(!1),r=null;return Pt(()=>{r!==null&&window.clearTimeout(r)}),{active:o,selfRef:t,play(){r!==null&&(window.clearTimeout(r),o.value=!1,r=null),Bt(()=>{var n;(n=t.value)===null||n===void 0||n.offsetHeight,o.value=!0,r=window.setTimeout(()=>{o.value=!1,r=null},1e3)})}}},render(){let{clsPrefix:e}=this;return v("div",{ref:"selfRef","aria-hidden":!0,class:[`${e}-base-wave`,this.active&&`${e}-base-wave--active`]})}});var Hv={space:"6px",spaceArrow:"10px",arrowOffset:"10px",arrowOffsetVertical:"10px",arrowHeight:"6px",padding:"8px 14px"};var Od=e=>{let{boxShadow2:t,popoverColor:o,textColor2:r,borderRadius:n,fontSize:i,dividerColor:a}=e;return Object.assign(Object.assign({},Hv),{fontSize:i,borderRadius:n,color:o,dividerColor:a,textColor:r,boxShadow:t})},hT={name:"Popover",common:ge,self:Od},Ro=hT;var gT={name:"Popover",common:R,self:Od},Jt=gT;var Vv={closeSizeSmall:"14px",closeSizeMedium:"14px",closeSizeLarge:"14px",padding:"0 7px",closeMargin:"0 0 0 3px",closeMarginRtl:"0 3px 0 0"};var xT={name:"Tag",common:R,self(e){let{textColor2:t,primaryColorHover:o,primaryColorPressed:r,primaryColor:n,infoColor:i,successColor:a,warningColor:l,errorColor:s,baseColor:c,borderColor:d,opacityDisabled:u,closeColor:p,closeColorHover:f,closeColorPressed:m,borderRadiusSmall:y,fontSizeTiny:_,fontSizeSmall:h,fontSizeMedium:O,heightTiny:W,heightSmall:w,heightMedium:b}=e;return Object.assign(Object.assign({},Vv),{heightSmall:W,heightMedium:w,heightLarge:b,borderRadius:y,opacityDisabled:u,fontSizeSmall:_,fontSizeMedium:h,fontSizeLarge:O,textColorCheckable:t,textColorHoverCheckable:o,textColorPressedCheckable:r,textColorChecked:c,colorCheckable:"#0000",colorHoverCheckable:"#0000",colorPressedCheckable:"#0000",colorChecked:n,colorCheckedHover:o,colorCheckedPressed:r,border:`1px solid ${d}`,textColor:t,color:"#0000",closeColor:p,closeColorHover:f,closeColorPressed:m,borderPrimary:`1px solid ${te(n,{alpha:.3})}`,textColorPrimary:n,colorPrimary:"#0000",closeColorPrimary:te(n,{alpha:.7}),closeColorHoverPrimary:te(n,{alpha:.85}),closeColorPressedPrimary:te(n,{alpha:.57}),borderInfo:`1px solid ${te(i,{alpha:.3})}`,textColorInfo:i,colorInfo:"#0000",closeColorInfo:te(i,{alpha:.7}),closeColorHoverInfo:te(i,{alpha:.85}),closeColorPressedInfo:te(i,{alpha:.57}),borderSuccess:`1px solid ${te(a,{alpha:.3})}`,textColorSuccess:a,colorSuccess:"#0000",closeColorSuccess:te(a,{alpha:.7}),closeColorHoverSuccess:te(a,{alpha:.85}),closeColorPressedSuccess:te(a,{alpha:.57}),borderWarning:`1px solid ${te(l,{alpha:.3})}`,textColorWarning:l,colorWarning:"#0000",closeColorWarning:te(l,{alpha:.7}),closeColorHoverWarning:te(l,{alpha:.85}),closeColorPressedWarning:te(l,{alpha:.57}),borderError:`1px solid ${te(s,{alpha:.3})}`,textColorError:s,colorError:"#0000",closeColorError:te(s,{alpha:.7}),closeColorHoverError:te(s,{alpha:.85}),closeColorPressedError:te(s,{alpha:.57})})}},ra=xT;function bn(e,t,o){if(!t)return;let r=bo(),n=j(()=>{let{value:a}=t;if(!a)return;let l=a[e];if(l)return l}),i=()=>{Nt(()=>{let{value:a}=o,l=`${a}${e}Rtl`;if(Lc(l,r))return;let{value:s}=n;s&&s.style.mount({id:l,head:!0,anchorMetaName:Fr,props:{bPrefix:a?`.${a}-`:void 0},ssr:r})})};return r?i():cr(i),n}var Fv=U("base-clear",` flex-shrink: 0; height: 1em; width: 1em; @@ -269,7 +269,7 @@ ${t} left: 50%; top: 50%; transform: translateX(-50%) translateY(-50%); - `,[co({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]);var yn=ue({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return er("-base-clear",Fv,Re(e,"clsPrefix")),{handleMouseDown(t){t.preventDefault()}}},render(){let{clsPrefix:e}=this;return b("div",{class:`${e}-base-clear`},b(So,null,{default:()=>{var t,o;return this.show?b(_o,{clsPrefix:e,key:"dismiss",class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},{default:()=>b(xd,null)}):b("div",{key:"icon",class:`${e}-base-clear__placeholder`},(o=(t=this.$slots).default)===null||o===void 0?void 0:o.call(t))}}))}});var ls=ue({name:"InternalSelectionSuffix",props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{let{clsPrefix:o}=e;return b(jr,{clsPrefix:o,class:`${o}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?b(yn,{clsPrefix:o,show:e.showClear,onClear:e.onClear},{default:()=>b(_o,{clsPrefix:o,class:`${o}-base-suffix__arrow`},{default:()=>Yo(t.default,()=>[b(gd,null)])})}):null})}}});var ss={paddingSingle:"0 26px 0 12px",paddingMultiple:"3px 26px 0 12px",clearSize:"16px",arrowSize:"16px"};var bT=e=>{let{borderRadius:t,textColor2:o,textColorDisabled:r,inputColor:n,inputColorDisabled:i,primaryColor:a,primaryColorHover:l,warningColor:s,warningColorHover:c,errorColor:d,errorColorHover:u,borderColor:p,iconColor:f,iconColorDisabled:m,clearColor:y,clearColorHover:w,clearColorPressed:g,placeholderColor:O,placeholderColorDisabled:j,fontSizeTiny:S,fontSizeSmall:v,fontSizeMedium:D,fontSizeLarge:x,heightTiny:k,heightSmall:A,heightMedium:E,heightLarge:z}=e;return Object.assign(Object.assign({},ss),{fontSizeTiny:S,fontSizeSmall:v,fontSizeMedium:D,fontSizeLarge:x,heightTiny:k,heightSmall:A,heightMedium:E,heightLarge:z,borderRadius:t,textColor:o,textColorDisabled:r,placeholderColor:O,placeholderColorDisabled:j,color:n,colorDisabled:i,colorActive:n,border:`1px solid ${p}`,borderHover:`1px solid ${l}`,borderActive:`1px solid ${a}`,borderFocus:`1px solid ${l}`,boxShadowHover:"none",boxShadowActive:`0 0 0 2px ${te(a,{alpha:.2})}`,boxShadowFocus:`0 0 0 2px ${te(a,{alpha:.2})}`,caretColor:a,arrowColor:f,arrowColorDisabled:m,loadingColor:a,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${c}`,borderActiveWarning:`1px solid ${s}`,borderFocusWarning:`1px solid ${c}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 0 2px ${te(s,{alpha:.2})}`,boxShadowFocusWarning:`0 0 0 2px ${te(s,{alpha:.2})}`,colorActiveWarning:n,caretColorWarning:s,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${u}`,borderActiveError:`1px solid ${d}`,borderFocusError:`1px solid ${u}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 0 2px ${te(d,{alpha:.2})}`,boxShadowFocusError:`0 0 0 2px ${te(d,{alpha:.2})}`,colorActiveError:n,caretColorError:d,clearColor:y,clearColorHover:w,clearColorPressed:g})},yT={name:"InternalSelection",common:ge,peers:{Popover:Ro},self:bT},na=yT;var CT={name:"InternalSelection",common:R,peers:{Popover:Qt},self(e){let{borderRadius:t,textColor2:o,textColorDisabled:r,inputColor:n,inputColorDisabled:i,primaryColor:a,primaryColorHover:l,warningColor:s,warningColorHover:c,errorColor:d,errorColorHover:u,iconColor:p,iconColorDisabled:f,clearColor:m,clearColorHover:y,clearColorPressed:w,placeholderColor:g,placeholderColorDisabled:O,fontSizeTiny:j,fontSizeSmall:S,fontSizeMedium:v,fontSizeLarge:D,heightTiny:x,heightSmall:k,heightMedium:A,heightLarge:E}=e;return Object.assign(Object.assign({},ss),{fontSizeTiny:j,fontSizeSmall:S,fontSizeMedium:v,fontSizeLarge:D,heightTiny:x,heightSmall:k,heightMedium:A,heightLarge:E,borderRadius:t,textColor:o,textColorDisabled:r,placeholderColor:g,placeholderColorDisabled:O,color:n,colorDisabled:i,colorActive:te(a,{alpha:.1}),border:"1px solid #0000",borderHover:`1px solid ${l}`,borderActive:`1px solid ${a}`,borderFocus:`1px solid ${l}`,boxShadowHover:"none",boxShadowActive:`0 0 8px 0 ${te(a,{alpha:.4})}`,boxShadowFocus:`0 0 8px 0 ${te(a,{alpha:.4})}`,caretColor:a,arrowColor:p,arrowColorDisabled:f,loadingColor:a,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${c}`,borderActiveWarning:`1px solid ${s}`,borderFocusWarning:`1px solid ${c}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 8px 0 ${te(s,{alpha:.4})}`,boxShadowFocusWarning:`0 0 8px 0 ${te(s,{alpha:.4})}`,colorActiveWarning:te(s,{alpha:.1}),caretColorWarning:s,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${u}`,borderActiveError:`1px solid ${d}`,borderFocusError:`1px solid ${u}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 8px 0 ${te(d,{alpha:.4})}`,boxShadowFocusError:`0 0 8px 0 ${te(d,{alpha:.4})}`,colorActiveError:te(d,{alpha:.1}),caretColorError:d,clearColor:m,clearColorHover:y,clearColorPressed:w})}},Cn=CT;var{cubicBezierEaseInOut:Wr}=Ut;function jv({duration:e=".2s",delay:t=".1s"}={}){return[J("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),J("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",` + `,[fo({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]);var yn=de({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return er("-base-clear",Fv,Ae(e,"clsPrefix")),{handleMouseDown(t){t.preventDefault()}}},render(){let{clsPrefix:e}=this;return v("div",{class:`${e}-base-clear`},v(So,null,{default:()=>{var t,o;return this.show?v(_o,{clsPrefix:e,key:"dismiss",class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},{default:()=>v(xd,null)}):v("div",{key:"icon",class:`${e}-base-clear__placeholder`},(o=(t=this.$slots).default)===null||o===void 0?void 0:o.call(t))}}))}});var ss=de({name:"InternalSelectionSuffix",props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{let{clsPrefix:o}=e;return v(jr,{clsPrefix:o,class:`${o}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?v(yn,{clsPrefix:o,show:e.showClear,onClear:e.onClear},{default:()=>v(_o,{clsPrefix:o,class:`${o}-base-suffix__arrow`},{default:()=>Yo(t.default,()=>[v(gd,null)])})}):null})}}});var cs={paddingSingle:"0 26px 0 12px",paddingMultiple:"3px 26px 0 12px",clearSize:"16px",arrowSize:"16px"};var vT=e=>{let{borderRadius:t,textColor2:o,textColorDisabled:r,inputColor:n,inputColorDisabled:i,primaryColor:a,primaryColorHover:l,warningColor:s,warningColorHover:c,errorColor:d,errorColorHover:u,borderColor:p,iconColor:f,iconColorDisabled:m,clearColor:y,clearColorHover:_,clearColorPressed:h,placeholderColor:O,placeholderColorDisabled:W,fontSizeTiny:w,fontSizeSmall:b,fontSizeMedium:D,fontSizeLarge:x,heightTiny:k,heightSmall:A,heightMedium:E,heightLarge:H}=e;return Object.assign(Object.assign({},cs),{fontSizeTiny:w,fontSizeSmall:b,fontSizeMedium:D,fontSizeLarge:x,heightTiny:k,heightSmall:A,heightMedium:E,heightLarge:H,borderRadius:t,textColor:o,textColorDisabled:r,placeholderColor:O,placeholderColorDisabled:W,color:n,colorDisabled:i,colorActive:n,border:`1px solid ${p}`,borderHover:`1px solid ${l}`,borderActive:`1px solid ${a}`,borderFocus:`1px solid ${l}`,boxShadowHover:"none",boxShadowActive:`0 0 0 2px ${te(a,{alpha:.2})}`,boxShadowFocus:`0 0 0 2px ${te(a,{alpha:.2})}`,caretColor:a,arrowColor:f,arrowColorDisabled:m,loadingColor:a,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${c}`,borderActiveWarning:`1px solid ${s}`,borderFocusWarning:`1px solid ${c}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 0 2px ${te(s,{alpha:.2})}`,boxShadowFocusWarning:`0 0 0 2px ${te(s,{alpha:.2})}`,colorActiveWarning:n,caretColorWarning:s,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${u}`,borderActiveError:`1px solid ${d}`,borderFocusError:`1px solid ${u}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 0 2px ${te(d,{alpha:.2})}`,boxShadowFocusError:`0 0 0 2px ${te(d,{alpha:.2})}`,colorActiveError:n,caretColorError:d,clearColor:y,clearColorHover:_,clearColorPressed:h})},bT={name:"InternalSelection",common:ge,peers:{Popover:Ro},self:vT},na=bT;var yT={name:"InternalSelection",common:R,peers:{Popover:Jt},self(e){let{borderRadius:t,textColor2:o,textColorDisabled:r,inputColor:n,inputColorDisabled:i,primaryColor:a,primaryColorHover:l,warningColor:s,warningColorHover:c,errorColor:d,errorColorHover:u,iconColor:p,iconColorDisabled:f,clearColor:m,clearColorHover:y,clearColorPressed:_,placeholderColor:h,placeholderColorDisabled:O,fontSizeTiny:W,fontSizeSmall:w,fontSizeMedium:b,fontSizeLarge:D,heightTiny:x,heightSmall:k,heightMedium:A,heightLarge:E}=e;return Object.assign(Object.assign({},cs),{fontSizeTiny:W,fontSizeSmall:w,fontSizeMedium:b,fontSizeLarge:D,heightTiny:x,heightSmall:k,heightMedium:A,heightLarge:E,borderRadius:t,textColor:o,textColorDisabled:r,placeholderColor:h,placeholderColorDisabled:O,color:n,colorDisabled:i,colorActive:te(a,{alpha:.1}),border:"1px solid #0000",borderHover:`1px solid ${l}`,borderActive:`1px solid ${a}`,borderFocus:`1px solid ${l}`,boxShadowHover:"none",boxShadowActive:`0 0 8px 0 ${te(a,{alpha:.4})}`,boxShadowFocus:`0 0 8px 0 ${te(a,{alpha:.4})}`,caretColor:a,arrowColor:p,arrowColorDisabled:f,loadingColor:a,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${c}`,borderActiveWarning:`1px solid ${s}`,borderFocusWarning:`1px solid ${c}`,boxShadowHoverWarning:"none",boxShadowActiveWarning:`0 0 8px 0 ${te(s,{alpha:.4})}`,boxShadowFocusWarning:`0 0 8px 0 ${te(s,{alpha:.4})}`,colorActiveWarning:te(s,{alpha:.1}),caretColorWarning:s,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${u}`,borderActiveError:`1px solid ${d}`,borderFocusError:`1px solid ${u}`,boxShadowHoverError:"none",boxShadowActiveError:`0 0 8px 0 ${te(d,{alpha:.4})}`,boxShadowFocusError:`0 0 8px 0 ${te(d,{alpha:.4})}`,colorActiveError:te(d,{alpha:.1}),caretColorError:d,clearColor:m,clearColorHover:y,clearColorPressed:_})}},Cn=yT;var{cubicBezierEaseInOut:Wr}=qt;function jv({duration:e=".2s",delay:t=".1s"}={}){return[J("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),J("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",` opacity: 0!important; margin-left: 0!important; margin-right: 0!important; @@ -287,13 +287,13 @@ ${t} max-width ${e} ${Wr}, margin-left ${e} ${Wr}, margin-right ${e} ${Wr}; - `)]}var Wv={iconMargin:"12px 8px 0 12px",iconMarginRtl:"12px 12px 0 8px",iconSize:"26px",closeSize:"16px",closeMargin:"14px 16px 0 0",closeMarginRtl:"14px 0 0 16px",padding:"15px"};var wT={name:"Alert",common:R,self(e){let{lineHeight:t,borderRadius:o,fontWeightStrong:r,dividerColor:n,inputColor:i,textColor1:a,textColor2:l,closeColor:s,closeColorHover:c,closeColorPressed:d,infoColorSuppl:u,successColorSuppl:p,warningColorSuppl:f,errorColorSuppl:m,fontSize:y}=e;return Object.assign(Object.assign({},Wv),{fontSize:y,lineHeight:t,titleFontWeight:r,borderRadius:o,border:`1px solid ${n}`,color:i,titleTextColor:a,iconColor:l,contentTextColor:l,closeColor:s,closeColorHover:c,closeColorPressed:d,borderInfo:`1px solid ${te(u,{alpha:.35})}`,colorInfo:te(u,{alpha:.25}),titleTextColorInfo:a,iconColorInfo:u,contentTextColorInfo:l,closeColorInfo:s,closeColorHoverInfo:c,closeColorPressedInfo:d,borderSuccess:`1px solid ${te(p,{alpha:.35})}`,colorSuccess:te(p,{alpha:.25}),titleTextColorSuccess:a,iconColorSuccess:p,contentTextColorSuccess:l,closeColorSuccess:s,closeColorHoverSuccess:c,closeColorPressedSuccess:d,borderWarning:`1px solid ${te(f,{alpha:.35})}`,colorWarning:te(f,{alpha:.25}),titleTextColorWarning:a,iconColorWarning:f,contentTextColorWarning:l,closeColorWarning:s,closeColorHoverWarning:c,closeColorPressedWarning:d,borderError:`1px solid ${te(m,{alpha:.35})}`,colorError:te(m,{alpha:.25}),titleTextColorError:a,iconColorError:m,contentTextColorError:l,closeColorError:s,closeColorHoverError:c,closeColorPressedError:d})}},Pd=wT;var{cubicBezierEaseInOut:tr,cubicBezierEaseOut:kT,cubicBezierEaseIn:ST}=Ut;function Nd({overflow:e="hidden",duration:t=".3s",originalTransition:o="",leavingDelay:r="0s",foldPadding:n=!1,enterToProps:i=void 0,leaveToProps:a=void 0,reverse:l=!1}={}){let s=l?"leave":"enter",c=l?"enter":"leave";return[J(`&.fade-in-height-expand-transition-${c}-from, + `)]}var Wv={iconMargin:"12px 8px 0 12px",iconMarginRtl:"12px 12px 0 8px",iconSize:"26px",closeSize:"16px",closeMargin:"14px 16px 0 0",closeMarginRtl:"14px 0 0 16px",padding:"15px"};var CT={name:"Alert",common:R,self(e){let{lineHeight:t,borderRadius:o,fontWeightStrong:r,dividerColor:n,inputColor:i,textColor1:a,textColor2:l,closeColor:s,closeColorHover:c,closeColorPressed:d,infoColorSuppl:u,successColorSuppl:p,warningColorSuppl:f,errorColorSuppl:m,fontSize:y}=e;return Object.assign(Object.assign({},Wv),{fontSize:y,lineHeight:t,titleFontWeight:r,borderRadius:o,border:`1px solid ${n}`,color:i,titleTextColor:a,iconColor:l,contentTextColor:l,closeColor:s,closeColorHover:c,closeColorPressed:d,borderInfo:`1px solid ${te(u,{alpha:.35})}`,colorInfo:te(u,{alpha:.25}),titleTextColorInfo:a,iconColorInfo:u,contentTextColorInfo:l,closeColorInfo:s,closeColorHoverInfo:c,closeColorPressedInfo:d,borderSuccess:`1px solid ${te(p,{alpha:.35})}`,colorSuccess:te(p,{alpha:.25}),titleTextColorSuccess:a,iconColorSuccess:p,contentTextColorSuccess:l,closeColorSuccess:s,closeColorHoverSuccess:c,closeColorPressedSuccess:d,borderWarning:`1px solid ${te(f,{alpha:.35})}`,colorWarning:te(f,{alpha:.25}),titleTextColorWarning:a,iconColorWarning:f,contentTextColorWarning:l,closeColorWarning:s,closeColorHoverWarning:c,closeColorPressedWarning:d,borderError:`1px solid ${te(m,{alpha:.35})}`,colorError:te(m,{alpha:.25}),titleTextColorError:a,iconColorError:m,contentTextColorError:l,closeColorError:s,closeColorHoverError:c,closeColorPressedError:d})}},Nd=CT;var{cubicBezierEaseInOut:tr,cubicBezierEaseOut:wT,cubicBezierEaseIn:kT}=qt;function Pd({overflow:e="hidden",duration:t=".3s",originalTransition:o="",leavingDelay:r="0s",foldPadding:n=!1,enterToProps:i=void 0,leaveToProps:a=void 0,reverse:l=!1}={}){let s=l?"leave":"enter",c=l?"enter":"leave";return[J(`&.fade-in-height-expand-transition-${c}-from, &.fade-in-height-expand-transition-${s}-to`,Object.assign(Object.assign({},i),{opacity:1})),J(`&.fade-in-height-expand-transition-${c}-to, &.fade-in-height-expand-transition-${s}-from`,Object.assign(Object.assign({},a),{opacity:0,marginTop:"0 !important",marginBottom:"0 !important",paddingTop:n?"0 !important":void 0,paddingBottom:n?"0 !important":void 0})),J(`&.fade-in-height-expand-transition-${c}-active`,` overflow: ${e}; transition: max-height ${t} ${tr} ${r}, - opacity ${t} ${kT} ${r}, + opacity ${t} ${wT} ${r}, margin-top ${t} ${tr} ${r}, margin-bottom ${t} ${tr} ${r}, padding-top ${t} ${tr} ${r}, @@ -303,13 +303,13 @@ ${t} overflow: ${e}; transition: max-height ${t} ${tr}, - opacity ${t} ${ST}, + opacity ${t} ${kT}, margin-top ${t} ${tr}, margin-bottom ${t} ${tr}, padding-top ${t} ${tr}, padding-bottom ${t} ${tr} ${o?","+o:""} - `)]}var Kv={linkFontSize:"13px",linkPadding:"0 0 0 16px",railWidth:"4px"};var Uv=e=>{let{borderRadius:t,railColor:o,primaryColor:r,primaryColorHover:n,primaryColorPressed:i,textColor2:a}=e;return Object.assign(Object.assign({},Kv),{borderRadius:t,railColor:o,railColorActive:r,linkColor:te(r,{alpha:.15}),linkTextColor:a,linkTextColorHover:n,linkTextColorPressed:i,linkTextColorActive:r})};var _T={name:"Anchor",common:R,self:Uv},Rd=_T;var cs={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"};var ET={name:"Input",common:R,self(e){let{textColor2:t,textColor3:o,textColorDisabled:r,primaryColor:n,primaryColorHover:i,inputColor:a,inputColorDisabled:l,warningColor:s,warningColorHover:c,errorColor:d,errorColorHover:u,borderRadius:p,lineHeight:f,fontSizeTiny:m,fontSizeSmall:y,fontSizeMedium:w,fontSizeLarge:g,heightTiny:O,heightSmall:j,heightMedium:S,heightLarge:v,clearColor:D,clearColorHover:x,clearColorPressed:k,placeholderColor:A,placeholderColorDisabled:E,iconColor:z,iconColorDisabled:M,iconColorHover:se,iconColorPressed:ye}=e;return Object.assign(Object.assign({},cs),{countTextColor:o,heightTiny:O,heightSmall:j,heightMedium:S,heightLarge:v,fontSizeTiny:m,fontSizeSmall:y,fontSizeMedium:w,fontSizeLarge:g,lineHeight:f,lineHeightTextarea:f,borderRadius:p,iconSize:"16px",groupLabelColor:a,textColor:t,textColorDisabled:r,textDecorationColor:t,groupLabelTextColor:t,caretColor:n,placeholderColor:A,placeholderColorDisabled:E,color:a,colorDisabled:l,colorFocus:te(n,{alpha:.1}),groupLabelBorder:"1px solid #0000",border:"1px solid #0000",borderHover:`1px solid ${i}`,borderDisabled:"1px solid #0000",borderFocus:`1px solid ${i}`,boxShadowFocus:`0 0 8px 0 ${te(n,{alpha:.3})}`,loadingColor:n,loadingColorWarning:s,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${c}`,colorFocusWarning:te(s,{alpha:.1}),borderFocusWarning:`1px solid ${c}`,boxShadowFocusWarning:`0 0 8px 0 ${te(s,{alpha:.3})}`,caretColorWarning:s,loadingColorError:d,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${u}`,colorFocusError:te(d,{alpha:.1}),borderFocusError:`1px solid ${u}`,boxShadowFocusError:`0 0 8px 0 ${te(d,{alpha:.3})}`,caretColorError:d,clearColor:D,clearColorHover:x,clearColorPressed:k,iconColor:z,iconColorDisabled:M,iconColorHover:se,iconColorPressed:ye,suffixTextColor:t})}},xt=ET;var DT=e=>{let{textColor2:t,textColor3:o,textColorDisabled:r,primaryColor:n,primaryColorHover:i,inputColor:a,inputColorDisabled:l,borderColor:s,warningColor:c,warningColorHover:d,errorColor:u,errorColorHover:p,borderRadius:f,lineHeight:m,fontSizeTiny:y,fontSizeSmall:w,fontSizeMedium:g,fontSizeLarge:O,heightTiny:j,heightSmall:S,heightMedium:v,heightLarge:D,actionColor:x,clearColor:k,clearColorHover:A,clearColorPressed:E,placeholderColor:z,placeholderColorDisabled:M,iconColor:se,iconColorDisabled:ye,iconColorHover:Ie,iconColorPressed:fe}=e;return Object.assign(Object.assign({},cs),{countTextColor:o,heightTiny:j,heightSmall:S,heightMedium:v,heightLarge:D,fontSizeTiny:y,fontSizeSmall:w,fontSizeMedium:g,fontSizeLarge:O,lineHeight:m,lineHeightTextarea:m,borderRadius:f,iconSize:"16px",groupLabelColor:x,groupLabelTextColor:t,textColor:t,textColorDisabled:r,textDecorationColor:t,caretColor:n,placeholderColor:z,placeholderColorDisabled:M,color:a,colorDisabled:l,colorFocus:a,groupLabelBorder:`1px solid ${s}`,border:`1px solid ${s}`,borderHover:`1px solid ${i}`,borderDisabled:`1px solid ${s}`,borderFocus:`1px solid ${i}`,boxShadowFocus:`0 0 0 2px ${te(n,{alpha:.2})}`,loadingColor:n,loadingColorWarning:c,borderWarning:`1px solid ${c}`,borderHoverWarning:`1px solid ${d}`,colorFocusWarning:a,borderFocusWarning:`1px solid ${d}`,boxShadowFocusWarning:`0 0 0 2px ${te(c,{alpha:.2})}`,caretColorWarning:c,loadingColorError:u,borderError:`1px solid ${u}`,borderHoverError:`1px solid ${p}`,colorFocusError:a,borderFocusError:`1px solid ${p}`,boxShadowFocusError:`0 0 0 2px ${te(u,{alpha:.2})}`,caretColorError:u,clearColor:k,clearColorHover:A,clearColorPressed:E,iconColor:se,iconColorDisabled:ye,iconColorHover:Ie,iconColorPressed:fe,suffixTextColor:t})},TT={name:"Input",common:ge,self:DT},po=TT;var ds="n-input";function qv(e){let t=0;for(let o of e)t++;return t}function ia(e){return["",void 0,null].includes(e)}var Id=ue({name:"InputWordCount",setup(e,{slots:t}){let{mergedValueRef:o,maxlengthRef:r,mergedClsPrefixRef:n}=ke(ds),i=F(()=>{let{value:a}=o;return a===null||Array.isArray(a)?0:qv(a)});return()=>{let{value:a}=r,{value:l}=o;return b("span",{class:`${n.value}-input-word-count`},ul(t.default,{value:l===null||Array.isArray(l)?"":l},()=>[a===void 0?i.value:`${i.value} / ${a}`]))}}});var Gv=U("input",` + `)]}var Kv={linkFontSize:"13px",linkPadding:"0 0 0 16px",railWidth:"4px"};var Uv=e=>{let{borderRadius:t,railColor:o,primaryColor:r,primaryColorHover:n,primaryColorPressed:i,textColor2:a}=e;return Object.assign(Object.assign({},Kv),{borderRadius:t,railColor:o,railColorActive:r,linkColor:te(r,{alpha:.15}),linkTextColor:a,linkTextColorHover:n,linkTextColorPressed:i,linkTextColorActive:r})};var ST={name:"Anchor",common:R,self:Uv},Rd=ST;var ds={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"};var _T={name:"Input",common:R,self(e){let{textColor2:t,textColor3:o,textColorDisabled:r,primaryColor:n,primaryColorHover:i,inputColor:a,inputColorDisabled:l,warningColor:s,warningColorHover:c,errorColor:d,errorColorHover:u,borderRadius:p,lineHeight:f,fontSizeTiny:m,fontSizeSmall:y,fontSizeMedium:_,fontSizeLarge:h,heightTiny:O,heightSmall:W,heightMedium:w,heightLarge:b,clearColor:D,clearColorHover:x,clearColorPressed:k,placeholderColor:A,placeholderColorDisabled:E,iconColor:H,iconColorDisabled:M,iconColorHover:le,iconColorPressed:ye}=e;return Object.assign(Object.assign({},ds),{countTextColor:o,heightTiny:O,heightSmall:W,heightMedium:w,heightLarge:b,fontSizeTiny:m,fontSizeSmall:y,fontSizeMedium:_,fontSizeLarge:h,lineHeight:f,lineHeightTextarea:f,borderRadius:p,iconSize:"16px",groupLabelColor:a,textColor:t,textColorDisabled:r,textDecorationColor:t,groupLabelTextColor:t,caretColor:n,placeholderColor:A,placeholderColorDisabled:E,color:a,colorDisabled:l,colorFocus:te(n,{alpha:.1}),groupLabelBorder:"1px solid #0000",border:"1px solid #0000",borderHover:`1px solid ${i}`,borderDisabled:"1px solid #0000",borderFocus:`1px solid ${i}`,boxShadowFocus:`0 0 8px 0 ${te(n,{alpha:.3})}`,loadingColor:n,loadingColorWarning:s,borderWarning:`1px solid ${s}`,borderHoverWarning:`1px solid ${c}`,colorFocusWarning:te(s,{alpha:.1}),borderFocusWarning:`1px solid ${c}`,boxShadowFocusWarning:`0 0 8px 0 ${te(s,{alpha:.3})}`,caretColorWarning:s,loadingColorError:d,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${u}`,colorFocusError:te(d,{alpha:.1}),borderFocusError:`1px solid ${u}`,boxShadowFocusError:`0 0 8px 0 ${te(d,{alpha:.3})}`,caretColorError:d,clearColor:D,clearColorHover:x,clearColorPressed:k,iconColor:H,iconColorDisabled:M,iconColorHover:le,iconColorPressed:ye,suffixTextColor:t})}},vt=_T;var ET=e=>{let{textColor2:t,textColor3:o,textColorDisabled:r,primaryColor:n,primaryColorHover:i,inputColor:a,inputColorDisabled:l,borderColor:s,warningColor:c,warningColorHover:d,errorColor:u,errorColorHover:p,borderRadius:f,lineHeight:m,fontSizeTiny:y,fontSizeSmall:_,fontSizeMedium:h,fontSizeLarge:O,heightTiny:W,heightSmall:w,heightMedium:b,heightLarge:D,actionColor:x,clearColor:k,clearColorHover:A,clearColorPressed:E,placeholderColor:H,placeholderColorDisabled:M,iconColor:le,iconColorDisabled:ye,iconColorHover:Pe,iconColorPressed:fe}=e;return Object.assign(Object.assign({},ds),{countTextColor:o,heightTiny:W,heightSmall:w,heightMedium:b,heightLarge:D,fontSizeTiny:y,fontSizeSmall:_,fontSizeMedium:h,fontSizeLarge:O,lineHeight:m,lineHeightTextarea:m,borderRadius:f,iconSize:"16px",groupLabelColor:x,groupLabelTextColor:t,textColor:t,textColorDisabled:r,textDecorationColor:t,caretColor:n,placeholderColor:H,placeholderColorDisabled:M,color:a,colorDisabled:l,colorFocus:a,groupLabelBorder:`1px solid ${s}`,border:`1px solid ${s}`,borderHover:`1px solid ${i}`,borderDisabled:`1px solid ${s}`,borderFocus:`1px solid ${i}`,boxShadowFocus:`0 0 0 2px ${te(n,{alpha:.2})}`,loadingColor:n,loadingColorWarning:c,borderWarning:`1px solid ${c}`,borderHoverWarning:`1px solid ${d}`,colorFocusWarning:a,borderFocusWarning:`1px solid ${d}`,boxShadowFocusWarning:`0 0 0 2px ${te(c,{alpha:.2})}`,caretColorWarning:c,loadingColorError:u,borderError:`1px solid ${u}`,borderHoverError:`1px solid ${p}`,colorFocusError:a,borderFocusError:`1px solid ${p}`,boxShadowFocusError:`0 0 0 2px ${te(u,{alpha:.2})}`,caretColorError:u,clearColor:k,clearColorHover:A,clearColorPressed:E,iconColor:le,iconColorDisabled:ye,iconColorHover:Pe,iconColorPressed:fe,suffixTextColor:t})},DT={name:"Input",common:ge,self:ET},ho=DT;var us="n-input";function qv(e){let t=0;for(let o of e)t++;return t}function ia(e){return["",void 0,null].includes(e)}var Id=de({name:"InputWordCount",setup(e,{slots:t}){let{mergedValueRef:o,maxlengthRef:r,mergedClsPrefixRef:n}=we(us),i=j(()=>{let{value:a}=o;return a===null||Array.isArray(a)?0:qv(a)});return()=>{let{value:a}=r,{value:l}=o;return v("span",{class:`${n.value}-input-word-count`},fl(t.default,{value:l===null||Array.isArray(l)?"":l},()=>[a===void 0?i.value:`${i.value} / ${a}`]))}}});var Gv=U("input",` max-width: 100%; cursor: text; line-height: 1.5; @@ -353,7 +353,7 @@ ${t} width: 0; height: 0; display: none; - `),J("&::placeholder","color: #0000;"),J("&:-webkit-autofill ~",[ee("placeholder","display: none;")])]),be("round",[oo("textarea","border-radius: calc(var(--n-height) / 2);")]),ee("placeholder",` + `),J("&::placeholder","color: #0000;"),J("&:-webkit-autofill ~",[ee("placeholder","display: none;")])]),be("round",[ro("textarea","border-radius: calc(var(--n-height) / 2);")]),ee("placeholder",` pointer-events: none; position: absolute; left: 0; @@ -365,7 +365,7 @@ ${t} `,[J("span",` width: 100%; display: inline-block; - `)]),be("textarea",[ee("placeholder","overflow: visible;")]),oo("autosize","width: 100%;"),be("autosize",[ee("textarea-el, input-el",` + `)]),be("textarea",[ee("placeholder","overflow: visible;")]),ro("autosize","width: 100%;"),be("autosize",[ee("textarea-el, input-el",` position: absolute; top: 0; left: 0; @@ -392,7 +392,7 @@ ${t} `,[J("+",[ee("placeholder",` display: flex; align-items: center; - `)])]),oo("textarea",[ee("placeholder","white-space: nowrap;")]),ee("eye",` + `)])]),ro("textarea",[ee("placeholder","white-space: nowrap;")]),ee("eye",` transition: color .3s var(--n-bezier); `),be("textarea","width: 100%;",[U("input-word-count",` position: absolute; @@ -451,7 +451,7 @@ ${t} color: var(--n-icon-color-disabled); `),U("internal-icon",` color: var(--n-icon-color-disabled); - `)])]),oo("disabled",[ee("eye",` + `)])]),ro("disabled",[ee("eye",` display: flex; align-items: center; justify-content: center; @@ -520,7 +520,7 @@ ${t} transition: color .3s var(--n-bezier); margin-left: 4px; font-variant: tabular-nums; - `),["warning","error"].map(e=>be(`${e}-status`,[oo("disabled",[U("base-loading",` + `),["warning","error"].map(e=>be(`${e}-status`,[ro("disabled",[U("base-loading",` color: var(--n-loading-color-${e}) `),ee("input-el, textarea-el",` caret-color: var(--n-caret-color-${e}); @@ -538,8 +538,8 @@ ${t} `,[ee("state-border",` box-shadow: var(--n-box-shadow-focus-${e}); border: var(--n-border-focus-${e}); - `)])])]))]);var OT=Object.assign(Object.assign({},Ct.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},onMousedown:Function,onKeydown:Function,onKeyup:Function,onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:Boolean,showPasswordToggle:Boolean}),Ad=ue({name:"Input",props:OT,setup(e){let{mergedClsPrefixRef:t,mergedBorderedRef:o,inlineThemeDisabled:r,mergedRtlRef:n}=Mt(e),i=Ct("Input","-input",Gv,po,e,t),a=X(null),l=X(null),s=X(null),c=X(null),d=X(null),u=X(null),p=X(null),{localeRef:f}=Qn("Input"),m=X(e.defaultValue),y=Re(e,"value"),w=Xt(y,m),g=Co(e),{mergedSizeRef:O,mergedDisabledRef:j,mergedStatusRef:S}=g,v=X(!1),D=X(!1),x=X(!1),k=X(!1),A=null,E=F(()=>{let{placeholder:T,pair:ie}=e;return ie?Array.isArray(T)?T:T===void 0?["",""]:[T,T]:T===void 0?[f.value.placeholder]:[T]}),z=F(()=>{let{value:T}=x,{value:ie}=w,{value:Oe}=E;return!T&&(ia(ie)||Array.isArray(ie)&&ia(ie[0]))&&Oe[0]}),M=F(()=>{let{value:T}=x,{value:ie}=w,{value:Oe}=E;return!T&&Oe[1]&&(ia(ie)||Array.isArray(ie)&&ia(ie[1]))}),se=Qe(()=>e.internalForceFocus||v.value),ye=Qe(()=>{if(j.value||e.readonly||!e.clearable||!se.value&&!D.value)return!1;let{value:T}=w,{value:ie}=se;return e.pair?!!(Array.isArray(T)&&(T[0]||T[1]))&&(D.value||ie):!!T&&(D.value||ie)}),Ie=F(()=>{let{showPasswordOn:T}=e;if(T)return T;if(e.showPasswordToggle)return"click"}),fe=X(!1),ce=F(()=>{let{textDecoration:T}=e;return T?Array.isArray(T)?T.map(ie=>({textDecoration:ie})):[{textDecoration:T}]:["",""]}),we=X(void 0),Me=()=>{var T,ie;if(e.type==="textarea"){let{autosize:Oe}=e;if(Oe&&(we.value=(ie=(T=p.value)===null||T===void 0?void 0:T.$el)===null||ie===void 0?void 0:ie.offsetWidth),!l.value||typeof Oe=="boolean")return;let{paddingTop:dt,paddingBottom:I,lineHeight:G}=window.getComputedStyle(l.value),de=Number(dt.slice(0,-2)),me=Number(I.slice(0,-2)),$e=Number(G.slice(0,-2)),{value:Lt}=s;if(!Lt)return;if(Oe.minRows){let bt=Math.max(Oe.minRows,1),nr=`${de+me+$e*bt}px`;Lt.style.minHeight=nr}if(Oe.maxRows){let bt=`${de+me+$e*Oe.maxRows}px`;Lt.style.maxHeight=bt}}},Be=F(()=>{let{maxlength:T}=e;return T===void 0?void 0:Number(T)});tt(()=>{let{value:T}=w;Array.isArray(T)||qe(T)});let Le=Uo().proxy;function Je(T){let{onUpdateValue:ie,"onUpdate:value":Oe,onInput:dt}=e,{nTriggerFormInput:I}=g;ie&&Se(ie,T),Oe&&Se(Oe,T),dt&&Se(dt,T),m.value=T,I()}function Xe(T){let{onChange:ie}=e,{nTriggerFormChange:Oe}=g;ie&&Se(ie,T),m.value=T,Oe()}function ct(T){let{onBlur:ie}=e,{nTriggerFormBlur:Oe}=g;ie&&Se(ie,T),Oe()}function wt(T){let{onFocus:ie}=e,{nTriggerFormFocus:Oe}=g;ie&&Se(ie,T),Oe()}function ze(T){let{onClear:ie}=e;ie&&Se(ie,T)}function We(T){let{onInputBlur:ie}=e;ie&&Se(ie,T)}function vt(T){let{onInputFocus:ie}=e;ie&&Se(ie,T)}function Pe(){let{onDeactivate:T}=e;T&&Se(T)}function ot(){let{onActivate:T}=e;T&&Se(T)}function rt(T){let{onClick:ie}=e;ie&&Se(ie,T)}function Dt(T){let{onWrapperFocus:ie}=e;ie&&Se(ie,T)}function h(T){let{onWrapperBlur:ie}=e;ie&&Se(ie,T)}function C(){x.value=!0}function L(T){x.value=!1,T.target===u.value?q(T,1):q(T,0)}function q(T,ie=0,Oe="input"){let dt=T.target.value;if(qe(dt),e.type==="textarea"){let{value:G}=p;G&&G.syncUnifiedContainer()}if(A=dt,x.value)return;let I=dt;if(!e.pair)Oe==="input"?Je(I):Xe(I);else{let{value:G}=w;Array.isArray(G)?G=[...G]:G=["",""],G[ie]=I,Oe==="input"?Je(G):Xe(G)}Le.$forceUpdate()}function K(T){We(T),T.relatedTarget===a.value&&Pe(),T.relatedTarget!==null&&(T.relatedTarget===d.value||T.relatedTarget===u.value||T.relatedTarget===l.value)||(k.value=!1),Q(T,"blur")}function ne(T){vt(T),v.value=!0,k.value=!0,ot(),Q(T,"focus")}function oe(T){e.passivelyActivated&&(h(T),Q(T,"blur"))}function H(T){e.passivelyActivated&&(v.value=!0,Dt(T),Q(T,"focus"))}function Q(T,ie){T.relatedTarget!==null&&(T.relatedTarget===d.value||T.relatedTarget===u.value||T.relatedTarget===l.value||T.relatedTarget===a.value)||(ie==="focus"?(wt(T),v.value=!0):ie==="blur"&&(ct(T),v.value=!1))}function Y(T,ie){q(T,ie,"change")}function N(T){rt(T)}function $(T){ze(T),e.pair?(Je(["",""]),Xe(["",""])):(Je(""),Xe(""))}function V(T){let{onMousedown:ie}=e;ie&&ie(T);let{tagName:Oe}=T.target;if(Oe!=="INPUT"&&Oe!=="TEXTAREA"){if(e.resizable){let{value:dt}=a;if(dt){let{left:I,top:G,width:de,height:me}=dt.getBoundingClientRect(),$e=14;if(I+de-$e{dt.preventDefault(),ht("mouseup",document,ie)};if(gt("mouseup",document,ie),Ie.value!=="mousedown")return;fe.value=!0;let Oe=()=>{fe.value=!1,ht("mouseup",document,Oe)};gt("mouseup",document,Oe)}function re(T){var ie;switch((ie=e.onKeydown)===null||ie===void 0||ie.call(e,T),T.code){case"Escape":Z();break;case"Enter":case"NumpadEnter":P(T);break}}function P(T){var ie,Oe;if(e.passivelyActivated){let{value:dt}=k;if(dt){e.internalDeactivateOnEnter&&Z();return}T.preventDefault(),e.type==="textarea"?(ie=l.value)===null||ie===void 0||ie.focus():(Oe=d.value)===null||Oe===void 0||Oe.focus()}}function Z(){e.passivelyActivated&&(k.value=!1,Bt(()=>{var T;(T=a.value)===null||T===void 0||T.focus()}))}function le(){var T,ie,Oe;j.value||(e.passivelyActivated?(T=a.value)===null||T===void 0||T.focus():((ie=l.value)===null||ie===void 0||ie.focus(),(Oe=d.value)===null||Oe===void 0||Oe.focus()))}function Ce(){var T;!((T=a.value)===null||T===void 0)&&T.contains(document.activeElement)&&document.activeElement.blur()}function Ke(){var T,ie;(T=l.value)===null||T===void 0||T.select(),(ie=d.value)===null||ie===void 0||ie.select()}function He(){j.value||(l.value?l.value.focus():d.value&&d.value.focus())}function Fe(){let{value:T}=a;T?.contains(document.activeElement)&&T!==document.activeElement&&Z()}function qe(T){let{type:ie,pair:Oe,autosize:dt}=e;if(!Oe&&dt)if(ie==="textarea"){let{value:I}=s;I&&(I.textContent=(T??"")+`\r -`)}else{let{value:I}=c;I&&(T?I.textContent=T:I.innerHTML=" ")}}function Tt(){Me()}let ho=X({top:"0"});function ii(T){var ie;let{scrollTop:Oe}=T.target;ho.value.top=`${-Oe}px`,(ie=p.value)===null||ie===void 0||ie.syncUnifiedContainer()}let hr=null;At(()=>{let{autosize:T,type:ie}=e;T&&ie==="textarea"?hr=Ze(w,Oe=>{!Array.isArray(Oe)&&Oe!==A&&qe(Oe)}):hr?.()});let gr=null;At(()=>{e.type==="textarea"?gr=Ze(w,T=>{var ie;!Array.isArray(T)&&T!==A&&((ie=p.value)===null||ie===void 0||ie.syncUnifiedContainer())}):gr?.()}),Yt(ds,{mergedValueRef:w,maxlengthRef:Be,mergedClsPrefixRef:t});let wn={wrapperElRef:a,inputElRef:d,textareaElRef:l,isCompositing:x,focus:le,blur:Ce,select:Ke,deactivate:Fe,activate:He},ai=bn("Input",n,t),kn=F(()=>{let{value:T}=O,{common:{cubicBezierEaseInOut:ie},self:{color:Oe,borderRadius:dt,textColor:I,caretColor:G,caretColorError:de,caretColorWarning:me,textDecorationColor:$e,border:Lt,borderDisabled:bt,borderHover:nr,borderFocus:ir,placeholderColor:Ot,placeholderColorDisabled:It,lineHeightTextarea:no,colorDisabled:cp,colorFocus:Ls,textColorDisabled:et,boxShadowFocus:Ft,iconSize:li,colorFocusWarning:Ea,boxShadowFocusWarning:Da,borderWarning:Ta,borderFocusWarning:si,borderHoverWarning:gy,colorFocusError:xy,boxShadowFocusError:vy,borderError:by,borderFocusError:yy,borderHoverError:Cy,clearSize:wy,clearColor:ky,clearColorHover:Sy,clearColorPressed:_y,iconColor:Ey,iconColorDisabled:Dy,suffixTextColor:Ty,countTextColor:Oy,iconColorHover:Py,iconColorPressed:Ny,loadingColor:Ry,loadingColorError:Iy,loadingColorWarning:Ay,[Te("padding",T)]:My,[Te("fontSize",T)]:$y,[Te("height",T)]:Ly}}=i.value,{left:zy,right:By}=$n(My);return{"--n-bezier":ie,"--n-count-text-color":Oy,"--n-color":Oe,"--n-font-size":$y,"--n-border-radius":dt,"--n-height":Ly,"--n-padding-left":zy,"--n-padding-right":By,"--n-text-color":I,"--n-caret-color":G,"--n-text-decoration-color":$e,"--n-border":Lt,"--n-border-disabled":bt,"--n-border-hover":nr,"--n-border-focus":ir,"--n-placeholder-color":Ot,"--n-placeholder-color-disabled":It,"--n-icon-size":li,"--n-line-height-textarea":no,"--n-color-disabled":cp,"--n-color-focus":Ls,"--n-text-color-disabled":et,"--n-box-shadow-focus":Ft,"--n-loading-color":Ry,"--n-caret-color-warning":me,"--n-color-focus-warning":Ea,"--n-box-shadow-focus-warning":Da,"--n-border-warning":Ta,"--n-border-focus-warning":si,"--n-border-hover-warning":gy,"--n-loading-color-warning":Ay,"--n-caret-color-error":de,"--n-color-focus-error":xy,"--n-box-shadow-focus-error":vy,"--n-border-error":by,"--n-border-focus-error":yy,"--n-border-hover-error":Cy,"--n-loading-color-error":Iy,"--n-clear-color":ky,"--n-clear-size":wy,"--n-clear-color-hover":Sy,"--n-clear-color-pressed":_y,"--n-icon-color":Ey,"--n-icon-color-hover":Py,"--n-icon-color-pressed":Ny,"--n-icon-color-disabled":Dy,"--n-suffix-text-color":Ty}}),xr=r?qt("input",F(()=>{let{value:T}=O;return T[0]}),kn,e):void 0;return Object.assign(Object.assign({},wn),{wrapperElRef:a,inputElRef:d,inputMirrorElRef:c,inputEl2Ref:u,textareaElRef:l,textareaMirrorElRef:s,textareaScrollbarInstRef:p,rtlEnabled:ai,uncontrolledValue:m,mergedValue:w,passwordVisible:fe,mergedPlaceholder:E,showPlaceholder1:z,showPlaceholder2:M,mergedFocus:se,isComposing:x,activated:k,showClearButton:ye,mergedSize:O,mergedDisabled:j,textDecorationStyle:ce,mergedClsPrefix:t,mergedBordered:o,mergedShowPasswordOn:Ie,placeholderStyle:ho,mergedStatus:S,textAreaScrollContainerWidth:we,handleTextAreaScroll:ii,handleCompositionStart:C,handleCompositionEnd:L,handleInput:q,handleInputBlur:K,handleInputFocus:ne,handleWrapperBlur:oe,handleWrapperFocus:H,handleMouseEnter:ae,handleMouseLeave:pe,handleMouseDown:V,handleChange:Y,handleClick:N,handleClear:$,handlePasswordToggleClick:_,handlePasswordToggleMousedown:W,handleWrapperKeyDown:re,handleTextAreaMirrorResize:Tt,getTextareaScrollContainer:()=>l.value,mergedTheme:i,cssVars:r?void 0:kn,themeClass:xr?.themeClass,onRender:xr?.onRender})},render(){let{mergedClsPrefix:e,mergedStatus:t,themeClass:o,onRender:r,$slots:n}=this;return r?.(),b("div",{ref:"wrapperElRef",class:[`${e}-input`,o,t&&`${e}-input--${t}-status`,{[`${e}-input--rtl`]:this.rtlEnabled,[`${e}-input--disabled`]:this.mergedDisabled,[`${e}-input--textarea`]:this.type==="textarea",[`${e}-input--resizable`]:this.resizable&&!this.autosize,[`${e}-input--autosize`]:this.autosize,[`${e}-input--round`]:this.round&&this.type!=="textarea",[`${e}-input--pair`]:this.pair,[`${e}-input--focus`]:this.mergedFocus,[`${e}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.onKeyup,onKeydown:this.handleWrapperKeyDown},b("div",{class:`${e}-input-wrapper`},Xo(n.prefix,i=>i&&b("div",{class:`${e}-input__prefix`},i)),this.type==="textarea"?b(is,{ref:"textareaScrollbarInstRef",class:`${e}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0},{default:()=>{let{textAreaScrollContainerWidth:i}=this,a={width:this.autosize&&i&&`${i}px`};return b(St,null,b("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:`${e}-input__textarea-el`,autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:this.maxlength,minlength:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],a],onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?b("div",{class:`${e}-input__placeholder`,style:[this.placeholderStyle,a],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?b(Po,{onResize:this.handleTextAreaMirrorResize},{default:()=>b("div",{ref:"textareaMirrorElRef",class:`${e}-input__textarea-mirror`,key:"mirror"})}):null)}}):b("div",{class:`${e}-input__input`},b("input",Object.assign({type:this.type==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":this.type},this.inputProps,{ref:"inputElRef",class:`${e}-input__input-el`,style:this.textDecorationStyle[0],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:this.maxlength,minlength:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,onInput:i=>this.handleInput(i,0),onChange:i=>this.handleChange(i,0)})),this.showPlaceholder1?b("div",{class:`${e}-input__placeholder`},b("span",null,this.mergedPlaceholder[0])):null,this.autosize?b("div",{class:`${e}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"},"\xA0"):null),!this.pair&&Xo(n.suffix,i=>i||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?b("div",{class:`${e}-input__suffix`},[Xo(n.clear,a=>(this.clearable||a)&&b(yn,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{default:()=>a})),this.internalLoadingBeforeSuffix?null:i,this.loading!==void 0?b(ls,{clsPrefix:e,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?i:null,this.showCount&&this.type!=="textarea"?b(Id,null,{default:a=>{var l;return(l=n.count)===null||l===void 0?void 0:l.call(n,a)}}):null,this.mergedShowPasswordOn&&this.type==="password"?b(_o,{clsPrefix:e,class:`${e}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},{default:()=>this.passwordVisible?Yo(n["password-visible-icon"],()=>[b(fd,null)]):Yo(n["password-invisible-icon"],()=>[b(pd,null)])}):null]):null)),this.pair?b("span",{class:`${e}-input__separator`},Yo(n.separator,()=>[this.separator])):null,this.pair?b("div",{class:`${e}-input-wrapper`},b("div",{class:`${e}-input__input`},b("input",{ref:"inputEl2Ref",type:this.type,class:`${e}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:this.maxlength,minlength:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,onInput:i=>this.handleInput(i,1),onChange:i=>this.handleChange(i,1)}),this.showPlaceholder2?b("div",{class:`${e}-input__placeholder`},b("span",null,this.mergedPlaceholder[1])):null),Xo(n.suffix,i=>(this.clearable||i)&&b("div",{class:`${e}-input__suffix`},[this.clearable&&b(yn,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{default:()=>{var a;return(a=n.clear)===null||a===void 0?void 0:a.call(n)}}),i]))):null,this.mergedBordered?b("div",{class:`${e}-input__border`}):null,this.mergedBordered?b("div",{class:`${e}-input__state-border`}):null,this.showCount&&this.type==="textarea"?b(Id,null,{default:i=>{var a;return(a=n.count)===null||a===void 0?void 0:a.call(n,i)}}):null)}});function Md(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}var hj={name:"AutoComplete",common:ge,peers:{InternalSelectMenu:vn,Input:po},self:Md};var PT={name:"AutoComplete",common:R,peers:{InternalSelectMenu:No,Input:xt},self:Md},$d=PT;var Yv=e=>{let{borderRadius:t,avatarColor:o,cardColor:r,fontSize:n,heightTiny:i,heightSmall:a,heightMedium:l,heightLarge:s,heightHuge:c,modalColor:d,popoverColor:u}=e;return{borderRadius:t,fontSize:n,border:`2px solid ${r}`,heightTiny:i,heightSmall:a,heightMedium:l,heightLarge:s,heightHuge:c,color:xe(r,o),colorModal:xe(d,o),colorPopover:xe(u,o)}};var NT={name:"Avatar",common:R,self:Yv},aa=NT;var RT={name:"AvatarGroup",common:R,peers:{Avatar:aa}},Ld=RT;var Xv={width:"44px",height:"44px",borderRadius:"22px",iconSize:"26px"};var IT={name:"BackTop",common:R,self(e){let{popoverColor:t,textColor2:o,primaryColorHover:r,primaryColorPressed:n}=e;return Object.assign(Object.assign({},Xv),{color:t,textColor:o,iconColor:o,iconColorHover:r,iconColorPressed:n,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .12)",boxShadowHover:"0 2px 12px 0px rgba(0, 0, 0, .18)",boxShadowPressed:"0 2px 12px 0px rgba(0, 0, 0, .18)"})}},zd=IT;var AT={name:"Badge",common:R,self(e){let{errorColorSuppl:t,infoColorSuppl:o,successColorSuppl:r,warningColorSuppl:n,fontFamily:i}=e;return{color:t,colorInfo:o,colorSuccess:r,colorError:t,colorWarning:n,fontSize:"12px",fontFamily:i}}},Bd=AT;var Zv={fontWeightActive:"400"};var Qv=e=>{let{fontSize:t,textColor3:o,primaryColorHover:r,primaryColorPressed:n,textColor2:i}=e;return Object.assign(Object.assign({},Zv),{fontSize:t,itemTextColor:o,itemTextColorHover:r,itemTextColorPressed:n,itemTextColorActive:i,separatorColor:o})};var MT={name:"Breadcrumb",common:R,self:Qv},Hd=MT;function Kr(e){return xe(e,[255,255,255,.16])}function la(e){return xe(e,[0,0,0,.12])}var Jv={paddingTiny:"0 6px",paddingSmall:"0 10px",paddingMedium:"0 14px",paddingLarge:"0 18px",paddingRoundTiny:"0 10px",paddingRoundSmall:"0 14px",paddingRoundMedium:"0 18px",paddingRoundLarge:"0 22px",iconMarginTiny:"6px",iconMarginSmall:"6px",iconMarginMedium:"6px",iconMarginLarge:"6px",iconSizeTiny:"14px",iconSizeSmall:"18px",iconSizeMedium:"18px",iconSizeLarge:"20px",rippleDuration:".6s"};var Vd=e=>{let{heightTiny:t,heightSmall:o,heightMedium:r,heightLarge:n,borderRadius:i,fontSizeTiny:a,fontSizeSmall:l,fontSizeMedium:s,fontSizeLarge:c,opacityDisabled:d,textColor2:u,textColor3:p,primaryColorHover:f,primaryColorPressed:m,borderColor:y,primaryColor:w,baseColor:g,infoColor:O,infoColorHover:j,infoColorPressed:S,successColor:v,successColorHover:D,successColorPressed:x,warningColor:k,warningColorHover:A,warningColorPressed:E,errorColor:z,errorColorHover:M,errorColorPressed:se,fontWeight:ye,buttonColor2:Ie,buttonColor2Hover:fe,buttonColor2Pressed:ce,fontWeightStrong:we}=e;return Object.assign(Object.assign({},Jv),{heightTiny:t,heightSmall:o,heightMedium:r,heightLarge:n,borderRadiusTiny:i,borderRadiusSmall:i,borderRadiusMedium:i,borderRadiusLarge:i,fontSizeTiny:a,fontSizeSmall:l,fontSizeMedium:s,fontSizeLarge:c,opacityDisabled:d,colorOpacitySecondary:"0.16",colorOpacitySecondaryHover:"0.22",colorOpacitySecondaryPressed:"0.28",colorSecondary:Ie,colorSecondaryHover:fe,colorSecondaryPressed:ce,colorTertiary:Ie,colorTertiaryHover:fe,colorTertiaryPressed:ce,colorQuaternary:"#0000",colorQuaternaryHover:fe,colorQuaternaryPressed:ce,color:"#0000",colorHover:"#0000",colorPressed:"#0000",colorFocus:"#0000",colorDisabled:"#0000",textColor:u,textColorTertiary:p,textColorHover:f,textColorPressed:m,textColorFocus:f,textColorDisabled:u,textColorText:u,textColorTextHover:f,textColorTextPressed:m,textColorTextFocus:f,textColorTextDisabled:u,textColorGhost:u,textColorGhostHover:f,textColorGhostPressed:m,textColorGhostFocus:f,textColorGhostDisabled:u,border:`1px solid ${y}`,borderHover:`1px solid ${f}`,borderPressed:`1px solid ${m}`,borderFocus:`1px solid ${f}`,borderDisabled:`1px solid ${y}`,rippleColor:w,colorPrimary:w,colorHoverPrimary:f,colorPressedPrimary:m,colorFocusPrimary:f,colorDisabledPrimary:w,textColorPrimary:g,textColorHoverPrimary:g,textColorPressedPrimary:g,textColorFocusPrimary:g,textColorDisabledPrimary:g,textColorTextPrimary:w,textColorTextHoverPrimary:f,textColorTextPressedPrimary:m,textColorTextFocusPrimary:f,textColorTextDisabledPrimary:u,textColorGhostPrimary:w,textColorGhostHoverPrimary:f,textColorGhostPressedPrimary:m,textColorGhostFocusPrimary:f,textColorGhostDisabledPrimary:w,borderPrimary:`1px solid ${w}`,borderHoverPrimary:`1px solid ${f}`,borderPressedPrimary:`1px solid ${m}`,borderFocusPrimary:`1px solid ${f}`,borderDisabledPrimary:`1px solid ${w}`,rippleColorPrimary:w,colorInfo:O,colorHoverInfo:j,colorPressedInfo:S,colorFocusInfo:j,colorDisabledInfo:O,textColorInfo:g,textColorHoverInfo:g,textColorPressedInfo:g,textColorFocusInfo:g,textColorDisabledInfo:g,textColorTextInfo:O,textColorTextHoverInfo:j,textColorTextPressedInfo:S,textColorTextFocusInfo:j,textColorTextDisabledInfo:u,textColorGhostInfo:O,textColorGhostHoverInfo:j,textColorGhostPressedInfo:S,textColorGhostFocusInfo:j,textColorGhostDisabledInfo:O,borderInfo:`1px solid ${O}`,borderHoverInfo:`1px solid ${j}`,borderPressedInfo:`1px solid ${S}`,borderFocusInfo:`1px solid ${j}`,borderDisabledInfo:`1px solid ${O}`,rippleColorInfo:O,colorSuccess:v,colorHoverSuccess:D,colorPressedSuccess:x,colorFocusSuccess:D,colorDisabledSuccess:v,textColorSuccess:g,textColorHoverSuccess:g,textColorPressedSuccess:g,textColorFocusSuccess:g,textColorDisabledSuccess:g,textColorTextSuccess:v,textColorTextHoverSuccess:D,textColorTextPressedSuccess:x,textColorTextFocusSuccess:D,textColorTextDisabledSuccess:u,textColorGhostSuccess:v,textColorGhostHoverSuccess:D,textColorGhostPressedSuccess:x,textColorGhostFocusSuccess:D,textColorGhostDisabledSuccess:v,borderSuccess:`1px solid ${v}`,borderHoverSuccess:`1px solid ${D}`,borderPressedSuccess:`1px solid ${x}`,borderFocusSuccess:`1px solid ${D}`,borderDisabledSuccess:`1px solid ${v}`,rippleColorSuccess:v,colorWarning:k,colorHoverWarning:A,colorPressedWarning:E,colorFocusWarning:A,colorDisabledWarning:k,textColorWarning:g,textColorHoverWarning:g,textColorPressedWarning:g,textColorFocusWarning:g,textColorDisabledWarning:g,textColorTextWarning:k,textColorTextHoverWarning:A,textColorTextPressedWarning:E,textColorTextFocusWarning:A,textColorTextDisabledWarning:u,textColorGhostWarning:k,textColorGhostHoverWarning:A,textColorGhostPressedWarning:E,textColorGhostFocusWarning:A,textColorGhostDisabledWarning:k,borderWarning:`1px solid ${k}`,borderHoverWarning:`1px solid ${A}`,borderPressedWarning:`1px solid ${E}`,borderFocusWarning:`1px solid ${A}`,borderDisabledWarning:`1px solid ${k}`,rippleColorWarning:k,colorError:z,colorHoverError:M,colorPressedError:se,colorFocusError:M,colorDisabledError:z,textColorError:g,textColorHoverError:g,textColorPressedError:g,textColorFocusError:g,textColorDisabledError:g,textColorTextError:z,textColorTextHoverError:M,textColorTextPressedError:se,textColorTextFocusError:M,textColorTextDisabledError:u,textColorGhostError:z,textColorGhostHoverError:M,textColorGhostPressedError:se,textColorGhostFocusError:M,textColorGhostDisabledError:z,borderError:`1px solid ${z}`,borderHoverError:`1px solid ${M}`,borderPressedError:`1px solid ${se}`,borderFocusError:`1px solid ${M}`,borderDisabledError:`1px solid ${z}`,rippleColorError:z,waveOpacity:"0.6",fontWeight:ye,fontWeightStrong:we})},$T={name:"Button",common:ge,self:Vd},Nt=$T;var LT={name:"Button",common:R,self(e){let t=Vd(e);return t.waveOpacity="0.8",t.colorOpacitySecondary="0.16",t.colorOpacitySecondaryHover="0.2",t.colorOpacitySecondaryPressed="0.12",t}},lt=LT;var eb="n-button-group";var tb=J([U("button",` + `)])])]))]);var TT=Object.assign(Object.assign({},wt.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},onMousedown:Function,onKeydown:Function,onKeyup:Function,onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:Boolean,showPasswordToggle:Boolean}),Ad=de({name:"Input",props:TT,setup(e){let{mergedClsPrefixRef:t,mergedBorderedRef:o,inlineThemeDisabled:r,mergedRtlRef:n}=At(e),i=wt("Input","-input",Gv,ho,e,t),a=Z(null),l=Z(null),s=Z(null),c=Z(null),d=Z(null),u=Z(null),p=Z(null),{localeRef:f}=Qn("Input"),m=Z(e.defaultValue),y=Ae(e,"value"),_=Zt(y,m),h=Co(e),{mergedSizeRef:O,mergedDisabledRef:W,mergedStatusRef:w}=h,b=Z(!1),D=Z(!1),x=Z(!1),k=Z(!1),A=null,E=j(()=>{let{placeholder:N,pair:ne}=e;return ne?Array.isArray(N)?N:N===void 0?["",""]:[N,N]:N===void 0?[f.value.placeholder]:[N]}),H=j(()=>{let{value:N}=x,{value:ne}=_,{value:Oe}=E;return!N&&(ia(ne)||Array.isArray(ne)&&ia(ne[0]))&&Oe[0]}),M=j(()=>{let{value:N}=x,{value:ne}=_,{value:Oe}=E;return!N&&Oe[1]&&(ia(ne)||Array.isArray(ne)&&ia(ne[1]))}),le=et(()=>e.internalForceFocus||b.value),ye=et(()=>{if(W.value||e.readonly||!e.clearable||!le.value&&!D.value)return!1;let{value:N}=_,{value:ne}=le;return e.pair?!!(Array.isArray(N)&&(N[0]||N[1]))&&(D.value||ne):!!N&&(D.value||ne)}),Pe=j(()=>{let{showPasswordOn:N}=e;if(N)return N;if(e.showPasswordToggle)return"click"}),fe=Z(!1),ce=j(()=>{let{textDecoration:N}=e;return N?Array.isArray(N)?N.map(ne=>({textDecoration:ne})):[{textDecoration:N}]:["",""]}),Ce=Z(void 0),Ke=()=>{var N,ne;if(e.type==="textarea"){let{autosize:Oe}=e;if(Oe&&(Ce.value=(ne=(N=p.value)===null||N===void 0?void 0:N.$el)===null||ne===void 0?void 0:ne.offsetWidth),!l.value||typeof Oe=="boolean")return;let{paddingTop:st,paddingBottom:I,lineHeight:Y}=window.getComputedStyle(l.value),se=Number(st.slice(0,-2)),pe=Number(I.slice(0,-2)),ze=Number(Y.slice(0,-2)),{value:Lt}=s;if(!Lt)return;if(Oe.minRows){let yt=Math.max(Oe.minRows,1),nr=`${se+pe+ze*yt}px`;Lt.style.minHeight=nr}if(Oe.maxRows){let yt=`${se+pe+ze*Oe.maxRows}px`;Lt.style.maxHeight=yt}}},He=j(()=>{let{maxlength:N}=e;return N===void 0?void 0:Number(N)});Je(()=>{let{value:N}=_;Array.isArray(N)||Ve(N)});let Me=Uo().proxy;function Ye(N){let{onUpdateValue:ne,"onUpdate:value":Oe,onInput:st}=e,{nTriggerFormInput:I}=h;ne&&ke(ne,N),Oe&&ke(Oe,N),st&&ke(st,N),m.value=N,I()}function Xe(N){let{onChange:ne}=e,{nTriggerFormChange:Oe}=h;ne&&ke(ne,N),m.value=N,Oe()}function Dt(N){let{onBlur:ne}=e,{nTriggerFormBlur:Oe}=h;ne&&ke(ne,N),Oe()}function pt(N){let{onFocus:ne}=e,{nTriggerFormFocus:Oe}=h;ne&&ke(ne,N),Oe()}function Le(N){let{onClear:ne}=e;ne&&ke(ne,N)}function We(N){let{onInputBlur:ne}=e;ne&&ke(ne,N)}function gt(N){let{onInputFocus:ne}=e;ne&&ke(ne,N)}function Re(){let{onDeactivate:N}=e;N&&ke(N)}function lt(){let{onActivate:N}=e;N&&ke(N)}function bt(N){let{onClick:ne}=e;ne&&ke(ne,N)}function mt(N){let{onWrapperFocus:ne}=e;ne&&ke(ne,N)}function g(N){let{onWrapperBlur:ne}=e;ne&&ke(ne,N)}function C(){x.value=!0}function z(N){x.value=!1,N.target===u.value?q(N,1):q(N,0)}function q(N,ne=0,Oe="input"){let st=N.target.value;if(Ve(st),e.type==="textarea"){let{value:Y}=p;Y&&Y.syncUnifiedContainer()}if(A=st,x.value)return;let I=st;if(!e.pair)Oe==="input"?Ye(I):Xe(I);else{let{value:Y}=_;Array.isArray(Y)?Y=[...Y]:Y=["",""],Y[ne]=I,Oe==="input"?Ye(Y):Xe(Y)}Me.$forceUpdate()}function G(N){We(N),N.relatedTarget===a.value&&Re(),N.relatedTarget!==null&&(N.relatedTarget===d.value||N.relatedTarget===u.value||N.relatedTarget===l.value)||(k.value=!1),Q(N,"blur")}function re(N){gt(N),b.value=!0,k.value=!0,lt(),Q(N,"focus")}function oe(N){e.passivelyActivated&&(g(N),Q(N,"blur"))}function F(N){e.passivelyActivated&&(b.value=!0,mt(N),Q(N,"focus"))}function Q(N,ne){N.relatedTarget!==null&&(N.relatedTarget===d.value||N.relatedTarget===u.value||N.relatedTarget===l.value||N.relatedTarget===a.value)||(ne==="focus"?(pt(N),b.value=!0):ne==="blur"&&(Dt(N),b.value=!1))}function X(N,ne){q(N,ne,"change")}function P(N){bt(N)}function $(N){Le(N),e.pair?(Ye(["",""]),Xe(["",""])):(Ye(""),Xe(""))}function V(N){let{onMousedown:ne}=e;ne&&ne(N);let{tagName:Oe}=N.target;if(Oe!=="INPUT"&&Oe!=="TEXTAREA"){if(e.resizable){let{value:st}=a;if(st){let{left:I,top:Y,width:se,height:pe}=st.getBoundingClientRect(),ze=14;if(I+se-ze{st.preventDefault(),ht("mouseup",document,ne)};if(xt("mouseup",document,ne),Pe.value!=="mousedown")return;fe.value=!0;let Oe=()=>{fe.value=!1,ht("mouseup",document,Oe)};xt("mouseup",document,Oe)}function K(N){var ne;switch((ne=e.onKeydown)===null||ne===void 0||ne.call(e,N),N.code){case"Escape":L();break;case"Enter":case"NumpadEnter":T(N);break}}function T(N){var ne,Oe;if(e.passivelyActivated){let{value:st}=k;if(st){e.internalDeactivateOnEnter&&L();return}N.preventDefault(),e.type==="textarea"?(ne=l.value)===null||ne===void 0||ne.focus():(Oe=d.value)===null||Oe===void 0||Oe.focus()}}function L(){e.passivelyActivated&&(k.value=!1,Bt(()=>{var N;(N=a.value)===null||N===void 0||N.focus()}))}function ae(){var N,ne,Oe;W.value||(e.passivelyActivated?(N=a.value)===null||N===void 0||N.focus():((ne=l.value)===null||ne===void 0||ne.focus(),(Oe=d.value)===null||Oe===void 0||Oe.focus()))}function he(){var N;!((N=a.value)===null||N===void 0)&&N.contains(document.activeElement)&&document.activeElement.blur()}function Ne(){var N,ne;(N=l.value)===null||N===void 0||N.select(),(ne=d.value)===null||ne===void 0||ne.select()}function Be(){W.value||(l.value?l.value.focus():d.value&&d.value.focus())}function Ge(){let{value:N}=a;N?.contains(document.activeElement)&&N!==document.activeElement&&L()}function Ve(N){let{type:ne,pair:Oe,autosize:st}=e;if(!Oe&&st)if(ne==="textarea"){let{value:I}=s;I&&(I.textContent=(N??"")+`\r +`)}else{let{value:I}=c;I&&(N?I.textContent=N:I.innerHTML=" ")}}function $t(){Ke()}let Ft=Z({top:"0"});function ii(N){var ne;let{scrollTop:Oe}=N.target;Ft.value.top=`${-Oe}px`,(ne=p.value)===null||ne===void 0||ne.syncUnifiedContainer()}let hr=null;Nt(()=>{let{autosize:N,type:ne}=e;N&&ne==="textarea"?hr=Qe(_,Oe=>{!Array.isArray(Oe)&&Oe!==A&&Ve(Oe)}):hr?.()});let gr=null;Nt(()=>{e.type==="textarea"?gr=Qe(_,N=>{var ne;!Array.isArray(N)&&N!==A&&((ne=p.value)===null||ne===void 0||ne.syncUnifiedContainer())}):gr?.()}),Xt(us,{mergedValueRef:_,maxlengthRef:He,mergedClsPrefixRef:t});let wn={wrapperElRef:a,inputElRef:d,textareaElRef:l,isCompositing:x,focus:ae,blur:he,select:Ne,deactivate:Ge,activate:Be},ai=bn("Input",n,t),kn=j(()=>{let{value:N}=O,{common:{cubicBezierEaseInOut:ne},self:{color:Oe,borderRadius:st,textColor:I,caretColor:Y,caretColorError:se,caretColorWarning:pe,textDecorationColor:ze,border:Lt,borderDisabled:yt,borderHover:nr,borderFocus:ir,placeholderColor:Ot,placeholderColorDisabled:It,lineHeightTextarea:io,colorDisabled:cp,colorFocus:Ls,textColorDisabled:tt,boxShadowFocus:jt,iconSize:li,colorFocusWarning:Da,boxShadowFocusWarning:Ta,borderWarning:Oa,borderFocusWarning:si,borderHoverWarning:h0,colorFocusError:g0,boxShadowFocusError:x0,borderError:v0,borderFocusError:b0,borderHoverError:y0,clearSize:C0,clearColor:w0,clearColorHover:k0,clearColorPressed:S0,iconColor:_0,iconColorDisabled:E0,suffixTextColor:D0,countTextColor:T0,iconColorHover:O0,iconColorPressed:N0,loadingColor:P0,loadingColorError:R0,loadingColorWarning:I0,[Te("padding",N)]:A0,[Te("fontSize",N)]:M0,[Te("height",N)]:$0}}=i.value,{left:L0,right:z0}=$n(A0);return{"--n-bezier":ne,"--n-count-text-color":T0,"--n-color":Oe,"--n-font-size":M0,"--n-border-radius":st,"--n-height":$0,"--n-padding-left":L0,"--n-padding-right":z0,"--n-text-color":I,"--n-caret-color":Y,"--n-text-decoration-color":ze,"--n-border":Lt,"--n-border-disabled":yt,"--n-border-hover":nr,"--n-border-focus":ir,"--n-placeholder-color":Ot,"--n-placeholder-color-disabled":It,"--n-icon-size":li,"--n-line-height-textarea":io,"--n-color-disabled":cp,"--n-color-focus":Ls,"--n-text-color-disabled":tt,"--n-box-shadow-focus":jt,"--n-loading-color":P0,"--n-caret-color-warning":pe,"--n-color-focus-warning":Da,"--n-box-shadow-focus-warning":Ta,"--n-border-warning":Oa,"--n-border-focus-warning":si,"--n-border-hover-warning":h0,"--n-loading-color-warning":I0,"--n-caret-color-error":se,"--n-color-focus-error":g0,"--n-box-shadow-focus-error":x0,"--n-border-error":v0,"--n-border-focus-error":b0,"--n-border-hover-error":y0,"--n-loading-color-error":R0,"--n-clear-color":w0,"--n-clear-size":C0,"--n-clear-color-hover":k0,"--n-clear-color-pressed":S0,"--n-icon-color":_0,"--n-icon-color-hover":O0,"--n-icon-color-pressed":N0,"--n-icon-color-disabled":E0,"--n-suffix-text-color":D0}}),xr=r?Gt("input",j(()=>{let{value:N}=O;return N[0]}),kn,e):void 0;return Object.assign(Object.assign({},wn),{wrapperElRef:a,inputElRef:d,inputMirrorElRef:c,inputEl2Ref:u,textareaElRef:l,textareaMirrorElRef:s,textareaScrollbarInstRef:p,rtlEnabled:ai,uncontrolledValue:m,mergedValue:_,passwordVisible:fe,mergedPlaceholder:E,showPlaceholder1:H,showPlaceholder2:M,mergedFocus:le,isComposing:x,activated:k,showClearButton:ye,mergedSize:O,mergedDisabled:W,textDecorationStyle:ce,mergedClsPrefix:t,mergedBordered:o,mergedShowPasswordOn:Pe,placeholderStyle:Ft,mergedStatus:w,textAreaScrollContainerWidth:Ce,handleTextAreaScroll:ii,handleCompositionStart:C,handleCompositionEnd:z,handleInput:q,handleInputBlur:G,handleInputFocus:re,handleWrapperBlur:oe,handleWrapperFocus:F,handleMouseEnter:ie,handleMouseLeave:ue,handleMouseDown:V,handleChange:X,handleClick:P,handleClear:$,handlePasswordToggleClick:Se,handlePasswordToggleMousedown:S,handleWrapperKeyDown:K,handleTextAreaMirrorResize:$t,getTextareaScrollContainer:()=>l.value,mergedTheme:i,cssVars:r?void 0:kn,themeClass:xr?.themeClass,onRender:xr?.onRender})},render(){let{mergedClsPrefix:e,mergedStatus:t,themeClass:o,onRender:r,$slots:n}=this;return r?.(),v("div",{ref:"wrapperElRef",class:[`${e}-input`,o,t&&`${e}-input--${t}-status`,{[`${e}-input--rtl`]:this.rtlEnabled,[`${e}-input--disabled`]:this.mergedDisabled,[`${e}-input--textarea`]:this.type==="textarea",[`${e}-input--resizable`]:this.resizable&&!this.autosize,[`${e}-input--autosize`]:this.autosize,[`${e}-input--round`]:this.round&&this.type!=="textarea",[`${e}-input--pair`]:this.pair,[`${e}-input--focus`]:this.mergedFocus,[`${e}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.onKeyup,onKeydown:this.handleWrapperKeyDown},v("div",{class:`${e}-input-wrapper`},Xo(n.prefix,i=>i&&v("div",{class:`${e}-input__prefix`},i)),this.type==="textarea"?v(as,{ref:"textareaScrollbarInstRef",class:`${e}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0},{default:()=>{let{textAreaScrollContainerWidth:i}=this,a={width:this.autosize&&i&&`${i}px`};return v(St,null,v("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:`${e}-input__textarea-el`,autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:this.maxlength,minlength:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],a],onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?v("div",{class:`${e}-input__placeholder`,style:[this.placeholderStyle,a],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?v(No,{onResize:this.handleTextAreaMirrorResize},{default:()=>v("div",{ref:"textareaMirrorElRef",class:`${e}-input__textarea-mirror`,key:"mirror"})}):null)}}):v("div",{class:`${e}-input__input`},v("input",Object.assign({type:this.type==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":this.type},this.inputProps,{ref:"inputElRef",class:`${e}-input__input-el`,style:this.textDecorationStyle[0],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:this.maxlength,minlength:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,onInput:i=>this.handleInput(i,0),onChange:i=>this.handleChange(i,0)})),this.showPlaceholder1?v("div",{class:`${e}-input__placeholder`},v("span",null,this.mergedPlaceholder[0])):null,this.autosize?v("div",{class:`${e}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"},"\xA0"):null),!this.pair&&Xo(n.suffix,i=>i||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?v("div",{class:`${e}-input__suffix`},[Xo(n.clear,a=>(this.clearable||a)&&v(yn,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{default:()=>a})),this.internalLoadingBeforeSuffix?null:i,this.loading!==void 0?v(ss,{clsPrefix:e,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?i:null,this.showCount&&this.type!=="textarea"?v(Id,null,{default:a=>{var l;return(l=n.count)===null||l===void 0?void 0:l.call(n,a)}}):null,this.mergedShowPasswordOn&&this.type==="password"?v(_o,{clsPrefix:e,class:`${e}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},{default:()=>this.passwordVisible?Yo(n["password-visible-icon"],()=>[v(fd,null)]):Yo(n["password-invisible-icon"],()=>[v(pd,null)])}):null]):null)),this.pair?v("span",{class:`${e}-input__separator`},Yo(n.separator,()=>[this.separator])):null,this.pair?v("div",{class:`${e}-input-wrapper`},v("div",{class:`${e}-input__input`},v("input",{ref:"inputEl2Ref",type:this.type,class:`${e}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:this.maxlength,minlength:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,onInput:i=>this.handleInput(i,1),onChange:i=>this.handleChange(i,1)}),this.showPlaceholder2?v("div",{class:`${e}-input__placeholder`},v("span",null,this.mergedPlaceholder[1])):null),Xo(n.suffix,i=>(this.clearable||i)&&v("div",{class:`${e}-input__suffix`},[this.clearable&&v(yn,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{default:()=>{var a;return(a=n.clear)===null||a===void 0?void 0:a.call(n)}}),i]))):null,this.mergedBordered?v("div",{class:`${e}-input__border`}):null,this.mergedBordered?v("div",{class:`${e}-input__state-border`}):null,this.showCount&&this.type==="textarea"?v(Id,null,{default:i=>{var a;return(a=n.count)===null||a===void 0?void 0:a.call(n,i)}}):null)}});function Md(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}var mj={name:"AutoComplete",common:ge,peers:{InternalSelectMenu:vn,Input:ho},self:Md};var OT={name:"AutoComplete",common:R,peers:{InternalSelectMenu:Po,Input:vt},self:Md},$d=OT;var Yv=e=>{let{borderRadius:t,avatarColor:o,cardColor:r,fontSize:n,heightTiny:i,heightSmall:a,heightMedium:l,heightLarge:s,heightHuge:c,modalColor:d,popoverColor:u}=e;return{borderRadius:t,fontSize:n,border:`2px solid ${r}`,heightTiny:i,heightSmall:a,heightMedium:l,heightLarge:s,heightHuge:c,color:xe(r,o),colorModal:xe(d,o),colorPopover:xe(u,o)}};var NT={name:"Avatar",common:R,self:Yv},aa=NT;var PT={name:"AvatarGroup",common:R,peers:{Avatar:aa}},Ld=PT;var Xv={width:"44px",height:"44px",borderRadius:"22px",iconSize:"26px"};var RT={name:"BackTop",common:R,self(e){let{popoverColor:t,textColor2:o,primaryColorHover:r,primaryColorPressed:n}=e;return Object.assign(Object.assign({},Xv),{color:t,textColor:o,iconColor:o,iconColorHover:r,iconColorPressed:n,boxShadow:"0 2px 8px 0px rgba(0, 0, 0, .12)",boxShadowHover:"0 2px 12px 0px rgba(0, 0, 0, .18)",boxShadowPressed:"0 2px 12px 0px rgba(0, 0, 0, .18)"})}},zd=RT;var IT={name:"Badge",common:R,self(e){let{errorColorSuppl:t,infoColorSuppl:o,successColorSuppl:r,warningColorSuppl:n,fontFamily:i}=e;return{color:t,colorInfo:o,colorSuccess:r,colorError:t,colorWarning:n,fontSize:"12px",fontFamily:i}}},Bd=IT;var Zv={fontWeightActive:"400"};var Qv=e=>{let{fontSize:t,textColor3:o,primaryColorHover:r,primaryColorPressed:n,textColor2:i}=e;return Object.assign(Object.assign({},Zv),{fontSize:t,itemTextColor:o,itemTextColorHover:r,itemTextColorPressed:n,itemTextColorActive:i,separatorColor:o})};var AT={name:"Breadcrumb",common:R,self:Qv},Hd=AT;function Kr(e){return xe(e,[255,255,255,.16])}function la(e){return xe(e,[0,0,0,.12])}var Jv={paddingTiny:"0 6px",paddingSmall:"0 10px",paddingMedium:"0 14px",paddingLarge:"0 18px",paddingRoundTiny:"0 10px",paddingRoundSmall:"0 14px",paddingRoundMedium:"0 18px",paddingRoundLarge:"0 22px",iconMarginTiny:"6px",iconMarginSmall:"6px",iconMarginMedium:"6px",iconMarginLarge:"6px",iconSizeTiny:"14px",iconSizeSmall:"18px",iconSizeMedium:"18px",iconSizeLarge:"20px",rippleDuration:".6s"};var Vd=e=>{let{heightTiny:t,heightSmall:o,heightMedium:r,heightLarge:n,borderRadius:i,fontSizeTiny:a,fontSizeSmall:l,fontSizeMedium:s,fontSizeLarge:c,opacityDisabled:d,textColor2:u,textColor3:p,primaryColorHover:f,primaryColorPressed:m,borderColor:y,primaryColor:_,baseColor:h,infoColor:O,infoColorHover:W,infoColorPressed:w,successColor:b,successColorHover:D,successColorPressed:x,warningColor:k,warningColorHover:A,warningColorPressed:E,errorColor:H,errorColorHover:M,errorColorPressed:le,fontWeight:ye,buttonColor2:Pe,buttonColor2Hover:fe,buttonColor2Pressed:ce,fontWeightStrong:Ce}=e;return Object.assign(Object.assign({},Jv),{heightTiny:t,heightSmall:o,heightMedium:r,heightLarge:n,borderRadiusTiny:i,borderRadiusSmall:i,borderRadiusMedium:i,borderRadiusLarge:i,fontSizeTiny:a,fontSizeSmall:l,fontSizeMedium:s,fontSizeLarge:c,opacityDisabled:d,colorOpacitySecondary:"0.16",colorOpacitySecondaryHover:"0.22",colorOpacitySecondaryPressed:"0.28",colorSecondary:Pe,colorSecondaryHover:fe,colorSecondaryPressed:ce,colorTertiary:Pe,colorTertiaryHover:fe,colorTertiaryPressed:ce,colorQuaternary:"#0000",colorQuaternaryHover:fe,colorQuaternaryPressed:ce,color:"#0000",colorHover:"#0000",colorPressed:"#0000",colorFocus:"#0000",colorDisabled:"#0000",textColor:u,textColorTertiary:p,textColorHover:f,textColorPressed:m,textColorFocus:f,textColorDisabled:u,textColorText:u,textColorTextHover:f,textColorTextPressed:m,textColorTextFocus:f,textColorTextDisabled:u,textColorGhost:u,textColorGhostHover:f,textColorGhostPressed:m,textColorGhostFocus:f,textColorGhostDisabled:u,border:`1px solid ${y}`,borderHover:`1px solid ${f}`,borderPressed:`1px solid ${m}`,borderFocus:`1px solid ${f}`,borderDisabled:`1px solid ${y}`,rippleColor:_,colorPrimary:_,colorHoverPrimary:f,colorPressedPrimary:m,colorFocusPrimary:f,colorDisabledPrimary:_,textColorPrimary:h,textColorHoverPrimary:h,textColorPressedPrimary:h,textColorFocusPrimary:h,textColorDisabledPrimary:h,textColorTextPrimary:_,textColorTextHoverPrimary:f,textColorTextPressedPrimary:m,textColorTextFocusPrimary:f,textColorTextDisabledPrimary:u,textColorGhostPrimary:_,textColorGhostHoverPrimary:f,textColorGhostPressedPrimary:m,textColorGhostFocusPrimary:f,textColorGhostDisabledPrimary:_,borderPrimary:`1px solid ${_}`,borderHoverPrimary:`1px solid ${f}`,borderPressedPrimary:`1px solid ${m}`,borderFocusPrimary:`1px solid ${f}`,borderDisabledPrimary:`1px solid ${_}`,rippleColorPrimary:_,colorInfo:O,colorHoverInfo:W,colorPressedInfo:w,colorFocusInfo:W,colorDisabledInfo:O,textColorInfo:h,textColorHoverInfo:h,textColorPressedInfo:h,textColorFocusInfo:h,textColorDisabledInfo:h,textColorTextInfo:O,textColorTextHoverInfo:W,textColorTextPressedInfo:w,textColorTextFocusInfo:W,textColorTextDisabledInfo:u,textColorGhostInfo:O,textColorGhostHoverInfo:W,textColorGhostPressedInfo:w,textColorGhostFocusInfo:W,textColorGhostDisabledInfo:O,borderInfo:`1px solid ${O}`,borderHoverInfo:`1px solid ${W}`,borderPressedInfo:`1px solid ${w}`,borderFocusInfo:`1px solid ${W}`,borderDisabledInfo:`1px solid ${O}`,rippleColorInfo:O,colorSuccess:b,colorHoverSuccess:D,colorPressedSuccess:x,colorFocusSuccess:D,colorDisabledSuccess:b,textColorSuccess:h,textColorHoverSuccess:h,textColorPressedSuccess:h,textColorFocusSuccess:h,textColorDisabledSuccess:h,textColorTextSuccess:b,textColorTextHoverSuccess:D,textColorTextPressedSuccess:x,textColorTextFocusSuccess:D,textColorTextDisabledSuccess:u,textColorGhostSuccess:b,textColorGhostHoverSuccess:D,textColorGhostPressedSuccess:x,textColorGhostFocusSuccess:D,textColorGhostDisabledSuccess:b,borderSuccess:`1px solid ${b}`,borderHoverSuccess:`1px solid ${D}`,borderPressedSuccess:`1px solid ${x}`,borderFocusSuccess:`1px solid ${D}`,borderDisabledSuccess:`1px solid ${b}`,rippleColorSuccess:b,colorWarning:k,colorHoverWarning:A,colorPressedWarning:E,colorFocusWarning:A,colorDisabledWarning:k,textColorWarning:h,textColorHoverWarning:h,textColorPressedWarning:h,textColorFocusWarning:h,textColorDisabledWarning:h,textColorTextWarning:k,textColorTextHoverWarning:A,textColorTextPressedWarning:E,textColorTextFocusWarning:A,textColorTextDisabledWarning:u,textColorGhostWarning:k,textColorGhostHoverWarning:A,textColorGhostPressedWarning:E,textColorGhostFocusWarning:A,textColorGhostDisabledWarning:k,borderWarning:`1px solid ${k}`,borderHoverWarning:`1px solid ${A}`,borderPressedWarning:`1px solid ${E}`,borderFocusWarning:`1px solid ${A}`,borderDisabledWarning:`1px solid ${k}`,rippleColorWarning:k,colorError:H,colorHoverError:M,colorPressedError:le,colorFocusError:M,colorDisabledError:H,textColorError:h,textColorHoverError:h,textColorPressedError:h,textColorFocusError:h,textColorDisabledError:h,textColorTextError:H,textColorTextHoverError:M,textColorTextPressedError:le,textColorTextFocusError:M,textColorTextDisabledError:u,textColorGhostError:H,textColorGhostHoverError:M,textColorGhostPressedError:le,textColorGhostFocusError:M,textColorGhostDisabledError:H,borderError:`1px solid ${H}`,borderHoverError:`1px solid ${M}`,borderPressedError:`1px solid ${le}`,borderFocusError:`1px solid ${M}`,borderDisabledError:`1px solid ${H}`,rippleColorError:H,waveOpacity:"0.6",fontWeight:ye,fontWeightStrong:Ce})},MT={name:"Button",common:ge,self:Vd},Rt=MT;var $T={name:"Button",common:R,self(e){let t=Vd(e);return t.waveOpacity="0.8",t.colorOpacitySecondary="0.16",t.colorOpacitySecondaryHover="0.2",t.colorOpacitySecondaryPressed="0.12",t}},it=$T;var eb="n-button-group";var tb=J([U("button",` margin: 0; font-weight: var(--n-font-weight); line-height: 1; @@ -570,7 +570,7 @@ ${t} background-color .3s var(--n-bezier), opacity .3s var(--n-bezier), border-color .3s var(--n-bezier); - `,[be("color",[ee("border",{borderColor:"var(--n-border-color)"}),be("disabled",[ee("border",{borderColor:"var(--n-border-color-disabled)"})]),oo("disabled",[J("&:focus",[ee("state-border",{borderColor:"var(--n-border-color-focus)"})]),J("&:hover",[ee("state-border",{borderColor:"var(--n-border-color-hover)"})]),J("&:active",[ee("state-border",{borderColor:"var(--n-border-color-pressed)"})]),be("pressed",[ee("state-border",{borderColor:"var(--n-border-color-pressed)"})])])]),be("disabled",{backgroundColor:"var(--n-color-disabled)",color:"var(--n-text-color-disabled)"},[ee("border",{border:"var(--n-border-disabled)"})]),oo("disabled",[J("&:focus",{backgroundColor:"var(--n-color-focus)",color:"var(--n-text-color-focus)"},[ee("state-border",{border:"var(--n-border-focus)"})]),J("&:hover",{backgroundColor:"var(--n-color-hover)",color:"var(--n-text-color-hover)"},[ee("state-border",{border:"var(--n-border-hover)"})]),J("&:active",{backgroundColor:"var(--n-color-pressed)",color:"var(--n-text-color-pressed)"},[ee("state-border",{border:"var(--n-border-pressed)"})]),be("pressed",{backgroundColor:"var(--n-color-pressed)",color:"var(--n-text-color-pressed)"},[ee("state-border",{border:"var(--n-border-pressed)"})])]),be("loading",{"pointer-events":"none"}),U("base-wave",` + `,[be("color",[ee("border",{borderColor:"var(--n-border-color)"}),be("disabled",[ee("border",{borderColor:"var(--n-border-color-disabled)"})]),ro("disabled",[J("&:focus",[ee("state-border",{borderColor:"var(--n-border-color-focus)"})]),J("&:hover",[ee("state-border",{borderColor:"var(--n-border-color-hover)"})]),J("&:active",[ee("state-border",{borderColor:"var(--n-border-color-pressed)"})]),be("pressed",[ee("state-border",{borderColor:"var(--n-border-color-pressed)"})])])]),be("disabled",{backgroundColor:"var(--n-color-disabled)",color:"var(--n-text-color-disabled)"},[ee("border",{border:"var(--n-border-disabled)"})]),ro("disabled",[J("&:focus",{backgroundColor:"var(--n-color-focus)",color:"var(--n-text-color-focus)"},[ee("state-border",{border:"var(--n-border-focus)"})]),J("&:hover",{backgroundColor:"var(--n-color-hover)",color:"var(--n-text-color-hover)"},[ee("state-border",{border:"var(--n-border-hover)"})]),J("&:active",{backgroundColor:"var(--n-color-pressed)",color:"var(--n-text-color-pressed)"},[ee("state-border",{border:"var(--n-border-pressed)"})]),be("pressed",{backgroundColor:"var(--n-color-pressed)",color:"var(--n-text-color-pressed)"},[ee("state-border",{border:"var(--n-border-pressed)"})])]),be("loading",{"pointer-events":"none"}),U("base-wave",` pointer-events: none; top: 0; right: 0; @@ -605,14 +605,14 @@ ${t} top: 50%; transform: translateY(-50%); display: flex; - `,[co({top:"50%",originalTransform:"translateY(-50%)"})]),jv()]),ee("content",` + `,[fo({top:"50%",originalTransform:"translateY(-50%)"})]),jv()]),ee("content",` display: flex; align-items: center; flex-wrap: nowrap; `,[J("~",[ee("icon",{margin:"var(--n-icon-margin)",marginRight:0})])]),be("block",` display: flex; width: 100%; - `),be("dashed",[ee("border, state-border",{borderStyle:"dashed !important"})]),be("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),J("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),J("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]);var zT=Object.assign(Object.assign({},Ct.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],internalAutoFocus:Boolean}),BT=ue({name:"Button",props:zT,setup(e){let t=X(null),o=X(null),r=X(!1);tt(()=>{let{value:S}=t;S&&!e.disabled&&e.focusable&&e.internalAutoFocus&&S.focus({preventScroll:!0})});let n=Qe(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),i=ke(eb,{}),{mergedSizeRef:a}=Co({},{defaultSize:"medium",mergedSize:S=>{let{size:v}=e;if(v)return v;let{size:D}=i;if(D)return D;let{mergedSize:x}=S||{};return x?x.value:"medium"}}),l=F(()=>e.focusable&&!e.disabled),s=S=>{var v;S.preventDefault(),!e.disabled&&l.value&&((v=t.value)===null||v===void 0||v.focus({preventScroll:!0}))},c=S=>{var v;if(!e.disabled&&!e.loading){let{onClick:D}=e;D&&Se(D,S),e.text||(v=o.value)===null||v===void 0||v.play()}},d=S=>{switch(S.code){case"Enter":case"NumpadEnter":if(!e.keyboard)return;r.value=!1}},u=S=>{switch(S.code){case"Enter":case"NumpadEnter":if(!e.keyboard||e.loading){S.preventDefault();return}r.value=!0}},p=()=>{r.value=!1},{inlineThemeDisabled:f,mergedClsPrefixRef:m,mergedRtlRef:y}=Mt(e),w=Ct("Button","-button",tb,Nt,e,m),g=bn("Button",y,m),O=F(()=>{let S=w.value,{common:{cubicBezierEaseInOut:v,cubicBezierEaseOut:D},self:x}=S,{rippleDuration:k,opacityDisabled:A,fontWeight:E,fontWeightStrong:z}=x,M=a.value,{dashed:se,type:ye,ghost:Ie,text:fe,color:ce,round:we,circle:Me,textColor:Be,secondary:Le,tertiary:Je,quaternary:Xe,strong:ct}=e,wt={"font-weight":ct?z:E},ze={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"},We=ye==="tertiary",vt=ye==="default",Pe=We?"default":ye;if(fe){let H=Be||ce;ze={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":H||x[Te("textColorText",Pe)],"--n-text-color-hover":H?Kr(H):x[Te("textColorTextHover",Pe)],"--n-text-color-pressed":H?la(H):x[Te("textColorTextPressed",Pe)],"--n-text-color-focus":H?Kr(H):x[Te("textColorTextHover",Pe)],"--n-text-color-disabled":H||x[Te("textColorTextDisabled",Pe)]}}else if(Ie||se){let H=Be||ce;ze={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":ce||x[Te("rippleColor",Pe)],"--n-text-color":H||x[Te("textColorGhost",Pe)],"--n-text-color-hover":H?Kr(H):x[Te("textColorGhostHover",Pe)],"--n-text-color-pressed":H?la(H):x[Te("textColorGhostPressed",Pe)],"--n-text-color-focus":H?Kr(H):x[Te("textColorGhostHover",Pe)],"--n-text-color-disabled":H||x[Te("textColorGhostDisabled",Pe)]}}else if(Le){let H=vt?x.textColor:We?x.textColorTertiary:x[Te("color",Pe)],Q=ce||H,Y=ye!=="default"&&ye!=="tertiary";ze={"--n-color":Y?te(Q,{alpha:Number(x.colorOpacitySecondary)}):x.colorSecondary,"--n-color-hover":Y?te(Q,{alpha:Number(x.colorOpacitySecondaryHover)}):x.colorSecondaryHover,"--n-color-pressed":Y?te(Q,{alpha:Number(x.colorOpacitySecondaryPressed)}):x.colorSecondaryPressed,"--n-color-focus":Y?te(Q,{alpha:Number(x.colorOpacitySecondaryHover)}):x.colorSecondaryHover,"--n-color-disabled":x.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":Q,"--n-text-color-hover":Q,"--n-text-color-pressed":Q,"--n-text-color-focus":Q,"--n-text-color-disabled":Q}}else if(Je||Xe){let H=vt?x.textColor:We?x.textColorTertiary:x[Te("color",Pe)],Q=ce||H;Je?(ze["--n-color"]=x.colorTertiary,ze["--n-color-hover"]=x.colorTertiaryHover,ze["--n-color-pressed"]=x.colorTertiaryPressed,ze["--n-color-focus"]=x.colorSecondaryHover,ze["--n-color-disabled"]=x.colorTertiary):(ze["--n-color"]=x.colorQuaternary,ze["--n-color-hover"]=x.colorQuaternaryHover,ze["--n-color-pressed"]=x.colorQuaternaryPressed,ze["--n-color-focus"]=x.colorQuaternaryHover,ze["--n-color-disabled"]=x.colorQuaternary),ze["--n-ripple-color"]="#0000",ze["--n-text-color"]=Q,ze["--n-text-color-hover"]=Q,ze["--n-text-color-pressed"]=Q,ze["--n-text-color-focus"]=Q,ze["--n-text-color-disabled"]=Q}else ze={"--n-color":ce||x[Te("color",Pe)],"--n-color-hover":ce?Kr(ce):x[Te("colorHover",Pe)],"--n-color-pressed":ce?la(ce):x[Te("colorPressed",Pe)],"--n-color-focus":ce?Kr(ce):x[Te("colorFocus",Pe)],"--n-color-disabled":ce||x[Te("colorDisabled",Pe)],"--n-ripple-color":ce||x[Te("rippleColor",Pe)],"--n-text-color":Be||(ce?x.textColorPrimary:We?x.textColorTertiary:x[Te("textColor",Pe)]),"--n-text-color-hover":Be||(ce?x.textColorHoverPrimary:x[Te("textColorHover",Pe)]),"--n-text-color-pressed":Be||(ce?x.textColorPressedPrimary:x[Te("textColorPressed",Pe)]),"--n-text-color-focus":Be||(ce?x.textColorFocusPrimary:x[Te("textColorFocus",Pe)]),"--n-text-color-disabled":Be||(ce?x.textColorDisabledPrimary:x[Te("textColorDisabled",Pe)])};let ot={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};fe?ot={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:ot={"--n-border":x[Te("border",Pe)],"--n-border-hover":x[Te("borderHover",Pe)],"--n-border-pressed":x[Te("borderPressed",Pe)],"--n-border-focus":x[Te("borderFocus",Pe)],"--n-border-disabled":x[Te("borderDisabled",Pe)]};let{[Te("height",M)]:rt,[Te("fontSize",M)]:Dt,[Te("padding",M)]:h,[Te("paddingRound",M)]:C,[Te("iconSize",M)]:L,[Te("borderRadius",M)]:q,[Te("iconMargin",M)]:K,waveOpacity:ne}=x,oe={"--n-width":Me&&!fe?rt:"initial","--n-height":fe?"initial":rt,"--n-font-size":Dt,"--n-padding":Me||fe?"initial":we?C:h,"--n-icon-size":L,"--n-icon-margin":K,"--n-border-radius":fe?"initial":Me||we?rt:q};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":v,"--n-bezier-ease-out":D,"--n-ripple-duration":k,"--n-opacity-disabled":A,"--n-wave-opacity":ne},wt),ze),ot),oe)}),j=f?qt("button",F(()=>{let S="",{dashed:v,type:D,ghost:x,text:k,color:A,round:E,circle:z,textColor:M,secondary:se,tertiary:ye,quaternary:Ie,strong:fe}=e;v&&(S+="a"),x&&(S+="b"),k&&(S+="c"),E&&(S+="d"),z&&(S+="e"),se&&(S+="f"),ye&&(S+="g"),Ie&&(S+="h"),fe&&(S+="i"),A&&(S+="j"+Ri(A)),M&&(S+="k"+Ri(M));let{value:ce}=a;return S+="l"+ce[0],S+="m"+D[0],S}),O,e):void 0;return{selfElRef:t,waveElRef:o,mergedClsPrefix:m,mergedFocusable:l,mergedSize:a,showBorder:n,enterPressed:r,rtlEnabled:g,handleMousedown:s,handleKeydown:u,handleBlur:p,handleKeyup:d,handleClick:c,customColorCssVars:F(()=>{let{color:S}=e;if(!S)return null;let v=Kr(S);return{"--n-border-color":S,"--n-border-color-hover":v,"--n-border-color-pressed":la(S),"--n-border-color-focus":v,"--n-border-color-disabled":S}}),cssVars:f?void 0:O,themeClass:j?.themeClass,onRender:j?.onRender}},render(){let{mergedClsPrefix:e,tag:t,onRender:o}=this;o?.();let r=Xo(this.$slots.default,n=>n&&b("span",{class:`${e}-button__content`},n));return b(t,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&r,b(Jn,{width:!0},{default:()=>Xo(this.$slots.icon,n=>(this.loading||n)&&b("span",{class:`${e}-button__icon`,style:{margin:fl(this.$slots.default)?"0":""}},b(So,null,{default:()=>this.loading?b(jr,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):b("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},n)})))}),this.iconPlacement==="left"&&r,this.text?null:b(as,{ref:"waveElRef",clsPrefix:e}),this.showBorder?b("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?b("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),Fd=BT;var ob={titleFontSize:"22px"};var jd=e=>{let{borderRadius:t,fontSize:o,lineHeight:r,textColor2:n,textColor1:i,textColorDisabled:a,dividerColor:l,fontWeightStrong:s,primaryColor:c,baseColor:d,hoverColor:u,cardColor:p,modalColor:f,popoverColor:m}=e;return Object.assign(Object.assign({},ob),{borderRadius:t,borderColor:xe(p,l),borderColorModal:xe(f,l),borderColorPopover:xe(m,l),textColor:n,titleFontWeight:s,titleTextColor:i,dayTextColor:a,fontSize:o,lineHeight:r,dateColorCurrent:c,dateTextColorCurrent:d,cellColorHover:xe(p,u),cellColorHoverModal:xe(f,u),cellColorHoverPopover:xe(m,u),cellColor:p,cellColorModal:f,cellColorPopover:m,barColor:c})},BW={name:"Calendar",common:ge,peers:{Button:Nt},self:jd};var HT={name:"Calendar",common:R,peers:{Button:lt},self:jd},Wd=HT;var Kd=e=>{let{fontSize:t,boxShadow2:o,popoverColor:r,textColor2:n,borderRadius:i,borderColor:a,heightSmall:l,heightMedium:s,heightLarge:c,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,dividerColor:f}=e;return{panelFontSize:t,boxShadow:o,color:r,textColor:n,borderRadius:i,border:`1px solid ${a}`,heightSmall:l,heightMedium:s,heightLarge:c,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,dividerColor:f}},XW={name:"ColorPicker",common:ge,peers:{Input:po,Button:Nt},self:Kd};var VT={name:"ColorPicker",common:R,peers:{Input:xt,Button:lt},self:Kd},Ud=VT;var rb={paddingSmall:"12px 16px 12px",paddingMedium:"19px 24px 20px",paddingLarge:"23px 32px 24px",paddingHuge:"27px 40px 28px",titleFontSizeSmall:"16px",titleFontSizeMedium:"18px",titleFontSizeLarge:"18px",titleFontSizeHuge:"18px",closeSize:"18px"};var qd=e=>{let{primaryColor:t,borderRadius:o,lineHeight:r,fontSize:n,cardColor:i,textColor2:a,textColor1:l,dividerColor:s,fontWeightStrong:c,closeColor:d,closeColorHover:u,closeColorPressed:p,modalColor:f,boxShadow1:m,popoverColor:y,actionColor:w}=e;return Object.assign(Object.assign({},rb),{lineHeight:r,color:i,colorModal:f,colorPopover:y,colorTarget:t,colorEmbedded:w,textColor:a,titleTextColor:l,borderColor:s,actionColor:w,titleFontWeight:c,closeColor:d,closeColorHover:u,closeColorPressed:p,fontSizeSmall:n,fontSizeMedium:n,fontSizeLarge:n,fontSizeHuge:n,boxShadow:m,borderRadius:o})},FT={name:"Card",common:ge,self:qd},Gd=FT;var jT={name:"Card",common:R,self(e){let t=qd(e),{cardColor:o}=e;return t.colorEmbedded=o,t}},sa=jT;var nb=e=>({dotSize:"8px",dotColor:"rgba(255, 255, 255, .3)",dotColorActive:"rgba(255, 255, 255, 1)",dotColorFocus:"rgba(255, 255, 255, .5)",dotLineWidth:"16px",dotLineWidthActive:"24px",arrowColor:"#eee"});var WT={name:"Carousel",common:R,self:nb},Yd=WT;var ib={sizeSmall:"14px",sizeMedium:"16px",sizeLarge:"18px",labelPadding:"0 8px"};var Xd=e=>{let{baseColor:t,inputColorDisabled:o,cardColor:r,modalColor:n,popoverColor:i,textColorDisabled:a,borderColor:l,primaryColor:s,textColor2:c,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,borderRadiusSmall:f,lineHeight:m}=e;return Object.assign(Object.assign({},ib),{labelLineHeight:m,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,borderRadius:f,color:t,colorChecked:s,colorDisabled:o,colorDisabledChecked:o,colorTableHeader:r,colorTableHeaderModal:n,colorTableHeaderPopover:i,checkMarkColor:t,checkMarkColorDisabled:a,checkMarkColorDisabledChecked:a,border:`1px solid ${l}`,borderDisabled:`1px solid ${l}`,borderDisabledChecked:`1px solid ${l}`,borderChecked:`1px solid ${s}`,borderFocus:`1px solid ${s}`,boxShadowFocus:`0 0 0 2px ${te(s,{alpha:.3})}`,textColor:c,textColorDisabled:a})},KT={name:"Checkbox",common:ge,self:Xd},mr=KT;var UT={name:"Checkbox",common:R,self(e){let{cardColor:t}=e,o=Xd(e);return o.color="#0000",o.checkMarkColor=t,o}},Io=UT;var Zd=e=>{let{borderRadius:t,boxShadow2:o,popoverColor:r,textColor2:n,textColor3:i,primaryColor:a,textColorDisabled:l,dividerColor:s,hoverColor:c,fontSizeMedium:d,heightMedium:u}=e;return{menuBorderRadius:t,menuColor:r,menuBoxShadow:o,menuDividerColor:s,menuHeight:"calc(var(--n-option-height) * 6.6)",optionArrowColor:i,optionHeight:u,optionFontSize:d,optionColorHover:c,optionTextColor:n,optionTextColorActive:a,optionTextColorDisabled:l,optionCheckMarkColor:a,loadingColor:a,columnWidth:"180px"}},z9={name:"Cascader",common:ge,peers:{InternalSelectMenu:vn,InternalSelection:na,Scrollbar:_t,Checkbox:mr,Empty:uo},self:Zd};var qT={name:"Cascader",common:R,peers:{InternalSelectMenu:No,InternalSelection:Cn,Scrollbar:at,Checkbox:Io,Empty:uo},self:Zd},Qd=qT;var ab=b("svg",{viewBox:"0 0 64 64",class:"check-icon"},b("path",{d:"M50.42,16.76L22.34,39.45l-8.1-11.46c-1.12-1.58-3.3-1.96-4.88-0.84c-1.58,1.12-1.95,3.3-0.84,4.88l10.26,14.51 c0.56,0.79,1.42,1.31,2.38,1.45c0.16,0.02,0.32,0.03,0.48,0.03c0.8,0,1.57-0.27,2.2-0.78l30.99-25.03c1.5-1.21,1.74-3.42,0.52-4.92 C54.13,15.78,51.93,15.55,50.42,16.76z"}));var lb=b("svg",{viewBox:"0 0 100 100",class:"line-icon"},b("path",{d:"M80.2,55.5H21.4c-2.8,0-5.1-2.5-5.1-5.5l0,0c0-3,2.3-5.5,5.1-5.5h58.7c2.8,0,5.1,2.5,5.1,5.5l0,0C85.2,53.1,82.9,55.5,80.2,55.5z"}));var Jd="n-checkbox-group",GT={min:Number,max:Number,size:String,value:Array,defaultValue:{type:Array,default:null},disabled:{type:Boolean,default:void 0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onChange:{type:[Function,Array],validator:()=>!0,default:void 0}},iK=ue({name:"CheckboxGroup",props:GT,setup(e){let{mergedClsPrefixRef:t}=Mt(e),o=Co(e),{mergedSizeRef:r,mergedDisabledRef:n}=o,i=X(e.defaultValue),a=F(()=>e.value),l=Xt(a,i),s=F(()=>{var u;return((u=l.value)===null||u===void 0?void 0:u.length)||0}),c=F(()=>Array.isArray(l.value)?new Set(l.value):new Set);function d(u,p){let{nTriggerFormInput:f,nTriggerFormChange:m}=o,{onChange:y,"onUpdate:value":w,onUpdateValue:g}=e;if(Array.isArray(l.value)){let O=Array.from(l.value),j=O.findIndex(S=>S===p);u?~j||(O.push(p),g&&Se(g,O),w&&Se(w,O),f(),m(),i.value=O,y&&Se(y,O)):~j&&(O.splice(j,1),g&&Se(g,O),w&&Se(w,O),y&&Se(y,O),i.value=O,f(),m())}else u?(g&&Se(g,[p]),w&&Se(w,[p]),y&&Se(y,[p]),i.value=[p],f(),m()):(g&&Se(g,[]),w&&Se(w,[]),y&&Se(y,[]),i.value=[],f(),m())}return Yt(Jd,{checkedCountRef:s,maxRef:Re(e,"max"),minRef:Re(e,"min"),valueSetRef:c,disabledRef:n,mergedSizeRef:r,toggleCheckbox:d}),{mergedClsPrefix:t}},render(){return b("div",{class:`${this.mergedClsPrefix}-checkbox-group`,role:"group"},this.$slots)}});var sb=J([U("checkbox",` + `),be("dashed",[ee("border, state-border",{borderStyle:"dashed !important"})]),be("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),J("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),J("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]);var LT=Object.assign(Object.assign({},wt.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],internalAutoFocus:Boolean}),zT=de({name:"Button",props:LT,setup(e){let t=Z(null),o=Z(null),r=Z(!1);Je(()=>{let{value:w}=t;w&&!e.disabled&&e.focusable&&e.internalAutoFocus&&w.focus({preventScroll:!0})});let n=et(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),i=we(eb,{}),{mergedSizeRef:a}=Co({},{defaultSize:"medium",mergedSize:w=>{let{size:b}=e;if(b)return b;let{size:D}=i;if(D)return D;let{mergedSize:x}=w||{};return x?x.value:"medium"}}),l=j(()=>e.focusable&&!e.disabled),s=w=>{var b;w.preventDefault(),!e.disabled&&l.value&&((b=t.value)===null||b===void 0||b.focus({preventScroll:!0}))},c=w=>{var b;if(!e.disabled&&!e.loading){let{onClick:D}=e;D&&ke(D,w),e.text||(b=o.value)===null||b===void 0||b.play()}},d=w=>{switch(w.code){case"Enter":case"NumpadEnter":if(!e.keyboard)return;r.value=!1}},u=w=>{switch(w.code){case"Enter":case"NumpadEnter":if(!e.keyboard||e.loading){w.preventDefault();return}r.value=!0}},p=()=>{r.value=!1},{inlineThemeDisabled:f,mergedClsPrefixRef:m,mergedRtlRef:y}=At(e),_=wt("Button","-button",tb,Rt,e,m),h=bn("Button",y,m),O=j(()=>{let w=_.value,{common:{cubicBezierEaseInOut:b,cubicBezierEaseOut:D},self:x}=w,{rippleDuration:k,opacityDisabled:A,fontWeight:E,fontWeightStrong:H}=x,M=a.value,{dashed:le,type:ye,ghost:Pe,text:fe,color:ce,round:Ce,circle:Ke,textColor:He,secondary:Me,tertiary:Ye,quaternary:Xe,strong:Dt}=e,pt={"font-weight":Dt?H:E},Le={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"},We=ye==="tertiary",gt=ye==="default",Re=We?"default":ye;if(fe){let F=He||ce;Le={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":F||x[Te("textColorText",Re)],"--n-text-color-hover":F?Kr(F):x[Te("textColorTextHover",Re)],"--n-text-color-pressed":F?la(F):x[Te("textColorTextPressed",Re)],"--n-text-color-focus":F?Kr(F):x[Te("textColorTextHover",Re)],"--n-text-color-disabled":F||x[Te("textColorTextDisabled",Re)]}}else if(Pe||le){let F=He||ce;Le={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":ce||x[Te("rippleColor",Re)],"--n-text-color":F||x[Te("textColorGhost",Re)],"--n-text-color-hover":F?Kr(F):x[Te("textColorGhostHover",Re)],"--n-text-color-pressed":F?la(F):x[Te("textColorGhostPressed",Re)],"--n-text-color-focus":F?Kr(F):x[Te("textColorGhostHover",Re)],"--n-text-color-disabled":F||x[Te("textColorGhostDisabled",Re)]}}else if(Me){let F=gt?x.textColor:We?x.textColorTertiary:x[Te("color",Re)],Q=ce||F,X=ye!=="default"&&ye!=="tertiary";Le={"--n-color":X?te(Q,{alpha:Number(x.colorOpacitySecondary)}):x.colorSecondary,"--n-color-hover":X?te(Q,{alpha:Number(x.colorOpacitySecondaryHover)}):x.colorSecondaryHover,"--n-color-pressed":X?te(Q,{alpha:Number(x.colorOpacitySecondaryPressed)}):x.colorSecondaryPressed,"--n-color-focus":X?te(Q,{alpha:Number(x.colorOpacitySecondaryHover)}):x.colorSecondaryHover,"--n-color-disabled":x.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":Q,"--n-text-color-hover":Q,"--n-text-color-pressed":Q,"--n-text-color-focus":Q,"--n-text-color-disabled":Q}}else if(Ye||Xe){let F=gt?x.textColor:We?x.textColorTertiary:x[Te("color",Re)],Q=ce||F;Ye?(Le["--n-color"]=x.colorTertiary,Le["--n-color-hover"]=x.colorTertiaryHover,Le["--n-color-pressed"]=x.colorTertiaryPressed,Le["--n-color-focus"]=x.colorSecondaryHover,Le["--n-color-disabled"]=x.colorTertiary):(Le["--n-color"]=x.colorQuaternary,Le["--n-color-hover"]=x.colorQuaternaryHover,Le["--n-color-pressed"]=x.colorQuaternaryPressed,Le["--n-color-focus"]=x.colorQuaternaryHover,Le["--n-color-disabled"]=x.colorQuaternary),Le["--n-ripple-color"]="#0000",Le["--n-text-color"]=Q,Le["--n-text-color-hover"]=Q,Le["--n-text-color-pressed"]=Q,Le["--n-text-color-focus"]=Q,Le["--n-text-color-disabled"]=Q}else Le={"--n-color":ce||x[Te("color",Re)],"--n-color-hover":ce?Kr(ce):x[Te("colorHover",Re)],"--n-color-pressed":ce?la(ce):x[Te("colorPressed",Re)],"--n-color-focus":ce?Kr(ce):x[Te("colorFocus",Re)],"--n-color-disabled":ce||x[Te("colorDisabled",Re)],"--n-ripple-color":ce||x[Te("rippleColor",Re)],"--n-text-color":He||(ce?x.textColorPrimary:We?x.textColorTertiary:x[Te("textColor",Re)]),"--n-text-color-hover":He||(ce?x.textColorHoverPrimary:x[Te("textColorHover",Re)]),"--n-text-color-pressed":He||(ce?x.textColorPressedPrimary:x[Te("textColorPressed",Re)]),"--n-text-color-focus":He||(ce?x.textColorFocusPrimary:x[Te("textColorFocus",Re)]),"--n-text-color-disabled":He||(ce?x.textColorDisabledPrimary:x[Te("textColorDisabled",Re)])};let lt={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};fe?lt={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:lt={"--n-border":x[Te("border",Re)],"--n-border-hover":x[Te("borderHover",Re)],"--n-border-pressed":x[Te("borderPressed",Re)],"--n-border-focus":x[Te("borderFocus",Re)],"--n-border-disabled":x[Te("borderDisabled",Re)]};let{[Te("height",M)]:bt,[Te("fontSize",M)]:mt,[Te("padding",M)]:g,[Te("paddingRound",M)]:C,[Te("iconSize",M)]:z,[Te("borderRadius",M)]:q,[Te("iconMargin",M)]:G,waveOpacity:re}=x,oe={"--n-width":Ke&&!fe?bt:"initial","--n-height":fe?"initial":bt,"--n-font-size":mt,"--n-padding":Ke||fe?"initial":Ce?C:g,"--n-icon-size":z,"--n-icon-margin":G,"--n-border-radius":fe?"initial":Ke||Ce?bt:q};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":b,"--n-bezier-ease-out":D,"--n-ripple-duration":k,"--n-opacity-disabled":A,"--n-wave-opacity":re},pt),Le),lt),oe)}),W=f?Gt("button",j(()=>{let w="",{dashed:b,type:D,ghost:x,text:k,color:A,round:E,circle:H,textColor:M,secondary:le,tertiary:ye,quaternary:Pe,strong:fe}=e;b&&(w+="a"),x&&(w+="b"),k&&(w+="c"),E&&(w+="d"),H&&(w+="e"),le&&(w+="f"),ye&&(w+="g"),Pe&&(w+="h"),fe&&(w+="i"),A&&(w+="j"+Ri(A)),M&&(w+="k"+Ri(M));let{value:ce}=a;return w+="l"+ce[0],w+="m"+D[0],w}),O,e):void 0;return{selfElRef:t,waveElRef:o,mergedClsPrefix:m,mergedFocusable:l,mergedSize:a,showBorder:n,enterPressed:r,rtlEnabled:h,handleMousedown:s,handleKeydown:u,handleBlur:p,handleKeyup:d,handleClick:c,customColorCssVars:j(()=>{let{color:w}=e;if(!w)return null;let b=Kr(w);return{"--n-border-color":w,"--n-border-color-hover":b,"--n-border-color-pressed":la(w),"--n-border-color-focus":b,"--n-border-color-disabled":w}}),cssVars:f?void 0:O,themeClass:W?.themeClass,onRender:W?.onRender}},render(){let{mergedClsPrefix:e,tag:t,onRender:o}=this;o?.();let r=Xo(this.$slots.default,n=>n&&v("span",{class:`${e}-button__content`},n));return v(t,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&r,v(Jn,{width:!0},{default:()=>Xo(this.$slots.icon,n=>(this.loading||n)&&v("span",{class:`${e}-button__icon`,style:{margin:pl(this.$slots.default)?"0":""}},v(So,null,{default:()=>this.loading?v(jr,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):v("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},n)})))}),this.iconPlacement==="left"&&r,this.text?null:v(ls,{ref:"waveElRef",clsPrefix:e}),this.showBorder?v("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?v("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),Fd=zT;var ob={titleFontSize:"22px"};var jd=e=>{let{borderRadius:t,fontSize:o,lineHeight:r,textColor2:n,textColor1:i,textColorDisabled:a,dividerColor:l,fontWeightStrong:s,primaryColor:c,baseColor:d,hoverColor:u,cardColor:p,modalColor:f,popoverColor:m}=e;return Object.assign(Object.assign({},ob),{borderRadius:t,borderColor:xe(p,l),borderColorModal:xe(f,l),borderColorPopover:xe(m,l),textColor:n,titleFontWeight:s,titleTextColor:i,dayTextColor:a,fontSize:o,lineHeight:r,dateColorCurrent:c,dateTextColorCurrent:d,cellColorHover:xe(p,u),cellColorHoverModal:xe(f,u),cellColorHoverPopover:xe(m,u),cellColor:p,cellColorModal:f,cellColorPopover:m,barColor:c})},zW={name:"Calendar",common:ge,peers:{Button:Rt},self:jd};var BT={name:"Calendar",common:R,peers:{Button:it},self:jd},Wd=BT;var Kd=e=>{let{fontSize:t,boxShadow2:o,popoverColor:r,textColor2:n,borderRadius:i,borderColor:a,heightSmall:l,heightMedium:s,heightLarge:c,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,dividerColor:f}=e;return{panelFontSize:t,boxShadow:o,color:r,textColor:n,borderRadius:i,border:`1px solid ${a}`,heightSmall:l,heightMedium:s,heightLarge:c,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,dividerColor:f}},YW={name:"ColorPicker",common:ge,peers:{Input:ho,Button:Rt},self:Kd};var HT={name:"ColorPicker",common:R,peers:{Input:vt,Button:it},self:Kd},Ud=HT;var rb={paddingSmall:"12px 16px 12px",paddingMedium:"19px 24px 20px",paddingLarge:"23px 32px 24px",paddingHuge:"27px 40px 28px",titleFontSizeSmall:"16px",titleFontSizeMedium:"18px",titleFontSizeLarge:"18px",titleFontSizeHuge:"18px",closeSize:"18px"};var qd=e=>{let{primaryColor:t,borderRadius:o,lineHeight:r,fontSize:n,cardColor:i,textColor2:a,textColor1:l,dividerColor:s,fontWeightStrong:c,closeColor:d,closeColorHover:u,closeColorPressed:p,modalColor:f,boxShadow1:m,popoverColor:y,actionColor:_}=e;return Object.assign(Object.assign({},rb),{lineHeight:r,color:i,colorModal:f,colorPopover:y,colorTarget:t,colorEmbedded:_,textColor:a,titleTextColor:l,borderColor:s,actionColor:_,titleFontWeight:c,closeColor:d,closeColorHover:u,closeColorPressed:p,fontSizeSmall:n,fontSizeMedium:n,fontSizeLarge:n,fontSizeHuge:n,boxShadow:m,borderRadius:o})},VT={name:"Card",common:ge,self:qd},Gd=VT;var FT={name:"Card",common:R,self(e){let t=qd(e),{cardColor:o}=e;return t.colorEmbedded=o,t}},sa=FT;var nb=e=>({dotSize:"8px",dotColor:"rgba(255, 255, 255, .3)",dotColorActive:"rgba(255, 255, 255, 1)",dotColorFocus:"rgba(255, 255, 255, .5)",dotLineWidth:"16px",dotLineWidthActive:"24px",arrowColor:"#eee"});var jT={name:"Carousel",common:R,self:nb},Yd=jT;var ib={sizeSmall:"14px",sizeMedium:"16px",sizeLarge:"18px",labelPadding:"0 8px"};var Xd=e=>{let{baseColor:t,inputColorDisabled:o,cardColor:r,modalColor:n,popoverColor:i,textColorDisabled:a,borderColor:l,primaryColor:s,textColor2:c,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,borderRadiusSmall:f,lineHeight:m}=e;return Object.assign(Object.assign({},ib),{labelLineHeight:m,fontSizeSmall:d,fontSizeMedium:u,fontSizeLarge:p,borderRadius:f,color:t,colorChecked:s,colorDisabled:o,colorDisabledChecked:o,colorTableHeader:r,colorTableHeaderModal:n,colorTableHeaderPopover:i,checkMarkColor:t,checkMarkColorDisabled:a,checkMarkColorDisabledChecked:a,border:`1px solid ${l}`,borderDisabled:`1px solid ${l}`,borderDisabledChecked:`1px solid ${l}`,borderChecked:`1px solid ${s}`,borderFocus:`1px solid ${s}`,boxShadowFocus:`0 0 0 2px ${te(s,{alpha:.3})}`,textColor:c,textColorDisabled:a})},WT={name:"Checkbox",common:ge,self:Xd},mr=WT;var KT={name:"Checkbox",common:R,self(e){let{cardColor:t}=e,o=Xd(e);return o.color="#0000",o.checkMarkColor=t,o}},Io=KT;var Zd=e=>{let{borderRadius:t,boxShadow2:o,popoverColor:r,textColor2:n,textColor3:i,primaryColor:a,textColorDisabled:l,dividerColor:s,hoverColor:c,fontSizeMedium:d,heightMedium:u}=e;return{menuBorderRadius:t,menuColor:r,menuBoxShadow:o,menuDividerColor:s,menuHeight:"calc(var(--n-option-height) * 6.6)",optionArrowColor:i,optionHeight:u,optionFontSize:d,optionColorHover:c,optionTextColor:n,optionTextColorActive:a,optionTextColorDisabled:l,optionCheckMarkColor:a,loadingColor:a,columnWidth:"180px"}},L9={name:"Cascader",common:ge,peers:{InternalSelectMenu:vn,InternalSelection:na,Scrollbar:_t,Checkbox:mr,Empty:po},self:Zd};var UT={name:"Cascader",common:R,peers:{InternalSelectMenu:Po,InternalSelection:Cn,Scrollbar:nt,Checkbox:Io,Empty:po},self:Zd},Qd=UT;var ab=v("svg",{viewBox:"0 0 64 64",class:"check-icon"},v("path",{d:"M50.42,16.76L22.34,39.45l-8.1-11.46c-1.12-1.58-3.3-1.96-4.88-0.84c-1.58,1.12-1.95,3.3-0.84,4.88l10.26,14.51 c0.56,0.79,1.42,1.31,2.38,1.45c0.16,0.02,0.32,0.03,0.48,0.03c0.8,0,1.57-0.27,2.2-0.78l30.99-25.03c1.5-1.21,1.74-3.42,0.52-4.92 C54.13,15.78,51.93,15.55,50.42,16.76z"}));var lb=v("svg",{viewBox:"0 0 100 100",class:"line-icon"},v("path",{d:"M80.2,55.5H21.4c-2.8,0-5.1-2.5-5.1-5.5l0,0c0-3,2.3-5.5,5.1-5.5h58.7c2.8,0,5.1,2.5,5.1,5.5l0,0C85.2,53.1,82.9,55.5,80.2,55.5z"}));var Jd="n-checkbox-group",qT={min:Number,max:Number,size:String,value:Array,defaultValue:{type:Array,default:null},disabled:{type:Boolean,default:void 0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onChange:{type:[Function,Array],validator:()=>!0,default:void 0}},nK=de({name:"CheckboxGroup",props:qT,setup(e){let{mergedClsPrefixRef:t}=At(e),o=Co(e),{mergedSizeRef:r,mergedDisabledRef:n}=o,i=Z(e.defaultValue),a=j(()=>e.value),l=Zt(a,i),s=j(()=>{var u;return((u=l.value)===null||u===void 0?void 0:u.length)||0}),c=j(()=>Array.isArray(l.value)?new Set(l.value):new Set);function d(u,p){let{nTriggerFormInput:f,nTriggerFormChange:m}=o,{onChange:y,"onUpdate:value":_,onUpdateValue:h}=e;if(Array.isArray(l.value)){let O=Array.from(l.value),W=O.findIndex(w=>w===p);u?~W||(O.push(p),h&&ke(h,O),_&&ke(_,O),f(),m(),i.value=O,y&&ke(y,O)):~W&&(O.splice(W,1),h&&ke(h,O),_&&ke(_,O),y&&ke(y,O),i.value=O,f(),m())}else u?(h&&ke(h,[p]),_&&ke(_,[p]),y&&ke(y,[p]),i.value=[p],f(),m()):(h&&ke(h,[]),_&&ke(_,[]),y&&ke(y,[]),i.value=[],f(),m())}return Xt(Jd,{checkedCountRef:s,maxRef:Ae(e,"max"),minRef:Ae(e,"min"),valueSetRef:c,disabledRef:n,mergedSizeRef:r,toggleCheckbox:d}),{mergedClsPrefix:t}},render(){return v("div",{class:`${this.mergedClsPrefix}-checkbox-group`,role:"group"},this.$slots)}});var sb=J([U("checkbox",` line-height: var(--n-label-line-height); font-size: var(--n-font-size); outline: none; @@ -697,16 +697,16 @@ ${t} transform 0.3s var(--n-bezier), opacity 0.3s var(--n-bezier), border-color 0.3s var(--n-bezier); - `),co({left:"1px",top:"1px"})])]),ee("label",` + `),fo({left:"1px",top:"1px"})])]),ee("label",` color: var(--n-text-color); transition: color .3s var(--n-bezier); user-select: none; padding: var(--n-label-padding); - `,[J("&:empty",{display:"none"})])]),gl(U("checkbox",` + `,[J("&:empty",{display:"none"})])]),xl(U("checkbox",` --n-merged-color-table: var(--n-color-table-modal); - `)),xl(U("checkbox",` + `)),vl(U("checkbox",` --n-merged-color-table: var(--n-color-table-popover); - `))]);var YT=Object.assign(Object.assign({},Ct.props),{size:String,checked:{type:[Boolean,String,Number],default:void 0},defaultChecked:{type:[Boolean,String,Number],default:!1},value:[String,Number],disabled:{type:Boolean,default:void 0},indeterminate:Boolean,label:String,focusable:{type:Boolean,default:!0},checkedValue:{type:[Boolean,String,Number],default:!0},uncheckedValue:{type:[Boolean,String,Number],default:!1},"onUpdate:checked":[Function,Array],onUpdateChecked:[Function,Array],privateInsideTable:Boolean,onChange:[Function,Array]}),eu=ue({name:"Checkbox",props:YT,setup(e){let t=X(null),{mergedClsPrefixRef:o,inlineThemeDisabled:r,mergedRtlRef:n}=Mt(e),i=Co(e,{mergedSize(D){let{size:x}=e;if(x!==void 0)return x;if(s){let{value:k}=s.mergedSizeRef;if(k!==void 0)return k}if(D){let{mergedSize:k}=D;if(k!==void 0)return k.value}return"medium"},mergedDisabled(D){let{disabled:x}=e;if(x!==void 0)return x;if(s){if(s.disabledRef.value)return!0;let{maxRef:{value:k},checkedCountRef:A}=s;if(k!==void 0&&A.value>=k&&!p.value)return!0;let{minRef:{value:E}}=s;if(E!==void 0&&A.value<=E&&p.value)return!0}return D?D.disabled.value:!1}}),{mergedDisabledRef:a,mergedSizeRef:l}=i,s=ke(Jd,null),c=X(e.defaultChecked),d=Re(e,"checked"),u=Xt(d,c),p=Qe(()=>{if(s){let D=s.valueSetRef.value;return D&&e.value!==void 0?D.has(e.value):!1}else return u.value===e.checkedValue}),f=Ct("Checkbox","-checkbox",sb,mr,e,o);function m(D){if(s&&e.value!==void 0)s.toggleCheckbox(!p.value,e.value);else{let{onChange:x,"onUpdate:checked":k,onUpdateChecked:A}=e,{nTriggerFormInput:E,nTriggerFormChange:z}=i,M=p.value?e.uncheckedValue:e.checkedValue;k&&Se(k,M,D),A&&Se(A,M,D),x&&Se(x,M,D),E(),z(),c.value=M}}function y(D){a.value||m(D)}function w(D){if(!a.value)switch(D.code){case"Space":case"Enter":case"NumpadEnter":m(D)}}function g(D){switch(D.code){case"Space":D.preventDefault()}}let O={focus:()=>{var D;(D=t.value)===null||D===void 0||D.focus()},blur:()=>{var D;(D=t.value)===null||D===void 0||D.blur()}},j=bn("Checkbox",n,o),S=F(()=>{let{value:D}=l,{common:{cubicBezierEaseInOut:x},self:{borderRadius:k,color:A,colorChecked:E,colorDisabled:z,colorTableHeader:M,colorTableHeaderModal:se,colorTableHeaderPopover:ye,checkMarkColor:Ie,checkMarkColorDisabled:fe,border:ce,borderFocus:we,borderDisabled:Me,borderChecked:Be,boxShadowFocus:Le,textColor:Je,textColorDisabled:Xe,checkMarkColorDisabledChecked:ct,colorDisabledChecked:wt,borderDisabledChecked:ze,labelPadding:We,labelLineHeight:vt,[Te("fontSize",D)]:Pe,[Te("size",D)]:ot}}=f.value;return{"--n-label-line-height":vt,"--n-size":ot,"--n-bezier":x,"--n-border-radius":k,"--n-border":ce,"--n-border-checked":Be,"--n-border-focus":we,"--n-border-disabled":Me,"--n-border-disabled-checked":ze,"--n-box-shadow-focus":Le,"--n-color":A,"--n-color-checked":E,"--n-color-table":M,"--n-color-table-modal":se,"--n-color-table-popover":ye,"--n-color-disabled":z,"--n-color-disabled-checked":wt,"--n-text-color":Je,"--n-text-color-disabled":Xe,"--n-check-mark-color":Ie,"--n-check-mark-color-disabled":fe,"--n-check-mark-color-disabled-checked":ct,"--n-font-size":Pe,"--n-label-padding":We}}),v=r?qt("checkbox",F(()=>l.value[0]),S,e):void 0;return Object.assign(i,O,{rtlEnabled:j,selfRef:t,mergedClsPrefix:o,mergedDisabled:a,renderedChecked:p,mergedTheme:f,labelId:Ic(),handleClick:y,handleKeyUp:w,handleKeyDown:g,cssVars:r?void 0:S,themeClass:v?.themeClass,onRender:v?.onRender})},render(){var e;let{$slots:t,renderedChecked:o,mergedDisabled:r,indeterminate:n,privateInsideTable:i,cssVars:a,labelId:l,label:s,mergedClsPrefix:c,focusable:d,handleKeyUp:u,handleKeyDown:p,handleClick:f}=this;return(e=this.onRender)===null||e===void 0||e.call(this),b("div",{ref:"selfRef",class:[`${c}-checkbox`,this.themeClass,this.rtlEnabled&&`${c}-checkbox--rtl`,o&&`${c}-checkbox--checked`,r&&`${c}-checkbox--disabled`,n&&`${c}-checkbox--indeterminate`,i&&`${c}-checkbox--inside-table`],tabindex:r||!d?void 0:0,role:"checkbox","aria-checked":n?"mixed":o,"aria-labelledby":l,style:a,onKeyup:u,onKeydown:p,onClick:f,onMousedown:()=>{gt("selectstart",window,m=>{m.preventDefault()},{once:!0})}},b("div",{class:`${c}-checkbox-box-wrapper`},"\xA0",b("div",{class:`${c}-checkbox-box`},b(So,null,{default:()=>this.indeterminate?b("div",{key:"indeterminate",class:`${c}-checkbox-icon`},lb):b("div",{key:"check",class:`${c}-checkbox-icon`},ab)}),b("div",{class:`${c}-checkbox-box__border`}))),s!==null||t.default?b("span",{class:`${c}-checkbox__label`,id:l},t.default?t.default():s):null)}});var XT={name:"Code",common:R,self(e){let{textColor2:t,fontSize:o,fontWeightStrong:r}=e;return{textColor:t,fontSize:o,fontWeightStrong:r,"mono-3":"#5c6370","hue-1":"#56b6c2","hue-2":"#61aeee","hue-3":"#c678dd","hue-4":"#98c379","hue-5":"#e06c75","hue-5-2":"#be5046","hue-6":"#d19a66","hue-6-2":"#e6c07b"}}},ca=XT;var cb=e=>{let{fontWeight:t,textColor1:o,textColor2:r,dividerColor:n,fontSize:i}=e;return{titleFontSize:i,titleFontWeight:t,dividerColor:n,titleTextColor:o,fontSize:i,textColor:r,arrowColor:r}};var ZT={name:"Collapse",common:R,self:cb},tu=ZT;var db=e=>{let{cubicBezierEaseInOut:t}=e;return{bezier:t}};var QT={name:"CollapseTransition",common:R,self:db},ou=QT;var ub={abstract:Boolean,bordered:{type:Boolean,default:void 0},clsPrefix:String,locale:Object,dateLocale:Object,namespace:String,rtl:Array,tag:{type:String,default:"div"},hljs:Object,theme:Object,themeOverrides:Object,componentOptions:Object,icons:Object,breakpoints:Object,inlineThemeDisabled:{type:Boolean,default:void 0},as:{type:String,validator:()=>(cl("config-provider","`as` is deprecated, please use `tag` instead."),!0),default:void 0}},ru=ue({name:"ConfigProvider",alias:["App"],props:ub,setup(e){let t=ke(Zt,null),o=F(()=>{let{theme:f}=e;if(f===null)return;let m=t?.mergedThemeRef.value;return f===void 0?m:m===void 0?f:Object.assign({},m,f)}),r=F(()=>{let{themeOverrides:f}=e;if(f!==null){if(f===void 0)return t?.mergedThemeOverridesRef.value;{let m=t?.mergedThemeOverridesRef.value;return m===void 0?f:Vr({},m,f)}}}),n=Qe(()=>{let{namespace:f}=e;return f===void 0?t?.mergedNamespaceRef.value:f}),i=Qe(()=>{let{bordered:f}=e;return f===void 0?t?.mergedBorderedRef.value:f}),a=F(()=>{let{icons:f}=e;return f===void 0?t?.mergedIconsRef.value:f}),l=F(()=>{let{componentOptions:f}=e;return f!==void 0?f:t?.mergedComponentPropsRef.value}),s=F(()=>{let{clsPrefix:f}=e;return f!==void 0?f:t?.mergedClsPrefixRef.value}),c=F(()=>{var f;let{rtl:m}=e;if(m===void 0)return t?.mergedRtlRef.value;let y={};for(let w of m)y[w.name]=Qr(w),(f=w.peers)===null||f===void 0||f.forEach(g=>{g.name in y||(y[g.name]=Qr(g))});return y}),d=F(()=>e.breakpoints||t?.mergedBreakpointsRef.value),u=e.inlineThemeDisabled||t?.inlineThemeDisabled,p=F(()=>{let{value:f}=o,{value:m}=r,y=m&&Object.keys(m).length!==0,w=f?.name;return w?y?`${w}-${so(JSON.stringify(r.value))}`:w:y?so(JSON.stringify(r.value)):""});return Yt(Zt,{mergedThemeHashRef:p,mergedBreakpointsRef:d,mergedRtlRef:c,mergedIconsRef:a,mergedComponentPropsRef:l,mergedBorderedRef:i,mergedNamespaceRef:n,mergedClsPrefixRef:s,mergedLocaleRef:F(()=>{let{locale:f}=e;if(f!==null)return f===void 0?t?.mergedLocaleRef.value:f}),mergedDateLocaleRef:F(()=>{let{dateLocale:f}=e;if(f!==null)return f===void 0?t?.mergedDateLocaleRef.value:f}),mergedHljsRef:F(()=>{let{hljs:f}=e;return f===void 0?t?.mergedHljsRef.value:f}),mergedThemeRef:o,mergedThemeOverridesRef:r,inlineThemeDisabled:u||!1}),{mergedClsPrefix:s,mergedBordered:i,mergedNamespace:n,mergedTheme:o,mergedThemeOverrides:r}},render(){var e,t,o,r;return this.abstract?(r=(o=this.$slots).default)===null||r===void 0?void 0:r.call(o):b(this.as||this.tag,{class:`${this.mergedClsPrefix||Yl}-config-provider`},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))}});function nu(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}var JT={name:"Select",common:ge,peers:{InternalSelection:na,InternalSelectMenu:vn},self:nu},iu=JT;var e2={name:"Select",common:R,peers:{InternalSelection:Cn,InternalSelectMenu:No},self:nu},da=e2;var fb={itemSize:"28px",itemPadding:"0 4px",itemMargin:"0 0 0 8px",itemMarginRtl:"0 8px 0 0",buttonIconSize:"16px",inputWidth:"60px",selectWidth:"unset",inputMargin:"0 0 0 8px",inputMarginRtl:"0 8px 0 0",selectMargin:"0 0 0 8px",prefixMargin:"0 8px 0 0",suffixMargin:"0 0 0 8px",jumperFontSize:"14px"};var au=e=>{let{textColor2:t,primaryColor:o,primaryColorHover:r,primaryColorPressed:n,inputColorDisabled:i,textColorDisabled:a,borderColor:l,borderRadius:s,fontSize:c}=e;return Object.assign(Object.assign({},fb),{buttonColor:"#0000",buttonColorHover:"#0000",buttonColorPressed:"#0000",buttonBorder:`1px solid ${l}`,buttonBorderHover:`1px solid ${l}`,buttonBorderPressed:`1px solid ${l}`,buttonIconColor:t,buttonIconColorHover:t,buttonIconColorPressed:t,itemTextColor:t,itemTextColorHover:r,itemTextColorPressed:n,itemTextColorActive:o,itemTextColorDisabled:a,itemColor:"#0000",itemColorHover:"#0000",itemColorPressed:"#0000",itemColorActive:"#0000",itemColorActiveHover:"#0000",itemColorDisabled:i,itemBorder:"1px solid #0000",itemBorderHover:"1px solid #0000",itemBorderPressed:"1px solid #0000",itemBorderActive:`1px solid ${o}`,itemBorderDisabled:`1px solid ${l}`,itemBorderRadius:s,itemFontSize:c,jumperTextColor:t,jumperTextColorDisabled:a})},t2={name:"Pagination",common:ge,peers:{Select:iu,Input:po},self:au},lu=t2;var o2={name:"Pagination",common:R,peers:{Select:da,Input:xt},self(e){let{primaryColor:t,opacity3:o}=e,r=te(t,{alpha:Number(o)}),n=au(e);return n.itemBorderActive=`1px solid ${r}`,n.itemBorderDisabled="1px solid #0000",n}},ua=o2;var us={padding:"8px 14px"};var r2={name:"Tooltip",common:R,peers:{Popover:Qt},self(e){let{borderRadius:t,boxShadow2:o,popoverColor:r,textColor2:n}=e;return Object.assign(Object.assign({},us),{borderRadius:t,boxShadow:o,color:r,textColor:n})}},or=r2;var n2=e=>{let{borderRadius:t,boxShadow2:o,baseColor:r}=e;return Object.assign(Object.assign({},us),{borderRadius:t,boxShadow:o,color:xe(r,"rgba(0, 0, 0, .85)"),textColor:r})},i2={name:"Tooltip",common:ge,peers:{Popover:Ro},self:n2},fa=i2;var a2={name:"Ellipsis",common:R,peers:{Tooltip:or}},pa=a2;var l2={name:"Ellipsis",common:ge,peers:{Tooltip:fa}},su=l2;var fs={radioSizeSmall:"14px",radioSizeMedium:"16px",radioSizeLarge:"18px",labelPadding:"0 8px"};var s2={name:"Radio",common:R,self(e){let{borderColor:t,primaryColor:o,baseColor:r,textColorDisabled:n,inputColorDisabled:i,textColor2:a,opacityDisabled:l,borderRadius:s,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,heightSmall:p,heightMedium:f,heightLarge:m,lineHeight:y}=e;return Object.assign(Object.assign({},fs),{labelLineHeight:y,buttonHeightSmall:p,buttonHeightMedium:f,buttonHeightLarge:m,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,boxShadow:`inset 0 0 0 1px ${t}`,boxShadowActive:`inset 0 0 0 1px ${o}`,boxShadowFocus:`inset 0 0 0 1px ${o}, 0 0 0 2px ${te(o,{alpha:.3})}`,boxShadowHover:`inset 0 0 0 1px ${o}`,boxShadowDisabled:`inset 0 0 0 1px ${t}`,color:"#0000",colorDisabled:i,textColor:a,textColorDisabled:n,dotColorActive:o,dotColorDisabled:t,buttonBorderColor:t,buttonBorderColorActive:o,buttonBorderColorHover:o,buttonColor:"#0000",buttonColorActive:o,buttonTextColor:a,buttonTextColorActive:r,buttonTextColorHover:o,opacityDisabled:l,buttonBoxShadowFocus:`inset 0 0 0 1px ${o}, 0 0 0 2px ${te(o,{alpha:.3})}`,buttonBoxShadowHover:`inset 0 0 0 1px ${o}`,buttonBoxShadow:"inset 0 0 0 1px #0000",buttonBorderRadius:s})}},ma=s2;var c2=e=>{let{borderColor:t,primaryColor:o,baseColor:r,textColorDisabled:n,inputColorDisabled:i,textColor2:a,opacityDisabled:l,borderRadius:s,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,heightSmall:p,heightMedium:f,heightLarge:m,lineHeight:y}=e;return Object.assign(Object.assign({},fs),{labelLineHeight:y,buttonHeightSmall:p,buttonHeightMedium:f,buttonHeightLarge:m,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,boxShadow:`inset 0 0 0 1px ${t}`,boxShadowActive:`inset 0 0 0 1px ${o}`,boxShadowFocus:`inset 0 0 0 1px ${o}, 0 0 0 2px ${te(o,{alpha:.2})}`,boxShadowHover:`inset 0 0 0 1px ${o}`,boxShadowDisabled:`inset 0 0 0 1px ${t}`,color:r,colorDisabled:i,textColor:a,textColorDisabled:n,dotColorActive:o,dotColorDisabled:t,buttonBorderColor:t,buttonBorderColorActive:o,buttonBorderColorHover:t,buttonColor:r,buttonColorActive:r,buttonTextColor:a,buttonTextColorActive:o,buttonTextColorHover:o,opacityDisabled:l,buttonBoxShadowFocus:`inset 0 0 0 1px ${o}, 0 0 0 2px ${te(o,{alpha:.3})}`,buttonBoxShadowHover:"inset 0 0 0 1px #0000",buttonBoxShadow:"inset 0 0 0 1px #0000",buttonBorderRadius:s})},d2={name:"Radio",common:ge,self:c2},cu=d2;var pb={thPaddingSmall:"8px",thPaddingMedium:"12px",thPaddingLarge:"12px",tdPaddingSmall:"8px",tdPaddingMedium:"12px",tdPaddingLarge:"12px",sorterSize:"15px",filterSize:"15px",paginationMargin:"12px 0 0 0",emptyPadding:"48px 0",actionPadding:"8px 12px",actionButtonMargin:"0 8px 0 0"};var du=e=>{let{cardColor:t,modalColor:o,popoverColor:r,textColor2:n,textColor1:i,tableHeaderColor:a,tableColorHover:l,iconColor:s,primaryColor:c,fontWeightStrong:d,borderRadius:u,lineHeight:p,fontSizeSmall:f,fontSizeMedium:m,fontSizeLarge:y,dividerColor:w,heightSmall:g,opacityDisabled:O,tableColorStriped:j}=e;return Object.assign(Object.assign({},pb),{actionDividerColor:w,lineHeight:p,borderRadius:u,fontSizeSmall:f,fontSizeMedium:m,fontSizeLarge:y,borderColor:xe(t,w),tdColorHover:xe(t,l),tdColorStriped:xe(t,j),thColor:xe(t,a),thColorHover:xe(xe(t,a),l),tdColor:t,tdTextColor:n,thTextColor:i,thFontWeight:d,thButtonColorHover:l,thIconColor:s,thIconColorActive:c,borderColorModal:xe(o,w),tdColorHoverModal:xe(o,l),tdColorStripedModal:xe(o,j),thColorModal:xe(o,a),thColorHoverModal:xe(xe(o,a),l),tdColorModal:o,borderColorPopover:xe(r,w),tdColorHoverPopover:xe(r,l),tdColorStripedPopover:xe(r,j),thColorPopover:xe(r,a),thColorHoverPopover:xe(xe(r,a),l),tdColorPopover:r,boxShadowBefore:"inset -12px 0 8px -12px rgba(0, 0, 0, .18)",boxShadowAfter:"inset 12px 0 8px -12px rgba(0, 0, 0, .18)",loadingColor:c,loadingSize:g,opacityLoading:O})},y7={name:"DataTable",common:ge,peers:{Button:Nt,Checkbox:mr,Radio:cu,Pagination:lu,Scrollbar:_t,Empty:uo,Popover:Ro,Ellipsis:su},self:du};var u2={name:"DataTable",common:R,peers:{Button:lt,Checkbox:Io,Radio:ma,Pagination:ua,Scrollbar:at,Empty:fo,Popover:Qt,Ellipsis:pa},self(e){let t=du(e);return t.boxShadowAfter="inset 12px 0 8px -12px rgba(0, 0, 0, .36)",t.boxShadowBefore="inset -12px 0 8px -12px rgba(0, 0, 0, .36)",t}},uu=u2;var mb={padding:"4px 0",optionIconSizeSmall:"14px",optionIconSizeMedium:"16px",optionIconSizeLarge:"16px",optionIconSizeHuge:"18px",optionSuffixWidthSmall:"14px",optionSuffixWidthMedium:"14px",optionSuffixWidthLarge:"16px",optionSuffixWidthHuge:"16px",optionIconSuffixWidthSmall:"32px",optionIconSuffixWidthMedium:"32px",optionIconSuffixWidthLarge:"36px",optionIconSuffixWidthHuge:"36px",optionPrefixWidthSmall:"14px",optionPrefixWidthMedium:"14px",optionPrefixWidthLarge:"16px",optionPrefixWidthHuge:"16px",optionIconPrefixWidthSmall:"36px",optionIconPrefixWidthMedium:"36px",optionIconPrefixWidthLarge:"40px",optionIconPrefixWidthHuge:"40px"};var fu=e=>{let{primaryColor:t,textColor2:o,dividerColor:r,hoverColor:n,popoverColor:i,invertedColor:a,borderRadius:l,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:d,fontSizeHuge:u,heightSmall:p,heightMedium:f,heightLarge:m,heightHuge:y,textColor3:w,opacityDisabled:g}=e;return Object.assign(Object.assign({},mb),{optionHeightSmall:p,optionHeightMedium:f,optionHeightLarge:m,optionHeightHuge:y,borderRadius:l,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:d,fontSizeHuge:u,optionTextColor:o,optionTextColorHover:o,optionTextColorActive:t,optionTextColorChildActive:t,color:i,dividerColor:r,suffixColor:o,prefixColor:o,optionColorHover:n,optionColorActive:te(t,{alpha:.1}),groupHeaderTextColor:w,optionTextColorInverted:"#BBB",optionTextColorHoverInverted:"#FFF",optionTextColorActiveInverted:"#FFF",optionTextColorChildActiveInverted:"#FFF",colorInverted:a,dividerColorInverted:"#BBB",suffixColorInverted:"#BBB",prefixColorInverted:"#BBB",optionColorHoverInverted:t,optionColorActiveInverted:t,groupHeaderTextColorInverted:"#AAA",optionOpacityDisabled:g})},f2={name:"Dropdown",common:ge,peers:{Popover:Ro},self:fu},pu=f2;var p2={name:"Dropdown",common:R,peers:{Popover:Qt},self(e){let{primaryColorSuppl:t,primaryColor:o,popoverColor:r}=e,n=fu(e);return n.colorInverted=r,n.optionColorActive=te(o,{alpha:.15}),n.optionColorActiveInverted=t,n.optionColorHoverInverted=t,n}},ha=p2;var hb=e=>{let{textColorBase:t,opacity1:o,opacity2:r,opacity3:n,opacity4:i,opacity5:a}=e;return{color:t,opacity1Depth:o,opacity2Depth:r,opacity3Depth:n,opacity4Depth:i,opacity5Depth:a}};var m2={name:"Icon",common:R,self:hb},mu=m2;var gb={itemFontSize:"12px",itemHeight:"36px",itemWidth:"52px",panelActionPadding:"8px 0"};var hu=e=>{let{popoverColor:t,textColor2:o,primaryColor:r,hoverColor:n,dividerColor:i,opacityDisabled:a,boxShadow2:l,borderRadius:s,iconColor:c,iconColorDisabled:d}=e;return Object.assign(Object.assign({},gb),{panelColor:t,panelBoxShadow:l,panelDividerColor:i,itemTextColor:o,itemTextColorActive:r,itemColorHover:n,itemOpacityDisabled:a,itemBorderRadius:s,borderRadius:s,iconColor:c,iconColorDisabled:d})},h2={name:"TimePicker",common:ge,peers:{Scrollbar:_t,Button:Nt,Input:po},self:hu},gu=h2;var g2={name:"TimePicker",common:R,peers:{Scrollbar:at,Button:lt,Input:xt},self:hu},ga=g2;var xb={itemSize:"24px",itemCellWidth:"38px",itemCellHeight:"32px",scrollItemWidth:"80px",scrollItemHeight:"40px",panelExtraFooterPadding:"8px 12px",panelActionPadding:"8px 12px",calendarTitlePadding:"0",calendarTitleHeight:"28px",arrowSize:"14px",panelHeaderPadding:"8px 12px",calendarDaysHeight:"32px",calendarTitleGridTempateColumns:"28px 28px 1fr 28px 28px",calendarLeftPaddingDate:"6px 12px 4px 12px",calendarLeftPaddingDatetime:"4px 12px",calendarLeftPaddingDaterange:"6px 12px 4px 12px",calendarLeftPaddingDatetimerange:"4px 12px",calendarLeftPaddingMonth:"0",calendarLeftPaddingYear:"0",calendarLeftPaddingQuarter:"0",calendarRightPaddingDate:"6px 12px 4px 12px",calendarRightPaddingDatetime:"4px 12px",calendarRightPaddingDaterange:"6px 12px 4px 12px",calendarRightPaddingDatetimerange:"4px 12px",calendarRightPaddingMonth:"0",calendarRightPaddingYear:"0",calendarRightPaddingQuarter:"0"};var xu=e=>{let{hoverColor:t,fontSize:o,textColor2:r,textColorDisabled:n,popoverColor:i,primaryColor:a,borderRadiusSmall:l,iconColor:s,iconColorDisabled:c,textColor1:d,dividerColor:u,boxShadow2:p,borderRadius:f,fontWeightStrong:m}=e;return Object.assign(Object.assign({},xb),{itemFontSize:o,calendarDaysFontSize:o,calendarTitleFontSize:o,itemTextColor:r,itemTextColorDisabled:n,itemTextColorActive:i,itemTextColorCurrent:a,itemColorIncluded:te(a,{alpha:.1}),itemColorHover:t,itemColorDisabled:t,itemColorActive:a,itemBorderRadius:l,panelColor:i,panelTextColor:r,arrowColor:s,calendarTitleTextColor:d,calendarTitleColorHover:t,calendarDaysTextColor:r,panelHeaderDividerColor:u,calendarDaysDividerColor:u,calendarDividerColor:u,panelActionDividerColor:u,panelBoxShadow:p,panelBorderRadius:f,calendarTitleFontWeight:m,scrollItemBorderRadius:f,iconColor:s,iconColorDisabled:c})},_q={name:"DatePicker",common:ge,peers:{Input:po,Button:Nt,TimePicker:gu,Scrollbar:_t},self:xu};var x2={name:"DatePicker",common:R,peers:{Input:xt,Button:lt,TimePicker:ga,Scrollbar:at},self(e){let{popoverColor:t,hoverColor:o,primaryColor:r}=e,n=xu(e);return n.itemColorDisabled=xe(t,o),n.itemColorIncluded=te(r,{alpha:.15}),n.itemColorHover=xe(t,o),n}},vu=x2;var vb={thPaddingBorderedSmall:"8px 12px",thPaddingBorderedMedium:"12px 16px",thPaddingBorderedLarge:"16px 24px",thPaddingSmall:"0",thPaddingMedium:"0",thPaddingLarge:"0",tdPaddingBorderedSmall:"8px 12px",tdPaddingBorderedMedium:"12px 16px",tdPaddingBorderedLarge:"16px 24px",tdPaddingSmall:"0 0 8px 0",tdPaddingMedium:"0 0 12px 0",tdPaddingLarge:"0 0 16px 0"};var bb=e=>{let{tableHeaderColor:t,textColor2:o,textColor1:r,cardColor:n,modalColor:i,popoverColor:a,dividerColor:l,borderRadius:s,fontWeightStrong:c,lineHeight:d,fontSizeSmall:u,fontSizeMedium:p,fontSizeLarge:f}=e;return Object.assign(Object.assign({},vb),{lineHeight:d,fontSizeSmall:u,fontSizeMedium:p,fontSizeLarge:f,titleTextColor:r,thColor:xe(n,t),thColorModal:xe(i,t),thColorPopover:xe(a,t),thTextColor:r,thFontWeight:c,tdTextColor:o,tdColor:n,tdColorModal:i,tdColorPopover:a,borderColor:xe(n,l),borderColorModal:xe(i,l),borderColorPopover:xe(a,l),borderRadius:s})};var v2={name:"Descriptions",common:R,self:bb},bu=v2;var yb={titleFontSize:"18px",padding:"16px 28px 20px 28px",iconSize:"28px",actionSpace:"12px",contentMargin:"8px 0 16px 0",iconMargin:"0 4px 0 0",iconMarginIconTop:"4px 0 8px 0",closeSize:"18px",closeMargin:"22px 28px 0 0",closeMarginIconTop:"12px 18px 0 0"};var yu=e=>{let{textColor1:t,textColor2:o,modalColor:r,closeColor:n,closeColorHover:i,closeColorPressed:a,infoColor:l,successColor:s,warningColor:c,errorColor:d,primaryColor:u,dividerColor:p,borderRadius:f,fontWeightStrong:m,lineHeight:y,fontSize:w}=e;return Object.assign(Object.assign({},yb),{fontSize:w,lineHeight:y,border:`1px solid ${p}`,titleTextColor:t,textColor:o,color:r,closeColor:n,closeColorHover:i,closeColorPressed:a,iconColor:u,iconColorInfo:l,iconColorSuccess:s,iconColorWarning:c,iconColorError:d,borderRadius:f,titleFontWeight:m})},b2={name:"Dialog",common:ge,peers:{Button:Nt},self:yu},Cu=b2;var y2={name:"Dialog",common:R,peers:{Button:lt},self:yu},xa=y2;var wu=e=>{let{modalColor:t,textColor2:o,boxShadow3:r}=e;return{color:t,textColor:o,boxShadow:r}},sG={name:"Modal",common:ge,peers:{Scrollbar:_t,Dialog:Cu,Card:Gd},self:wu};var C2={name:"Modal",common:R,peers:{Scrollbar:at,Dialog:xa,Card:sa},self:wu},ku=C2;var Cb=e=>{let{textColor1:t,dividerColor:o,fontWeightStrong:r}=e;return{textColor:t,color:o,fontWeight:r}};var w2={name:"Divider",common:R,self:Cb},Su=w2;var _u=e=>{let{modalColor:t,textColor1:o,textColor2:r,boxShadow3:n,lineHeight:i,fontWeightStrong:a,dividerColor:l,closeColor:s,closeColorHover:c,closeColorPressed:d}=e;return{bodyPadding:"16px 24px",headerPadding:"16px 24px",footerPadding:"16px 24px",color:t,textColor:r,titleTextColor:o,titleFontSize:"18px",titleFontWeight:a,boxShadow:n,lineHeight:i,headerBorderBottom:`1px solid ${l}`,footerBorderTop:`1px solid ${l}`,closeColor:s,closeColorHover:c,closeColorPressed:d,closeSize:"18px"}},EG={name:"Drawer",common:ge,peers:{Scrollbar:_t},self:_u};var k2={name:"Drawer",common:R,peers:{Scrollbar:at},self:_u},Eu=k2;var wb={actionMargin:"0 0 0 20px",actionMarginRtl:"0 20px 0 0"};var S2={name:"DynamicInput",common:R,peers:{Input:xt,Button:lt},self(){return wb}},Du=S2;var kb={gapSmall:"4px 8px",gapMedium:"8px 12px",gapLarge:"12px 16px"};var _2={name:"Space",self(){return kb}},va=_2;var E2={name:"DynamicTags",common:R,peers:{Input:xt,Button:lt,Tag:ra,Space:va},self(){return{inputWidth:"64px"}}},Tu=E2;var D2={name:"Element",common:R},Ou=D2;var Sb={feedbackPadding:"4px 0 0 2px",feedbackHeightSmall:"24px",feedbackHeightMedium:"24px",feedbackHeightLarge:"26px",feedbackFontSizeSmall:"13px",feedbackFontSizeMedium:"14px",feedbackFontSizeLarge:"14px",labelFontSizeLeftSmall:"14px",labelFontSizeLeftMedium:"14px",labelFontSizeLeftLarge:"15px",labelFontSizeTopSmall:"13px",labelFontSizeTopMedium:"14px",labelFontSizeTopLarge:"14px",labelHeightSmall:"24px",labelHeightMedium:"26px",labelHeightLarge:"28px",labelPaddingVertical:"0 0 8px 2px",labelPaddingHorizontal:"0 12px 0 0",labelTextAlignVertical:"left",labelTextAlignHorizontal:"right"};var _b=e=>{let{heightSmall:t,heightMedium:o,heightLarge:r,textColor1:n,errorColor:i,warningColor:a,lineHeight:l,textColor3:s}=e;return Object.assign(Object.assign({},Sb),{blankHeightSmall:t,blankHeightMedium:o,blankHeightLarge:r,lineHeight:l,labelTextColor:n,asteriskColor:i,feedbackTextColorError:i,feedbackTextColorWarning:a,feedbackTextColor:s})};var T2={name:"Form",common:R,self:_b},Pu=T2;var O2={name:"GradientText",common:R,self(e){let{primaryColor:t,successColor:o,warningColor:r,errorColor:n,infoColor:i,primaryColorSuppl:a,successColorSuppl:l,warningColorSuppl:s,errorColorSuppl:c,infoColorSuppl:d,fontWeightStrong:u}=e;return{fontWeight:u,rotate:"252deg",colorStartPrimary:t,colorEndPrimary:a,colorStartInfo:i,colorEndInfo:d,colorStartWarning:r,colorEndWarning:s,colorStartError:n,colorEndError:c,colorStartSuccess:o,colorEndSuccess:l}}},Nu=O2;var Eb=e=>{let{primaryColor:t,baseColor:o}=e;return{color:t,iconColor:o}};var P2={name:"IconWrapper",common:R,self:Eb},Ru=P2;var N2={name:"ButtonGroup",common:R},Iu=N2;var R2={name:"InputNumber",common:R,peers:{Button:lt,Input:xt},self(e){let{textColorDisabled:t}=e;return{iconColorDisabled:t}}},Au=R2;var I2={name:"Layout",common:R,peers:{Scrollbar:at},self(e){let{textColor2:t,bodyColor:o,popoverColor:r,cardColor:n,dividerColor:i,scrollbarColor:a,scrollbarColorHover:l}=e;return{textColor:t,textColorInverted:t,color:o,colorEmbedded:o,headerColor:n,headerColorInverted:n,footerColor:n,footerColorInverted:n,headerBorderColor:i,headerBorderColorInverted:i,footerBorderColor:i,footerBorderColorInverted:i,siderBorderColor:i,siderBorderColorInverted:i,siderColor:n,siderColorInverted:n,siderToggleButtonBorder:"1px solid transparent",siderToggleButtonColor:r,siderToggleButtonIconColor:t,siderToggleButtonIconColorInverted:t,siderToggleBarColor:xe(o,a),siderToggleBarColorHover:xe(o,l),__invertScrollbar:"false"}}},Mu=I2;var Db=e=>{let{textColor2:t,cardColor:o,modalColor:r,popoverColor:n,dividerColor:i,borderRadius:a,fontSize:l}=e;return{textColor:t,color:o,colorModal:r,colorPopover:n,borderColor:i,borderColorModal:xe(r,i),borderColorPopover:xe(n,i),borderRadius:a,fontSize:l}};var A2={name:"List",common:R,self:Db},$u=A2;var M2={name:"LoadingBar",common:R,self(e){let{primaryColor:t}=e;return{colorError:"red",colorLoading:t,height:"2px"}}},Lu=M2;var $2={name:"Log",common:R,peers:{Scrollbar:at,Code:ca},self(e){let{textColor2:t,inputColor:o,fontSize:r,primaryColor:n}=e;return{loaderFontSize:r,loaderTextColor:t,loaderColor:o,loaderBorder:"1px solid #0000",loadingColor:n}}},zu=$2;var L2={name:"Mention",common:R,peers:{InternalSelectMenu:No,Input:xt},self(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}},Bu=L2;function z2(e,t,o,r){return{itemColorHoverInverted:"#0000",itemColorActiveInverted:t,itemColorActiveHoverInverted:t,itemColorActiveCollapsedInverted:t,itemTextColorInverted:e,itemTextColorHoverInverted:o,itemTextColorChildActiveInverted:o,itemTextColorActiveInverted:o,itemTextColorActiveHoverInverted:o,itemTextColorHorizontalInverted:e,itemTextColorHoverHorizontalInverted:o,itemTextColorChildActiveHorizontalInverted:o,itemTextColorActiveHorizontalInverted:o,itemTextColorActiveHoverHorizontalInverted:o,itemIconColorInverted:e,itemIconColorHoverInverted:o,itemIconColorActiveInverted:o,itemIconColorActiveHoverInverted:o,itemIconColorChildActiveInverted:o,itemIconColorCollapsedInverted:e,itemIconColorHorizontalInverted:e,itemIconColorHoverHorizontalInverted:o,itemIconColorActiveHorizontalInverted:o,itemIconColorActiveHoverHorizontalInverted:o,itemIconColorChildActiveHorizontalInverted:o,arrowColorInverted:e,arrowColorHoverInverted:o,arrowColorActiveInverted:o,arrowColorActiveHoverInverted:o,arrowColorChildActiveInverted:o,groupTextColorInverted:r}}var Hu=e=>{let{borderRadius:t,textColor3:o,primaryColor:r,textColor2:n,textColor1:i,fontSize:a,dividerColor:l,hoverColor:s,primaryColorHover:c}=e;return Object.assign({borderRadius:t,color:"#0000",groupTextColor:o,itemColorHover:s,itemColorActive:te(r,{alpha:.1}),itemColorActiveHover:te(r,{alpha:.1}),itemColorActiveCollapsed:te(r,{alpha:.1}),itemTextColor:n,itemTextColorHover:n,itemTextColorActive:r,itemTextColorActiveHover:r,itemTextColorChildActive:r,itemTextColorHorizontal:n,itemTextColorHoverHorizontal:c,itemTextColorActiveHorizontal:r,itemTextColorActiveHoverHorizontal:r,itemTextColorChildActiveHorizontal:r,itemIconColor:i,itemIconColorHover:i,itemIconColorActive:r,itemIconColorActiveHover:r,itemIconColorChildActive:r,itemIconColorCollapsed:i,itemIconColorHorizontal:i,itemIconColorHoverHorizontal:c,itemIconColorActiveHorizontal:r,itemIconColorActiveHoverHorizontal:r,itemIconColorChildActiveHorizontal:r,itemHeight:"42px",arrowColor:n,arrowColorHover:n,arrowColorActive:r,arrowColorActiveHover:r,arrowColorChildActive:r,colorInverted:"#0000",borderColorHorizontal:"#0000",fontSize:a,dividerColor:l},z2("#BBB",r,"#FFF","#AAA"))},fX={name:"Menu",common:ge,peers:{Tooltip:fa,Dropdown:pu},self:Hu};var B2={name:"Menu",common:R,peers:{Tooltip:or,Dropdown:ha},self(e){let{primaryColor:t,primaryColorSuppl:o}=e,r=Hu(e);return r.itemColorActive=te(t,{alpha:.15}),r.itemColorActiveHover=te(t,{alpha:.15}),r.itemColorActiveCollapsed=te(t,{alpha:.15}),r.itemColorActiveInverted=o,r.itemColorActiveHoverInverted=o,r.itemColorActiveCollapsedInverted=o,r}},Vu=B2;var Tb={margin:"0 0 8px 0",padding:"10px 20px",maxWidth:"720px",minWidth:"420px",iconMargin:"0 10px 0 0",closeMargin:"0 0 0 12px",closeSize:"16px",iconSize:"20px",fontSize:"14px"};var Ob=e=>{let{textColor2:t,closeColor:o,closeColorHover:r,closeColorPressed:n,infoColor:i,successColor:a,errorColor:l,warningColor:s,popoverColor:c,boxShadow2:d,primaryColor:u,lineHeight:p,borderRadius:f}=e;return Object.assign(Object.assign({},Tb),{textColor:t,textColorInfo:t,textColorSuccess:t,textColorError:t,textColorWarning:t,textColorLoading:t,color:c,colorInfo:c,colorSuccess:c,colorError:c,colorWarning:c,colorLoading:c,boxShadow:d,boxShadowInfo:d,boxShadowSuccess:d,boxShadowError:d,boxShadowWarning:d,boxShadowLoading:d,iconColor:t,iconColorInfo:i,iconColorSuccess:a,iconColorWarning:s,iconColorError:l,iconColorLoading:u,closeColor:o,closeColorHover:r,closeColorPressed:n,closeColorInfo:o,closeColorHoverInfo:r,closeColorPressedInfo:n,closeColorSuccess:o,closeColorHoverSuccess:r,closeColorPressedSuccess:n,closeColorError:o,closeColorHoverError:r,closeColorPressedError:n,closeColorWarning:o,closeColorHoverWarning:r,closeColorPressedWarning:n,closeColorLoading:o,closeColorHoverLoading:r,closeColorPressedLoading:n,loadingColor:u,lineHeight:p,borderRadius:f})};var H2={name:"Message",common:R,self:Ob},Fu=H2;var Pb={closeMargin:"18px 14px",closeSize:"16px",width:"365px",padding:"16px"};var ju=e=>{let{textColor2:t,successColor:o,infoColor:r,warningColor:n,errorColor:i,popoverColor:a,closeColor:l,closeColorHover:s,textColor1:c,textColor3:d,borderRadius:u,fontWeightStrong:p,boxShadow2:f,lineHeight:m,fontSize:y}=e;return Object.assign(Object.assign({},Pb),{borderRadius:u,lineHeight:m,fontSize:y,headerFontWeight:p,iconColor:t,iconColorSuccess:o,iconColorInfo:r,iconColorWarning:n,iconColorError:i,color:a,textColor:t,closeColor:l,closeColorHover:s,closeColorPressed:l,headerTextColor:c,descriptionTextColor:d,actionTextColor:t,boxShadow:f})},AX={name:"Notification",common:ge,peers:{Scrollbar:_t},self:ju};var V2={name:"Notification",common:R,peers:{Scrollbar:at},self:ju},Wu=V2;var Nb={titleFontSize:"18px",backSize:"22px"};function Ku(e){let{textColor1:t,textColor2:o,textColor3:r,fontSize:n,fontWeightStrong:i,primaryColorHover:a,primaryColorPressed:l}=e;return Object.assign(Object.assign({},Nb),{titleFontWeight:i,fontSize:n,titleTextColor:t,backColor:o,backColorHover:a,backColorPressed:l,subtitleTextColor:r})}var KX={name:"PageHeader",common:ge,self:Ku};var Uu={name:"PageHeader",common:R,self:Ku};var Rb={iconSize:"22px"};var qu=e=>{let{fontSize:t,warningColor:o}=e;return Object.assign(Object.assign({},Rb),{fontSize:t,iconColor:o})},rZ={name:"Popconfirm",common:ge,peers:{Button:Nt,Popover:Ro},self:qu};var F2={name:"Popconfirm",common:R,peers:{Button:lt,Popover:Qt},self:qu},Gu=F2;var j2={name:"Popselect",common:R,peers:{Popover:Qt,InternalSelectMenu:No}},Yu=j2;var Xu=e=>{let{infoColor:t,successColor:o,warningColor:r,errorColor:n,textColor2:i,progressRailColor:a,fontSize:l,fontWeight:s}=e;return{fontSize:l,fontSizeCircle:"28px",fontWeightCircle:s,railColor:a,railHeight:"8px",iconSizeCircle:"36px",iconSizeLine:"18px",iconColor:t,iconColorInfo:t,iconColorSuccess:o,iconColorWarning:r,iconColorError:n,textColorCircle:i,textColorLineInner:"rgb(255, 255, 255)",textColorLineOuter:i,fillColor:t,fillColorInfo:t,fillColorSuccess:o,fillColorWarning:r,fillColorError:n,lineBgProcessing:"linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)"}},W2={name:"Progress",common:ge,self:Xu},Zu=W2;var K2={name:"Progress",common:R,self(e){let t=Xu(e);return t.textColorLineInner="rgb(0, 0, 0)",t.lineBgProcessing="linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)",t}},ba=K2;var U2={name:"Rate",common:R,self(e){let{railColor:t}=e;return{itemColor:t,itemColorActive:"#CCAA33",itemSize:"20px",sizeSmall:"16px",sizeMedium:"20px",sizeLarge:"24px"}}},Qu=U2;var Ib={titleFontSizeSmall:"26px",titleFontSizeMedium:"32px",titleFontSizeLarge:"40px",titleFontSizeHuge:"48px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",iconSizeSmall:"64px",iconSizeMedium:"80px",iconSizeLarge:"100px",iconSizeHuge:"125px",iconColor418:void 0,iconColor404:void 0,iconColor403:void 0,iconColor500:void 0};var Ab=e=>{let{textColor2:t,textColor1:o,errorColor:r,successColor:n,infoColor:i,warningColor:a,lineHeight:l,fontWeightStrong:s}=e;return Object.assign(Object.assign({},Ib),{lineHeight:l,titleFontWeight:s,titleTextColor:o,textColor:t,iconColorError:r,iconColorSuccess:n,iconColorInfo:i,iconColorWarning:a})};var q2={name:"Result",common:R,self:Ab},Ju=q2;var ps={railHeight:"4px",railWidthVertical:"4px",handleSize:"18px",dotHeight:"8px",dotWidth:"8px",dotBorderRadius:"4px"};var G2={name:"Slider",common:R,self(e){let t="0 2px 8px 0 rgba(0, 0, 0, 0.12)",{railColor:o,modalColor:r,primaryColorSuppl:n,popoverColor:i,textColor2:a,cardColor:l,borderRadius:s,fontSize:c,opacityDisabled:d}=e;return Object.assign(Object.assign({},ps),{fontSize:c,railColor:o,railColorHover:o,fillColor:n,fillColorHover:n,opacityDisabled:d,handleColor:"#FFF",dotColor:l,dotColorModal:r,dotColorPopover:i,handleBoxShadow:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",handleBoxShadowHover:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",handleBoxShadowActive:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",handleBoxShadowFocus:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",indicatorColor:i,indicatorBoxShadow:t,indicatorTextColor:a,indicatorBorderRadius:s,dotBorder:`2px solid ${o}`,dotBorderActive:`2px solid ${n}`,dotBoxShadow:""})}},ef=G2;var Y2=e=>{let t="rgba(0, 0, 0, .85)",o="0 2px 8px 0 rgba(0, 0, 0, 0.12)",{railColor:r,primaryColor:n,baseColor:i,cardColor:a,modalColor:l,popoverColor:s,borderRadius:c,fontSize:d,opacityDisabled:u}=e;return Object.assign(Object.assign({},ps),{fontSize:d,railColor:r,railColorHover:r,fillColor:n,fillColorHover:n,opacityDisabled:u,handleColor:"#FFF",dotColor:a,dotColorModal:l,dotColorPopover:s,handleBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowHover:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowActive:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowFocus:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",indicatorColor:t,indicatorBoxShadow:o,indicatorTextColor:i,indicatorBorderRadius:c,dotBorder:`2px solid ${r}`,dotBorderActive:`2px solid ${n}`,dotBoxShadow:""})},X2={name:"Slider",common:ge,self:Y2},tf=X2;var Mb=e=>{let{opacityDisabled:t,heightTiny:o,heightSmall:r,heightMedium:n,heightLarge:i,heightHuge:a,primaryColor:l,fontSize:s}=e;return{fontSize:s,textColor:l,sizeTiny:o,sizeSmall:r,sizeMedium:n,sizeLarge:i,sizeHuge:a,color:l,opacitySpinning:t}};var Z2={name:"Spin",common:R,self:Mb},of=Z2;var $b=e=>{let{textColor2:t,textColor3:o,fontSize:r,fontWeight:n}=e;return{labelFontSize:r,labelFontWeight:n,valueFontWeight:n,labelTextColor:o,valuePrefixTextColor:t,valueSuffixTextColor:t,valueTextColor:t}};var Q2={name:"Statistic",common:R,self:$b},rf=Q2;var Lb={stepHeaderFontSizeSmall:"14px",stepHeaderFontSizeMedium:"16px",indicatorIndexFontSizeSmall:"14px",indicatorIndexFontSizeMedium:"16px",indicatorSizeSmall:"22px",indicatorSizeMedium:"28px",indicatorIconSizeSmall:"14px",indicatorIconSizeMedium:"18px"};var zb=e=>{let{fontWeightStrong:t,baseColor:o,textColorDisabled:r,primaryColor:n,errorColor:i,textColor1:a,textColor2:l}=e;return Object.assign(Object.assign({},Lb),{stepHeaderFontWeight:t,indicatorTextColorProcess:o,indicatorTextColorWait:r,indicatorTextColorFinish:n,indicatorTextColorError:i,indicatorBorderColorProcess:n,indicatorBorderColorWait:r,indicatorBorderColorFinish:n,indicatorBorderColorError:i,indicatorColorProcess:n,indicatorColorWait:"#0000",indicatorColorFinish:"#0000",indicatorColorError:"#0000",splitorColorProcess:r,splitorColorWait:r,splitorColorFinish:n,splitorColorError:r,headerTextColorProcess:a,headerTextColorWait:r,headerTextColorFinish:r,headerTextColorError:i,descriptionTextColorProcess:l,descriptionTextColorWait:r,descriptionTextColorFinish:r,descriptionTextColorError:i})};var J2={name:"Steps",common:R,self:zb},nf=J2;var Bb={buttonHeightSmall:"14px",buttonHeightMedium:"18px",buttonHeightLarge:"22px",buttonWidthSmall:"14px",buttonWidthMedium:"18px",buttonWidthLarge:"22px",buttonWidthPressedSmall:"20px",buttonWidthPressedMedium:"24px",buttonWidthPressedLarge:"28px",railHeightSmall:"18px",railHeightMedium:"22px",railHeightLarge:"26px",railWidthSmall:"32px",railWidthMedium:"40px",railWidthLarge:"48px"};var eO={name:"Switch",common:R,self(e){let{primaryColorSuppl:t,opacityDisabled:o,borderRadius:r,primaryColor:n,textColor2:i,baseColor:a}=e,l="rgba(255, 255, 255, .20)";return Object.assign(Object.assign({},Bb),{iconColor:a,textColor:i,loadingColor:t,opacityDisabled:o,railColor:l,railColorActive:t,buttonBoxShadow:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",buttonColor:"#FFF",railBorderRadiusSmall:r,railBorderRadiusMedium:r,railBorderRadiusLarge:r,buttonBorderRadiusSmall:r,buttonBorderRadiusMedium:r,buttonBorderRadiusLarge:r,boxShadowFocus:`0 0 8px 0 ${te(n,{alpha:.3})}`})}},af=eO;var Hb={thPaddingSmall:"6px",thPaddingMedium:"12px",thPaddingLarge:"12px",tdPaddingSmall:"6px",tdPaddingMedium:"12px",tdPaddingLarge:"12px"};var Vb=e=>{let{dividerColor:t,cardColor:o,modalColor:r,popoverColor:n,tableHeaderColor:i,tableColorStriped:a,textColor1:l,textColor2:s,borderRadius:c,fontWeightStrong:d,lineHeight:u,fontSizeSmall:p,fontSizeMedium:f,fontSizeLarge:m}=e;return Object.assign(Object.assign({},Hb),{fontSizeSmall:p,fontSizeMedium:f,fontSizeLarge:m,lineHeight:u,borderRadius:c,borderColor:xe(o,t),borderColorModal:xe(r,t),borderColorPopover:xe(n,t),tdColor:o,tdColorModal:r,tdColorPopover:n,tdColorStriped:xe(o,a),tdColorStripedModal:xe(r,a),tdColorStripedPopover:xe(n,a),thColor:xe(o,i),thColorModal:xe(r,i),thColorPopover:xe(n,i),thTextColor:l,tdTextColor:s,thFontWeight:d})};var tO={name:"Table",common:R,self:Vb},lf=tO;var Fb={tabFontSizeSmall:"14px",tabFontSizeMedium:"14px",tabFontSizeLarge:"16px",tabGapSmallLine:"36px",tabGapMediumLine:"36px",tabGapLargeLine:"36px",tabPaddingSmallLine:"6px 0",tabPaddingMediumLine:"10px 0",tabPaddingLargeLine:"14px 0",tabGapSmallBar:"36px",tabGapMediumBar:"36px",tabGapLargeBar:"36px",tabPaddingSmallBar:"4px 0",tabPaddingMediumBar:"6px 0",tabPaddingLargeBar:"10px 0",tabGapSmallCard:"4px",tabGapMediumCard:"4px",tabGapLargeCard:"4px",tabPaddingSmallCard:"6px 10px",tabPaddingMediumCard:"8px 12px",tabPaddingLargeCard:"8px 16px",tabPaddingSmallSegment:"4px 0",tabPaddingMediumSegment:"6px 0",tabPaddingLargeSegment:"8px 0",tabGapSmallSegment:"0",tabGapMediumSegment:"0",tabGapLargeSegment:"0",panePaddingSmall:"8px 0 0 0",panePaddingMedium:"12px 0 0 0",panePaddingLarge:"16px 0 0 0"};var jb=e=>{let{textColor2:t,primaryColor:o,textColorDisabled:r,closeColor:n,closeColorHover:i,closeColorPressed:a,tabColor:l,baseColor:s,dividerColor:c,fontWeight:d,textColor1:u,borderRadius:p,fontSize:f,fontWeightStrong:m}=e;return Object.assign(Object.assign({},Fb),{colorSegment:l,tabFontSizeCard:f,tabTextColorLine:u,tabTextColorActiveLine:o,tabTextColorHoverLine:o,tabTextColorDisabledLine:r,tabTextColorSegment:u,tabTextColorActiveSegment:t,tabTextColorHoverSegment:t,tabTextColorDisabledSegment:r,tabTextColorBar:u,tabTextColorActiveBar:o,tabTextColorHoverBar:o,tabTextColorDisabledBar:r,tabTextColorCard:u,tabTextColorHoverCard:u,tabTextColorActiveCard:o,tabTextColorDisabledCard:r,barColor:o,closeColor:n,closeColorHover:i,closeColorPressed:a,tabColor:l,tabColorSegment:s,tabBorderColor:c,tabFontWeightActive:d,tabFontWeight:d,tabBorderRadius:p,paneTextColor:t,fontWeightStrong:m})};var oO={name:"Tabs",common:R,self(e){let t=jb(e),{inputColor:o}=e;return t.colorSegment=o,t.tabColorSegment=o,t}},sf=oO;var Wb=e=>{let{textColor1:t,textColor2:o,fontWeightStrong:r,fontSize:n}=e;return{fontSize:n,titleTextColor:t,textColor:o,titleFontWeight:r}};var rO={name:"Thing",common:R,self:Wb},cf=rO;var Kb={titleMarginMedium:"0",titleMarginLarge:"-2px 0 0 0",titleFontSizeMedium:"14px",titleFontSizeLarge:"16px",iconSizeMedium:"14px",iconSizeLarge:"14px"};var nO={name:"Timeline",common:R,self(e){let{textColor3:t,infoColorSuppl:o,errorColorSuppl:r,successColorSuppl:n,warningColorSuppl:i,textColor1:a,textColor2:l,railColor:s,fontWeightStrong:c,fontSize:d}=e;return Object.assign(Object.assign({},Kb),{contentFontSize:d,titleFontWeight:c,circleBorder:`2px solid ${t}`,circleBorderInfo:`2px solid ${o}`,circleBorderError:`2px solid ${r}`,circleBorderSuccess:`2px solid ${n}`,circleBorderWarning:`2px solid ${i}`,iconColor:t,iconColorInfo:o,iconColorError:r,iconColorSuccess:n,iconColorWarning:i,titleTextColor:a,contentTextColor:l,metaTextColor:t,lineColor:s})}},df=nO;var Ub={extraFontSize:"12px",width:"440px"};var iO={name:"Transfer",common:R,peers:{Checkbox:Io,Scrollbar:at,Input:xt,Empty:fo,Button:lt},self(e){let{iconColorDisabled:t,iconColor:o,fontWeight:r,fontSizeLarge:n,fontSizeMedium:i,fontSizeSmall:a,heightLarge:l,heightMedium:s,heightSmall:c,borderRadius:d,inputColor:u,tableHeaderColor:p,textColor1:f,textColorDisabled:m,textColor2:y,hoverColor:w}=e;return Object.assign(Object.assign({},Ub),{itemHeightSmall:c,itemHeightMedium:s,itemHeightLarge:l,fontSizeSmall:a,fontSizeMedium:i,fontSizeLarge:n,borderRadius:d,borderColor:"#0000",listColor:u,headerColor:p,titleTextColor:f,titleTextColorDisabled:m,extraTextColor:y,filterDividerColor:"#0000",itemTextColor:y,itemTextColorDisabled:m,itemColorPending:w,titleFontWeight:r,iconColor:o,iconColorDisabled:t})}},uf=iO;var ff=e=>{let{borderRadiusSmall:t,hoverColor:o,pressedColor:r,primaryColor:n,textColor3:i,textColor2:a,textColorDisabled:l,fontSize:s}=e;return{fontSize:s,nodeBorderRadius:t,nodeColorHover:o,nodeColorPressed:r,nodeColorActive:te(n,{alpha:.1}),arrowColor:i,nodeTextColor:a,nodeTextColorDisabled:l,loadingColor:n,dropMarkColor:n}},aO={name:"Tree",common:ge,peers:{Checkbox:mr,Scrollbar:_t,Empty:uo},self:ff},pf=aO;var lO={name:"Tree",common:R,peers:{Checkbox:Io,Scrollbar:at,Empty:fo},self(e){let{primaryColor:t}=e,o=ff(e);return o.nodeColorActive=te(t,{alpha:.15}),o}},ya=lO;var sO={name:"TreeSelect",common:R,peers:{Tree:ya,Empty:fo,InternalSelection:Cn}},mf=sO;var qb={headerFontSize1:"30px",headerFontSize2:"22px",headerFontSize3:"18px",headerFontSize4:"16px",headerFontSize5:"16px",headerFontSize6:"16px",headerMargin1:"28px 0 20px 0",headerMargin2:"28px 0 20px 0",headerMargin3:"28px 0 20px 0",headerMargin4:"28px 0 18px 0",headerMargin5:"28px 0 18px 0",headerMargin6:"28px 0 18px 0",headerPrefixWidth1:"16px",headerPrefixWidth2:"16px",headerPrefixWidth3:"12px",headerPrefixWidth4:"12px",headerPrefixWidth5:"12px",headerPrefixWidth6:"12px",headerBarWidth1:"4px",headerBarWidth2:"4px",headerBarWidth3:"3px",headerBarWidth4:"3px",headerBarWidth5:"3px",headerBarWidth6:"3px",pMargin:"16px 0 16px 0",liMargin:".25em 0 0 0",olPadding:"0 0 0 2em",ulPadding:"0 0 0 2em"};var Gb=e=>{let{primaryColor:t,textColor2:o,borderColor:r,lineHeight:n,fontSize:i,borderRadiusSmall:a,dividerColor:l,fontWeightStrong:s,textColor1:c,textColor3:d,infoColor:u,warningColor:p,errorColor:f,successColor:m,codeColor:y}=e;return Object.assign(Object.assign({},qb),{aTextColor:t,blockquoteTextColor:o,blockquotePrefixColor:r,blockquoteLineHeight:n,blockquoteFontSize:i,codeBorderRadius:a,liTextColor:o,liLineHeight:n,liFontSize:i,hrColor:l,headerFontWeight:s,headerTextColor:c,pTextColor:o,pTextColor1Depth:c,pTextColor2Depth:o,pTextColor3Depth:d,pLineHeight:n,pFontSize:i,headerBarColor:t,headerBarColorPrimary:t,headerBarColorInfo:u,headerBarColorError:f,headerBarColorWarning:p,headerBarColorSuccess:m,textColor:o,textColor1Depth:c,textColor2Depth:o,textColor3Depth:d,textColorPrimary:t,textColorInfo:u,textColorSuccess:m,textColorWarning:p,textColorError:f,codeTextColor:o,codeColor:y,codeBorder:"1px solid #0000"})};var cO={name:"Typography",common:R,self:Gb},hf=cO;var gf=e=>{let{iconColor:t,primaryColor:o,errorColor:r,textColor2:n,successColor:i,opacityDisabled:a,actionColor:l,borderColor:s,hoverColor:c,lineHeight:d,borderRadius:u,fontSize:p}=e;return{fontSize:p,lineHeight:d,borderRadius:u,draggerColor:l,draggerBorder:`1px dashed ${s}`,draggerBorderHover:`1px dashed ${o}`,itemColorHover:c,itemColorHoverError:te(r,{alpha:.06}),itemTextColor:n,itemTextColorError:r,itemTextColorSuccess:i,itemIconColor:t,itemDisabledOpacity:a,itemBorderImageCardError:`1px solid ${r}`,itemBorderImageCard:`1px solid ${s}`}},FJ={name:"Upload",common:ge,peers:{Button:Nt,Progress:Zu},self:gf};var dO={name:"Upload",common:R,peers:{Button:lt,Progress:ba},self(e){let{errorColor:t}=e,o=gf(e);return o.itemColorHoverError=te(t,{alpha:.09}),o}},xf=dO;var uO={name:"Watermark",common:R,self(e){let{fontFamily:t}=e;return{fontFamily:t}}},vf=uO;var bf={name:"Image",common:R,peers:{Tooltip:or},self:e=>{let{textColor2:t}=e;return{toolbarIconColor:t,toolbarColor:"rgba(0, 0, 0, .35)",toolbarBoxShadow:"none",toolbarBorderRadius:"24px"}}};var yf={name:"Skeleton",common:R,self(e){let{heightSmall:t,heightMedium:o,heightLarge:r,borderRadius:n}=e;return{color:"rgba(255, 255, 255, 0.12)",colorEnd:"rgba(255, 255, 255, 0.18)",borderRadius:n,heightSmall:t,heightMedium:o,heightLarge:r}}};function Cf(e){return window.TouchEvent&&e instanceof window.TouchEvent}function wf(){let e=X(new Map),t=o=>r=>{e.value.set(o,r)};return vc(()=>e.value.clear()),[e,t]}var Yb=J([U("slider",` + `))]);var GT=Object.assign(Object.assign({},wt.props),{size:String,checked:{type:[Boolean,String,Number],default:void 0},defaultChecked:{type:[Boolean,String,Number],default:!1},value:[String,Number],disabled:{type:Boolean,default:void 0},indeterminate:Boolean,label:String,focusable:{type:Boolean,default:!0},checkedValue:{type:[Boolean,String,Number],default:!0},uncheckedValue:{type:[Boolean,String,Number],default:!1},"onUpdate:checked":[Function,Array],onUpdateChecked:[Function,Array],privateInsideTable:Boolean,onChange:[Function,Array]}),eu=de({name:"Checkbox",props:GT,setup(e){let t=Z(null),{mergedClsPrefixRef:o,inlineThemeDisabled:r,mergedRtlRef:n}=At(e),i=Co(e,{mergedSize(D){let{size:x}=e;if(x!==void 0)return x;if(s){let{value:k}=s.mergedSizeRef;if(k!==void 0)return k}if(D){let{mergedSize:k}=D;if(k!==void 0)return k.value}return"medium"},mergedDisabled(D){let{disabled:x}=e;if(x!==void 0)return x;if(s){if(s.disabledRef.value)return!0;let{maxRef:{value:k},checkedCountRef:A}=s;if(k!==void 0&&A.value>=k&&!p.value)return!0;let{minRef:{value:E}}=s;if(E!==void 0&&A.value<=E&&p.value)return!0}return D?D.disabled.value:!1}}),{mergedDisabledRef:a,mergedSizeRef:l}=i,s=we(Jd,null),c=Z(e.defaultChecked),d=Ae(e,"checked"),u=Zt(d,c),p=et(()=>{if(s){let D=s.valueSetRef.value;return D&&e.value!==void 0?D.has(e.value):!1}else return u.value===e.checkedValue}),f=wt("Checkbox","-checkbox",sb,mr,e,o);function m(D){if(s&&e.value!==void 0)s.toggleCheckbox(!p.value,e.value);else{let{onChange:x,"onUpdate:checked":k,onUpdateChecked:A}=e,{nTriggerFormInput:E,nTriggerFormChange:H}=i,M=p.value?e.uncheckedValue:e.checkedValue;k&&ke(k,M,D),A&&ke(A,M,D),x&&ke(x,M,D),E(),H(),c.value=M}}function y(D){a.value||m(D)}function _(D){if(!a.value)switch(D.code){case"Space":case"Enter":case"NumpadEnter":m(D)}}function h(D){switch(D.code){case"Space":D.preventDefault()}}let O={focus:()=>{var D;(D=t.value)===null||D===void 0||D.focus()},blur:()=>{var D;(D=t.value)===null||D===void 0||D.blur()}},W=bn("Checkbox",n,o),w=j(()=>{let{value:D}=l,{common:{cubicBezierEaseInOut:x},self:{borderRadius:k,color:A,colorChecked:E,colorDisabled:H,colorTableHeader:M,colorTableHeaderModal:le,colorTableHeaderPopover:ye,checkMarkColor:Pe,checkMarkColorDisabled:fe,border:ce,borderFocus:Ce,borderDisabled:Ke,borderChecked:He,boxShadowFocus:Me,textColor:Ye,textColorDisabled:Xe,checkMarkColorDisabledChecked:Dt,colorDisabledChecked:pt,borderDisabledChecked:Le,labelPadding:We,labelLineHeight:gt,[Te("fontSize",D)]:Re,[Te("size",D)]:lt}}=f.value;return{"--n-label-line-height":gt,"--n-size":lt,"--n-bezier":x,"--n-border-radius":k,"--n-border":ce,"--n-border-checked":He,"--n-border-focus":Ce,"--n-border-disabled":Ke,"--n-border-disabled-checked":Le,"--n-box-shadow-focus":Me,"--n-color":A,"--n-color-checked":E,"--n-color-table":M,"--n-color-table-modal":le,"--n-color-table-popover":ye,"--n-color-disabled":H,"--n-color-disabled-checked":pt,"--n-text-color":Ye,"--n-text-color-disabled":Xe,"--n-check-mark-color":Pe,"--n-check-mark-color-disabled":fe,"--n-check-mark-color-disabled-checked":Dt,"--n-font-size":Re,"--n-label-padding":We}}),b=r?Gt("checkbox",j(()=>l.value[0]),w,e):void 0;return Object.assign(i,O,{rtlEnabled:W,selfRef:t,mergedClsPrefix:o,mergedDisabled:a,renderedChecked:p,mergedTheme:f,labelId:Ic(),handleClick:y,handleKeyUp:_,handleKeyDown:h,cssVars:r?void 0:w,themeClass:b?.themeClass,onRender:b?.onRender})},render(){var e;let{$slots:t,renderedChecked:o,mergedDisabled:r,indeterminate:n,privateInsideTable:i,cssVars:a,labelId:l,label:s,mergedClsPrefix:c,focusable:d,handleKeyUp:u,handleKeyDown:p,handleClick:f}=this;return(e=this.onRender)===null||e===void 0||e.call(this),v("div",{ref:"selfRef",class:[`${c}-checkbox`,this.themeClass,this.rtlEnabled&&`${c}-checkbox--rtl`,o&&`${c}-checkbox--checked`,r&&`${c}-checkbox--disabled`,n&&`${c}-checkbox--indeterminate`,i&&`${c}-checkbox--inside-table`],tabindex:r||!d?void 0:0,role:"checkbox","aria-checked":n?"mixed":o,"aria-labelledby":l,style:a,onKeyup:u,onKeydown:p,onClick:f,onMousedown:()=>{xt("selectstart",window,m=>{m.preventDefault()},{once:!0})}},v("div",{class:`${c}-checkbox-box-wrapper`},"\xA0",v("div",{class:`${c}-checkbox-box`},v(So,null,{default:()=>this.indeterminate?v("div",{key:"indeterminate",class:`${c}-checkbox-icon`},lb):v("div",{key:"check",class:`${c}-checkbox-icon`},ab)}),v("div",{class:`${c}-checkbox-box__border`}))),s!==null||t.default?v("span",{class:`${c}-checkbox__label`,id:l},t.default?t.default():s):null)}});var YT={name:"Code",common:R,self(e){let{textColor2:t,fontSize:o,fontWeightStrong:r}=e;return{textColor:t,fontSize:o,fontWeightStrong:r,"mono-3":"#5c6370","hue-1":"#56b6c2","hue-2":"#61aeee","hue-3":"#c678dd","hue-4":"#98c379","hue-5":"#e06c75","hue-5-2":"#be5046","hue-6":"#d19a66","hue-6-2":"#e6c07b"}}},ca=YT;var cb=e=>{let{fontWeight:t,textColor1:o,textColor2:r,dividerColor:n,fontSize:i}=e;return{titleFontSize:i,titleFontWeight:t,dividerColor:n,titleTextColor:o,fontSize:i,textColor:r,arrowColor:r}};var XT={name:"Collapse",common:R,self:cb},tu=XT;var db=e=>{let{cubicBezierEaseInOut:t}=e;return{bezier:t}};var ZT={name:"CollapseTransition",common:R,self:db},ou=ZT;var ub={abstract:Boolean,bordered:{type:Boolean,default:void 0},clsPrefix:String,locale:Object,dateLocale:Object,namespace:String,rtl:Array,tag:{type:String,default:"div"},hljs:Object,theme:Object,themeOverrides:Object,componentOptions:Object,icons:Object,breakpoints:Object,inlineThemeDisabled:{type:Boolean,default:void 0},as:{type:String,validator:()=>(dl("config-provider","`as` is deprecated, please use `tag` instead."),!0),default:void 0}},ru=de({name:"ConfigProvider",alias:["App"],props:ub,setup(e){let t=we(Qt,null),o=j(()=>{let{theme:f}=e;if(f===null)return;let m=t?.mergedThemeRef.value;return f===void 0?m:m===void 0?f:Object.assign({},m,f)}),r=j(()=>{let{themeOverrides:f}=e;if(f!==null){if(f===void 0)return t?.mergedThemeOverridesRef.value;{let m=t?.mergedThemeOverridesRef.value;return m===void 0?f:Vr({},m,f)}}}),n=et(()=>{let{namespace:f}=e;return f===void 0?t?.mergedNamespaceRef.value:f}),i=et(()=>{let{bordered:f}=e;return f===void 0?t?.mergedBorderedRef.value:f}),a=j(()=>{let{icons:f}=e;return f===void 0?t?.mergedIconsRef.value:f}),l=j(()=>{let{componentOptions:f}=e;return f!==void 0?f:t?.mergedComponentPropsRef.value}),s=j(()=>{let{clsPrefix:f}=e;return f!==void 0?f:t?.mergedClsPrefixRef.value}),c=j(()=>{var f;let{rtl:m}=e;if(m===void 0)return t?.mergedRtlRef.value;let y={};for(let _ of m)y[_.name]=Qr(_),(f=_.peers)===null||f===void 0||f.forEach(h=>{h.name in y||(y[h.name]=Qr(h))});return y}),d=j(()=>e.breakpoints||t?.mergedBreakpointsRef.value),u=e.inlineThemeDisabled||t?.inlineThemeDisabled,p=j(()=>{let{value:f}=o,{value:m}=r,y=m&&Object.keys(m).length!==0,_=f?.name;return _?y?`${_}-${uo(JSON.stringify(r.value))}`:_:y?uo(JSON.stringify(r.value)):""});return Xt(Qt,{mergedThemeHashRef:p,mergedBreakpointsRef:d,mergedRtlRef:c,mergedIconsRef:a,mergedComponentPropsRef:l,mergedBorderedRef:i,mergedNamespaceRef:n,mergedClsPrefixRef:s,mergedLocaleRef:j(()=>{let{locale:f}=e;if(f!==null)return f===void 0?t?.mergedLocaleRef.value:f}),mergedDateLocaleRef:j(()=>{let{dateLocale:f}=e;if(f!==null)return f===void 0?t?.mergedDateLocaleRef.value:f}),mergedHljsRef:j(()=>{let{hljs:f}=e;return f===void 0?t?.mergedHljsRef.value:f}),mergedThemeRef:o,mergedThemeOverridesRef:r,inlineThemeDisabled:u||!1}),{mergedClsPrefix:s,mergedBordered:i,mergedNamespace:n,mergedTheme:o,mergedThemeOverrides:r}},render(){var e,t,o,r;return this.abstract?(r=(o=this.$slots).default)===null||r===void 0?void 0:r.call(o):v(this.as||this.tag,{class:`${this.mergedClsPrefix||Xl}-config-provider`},(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e))}});function nu(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}var QT={name:"Select",common:ge,peers:{InternalSelection:na,InternalSelectMenu:vn},self:nu},iu=QT;var JT={name:"Select",common:R,peers:{InternalSelection:Cn,InternalSelectMenu:Po},self:nu},da=JT;var fb={itemSize:"28px",itemPadding:"0 4px",itemMargin:"0 0 0 8px",itemMarginRtl:"0 8px 0 0",buttonIconSize:"16px",inputWidth:"60px",selectWidth:"unset",inputMargin:"0 0 0 8px",inputMarginRtl:"0 8px 0 0",selectMargin:"0 0 0 8px",prefixMargin:"0 8px 0 0",suffixMargin:"0 0 0 8px",jumperFontSize:"14px"};var au=e=>{let{textColor2:t,primaryColor:o,primaryColorHover:r,primaryColorPressed:n,inputColorDisabled:i,textColorDisabled:a,borderColor:l,borderRadius:s,fontSize:c}=e;return Object.assign(Object.assign({},fb),{buttonColor:"#0000",buttonColorHover:"#0000",buttonColorPressed:"#0000",buttonBorder:`1px solid ${l}`,buttonBorderHover:`1px solid ${l}`,buttonBorderPressed:`1px solid ${l}`,buttonIconColor:t,buttonIconColorHover:t,buttonIconColorPressed:t,itemTextColor:t,itemTextColorHover:r,itemTextColorPressed:n,itemTextColorActive:o,itemTextColorDisabled:a,itemColor:"#0000",itemColorHover:"#0000",itemColorPressed:"#0000",itemColorActive:"#0000",itemColorActiveHover:"#0000",itemColorDisabled:i,itemBorder:"1px solid #0000",itemBorderHover:"1px solid #0000",itemBorderPressed:"1px solid #0000",itemBorderActive:`1px solid ${o}`,itemBorderDisabled:`1px solid ${l}`,itemBorderRadius:s,itemFontSize:c,jumperTextColor:t,jumperTextColorDisabled:a})},e2={name:"Pagination",common:ge,peers:{Select:iu,Input:ho},self:au},lu=e2;var t2={name:"Pagination",common:R,peers:{Select:da,Input:vt},self(e){let{primaryColor:t,opacity3:o}=e,r=te(t,{alpha:Number(o)}),n=au(e);return n.itemBorderActive=`1px solid ${r}`,n.itemBorderDisabled="1px solid #0000",n}},ua=t2;var fs={padding:"8px 14px"};var o2={name:"Tooltip",common:R,peers:{Popover:Jt},self(e){let{borderRadius:t,boxShadow2:o,popoverColor:r,textColor2:n}=e;return Object.assign(Object.assign({},fs),{borderRadius:t,boxShadow:o,color:r,textColor:n})}},or=o2;var r2=e=>{let{borderRadius:t,boxShadow2:o,baseColor:r}=e;return Object.assign(Object.assign({},fs),{borderRadius:t,boxShadow:o,color:xe(r,"rgba(0, 0, 0, .85)"),textColor:r})},n2={name:"Tooltip",common:ge,peers:{Popover:Ro},self:r2},fa=n2;var i2={name:"Ellipsis",common:R,peers:{Tooltip:or}},pa=i2;var a2={name:"Ellipsis",common:ge,peers:{Tooltip:fa}},su=a2;var ps={radioSizeSmall:"14px",radioSizeMedium:"16px",radioSizeLarge:"18px",labelPadding:"0 8px"};var l2={name:"Radio",common:R,self(e){let{borderColor:t,primaryColor:o,baseColor:r,textColorDisabled:n,inputColorDisabled:i,textColor2:a,opacityDisabled:l,borderRadius:s,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,heightSmall:p,heightMedium:f,heightLarge:m,lineHeight:y}=e;return Object.assign(Object.assign({},ps),{labelLineHeight:y,buttonHeightSmall:p,buttonHeightMedium:f,buttonHeightLarge:m,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,boxShadow:`inset 0 0 0 1px ${t}`,boxShadowActive:`inset 0 0 0 1px ${o}`,boxShadowFocus:`inset 0 0 0 1px ${o}, 0 0 0 2px ${te(o,{alpha:.3})}`,boxShadowHover:`inset 0 0 0 1px ${o}`,boxShadowDisabled:`inset 0 0 0 1px ${t}`,color:"#0000",colorDisabled:i,textColor:a,textColorDisabled:n,dotColorActive:o,dotColorDisabled:t,buttonBorderColor:t,buttonBorderColorActive:o,buttonBorderColorHover:o,buttonColor:"#0000",buttonColorActive:o,buttonTextColor:a,buttonTextColorActive:r,buttonTextColorHover:o,opacityDisabled:l,buttonBoxShadowFocus:`inset 0 0 0 1px ${o}, 0 0 0 2px ${te(o,{alpha:.3})}`,buttonBoxShadowHover:`inset 0 0 0 1px ${o}`,buttonBoxShadow:"inset 0 0 0 1px #0000",buttonBorderRadius:s})}},ma=l2;var s2=e=>{let{borderColor:t,primaryColor:o,baseColor:r,textColorDisabled:n,inputColorDisabled:i,textColor2:a,opacityDisabled:l,borderRadius:s,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,heightSmall:p,heightMedium:f,heightLarge:m,lineHeight:y}=e;return Object.assign(Object.assign({},ps),{labelLineHeight:y,buttonHeightSmall:p,buttonHeightMedium:f,buttonHeightLarge:m,fontSizeSmall:c,fontSizeMedium:d,fontSizeLarge:u,boxShadow:`inset 0 0 0 1px ${t}`,boxShadowActive:`inset 0 0 0 1px ${o}`,boxShadowFocus:`inset 0 0 0 1px ${o}, 0 0 0 2px ${te(o,{alpha:.2})}`,boxShadowHover:`inset 0 0 0 1px ${o}`,boxShadowDisabled:`inset 0 0 0 1px ${t}`,color:r,colorDisabled:i,textColor:a,textColorDisabled:n,dotColorActive:o,dotColorDisabled:t,buttonBorderColor:t,buttonBorderColorActive:o,buttonBorderColorHover:t,buttonColor:r,buttonColorActive:r,buttonTextColor:a,buttonTextColorActive:o,buttonTextColorHover:o,opacityDisabled:l,buttonBoxShadowFocus:`inset 0 0 0 1px ${o}, 0 0 0 2px ${te(o,{alpha:.3})}`,buttonBoxShadowHover:"inset 0 0 0 1px #0000",buttonBoxShadow:"inset 0 0 0 1px #0000",buttonBorderRadius:s})},c2={name:"Radio",common:ge,self:s2},cu=c2;var pb={thPaddingSmall:"8px",thPaddingMedium:"12px",thPaddingLarge:"12px",tdPaddingSmall:"8px",tdPaddingMedium:"12px",tdPaddingLarge:"12px",sorterSize:"15px",filterSize:"15px",paginationMargin:"12px 0 0 0",emptyPadding:"48px 0",actionPadding:"8px 12px",actionButtonMargin:"0 8px 0 0"};var du=e=>{let{cardColor:t,modalColor:o,popoverColor:r,textColor2:n,textColor1:i,tableHeaderColor:a,tableColorHover:l,iconColor:s,primaryColor:c,fontWeightStrong:d,borderRadius:u,lineHeight:p,fontSizeSmall:f,fontSizeMedium:m,fontSizeLarge:y,dividerColor:_,heightSmall:h,opacityDisabled:O,tableColorStriped:W}=e;return Object.assign(Object.assign({},pb),{actionDividerColor:_,lineHeight:p,borderRadius:u,fontSizeSmall:f,fontSizeMedium:m,fontSizeLarge:y,borderColor:xe(t,_),tdColorHover:xe(t,l),tdColorStriped:xe(t,W),thColor:xe(t,a),thColorHover:xe(xe(t,a),l),tdColor:t,tdTextColor:n,thTextColor:i,thFontWeight:d,thButtonColorHover:l,thIconColor:s,thIconColorActive:c,borderColorModal:xe(o,_),tdColorHoverModal:xe(o,l),tdColorStripedModal:xe(o,W),thColorModal:xe(o,a),thColorHoverModal:xe(xe(o,a),l),tdColorModal:o,borderColorPopover:xe(r,_),tdColorHoverPopover:xe(r,l),tdColorStripedPopover:xe(r,W),thColorPopover:xe(r,a),thColorHoverPopover:xe(xe(r,a),l),tdColorPopover:r,boxShadowBefore:"inset -12px 0 8px -12px rgba(0, 0, 0, .18)",boxShadowAfter:"inset 12px 0 8px -12px rgba(0, 0, 0, .18)",loadingColor:c,loadingSize:h,opacityLoading:O})},b7={name:"DataTable",common:ge,peers:{Button:Rt,Checkbox:mr,Radio:cu,Pagination:lu,Scrollbar:_t,Empty:po,Popover:Ro,Ellipsis:su},self:du};var d2={name:"DataTable",common:R,peers:{Button:it,Checkbox:Io,Radio:ma,Pagination:ua,Scrollbar:nt,Empty:mo,Popover:Jt,Ellipsis:pa},self(e){let t=du(e);return t.boxShadowAfter="inset 12px 0 8px -12px rgba(0, 0, 0, .36)",t.boxShadowBefore="inset -12px 0 8px -12px rgba(0, 0, 0, .36)",t}},uu=d2;var mb={padding:"4px 0",optionIconSizeSmall:"14px",optionIconSizeMedium:"16px",optionIconSizeLarge:"16px",optionIconSizeHuge:"18px",optionSuffixWidthSmall:"14px",optionSuffixWidthMedium:"14px",optionSuffixWidthLarge:"16px",optionSuffixWidthHuge:"16px",optionIconSuffixWidthSmall:"32px",optionIconSuffixWidthMedium:"32px",optionIconSuffixWidthLarge:"36px",optionIconSuffixWidthHuge:"36px",optionPrefixWidthSmall:"14px",optionPrefixWidthMedium:"14px",optionPrefixWidthLarge:"16px",optionPrefixWidthHuge:"16px",optionIconPrefixWidthSmall:"36px",optionIconPrefixWidthMedium:"36px",optionIconPrefixWidthLarge:"40px",optionIconPrefixWidthHuge:"40px"};var fu=e=>{let{primaryColor:t,textColor2:o,dividerColor:r,hoverColor:n,popoverColor:i,invertedColor:a,borderRadius:l,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:d,fontSizeHuge:u,heightSmall:p,heightMedium:f,heightLarge:m,heightHuge:y,textColor3:_,opacityDisabled:h}=e;return Object.assign(Object.assign({},mb),{optionHeightSmall:p,optionHeightMedium:f,optionHeightLarge:m,optionHeightHuge:y,borderRadius:l,fontSizeSmall:s,fontSizeMedium:c,fontSizeLarge:d,fontSizeHuge:u,optionTextColor:o,optionTextColorHover:o,optionTextColorActive:t,optionTextColorChildActive:t,color:i,dividerColor:r,suffixColor:o,prefixColor:o,optionColorHover:n,optionColorActive:te(t,{alpha:.1}),groupHeaderTextColor:_,optionTextColorInverted:"#BBB",optionTextColorHoverInverted:"#FFF",optionTextColorActiveInverted:"#FFF",optionTextColorChildActiveInverted:"#FFF",colorInverted:a,dividerColorInverted:"#BBB",suffixColorInverted:"#BBB",prefixColorInverted:"#BBB",optionColorHoverInverted:t,optionColorActiveInverted:t,groupHeaderTextColorInverted:"#AAA",optionOpacityDisabled:h})},u2={name:"Dropdown",common:ge,peers:{Popover:Ro},self:fu},pu=u2;var f2={name:"Dropdown",common:R,peers:{Popover:Jt},self(e){let{primaryColorSuppl:t,primaryColor:o,popoverColor:r}=e,n=fu(e);return n.colorInverted=r,n.optionColorActive=te(o,{alpha:.15}),n.optionColorActiveInverted=t,n.optionColorHoverInverted=t,n}},ha=f2;var hb=e=>{let{textColorBase:t,opacity1:o,opacity2:r,opacity3:n,opacity4:i,opacity5:a}=e;return{color:t,opacity1Depth:o,opacity2Depth:r,opacity3Depth:n,opacity4Depth:i,opacity5Depth:a}};var p2={name:"Icon",common:R,self:hb},mu=p2;var gb={itemFontSize:"12px",itemHeight:"36px",itemWidth:"52px",panelActionPadding:"8px 0"};var hu=e=>{let{popoverColor:t,textColor2:o,primaryColor:r,hoverColor:n,dividerColor:i,opacityDisabled:a,boxShadow2:l,borderRadius:s,iconColor:c,iconColorDisabled:d}=e;return Object.assign(Object.assign({},gb),{panelColor:t,panelBoxShadow:l,panelDividerColor:i,itemTextColor:o,itemTextColorActive:r,itemColorHover:n,itemOpacityDisabled:a,itemBorderRadius:s,borderRadius:s,iconColor:c,iconColorDisabled:d})},m2={name:"TimePicker",common:ge,peers:{Scrollbar:_t,Button:Rt,Input:ho},self:hu},gu=m2;var h2={name:"TimePicker",common:R,peers:{Scrollbar:nt,Button:it,Input:vt},self:hu},ga=h2;var xb={itemSize:"24px",itemCellWidth:"38px",itemCellHeight:"32px",scrollItemWidth:"80px",scrollItemHeight:"40px",panelExtraFooterPadding:"8px 12px",panelActionPadding:"8px 12px",calendarTitlePadding:"0",calendarTitleHeight:"28px",arrowSize:"14px",panelHeaderPadding:"8px 12px",calendarDaysHeight:"32px",calendarTitleGridTempateColumns:"28px 28px 1fr 28px 28px",calendarLeftPaddingDate:"6px 12px 4px 12px",calendarLeftPaddingDatetime:"4px 12px",calendarLeftPaddingDaterange:"6px 12px 4px 12px",calendarLeftPaddingDatetimerange:"4px 12px",calendarLeftPaddingMonth:"0",calendarLeftPaddingYear:"0",calendarLeftPaddingQuarter:"0",calendarRightPaddingDate:"6px 12px 4px 12px",calendarRightPaddingDatetime:"4px 12px",calendarRightPaddingDaterange:"6px 12px 4px 12px",calendarRightPaddingDatetimerange:"4px 12px",calendarRightPaddingMonth:"0",calendarRightPaddingYear:"0",calendarRightPaddingQuarter:"0"};var xu=e=>{let{hoverColor:t,fontSize:o,textColor2:r,textColorDisabled:n,popoverColor:i,primaryColor:a,borderRadiusSmall:l,iconColor:s,iconColorDisabled:c,textColor1:d,dividerColor:u,boxShadow2:p,borderRadius:f,fontWeightStrong:m}=e;return Object.assign(Object.assign({},xb),{itemFontSize:o,calendarDaysFontSize:o,calendarTitleFontSize:o,itemTextColor:r,itemTextColorDisabled:n,itemTextColorActive:i,itemTextColorCurrent:a,itemColorIncluded:te(a,{alpha:.1}),itemColorHover:t,itemColorDisabled:t,itemColorActive:a,itemBorderRadius:l,panelColor:i,panelTextColor:r,arrowColor:s,calendarTitleTextColor:d,calendarTitleColorHover:t,calendarDaysTextColor:r,panelHeaderDividerColor:u,calendarDaysDividerColor:u,calendarDividerColor:u,panelActionDividerColor:u,panelBoxShadow:p,panelBorderRadius:f,calendarTitleFontWeight:m,scrollItemBorderRadius:f,iconColor:s,iconColorDisabled:c})},Sq={name:"DatePicker",common:ge,peers:{Input:ho,Button:Rt,TimePicker:gu,Scrollbar:_t},self:xu};var g2={name:"DatePicker",common:R,peers:{Input:vt,Button:it,TimePicker:ga,Scrollbar:nt},self(e){let{popoverColor:t,hoverColor:o,primaryColor:r}=e,n=xu(e);return n.itemColorDisabled=xe(t,o),n.itemColorIncluded=te(r,{alpha:.15}),n.itemColorHover=xe(t,o),n}},vu=g2;var vb={thPaddingBorderedSmall:"8px 12px",thPaddingBorderedMedium:"12px 16px",thPaddingBorderedLarge:"16px 24px",thPaddingSmall:"0",thPaddingMedium:"0",thPaddingLarge:"0",tdPaddingBorderedSmall:"8px 12px",tdPaddingBorderedMedium:"12px 16px",tdPaddingBorderedLarge:"16px 24px",tdPaddingSmall:"0 0 8px 0",tdPaddingMedium:"0 0 12px 0",tdPaddingLarge:"0 0 16px 0"};var bb=e=>{let{tableHeaderColor:t,textColor2:o,textColor1:r,cardColor:n,modalColor:i,popoverColor:a,dividerColor:l,borderRadius:s,fontWeightStrong:c,lineHeight:d,fontSizeSmall:u,fontSizeMedium:p,fontSizeLarge:f}=e;return Object.assign(Object.assign({},vb),{lineHeight:d,fontSizeSmall:u,fontSizeMedium:p,fontSizeLarge:f,titleTextColor:r,thColor:xe(n,t),thColorModal:xe(i,t),thColorPopover:xe(a,t),thTextColor:r,thFontWeight:c,tdTextColor:o,tdColor:n,tdColorModal:i,tdColorPopover:a,borderColor:xe(n,l),borderColorModal:xe(i,l),borderColorPopover:xe(a,l),borderRadius:s})};var x2={name:"Descriptions",common:R,self:bb},bu=x2;var yb={titleFontSize:"18px",padding:"16px 28px 20px 28px",iconSize:"28px",actionSpace:"12px",contentMargin:"8px 0 16px 0",iconMargin:"0 4px 0 0",iconMarginIconTop:"4px 0 8px 0",closeSize:"18px",closeMargin:"22px 28px 0 0",closeMarginIconTop:"12px 18px 0 0"};var yu=e=>{let{textColor1:t,textColor2:o,modalColor:r,closeColor:n,closeColorHover:i,closeColorPressed:a,infoColor:l,successColor:s,warningColor:c,errorColor:d,primaryColor:u,dividerColor:p,borderRadius:f,fontWeightStrong:m,lineHeight:y,fontSize:_}=e;return Object.assign(Object.assign({},yb),{fontSize:_,lineHeight:y,border:`1px solid ${p}`,titleTextColor:t,textColor:o,color:r,closeColor:n,closeColorHover:i,closeColorPressed:a,iconColor:u,iconColorInfo:l,iconColorSuccess:s,iconColorWarning:c,iconColorError:d,borderRadius:f,titleFontWeight:m})},v2={name:"Dialog",common:ge,peers:{Button:Rt},self:yu},Cu=v2;var b2={name:"Dialog",common:R,peers:{Button:it},self:yu},xa=b2;var wu=e=>{let{modalColor:t,textColor2:o,boxShadow3:r}=e;return{color:t,textColor:o,boxShadow:r}},lG={name:"Modal",common:ge,peers:{Scrollbar:_t,Dialog:Cu,Card:Gd},self:wu};var y2={name:"Modal",common:R,peers:{Scrollbar:nt,Dialog:xa,Card:sa},self:wu},ku=y2;var Cb=e=>{let{textColor1:t,dividerColor:o,fontWeightStrong:r}=e;return{textColor:t,color:o,fontWeight:r}};var C2={name:"Divider",common:R,self:Cb},Su=C2;var _u=e=>{let{modalColor:t,textColor1:o,textColor2:r,boxShadow3:n,lineHeight:i,fontWeightStrong:a,dividerColor:l,closeColor:s,closeColorHover:c,closeColorPressed:d}=e;return{bodyPadding:"16px 24px",headerPadding:"16px 24px",footerPadding:"16px 24px",color:t,textColor:r,titleTextColor:o,titleFontSize:"18px",titleFontWeight:a,boxShadow:n,lineHeight:i,headerBorderBottom:`1px solid ${l}`,footerBorderTop:`1px solid ${l}`,closeColor:s,closeColorHover:c,closeColorPressed:d,closeSize:"18px"}},_G={name:"Drawer",common:ge,peers:{Scrollbar:_t},self:_u};var w2={name:"Drawer",common:R,peers:{Scrollbar:nt},self:_u},Eu=w2;var wb={actionMargin:"0 0 0 20px",actionMarginRtl:"0 20px 0 0"};var k2={name:"DynamicInput",common:R,peers:{Input:vt,Button:it},self(){return wb}},Du=k2;var kb={gapSmall:"4px 8px",gapMedium:"8px 12px",gapLarge:"12px 16px"};var S2={name:"Space",self(){return kb}},va=S2;var _2={name:"DynamicTags",common:R,peers:{Input:vt,Button:it,Tag:ra,Space:va},self(){return{inputWidth:"64px"}}},Tu=_2;var E2={name:"Element",common:R},Ou=E2;var Sb={feedbackPadding:"4px 0 0 2px",feedbackHeightSmall:"24px",feedbackHeightMedium:"24px",feedbackHeightLarge:"26px",feedbackFontSizeSmall:"13px",feedbackFontSizeMedium:"14px",feedbackFontSizeLarge:"14px",labelFontSizeLeftSmall:"14px",labelFontSizeLeftMedium:"14px",labelFontSizeLeftLarge:"15px",labelFontSizeTopSmall:"13px",labelFontSizeTopMedium:"14px",labelFontSizeTopLarge:"14px",labelHeightSmall:"24px",labelHeightMedium:"26px",labelHeightLarge:"28px",labelPaddingVertical:"0 0 8px 2px",labelPaddingHorizontal:"0 12px 0 0",labelTextAlignVertical:"left",labelTextAlignHorizontal:"right"};var _b=e=>{let{heightSmall:t,heightMedium:o,heightLarge:r,textColor1:n,errorColor:i,warningColor:a,lineHeight:l,textColor3:s}=e;return Object.assign(Object.assign({},Sb),{blankHeightSmall:t,blankHeightMedium:o,blankHeightLarge:r,lineHeight:l,labelTextColor:n,asteriskColor:i,feedbackTextColorError:i,feedbackTextColorWarning:a,feedbackTextColor:s})};var D2={name:"Form",common:R,self:_b},Nu=D2;var T2={name:"GradientText",common:R,self(e){let{primaryColor:t,successColor:o,warningColor:r,errorColor:n,infoColor:i,primaryColorSuppl:a,successColorSuppl:l,warningColorSuppl:s,errorColorSuppl:c,infoColorSuppl:d,fontWeightStrong:u}=e;return{fontWeight:u,rotate:"252deg",colorStartPrimary:t,colorEndPrimary:a,colorStartInfo:i,colorEndInfo:d,colorStartWarning:r,colorEndWarning:s,colorStartError:n,colorEndError:c,colorStartSuccess:o,colorEndSuccess:l}}},Pu=T2;var Eb=e=>{let{primaryColor:t,baseColor:o}=e;return{color:t,iconColor:o}};var O2={name:"IconWrapper",common:R,self:Eb},Ru=O2;var N2={name:"ButtonGroup",common:R},Iu=N2;var P2={name:"InputNumber",common:R,peers:{Button:it,Input:vt},self(e){let{textColorDisabled:t}=e;return{iconColorDisabled:t}}},Au=P2;var R2={name:"Layout",common:R,peers:{Scrollbar:nt},self(e){let{textColor2:t,bodyColor:o,popoverColor:r,cardColor:n,dividerColor:i,scrollbarColor:a,scrollbarColorHover:l}=e;return{textColor:t,textColorInverted:t,color:o,colorEmbedded:o,headerColor:n,headerColorInverted:n,footerColor:n,footerColorInverted:n,headerBorderColor:i,headerBorderColorInverted:i,footerBorderColor:i,footerBorderColorInverted:i,siderBorderColor:i,siderBorderColorInverted:i,siderColor:n,siderColorInverted:n,siderToggleButtonBorder:"1px solid transparent",siderToggleButtonColor:r,siderToggleButtonIconColor:t,siderToggleButtonIconColorInverted:t,siderToggleBarColor:xe(o,a),siderToggleBarColorHover:xe(o,l),__invertScrollbar:"false"}}},Mu=R2;var Db=e=>{let{textColor2:t,cardColor:o,modalColor:r,popoverColor:n,dividerColor:i,borderRadius:a,fontSize:l}=e;return{textColor:t,color:o,colorModal:r,colorPopover:n,borderColor:i,borderColorModal:xe(r,i),borderColorPopover:xe(n,i),borderRadius:a,fontSize:l}};var I2={name:"List",common:R,self:Db},$u=I2;var A2={name:"LoadingBar",common:R,self(e){let{primaryColor:t}=e;return{colorError:"red",colorLoading:t,height:"2px"}}},Lu=A2;var M2={name:"Log",common:R,peers:{Scrollbar:nt,Code:ca},self(e){let{textColor2:t,inputColor:o,fontSize:r,primaryColor:n}=e;return{loaderFontSize:r,loaderTextColor:t,loaderColor:o,loaderBorder:"1px solid #0000",loadingColor:n}}},zu=M2;var $2={name:"Mention",common:R,peers:{InternalSelectMenu:Po,Input:vt},self(e){let{boxShadow2:t}=e;return{menuBoxShadow:t}}},Bu=$2;function L2(e,t,o,r){return{itemColorHoverInverted:"#0000",itemColorActiveInverted:t,itemColorActiveHoverInverted:t,itemColorActiveCollapsedInverted:t,itemTextColorInverted:e,itemTextColorHoverInverted:o,itemTextColorChildActiveInverted:o,itemTextColorActiveInverted:o,itemTextColorActiveHoverInverted:o,itemTextColorHorizontalInverted:e,itemTextColorHoverHorizontalInverted:o,itemTextColorChildActiveHorizontalInverted:o,itemTextColorActiveHorizontalInverted:o,itemTextColorActiveHoverHorizontalInverted:o,itemIconColorInverted:e,itemIconColorHoverInverted:o,itemIconColorActiveInverted:o,itemIconColorActiveHoverInverted:o,itemIconColorChildActiveInverted:o,itemIconColorCollapsedInverted:e,itemIconColorHorizontalInverted:e,itemIconColorHoverHorizontalInverted:o,itemIconColorActiveHorizontalInverted:o,itemIconColorActiveHoverHorizontalInverted:o,itemIconColorChildActiveHorizontalInverted:o,arrowColorInverted:e,arrowColorHoverInverted:o,arrowColorActiveInverted:o,arrowColorActiveHoverInverted:o,arrowColorChildActiveInverted:o,groupTextColorInverted:r}}var Hu=e=>{let{borderRadius:t,textColor3:o,primaryColor:r,textColor2:n,textColor1:i,fontSize:a,dividerColor:l,hoverColor:s,primaryColorHover:c}=e;return Object.assign({borderRadius:t,color:"#0000",groupTextColor:o,itemColorHover:s,itemColorActive:te(r,{alpha:.1}),itemColorActiveHover:te(r,{alpha:.1}),itemColorActiveCollapsed:te(r,{alpha:.1}),itemTextColor:n,itemTextColorHover:n,itemTextColorActive:r,itemTextColorActiveHover:r,itemTextColorChildActive:r,itemTextColorHorizontal:n,itemTextColorHoverHorizontal:c,itemTextColorActiveHorizontal:r,itemTextColorActiveHoverHorizontal:r,itemTextColorChildActiveHorizontal:r,itemIconColor:i,itemIconColorHover:i,itemIconColorActive:r,itemIconColorActiveHover:r,itemIconColorChildActive:r,itemIconColorCollapsed:i,itemIconColorHorizontal:i,itemIconColorHoverHorizontal:c,itemIconColorActiveHorizontal:r,itemIconColorActiveHoverHorizontal:r,itemIconColorChildActiveHorizontal:r,itemHeight:"42px",arrowColor:n,arrowColorHover:n,arrowColorActive:r,arrowColorActiveHover:r,arrowColorChildActive:r,colorInverted:"#0000",borderColorHorizontal:"#0000",fontSize:a,dividerColor:l},L2("#BBB",r,"#FFF","#AAA"))},uX={name:"Menu",common:ge,peers:{Tooltip:fa,Dropdown:pu},self:Hu};var z2={name:"Menu",common:R,peers:{Tooltip:or,Dropdown:ha},self(e){let{primaryColor:t,primaryColorSuppl:o}=e,r=Hu(e);return r.itemColorActive=te(t,{alpha:.15}),r.itemColorActiveHover=te(t,{alpha:.15}),r.itemColorActiveCollapsed=te(t,{alpha:.15}),r.itemColorActiveInverted=o,r.itemColorActiveHoverInverted=o,r.itemColorActiveCollapsedInverted=o,r}},Vu=z2;var Tb={margin:"0 0 8px 0",padding:"10px 20px",maxWidth:"720px",minWidth:"420px",iconMargin:"0 10px 0 0",closeMargin:"0 0 0 12px",closeSize:"16px",iconSize:"20px",fontSize:"14px"};var Ob=e=>{let{textColor2:t,closeColor:o,closeColorHover:r,closeColorPressed:n,infoColor:i,successColor:a,errorColor:l,warningColor:s,popoverColor:c,boxShadow2:d,primaryColor:u,lineHeight:p,borderRadius:f}=e;return Object.assign(Object.assign({},Tb),{textColor:t,textColorInfo:t,textColorSuccess:t,textColorError:t,textColorWarning:t,textColorLoading:t,color:c,colorInfo:c,colorSuccess:c,colorError:c,colorWarning:c,colorLoading:c,boxShadow:d,boxShadowInfo:d,boxShadowSuccess:d,boxShadowError:d,boxShadowWarning:d,boxShadowLoading:d,iconColor:t,iconColorInfo:i,iconColorSuccess:a,iconColorWarning:s,iconColorError:l,iconColorLoading:u,closeColor:o,closeColorHover:r,closeColorPressed:n,closeColorInfo:o,closeColorHoverInfo:r,closeColorPressedInfo:n,closeColorSuccess:o,closeColorHoverSuccess:r,closeColorPressedSuccess:n,closeColorError:o,closeColorHoverError:r,closeColorPressedError:n,closeColorWarning:o,closeColorHoverWarning:r,closeColorPressedWarning:n,closeColorLoading:o,closeColorHoverLoading:r,closeColorPressedLoading:n,loadingColor:u,lineHeight:p,borderRadius:f})};var B2={name:"Message",common:R,self:Ob},Fu=B2;var Nb={closeMargin:"18px 14px",closeSize:"16px",width:"365px",padding:"16px"};var ju=e=>{let{textColor2:t,successColor:o,infoColor:r,warningColor:n,errorColor:i,popoverColor:a,closeColor:l,closeColorHover:s,textColor1:c,textColor3:d,borderRadius:u,fontWeightStrong:p,boxShadow2:f,lineHeight:m,fontSize:y}=e;return Object.assign(Object.assign({},Nb),{borderRadius:u,lineHeight:m,fontSize:y,headerFontWeight:p,iconColor:t,iconColorSuccess:o,iconColorInfo:r,iconColorWarning:n,iconColorError:i,color:a,textColor:t,closeColor:l,closeColorHover:s,closeColorPressed:l,headerTextColor:c,descriptionTextColor:d,actionTextColor:t,boxShadow:f})},IX={name:"Notification",common:ge,peers:{Scrollbar:_t},self:ju};var H2={name:"Notification",common:R,peers:{Scrollbar:nt},self:ju},Wu=H2;var Pb={titleFontSize:"18px",backSize:"22px"};function Ku(e){let{textColor1:t,textColor2:o,textColor3:r,fontSize:n,fontWeightStrong:i,primaryColorHover:a,primaryColorPressed:l}=e;return Object.assign(Object.assign({},Pb),{titleFontWeight:i,fontSize:n,titleTextColor:t,backColor:o,backColorHover:a,backColorPressed:l,subtitleTextColor:r})}var WX={name:"PageHeader",common:ge,self:Ku};var Uu={name:"PageHeader",common:R,self:Ku};var Rb={iconSize:"22px"};var qu=e=>{let{fontSize:t,warningColor:o}=e;return Object.assign(Object.assign({},Rb),{fontSize:t,iconColor:o})},oZ={name:"Popconfirm",common:ge,peers:{Button:Rt,Popover:Ro},self:qu};var V2={name:"Popconfirm",common:R,peers:{Button:it,Popover:Jt},self:qu},Gu=V2;var F2={name:"Popselect",common:R,peers:{Popover:Jt,InternalSelectMenu:Po}},Yu=F2;var Xu=e=>{let{infoColor:t,successColor:o,warningColor:r,errorColor:n,textColor2:i,progressRailColor:a,fontSize:l,fontWeight:s}=e;return{fontSize:l,fontSizeCircle:"28px",fontWeightCircle:s,railColor:a,railHeight:"8px",iconSizeCircle:"36px",iconSizeLine:"18px",iconColor:t,iconColorInfo:t,iconColorSuccess:o,iconColorWarning:r,iconColorError:n,textColorCircle:i,textColorLineInner:"rgb(255, 255, 255)",textColorLineOuter:i,fillColor:t,fillColorInfo:t,fillColorSuccess:o,fillColorWarning:r,fillColorError:n,lineBgProcessing:"linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)"}},j2={name:"Progress",common:ge,self:Xu},Zu=j2;var W2={name:"Progress",common:R,self(e){let t=Xu(e);return t.textColorLineInner="rgb(0, 0, 0)",t.lineBgProcessing="linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)",t}},ba=W2;var K2={name:"Rate",common:R,self(e){let{railColor:t}=e;return{itemColor:t,itemColorActive:"#CCAA33",itemSize:"20px",sizeSmall:"16px",sizeMedium:"20px",sizeLarge:"24px"}}},Qu=K2;var Ib={titleFontSizeSmall:"26px",titleFontSizeMedium:"32px",titleFontSizeLarge:"40px",titleFontSizeHuge:"48px",fontSizeSmall:"14px",fontSizeMedium:"14px",fontSizeLarge:"15px",fontSizeHuge:"16px",iconSizeSmall:"64px",iconSizeMedium:"80px",iconSizeLarge:"100px",iconSizeHuge:"125px",iconColor418:void 0,iconColor404:void 0,iconColor403:void 0,iconColor500:void 0};var Ab=e=>{let{textColor2:t,textColor1:o,errorColor:r,successColor:n,infoColor:i,warningColor:a,lineHeight:l,fontWeightStrong:s}=e;return Object.assign(Object.assign({},Ib),{lineHeight:l,titleFontWeight:s,titleTextColor:o,textColor:t,iconColorError:r,iconColorSuccess:n,iconColorInfo:i,iconColorWarning:a})};var U2={name:"Result",common:R,self:Ab},Ju=U2;var ms={railHeight:"4px",railWidthVertical:"4px",handleSize:"18px",dotHeight:"8px",dotWidth:"8px",dotBorderRadius:"4px"};var q2={name:"Slider",common:R,self(e){let t="0 2px 8px 0 rgba(0, 0, 0, 0.12)",{railColor:o,modalColor:r,primaryColorSuppl:n,popoverColor:i,textColor2:a,cardColor:l,borderRadius:s,fontSize:c,opacityDisabled:d}=e;return Object.assign(Object.assign({},ms),{fontSize:c,railColor:o,railColorHover:o,fillColor:n,fillColorHover:n,opacityDisabled:d,handleColor:"#FFF",dotColor:l,dotColorModal:r,dotColorPopover:i,handleBoxShadow:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",handleBoxShadowHover:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",handleBoxShadowActive:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",handleBoxShadowFocus:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",indicatorColor:i,indicatorBoxShadow:t,indicatorTextColor:a,indicatorBorderRadius:s,dotBorder:`2px solid ${o}`,dotBorderActive:`2px solid ${n}`,dotBoxShadow:""})}},ef=q2;var G2=e=>{let t="rgba(0, 0, 0, .85)",o="0 2px 8px 0 rgba(0, 0, 0, 0.12)",{railColor:r,primaryColor:n,baseColor:i,cardColor:a,modalColor:l,popoverColor:s,borderRadius:c,fontSize:d,opacityDisabled:u}=e;return Object.assign(Object.assign({},ms),{fontSize:d,railColor:r,railColorHover:r,fillColor:n,fillColorHover:n,opacityDisabled:u,handleColor:"#FFF",dotColor:a,dotColorModal:l,dotColorPopover:s,handleBoxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowHover:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowActive:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",handleBoxShadowFocus:"0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)",indicatorColor:t,indicatorBoxShadow:o,indicatorTextColor:i,indicatorBorderRadius:c,dotBorder:`2px solid ${r}`,dotBorderActive:`2px solid ${n}`,dotBoxShadow:""})},Y2={name:"Slider",common:ge,self:G2},tf=Y2;var Mb=e=>{let{opacityDisabled:t,heightTiny:o,heightSmall:r,heightMedium:n,heightLarge:i,heightHuge:a,primaryColor:l,fontSize:s}=e;return{fontSize:s,textColor:l,sizeTiny:o,sizeSmall:r,sizeMedium:n,sizeLarge:i,sizeHuge:a,color:l,opacitySpinning:t}};var X2={name:"Spin",common:R,self:Mb},of=X2;var $b=e=>{let{textColor2:t,textColor3:o,fontSize:r,fontWeight:n}=e;return{labelFontSize:r,labelFontWeight:n,valueFontWeight:n,labelTextColor:o,valuePrefixTextColor:t,valueSuffixTextColor:t,valueTextColor:t}};var Z2={name:"Statistic",common:R,self:$b},rf=Z2;var Lb={stepHeaderFontSizeSmall:"14px",stepHeaderFontSizeMedium:"16px",indicatorIndexFontSizeSmall:"14px",indicatorIndexFontSizeMedium:"16px",indicatorSizeSmall:"22px",indicatorSizeMedium:"28px",indicatorIconSizeSmall:"14px",indicatorIconSizeMedium:"18px"};var zb=e=>{let{fontWeightStrong:t,baseColor:o,textColorDisabled:r,primaryColor:n,errorColor:i,textColor1:a,textColor2:l}=e;return Object.assign(Object.assign({},Lb),{stepHeaderFontWeight:t,indicatorTextColorProcess:o,indicatorTextColorWait:r,indicatorTextColorFinish:n,indicatorTextColorError:i,indicatorBorderColorProcess:n,indicatorBorderColorWait:r,indicatorBorderColorFinish:n,indicatorBorderColorError:i,indicatorColorProcess:n,indicatorColorWait:"#0000",indicatorColorFinish:"#0000",indicatorColorError:"#0000",splitorColorProcess:r,splitorColorWait:r,splitorColorFinish:n,splitorColorError:r,headerTextColorProcess:a,headerTextColorWait:r,headerTextColorFinish:r,headerTextColorError:i,descriptionTextColorProcess:l,descriptionTextColorWait:r,descriptionTextColorFinish:r,descriptionTextColorError:i})};var Q2={name:"Steps",common:R,self:zb},nf=Q2;var Bb={buttonHeightSmall:"14px",buttonHeightMedium:"18px",buttonHeightLarge:"22px",buttonWidthSmall:"14px",buttonWidthMedium:"18px",buttonWidthLarge:"22px",buttonWidthPressedSmall:"20px",buttonWidthPressedMedium:"24px",buttonWidthPressedLarge:"28px",railHeightSmall:"18px",railHeightMedium:"22px",railHeightLarge:"26px",railWidthSmall:"32px",railWidthMedium:"40px",railWidthLarge:"48px"};var J2={name:"Switch",common:R,self(e){let{primaryColorSuppl:t,opacityDisabled:o,borderRadius:r,primaryColor:n,textColor2:i,baseColor:a}=e,l="rgba(255, 255, 255, .20)";return Object.assign(Object.assign({},Bb),{iconColor:a,textColor:i,loadingColor:t,opacityDisabled:o,railColor:l,railColorActive:t,buttonBoxShadow:"0px 2px 4px 0 rgba(0, 0, 0, 0.4)",buttonColor:"#FFF",railBorderRadiusSmall:r,railBorderRadiusMedium:r,railBorderRadiusLarge:r,buttonBorderRadiusSmall:r,buttonBorderRadiusMedium:r,buttonBorderRadiusLarge:r,boxShadowFocus:`0 0 8px 0 ${te(n,{alpha:.3})}`})}},af=J2;var Hb={thPaddingSmall:"6px",thPaddingMedium:"12px",thPaddingLarge:"12px",tdPaddingSmall:"6px",tdPaddingMedium:"12px",tdPaddingLarge:"12px"};var Vb=e=>{let{dividerColor:t,cardColor:o,modalColor:r,popoverColor:n,tableHeaderColor:i,tableColorStriped:a,textColor1:l,textColor2:s,borderRadius:c,fontWeightStrong:d,lineHeight:u,fontSizeSmall:p,fontSizeMedium:f,fontSizeLarge:m}=e;return Object.assign(Object.assign({},Hb),{fontSizeSmall:p,fontSizeMedium:f,fontSizeLarge:m,lineHeight:u,borderRadius:c,borderColor:xe(o,t),borderColorModal:xe(r,t),borderColorPopover:xe(n,t),tdColor:o,tdColorModal:r,tdColorPopover:n,tdColorStriped:xe(o,a),tdColorStripedModal:xe(r,a),tdColorStripedPopover:xe(n,a),thColor:xe(o,i),thColorModal:xe(r,i),thColorPopover:xe(n,i),thTextColor:l,tdTextColor:s,thFontWeight:d})};var eO={name:"Table",common:R,self:Vb},lf=eO;var Fb={tabFontSizeSmall:"14px",tabFontSizeMedium:"14px",tabFontSizeLarge:"16px",tabGapSmallLine:"36px",tabGapMediumLine:"36px",tabGapLargeLine:"36px",tabPaddingSmallLine:"6px 0",tabPaddingMediumLine:"10px 0",tabPaddingLargeLine:"14px 0",tabGapSmallBar:"36px",tabGapMediumBar:"36px",tabGapLargeBar:"36px",tabPaddingSmallBar:"4px 0",tabPaddingMediumBar:"6px 0",tabPaddingLargeBar:"10px 0",tabGapSmallCard:"4px",tabGapMediumCard:"4px",tabGapLargeCard:"4px",tabPaddingSmallCard:"6px 10px",tabPaddingMediumCard:"8px 12px",tabPaddingLargeCard:"8px 16px",tabPaddingSmallSegment:"4px 0",tabPaddingMediumSegment:"6px 0",tabPaddingLargeSegment:"8px 0",tabGapSmallSegment:"0",tabGapMediumSegment:"0",tabGapLargeSegment:"0",panePaddingSmall:"8px 0 0 0",panePaddingMedium:"12px 0 0 0",panePaddingLarge:"16px 0 0 0"};var jb=e=>{let{textColor2:t,primaryColor:o,textColorDisabled:r,closeColor:n,closeColorHover:i,closeColorPressed:a,tabColor:l,baseColor:s,dividerColor:c,fontWeight:d,textColor1:u,borderRadius:p,fontSize:f,fontWeightStrong:m}=e;return Object.assign(Object.assign({},Fb),{colorSegment:l,tabFontSizeCard:f,tabTextColorLine:u,tabTextColorActiveLine:o,tabTextColorHoverLine:o,tabTextColorDisabledLine:r,tabTextColorSegment:u,tabTextColorActiveSegment:t,tabTextColorHoverSegment:t,tabTextColorDisabledSegment:r,tabTextColorBar:u,tabTextColorActiveBar:o,tabTextColorHoverBar:o,tabTextColorDisabledBar:r,tabTextColorCard:u,tabTextColorHoverCard:u,tabTextColorActiveCard:o,tabTextColorDisabledCard:r,barColor:o,closeColor:n,closeColorHover:i,closeColorPressed:a,tabColor:l,tabColorSegment:s,tabBorderColor:c,tabFontWeightActive:d,tabFontWeight:d,tabBorderRadius:p,paneTextColor:t,fontWeightStrong:m})};var tO={name:"Tabs",common:R,self(e){let t=jb(e),{inputColor:o}=e;return t.colorSegment=o,t.tabColorSegment=o,t}},sf=tO;var Wb=e=>{let{textColor1:t,textColor2:o,fontWeightStrong:r,fontSize:n}=e;return{fontSize:n,titleTextColor:t,textColor:o,titleFontWeight:r}};var oO={name:"Thing",common:R,self:Wb},cf=oO;var Kb={titleMarginMedium:"0",titleMarginLarge:"-2px 0 0 0",titleFontSizeMedium:"14px",titleFontSizeLarge:"16px",iconSizeMedium:"14px",iconSizeLarge:"14px"};var rO={name:"Timeline",common:R,self(e){let{textColor3:t,infoColorSuppl:o,errorColorSuppl:r,successColorSuppl:n,warningColorSuppl:i,textColor1:a,textColor2:l,railColor:s,fontWeightStrong:c,fontSize:d}=e;return Object.assign(Object.assign({},Kb),{contentFontSize:d,titleFontWeight:c,circleBorder:`2px solid ${t}`,circleBorderInfo:`2px solid ${o}`,circleBorderError:`2px solid ${r}`,circleBorderSuccess:`2px solid ${n}`,circleBorderWarning:`2px solid ${i}`,iconColor:t,iconColorInfo:o,iconColorError:r,iconColorSuccess:n,iconColorWarning:i,titleTextColor:a,contentTextColor:l,metaTextColor:t,lineColor:s})}},df=rO;var Ub={extraFontSize:"12px",width:"440px"};var nO={name:"Transfer",common:R,peers:{Checkbox:Io,Scrollbar:nt,Input:vt,Empty:mo,Button:it},self(e){let{iconColorDisabled:t,iconColor:o,fontWeight:r,fontSizeLarge:n,fontSizeMedium:i,fontSizeSmall:a,heightLarge:l,heightMedium:s,heightSmall:c,borderRadius:d,inputColor:u,tableHeaderColor:p,textColor1:f,textColorDisabled:m,textColor2:y,hoverColor:_}=e;return Object.assign(Object.assign({},Ub),{itemHeightSmall:c,itemHeightMedium:s,itemHeightLarge:l,fontSizeSmall:a,fontSizeMedium:i,fontSizeLarge:n,borderRadius:d,borderColor:"#0000",listColor:u,headerColor:p,titleTextColor:f,titleTextColorDisabled:m,extraTextColor:y,filterDividerColor:"#0000",itemTextColor:y,itemTextColorDisabled:m,itemColorPending:_,titleFontWeight:r,iconColor:o,iconColorDisabled:t})}},uf=nO;var ff=e=>{let{borderRadiusSmall:t,hoverColor:o,pressedColor:r,primaryColor:n,textColor3:i,textColor2:a,textColorDisabled:l,fontSize:s}=e;return{fontSize:s,nodeBorderRadius:t,nodeColorHover:o,nodeColorPressed:r,nodeColorActive:te(n,{alpha:.1}),arrowColor:i,nodeTextColor:a,nodeTextColorDisabled:l,loadingColor:n,dropMarkColor:n}},iO={name:"Tree",common:ge,peers:{Checkbox:mr,Scrollbar:_t,Empty:po},self:ff},pf=iO;var aO={name:"Tree",common:R,peers:{Checkbox:Io,Scrollbar:nt,Empty:mo},self(e){let{primaryColor:t}=e,o=ff(e);return o.nodeColorActive=te(t,{alpha:.15}),o}},ya=aO;var lO={name:"TreeSelect",common:R,peers:{Tree:ya,Empty:mo,InternalSelection:Cn}},mf=lO;var qb={headerFontSize1:"30px",headerFontSize2:"22px",headerFontSize3:"18px",headerFontSize4:"16px",headerFontSize5:"16px",headerFontSize6:"16px",headerMargin1:"28px 0 20px 0",headerMargin2:"28px 0 20px 0",headerMargin3:"28px 0 20px 0",headerMargin4:"28px 0 18px 0",headerMargin5:"28px 0 18px 0",headerMargin6:"28px 0 18px 0",headerPrefixWidth1:"16px",headerPrefixWidth2:"16px",headerPrefixWidth3:"12px",headerPrefixWidth4:"12px",headerPrefixWidth5:"12px",headerPrefixWidth6:"12px",headerBarWidth1:"4px",headerBarWidth2:"4px",headerBarWidth3:"3px",headerBarWidth4:"3px",headerBarWidth5:"3px",headerBarWidth6:"3px",pMargin:"16px 0 16px 0",liMargin:".25em 0 0 0",olPadding:"0 0 0 2em",ulPadding:"0 0 0 2em"};var Gb=e=>{let{primaryColor:t,textColor2:o,borderColor:r,lineHeight:n,fontSize:i,borderRadiusSmall:a,dividerColor:l,fontWeightStrong:s,textColor1:c,textColor3:d,infoColor:u,warningColor:p,errorColor:f,successColor:m,codeColor:y}=e;return Object.assign(Object.assign({},qb),{aTextColor:t,blockquoteTextColor:o,blockquotePrefixColor:r,blockquoteLineHeight:n,blockquoteFontSize:i,codeBorderRadius:a,liTextColor:o,liLineHeight:n,liFontSize:i,hrColor:l,headerFontWeight:s,headerTextColor:c,pTextColor:o,pTextColor1Depth:c,pTextColor2Depth:o,pTextColor3Depth:d,pLineHeight:n,pFontSize:i,headerBarColor:t,headerBarColorPrimary:t,headerBarColorInfo:u,headerBarColorError:f,headerBarColorWarning:p,headerBarColorSuccess:m,textColor:o,textColor1Depth:c,textColor2Depth:o,textColor3Depth:d,textColorPrimary:t,textColorInfo:u,textColorSuccess:m,textColorWarning:p,textColorError:f,codeTextColor:o,codeColor:y,codeBorder:"1px solid #0000"})};var sO={name:"Typography",common:R,self:Gb},hf=sO;var gf=e=>{let{iconColor:t,primaryColor:o,errorColor:r,textColor2:n,successColor:i,opacityDisabled:a,actionColor:l,borderColor:s,hoverColor:c,lineHeight:d,borderRadius:u,fontSize:p}=e;return{fontSize:p,lineHeight:d,borderRadius:u,draggerColor:l,draggerBorder:`1px dashed ${s}`,draggerBorderHover:`1px dashed ${o}`,itemColorHover:c,itemColorHoverError:te(r,{alpha:.06}),itemTextColor:n,itemTextColorError:r,itemTextColorSuccess:i,itemIconColor:t,itemDisabledOpacity:a,itemBorderImageCardError:`1px solid ${r}`,itemBorderImageCard:`1px solid ${s}`}},VJ={name:"Upload",common:ge,peers:{Button:Rt,Progress:Zu},self:gf};var cO={name:"Upload",common:R,peers:{Button:it,Progress:ba},self(e){let{errorColor:t}=e,o=gf(e);return o.itemColorHoverError=te(t,{alpha:.09}),o}},xf=cO;var dO={name:"Watermark",common:R,self(e){let{fontFamily:t}=e;return{fontFamily:t}}},vf=dO;var bf={name:"Image",common:R,peers:{Tooltip:or},self:e=>{let{textColor2:t}=e;return{toolbarIconColor:t,toolbarColor:"rgba(0, 0, 0, .35)",toolbarBoxShadow:"none",toolbarBorderRadius:"24px"}}};var yf={name:"Skeleton",common:R,self(e){let{heightSmall:t,heightMedium:o,heightLarge:r,borderRadius:n}=e;return{color:"rgba(255, 255, 255, 0.12)",colorEnd:"rgba(255, 255, 255, 0.18)",borderRadius:n,heightSmall:t,heightMedium:o,heightLarge:r}}};function Cf(e){return window.TouchEvent&&e instanceof window.TouchEvent}function wf(){let e=Z(new Map),t=o=>r=>{e.value.set(o,r)};return vc(()=>e.value.clear()),[e,t]}var Yb=J([U("slider",` display: block; padding: calc((var(--n-handle-size) - var(--n-rail-height)) / 2) 0; position: relative; @@ -849,7 +849,7 @@ ${t} margin-top: 12px; `),be("left",` margin-right: 12px; - `),Td()]),gl(U("slider",[U("slider-dot",{backgroundColor:"var(--n-dot-color-modal)"})])),xl(U("slider",[U("slider-dot",{backgroundColor:"var(--n-dot-color-popover)"})]))]);var fO=0,pO=Object.assign(Object.assign({},Ct.props),{to:mn.propTo,defaultValue:{type:[Number,Array],default:0},marks:Object,disabled:{type:Boolean,default:void 0},formatTooltip:Function,min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},range:Boolean,value:[Number,Array],placement:String,showTooltip:{type:Boolean,default:void 0},tooltip:{type:Boolean,default:!0},vertical:Boolean,reverse:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array]}),kf=ue({name:"Slider",props:pO,setup(e){let{mergedClsPrefixRef:t,namespaceRef:o,inlineThemeDisabled:r}=Mt(e),n=Ct("Slider","-slider",Yb,tf,e,t),i=X(null),[a,l]=wf(),[s,c]=wf(),d=X(new Set),u=Co(e),{mergedDisabledRef:p}=u,f=F(()=>{let{step:N}=e;if(N<=0||N==="mark")return 0;let $=N.toString(),V=0;return $.includes(".")&&(V=$.length-$.indexOf(".")-1),V}),m=X(e.defaultValue),y=Re(e,"value"),w=Xt(y,m),g=F(()=>{let{value:N}=w;return(e.range?N:[N]).map(Je)}),O=F(()=>g.value.length>2),j=F(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),S=F(()=>{let{marks:N}=e;return N?Object.keys(N).map(parseFloat):null}),v=X(-1),D=X(-1),x=X(-1),k=X(!1),A=X(!1),E=F(()=>{let{vertical:N,reverse:$}=e;return N?$?"top":"bottom":$?"right":"left"}),z=F(()=>{if(O.value)return;let N=g.value,$=Xe(e.range?Math.min(...N):e.min),V=Xe(e.range?Math.max(...N):N[0]),{value:ae}=E;return e.vertical?{[ae]:`${$}%`,height:`${V-$}%`}:{[ae]:`${$}%`,width:`${V-$}%`}}),M=F(()=>{let N=[],{marks:$}=e;if($){let V=g.value.slice();V.sort((re,P)=>re-P);let{value:ae}=E,{value:pe}=O,{range:_}=e,W=pe?()=>!1:re=>_?re>=V[0]&&re<=V[V.length-1]:re<=V[0];for(let re of Object.keys($)){let P=Number(re);N.push({active:W(P),label:$[re],style:{[ae]:`${Xe(P)}%`}})}}return N});function se(N,$){let V=Xe(N),{value:ae}=E;return{[ae]:`${V}%`,zIndex:$===v.value?1:0}}function ye(N){return e.showTooltip||x.value===N||v.value===N&&k.value}function Ie(N){return!(v.value===N&&D.value===N)}function fe(N){var $;~N&&(v.value=N,($=a.value.get(N))===null||$===void 0||$.focus())}function ce(){s.value.forEach((N,$)=>{ye($)&&N.syncPosition()})}function we(N){let{"onUpdate:value":$,onUpdateValue:V}=e,{nTriggerFormInput:ae,nTriggerFormChange:pe}=u;V&&Se(V,N),$&&Se($,N),m.value=N,ae(),pe()}function Me(N){let{range:$}=e;if($){if(Array.isArray(N)){let{value:V}=g;N.join()!==V.join()&&we(N)}}else Array.isArray(N)||g.value[0]!==N&&we(N)}function Be(N,$){if(e.range){let V=g.value.slice();V.splice($,1,N),Me(V)}else Me(N)}function Le(N,$,V){let ae=V!==void 0;V||(V=N-$>0?1:-1);let pe=S.value||[],{step:_}=e;if(_==="mark"){let P=ze(N,pe.concat($),ae?V:void 0);return P?P.value:$}if(_<=0)return $;let{value:W}=f,re;if(ae){let P=Number(($/_).toFixed(W)),Z=Math.floor(P),le=P>Z?Z:Z-1,Ce=P0)&&(ae===null||W0?1:-1),$)}function ot(N){var $,V;if(p.value||!Cf(N)&&N.button!==fO)return;let ae=We(N);if(ae===void 0)return;let pe=g.value.slice(),_=e.range?(V=($=ze(ae,pe))===null||$===void 0?void 0:$.index)!==null&&V!==void 0?V:-1:0;_!==-1&&(N.preventDefault(),fe(_),rt(),Be(Le(ae,g.value[_]),_))}function rt(){k.value||(k.value=!0,gt("touchend",document,C),gt("mouseup",document,C),gt("touchmove",document,h),gt("mousemove",document,h))}function Dt(){k.value&&(k.value=!1,ht("touchend",document,C),ht("mouseup",document,C),ht("touchmove",document,h),ht("mousemove",document,h))}function h(N){let{value:$}=v;if(!k.value||$===-1){Dt();return}let V=We(N);Be(Le(V,g.value[$]),$)}function C(){Dt()}function L(N){v.value=N,p.value||(x.value=N)}function q(N){v.value===N&&(v.value=-1,Dt()),x.value===N&&(x.value=-1)}function K(N){x.value=N}function ne(N){x.value===N&&(x.value=-1)}Ze(v,(N,$)=>void Bt(()=>D.value=$)),Ze(w,()=>{if(e.marks){if(A.value)return;A.value=!0,Bt(()=>{A.value=!1})}Bt(ce)});let oe=F(()=>{let{self:{railColor:N,railColorHover:$,fillColor:V,fillColorHover:ae,handleColor:pe,opacityDisabled:_,dotColor:W,dotColorModal:re,handleBoxShadow:P,handleBoxShadowHover:Z,handleBoxShadowActive:le,handleBoxShadowFocus:Ce,dotBorder:Ke,dotBoxShadow:He,railHeight:Fe,railWidthVertical:qe,handleSize:Tt,dotHeight:ho,dotWidth:ii,dotBorderRadius:hr,fontSize:gr,dotBorderActive:wn,dotColorPopover:ai},common:{cubicBezierEaseInOut:kn}}=n.value;return{"--n-bezier":kn,"--n-dot-border":Ke,"--n-dot-border-active":wn,"--n-dot-border-radius":hr,"--n-dot-box-shadow":He,"--n-dot-color":W,"--n-dot-color-modal":re,"--n-dot-color-popover":ai,"--n-dot-height":ho,"--n-dot-width":ii,"--n-fill-color":V,"--n-fill-color-hover":ae,"--n-font-size":gr,"--n-handle-box-shadow":P,"--n-handle-box-shadow-active":le,"--n-handle-box-shadow-focus":Ce,"--n-handle-box-shadow-hover":Z,"--n-handle-color":pe,"--n-handle-size":Tt,"--n-opacity-disabled":_,"--n-rail-color":N,"--n-rail-color-hover":$,"--n-rail-height":Fe,"--n-rail-width-vertical":qe}}),H=r?qt("slider",void 0,oe,e):void 0,Q=F(()=>{let{self:{fontSize:N,indicatorColor:$,indicatorBoxShadow:V,indicatorTextColor:ae,indicatorBorderRadius:pe}}=n.value;return{"--n-font-size":N,"--n-indicator-border-radius":pe,"--n-indicator-box-shadow":V,"--n-indicator-color":$,"--n-indicator-text-color":ae}}),Y=r?qt("slider-indicator",void 0,Q,e):void 0;return{mergedClsPrefix:t,namespace:o,uncontrolledValue:m,mergedValue:w,mergedDisabled:p,mergedPlacement:j,isMounted:Mr(),adjustedTo:mn(e),dotTransitionDisabled:A,markInfos:M,isShowTooltip:ye,isSkipCSSDetection:Ie,handleRailRef:i,setHandleRefs:l,setFollowerRefs:c,fillStyle:z,getHandleStyle:se,activeIndex:v,arrifiedValues:g,followerEnabledIndexSet:d,handleRailMouseDown:ot,handleHandleFocus:L,handleHandleBlur:q,handleHandleMouseEnter:K,handleHandleMouseLeave:ne,handleRailKeyDown:vt,indicatorCssVars:r?void 0:Q,indicatorThemeClass:Y?.themeClass,indicatorOnRender:Y?.onRender,cssVars:r?void 0:oe,themeClass:H?.themeClass,onRender:H?.onRender}},render(){var e;let{mergedClsPrefix:t,themeClass:o,formatTooltip:r}=this;return(e=this.onRender)===null||e===void 0||e.call(this),b("div",{class:[`${t}-slider`,o,{[`${t}-slider--disabled`]:this.mergedDisabled,[`${t}-slider--active`]:this.activeIndex!==-1,[`${t}-slider--with-mark`]:this.marks,[`${t}-slider--vertical`]:this.vertical,[`${t}-slider--reverse`]:this.reverse}],style:this.cssVars,onKeydown:this.handleRailKeyDown,onMousedown:this.handleRailMouseDown,onTouchstart:this.handleRailMouseDown},b("div",{class:`${t}-slider-rail`},b("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?b("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(n=>b("div",{key:n.label,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:n.active}],style:n.style}))):null,b("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((n,i)=>{let a=this.isShowTooltip(i);return b(wl,null,{default:()=>[b(kl,null,{default:()=>b("div",{ref:this.setHandleRefs(i),class:`${t}-slider-handle`,tabindex:this.mergedDisabled?-1:0,style:this.getHandleStyle(n,i),onFocus:()=>this.handleHandleFocus(i),onBlur:()=>this.handleHandleBlur(i),onMouseenter:()=>this.handleHandleMouseEnter(i),onMouseleave:()=>this.handleHandleMouseLeave(i)})}),this.tooltip&&b(Dl,{ref:this.setFollowerRefs(i),show:a,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(i),teleportDisabled:this.adjustedTo===mn.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>b(To,{name:"fade-in-scale-up-transition",appear:this.isMounted,css:this.isSkipCSSDetection(i),onEnter:()=>this.followerEnabledIndexSet.add(i),onAfterLeave:()=>this.followerEnabledIndexSet.delete(i)},{default:()=>{var l;return a?((l=this.indicatorOnRender)===null||l===void 0||l.call(this),b("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof r=="function"?r(n):n)):null}})})]})})),this.marks?b("div",{class:`${t}-slider-marks`},this.markInfos.map(n=>b("div",{key:n.label,class:`${t}-slider-mark`,style:n.style},n.label))):null))}});var ms="n-tree-select";var rr="n-tree";var Xb=ue({name:"NTreeSwitcher",props:{clsPrefix:{type:String,required:!0},expanded:Boolean,hide:Boolean,loading:Boolean,onClick:Function},setup(e){let{renderSwitcherIconRef:t}=ke(rr,null);return()=>{let{clsPrefix:o}=e;return b("span",{"data-switcher":!0,class:[`${o}-tree-node-switcher`,{[`${o}-tree-node-switcher--expanded`]:e.expanded,[`${o}-tree-node-switcher--hide`]:e.hide}],onClick:e.onClick},b("div",{class:`${o}-tree-node-switcher__icon`},b(So,null,{default:()=>{if(e.loading)return b(jr,{clsPrefix:o,key:"loading",radius:85,strokeWidth:20});let{value:r}=t;return r?r():b(_o,{clsPrefix:o,key:"switcher"},{default:()=>b(hd,null)})}})))}}});var Zb=ue({name:"NTreeNodeCheckbox",props:{clsPrefix:{type:String,required:!0},focusable:Boolean,disabled:Boolean,checked:Boolean,indeterminate:Boolean,onCheck:Function},setup(e){let t=ke(rr);function o(n){let{onCheck:i}=e;if(i)return i(n)}function r(n){e.indeterminate?o(!1):o(n)}return{handleUpdateValue:r,mergedTheme:t.mergedThemeRef}},render(){let{clsPrefix:e,mergedTheme:t,checked:o,indeterminate:r,disabled:n,focusable:i,handleUpdateValue:a}=this;return b("span",{class:`${e}-tree-node-checkbox`,"data-checkbox":!0},b(eu,{focusable:i,disabled:n,theme:t.peers.Checkbox,themeOverrides:t.peerOverrides.Checkbox,checked:o,indeterminate:r,onUpdateChecked:a}))}});var Qb=ue({name:"TreeNodeContent",props:{clsPrefix:{type:String,required:!0},disabled:Boolean,checked:Boolean,selected:Boolean,onClick:Function,onDragstart:Function,tmNode:{type:Object,required:!0},nodeProps:Object},setup(e){let{renderLabelRef:t,renderPrefixRef:o,renderSuffixRef:r,labelFieldRef:n}=ke(rr),i=X(null);function a(s){let{onClick:c}=e;c&&c(s)}function l(s){a(s)}return{selfRef:i,renderLabel:t,renderPrefix:o,renderSuffix:r,labelField:n,handleClick:l}},render(){let{clsPrefix:e,labelField:t,nodeProps:o,checked:r=!1,selected:n=!1,renderLabel:i,renderPrefix:a,renderSuffix:l,handleClick:s,onDragstart:c,tmNode:{rawNode:d,rawNode:{prefix:u,suffix:p,[t]:f}}}=this;return b("span",Object.assign({},o,{ref:"selfRef",class:[`${e}-tree-node-content`,o?.class],onClick:s,draggable:c===void 0?void 0:!0,onDragstart:c}),a||u?b("div",{class:`${e}-tree-node-content__prefix`},a?a({option:d,selected:n,checked:r}):zn(u)):null,b("div",{class:`${e}-tree-node-content__text`},i?i({option:d,selected:n,checked:r}):zn(f)),l||p?b("div",{class:`${e}-tree-node-content__suffix`},l?l({option:d,selected:n,checked:r}):zn(p)):null)}});function Sf({position:e,offsetLevel:t,indent:o,el:r}){let n={position:"absolute",boxSizing:"border-box",right:0};if(e==="inside")n.left=0,n.top=0,n.bottom=0,n.borderRadius="inherit",n.boxShadow="inset 0 0 0 2px var(--n-drop-mark-color)";else{let i=e==="before"?"top":"bottom";n[i]=0,n.left=`${r.offsetLeft+6-t*o}px`,n.height="2px",n.backgroundColor="var(--n-drop-mark-color)",n.transformOrigin=i,n.borderRadius="1px",n.transform=e==="before"?"translateY(-4px)":"translateY(4px)"}return b("div",{style:n})}function Jb({dropPosition:e,node:t}){return t.isLeaf===!1||t.children?!0:e!=="inside"}var mO=ue({name:"TreeNode",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){let t=ke(rr),{droppingNodeParentRef:o,droppingMouseNodeRef:r,draggingNodeRef:n,droppingPositionRef:i,droppingOffsetLevelRef:a,nodePropsRef:l,indentRef:s,blockLineRef:c}=t,d=F(()=>t.disabledRef.value||e.tmNode.disabled),u=F(()=>{let{value:E}=l;if(E)return E({option:e.tmNode.rawNode})}),p=X(null),f={value:null};tt(()=>{f.value=p.value.$el});function m(){let{tmNode:E}=e;if(!E.isLeaf&&!E.shallowLoaded){t.loadingKeysRef.value.has(E.key)||t.loadingKeysRef.value.add(E.key);let{onLoadRef:{value:z}}=t;z&&z(E.rawNode).then(()=>{t.handleSwitcherClick(E)}).finally(()=>{t.loadingKeysRef.value.delete(E.key)})}else t.handleSwitcherClick(E)}let y=Qe(()=>!e.tmNode.disabled&&t.selectableRef.value&&(t.internalTreeSelect?t.mergedCheckStrategyRef.value!=="child"||t.multipleRef.value&&t.cascadeRef.value||e.tmNode.isLeaf:!0));function w(E){y.value&&(ll(E,"checkbox")||ll(E,"switcher")||t.handleSelect(e.tmNode))}function g(E){var z,M;c.value||(d.value||w(E),(M=(z=u.value)===null||z===void 0?void 0:z.onClick)===null||M===void 0||M.call(z,E))}function O(E){var z,M;c.value&&(d.value||w(E),(M=(z=u.value)===null||z===void 0?void 0:z.onClick)===null||M===void 0||M.call(z,E))}function j(E){t.handleCheck(e.tmNode,E)}function S(E){t.handleDragStart({event:E,node:e.tmNode})}function v(E){E.currentTarget===E.target&&t.handleDragEnter({event:E,node:e.tmNode})}function D(E){E.preventDefault(),t.handleDragOver({event:E,node:e.tmNode})}function x(E){t.handleDragEnd({event:E,node:e.tmNode})}function k(E){E.currentTarget===E.target&&t.handleDragLeave({event:E,node:e.tmNode})}function A(E){E.preventDefault(),i.value!==null&&t.handleDrop({event:E,node:e.tmNode,dropPosition:i.value})}return{showDropMark:Qe(()=>{let{value:E}=n;if(!E)return;let{value:z}=i;if(!z)return;let{value:M}=r;if(!M)return;let{tmNode:se}=e;return se.key===M.key}),showDropMarkAsParent:Qe(()=>{let{value:E}=o;if(!E)return!1;let{tmNode:z}=e,{value:M}=i;return M==="before"||M==="after"?E.key===z.key:!1}),pending:Qe(()=>t.pendingNodeKeyRef.value===e.tmNode.key),loading:Qe(()=>t.loadingKeysRef.value.has(e.tmNode.key)),highlight:Qe(()=>{var E;return(E=t.highlightKeySetRef.value)===null||E===void 0?void 0:E.has(e.tmNode.key)}),checked:Qe(()=>t.displayedCheckedKeysRef.value.includes(e.tmNode.key)),indeterminate:Qe(()=>t.displayedIndeterminateKeysRef.value.includes(e.tmNode.key)),selected:Qe(()=>t.mergedSelectedKeysRef.value.includes(e.tmNode.key)),expanded:Qe(()=>t.mergedExpandedKeysRef.value.includes(e.tmNode.key)),disabled:d,checkable:F(()=>t.checkableRef.value&&(t.cascadeRef.value||t.mergedCheckStrategyRef.value!=="child"||e.tmNode.isLeaf)),checkboxDisabled:F(()=>!!e.tmNode.rawNode.checkboxDisabled),selectable:y,internalScrollable:t.internalScrollableRef,draggable:t.draggableRef,blockLine:c,nodeProps:u,checkboxFocusable:t.internalCheckboxFocusableRef,droppingPosition:i,droppingOffsetLevel:a,indent:s,contentInstRef:p,contentElRef:f,handleCheck:j,handleDrop:A,handleDragStart:S,handleDragEnter:v,handleDragOver:D,handleDragEnd:x,handleDragLeave:k,handleLineClick:O,handleContentClick:g,handleSwitcherClick:m}},render(){let{tmNode:e,clsPrefix:t,checkable:o,selectable:r,selected:n,checked:i,highlight:a,draggable:l,blockLine:s,indent:c,disabled:d,pending:u,internalScrollable:p,nodeProps:f}=this,m=l&&!d?{onDragenter:this.handleDragEnter,onDragleave:this.handleDragLeave,onDragend:this.handleDragEnd,onDrop:this.handleDrop,onDragover:this.handleDragOver}:void 0,y=p?Bn(e.key):void 0;return b("div",Object.assign({class:`${t}-tree-node-wrapper`},m),b("div",Object.assign({},s?f:void 0,{class:[`${t}-tree-node`,{[`${t}-tree-node--selected`]:n,[`${t}-tree-node--checkable`]:o,[`${t}-tree-node--highlight`]:a,[`${t}-tree-node--pending`]:u,[`${t}-tree-node--disabled`]:d,[`${t}-tree-node--selectable`]:r},f?.class],"data-key":y,draggable:l&&s,onClick:this.handleLineClick,onDragstart:l&&s&&!d?this.handleDragStart:void 0}),Ac(e.level,b("div",{class:`${t}-tree-node-indent`,style:{flex:`0 0 ${c}px`}})),b(Xb,{clsPrefix:t,expanded:this.expanded,loading:this.loading,hide:e.isLeaf,onClick:this.handleSwitcherClick}),o?b(Zb,{focusable:this.checkboxFocusable,disabled:d||this.checkboxDisabled,clsPrefix:t,checked:this.checked,indeterminate:this.indeterminate,onCheck:this.handleCheck}):null,b(Qb,{ref:"contentInstRef",clsPrefix:t,checked:i,selected:n,onClick:this.handleContentClick,nodeProps:s?void 0:f,onDragstart:l&&!s&&!d?this.handleDragStart:void 0,tmNode:e}),l?this.showDropMark?Sf({el:this.contentElRef.value,position:this.droppingPosition,offsetLevel:this.droppingOffsetLevel,indent:c}):this.showDropMarkAsParent?Sf({el:this.contentElRef.value,position:"inside",offsetLevel:this.droppingOffsetLevel,indent:c}):null:null))}}),hs=mO;function e0(e,t,o,r){e?.forEach(n=>{o(n),e0(n[t],t,o,r),r(n)})}function t0(e,t,o,r,n){let i=new Set,a=new Set,l=[];return e0(e,r,s=>{if(l.push(s),n(t,s)){a.add(s[o]);for(let c=l.length-2;c>=0;--c)if(!i.has(l[c][o]))i.add(l[c][o]);else return}},()=>{l.pop()}),{expandedKeys:Array.from(i),highlightKeySet:a}}var _f=null;if(typeof window<"u"&&Image){let e=new Image;e.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}function o0(e,t,o,r,n){let i=new Set,a=new Set,l=new Set,s=[],c=[],d=[];function u(f){f.forEach(m=>{if(d.push(m),t(o,m)){i.add(m[r]),l.add(m[r]);for(let w=d.length-2;w>=0;--w){let g=d[w][r];if(!a.has(g))a.add(g),i.has(g)&&i.delete(g);else break}}let y=m[n];y&&u(y),d.pop()})}u(e);function p(f,m){f.forEach(y=>{let w=y[r],g=i.has(w),O=a.has(w);if(!g&&!O)return;let j=y[n];if(j)if(g)m.push(y);else{s.push(w);let S=Object.assign(Object.assign({},y),{[n]:[]});m.push(S),p(j,S[n])}else m.push(y)})}return p(e,c),{filteredTree:c,highlightKeySet:l,expandedKeys:s}}function r0({fNodesRef:e,mergedExpandedKeysRef:t,mergedSelectedKeysRef:o,handleSelect:r,handleSwitcherClick:n}){let{value:i}=o,a=ke(ms,null),l=a?a.pendingNodeKeyRef:X(i.length?i[i.length-1]:null);function s(d){let{value:u}=l;if(u===null){if(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(d.code)&&u===null){let{value:p}=e,f=0;for(;fm.key===u);if(!~f)return;if(d.code==="Enter"||d.code==="NumpadEnter")r(p[f]);else if(d.code==="ArrowDown")for(f+=1;f=0;){if(!p[f].disabled){l.value=p[f].key;break}f-=1}else if(d.code==="ArrowLeft"){let m=p[f];if(m.isLeaf||!t.value.includes(u)){let y=m.getParent();y&&(l.value=y.key)}else n(m)}else if(d.code==="ArrowRight"){let m=p[f];if(m.isLeaf)return;if(!t.value.includes(u))n(m);else for(f+=1;fb("div",{class:[`${e}-tree-motion-wrapper`,`${e}-tree-motion-wrapper--${this.mode}`],style:{height:Ir(this.height)}},this.nodes.map(t=>b(hs,{clsPrefix:e,tmNode:t})))})}});var i0=U("tree",` + `),Td()]),xl(U("slider",[U("slider-dot",{backgroundColor:"var(--n-dot-color-modal)"})])),vl(U("slider",[U("slider-dot",{backgroundColor:"var(--n-dot-color-popover)"})]))]);var uO=0,fO=Object.assign(Object.assign({},wt.props),{to:mn.propTo,defaultValue:{type:[Number,Array],default:0},marks:Object,disabled:{type:Boolean,default:void 0},formatTooltip:Function,min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},range:Boolean,value:[Number,Array],placement:String,showTooltip:{type:Boolean,default:void 0},tooltip:{type:Boolean,default:!0},vertical:Boolean,reverse:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array]}),kf=de({name:"Slider",props:fO,setup(e){let{mergedClsPrefixRef:t,namespaceRef:o,inlineThemeDisabled:r}=At(e),n=wt("Slider","-slider",Yb,tf,e,t),i=Z(null),[a,l]=wf(),[s,c]=wf(),d=Z(new Set),u=Co(e),{mergedDisabledRef:p}=u,f=j(()=>{let{step:P}=e;if(P<=0||P==="mark")return 0;let $=P.toString(),V=0;return $.includes(".")&&(V=$.length-$.indexOf(".")-1),V}),m=Z(e.defaultValue),y=Ae(e,"value"),_=Zt(y,m),h=j(()=>{let{value:P}=_;return(e.range?P:[P]).map(Ye)}),O=j(()=>h.value.length>2),W=j(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),w=j(()=>{let{marks:P}=e;return P?Object.keys(P).map(parseFloat):null}),b=Z(-1),D=Z(-1),x=Z(-1),k=Z(!1),A=Z(!1),E=j(()=>{let{vertical:P,reverse:$}=e;return P?$?"top":"bottom":$?"right":"left"}),H=j(()=>{if(O.value)return;let P=h.value,$=Xe(e.range?Math.min(...P):e.min),V=Xe(e.range?Math.max(...P):P[0]),{value:ie}=E;return e.vertical?{[ie]:`${$}%`,height:`${V-$}%`}:{[ie]:`${$}%`,width:`${V-$}%`}}),M=j(()=>{let P=[],{marks:$}=e;if($){let V=h.value.slice();V.sort((K,T)=>K-T);let{value:ie}=E,{value:ue}=O,{range:Se}=e,S=ue?()=>!1:K=>Se?K>=V[0]&&K<=V[V.length-1]:K<=V[0];for(let K of Object.keys($)){let T=Number(K);P.push({active:S(T),label:$[K],style:{[ie]:`${Xe(T)}%`}})}}return P});function le(P,$){let V=Xe(P),{value:ie}=E;return{[ie]:`${V}%`,zIndex:$===b.value?1:0}}function ye(P){return e.showTooltip||x.value===P||b.value===P&&k.value}function Pe(P){return!(b.value===P&&D.value===P)}function fe(P){var $;~P&&(b.value=P,($=a.value.get(P))===null||$===void 0||$.focus())}function ce(){s.value.forEach((P,$)=>{ye($)&&P.syncPosition()})}function Ce(P){let{"onUpdate:value":$,onUpdateValue:V}=e,{nTriggerFormInput:ie,nTriggerFormChange:ue}=u;V&&ke(V,P),$&&ke($,P),m.value=P,ie(),ue()}function Ke(P){let{range:$}=e;if($){if(Array.isArray(P)){let{value:V}=h;P.join()!==V.join()&&Ce(P)}}else Array.isArray(P)||h.value[0]!==P&&Ce(P)}function He(P,$){if(e.range){let V=h.value.slice();V.splice($,1,P),Ke(V)}else Ke(P)}function Me(P,$,V){let ie=V!==void 0;V||(V=P-$>0?1:-1);let ue=w.value||[],{step:Se}=e;if(Se==="mark"){let T=Le(P,ue.concat($),ie?V:void 0);return T?T.value:$}if(Se<=0)return $;let{value:S}=f,K;if(ie){let T=Number(($/Se).toFixed(S)),L=Math.floor(T),ae=T>L?L:L-1,he=T0)&&(ie===null||S0?1:-1),$)}function lt(P){var $,V;if(p.value||!Cf(P)&&P.button!==uO)return;let ie=We(P);if(ie===void 0)return;let ue=h.value.slice(),Se=e.range?(V=($=Le(ie,ue))===null||$===void 0?void 0:$.index)!==null&&V!==void 0?V:-1:0;Se!==-1&&(P.preventDefault(),fe(Se),bt(),He(Me(ie,h.value[Se]),Se))}function bt(){k.value||(k.value=!0,xt("touchend",document,C),xt("mouseup",document,C),xt("touchmove",document,g),xt("mousemove",document,g))}function mt(){k.value&&(k.value=!1,ht("touchend",document,C),ht("mouseup",document,C),ht("touchmove",document,g),ht("mousemove",document,g))}function g(P){let{value:$}=b;if(!k.value||$===-1){mt();return}let V=We(P);He(Me(V,h.value[$]),$)}function C(){mt()}function z(P){b.value=P,p.value||(x.value=P)}function q(P){b.value===P&&(b.value=-1,mt()),x.value===P&&(x.value=-1)}function G(P){x.value=P}function re(P){x.value===P&&(x.value=-1)}Qe(b,(P,$)=>void Bt(()=>D.value=$)),Qe(_,()=>{if(e.marks){if(A.value)return;A.value=!0,Bt(()=>{A.value=!1})}Bt(ce)});let oe=j(()=>{let{self:{railColor:P,railColorHover:$,fillColor:V,fillColorHover:ie,handleColor:ue,opacityDisabled:Se,dotColor:S,dotColorModal:K,handleBoxShadow:T,handleBoxShadowHover:L,handleBoxShadowActive:ae,handleBoxShadowFocus:he,dotBorder:Ne,dotBoxShadow:Be,railHeight:Ge,railWidthVertical:Ve,handleSize:$t,dotHeight:Ft,dotWidth:ii,dotBorderRadius:hr,fontSize:gr,dotBorderActive:wn,dotColorPopover:ai},common:{cubicBezierEaseInOut:kn}}=n.value;return{"--n-bezier":kn,"--n-dot-border":Ne,"--n-dot-border-active":wn,"--n-dot-border-radius":hr,"--n-dot-box-shadow":Be,"--n-dot-color":S,"--n-dot-color-modal":K,"--n-dot-color-popover":ai,"--n-dot-height":Ft,"--n-dot-width":ii,"--n-fill-color":V,"--n-fill-color-hover":ie,"--n-font-size":gr,"--n-handle-box-shadow":T,"--n-handle-box-shadow-active":ae,"--n-handle-box-shadow-focus":he,"--n-handle-box-shadow-hover":L,"--n-handle-color":ue,"--n-handle-size":$t,"--n-opacity-disabled":Se,"--n-rail-color":P,"--n-rail-color-hover":$,"--n-rail-height":Ge,"--n-rail-width-vertical":Ve}}),F=r?Gt("slider",void 0,oe,e):void 0,Q=j(()=>{let{self:{fontSize:P,indicatorColor:$,indicatorBoxShadow:V,indicatorTextColor:ie,indicatorBorderRadius:ue}}=n.value;return{"--n-font-size":P,"--n-indicator-border-radius":ue,"--n-indicator-box-shadow":V,"--n-indicator-color":$,"--n-indicator-text-color":ie}}),X=r?Gt("slider-indicator",void 0,Q,e):void 0;return{mergedClsPrefix:t,namespace:o,uncontrolledValue:m,mergedValue:_,mergedDisabled:p,mergedPlacement:W,isMounted:Mr(),adjustedTo:mn(e),dotTransitionDisabled:A,markInfos:M,isShowTooltip:ye,isSkipCSSDetection:Pe,handleRailRef:i,setHandleRefs:l,setFollowerRefs:c,fillStyle:H,getHandleStyle:le,activeIndex:b,arrifiedValues:h,followerEnabledIndexSet:d,handleRailMouseDown:lt,handleHandleFocus:z,handleHandleBlur:q,handleHandleMouseEnter:G,handleHandleMouseLeave:re,handleRailKeyDown:gt,indicatorCssVars:r?void 0:Q,indicatorThemeClass:X?.themeClass,indicatorOnRender:X?.onRender,cssVars:r?void 0:oe,themeClass:F?.themeClass,onRender:F?.onRender}},render(){var e;let{mergedClsPrefix:t,themeClass:o,formatTooltip:r}=this;return(e=this.onRender)===null||e===void 0||e.call(this),v("div",{class:[`${t}-slider`,o,{[`${t}-slider--disabled`]:this.mergedDisabled,[`${t}-slider--active`]:this.activeIndex!==-1,[`${t}-slider--with-mark`]:this.marks,[`${t}-slider--vertical`]:this.vertical,[`${t}-slider--reverse`]:this.reverse}],style:this.cssVars,onKeydown:this.handleRailKeyDown,onMousedown:this.handleRailMouseDown,onTouchstart:this.handleRailMouseDown},v("div",{class:`${t}-slider-rail`},v("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?v("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(n=>v("div",{key:n.label,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:n.active}],style:n.style}))):null,v("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((n,i)=>{let a=this.isShowTooltip(i);return v(kl,null,{default:()=>[v(Sl,null,{default:()=>v("div",{ref:this.setHandleRefs(i),class:`${t}-slider-handle`,tabindex:this.mergedDisabled?-1:0,style:this.getHandleStyle(n,i),onFocus:()=>this.handleHandleFocus(i),onBlur:()=>this.handleHandleBlur(i),onMouseenter:()=>this.handleHandleMouseEnter(i),onMouseleave:()=>this.handleHandleMouseLeave(i)})}),this.tooltip&&v(Tl,{ref:this.setFollowerRefs(i),show:a,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(i),teleportDisabled:this.adjustedTo===mn.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>v(To,{name:"fade-in-scale-up-transition",appear:this.isMounted,css:this.isSkipCSSDetection(i),onEnter:()=>this.followerEnabledIndexSet.add(i),onAfterLeave:()=>this.followerEnabledIndexSet.delete(i)},{default:()=>{var l;return a?((l=this.indicatorOnRender)===null||l===void 0||l.call(this),v("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof r=="function"?r(n):n)):null}})})]})})),this.marks?v("div",{class:`${t}-slider-marks`},this.markInfos.map(n=>v("div",{key:n.label,class:`${t}-slider-mark`,style:n.style},n.label))):null))}});var hs="n-tree-select";var rr="n-tree";var Xb=de({name:"NTreeSwitcher",props:{clsPrefix:{type:String,required:!0},expanded:Boolean,hide:Boolean,loading:Boolean,onClick:Function},setup(e){let{renderSwitcherIconRef:t}=we(rr,null);return()=>{let{clsPrefix:o}=e;return v("span",{"data-switcher":!0,class:[`${o}-tree-node-switcher`,{[`${o}-tree-node-switcher--expanded`]:e.expanded,[`${o}-tree-node-switcher--hide`]:e.hide}],onClick:e.onClick},v("div",{class:`${o}-tree-node-switcher__icon`},v(So,null,{default:()=>{if(e.loading)return v(jr,{clsPrefix:o,key:"loading",radius:85,strokeWidth:20});let{value:r}=t;return r?r():v(_o,{clsPrefix:o,key:"switcher"},{default:()=>v(hd,null)})}})))}}});var Zb=de({name:"NTreeNodeCheckbox",props:{clsPrefix:{type:String,required:!0},focusable:Boolean,disabled:Boolean,checked:Boolean,indeterminate:Boolean,onCheck:Function},setup(e){let t=we(rr);function o(n){let{onCheck:i}=e;if(i)return i(n)}function r(n){e.indeterminate?o(!1):o(n)}return{handleUpdateValue:r,mergedTheme:t.mergedThemeRef}},render(){let{clsPrefix:e,mergedTheme:t,checked:o,indeterminate:r,disabled:n,focusable:i,handleUpdateValue:a}=this;return v("span",{class:`${e}-tree-node-checkbox`,"data-checkbox":!0},v(eu,{focusable:i,disabled:n,theme:t.peers.Checkbox,themeOverrides:t.peerOverrides.Checkbox,checked:o,indeterminate:r,onUpdateChecked:a}))}});var Qb=de({name:"TreeNodeContent",props:{clsPrefix:{type:String,required:!0},disabled:Boolean,checked:Boolean,selected:Boolean,onClick:Function,onDragstart:Function,tmNode:{type:Object,required:!0},nodeProps:Object},setup(e){let{renderLabelRef:t,renderPrefixRef:o,renderSuffixRef:r,labelFieldRef:n}=we(rr),i=Z(null);function a(s){let{onClick:c}=e;c&&c(s)}function l(s){a(s)}return{selfRef:i,renderLabel:t,renderPrefix:o,renderSuffix:r,labelField:n,handleClick:l}},render(){let{clsPrefix:e,labelField:t,nodeProps:o,checked:r=!1,selected:n=!1,renderLabel:i,renderPrefix:a,renderSuffix:l,handleClick:s,onDragstart:c,tmNode:{rawNode:d,rawNode:{prefix:u,suffix:p,[t]:f}}}=this;return v("span",Object.assign({},o,{ref:"selfRef",class:[`${e}-tree-node-content`,o?.class],onClick:s,draggable:c===void 0?void 0:!0,onDragstart:c}),a||u?v("div",{class:`${e}-tree-node-content__prefix`},a?a({option:d,selected:n,checked:r}):zn(u)):null,v("div",{class:`${e}-tree-node-content__text`},i?i({option:d,selected:n,checked:r}):zn(f)),l||p?v("div",{class:`${e}-tree-node-content__suffix`},l?l({option:d,selected:n,checked:r}):zn(p)):null)}});function Sf({position:e,offsetLevel:t,indent:o,el:r}){let n={position:"absolute",boxSizing:"border-box",right:0};if(e==="inside")n.left=0,n.top=0,n.bottom=0,n.borderRadius="inherit",n.boxShadow="inset 0 0 0 2px var(--n-drop-mark-color)";else{let i=e==="before"?"top":"bottom";n[i]=0,n.left=`${r.offsetLeft+6-t*o}px`,n.height="2px",n.backgroundColor="var(--n-drop-mark-color)",n.transformOrigin=i,n.borderRadius="1px",n.transform=e==="before"?"translateY(-4px)":"translateY(4px)"}return v("div",{style:n})}function Jb({dropPosition:e,node:t}){return t.isLeaf===!1||t.children?!0:e!=="inside"}var pO=de({name:"TreeNode",props:{clsPrefix:{type:String,required:!0},tmNode:{type:Object,required:!0}},setup(e){let t=we(rr),{droppingNodeParentRef:o,droppingMouseNodeRef:r,draggingNodeRef:n,droppingPositionRef:i,droppingOffsetLevelRef:a,nodePropsRef:l,indentRef:s,blockLineRef:c}=t,d=j(()=>t.disabledRef.value||e.tmNode.disabled),u=j(()=>{let{value:E}=l;if(E)return E({option:e.tmNode.rawNode})}),p=Z(null),f={value:null};Je(()=>{f.value=p.value.$el});function m(){let{tmNode:E}=e;if(!E.isLeaf&&!E.shallowLoaded){t.loadingKeysRef.value.has(E.key)||t.loadingKeysRef.value.add(E.key);let{onLoadRef:{value:H}}=t;H&&H(E.rawNode).then(()=>{t.handleSwitcherClick(E)}).finally(()=>{t.loadingKeysRef.value.delete(E.key)})}else t.handleSwitcherClick(E)}let y=et(()=>!e.tmNode.disabled&&t.selectableRef.value&&(t.internalTreeSelect?t.mergedCheckStrategyRef.value!=="child"||t.multipleRef.value&&t.cascadeRef.value||e.tmNode.isLeaf:!0));function _(E){y.value&&(sl(E,"checkbox")||sl(E,"switcher")||t.handleSelect(e.tmNode))}function h(E){var H,M;c.value||(d.value||_(E),(M=(H=u.value)===null||H===void 0?void 0:H.onClick)===null||M===void 0||M.call(H,E))}function O(E){var H,M;c.value&&(d.value||_(E),(M=(H=u.value)===null||H===void 0?void 0:H.onClick)===null||M===void 0||M.call(H,E))}function W(E){t.handleCheck(e.tmNode,E)}function w(E){t.handleDragStart({event:E,node:e.tmNode})}function b(E){E.currentTarget===E.target&&t.handleDragEnter({event:E,node:e.tmNode})}function D(E){E.preventDefault(),t.handleDragOver({event:E,node:e.tmNode})}function x(E){t.handleDragEnd({event:E,node:e.tmNode})}function k(E){E.currentTarget===E.target&&t.handleDragLeave({event:E,node:e.tmNode})}function A(E){E.preventDefault(),i.value!==null&&t.handleDrop({event:E,node:e.tmNode,dropPosition:i.value})}return{showDropMark:et(()=>{let{value:E}=n;if(!E)return;let{value:H}=i;if(!H)return;let{value:M}=r;if(!M)return;let{tmNode:le}=e;return le.key===M.key}),showDropMarkAsParent:et(()=>{let{value:E}=o;if(!E)return!1;let{tmNode:H}=e,{value:M}=i;return M==="before"||M==="after"?E.key===H.key:!1}),pending:et(()=>t.pendingNodeKeyRef.value===e.tmNode.key),loading:et(()=>t.loadingKeysRef.value.has(e.tmNode.key)),highlight:et(()=>{var E;return(E=t.highlightKeySetRef.value)===null||E===void 0?void 0:E.has(e.tmNode.key)}),checked:et(()=>t.displayedCheckedKeysRef.value.includes(e.tmNode.key)),indeterminate:et(()=>t.displayedIndeterminateKeysRef.value.includes(e.tmNode.key)),selected:et(()=>t.mergedSelectedKeysRef.value.includes(e.tmNode.key)),expanded:et(()=>t.mergedExpandedKeysRef.value.includes(e.tmNode.key)),disabled:d,checkable:j(()=>t.checkableRef.value&&(t.cascadeRef.value||t.mergedCheckStrategyRef.value!=="child"||e.tmNode.isLeaf)),checkboxDisabled:j(()=>!!e.tmNode.rawNode.checkboxDisabled),selectable:y,internalScrollable:t.internalScrollableRef,draggable:t.draggableRef,blockLine:c,nodeProps:u,checkboxFocusable:t.internalCheckboxFocusableRef,droppingPosition:i,droppingOffsetLevel:a,indent:s,contentInstRef:p,contentElRef:f,handleCheck:W,handleDrop:A,handleDragStart:w,handleDragEnter:b,handleDragOver:D,handleDragEnd:x,handleDragLeave:k,handleLineClick:O,handleContentClick:h,handleSwitcherClick:m}},render(){let{tmNode:e,clsPrefix:t,checkable:o,selectable:r,selected:n,checked:i,highlight:a,draggable:l,blockLine:s,indent:c,disabled:d,pending:u,internalScrollable:p,nodeProps:f}=this,m=l&&!d?{onDragenter:this.handleDragEnter,onDragleave:this.handleDragLeave,onDragend:this.handleDragEnd,onDrop:this.handleDrop,onDragover:this.handleDragOver}:void 0,y=p?Bn(e.key):void 0;return v("div",Object.assign({class:`${t}-tree-node-wrapper`},m),v("div",Object.assign({},s?f:void 0,{class:[`${t}-tree-node`,{[`${t}-tree-node--selected`]:n,[`${t}-tree-node--checkable`]:o,[`${t}-tree-node--highlight`]:a,[`${t}-tree-node--pending`]:u,[`${t}-tree-node--disabled`]:d,[`${t}-tree-node--selectable`]:r},f?.class],"data-key":y,draggable:l&&s,onClick:this.handleLineClick,onDragstart:l&&s&&!d?this.handleDragStart:void 0}),Ac(e.level,v("div",{class:`${t}-tree-node-indent`,style:{flex:`0 0 ${c}px`}})),v(Xb,{clsPrefix:t,expanded:this.expanded,loading:this.loading,hide:e.isLeaf,onClick:this.handleSwitcherClick}),o?v(Zb,{focusable:this.checkboxFocusable,disabled:d||this.checkboxDisabled,clsPrefix:t,checked:this.checked,indeterminate:this.indeterminate,onCheck:this.handleCheck}):null,v(Qb,{ref:"contentInstRef",clsPrefix:t,checked:i,selected:n,onClick:this.handleContentClick,nodeProps:s?void 0:f,onDragstart:l&&!s&&!d?this.handleDragStart:void 0,tmNode:e}),l?this.showDropMark?Sf({el:this.contentElRef.value,position:this.droppingPosition,offsetLevel:this.droppingOffsetLevel,indent:c}):this.showDropMarkAsParent?Sf({el:this.contentElRef.value,position:"inside",offsetLevel:this.droppingOffsetLevel,indent:c}):null:null))}}),gs=pO;function ey(e,t,o,r){e?.forEach(n=>{o(n),ey(n[t],t,o,r),r(n)})}function ty(e,t,o,r,n){let i=new Set,a=new Set,l=[];return ey(e,r,s=>{if(l.push(s),n(t,s)){a.add(s[o]);for(let c=l.length-2;c>=0;--c)if(!i.has(l[c][o]))i.add(l[c][o]);else return}},()=>{l.pop()}),{expandedKeys:Array.from(i),highlightKeySet:a}}var _f=null;if(typeof window<"u"&&Image){let e=new Image;e.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}function oy(e,t,o,r,n){let i=new Set,a=new Set,l=new Set,s=[],c=[],d=[];function u(f){f.forEach(m=>{if(d.push(m),t(o,m)){i.add(m[r]),l.add(m[r]);for(let _=d.length-2;_>=0;--_){let h=d[_][r];if(!a.has(h))a.add(h),i.has(h)&&i.delete(h);else break}}let y=m[n];y&&u(y),d.pop()})}u(e);function p(f,m){f.forEach(y=>{let _=y[r],h=i.has(_),O=a.has(_);if(!h&&!O)return;let W=y[n];if(W)if(h)m.push(y);else{s.push(_);let w=Object.assign(Object.assign({},y),{[n]:[]});m.push(w),p(W,w[n])}else m.push(y)})}return p(e,c),{filteredTree:c,highlightKeySet:l,expandedKeys:s}}function ry({fNodesRef:e,mergedExpandedKeysRef:t,mergedSelectedKeysRef:o,handleSelect:r,handleSwitcherClick:n}){let{value:i}=o,a=we(hs,null),l=a?a.pendingNodeKeyRef:Z(i.length?i[i.length-1]:null);function s(d){let{value:u}=l;if(u===null){if(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(d.code)&&u===null){let{value:p}=e,f=0;for(;fm.key===u);if(!~f)return;if(d.code==="Enter"||d.code==="NumpadEnter")r(p[f]);else if(d.code==="ArrowDown")for(f+=1;f=0;){if(!p[f].disabled){l.value=p[f].key;break}f-=1}else if(d.code==="ArrowLeft"){let m=p[f];if(m.isLeaf||!t.value.includes(u)){let y=m.getParent();y&&(l.value=y.key)}else n(m)}else if(d.code==="ArrowRight"){let m=p[f];if(m.isLeaf)return;if(!t.value.includes(u))n(m);else for(f+=1;fv("div",{class:[`${e}-tree-motion-wrapper`,`${e}-tree-motion-wrapper--${this.mode}`],style:{height:Ir(this.height)}},this.nodes.map(t=>v(gs,{clsPrefix:e,tmNode:t})))})}});var iy=U("tree",` font-size: var(--n-font-size); outline: none; `,[J("ul, li",` @@ -858,7 +858,7 @@ ${t} list-style: none; `),J(">",[U("tree-node",[J("&:first-child",{marginTop:0})])]),U("tree-node-indent",` height: 0; - `),U("tree-motion-wrapper",[be("expand",[Nd({duration:"0.2s"})]),be("collapse",[Nd({duration:"0.2s",reverse:!0})])]),U("tree-node-wrapper",` + `),U("tree-motion-wrapper",[be("expand",[Pd({duration:"0.2s"})]),be("collapse",[Pd({duration:"0.2s",reverse:!0})])]),U("tree-node-wrapper",` box-sizing: border-box; padding: 3px 0; `),U("tree-node",` @@ -869,13 +869,13 @@ ${t} `,[be("highlight",[U("tree-node-content",[ee("text",{borderBottomColor:"var(--n-node-text-color-disabled)"})])]),be("disabled",[U("tree-node-content",` color: var(--n-node-text-color-disabled); cursor: not-allowed; - `)]),oo("disabled",[be("selectable",[U("tree-node-content",` + `)]),ro("disabled",[be("selectable",[U("tree-node-content",` cursor: pointer; `)])])]),be("block-node",[U("tree-node-content",` width: 100%; - `)]),oo("block-line",[U("tree-node",[oo("disabled",[U("tree-node-content",[J("&:hover",{backgroundColor:"var(--n-node-color-hover)"})]),be("selectable",[U("tree-node-content",[J("&:active",{backgroundColor:"var(--n-node-color-pressed)"})])]),be("pending",[U("tree-node-content",` + `)]),ro("block-line",[U("tree-node",[ro("disabled",[U("tree-node-content",[J("&:hover",{backgroundColor:"var(--n-node-color-hover)"})]),be("selectable",[U("tree-node-content",[J("&:active",{backgroundColor:"var(--n-node-color-pressed)"})])]),be("pending",[U("tree-node-content",` background-color: var(--n-node-color-hover); - `)]),be("selected",[U("tree-node-content",{backgroundColor:"var(--n-node-color-active)"})])])])]),be("block-line",[U("tree-node",[oo("disabled",[J("&:hover",{backgroundColor:"var(--n-node-color-hover)"}),be("selectable",[J("&:active",{backgroundColor:"var(--n-node-color-pressed)"})]),be("pending",` + `)]),be("selected",[U("tree-node-content",{backgroundColor:"var(--n-node-color-active)"})])])])]),be("block-line",[U("tree-node",[ro("disabled",[J("&:hover",{backgroundColor:"var(--n-node-color-hover)"}),be("selectable",[J("&:active",{backgroundColor:"var(--n-node-color-pressed)"})]),be("pending",` background-color: var(--n-node-color-hover); `),be("selected",{backgroundColor:"var(--n-node-color-active)"})]),be("disabled",` cursor: not-allowed; @@ -897,14 +897,14 @@ ${t} color: var(--n-arrow-color); transition: color .3s var(--n-bezier); font-size: 14px; - `,[U("icon",[co()]),U("base-loading",` + `,[U("icon",[fo()]),U("base-loading",` color: var(--n-loading-color); position: absolute; left: 0; top: 0; right: 0; bottom: 0; - `,[co()]),U("base-icon",[co()])]),be("hide",{visibility:"hidden"}),be("expanded",{transform:"rotate(90deg)"})]),U("tree-node-checkbox",` + `,[fo()]),U("base-icon",[fo()])]),be("hide",{visibility:"hidden"}),be("expanded",{transform:"rotate(90deg)"})]),U("tree-node-checkbox",` display: inline-flex; height: 24px; width: 16px; @@ -942,32 +942,32 @@ ${t} flex-grow:1; `),ee("suffix",` display: inline-flex; - `)]),ee("empty","margin: auto;")]);var hO=function(e,t,o,r){function n(i){return i instanceof o?i:new o(function(a){a(i)})}return new(o||(o=Promise))(function(i,a){function l(d){try{c(r.next(d))}catch(u){a(u)}}function s(d){try{c(r.throw(d))}catch(u){a(u)}}function c(d){d.done?i(d.value):n(d.value).then(l,s)}c((r=r.apply(e,t||[])).next())})},gs=30;function gO(e,t){return{getKey(o){return o[e]},getChildren(o){return o[t]},getDisabled(o){return!!(o.disabled||o.checkboxDisabled)}}}var xO={allowCheckingNotLoaded:Boolean,filter:Function,defaultExpandAll:Boolean,expandedKeys:Array,keyField:{type:String,default:"key"},labelField:{type:String,default:"label"},childrenField:{type:String,default:"children"},defaultExpandedKeys:{type:Array,default:()=>[]},indeterminateKeys:Array,onUpdateIndeterminateKeys:[Function,Array],"onUpdate:indeterminateKeys":[Function,Array],onUpdateExpandedKeys:[Function,Array],"onUpdate:expandedKeys":[Function,Array]},vO=Object.assign(Object.assign(Object.assign(Object.assign({},Ct.props),{showIrrelevantNodes:{type:Boolean,default:!0},data:{type:Array,default:()=>[]},expandOnDragenter:{type:Boolean,default:!0},cancelable:{type:Boolean,default:!0},checkable:Boolean,draggable:Boolean,blockNode:Boolean,blockLine:Boolean,disabled:Boolean,checkedKeys:Array,defaultCheckedKeys:{type:Array,default:()=>[]},selectedKeys:Array,defaultSelectedKeys:{type:Array,default:()=>[]},multiple:Boolean,pattern:{type:String,default:""},onLoad:Function,cascade:Boolean,selectable:{type:Boolean,default:!0},indent:{type:Number,default:16},allowDrop:{type:Function,default:Jb},animated:{type:Boolean,default:!0},virtualScroll:Boolean,watchProps:Array,renderLabel:Function,renderPrefix:Function,renderSuffix:Function,renderSwitcherIcon:Function,nodeProps:Function,onDragenter:[Function,Array],onDragleave:[Function,Array],onDragend:[Function,Array],onDragstart:[Function,Array],onDragover:[Function,Array],onDrop:[Function,Array],onUpdateCheckedKeys:[Function,Array],"onUpdate:checkedKeys":[Function,Array],onUpdateSelectedKeys:[Function,Array],"onUpdate:selectedKeys":[Function,Array]}),xO),{internalTreeSelect:Boolean,internalScrollable:Boolean,internalScrollablePadding:String,internalRenderEmpty:Function,internalHighlightKeySet:Object,internalUnifySelectCheck:Boolean,internalCheckboxFocusable:{type:Boolean,default:!0},internalFocusable:{type:Boolean,default:!0},checkStrategy:{type:String,default:"all"},leafOnly:Boolean}),Ef=ue({name:"Tree",props:vO,setup(e){let{mergedClsPrefixRef:t,inlineThemeDisabled:o}=Mt(e),r=Ct("Tree","-tree",i0,pf,e,t),n=X(null),i=X(null),a=X(null);function l(){var I;return(I=a.value)===null||I===void 0?void 0:I.listElRef}function s(){var I;return(I=a.value)===null||I===void 0?void 0:I.itemsElRef}let c=F(()=>{let{pattern:I}=e;return I?!I.length||!ot.value?{filteredTree:e.data,highlightKeySet:null,expandedKeys:void 0}:o0(e.data,ot.value,I,e.keyField,e.childrenField):{filteredTree:e.data,highlightKeySet:null,expandedKeys:void 0}}),d=F(()=>kd(e.showIrrelevantNodes?e.data:c.value.filteredTree,gO(e.keyField,e.childrenField))),u=ke(ms,null),p=e.internalTreeSelect?u.dataTreeMate:d,{watchProps:f}=e,m=X([]);f?.includes("defaultCheckedKeys")?At(()=>{m.value=e.defaultCheckedKeys}):m.value=e.defaultCheckedKeys;let y=Re(e,"checkedKeys"),w=Xt(y,m),g=F(()=>p.value.getCheckedKeys(w.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded})),O=F(()=>e.leafOnly?"child":e.checkStrategy),j=F(()=>g.value.checkedKeys),S=F(()=>{let{indeterminateKeys:I}=e;return I!==void 0?I:g.value.indeterminateKeys}),v=X([]);f?.includes("defaultSelectedKeys")?At(()=>{v.value=e.defaultSelectedKeys}):v.value=e.defaultSelectedKeys;let D=Re(e,"selectedKeys"),x=Xt(D,v),k=X([]),A=I=>{k.value=e.defaultExpandAll?p.value.getNonLeafKeys():I===void 0?e.defaultExpandedKeys:I};f?.includes("defaultExpandedKeys")?At(()=>A(void 0)):At(()=>A(e.defaultExpandedKeys));let E=Re(e,"expandedKeys"),z=Xt(E,k),M=F(()=>d.value.getFlattenedNodes(z.value)),{pendingNodeKeyRef:se,handleKeyup:ye,handleKeydown:Ie}=r0({mergedSelectedKeysRef:x,fNodesRef:M,mergedExpandedKeysRef:z,handleSelect:Fe,handleSwitcherClick:He}),fe=null,ce=null,we=X(new Set),Me=F(()=>e.internalHighlightKeySet||c.value.highlightKeySet),Be=Xt(Me,we),Le=X(new Set),Je=F(()=>z.value.filter(I=>!Le.value.has(I))),Xe=0,ct=X(null),wt=X(null),ze=X(null),We=X(null),vt=X(0),Pe=F(()=>{let{value:I}=wt;return I?I.parent:null}),ot=F(()=>{let{filter:I}=e;if(I)return I;let{labelField:G}=e;return(de,me)=>de.length?me[G].toLowerCase().includes(de.toLowerCase()):!0});Ze(Re(e,"data"),()=>{Le.value.clear(),se.value=null,re()},{deep:!1});let rt;Ze(Re(e,"pattern"),(I,G)=>{if(e.showIrrelevantNodes)if(rt=void 0,I){let{expandedKeys:de,highlightKeySet:me}=t0(e.data,e.pattern,e.keyField,e.childrenField,ot.value);we.value=me,H(de,oe(de))}else we.value=new Set;else if(!I.length)rt!==void 0&&H(rt,oe(rt));else{G.length||(rt=z.value);let{expandedKeys:de}=c.value;de!==void 0&&H(de,oe(de))}});function Dt(I){return hO(this,void 0,void 0,function*(){let{onLoad:G}=e;if(!G)return yield Promise.resolve();let{value:de}=Le;return yield new Promise(me=>{de.has(I.key)||(de.add(I.key),G(I.rawNode).then(()=>{de.delete(I.key),me()}).catch($e=>{console.error($e),le()}))})})}At(()=>{var I;let{value:G}=d;if(!G)return;let{getNode:de}=G;(I=z.value)===null||I===void 0||I.forEach(me=>{let $e=de(me);$e&&!$e.shallowLoaded&&Dt($e)})});let h=X(!1),C=X([]);Ze(Je,(I,G)=>{if(!e.animated){Bt(K);return}let de=new Set(G),me=null,$e=null;for(let Ot of I)if(!de.has(Ot)){if(me!==null)return;me=Ot}let Lt=new Set(I);for(let Ot of G)if(!Lt.has(Ot)){if($e!==null)return;$e=Ot}if(me!==null&&$e!==null||me===null&&$e===null)return;let{virtualScroll:bt}=e,nr=(bt?a.value.listElRef:n.value).offsetHeight,ir=Math.ceil(nr/gs)+1;if(me!==null){h.value=!0,C.value=d.value.getFlattenedNodes(G);let Ot=C.value.findIndex(It=>It.key===me);if(~Ot){let It=ei(C.value[Ot].children,I);C.value.splice(Ot+1,0,{__motion:!0,mode:"expand",height:bt?It.length*gs:void 0,nodes:bt?It.slice(0,ir):It})}}if($e!==null){C.value=d.value.getFlattenedNodes(I);let Ot=C.value.findIndex(It=>It.key===$e);if(~Ot){let It=C.value[Ot].children;if(!It)return;h.value=!0;let no=ei(It,I);C.value.splice(Ot+1,0,{__motion:!0,mode:"collapse",height:bt?no.length*gs:void 0,nodes:bt?no.slice(0,ir):no})}}});let L=F(()=>yd(M.value)),q=F(()=>h.value?C.value:M.value);function K(){let{value:I}=i;I&&I.sync()}function ne(){h.value=!1,e.virtualScroll&&Bt(K)}function oe(I){let{getNode:G}=p.value;return I.map(de=>{var me;return((me=G(de))===null||me===void 0?void 0:me.rawNode)||null})}function H(I,G){let{"onUpdate:expandedKeys":de,onUpdateExpandedKeys:me}=e;k.value=I,de&&Se(de,I,G),me&&Se(me,I,G)}function Q(I,G){let{"onUpdate:checkedKeys":de,onUpdateCheckedKeys:me}=e;m.value=I,me&&Se(me,I,G),de&&Se(de,I,G)}function Y(I,G){let{"onUpdate:indeterminateKeys":de,onUpdateIndeterminateKeys:me}=e;de&&Se(de,I,G),me&&Se(me,I,G)}function N(I,G){let{"onUpdate:selectedKeys":de,onUpdateSelectedKeys:me}=e;v.value=I,me&&Se(me,I,G),de&&Se(de,I,G)}function $(I){let{onDragenter:G}=e;G&&Se(G,I)}function V(I){let{onDragleave:G}=e;G&&Se(G,I)}function ae(I){let{onDragend:G}=e;G&&Se(G,I)}function pe(I){let{onDragstart:G}=e;G&&Se(G,I)}function _(I){let{onDragover:G}=e;G&&Se(G,I)}function W(I){let{onDrop:G}=e;G&&Se(G,I)}function re(){P(),Z()}function P(){ct.value=null}function Z(){vt.value=0,wt.value=null,ze.value=null,We.value=null,le()}function le(){fe&&(window.clearTimeout(fe),fe=null),ce=null}function Ce(I,G){if(e.disabled||I.disabled)return;if(e.internalUnifySelectCheck&&!e.multiple){Fe(I);return}let{checkedKeys:de,indeterminateKeys:me}=p.value[G?"check":"uncheck"](I.key,j.value,{cascade:e.cascade,checkStrategy:O.value,allowNotLoaded:e.allowCheckingNotLoaded});Q(de,oe(de)),Y(me,oe(me))}function Ke(I){if(e.disabled)return;let{value:G}=z,de=G.findIndex(me=>me===I);if(~de){let me=Array.from(G);me.splice(de,1),H(me,oe(me))}else{let me=d.value.getNode(I);if(!me||me.isLeaf)return;let $e=G.concat(I);H($e,oe($e))}}function He(I){e.disabled||h.value||Ke(I.key)}function Fe(I){if(!(e.disabled||!e.selectable)){if(se.value=I.key,e.internalUnifySelectCheck){let{value:{checkedKeys:G,indeterminateKeys:de}}=g;e.multiple?Ce(I,!(G.includes(I.key)||de.includes(I.key))):Q([I.key],oe([I.key]))}if(e.multiple){let G=Array.from(x.value),de=G.findIndex(me=>me===I.key);~de?e.cancelable&&G.splice(de,1):~de||G.push(I.key),N(G,oe(G))}else x.value.includes(I.key)?e.cancelable&&N([],[]):N([I.key],oe([I.key]))}}function qe(I){if(fe&&(window.clearTimeout(fe),fe=null),I.isLeaf)return;ce=I.key;let G=()=>{if(ce!==I.key)return;let{value:de}=ze;if(de&&de.key===I.key&&!z.value.includes(I.key)){let me=z.value.concat(I.key);H(me,oe(me))}fe=null,ce=null};I.shallowLoaded?fe=window.setTimeout(()=>{G()},1e3):fe=window.setTimeout(()=>{Dt(I).then(()=>{G()})},1e3)}function Tt({event:I,node:G}){!e.draggable||e.disabled||G.disabled||(wn({event:I,node:G},!1),$({event:I,node:G.rawNode}))}function ho({event:I,node:G}){!e.draggable||e.disabled||G.disabled||V({event:I,node:G.rawNode})}function ii(I){I.target===I.currentTarget&&Z()}function hr({event:I,node:G}){re(),!(!e.draggable||e.disabled||G.disabled)&&ae({event:I,node:G.rawNode})}function gr({event:I,node:G}){var de;!e.draggable||e.disabled||G.disabled||(_f&&((de=I.dataTransfer)===null||de===void 0||de.setDragImage(_f,0,0)),Xe=I.clientX,ct.value=G,pe({event:I,node:G.rawNode}))}function wn({event:I,node:G},de=!0){var me;if(!e.draggable||e.disabled||G.disabled)return;let{value:$e}=ct;if(!$e)return;let{allowDrop:Lt,indent:bt}=e;de&&_({event:I,node:G.rawNode});let nr=I.currentTarget,{height:ir,top:Ot}=nr.getBoundingClientRect(),It=I.clientY-Ot,no;Lt({node:G.rawNode,dropPosition:"inside",phase:"drag"})?It<=8?no="before":It>=ir-8?no="after":no="inside":It<=ir/2?no="before":no="after";let{value:Ls}=L,et,Ft,li=Ls(G.key);if(li===null){Z();return}let Ea=!1;no==="inside"?(et=G,Ft="inside"):no==="before"?G.isFirstChild?(et=G,Ft="before"):(et=M.value[li-1],Ft="after"):(et=G,Ft="after"),!et.isLeaf&&z.value.includes(et.key)&&(Ea=!0,Ft==="after"&&(et=M.value[li+1],et?Ft="before":(et=G,Ft="inside")));let Da=et;if(ze.value=Da,!Ea&&$e.isLastChild&&$e.key===et.key&&(Ft="after"),Ft==="after"){let Ta=Xe-I.clientX,si=0;for(;Ta>=bt/2&&et.parent!==null&&et.isLastChild&&si<1;)Ta-=bt,si+=1,et=et.parent;vt.value=si}else vt.value=0;if(($e.contains(et)||Ft==="inside"&&((me=$e.parent)===null||me===void 0?void 0:me.key)===et.key)&&!($e.key===Da.key&&$e.key===et.key)){Z();return}if(!Lt({node:et.rawNode,dropPosition:Ft,phase:"drag"})){Z();return}if($e.key===et.key)le();else if(ce!==et.key)if(Ft==="inside"){if(e.expandOnDragenter){if(qe(et),!et.shallowLoaded&&ce!==et.key){re();return}}else if(!et.shallowLoaded){re();return}}else le();else Ft!=="inside"&&le();We.value=Ft,wt.value=et}function ai({event:I,node:G,dropPosition:de}){if(!e.draggable||e.disabled||G.disabled)return;let{value:me}=ct,{value:$e}=wt,{value:Lt}=We;if(!(!me||!$e||!Lt)&&e.allowDrop({node:$e.rawNode,dropPosition:Lt,phase:"drag"})&&me.key!==$e.key){if(Lt==="before"){let bt=me.getNext({includeDisabled:!0});if(bt&&bt.key===$e.key){Z();return}}if(Lt==="after"){let bt=me.getPrev({includeDisabled:!0});if(bt&&bt.key===$e.key){Z();return}}W({event:I,node:$e.rawNode,dragNode:me.rawNode,dropPosition:de}),re()}}function kn(){K()}function xr(){K()}function T(I){var G;if(e.virtualScroll||e.internalScrollable){let{value:de}=i;if(!((G=de?.containerRef)===null||G===void 0)&&G.contains(I.relatedTarget))return;se.value=null}else{let{value:de}=n;if(de?.contains(I.relatedTarget))return;se.value=null}}Ze(se,I=>{var G,de;if(I!==null){if(e.virtualScroll)(G=a.value)===null||G===void 0||G.scrollTo({key:I});else if(e.internalScrollable){let{value:me}=i;if(me===null)return;let $e=(de=me.contentRef)===null||de===void 0?void 0:de.querySelector(`[data-key="${Bn(I)}"]`);if(!$e)return;me.scrollTo({el:$e})}}}),Yt(rr,{loadingKeysRef:Le,highlightKeySetRef:Be,displayedCheckedKeysRef:j,displayedIndeterminateKeysRef:S,mergedSelectedKeysRef:x,mergedExpandedKeysRef:z,mergedThemeRef:r,mergedCheckStrategyRef:O,nodePropsRef:Re(e,"nodeProps"),disabledRef:Re(e,"disabled"),checkableRef:Re(e,"checkable"),selectableRef:Re(e,"selectable"),onLoadRef:Re(e,"onLoad"),draggableRef:Re(e,"draggable"),blockLineRef:Re(e,"blockLine"),indentRef:Re(e,"indent"),cascadeRef:Re(e,"cascade"),droppingMouseNodeRef:ze,droppingNodeParentRef:Pe,draggingNodeRef:ct,droppingPositionRef:We,droppingOffsetLevelRef:vt,fNodesRef:M,pendingNodeKeyRef:se,internalScrollableRef:Re(e,"internalScrollable"),internalCheckboxFocusableRef:Re(e,"internalCheckboxFocusable"),internalTreeSelect:e.internalTreeSelect,renderLabelRef:Re(e,"renderLabel"),renderPrefixRef:Re(e,"renderPrefix"),renderSuffixRef:Re(e,"renderSuffix"),renderSwitcherIconRef:Re(e,"renderSwitcherIcon"),labelFieldRef:Re(e,"labelField"),multipleRef:Re(e,"multiple"),handleSwitcherClick:He,handleDragEnd:hr,handleDragEnter:Tt,handleDragLeave:ho,handleDragStart:gr,handleDrop:ai,handleDragOver:wn,handleSelect:Fe,handleCheck:Ce});let ie={handleKeydown:Ie,handleKeyup:ye},Oe=F(()=>{let{common:{cubicBezierEaseInOut:I},self:{fontSize:G,nodeBorderRadius:de,nodeColorHover:me,nodeColorPressed:$e,nodeColorActive:Lt,arrowColor:bt,loadingColor:nr,nodeTextColor:ir,nodeTextColorDisabled:Ot,dropMarkColor:It}}=r.value;return{"--n-arrow-color":bt,"--n-loading-color":nr,"--n-bezier":I,"--n-font-size":G,"--n-node-border-radius":de,"--n-node-color-active":Lt,"--n-node-color-hover":me,"--n-node-color-pressed":$e,"--n-node-text-color":ir,"--n-node-text-color-disabled":Ot,"--n-drop-mark-color":It}}),dt=o?qt("tree",void 0,Oe,e):void 0;return{mergedClsPrefix:t,mergedTheme:r,fNodes:q,aip:h,selfElRef:n,virtualListInstRef:a,scrollbarInstRef:i,handleFocusout:T,handleDragLeaveTree:ii,handleScroll:kn,getScrollContainer:l,getScrollContent:s,handleAfterEnter:ne,handleResize:xr,handleKeydown:ie.handleKeydown,handleKeyup:ie.handleKeyup,cssVars:o?void 0:Oe,themeClass:dt?.themeClass,onRender:dt?.onRender}},render(){var e;let{fNodes:t,internalRenderEmpty:o}=this;if(!t.length&&o)return o();let{mergedClsPrefix:r,blockNode:n,blockLine:i,draggable:a,disabled:l,internalFocusable:s,checkable:c,handleKeyup:d,handleKeydown:u,handleFocusout:p}=this,f=s&&!l,m=f?"0":void 0,y=[`${r}-tree`,c&&`${r}-tree--checkable`,(i||n)&&`${r}-tree--block-node`,i&&`${r}-tree--block-line`],w=O=>"__motion"in O?b(n0,{height:O.height,nodes:O.nodes,clsPrefix:r,mode:O.mode,onAfterEnter:this.handleAfterEnter}):b(hs,{key:O.key,tmNode:O,clsPrefix:r});if(this.virtualScroll){let{mergedTheme:O,internalScrollablePadding:j}=this,S=$n(j||"0");return b(oa,{ref:"scrollbarInstRef",onDragleave:a?this.handleDragLeaveTree:void 0,container:this.getScrollContainer,content:this.getScrollContent,class:y,theme:O.peers.Scrollbar,themeOverrides:O.peerOverrides.Scrollbar,tabindex:m,onKeyup:f?d:void 0,onKeydown:f?u:void 0,onFocusout:f?p:void 0},{default:()=>{var v;return(v=this.onRender)===null||v===void 0||v.call(this),b(Vi,{ref:"virtualListInstRef",items:this.fNodes,itemSize:gs,ignoreItemResize:this.aip,paddingTop:S.top,paddingBottom:S.bottom,class:this.themeClass,style:[this.cssVars,{paddingLeft:S.left,paddingRight:S.right}],onScroll:this.handleScroll,onResize:this.handleResize,showScrollbar:!1,itemResizable:!0},{default:({item:D})=>w(D)})}})}let{internalScrollable:g}=this;return y.push(this.themeClass),(e=this.onRender)===null||e===void 0||e.call(this),g?b(oa,{class:y,tabindex:m,onKeyup:f?d:void 0,onKeydown:f?u:void 0,onFocusout:f?p:void 0,style:this.cssVars,contentStyle:{padding:this.internalScrollablePadding}},{default:()=>b("div",{onDragleave:a?this.handleDragLeaveTree:void 0,ref:"selfElRef"},this.fNodes.map(w))}):b("div",{class:y,tabindex:m,ref:"selfElRef",style:this.cssVars,onKeyup:f?d:void 0,onKeydown:f?u:void 0,onFocusout:f?p:void 0,onDragleave:a?this.handleDragLeaveTree:void 0},t.length?t.map(w):Yo(this.$slots.empty,()=>{var O,j,S,v;return[b(_d,{class:`${r}-tree__empty`,theme:(j=(O=this.theme)===null||O===void 0?void 0:O.peers)===null||j===void 0?void 0:j.Empty,themeOverrides:(v=(S=this.themeOverrides)===null||S===void 0?void 0:S.peers)===null||v===void 0?void 0:v.Empty})]}))}});var xs={name:"dark",common:R,Alert:Pd,Anchor:Rd,AutoComplete:$d,Avatar:aa,AvatarGroup:Ld,BackTop:zd,Badge:Bd,Breadcrumb:Hd,Button:lt,ButtonGroup:Iu,Calendar:Wd,Card:sa,Carousel:Yd,Cascader:Qd,Checkbox:Io,Code:ca,Collapse:tu,CollapseTransition:ou,ColorPicker:Ud,DataTable:uu,DatePicker:vu,Descriptions:bu,Dialog:xa,Divider:Su,Drawer:Eu,Dropdown:ha,DynamicInput:Du,DynamicTags:Tu,Element:Ou,Empty:fo,Ellipsis:pa,Form:Pu,GradientText:Nu,Icon:mu,IconWrapper:Ru,Image:bf,Input:xt,InputNumber:Au,Layout:Mu,List:$u,LoadingBar:Lu,Log:zu,Menu:Vu,Mention:Bu,Message:Fu,Modal:ku,Notification:Wu,PageHeader:Uu,Pagination:ua,Popconfirm:Gu,Popover:Qt,Popselect:Yu,Progress:ba,Radio:ma,Rate:Qu,Result:Ju,Scrollbar:at,Select:da,Skeleton:yf,Slider:ef,Space:va,Spin:of,Statistic:rf,Steps:nf,Switch:af,Table:lf,Tabs:sf,Tag:ra,Thing:cf,TimePicker:ga,Timeline:df,Tooltip:or,Transfer:uf,Tree:ya,TreeSelect:mf,Typography:hf,Upload:xf,Watermark:vf};var bO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},yO=pt("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8s-8-3.59-8-8s3.59-8 8-8m0-2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm1 10V9c0-.55-.45-1-1-1s-1 .45-1 1v3H9.21c-.45 0-.67.54-.35.85l2.79 2.79c.2.2.51.2.71 0l2.79-2.79a.5.5 0 0 0-.35-.85H13z",fill:"currentColor"},null,-1),CO=[yO];function a0(e,t){return Ye(),ut("svg",bO,CO)}var Df={};Df.render=a0;Df.__file="src/ui/icons/ArrowCircleDownRound.vue";var Tf=Df;var wO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},kO=pt("path",{d:"M11.77 3c-2.65.07-5 1.28-6.6 3.16L3.85 4.85a.5.5 0 0 0-.85.36V9.5c0 .28.22.5.5.5h4.29c.45 0 .67-.54.35-.85L6.59 7.59C7.88 6.02 9.82 5 12 5c4.32 0 7.74 3.94 6.86 8.41c-.54 2.77-2.81 4.98-5.58 5.47c-3.8.68-7.18-1.74-8.05-5.16c-.12-.42-.52-.72-.96-.72c-.65 0-1.14.61-.98 1.23C4.28 18.12 7.8 21 12 21c5.06 0 9.14-4.17 9-9.26c-.14-4.88-4.35-8.86-9.23-8.74zM14 12c0-1.1-.9-2-2-2s-2 .9-2 2s.9 2 2 2s2-.9 2-2z",fill:"currentColor"},null,-1),SO=[kO];function l0(e,t){return Ye(),ut("svg",wO,SO)}var Of={};Of.render=l0;Of.__file="src/ui/icons/SettingsBackupRestoreRound.vue";var Pf=Of;var _O={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},EO=pt("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z",fill:"currentColor"},null,-1),DO=pt("path",{d:"M14 17H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z",fill:"currentColor"},null,-1),TO=[EO,DO];function s0(e,t){return Ye(),ut("svg",_O,TO)}var Nf={};Nf.render=s0;Nf.__file="src/ui/icons/ArticleOutlined.vue";var Rf=Nf;var OO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},PO=pt("path",{d:"M12 3v10.55c-.59-.34-1.27-.55-2-.55c-2.21 0-4 1.79-4 4s1.79 4 4 4s4-1.79 4-4V7h4V3h-6zm-2 16c-1.1 0-2-.9-2-2s.9-2 2-2s2 .9 2 2s-.9 2-2 2z",fill:"currentColor"},null,-1),NO=[PO];function c0(e,t){return Ye(),ut("svg",OO,NO)}var If={};If.render=c0;If.__file="src/ui/icons/AudiotrackOutlined.vue";var Af=If;var RO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},IO=pt("path",{d:"M12 2l-5.5 9h11L12 2zm0 3.84L13.93 9h-3.87L12 5.84zM17.5 13c-2.49 0-4.5 2.01-4.5 4.5s2.01 4.5 4.5 4.5s4.5-2.01 4.5-4.5s-2.01-4.5-4.5-4.5zm0 7a2.5 2.5 0 0 1 0-5a2.5 2.5 0 0 1 0 5zM3 21.5h8v-8H3v8zm2-6h4v4H5v-4z",fill:"currentColor"},null,-1),AO=[IO];function d0(e,t){return Ye(),ut("svg",RO,AO)}var Mf={};Mf.render=d0;Mf.__file="src/ui/icons/CategoryOutlined.vue";var $f=Mf;var MO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},$O=pt("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14L6 17h12l-3.86-5.14z",fill:"currentColor"},null,-1),LO=[$O];function u0(e,t){return Ye(),ut("svg",MO,LO)}var Lf={};Lf.render=u0;Lf.__file="src/ui/icons/ImageOutlined.vue";var zf=Lf;var zO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},BO=pt("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zM4 12c0-.61.08-1.21.21-1.78L8.99 15v1c0 1.1.9 2 2 2v1.93C7.06 19.43 4 16.07 4 12zm13.89 5.4c-.26-.81-1-1.4-1.9-1.4h-1v-3c0-.55-.45-1-1-1h-6v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41C17.92 5.77 20 8.65 20 12c0 2.08-.81 3.98-2.11 5.4z",fill:"currentColor"},null,-1),HO=[BO];function f0(e,t){return Ye(),ut("svg",zO,HO)}var Bf={};Bf.render=f0;Bf.__file="src/ui/icons/PublicOutlined.vue";var Hf=Bf;var VO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},FO=pt("path",{d:"M2.5 4v3h5v12h3V7h5V4h-13zm19 5h-9v3h3v7h3v-7h3V9z",fill:"currentColor"},null,-1),jO=[FO];function p0(e,t){return Ye(),ut("svg",VO,jO)}var Vf={};Vf.render=p0;Vf.__file="src/ui/icons/TextFieldsOutlined.vue";var Ff=Vf;var WO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},KO=pt("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h8v4h4v12zm-6-3c-1.1 0-2-.9-2-2V9.5c0-.28.22-.5.5-.5s.5.22.5.5V15h2V9.5a2.5 2.5 0 0 0-5 0V15c0 2.21 1.79 4 4 4s4-1.79 4-4v-4h-2v4c0 1.1-.9 2-2 2z",fill:"currentColor"},null,-1),UO=[KO];function m0(e,t){return Ye(),ut("svg",WO,UO)}var jf={};jf.render=m0;jf.__file="src/ui/icons/FilePresentOutlined.vue";var Wf=jf;var qO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},GO=pt("path",{d:"M7.38 21.01c.49.49 1.28.49 1.77 0l8.31-8.31a.996.996 0 0 0 0-1.41L9.15 2.98c-.49-.49-1.28-.49-1.77 0s-.49 1.28 0 1.77L14.62 12l-7.25 7.25c-.48.48-.48 1.28.01 1.76z",fill:"currentColor"},null,-1),YO=[GO];function h0(e,t){return Ye(),ut("svg",qO,YO)}var Kf={};Kf.render=h0;Kf.__file="src/ui/icons/ArrowForwardIosRound.vue";var Uf=Kf;var XO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ZO=pt("path",{d:"M9 7v8l7-4zm12-4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 14H3V5h18v12z",fill:"currentColor"},null,-1),QO=[ZO];function g0(e,t){return Ye(),ut("svg",XO,QO)}var qf={};qf.render=g0;qf.__file="src/ui/icons/OndemandVideoOutlined.vue";var Gf=qf;function JO(e){let t=0;for(let o=0;o{let n=JO(r);if(n){if(n===1){e.forEach(a=>{o.push(r.replace("&",a))});return}}else{e.forEach(a=>{o.push((a&&a+" ")+r)});return}let i=[r];for(;n--;){let a=[];i.forEach(l=>{e.forEach(s=>{a.push(l.replace("&",s))})}),i=a}i.forEach(a=>o.push(a))}),o}function oP(e,t){let o=[];return t.split(x0).forEach(r=>{e.forEach(n=>{o.push((n&&n+" ")+r)})}),o}function v0(e){let t=[""];return e.forEach(o=>{o=o&&o.trim(),o&&(o.includes("&")?t=tP(t,o):t=oP(t,o))}),t.join(", ").replace(eP," ")}var rP=/[A-Z]/g;function y0(e){return e.replace(rP,t=>"-"+t.toLowerCase())}function nP(e,t=" "){return typeof e=="object"&&e!==null?` { -`+Object.entries(e).map(o=>t+` ${y0(o[0])}: ${o[1]};`).join(` + `)]),ee("empty","margin: auto;")]);var mO=function(e,t,o,r){function n(i){return i instanceof o?i:new o(function(a){a(i)})}return new(o||(o=Promise))(function(i,a){function l(d){try{c(r.next(d))}catch(u){a(u)}}function s(d){try{c(r.throw(d))}catch(u){a(u)}}function c(d){d.done?i(d.value):n(d.value).then(l,s)}c((r=r.apply(e,t||[])).next())})},xs=30;function hO(e,t){return{getKey(o){return o[e]},getChildren(o){return o[t]},getDisabled(o){return!!(o.disabled||o.checkboxDisabled)}}}var gO={allowCheckingNotLoaded:Boolean,filter:Function,defaultExpandAll:Boolean,expandedKeys:Array,keyField:{type:String,default:"key"},labelField:{type:String,default:"label"},childrenField:{type:String,default:"children"},defaultExpandedKeys:{type:Array,default:()=>[]},indeterminateKeys:Array,onUpdateIndeterminateKeys:[Function,Array],"onUpdate:indeterminateKeys":[Function,Array],onUpdateExpandedKeys:[Function,Array],"onUpdate:expandedKeys":[Function,Array]},xO=Object.assign(Object.assign(Object.assign(Object.assign({},wt.props),{showIrrelevantNodes:{type:Boolean,default:!0},data:{type:Array,default:()=>[]},expandOnDragenter:{type:Boolean,default:!0},cancelable:{type:Boolean,default:!0},checkable:Boolean,draggable:Boolean,blockNode:Boolean,blockLine:Boolean,disabled:Boolean,checkedKeys:Array,defaultCheckedKeys:{type:Array,default:()=>[]},selectedKeys:Array,defaultSelectedKeys:{type:Array,default:()=>[]},multiple:Boolean,pattern:{type:String,default:""},onLoad:Function,cascade:Boolean,selectable:{type:Boolean,default:!0},indent:{type:Number,default:16},allowDrop:{type:Function,default:Jb},animated:{type:Boolean,default:!0},virtualScroll:Boolean,watchProps:Array,renderLabel:Function,renderPrefix:Function,renderSuffix:Function,renderSwitcherIcon:Function,nodeProps:Function,onDragenter:[Function,Array],onDragleave:[Function,Array],onDragend:[Function,Array],onDragstart:[Function,Array],onDragover:[Function,Array],onDrop:[Function,Array],onUpdateCheckedKeys:[Function,Array],"onUpdate:checkedKeys":[Function,Array],onUpdateSelectedKeys:[Function,Array],"onUpdate:selectedKeys":[Function,Array]}),gO),{internalTreeSelect:Boolean,internalScrollable:Boolean,internalScrollablePadding:String,internalRenderEmpty:Function,internalHighlightKeySet:Object,internalUnifySelectCheck:Boolean,internalCheckboxFocusable:{type:Boolean,default:!0},internalFocusable:{type:Boolean,default:!0},checkStrategy:{type:String,default:"all"},leafOnly:Boolean}),Ef=de({name:"Tree",props:xO,setup(e){let{mergedClsPrefixRef:t,inlineThemeDisabled:o}=At(e),r=wt("Tree","-tree",iy,pf,e,t),n=Z(null),i=Z(null),a=Z(null);function l(){var I;return(I=a.value)===null||I===void 0?void 0:I.listElRef}function s(){var I;return(I=a.value)===null||I===void 0?void 0:I.itemsElRef}let c=j(()=>{let{pattern:I}=e;return I?!I.length||!lt.value?{filteredTree:e.data,highlightKeySet:null,expandedKeys:void 0}:oy(e.data,lt.value,I,e.keyField,e.childrenField):{filteredTree:e.data,highlightKeySet:null,expandedKeys:void 0}}),d=j(()=>kd(e.showIrrelevantNodes?e.data:c.value.filteredTree,hO(e.keyField,e.childrenField))),u=we(hs,null),p=e.internalTreeSelect?u.dataTreeMate:d,{watchProps:f}=e,m=Z([]);f?.includes("defaultCheckedKeys")?Nt(()=>{m.value=e.defaultCheckedKeys}):m.value=e.defaultCheckedKeys;let y=Ae(e,"checkedKeys"),_=Zt(y,m),h=j(()=>p.value.getCheckedKeys(_.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded})),O=j(()=>e.leafOnly?"child":e.checkStrategy),W=j(()=>h.value.checkedKeys),w=j(()=>{let{indeterminateKeys:I}=e;return I!==void 0?I:h.value.indeterminateKeys}),b=Z([]);f?.includes("defaultSelectedKeys")?Nt(()=>{b.value=e.defaultSelectedKeys}):b.value=e.defaultSelectedKeys;let D=Ae(e,"selectedKeys"),x=Zt(D,b),k=Z([]),A=I=>{k.value=e.defaultExpandAll?p.value.getNonLeafKeys():I===void 0?e.defaultExpandedKeys:I};f?.includes("defaultExpandedKeys")?Nt(()=>A(void 0)):Nt(()=>A(e.defaultExpandedKeys));let E=Ae(e,"expandedKeys"),H=Zt(E,k),M=j(()=>d.value.getFlattenedNodes(H.value)),{pendingNodeKeyRef:le,handleKeyup:ye,handleKeydown:Pe}=ry({mergedSelectedKeysRef:x,fNodesRef:M,mergedExpandedKeysRef:H,handleSelect:Ge,handleSwitcherClick:Be}),fe=null,ce=null,Ce=Z(new Set),Ke=j(()=>e.internalHighlightKeySet||c.value.highlightKeySet),He=Zt(Ke,Ce),Me=Z(new Set),Ye=j(()=>H.value.filter(I=>!Me.value.has(I))),Xe=0,Dt=Z(null),pt=Z(null),Le=Z(null),We=Z(null),gt=Z(0),Re=j(()=>{let{value:I}=pt;return I?I.parent:null}),lt=j(()=>{let{filter:I}=e;if(I)return I;let{labelField:Y}=e;return(se,pe)=>se.length?pe[Y].toLowerCase().includes(se.toLowerCase()):!0});Qe(Ae(e,"data"),()=>{Me.value.clear(),le.value=null,K()},{deep:!1});let bt;Qe(Ae(e,"pattern"),(I,Y)=>{if(e.showIrrelevantNodes)if(bt=void 0,I){let{expandedKeys:se,highlightKeySet:pe}=ty(e.data,e.pattern,e.keyField,e.childrenField,lt.value);Ce.value=pe,F(se,oe(se))}else Ce.value=new Set;else if(!I.length)bt!==void 0&&F(bt,oe(bt));else{Y.length||(bt=H.value);let{expandedKeys:se}=c.value;se!==void 0&&F(se,oe(se))}});function mt(I){return mO(this,void 0,void 0,function*(){let{onLoad:Y}=e;if(!Y)return yield Promise.resolve();let{value:se}=Me;return yield new Promise(pe=>{se.has(I.key)||(se.add(I.key),Y(I.rawNode).then(()=>{se.delete(I.key),pe()}).catch(ze=>{console.error(ze),ae()}))})})}Nt(()=>{var I;let{value:Y}=d;if(!Y)return;let{getNode:se}=Y;(I=H.value)===null||I===void 0||I.forEach(pe=>{let ze=se(pe);ze&&!ze.shallowLoaded&&mt(ze)})});let g=Z(!1),C=Z([]);Qe(Ye,(I,Y)=>{if(!e.animated){Bt(G);return}let se=new Set(Y),pe=null,ze=null;for(let Ot of I)if(!se.has(Ot)){if(pe!==null)return;pe=Ot}let Lt=new Set(I);for(let Ot of Y)if(!Lt.has(Ot)){if(ze!==null)return;ze=Ot}if(pe!==null&&ze!==null||pe===null&&ze===null)return;let{virtualScroll:yt}=e,nr=(yt?a.value.listElRef:n.value).offsetHeight,ir=Math.ceil(nr/xs)+1;if(pe!==null){g.value=!0,C.value=d.value.getFlattenedNodes(Y);let Ot=C.value.findIndex(It=>It.key===pe);if(~Ot){let It=ei(C.value[Ot].children,I);C.value.splice(Ot+1,0,{__motion:!0,mode:"expand",height:yt?It.length*xs:void 0,nodes:yt?It.slice(0,ir):It})}}if(ze!==null){C.value=d.value.getFlattenedNodes(I);let Ot=C.value.findIndex(It=>It.key===ze);if(~Ot){let It=C.value[Ot].children;if(!It)return;g.value=!0;let io=ei(It,I);C.value.splice(Ot+1,0,{__motion:!0,mode:"collapse",height:yt?io.length*xs:void 0,nodes:yt?io.slice(0,ir):io})}}});let z=j(()=>yd(M.value)),q=j(()=>g.value?C.value:M.value);function G(){let{value:I}=i;I&&I.sync()}function re(){g.value=!1,e.virtualScroll&&Bt(G)}function oe(I){let{getNode:Y}=p.value;return I.map(se=>{var pe;return((pe=Y(se))===null||pe===void 0?void 0:pe.rawNode)||null})}function F(I,Y){let{"onUpdate:expandedKeys":se,onUpdateExpandedKeys:pe}=e;k.value=I,se&&ke(se,I,Y),pe&&ke(pe,I,Y)}function Q(I,Y){let{"onUpdate:checkedKeys":se,onUpdateCheckedKeys:pe}=e;m.value=I,pe&&ke(pe,I,Y),se&&ke(se,I,Y)}function X(I,Y){let{"onUpdate:indeterminateKeys":se,onUpdateIndeterminateKeys:pe}=e;se&&ke(se,I,Y),pe&&ke(pe,I,Y)}function P(I,Y){let{"onUpdate:selectedKeys":se,onUpdateSelectedKeys:pe}=e;b.value=I,pe&&ke(pe,I,Y),se&&ke(se,I,Y)}function $(I){let{onDragenter:Y}=e;Y&&ke(Y,I)}function V(I){let{onDragleave:Y}=e;Y&&ke(Y,I)}function ie(I){let{onDragend:Y}=e;Y&&ke(Y,I)}function ue(I){let{onDragstart:Y}=e;Y&&ke(Y,I)}function Se(I){let{onDragover:Y}=e;Y&&ke(Y,I)}function S(I){let{onDrop:Y}=e;Y&&ke(Y,I)}function K(){T(),L()}function T(){Dt.value=null}function L(){gt.value=0,pt.value=null,Le.value=null,We.value=null,ae()}function ae(){fe&&(window.clearTimeout(fe),fe=null),ce=null}function he(I,Y){if(e.disabled||I.disabled)return;if(e.internalUnifySelectCheck&&!e.multiple){Ge(I);return}let{checkedKeys:se,indeterminateKeys:pe}=p.value[Y?"check":"uncheck"](I.key,W.value,{cascade:e.cascade,checkStrategy:O.value,allowNotLoaded:e.allowCheckingNotLoaded});Q(se,oe(se)),X(pe,oe(pe))}function Ne(I){if(e.disabled)return;let{value:Y}=H,se=Y.findIndex(pe=>pe===I);if(~se){let pe=Array.from(Y);pe.splice(se,1),F(pe,oe(pe))}else{let pe=d.value.getNode(I);if(!pe||pe.isLeaf)return;let ze=Y.concat(I);F(ze,oe(ze))}}function Be(I){e.disabled||g.value||Ne(I.key)}function Ge(I){if(!(e.disabled||!e.selectable)){if(le.value=I.key,e.internalUnifySelectCheck){let{value:{checkedKeys:Y,indeterminateKeys:se}}=h;e.multiple?he(I,!(Y.includes(I.key)||se.includes(I.key))):Q([I.key],oe([I.key]))}if(e.multiple){let Y=Array.from(x.value),se=Y.findIndex(pe=>pe===I.key);~se?e.cancelable&&Y.splice(se,1):~se||Y.push(I.key),P(Y,oe(Y))}else x.value.includes(I.key)?e.cancelable&&P([],[]):P([I.key],oe([I.key]))}}function Ve(I){if(fe&&(window.clearTimeout(fe),fe=null),I.isLeaf)return;ce=I.key;let Y=()=>{if(ce!==I.key)return;let{value:se}=Le;if(se&&se.key===I.key&&!H.value.includes(I.key)){let pe=H.value.concat(I.key);F(pe,oe(pe))}fe=null,ce=null};I.shallowLoaded?fe=window.setTimeout(()=>{Y()},1e3):fe=window.setTimeout(()=>{mt(I).then(()=>{Y()})},1e3)}function $t({event:I,node:Y}){!e.draggable||e.disabled||Y.disabled||(wn({event:I,node:Y},!1),$({event:I,node:Y.rawNode}))}function Ft({event:I,node:Y}){!e.draggable||e.disabled||Y.disabled||V({event:I,node:Y.rawNode})}function ii(I){I.target===I.currentTarget&&L()}function hr({event:I,node:Y}){K(),!(!e.draggable||e.disabled||Y.disabled)&&ie({event:I,node:Y.rawNode})}function gr({event:I,node:Y}){var se;!e.draggable||e.disabled||Y.disabled||(_f&&((se=I.dataTransfer)===null||se===void 0||se.setDragImage(_f,0,0)),Xe=I.clientX,Dt.value=Y,ue({event:I,node:Y.rawNode}))}function wn({event:I,node:Y},se=!0){var pe;if(!e.draggable||e.disabled||Y.disabled)return;let{value:ze}=Dt;if(!ze)return;let{allowDrop:Lt,indent:yt}=e;se&&Se({event:I,node:Y.rawNode});let nr=I.currentTarget,{height:ir,top:Ot}=nr.getBoundingClientRect(),It=I.clientY-Ot,io;Lt({node:Y.rawNode,dropPosition:"inside",phase:"drag"})?It<=8?io="before":It>=ir-8?io="after":io="inside":It<=ir/2?io="before":io="after";let{value:Ls}=z,tt,jt,li=Ls(Y.key);if(li===null){L();return}let Da=!1;io==="inside"?(tt=Y,jt="inside"):io==="before"?Y.isFirstChild?(tt=Y,jt="before"):(tt=M.value[li-1],jt="after"):(tt=Y,jt="after"),!tt.isLeaf&&H.value.includes(tt.key)&&(Da=!0,jt==="after"&&(tt=M.value[li+1],tt?jt="before":(tt=Y,jt="inside")));let Ta=tt;if(Le.value=Ta,!Da&&ze.isLastChild&&ze.key===tt.key&&(jt="after"),jt==="after"){let Oa=Xe-I.clientX,si=0;for(;Oa>=yt/2&&tt.parent!==null&&tt.isLastChild&&si<1;)Oa-=yt,si+=1,tt=tt.parent;gt.value=si}else gt.value=0;if((ze.contains(tt)||jt==="inside"&&((pe=ze.parent)===null||pe===void 0?void 0:pe.key)===tt.key)&&!(ze.key===Ta.key&&ze.key===tt.key)){L();return}if(!Lt({node:tt.rawNode,dropPosition:jt,phase:"drag"})){L();return}if(ze.key===tt.key)ae();else if(ce!==tt.key)if(jt==="inside"){if(e.expandOnDragenter){if(Ve(tt),!tt.shallowLoaded&&ce!==tt.key){K();return}}else if(!tt.shallowLoaded){K();return}}else ae();else jt!=="inside"&&ae();We.value=jt,pt.value=tt}function ai({event:I,node:Y,dropPosition:se}){if(!e.draggable||e.disabled||Y.disabled)return;let{value:pe}=Dt,{value:ze}=pt,{value:Lt}=We;if(!(!pe||!ze||!Lt)&&e.allowDrop({node:ze.rawNode,dropPosition:Lt,phase:"drag"})&&pe.key!==ze.key){if(Lt==="before"){let yt=pe.getNext({includeDisabled:!0});if(yt&&yt.key===ze.key){L();return}}if(Lt==="after"){let yt=pe.getPrev({includeDisabled:!0});if(yt&&yt.key===ze.key){L();return}}S({event:I,node:ze.rawNode,dragNode:pe.rawNode,dropPosition:se}),K()}}function kn(){G()}function xr(){G()}function N(I){var Y;if(e.virtualScroll||e.internalScrollable){let{value:se}=i;if(!((Y=se?.containerRef)===null||Y===void 0)&&Y.contains(I.relatedTarget))return;le.value=null}else{let{value:se}=n;if(se?.contains(I.relatedTarget))return;le.value=null}}Qe(le,I=>{var Y,se;if(I!==null){if(e.virtualScroll)(Y=a.value)===null||Y===void 0||Y.scrollTo({key:I});else if(e.internalScrollable){let{value:pe}=i;if(pe===null)return;let ze=(se=pe.contentRef)===null||se===void 0?void 0:se.querySelector(`[data-key="${Bn(I)}"]`);if(!ze)return;pe.scrollTo({el:ze})}}}),Xt(rr,{loadingKeysRef:Me,highlightKeySetRef:He,displayedCheckedKeysRef:W,displayedIndeterminateKeysRef:w,mergedSelectedKeysRef:x,mergedExpandedKeysRef:H,mergedThemeRef:r,mergedCheckStrategyRef:O,nodePropsRef:Ae(e,"nodeProps"),disabledRef:Ae(e,"disabled"),checkableRef:Ae(e,"checkable"),selectableRef:Ae(e,"selectable"),onLoadRef:Ae(e,"onLoad"),draggableRef:Ae(e,"draggable"),blockLineRef:Ae(e,"blockLine"),indentRef:Ae(e,"indent"),cascadeRef:Ae(e,"cascade"),droppingMouseNodeRef:Le,droppingNodeParentRef:Re,draggingNodeRef:Dt,droppingPositionRef:We,droppingOffsetLevelRef:gt,fNodesRef:M,pendingNodeKeyRef:le,internalScrollableRef:Ae(e,"internalScrollable"),internalCheckboxFocusableRef:Ae(e,"internalCheckboxFocusable"),internalTreeSelect:e.internalTreeSelect,renderLabelRef:Ae(e,"renderLabel"),renderPrefixRef:Ae(e,"renderPrefix"),renderSuffixRef:Ae(e,"renderSuffix"),renderSwitcherIconRef:Ae(e,"renderSwitcherIcon"),labelFieldRef:Ae(e,"labelField"),multipleRef:Ae(e,"multiple"),handleSwitcherClick:Be,handleDragEnd:hr,handleDragEnter:$t,handleDragLeave:Ft,handleDragStart:gr,handleDrop:ai,handleDragOver:wn,handleSelect:Ge,handleCheck:he});let ne={handleKeydown:Pe,handleKeyup:ye},Oe=j(()=>{let{common:{cubicBezierEaseInOut:I},self:{fontSize:Y,nodeBorderRadius:se,nodeColorHover:pe,nodeColorPressed:ze,nodeColorActive:Lt,arrowColor:yt,loadingColor:nr,nodeTextColor:ir,nodeTextColorDisabled:Ot,dropMarkColor:It}}=r.value;return{"--n-arrow-color":yt,"--n-loading-color":nr,"--n-bezier":I,"--n-font-size":Y,"--n-node-border-radius":se,"--n-node-color-active":Lt,"--n-node-color-hover":pe,"--n-node-color-pressed":ze,"--n-node-text-color":ir,"--n-node-text-color-disabled":Ot,"--n-drop-mark-color":It}}),st=o?Gt("tree",void 0,Oe,e):void 0;return{mergedClsPrefix:t,mergedTheme:r,fNodes:q,aip:g,selfElRef:n,virtualListInstRef:a,scrollbarInstRef:i,handleFocusout:N,handleDragLeaveTree:ii,handleScroll:kn,getScrollContainer:l,getScrollContent:s,handleAfterEnter:re,handleResize:xr,handleKeydown:ne.handleKeydown,handleKeyup:ne.handleKeyup,cssVars:o?void 0:Oe,themeClass:st?.themeClass,onRender:st?.onRender}},render(){var e;let{fNodes:t,internalRenderEmpty:o}=this;if(!t.length&&o)return o();let{mergedClsPrefix:r,blockNode:n,blockLine:i,draggable:a,disabled:l,internalFocusable:s,checkable:c,handleKeyup:d,handleKeydown:u,handleFocusout:p}=this,f=s&&!l,m=f?"0":void 0,y=[`${r}-tree`,c&&`${r}-tree--checkable`,(i||n)&&`${r}-tree--block-node`,i&&`${r}-tree--block-line`],_=O=>"__motion"in O?v(ny,{height:O.height,nodes:O.nodes,clsPrefix:r,mode:O.mode,onAfterEnter:this.handleAfterEnter}):v(gs,{key:O.key,tmNode:O,clsPrefix:r});if(this.virtualScroll){let{mergedTheme:O,internalScrollablePadding:W}=this,w=$n(W||"0");return v(oa,{ref:"scrollbarInstRef",onDragleave:a?this.handleDragLeaveTree:void 0,container:this.getScrollContainer,content:this.getScrollContent,class:y,theme:O.peers.Scrollbar,themeOverrides:O.peerOverrides.Scrollbar,tabindex:m,onKeyup:f?d:void 0,onKeydown:f?u:void 0,onFocusout:f?p:void 0},{default:()=>{var b;return(b=this.onRender)===null||b===void 0||b.call(this),v(Vi,{ref:"virtualListInstRef",items:this.fNodes,itemSize:xs,ignoreItemResize:this.aip,paddingTop:w.top,paddingBottom:w.bottom,class:this.themeClass,style:[this.cssVars,{paddingLeft:w.left,paddingRight:w.right}],onScroll:this.handleScroll,onResize:this.handleResize,showScrollbar:!1,itemResizable:!0},{default:({item:D})=>_(D)})}})}let{internalScrollable:h}=this;return y.push(this.themeClass),(e=this.onRender)===null||e===void 0||e.call(this),h?v(oa,{class:y,tabindex:m,onKeyup:f?d:void 0,onKeydown:f?u:void 0,onFocusout:f?p:void 0,style:this.cssVars,contentStyle:{padding:this.internalScrollablePadding}},{default:()=>v("div",{onDragleave:a?this.handleDragLeaveTree:void 0,ref:"selfElRef"},this.fNodes.map(_))}):v("div",{class:y,tabindex:m,ref:"selfElRef",style:this.cssVars,onKeyup:f?d:void 0,onKeydown:f?u:void 0,onFocusout:f?p:void 0,onDragleave:a?this.handleDragLeaveTree:void 0},t.length?t.map(_):Yo(this.$slots.empty,()=>{var O,W,w,b;return[v(_d,{class:`${r}-tree__empty`,theme:(W=(O=this.theme)===null||O===void 0?void 0:O.peers)===null||W===void 0?void 0:W.Empty,themeOverrides:(b=(w=this.themeOverrides)===null||w===void 0?void 0:w.peers)===null||b===void 0?void 0:b.Empty})]}))}});var vs={name:"dark",common:R,Alert:Nd,Anchor:Rd,AutoComplete:$d,Avatar:aa,AvatarGroup:Ld,BackTop:zd,Badge:Bd,Breadcrumb:Hd,Button:it,ButtonGroup:Iu,Calendar:Wd,Card:sa,Carousel:Yd,Cascader:Qd,Checkbox:Io,Code:ca,Collapse:tu,CollapseTransition:ou,ColorPicker:Ud,DataTable:uu,DatePicker:vu,Descriptions:bu,Dialog:xa,Divider:Su,Drawer:Eu,Dropdown:ha,DynamicInput:Du,DynamicTags:Tu,Element:Ou,Empty:mo,Ellipsis:pa,Form:Nu,GradientText:Pu,Icon:mu,IconWrapper:Ru,Image:bf,Input:vt,InputNumber:Au,Layout:Mu,List:$u,LoadingBar:Lu,Log:zu,Menu:Vu,Mention:Bu,Message:Fu,Modal:ku,Notification:Wu,PageHeader:Uu,Pagination:ua,Popconfirm:Gu,Popover:Jt,Popselect:Yu,Progress:ba,Radio:ma,Rate:Qu,Result:Ju,Scrollbar:nt,Select:da,Skeleton:yf,Slider:ef,Space:va,Spin:of,Statistic:rf,Steps:nf,Switch:af,Table:lf,Tabs:sf,Tag:ra,Thing:cf,TimePicker:ga,Timeline:df,Tooltip:or,Transfer:uf,Tree:ya,TreeSelect:mf,Typography:hf,Upload:xf,Watermark:vf};var vO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},bO=ut("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8s-8-3.59-8-8s3.59-8 8-8m0-2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm1 10V9c0-.55-.45-1-1-1s-1 .45-1 1v3H9.21c-.45 0-.67.54-.35.85l2.79 2.79c.2.2.51.2.71 0l2.79-2.79a.5.5 0 0 0-.35-.85H13z",fill:"currentColor"},null,-1),yO=[bO];function ay(e,t){return Ze(),ct("svg",vO,yO)}var Df={};Df.render=ay;Df.__file="src/ui/icons/ArrowCircleDownRound.vue";var Tf=Df;var CO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},wO=ut("path",{d:"M11.77 3c-2.65.07-5 1.28-6.6 3.16L3.85 4.85a.5.5 0 0 0-.85.36V9.5c0 .28.22.5.5.5h4.29c.45 0 .67-.54.35-.85L6.59 7.59C7.88 6.02 9.82 5 12 5c4.32 0 7.74 3.94 6.86 8.41c-.54 2.77-2.81 4.98-5.58 5.47c-3.8.68-7.18-1.74-8.05-5.16c-.12-.42-.52-.72-.96-.72c-.65 0-1.14.61-.98 1.23C4.28 18.12 7.8 21 12 21c5.06 0 9.14-4.17 9-9.26c-.14-4.88-4.35-8.86-9.23-8.74zM14 12c0-1.1-.9-2-2-2s-2 .9-2 2s.9 2 2 2s2-.9 2-2z",fill:"currentColor"},null,-1),kO=[wO];function ly(e,t){return Ze(),ct("svg",CO,kO)}var Of={};Of.render=ly;Of.__file="src/ui/icons/SettingsBackupRestoreRound.vue";var Nf=Of;var SO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},_O=ut("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z",fill:"currentColor"},null,-1),EO=ut("path",{d:"M14 17H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z",fill:"currentColor"},null,-1),DO=[_O,EO];function sy(e,t){return Ze(),ct("svg",SO,DO)}var Pf={};Pf.render=sy;Pf.__file="src/ui/icons/ArticleOutlined.vue";var Rf=Pf;var TO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},OO=ut("path",{d:"M12 3v10.55c-.59-.34-1.27-.55-2-.55c-2.21 0-4 1.79-4 4s1.79 4 4 4s4-1.79 4-4V7h4V3h-6zm-2 16c-1.1 0-2-.9-2-2s.9-2 2-2s2 .9 2 2s-.9 2-2 2z",fill:"currentColor"},null,-1),NO=[OO];function cy(e,t){return Ze(),ct("svg",TO,NO)}var If={};If.render=cy;If.__file="src/ui/icons/AudiotrackOutlined.vue";var Af=If;var PO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},RO=ut("path",{d:"M12 2l-5.5 9h11L12 2zm0 3.84L13.93 9h-3.87L12 5.84zM17.5 13c-2.49 0-4.5 2.01-4.5 4.5s2.01 4.5 4.5 4.5s4.5-2.01 4.5-4.5s-2.01-4.5-4.5-4.5zm0 7a2.5 2.5 0 0 1 0-5a2.5 2.5 0 0 1 0 5zM3 21.5h8v-8H3v8zm2-6h4v4H5v-4z",fill:"currentColor"},null,-1),IO=[RO];function dy(e,t){return Ze(),ct("svg",PO,IO)}var Mf={};Mf.render=dy;Mf.__file="src/ui/icons/CategoryOutlined.vue";var $f=Mf;var AO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},MO=ut("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14L6 17h12l-3.86-5.14z",fill:"currentColor"},null,-1),$O=[MO];function uy(e,t){return Ze(),ct("svg",AO,$O)}var Lf={};Lf.render=uy;Lf.__file="src/ui/icons/ImageOutlined.vue";var zf=Lf;var LO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},zO=ut("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zM4 12c0-.61.08-1.21.21-1.78L8.99 15v1c0 1.1.9 2 2 2v1.93C7.06 19.43 4 16.07 4 12zm13.89 5.4c-.26-.81-1-1.4-1.9-1.4h-1v-3c0-.55-.45-1-1-1h-6v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41C17.92 5.77 20 8.65 20 12c0 2.08-.81 3.98-2.11 5.4z",fill:"currentColor"},null,-1),BO=[zO];function fy(e,t){return Ze(),ct("svg",LO,BO)}var Bf={};Bf.render=fy;Bf.__file="src/ui/icons/PublicOutlined.vue";var Hf=Bf;var HO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},VO=ut("path",{d:"M2.5 4v3h5v12h3V7h5V4h-13zm19 5h-9v3h3v7h3v-7h3V9z",fill:"currentColor"},null,-1),FO=[VO];function py(e,t){return Ze(),ct("svg",HO,FO)}var Vf={};Vf.render=py;Vf.__file="src/ui/icons/TextFieldsOutlined.vue";var Ff=Vf;var jO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},WO=ut("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h8v4h4v12zm-6-3c-1.1 0-2-.9-2-2V9.5c0-.28.22-.5.5-.5s.5.22.5.5V15h2V9.5a2.5 2.5 0 0 0-5 0V15c0 2.21 1.79 4 4 4s4-1.79 4-4v-4h-2v4c0 1.1-.9 2-2 2z",fill:"currentColor"},null,-1),KO=[WO];function my(e,t){return Ze(),ct("svg",jO,KO)}var jf={};jf.render=my;jf.__file="src/ui/icons/FilePresentOutlined.vue";var Wf=jf;var UO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},qO=ut("path",{d:"M7.38 21.01c.49.49 1.28.49 1.77 0l8.31-8.31a.996.996 0 0 0 0-1.41L9.15 2.98c-.49-.49-1.28-.49-1.77 0s-.49 1.28 0 1.77L14.62 12l-7.25 7.25c-.48.48-.48 1.28.01 1.76z",fill:"currentColor"},null,-1),GO=[qO];function hy(e,t){return Ze(),ct("svg",UO,GO)}var Kf={};Kf.render=hy;Kf.__file="src/ui/icons/ArrowForwardIosRound.vue";var Uf=Kf;var YO={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},XO=ut("path",{d:"M9 7v8l7-4zm12-4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 14H3V5h18v12z",fill:"currentColor"},null,-1),ZO=[XO];function gy(e,t){return Ze(),ct("svg",YO,ZO)}var qf={};qf.render=gy;qf.__file="src/ui/icons/OndemandVideoOutlined.vue";var Gf=qf;function QO(e){let t=0;for(let o=0;o{let n=QO(r);if(n){if(n===1){e.forEach(a=>{o.push(r.replace("&",a))});return}}else{e.forEach(a=>{o.push((a&&a+" ")+r)});return}let i=[r];for(;n--;){let a=[];i.forEach(l=>{e.forEach(s=>{a.push(l.replace("&",s))})}),i=a}i.forEach(a=>o.push(a))}),o}function tN(e,t){let o=[];return t.split(xy).forEach(r=>{e.forEach(n=>{o.push((n&&n+" ")+r)})}),o}function vy(e){let t=[""];return e.forEach(o=>{o=o&&o.trim(),o&&(o.includes("&")?t=eN(t,o):t=tN(t,o))}),t.join(", ").replace(JO," ")}var oN=/[A-Z]/g;function yy(e){return e.replace(oN,t=>"-"+t.toLowerCase())}function rN(e,t=" "){return typeof e=="object"&&e!==null?` { +`+Object.entries(e).map(o=>t+` ${yy(o[0])}: ${o[1]};`).join(` `)+` -`+t+"}":`: ${e};`}function iP(e,t,o){return typeof e=="function"?e({context:t.context,props:o}):e}function b0(e,t,o,r){if(!t)return"";let n=iP(t,o,r);if(!n)return"";if(typeof n=="string")return`${e} { +`+t+"}":`: ${e};`}function nN(e,t,o){return typeof e=="function"?e({context:t.context,props:o}):e}function by(e,t,o,r){if(!t)return"";let n=nN(t,o,r);if(!n)return"";if(typeof n=="string")return`${e} { ${n} }`;let i=Object.keys(n);if(i.length===0)return o.config.keepEmptyBlock?e+` { }`:"";let a=e?[e+" {"]:[];return i.forEach(l=>{let s=n[l];if(l==="raw"){a.push(` `+s+` -`);return}l=y0(l),s!=null&&a.push(` ${l}${nP(s)}`)}),e&&a.push("}"),a.join(` -`)}function Yf(e,t,o){e&&e.forEach(r=>{if(Array.isArray(r))Yf(r,t,o);else if(typeof r=="function"){let n=r(t);Array.isArray(n)?Yf(n,t,o):n&&o(n)}else r&&o(r)})}function C0(e,t,o,r,n,i){let a=e.$;!a||typeof a=="string"?t.push(a):typeof a=="function"?t.push(a({context:r.context,props:n})):(a.before&&a.before(r.context),!a.$||typeof a.$=="string"?t.push(a.$):a.$&&t.push(a.$({context:r.context,props:n})));let l=v0(t),s=b0(l,e.props,r,n);i&&s&&i.insertRule(s),!i&&s.length&&o.push(s),e.children&&Yf(e.children,{context:r.context,props:n},c=>{if(typeof c=="string"){let d=b0(l,{raw:c},r,n);i?i.insertRule(d):o.push(d)}else C0(c,t,o,r,n,i)}),t.pop(),a&&a.after&&a.after(r.context)}function vs(e,t,o,r=!1){let n=[];return C0(e,[],n,t,o,r?e.instance.__styleSheet:void 0),r?"":n.join(` +`);return}l=yy(l),s!=null&&a.push(` ${l}${rN(s)}`)}),e&&a.push("}"),a.join(` +`)}function Yf(e,t,o){e&&e.forEach(r=>{if(Array.isArray(r))Yf(r,t,o);else if(typeof r=="function"){let n=r(t);Array.isArray(n)?Yf(n,t,o):n&&o(n)}else r&&o(r)})}function Cy(e,t,o,r,n,i){let a=e.$;!a||typeof a=="string"?t.push(a):typeof a=="function"?t.push(a({context:r.context,props:n})):(a.before&&a.before(r.context),!a.$||typeof a.$=="string"?t.push(a.$):a.$&&t.push(a.$({context:r.context,props:n})));let l=vy(t),s=by(l,e.props,r,n);i&&s&&i.insertRule(s),!i&&s.length&&o.push(s),e.children&&Yf(e.children,{context:r.context,props:n},c=>{if(typeof c=="string"){let d=by(l,{raw:c},r,n);i?i.insertRule(d):o.push(d)}else Cy(c,t,o,r,n,i)}),t.pop(),a&&a.after&&a.after(r.context)}function bs(e,t,o,r=!1){let n=[];return Cy(e,[],n,t,o,r?e.instance.__styleSheet:void 0),r?"":n.join(` -`)}function bs(e){if(!e)return;let t=e.parentElement;t&&t.removeChild(e)}function Ca(e){return document.querySelector(`style[cssr-id="${e}"]`)}function w0(e){let t=document.createElement("style");return t.setAttribute("cssr-id",e),t}window&&(window.__cssrContext={});function k0(e){let t=e.getAttribute("mount-count");return t===null?null:Number(t)}function Xf(e,t){e.setAttribute("mount-count",String(t))}function Zf(e,t,o,r){let{els:n}=t;if(o===void 0)n.forEach(bs),t.els=[];else{let i=Ca(o);if(i&&n.includes(i)){let a=k0(i);r?a===null?console.error(`[css-render/unmount]: The style with target='${o}' is mounted in count mode.`):a<=1?(bs(i),t.els=n.filter(l=>l!==i)):Xf(i,a-1):a!==null?console.error(`[css-render/unmount]: The style with target='${o}' is mounted in no-count mode.`):(bs(i),t.els=n.filter(l=>l!==i))}}}function aP(e,t){e.push(t)}function S0(e,t,o,r,n,i,a,l,s){if(a&&!s){if(o===void 0){console.error("[css-render/mount]: `id` is required in `boost` mode.");return}let f=window.__cssrContext;f[o]||(f[o]=!0,vs(t,e,r,a));return}let c,{els:d}=t,u;if(o===void 0&&(u=t.render(r),o=so(u)),s){s(o,u??t.render(r));return}let p=Ca(o);if(l||p===null){if(c=p===null?w0(o):p,u===void 0&&(u=t.render(r)),c.textContent=u,p!==null)return;if(n){let f=document.head.getElementsByTagName("style")[0]||null;document.head.insertBefore(c,f)}else document.head.appendChild(c);i&&Xf(c,1),aP(d,c)}else{let f=k0(p);i?f===null?console.error(`[css-render/mount]: The style with id='${o}' has been mounted in no-count mode.`):Xf(p,f+1):f!==null&&console.error(`[css-render/mount]: The style with id='${o}' has been mounted in count mode.`)}return p??c}function lP(e){return vs(this,this.instance,e)}function sP(e={}){let{target:t,id:o,ssr:r,props:n,count:i=!1,head:a=!1,boost:l=!1,force:s=!1}=e;return S0(this.instance,this,o??t,n,a,i,l,s,r)}function cP(e={}){let{id:t,target:o,delay:r=0,count:n=!1}=e;r===0?Zf(this.instance,this,t??o,n):setTimeout(()=>Zf(this.instance,this,t??o,n),r)}var ys=function(e,t,o,r){return{instance:e,$:t,props:o,children:r,els:[],render:lP,mount:sP,unmount:cP}},_0=function(e,t,o,r){return Array.isArray(t)?ys(e,{$:null},null,t):Array.isArray(o)?ys(e,t,null,o):Array.isArray(r)?ys(e,t,o,r):ys(e,t,o,null)};function Qf(e={}){let t=null,o={c:(...r)=>_0(o,...r),use:(r,...n)=>r.install(o,...n),find:Ca,context:{},config:e,get __styleSheet(){if(!t){let r=document.createElement("style");return document.head.appendChild(r),t=document.styleSheets[document.styleSheets.length-1],t}return t}};return o}var{c:Jf}=Qf(),dP=Jf(".xicon",{width:"1em",height:"1em",display:"inline-flex"},[Jf("svg",{width:"1em",height:"1em"}),Jf("svg:not([fill])",{fill:"currentColor"})]),ep=()=>{dP.mount({id:"xicons-icon"})};var tp={size:[String,Number],color:String,tag:String},op=Symbol("IconConfigInjection"),uP=ue({name:"IconConfigProvider",props:tp,setup(e,{slots:t}){return Yt(op,e),()=>An(t,"default")}});var E0="span";var wa=ue({name:"Icon",props:tp,setup(e,{slots:t}){let o=ke(op,null),r=F(()=>{var a;let l=(a=e.size)!==null&&a!==void 0?a:o?.size;if(l!==void 0)return typeof l=="number"||/^\d+$/.test(l)?`${l}px`:l}),n=F(()=>{let{color:a}=e;return a===void 0?o?o.color:void 0:a}),i=F(()=>{var a;let{tag:l}=e;return l===void 0?(a=o?.tag)!==null&&a!==void 0?a:E0:l});return cr(()=>{ep()}),()=>b(i.value,{class:"xicon",style:{color:n.value,fontSize:r.value}},[An(t,"default")])}});function I0(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var ti=I0();function fP(e){ti=e}var pP=/[&<>"']/,mP=/[&<>"']/g,hP=/[<>"']|&(?!#?\w+;)/,gP=/[<>"']|&(?!#?\w+;)/g,xP={"&":"&","<":"<",">":">",'"':""","'":"'"},D0=e=>xP[e];function $t(e,t){if(t){if(pP.test(e))return e.replace(mP,D0)}else if(hP.test(e))return e.replace(gP,D0);return e}var vP=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function A0(e){return e.replace(vP,(t,o)=>(o=o.toLowerCase(),o==="colon"?":":o.charAt(0)==="#"?o.charAt(1)==="x"?String.fromCharCode(parseInt(o.substring(2),16)):String.fromCharCode(+o.substring(1)):""))}var bP=/(^|[^\[])\^/g;function st(e,t){e=e.source||e,t=t||"";let o={replace:(r,n)=>(n=n.source||n,n=n.replace(bP,"$1"),e=e.replace(r,n),o),getRegex:()=>new RegExp(e,t)};return o}var yP=/[^\w:]/g,CP=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function T0(e,t,o){if(e){let r;try{r=decodeURIComponent(A0(o)).replace(yP,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!CP.test(o)&&(o=_P(t,o));try{o=encodeURI(o).replace(/%25/g,"%")}catch{return null}return o}var Cs={},wP=/^[^:]+:\/*[^/]*$/,kP=/^([^:]+:)[\s\S]*$/,SP=/^([^:]+:\/*[^/]*)[\s\S]*$/;function _P(e,t){Cs[" "+e]||(wP.test(e)?Cs[" "+e]=e+"/":Cs[" "+e]=ws(e,"/",!0)),e=Cs[" "+e];let o=e.indexOf(":")===-1;return t.substring(0,2)==="//"?o?t:e.replace(kP,"$1")+t:t.charAt(0)==="/"?o?t:e.replace(SP,"$1")+t:e+t}var ks={exec:function(){}};function $o(e){let t=1,o,r;for(;t{let s=!1,c=a;for(;--c>=0&&l[c]==="\\";)s=!s;return s?"|":" |"}),r=o.split(/ \|/),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length1;)t&1&&(o+=e),t>>=1,e+=e;return o+e}function N0(e,t,o,r){let n=t.href,i=t.title?$t(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;let l={type:"link",raw:o,href:n,title:i,text:a,tokens:r.inlineTokens(a,[])};return r.state.inLink=!1,l}else return{type:"image",raw:o,href:n,title:i,text:$t(a)}}function DP(e,t){let o=e.match(/^(\s+)(?:```)/);if(o===null)return t;let r=o[1];return t.split(` +`)}function ys(e){if(!e)return;let t=e.parentElement;t&&t.removeChild(e)}function Ca(e){return document.querySelector(`style[cssr-id="${e}"]`)}function wy(e){let t=document.createElement("style");return t.setAttribute("cssr-id",e),t}window&&(window.__cssrContext={});function ky(e){let t=e.getAttribute("mount-count");return t===null?null:Number(t)}function Xf(e,t){e.setAttribute("mount-count",String(t))}function Zf(e,t,o,r){let{els:n}=t;if(o===void 0)n.forEach(ys),t.els=[];else{let i=Ca(o);if(i&&n.includes(i)){let a=ky(i);r?a===null?console.error(`[css-render/unmount]: The style with target='${o}' is mounted in count mode.`):a<=1?(ys(i),t.els=n.filter(l=>l!==i)):Xf(i,a-1):a!==null?console.error(`[css-render/unmount]: The style with target='${o}' is mounted in no-count mode.`):(ys(i),t.els=n.filter(l=>l!==i))}}}function iN(e,t){e.push(t)}function Sy(e,t,o,r,n,i,a,l,s){if(a&&!s){if(o===void 0){console.error("[css-render/mount]: `id` is required in `boost` mode.");return}let f=window.__cssrContext;f[o]||(f[o]=!0,bs(t,e,r,a));return}let c,{els:d}=t,u;if(o===void 0&&(u=t.render(r),o=uo(u)),s){s(o,u??t.render(r));return}let p=Ca(o);if(l||p===null){if(c=p===null?wy(o):p,u===void 0&&(u=t.render(r)),c.textContent=u,p!==null)return;if(n){let f=document.head.getElementsByTagName("style")[0]||null;document.head.insertBefore(c,f)}else document.head.appendChild(c);i&&Xf(c,1),iN(d,c)}else{let f=ky(p);i?f===null?console.error(`[css-render/mount]: The style with id='${o}' has been mounted in no-count mode.`):Xf(p,f+1):f!==null&&console.error(`[css-render/mount]: The style with id='${o}' has been mounted in count mode.`)}return p??c}function aN(e){return bs(this,this.instance,e)}function lN(e={}){let{target:t,id:o,ssr:r,props:n,count:i=!1,head:a=!1,boost:l=!1,force:s=!1}=e;return Sy(this.instance,this,o??t,n,a,i,l,s,r)}function sN(e={}){let{id:t,target:o,delay:r=0,count:n=!1}=e;r===0?Zf(this.instance,this,t??o,n):setTimeout(()=>Zf(this.instance,this,t??o,n),r)}var Cs=function(e,t,o,r){return{instance:e,$:t,props:o,children:r,els:[],render:aN,mount:lN,unmount:sN}},_y=function(e,t,o,r){return Array.isArray(t)?Cs(e,{$:null},null,t):Array.isArray(o)?Cs(e,t,null,o):Array.isArray(r)?Cs(e,t,o,r):Cs(e,t,o,null)};function Qf(e={}){let t=null,o={c:(...r)=>_y(o,...r),use:(r,...n)=>r.install(o,...n),find:Ca,context:{},config:e,get __styleSheet(){if(!t){let r=document.createElement("style");return document.head.appendChild(r),t=document.styleSheets[document.styleSheets.length-1],t}return t}};return o}var{c:Jf}=Qf(),cN=Jf(".xicon",{width:"1em",height:"1em",display:"inline-flex"},[Jf("svg",{width:"1em",height:"1em"}),Jf("svg:not([fill])",{fill:"currentColor"})]),ep=()=>{cN.mount({id:"xicons-icon"})};var tp={size:[String,Number],color:String,tag:String},op=Symbol("IconConfigInjection"),dN=de({name:"IconConfigProvider",props:tp,setup(e,{slots:t}){return Xt(op,e),()=>An(t,"default")}});var Ey="span";var wa=de({name:"Icon",props:tp,setup(e,{slots:t}){let o=we(op,null),r=j(()=>{var a;let l=(a=e.size)!==null&&a!==void 0?a:o?.size;if(l!==void 0)return typeof l=="number"||/^\d+$/.test(l)?`${l}px`:l}),n=j(()=>{let{color:a}=e;return a===void 0?o?o.color:void 0:a}),i=j(()=>{var a;let{tag:l}=e;return l===void 0?(a=o?.tag)!==null&&a!==void 0?a:Ey:l});return cr(()=>{ep()}),()=>v(i.value,{class:"xicon",style:{color:n.value,fontSize:r.value}},[An(t,"default")])}});function Iy(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}var ti=Iy();function uN(e){ti=e}var fN=/[&<>"']/,pN=/[&<>"']/g,mN=/[<>"']|&(?!#?\w+;)/,hN=/[<>"']|&(?!#?\w+;)/g,gN={"&":"&","<":"<",">":">",'"':""","'":"'"},Dy=e=>gN[e];function Mt(e,t){if(t){if(fN.test(e))return e.replace(pN,Dy)}else if(mN.test(e))return e.replace(hN,Dy);return e}var xN=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Ay(e){return e.replace(xN,(t,o)=>(o=o.toLowerCase(),o==="colon"?":":o.charAt(0)==="#"?o.charAt(1)==="x"?String.fromCharCode(parseInt(o.substring(2),16)):String.fromCharCode(+o.substring(1)):""))}var vN=/(^|[^\[])\^/g;function at(e,t){e=e.source||e,t=t||"";let o={replace:(r,n)=>(n=n.source||n,n=n.replace(vN,"$1"),e=e.replace(r,n),o),getRegex:()=>new RegExp(e,t)};return o}var bN=/[^\w:]/g,yN=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ty(e,t,o){if(e){let r;try{r=decodeURIComponent(Ay(o)).replace(bN,"").toLowerCase()}catch{return null}if(r.indexOf("javascript:")===0||r.indexOf("vbscript:")===0||r.indexOf("data:")===0)return null}t&&!yN.test(o)&&(o=SN(t,o));try{o=encodeURI(o).replace(/%25/g,"%")}catch{return null}return o}var ws={},CN=/^[^:]+:\/*[^/]*$/,wN=/^([^:]+:)[\s\S]*$/,kN=/^([^:]+:\/*[^/]*)[\s\S]*$/;function SN(e,t){ws[" "+e]||(CN.test(e)?ws[" "+e]=e+"/":ws[" "+e]=ks(e,"/",!0)),e=ws[" "+e];let o=e.indexOf(":")===-1;return t.substring(0,2)==="//"?o?t:e.replace(wN,"$1")+t:t.charAt(0)==="/"?o?t:e.replace(kN,"$1")+t:e+t}var Ss={exec:function(){}};function $o(e){let t=1,o,r;for(;t{let s=!1,c=a;for(;--c>=0&&l[c]==="\\";)s=!s;return s?"|":" |"}),r=o.split(/ \|/),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length1;)t&1&&(o+=e),t>>=1,e+=e;return o+e}function Py(e,t,o,r){let n=t.href,i=t.title?Mt(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;let l={type:"link",raw:o,href:n,title:i,text:a,tokens:r.inlineTokens(a,[])};return r.state.inLink=!1,l}else return{type:"image",raw:o,href:n,title:i,text:Mt(a)}}function EN(e,t){let o=e.match(/^(\s+)(?:```)/);if(o===null)return t;let r=o[1];return t.split(` `).map(n=>{let i=n.match(/^\s+/);if(i===null)return n;let[a]=i;return a.length>=r.length?n.slice(r.length):n}).join(` -`)}var ka=class{constructor(t){this.options=t||ti}space(t){let o=this.rules.block.newline.exec(t);if(o&&o[0].length>0)return{type:"space",raw:o[0]}}code(t){let o=this.rules.block.code.exec(t);if(o){let r=o[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:o[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ws(r,` -`)}}}fences(t){let o=this.rules.block.fences.exec(t);if(o){let r=o[0],n=DP(r,o[3]||"");return{type:"code",raw:r,lang:o[2]?o[2].trim():o[2],text:n}}}heading(t){let o=this.rules.block.heading.exec(t);if(o){let r=o[2].trim();if(/#$/.test(r)){let i=ws(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}let n={type:"heading",raw:o[0],depth:o[1].length,text:r,tokens:[]};return this.lexer.inline(n.text,n.tokens),n}}hr(t){let o=this.rules.block.hr.exec(t);if(o)return{type:"hr",raw:o[0]}}blockquote(t){let o=this.rules.block.blockquote.exec(t);if(o){let r=o[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:o[0],tokens:this.lexer.blockTokens(r,[]),text:r}}}list(t){let o=this.rules.block.list.exec(t);if(o){let r,n,i,a,l,s,c,d,u,p,f,m,y=o[1].trim(),w=y.length>1,g={type:"list",raw:"",ordered:w,start:w?+y.slice(0,-1):"",loose:!1,items:[]};y=w?`\\d{1,9}\\${y.slice(-1)}`:`\\${y}`,this.options.pedantic&&(y=w?y:"[*+-]");let O=new RegExp(`^( {0,3}${y})((?: [^\\n]*)?(?:\\n|$))`);for(;t&&(m=!1,!(!(o=O.exec(t))||this.rules.block.hr.test(t)));){if(r=o[0],t=t.substring(r.length),d=o[2].split(` +`)}var ka=class{constructor(t){this.options=t||ti}space(t){let o=this.rules.block.newline.exec(t);if(o&&o[0].length>0)return{type:"space",raw:o[0]}}code(t){let o=this.rules.block.code.exec(t);if(o){let r=o[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:o[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ks(r,` +`)}}}fences(t){let o=this.rules.block.fences.exec(t);if(o){let r=o[0],n=EN(r,o[3]||"");return{type:"code",raw:r,lang:o[2]?o[2].trim():o[2],text:n}}}heading(t){let o=this.rules.block.heading.exec(t);if(o){let r=o[2].trim();if(/#$/.test(r)){let i=ks(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}let n={type:"heading",raw:o[0],depth:o[1].length,text:r,tokens:[]};return this.lexer.inline(n.text,n.tokens),n}}hr(t){let o=this.rules.block.hr.exec(t);if(o)return{type:"hr",raw:o[0]}}blockquote(t){let o=this.rules.block.blockquote.exec(t);if(o){let r=o[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:o[0],tokens:this.lexer.blockTokens(r,[]),text:r}}}list(t){let o=this.rules.block.list.exec(t);if(o){let r,n,i,a,l,s,c,d,u,p,f,m,y=o[1].trim(),_=y.length>1,h={type:"list",raw:"",ordered:_,start:_?+y.slice(0,-1):"",loose:!1,items:[]};y=_?`\\d{1,9}\\${y.slice(-1)}`:`\\${y}`,this.options.pedantic&&(y=_?y:"[*+-]");let O=new RegExp(`^( {0,3}${y})((?: [^\\n]*)?(?:\\n|$))`);for(;t&&(m=!1,!(!(o=O.exec(t))||this.rules.block.hr.test(t)));){if(r=o[0],t=t.substring(r.length),d=o[2].split(` `,1)[0],u=t.split(` `,1)[0],this.options.pedantic?(a=2,f=d.trimLeft()):(a=o[2].search(/[^ ]/),a=a>4?1:a,f=d.slice(a),a+=o[1].length),s=!1,!d&&/^ *$/.test(u)&&(r+=u+` -`,t=t.substring(u.length+1),m=!0),!m){let S=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;t&&(p=t.split(` -`,1)[0],d=p,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!S.test(d));){if(d.search(/[^ ]/)>=a||!d.trim())f+=` +`,t=t.substring(u.length+1),m=!0),!m){let w=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;t&&(p=t.split(` +`,1)[0],d=p,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!w.test(d));){if(d.search(/[^ ]/)>=a||!d.trim())f+=` `+d.slice(a);else if(!s)f+=` `+d;else break;!s&&!d.trim()&&(s=!0),r+=p+` -`,t=t.substring(p.length+1)}}g.loose||(c?g.loose=!0:/\n *\n *$/.test(r)&&(c=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(f),n&&(i=n[0]!=="[ ] ",f=f.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:r,task:!!n,checked:i,loose:!1,text:f}),g.raw+=r}g.items[g.items.length-1].raw=r.trimRight(),g.items[g.items.length-1].text=f.trimRight(),g.raw=g.raw.trimRight();let j=g.items.length;for(l=0;lD.type==="space"),v=S.every(D=>{let x=D.raw.split(""),k=0;for(let A of x)if(A===` -`&&(k+=1),k>1)return!0;return!1});!g.loose&&S.length&&v&&(g.loose=!0,g.items[l].loose=!0)}return g}}html(t){let o=this.rules.block.html.exec(t);if(o){let r={type:"html",raw:o[0],pre:!this.options.sanitizer&&(o[1]==="pre"||o[1]==="script"||o[1]==="style"),text:o[0]};return this.options.sanitize&&(r.type="paragraph",r.text=this.options.sanitizer?this.options.sanitizer(o[0]):$t(o[0]),r.tokens=[],this.lexer.inline(r.text,r.tokens)),r}}def(t){let o=this.rules.block.def.exec(t);if(o)return o[3]&&(o[3]=o[3].substring(1,o[3].length-1)),{type:"def",tag:o[1].toLowerCase().replace(/\s+/g," "),raw:o[0],href:o[2],title:o[3]}}table(t){let o=this.rules.block.table.exec(t);if(o){let r={type:"table",header:O0(o[1]).map(n=>({text:n})),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:o[3]&&o[3].trim()?o[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(r.header.length===r.align.length){r.raw=o[0];let n=r.align.length,i,a,l,s;for(i=0;i({text:c}));for(n=r.header.length,a=0;a/i.test(o[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(o[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(o[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:o[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):$t(o[0]):o[0]}}link(t){let o=this.rules.inline.link.exec(t);if(o){let r=o[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;let a=ws(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=EP(o[2],"()");if(a>-1){let s=(o[0].indexOf("!")===0?5:4)+o[1].length+a;o[2]=o[2].substring(0,a),o[0]=o[0].substring(0,s).trim(),o[3]=""}}let n=o[2],i="";if(this.options.pedantic){let a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);a&&(n=a[1],i=a[3])}else i=o[3]?o[3].slice(1,-1):"";return n=n.trim(),/^$/.test(r)?n=n.slice(1):n=n.slice(1,-1)),N0(o,{href:n&&n.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},o[0],this.lexer)}}reflink(t,o){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(/\s+/g," ");if(n=o[n.toLowerCase()],!n||!n.href){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return N0(r,n,r[0],this.lexer)}}emStrong(t,o,r=""){let n=this.rules.inline.emStrong.lDelim.exec(t);if(!n||n[3]&&r.match(/[\p{L}\p{N}]/u))return;let i=n[1]||n[2]||"";if(!i||i&&(r===""||this.rules.inline.punctuation.exec(r))){let a=n[0].length-1,l,s,c=a,d=0,u=n[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(u.lastIndex=0,o=o.slice(-1*t.length+a);(n=u.exec(o))!=null;){if(l=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!l)continue;if(s=l.length,n[3]||n[4]){c+=s;continue}else if((n[5]||n[6])&&a%3&&!((a+s)%3)){d+=s;continue}if(c-=s,c>0)continue;if(s=Math.min(s,s+c+d),Math.min(a,s)%2){let f=t.slice(1,a+n.index+s);return{type:"em",raw:t.slice(0,a+n.index+s+1),text:f,tokens:this.lexer.inlineTokens(f,[])}}let p=t.slice(2,a+n.index+s-1);return{type:"strong",raw:t.slice(0,a+n.index+s+1),text:p,tokens:this.lexer.inlineTokens(p,[])}}}}codespan(t){let o=this.rules.inline.code.exec(t);if(o){let r=o[2].replace(/\n/g," "),n=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return n&&i&&(r=r.substring(1,r.length-1)),r=$t(r,!0),{type:"codespan",raw:o[0],text:r}}}br(t){let o=this.rules.inline.br.exec(t);if(o)return{type:"br",raw:o[0]}}del(t){let o=this.rules.inline.del.exec(t);if(o)return{type:"del",raw:o[0],text:o[2],tokens:this.lexer.inlineTokens(o[2],[])}}autolink(t,o){let r=this.rules.inline.autolink.exec(t);if(r){let n,i;return r[2]==="@"?(n=$t(this.options.mangle?o(r[1]):r[1]),i="mailto:"+n):(n=$t(r[1]),i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t,o){let r;if(r=this.rules.inline.url.exec(t)){let n,i;if(r[2]==="@")n=$t(this.options.mangle?o(r[0]):r[0]),i="mailto:"+n;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(a!==r[0]);n=$t(r[0]),r[1]==="www."?i="http://"+n:i=n}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t,o){let r=this.rules.inline.text.exec(t);if(r){let n;return this.lexer.state.inRawBlock?n=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):$t(r[0]):r[0]:n=$t(this.options.smartypants?o(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}},Ee={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:ks,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Ee._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Ee._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Ee.def=st(Ee.def).replace("label",Ee._label).replace("title",Ee._title).getRegex();Ee.bullet=/(?:[*+-]|\d{1,9}[.)])/;Ee.listItemStart=st(/^( *)(bull) */).replace("bull",Ee.bullet).getRegex();Ee.list=st(Ee.list).replace(/bull/g,Ee.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ee.def.source+")").getRegex();Ee._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";Ee._comment=/|$)/;Ee.html=st(Ee.html,"i").replace("comment",Ee._comment).replace("tag",Ee._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Ee.paragraph=st(Ee._paragraph).replace("hr",Ee.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ee._tag).getRegex();Ee.blockquote=st(Ee.blockquote).replace("paragraph",Ee.paragraph).getRegex();Ee.normal=$o({},Ee);Ee.gfm=$o({},Ee.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});Ee.gfm.table=st(Ee.gfm.table).replace("hr",Ee.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ee._tag).getRegex();Ee.gfm.paragraph=st(Ee._paragraph).replace("hr",Ee.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Ee.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ee._tag).getRegex();Ee.pedantic=$o({},Ee.normal,{html:st(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ee._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ks,paragraph:st(Ee.normal._paragraph).replace("hr",Ee.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",Ee.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ve={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ks,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ks,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";ve.punctuation=st(ve.punctuation).replace(/punctuation/g,ve._punctuation).getRegex();ve.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;ve.escapedEmSt=/\\\*|\\_/g;ve._comment=st(Ee._comment).replace("(?:-->|$)","-->").getRegex();ve.emStrong.lDelim=st(ve.emStrong.lDelim).replace(/punct/g,ve._punctuation).getRegex();ve.emStrong.rDelimAst=st(ve.emStrong.rDelimAst,"g").replace(/punct/g,ve._punctuation).getRegex();ve.emStrong.rDelimUnd=st(ve.emStrong.rDelimUnd,"g").replace(/punct/g,ve._punctuation).getRegex();ve._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;ve._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;ve._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;ve.autolink=st(ve.autolink).replace("scheme",ve._scheme).replace("email",ve._email).getRegex();ve._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;ve.tag=st(ve.tag).replace("comment",ve._comment).replace("attribute",ve._attribute).getRegex();ve._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;ve._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;ve._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;ve.link=st(ve.link).replace("label",ve._label).replace("href",ve._href).replace("title",ve._title).getRegex();ve.reflink=st(ve.reflink).replace("label",ve._label).replace("ref",Ee._label).getRegex();ve.nolink=st(ve.nolink).replace("ref",Ee._label).getRegex();ve.reflinkSearch=st(ve.reflinkSearch,"g").replace("reflink",ve.reflink).replace("nolink",ve.nolink).getRegex();ve.normal=$o({},ve);ve.pedantic=$o({},ve.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:st(/^!?\[(label)\]\((.*?)\)/).replace("label",ve._label).getRegex(),reflink:st(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ve._label).getRegex()});ve.gfm=$o({},ve.normal,{escape:st(ve.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(r="x"+r.toString(16)),t+="&#"+r+";";return t}var Ao=class{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ti,this.options.tokenizer=this.options.tokenizer||new ka,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let o={block:Ee.normal,inline:ve.normal};this.options.pedantic?(o.block=Ee.pedantic,o.inline=ve.pedantic):this.options.gfm&&(o.block=Ee.gfm,this.options.breaks?o.inline=ve.breaks:o.inline=ve.gfm),this.tokenizer.rules=o}static get rules(){return{block:Ee,inline:ve}}static lex(t,o){return new Ao(o).lex(t)}static lexInline(t,o){return new Ao(o).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,` +`,t=t.substring(p.length+1)}}h.loose||(c?h.loose=!0:/\n *\n *$/.test(r)&&(c=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(f),n&&(i=n[0]!=="[ ] ",f=f.replace(/^\[[ xX]\] +/,""))),h.items.push({type:"list_item",raw:r,task:!!n,checked:i,loose:!1,text:f}),h.raw+=r}h.items[h.items.length-1].raw=r.trimRight(),h.items[h.items.length-1].text=f.trimRight(),h.raw=h.raw.trimRight();let W=h.items.length;for(l=0;lD.type==="space"),b=w.every(D=>{let x=D.raw.split(""),k=0;for(let A of x)if(A===` +`&&(k+=1),k>1)return!0;return!1});!h.loose&&w.length&&b&&(h.loose=!0,h.items[l].loose=!0)}return h}}html(t){let o=this.rules.block.html.exec(t);if(o){let r={type:"html",raw:o[0],pre:!this.options.sanitizer&&(o[1]==="pre"||o[1]==="script"||o[1]==="style"),text:o[0]};return this.options.sanitize&&(r.type="paragraph",r.text=this.options.sanitizer?this.options.sanitizer(o[0]):Mt(o[0]),r.tokens=[],this.lexer.inline(r.text,r.tokens)),r}}def(t){let o=this.rules.block.def.exec(t);if(o)return o[3]&&(o[3]=o[3].substring(1,o[3].length-1)),{type:"def",tag:o[1].toLowerCase().replace(/\s+/g," "),raw:o[0],href:o[2],title:o[3]}}table(t){let o=this.rules.block.table.exec(t);if(o){let r={type:"table",header:Oy(o[1]).map(n=>({text:n})),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:o[3]&&o[3].trim()?o[3].replace(/\n[ \t]*$/,"").split(` +`):[]};if(r.header.length===r.align.length){r.raw=o[0];let n=r.align.length,i,a,l,s;for(i=0;i({text:c}));for(n=r.header.length,a=0;a/i.test(o[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(o[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(o[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:o[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):Mt(o[0]):o[0]}}link(t){let o=this.rules.inline.link.exec(t);if(o){let r=o[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;let a=ks(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=_N(o[2],"()");if(a>-1){let s=(o[0].indexOf("!")===0?5:4)+o[1].length+a;o[2]=o[2].substring(0,a),o[0]=o[0].substring(0,s).trim(),o[3]=""}}let n=o[2],i="";if(this.options.pedantic){let a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);a&&(n=a[1],i=a[3])}else i=o[3]?o[3].slice(1,-1):"";return n=n.trim(),/^$/.test(r)?n=n.slice(1):n=n.slice(1,-1)),Py(o,{href:n&&n.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},o[0],this.lexer)}}reflink(t,o){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(/\s+/g," ");if(n=o[n.toLowerCase()],!n||!n.href){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Py(r,n,r[0],this.lexer)}}emStrong(t,o,r=""){let n=this.rules.inline.emStrong.lDelim.exec(t);if(!n||n[3]&&r.match(/[\p{L}\p{N}]/u))return;let i=n[1]||n[2]||"";if(!i||i&&(r===""||this.rules.inline.punctuation.exec(r))){let a=n[0].length-1,l,s,c=a,d=0,u=n[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(u.lastIndex=0,o=o.slice(-1*t.length+a);(n=u.exec(o))!=null;){if(l=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!l)continue;if(s=l.length,n[3]||n[4]){c+=s;continue}else if((n[5]||n[6])&&a%3&&!((a+s)%3)){d+=s;continue}if(c-=s,c>0)continue;if(s=Math.min(s,s+c+d),Math.min(a,s)%2){let f=t.slice(1,a+n.index+s);return{type:"em",raw:t.slice(0,a+n.index+s+1),text:f,tokens:this.lexer.inlineTokens(f,[])}}let p=t.slice(2,a+n.index+s-1);return{type:"strong",raw:t.slice(0,a+n.index+s+1),text:p,tokens:this.lexer.inlineTokens(p,[])}}}}codespan(t){let o=this.rules.inline.code.exec(t);if(o){let r=o[2].replace(/\n/g," "),n=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return n&&i&&(r=r.substring(1,r.length-1)),r=Mt(r,!0),{type:"codespan",raw:o[0],text:r}}}br(t){let o=this.rules.inline.br.exec(t);if(o)return{type:"br",raw:o[0]}}del(t){let o=this.rules.inline.del.exec(t);if(o)return{type:"del",raw:o[0],text:o[2],tokens:this.lexer.inlineTokens(o[2],[])}}autolink(t,o){let r=this.rules.inline.autolink.exec(t);if(r){let n,i;return r[2]==="@"?(n=Mt(this.options.mangle?o(r[1]):r[1]),i="mailto:"+n):(n=Mt(r[1]),i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t,o){let r;if(r=this.rules.inline.url.exec(t)){let n,i;if(r[2]==="@")n=Mt(this.options.mangle?o(r[0]):r[0]),i="mailto:"+n;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0];while(a!==r[0]);n=Mt(r[0]),r[1]==="www."?i="http://"+n:i=n}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t,o){let r=this.rules.inline.text.exec(t);if(r){let n;return this.lexer.state.inRawBlock?n=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):Mt(r[0]):r[0]:n=Mt(this.options.smartypants?o(r[0]):r[0]),{type:"text",raw:r[0],text:n}}}},Ee={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Ss,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};Ee._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;Ee._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;Ee.def=at(Ee.def).replace("label",Ee._label).replace("title",Ee._title).getRegex();Ee.bullet=/(?:[*+-]|\d{1,9}[.)])/;Ee.listItemStart=at(/^( *)(bull) */).replace("bull",Ee.bullet).getRegex();Ee.list=at(Ee.list).replace(/bull/g,Ee.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ee.def.source+")").getRegex();Ee._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";Ee._comment=/|$)/;Ee.html=at(Ee.html,"i").replace("comment",Ee._comment).replace("tag",Ee._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();Ee.paragraph=at(Ee._paragraph).replace("hr",Ee.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ee._tag).getRegex();Ee.blockquote=at(Ee.blockquote).replace("paragraph",Ee.paragraph).getRegex();Ee.normal=$o({},Ee);Ee.gfm=$o({},Ee.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});Ee.gfm.table=at(Ee.gfm.table).replace("hr",Ee.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ee._tag).getRegex();Ee.gfm.paragraph=at(Ee._paragraph).replace("hr",Ee.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Ee.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Ee._tag).getRegex();Ee.pedantic=$o({},Ee.normal,{html:at(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ee._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ss,paragraph:at(Ee.normal._paragraph).replace("hr",Ee.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Ee.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ve={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ss,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Ss,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";ve.punctuation=at(ve.punctuation).replace(/punctuation/g,ve._punctuation).getRegex();ve.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;ve.escapedEmSt=/\\\*|\\_/g;ve._comment=at(Ee._comment).replace("(?:-->|$)","-->").getRegex();ve.emStrong.lDelim=at(ve.emStrong.lDelim).replace(/punct/g,ve._punctuation).getRegex();ve.emStrong.rDelimAst=at(ve.emStrong.rDelimAst,"g").replace(/punct/g,ve._punctuation).getRegex();ve.emStrong.rDelimUnd=at(ve.emStrong.rDelimUnd,"g").replace(/punct/g,ve._punctuation).getRegex();ve._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;ve._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;ve._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;ve.autolink=at(ve.autolink).replace("scheme",ve._scheme).replace("email",ve._email).getRegex();ve._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;ve.tag=at(ve.tag).replace("comment",ve._comment).replace("attribute",ve._attribute).getRegex();ve._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;ve._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;ve._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;ve.link=at(ve.link).replace("label",ve._label).replace("href",ve._href).replace("title",ve._title).getRegex();ve.reflink=at(ve.reflink).replace("label",ve._label).replace("ref",Ee._label).getRegex();ve.nolink=at(ve.nolink).replace("ref",Ee._label).getRegex();ve.reflinkSearch=at(ve.reflinkSearch,"g").replace("reflink",ve.reflink).replace("nolink",ve.nolink).getRegex();ve.normal=$o({},ve);ve.pedantic=$o({},ve.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:at(/^!?\[(label)\]\((.*?)\)/).replace("label",ve._label).getRegex(),reflink:at(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ve._label).getRegex()});ve.gfm=$o({},ve.normal,{escape:at(ve.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(r="x"+r.toString(16)),t+="&#"+r+";";return t}var Ao=class{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ti,this.options.tokenizer=this.options.tokenizer||new ka,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let o={block:Ee.normal,inline:ve.normal};this.options.pedantic?(o.block=Ee.pedantic,o.inline=ve.pedantic):this.options.gfm&&(o.block=Ee.gfm,this.options.breaks?o.inline=ve.breaks:o.inline=ve.gfm),this.tokenizer.rules=o}static get rules(){return{block:Ee,inline:ve}}static lex(t,o){return new Ao(o).lex(t)}static lexInline(t,o){return new Ao(o).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,` `).replace(/\t/g," "),this.blockTokens(t,this.tokens);let o;for(;o=this.inlineQueue.shift();)this.inlineTokens(o.src,o.tokens);return this.tokens}blockTokens(t,o=[]){this.options.pedantic&&(t=t.replace(/^ +$/gm,""));let r,n,i,a;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(r=l.call({lexer:this},t,o))?(t=t.substring(r.raw.length),o.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&o.length>0?o[o.length-1].raw+=` `:o.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),n=o[o.length-1],n&&(n.type==="paragraph"||n.type==="text")?(n.raw+=` `+r.raw,n.text+=` @@ -977,9 +977,9 @@ ${n} `+r.raw,n.text+=` `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(r),a=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),n=o[o.length-1],n&&n.type==="text"?(n.raw+=` `+r.raw,n.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(r);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,o}inline(t,o){this.inlineQueue.push({src:t,tokens:o})}inlineTokens(t,o=[]){let r,n,i,a=t,l,s,c;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)d.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,l.index)+"["+P0("a",l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,l.index)+"["+P0("a",l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.escapedEmSt.exec(a))!=null;)a=a.slice(0,l.index)+"++"+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(s||(c=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(d=>(r=d.call({lexer:this},t,o))?(t=t.substring(r.raw.length),o.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),n=o[o.length-1],n&&r.type==="text"&&n.type==="text"?(n.raw+=r.raw,n.text+=r.text):o.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),n=o[o.length-1],n&&r.type==="text"&&n.type==="text"?(n.raw+=r.raw,n.text+=r.text):o.push(r);continue}if(r=this.tokenizer.emStrong(t,a,c)){t=t.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.autolink(t,R0)){t=t.substring(r.raw.length),o.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,R0))){t=t.substring(r.raw.length),o.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let d=1/0,u=t.slice(1),p;this.options.extensions.startInline.forEach(function(f){p=f.call({lexer:this},u),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(i=t.substring(0,d+1))}if(r=this.tokenizer.inlineText(i,TP)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(c=r.raw.slice(-1)),s=!0,n=o[o.length-1],n&&n.type==="text"?(n.raw+=r.raw,n.text+=r.text):o.push(r);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return o}},Sa=class{constructor(t){this.options=t||ti}code(t,o,r){let n=(o||"").match(/\S*/)[0];if(this.options.highlight){let i=this.options.highlight(t,n);i!=null&&i!==t&&(r=!0,t=i)}return t=t.replace(/\n$/,"")+` -`,n?'
'+(r?t:$t(t,!0))+`
-`:"
"+(r?t:$t(t,!0))+`
+`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):o.push(r);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,o}inline(t,o){this.inlineQueue.push({src:t,tokens:o})}inlineTokens(t,o=[]){let r,n,i,a=t,l,s,c;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)d.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,l.index)+"["+Ny("a",l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)a=a.slice(0,l.index)+"["+Ny("a",l[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.escapedEmSt.exec(a))!=null;)a=a.slice(0,l.index)+"++"+a.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(s||(c=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(d=>(r=d.call({lexer:this},t,o))?(t=t.substring(r.raw.length),o.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),n=o[o.length-1],n&&r.type==="text"&&n.type==="text"?(n.raw+=r.raw,n.text+=r.text):o.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),n=o[o.length-1],n&&r.type==="text"&&n.type==="text"?(n.raw+=r.raw,n.text+=r.text):o.push(r);continue}if(r=this.tokenizer.emStrong(t,a,c)){t=t.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),o.push(r);continue}if(r=this.tokenizer.autolink(t,Ry)){t=t.substring(r.raw.length),o.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t,Ry))){t=t.substring(r.raw.length),o.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let d=1/0,u=t.slice(1),p;this.options.extensions.startInline.forEach(function(f){p=f.call({lexer:this},u),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(i=t.substring(0,d+1))}if(r=this.tokenizer.inlineText(i,DN)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(c=r.raw.slice(-1)),s=!0,n=o[o.length-1],n&&n.type==="text"?(n.raw+=r.raw,n.text+=r.text):o.push(r);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return o}},Sa=class{constructor(t){this.options=t||ti}code(t,o,r){let n=(o||"").match(/\S*/)[0];if(this.options.highlight){let i=this.options.highlight(t,n);i!=null&&i!==t&&(r=!0,t=i)}return t=t.replace(/\n$/,"")+` +`,n?'
'+(r?t:Mt(t,!0))+`
+`:"
"+(r?t:Mt(t,!0))+`
`}blockquote(t){return`
`+t+`
`}html(t){return t}heading(t,o,r,n){return this.options.headerIds?"'+t+" @@ -997,16 +997,16 @@ ${n} `}tablerow(t){return` `+t+` `}tablecell(t,o){let r=o.header?"th":"td";return(o.align?"<"+r+' align="'+o.align+'">':"<"+r+">")+t+" -`}strong(t){return""+t+""}em(t){return""+t+""}codespan(t){return""+t+""}br(){return this.options.xhtml?"
":"
"}del(t){return""+t+""}link(t,o,r){if(t=T0(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let n='",n}image(t,o,r){if(t=T0(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let n=''+r+'":">",n}text(t){return t}},Ss=class{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,o,r){return""+r}image(t,o,r){return""+r}br(){return""}},_s=class{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,o){let r=t,n=0;if(this.seen.hasOwnProperty(r)){n=this.seen[t];do n++,r=t+"-"+n;while(this.seen.hasOwnProperty(r))}return o||(this.seen[t]=n,this.seen[r]=0),r}slug(t,o={}){let r=this.serialize(t);return this.getNextSafeSlug(r,o.dryrun)}},Mo=class{constructor(t){this.options=t||ti,this.options.renderer=this.options.renderer||new Sa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ss,this.slugger=new _s}static parse(t,o){return new Mo(o).parse(t)}static parseInline(t,o){return new Mo(o).parseInline(t)}parse(t,o=!0){let r="",n,i,a,l,s,c,d,u,p,f,m,y,w,g,O,j,S,v,D,x=t.length;for(n=0;n0&&O.tokens[0].type==="paragraph"?(O.tokens[0].text=v+" "+O.tokens[0].text,O.tokens[0].tokens&&O.tokens[0].tokens.length>0&&O.tokens[0].tokens[0].type==="text"&&(O.tokens[0].tokens[0].text=v+" "+O.tokens[0].tokens[0].text)):O.tokens.unshift({type:"text",text:v}):g+=v),g+=this.parse(O.tokens,w),p+=this.renderer.listitem(g,S,j);r+=this.renderer.list(p,m,y);continue}case"html":{r+=this.renderer.html(f.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(f.tokens));continue}case"text":{for(p=f.tokens?this.parseInline(f.tokens):f.text;n+1"u"||e===null)throw new Error("marked(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(typeof t=="function"&&(o=t,t=null),t=$o({},De.defaults,t||{}),M0(t),o){let r=t.highlight,n;try{n=Ao.lex(e,t)}catch(l){return o(l)}let i=function(l){let s;if(!l)try{t.walkTokens&&De.walkTokens(n,t.walkTokens),s=Mo.parse(n,t)}catch(c){l=c}return t.highlight=r,l?o(l):o(null,s)};if(!r||r.length<3||(delete t.highlight,!n.length))return i();let a=0;De.walkTokens(n,function(l){l.type==="code"&&(a++,setTimeout(()=>{r(l.text,l.lang,function(s,c){if(s)return i(s);c!=null&&c!==l.text&&(l.text=c,l.escaped=!0),a--,a===0&&i()})},0))}),a===0&&i();return}try{let r=Ao.lex(e,t);return t.walkTokens&&De.walkTokens(r,t.walkTokens),Mo.parse(r,t)}catch(r){if(r.message+=` -Please report this to https://github.com/markedjs/marked.`,t.silent)return"

An error occurred:

"+$t(r.message+"",!0)+"
";throw r}}De.options=De.setOptions=function(e){return $o(De.defaults,e),fP(De.defaults),De};De.getDefaults=I0;De.defaults=ti;De.use=function(...e){let t=$o({},...e),o=De.defaults.extensions||{renderers:{},childTokens:{}},r;e.forEach(n=>{if(n.extensions&&(r=!0,n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if(i.renderer){let a=o.renderers?o.renderers[i.name]:null;a?o.renderers[i.name]=function(...l){let s=i.renderer.apply(this,l);return s===!1&&(s=a.apply(this,l)),s}:o.renderers[i.name]=i.renderer}if(i.tokenizer){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");o[i.level]?o[i.level].unshift(i.tokenizer):o[i.level]=[i.tokenizer],i.start&&(i.level==="block"?o.startBlock?o.startBlock.push(i.start):o.startBlock=[i.start]:i.level==="inline"&&(o.startInline?o.startInline.push(i.start):o.startInline=[i.start]))}i.childTokens&&(o.childTokens[i.name]=i.childTokens)})),n.renderer){let i=De.defaults.renderer||new Sa;for(let a in n.renderer){let l=i[a];i[a]=(...s)=>{let c=n.renderer[a].apply(i,s);return c===!1&&(c=l.apply(i,s)),c}}t.renderer=i}if(n.tokenizer){let i=De.defaults.tokenizer||new ka;for(let a in n.tokenizer){let l=i[a];i[a]=(...s)=>{let c=n.tokenizer[a].apply(i,s);return c===!1&&(c=l.apply(i,s)),c}}t.tokenizer=i}if(n.walkTokens){let i=De.defaults.walkTokens;t.walkTokens=function(a){n.walkTokens.call(this,a),i&&i.call(this,a)}}r&&(t.extensions=o),De.setOptions(t)})};De.walkTokens=function(e,t){for(let o of e)switch(t.call(De,o),o.type){case"table":{for(let r of o.header)De.walkTokens(r.tokens,t);for(let r of o.rows)for(let n of r)De.walkTokens(n.tokens,t);break}case"list":{De.walkTokens(o.items,t);break}default:De.defaults.extensions&&De.defaults.extensions.childTokens&&De.defaults.extensions.childTokens[o.type]?De.defaults.extensions.childTokens[o.type].forEach(function(r){De.walkTokens(o[r],t)}):o.tokens&&De.walkTokens(o.tokens,t)}};De.parseInline=function(e,t){if(typeof e>"u"||e===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=$o({},De.defaults,t||{}),M0(t);try{let o=Ao.lexInline(e,t);return t.walkTokens&&De.walkTokens(o,t.walkTokens),Mo.parseInline(o,t)}catch(o){if(o.message+=` -Please report this to https://github.com/markedjs/marked.`,t.silent)return"

An error occurred:

"+$t(o.message+"",!0)+"
";throw o}};De.Parser=Mo;De.parser=Mo.parse;De.Renderer=Sa;De.TextRenderer=Ss;De.Lexer=Ao;De.lexer=Ao.lex;De.Tokenizer=ka;De.Slugger=_s;De.parse=De;var rie=De.options,nie=De.setOptions,iie=De.use,aie=De.walkTokens,lie=De.parseInline;var sie=Mo.parse,cie=Ao.lex;var K0=require("obsidian");var oi=require("obsidian");var B=Fo({activeView(){this.plugin.activateView(),this.refreshTree()},headers:[],onPosChange:e=>{},dark:!0,cssChange:!1,markdown:!0,ellipsis:!1,labelDirection:"left",leafChange:!1,searchSupport:!0,levelSwitch:!0,hideUnsearched:!0,regexSearch:!1,modifyKeys:{},dragModify:!1,refreshTree(){this.leafChange=!this.leafChange},patchColor:!1,primaryColorLight:"",primaryColorDark:"",rainbowLine:!1,rainbowColor1:"",rainbowColor2:"",rainbowColor3:"",rainbowColor4:"",rainbowColor5:""});var $0={name:"formula",level:"inline",start(e){return e.match(/\$/)?.index||-1},tokenizer(e,t){let r=/^\$([^\$]+)\$/.exec(e);if(r)return{type:"formula",raw:r[0],formula:r[1].trim()}},renderer(e){try{let t=(0,oi.renderMath)(e.formula,!1).outerHTML;return(0,oi.finishRenderMath)(),t}catch{return(0,oi.loadMathJax)().then(()=>{B.refreshTree()}),!1}}},L0={name:"internal",level:"inline",start(e){let t=e.match(/!?\[\[/);return t?t.index:-1},tokenizer(e,t){let r=/^!?\[\[([^\[\]]+?)\]\]/.exec(e);if(r){let n=/.*\|(.*)/.exec(r[1]);return{type:"internal",raw:r[0],internal:n?n[1]:r[1]}}},renderer(e){return`${e.internal}`}},z0={name:"ref",level:"inline",start(e){let t=e.match(/\^|\[/);return t?t.index:-1},tokenizer(e,t){let r=/^(\^[A-Za-z0-9\-]+)|^(\^\[[^\]]*\])|^(\[\^[^\]]*\])/.exec(e);if(r)return{type:"ref",raw:r[0],ref:(r[1]||r[2]||r[3]).trim()}},renderer(e){return""}},B0={name:"highlight",level:"inline",start(e){let t=e.match(/==/);return t?t.index:-1},tokenizer(e,t){let r=/^==([^=]+)==/.exec(e);if(r)return{type:"highlight",raw:r[0],internal:r[1]}},renderer(e){return`${e.internal}`}},H0={name:"tag",level:"inline",start(e){let t=e.match(/^#|(?<=\s)#/);return t?t.index:-1},tokenizer(e,t){let r=/^#([^\[\]{}:;'"`~,.<>?|\\!@#$%^&*()=+\d\s][^\[\]{}:;'"`~,.<>?|\\!@#$%^&*()=+\s]*)/.exec(e);if(r)return{type:"tag",raw:r[0],internal:r[1]}},renderer(e){return`
#${e.internal}`}},V0=e=>{e.type==="link"&&(e.href="javascript:void(0);")},F0={listitem(e,t,o){return`${e}`}},j0={name:"nolist",level:"block",start(e){let t=e.match(/^(\d+[\.)\-+*]|[+\-*]) /);return t?t.index:-1},tokenizer(e,t){let r=/^(([+\-*])|(\d+[\.\-)+*])) (.*)/.exec(e),n;return r&&r[2]?n={type:"nolist",raw:r[0],ordered:!1,marker:r[2],start:"",body:r[4],tokens:[]}:r&&r[3]&&(n={type:"nolist",raw:r[0],ordered:!0,marker:"",start:r[3],body:r[4],tokens:[]}),n&&this.lexer.inline(n.body,n.tokens),n},renderer(e){let t=this.parser.parseInline(e.tokens,null);return e.ordered?`

${e.start} ${t}

`:`

${e.marker} ${t}

`}};function W0(e,t,o){tt(()=>{go(e).addEventListener(t,o)}),Pt(()=>{go(e).removeEventListener(t,o)})}var Es=ue({__name:"Outline",setup(e,{expose:t}){t(),Bm(_=>({"61117f8c-rainbowColor1":go(s),"61117f8c-rainbowColor2":go(c),"61117f8c-rainbowColor3":go(d),"61117f8c-rainbowColor4":go(u),"61117f8c-rainbowColor5":go(p),"61117f8c-locatedColor":go(l)}));let o=Fo({common:{primaryColor:"",primaryColorHover:""},Slider:{handleSize:"10px",fillColor:"",fillColorHover:"",dotBorderActive:""},Tree:{nodeTextColor:"var(--nav-item-color)"}}),r=Fo({common:{primaryColor:"",primaryColorHover:""},Slider:{handleSize:"10px",fillColor:"",fillColorHover:"",dotBorderActive:""},Tree:{nodeTextColor:"var(--nav-item-color)"}}),n=F(()=>B.dark?xs:null),i=F(()=>B.dark?{color:"var(--icon-color)"}:{color:"var(--icon-color)"});function a(){let _=document.body.createEl("button",{cls:"mod-cta",attr:{style:"width: 0px; height: 0px;"}}),W=getComputedStyle(_,null).getPropertyValue("background-color");return _.remove(),W}let l=X(a());At(()=>{if(B.patchColor){o.common.primaryColor=o.common.primaryColorHover=o.Slider.fillColor=o.Slider.fillColorHover=B.primaryColorLight,o.Slider.dotBorderActive=`2px solid ${B.primaryColorLight}`,r.common.primaryColor=r.common.primaryColorHover=r.Slider.fillColor=r.Slider.fillColorHover=B.primaryColorDark,r.Slider.dotBorderActive=`2px solid ${B.primaryColorDark}`;return}if(B.cssChange===B.cssChange){let _=a();o.common.primaryColor=o.common.primaryColorHover=o.Slider.fillColor=o.Slider.fillColorHover=r.common.primaryColor=r.common.primaryColorHover=r.Slider.fillColor=r.Slider.fillColorHover=_,o.Slider.dotBorderActive=r.Slider.dotBorderActive=`2px solid ${_}`,l.value=_}});let s=X(""),c=X(""),d=X(""),u=X(""),p=X("");function f(_){return`${parseInt(_.slice(1,3),16)},${parseInt(_.slice(3,5),16)},${parseInt(_.slice(5,7),16)}`}At(()=>{if(B.rainbowLine){s.value=`rgba(${f(B.rainbowColor1)}, 0.6)`,c.value=`rgba(${f(B.rainbowColor2)}, 0.6)`,d.value=`rgba(${f(B.rainbowColor3)}, 0.6)`,u.value=`rgba(${f(B.rainbowColor4)}, 0.6)`,p.value=`rgba(${f(B.rainbowColor5)}, 0.6)`;return}B.cssChange===B.cssChange&&(s.value=c.value=d.value=u.value=p.value="var(--nav-indentation-guide-color)")});function m(){return b(wa,{size:"12px"},{default:()=>b(Uf)})}function y({option:_}){let W=null;switch(_.icon){case"ArticleOutlined":{W=b(Rf);break}case"AudiotrackOutlined":{W=b(Af);break}case"OndemandVideoOutlined":{W=b(Gf);break}case"CategoryOutlined":{W=b($f);break}case"FilePresentOutlined":{W=b(Wf);break}case"ImageOutlined":{W=b(zf);break}case"PublicOutlined":{W=b(Hf);break}case"TextFieldsOutlined":{W=b(Ff);break}default:return null}return b(wa,{size:"1.2em"},{default:()=>W})}tt(()=>{addEventListener("quiet-outline-reset",$)}),sn(()=>{removeEventListener("quiet-outline-reset",$)});let w=ke("plugin"),g=ke("container"),O=(_,W)=>"item-"+_.level+"-"+W,j=_=>parseInt(_.split("-")[2]);function S(_){D(_),k(_)}B.onPosChange=S;function v(){return w.navigator.getDefaultLevel()}function D(_){if(w.settings.auto_expand_ext!=="disable"){let W=B.headers[_],re=_0&&(B.headers[Z].level!Be.value.contains(O(B.headers[P],P)));re=re===void 0?W[W.length-1]:re,x.value=re,setTimeout(()=>{let P=g.querySelector(`#no-${re}`);P&&P.scrollIntoView({block:"center",behavior:"smooth"})},100)}let A=F(()=>_=>{let W=parseInt(_.option.key.split("-")[1]),re=parseInt(_.option.key.split("-")[2]),P=_.option.label||"",Z=x.value===re?"located":"";return{class:`level-${W} ${Z}`,id:`no-${re}`,"aria-label":B.ellipsis?_.option.label:"","aria-label-position":B.labelDirection,raw:P}}),E,z,M="";function se(_){let re=_.target.closest(".n-tree-node");re&&(E=re,z=_,addEventListener("keydown",ce))}function ye(_){removeEventListener("keydown",ce)}let Ie=_=>w.settings.show_popover_key==="ctrlKey"&&_.ctrlKey||w.settings.show_popover_key==="altKey"&&_.altKey||w.settings.show_popover_key==="metaKey"&&_.metaKey;function fe(_){Ie(_)&&w.app.workspace.trigger("hover-link",{event:z,source:"preview",targetEl:E,hoverParent:{hoverPopover:null},linktext:"#"+E?.getAttribute("raw"),sourcePath:w.navigator.getPath()})}let ce=we(fe,100);function we(_,W){let re=!0,P;return function(...Z){let le=this,Ce=E?.getAttribute("raw")||"";if(Ce!==M||re){_.apply(le,Z),re=!1,M=Ce;return}P&&clearTimeout(P),P=setTimeout(()=>{re=!0},W)}}tt(()=>{g.addEventListener("mouseover",se),g.addEventListener("mouseout",ye)}),sn(()=>{g.removeEventListener("mouseover",se),g.removeEventListener("mouseout",ye),removeEventListener("keydown",ce)});let Me=X(v()),Be=X([]);ct(Me.value);function Le(_,W="replace"){if(W==="replace")Be.value=_;else{let re=new Set([...Be.value,..._]);Be.value=[...re]}Je()}function Je(){let _=w.navigator.getPath();_&&(w.heading_states[_]=Ve(Be.value))}function Xe(_,W){Le(_)}function ct(_){Me.value=_;let W=wt(_);Le(W)}W0(window,"quiet-outline-levelchange",_=>{typeof _.detail.level=="number"?ct(_.detail.level):_.detail.level==="inc"?ct(Math.clamp(Me.value+1,0,5)):_.detail.level==="dec"&&ct(Math.clamp(Me.value-1,0,5))});function wt(_){return B.headers.map((re,P)=>({level:re.level,no:P})).filter((re,P,Z)=>P===Z.length-1||Z[P].level>=Z[P+1].level?!1:Z[P].level<=_).map(re=>"item-"+re.level+"-"+re.no)}function ze(_,W){let re=_.split("-");return`item-${re[1]}-${parseInt(re[2])+W}`}Ze(()=>Ve(B.modifyKeys),({offsetModifies:_,removes:W,adds:re,modifies:P})=>{let Z=Be.value.filter(le=>{let Ce=j(le),Ke=!W.some(Fe=>Fe.begin<=Ce&&CeFe.oldBegin===Ce&&Fe.levelChangeType==="parent2child");return Ke&&He}).map(le=>{let Ce=j(le),Ke=P.find(Tt=>Tt.oldBegin===Ce),He=_.findLastIndex(Tt=>Tt.begin<=Ce),Fe=He===-1?le:ze(le,_[He].offset),qe=j(Fe);return Ke?`item-${B.headers[Ke.newBegin].level}-${qe}`:Fe});P.filter(le=>le.levelChangeType==="child2parent").forEach(le=>{Z.push(`item-${B.headers[le.newBegin].level}-${le.newBegin}`)}),re.forEach(le=>{let Ce=Q(le.begin);(le.begin>=B.headers.length-1||B.headers[le.begin].level>=B.headers[le.begin+1].level)&&Ce.pop(),Ce.forEach(Ke=>{Z.push(`item-${B.headers[Ke].level}-${Ke}`)})}),Le([...new Set(Z)])});let We=X(0);Ze(()=>B.leafChange,()=>{let _=rt.value;rt.value="",Me.value=v();let W=w.heading_states[w.navigator.getPath()];w.settings.remember_state&&W?Le(W):ct(Me.value),Bt(()=>{rt.value=_})});let vt={0:"",1:"",2:"",3:"",4:"",5:""};function Pe(_){let W=B.headers.filter(re=>re.level===_).length;return _>0?`H${_}: ${W}`:"No expand"}let ot=F(()=>{if(B.markdown)return Y}),rt=X("");function Dt(_,W){let re=/.*/;try{re=RegExp(_,"i")}catch{}finally{return re.test(W.label||"")}}function h(_,W){return(W.label||"").toLowerCase().contains(_.toLowerCase())}let C=F(()=>B.regexSearch?Dt:h),L=F(()=>B.headers.filter(_=>{let W={label:_.heading};return C.value(rt.value,W)}).length);async function q(_,W){if(W[0]===void 0)return;let re=W[0].key.split("-"),P=parseInt(re[2]);w.navigator.jump(P)}let K=F(()=>ne(B.headers));function ne(_){return oe(_)}function oe(_){let W={children:[]},re=[{node:W,level:-1}];return _.forEach((P,Z)=>{let le={label:P.heading,key:"item-"+P.level+"-"+Z,line:P.position.start.line,icon:P.icon};for(;P.level<=re.last().level;)re.pop();let Ce=re.last().node;Ce.children===void 0&&(Ce.children=[]),Ce.children.push(le),re.push({node:le,level:P.level})}),W.children}function H(_){let W=[];function re(P){if(!P||P.length===0)return;let Z=0;for(let le=P.length-1;le>=0;le--){let Ce=j(P[le].key);if(Ce<=_){W.push(Ce),Z=le;break}}re(P[Z].children)}return re(K.value),W}function Q(_){let W=[],re=B.headers[_].level+1;for(let P=_;P>=0;P--)B.headers[P].level.*?<\/mjx-container>/g)||[];return W=W.replace(/.*?<\/mjx-container>/g,()=>""),W=(0,K0.sanitizeHTMLToDom)(`
${W}
`).children[0].innerHTML,W=W.replace(/.*?<\/math>/g,()=>P[re++]),b("div",{innerHTML:W})}async function N(){w.navigator.toBottom()}function $(){rt.value="",Me.value=v(),ct(Me.value)}async function V({node:_,dragNode:W,dropPosition:re}){if(!w.navigator.canDrop)return;let P=ae(W),Z=ae(_);await w.navigator.handleDrop(P,Z,re)}function ae(_){return typeof _!="string"&&(_=_.key),parseInt(_.split("-")[2])}let pe={lightThemeConfig:o,darkThemeConfig:r,get theme(){return n},set theme(_){n=_},get iconColor(){return i},set iconColor(_){i=_},getDefaultColor:a,get locatedColor(){return l},set locatedColor(_){l=_},get rainbowColor1(){return s},set rainbowColor1(_){s=_},get rainbowColor2(){return c},set rainbowColor2(_){c=_},get rainbowColor3(){return d},set rainbowColor3(_){d=_},get rainbowColor4(){return u},set rainbowColor4(_){u=_},get rainbowColor5(){return p},set rainbowColor5(_){p=_},hexToRGB:f,renderSwitcherIcon:m,renderPrefix:y,plugin:w,container:g,get toKey(){return O},set toKey(_){O=_},get fromKey(){return j},set fromKey(_){j=_},onPosChange:S,getDefaultLevel:v,autoExpand:D,get locateIdx(){return x},set locateIdx(_){x=_},resetLocated:k,setAttrs:A,get triggerNode(){return E},set triggerNode(_){E=_},get mouseEvent(){return z},set mouseEvent(_){z=_},get prevShowed(){return M},set prevShowed(_){M=_},onMouseEnter:se,onMouseLeave:ye,funcKeyPressed:Ie,_openPopover:fe,openPopover:ce,customDebounce:we,get level(){return Me},set level(_){Me=_},get expanded(){return Be},set expanded(_){Be=_},modifyExpandKeys:Le,syncExpandKeys:Je,expand:Xe,switchLevel:ct,filterKeysLessThanEqual:wt,offset:ze,get update_tree(){return We},set update_tree(_){We=_},marks:vt,formatTooltip:Pe,get renderMethod(){return ot},set renderMethod(_){ot=_},get pattern(){return rt},set pattern(_){rt=_},regexFilter:Dt,simpleFilter:h,get filter(){return C},set filter(_){C=_},get matchCount(){return L},set matchCount(_){L=_},jump:q,get data2(){return K},set data2(_){K=_},makeTree:ne,arrToTree:oe,getPath:H,getPathFromArr:Q,renderLabel:Y,toBottom:N,reset:$,onDrop:V,getNo:ae,get NTree(){return Ef},get NButton(){return Fd},get NInput(){return Ad},get NSlider(){return kf},get NConfigProvider(){return ru},get SettingsBackupRestoreRound(){return Pf},get ArrowCircleDownRound(){return Tf},get Icon(){return wa},get store(){return B}};return Object.defineProperty(pe,"__isScriptSetup",{enumerable:!1,value:!0}),pe}});var OP={id:"container"},PP={key:0,class:"function-bar"},NP={key:2};function U0(e,t,o,r,n,i){return Ye(),ut("div",OP,[ft(r.NConfigProvider,{theme:r.theme,"theme-overrides":r.theme===null?r.lightThemeConfig:r.darkThemeConfig},{default:ln(()=>[r.store.searchSupport?(Ye(),ut("div",PP,[ft(r.NButton,{size:"small",circle:"",onClick:r.toBottom,"aria-label":"To Bottom"},{icon:ln(()=>[ft(r.Icon,null,{default:ln(()=>[ft(r.ArrowCircleDownRound,{style:vr(r.iconColor)},null,8,["style"])]),_:1})]),_:1}),ft(r.NButton,{size:"small",circle:"",onClick:r.reset,"aria-label":"Reset"},{icon:ln(()=>[ft(r.Icon,null,{default:ln(()=>[ft(r.SettingsBackupRestoreRound,{style:vr(r.iconColor)},null,8,["style"])]),_:1})]),_:1}),ft(r.NInput,{value:r.pattern,"onUpdate:value":t[0]||(t[0]=a=>r.pattern=a),placeholder:"Input to search",size:"small",clearable:""},null,8,["value"])])):nl("v-if",!0),r.store.levelSwitch?(Ye(),Di(r.NSlider,{key:1,value:r.level,"on-update:value":r.switchLevel,marks:r.marks,step:"mark",min:0,max:5,style:{margin:"4px 0"},"format-tooltip":r.formatTooltip},null,8,["value"])):nl("v-if",!0),r.pattern?(Ye(),ut("code",NP,Bs(r.matchCount)+" result(s): ",1)):nl("v-if",!0),(Ye(),Di(r.NTree,{"block-line":"",pattern:r.pattern,data:r.data2,"on-update:selected-keys":r.jump,"render-label":r.renderMethod,"render-prefix":r.renderPrefix,"node-props":r.setAttrs,"expanded-keys":r.expanded,"render-switcher-icon":r.renderSwitcherIcon,"on-update:expanded-keys":r.expand,key:r.update_tree,filter:r.filter,"show-irrelevant-nodes":!r.store.hideUnsearched,class:qr({ellipsis:r.store.ellipsis}),draggable:r.store.dragModify,onDrop:r.onDrop,"allow-drop":()=>r.plugin.navigator.canDrop},null,8,["pattern","data","render-label","node-props","expanded-keys","filter","show-irrelevant-nodes","class","draggable","allow-drop"]))]),_:1},8,["theme","theme-overrides"])])}Es.render=U0;Es.__file="src/ui/Outline.vue";var q0=Es;var ri="quiet-outline",Ds=class extends G0.ItemView{vueApp;plugin;constructor(t,o){super(t),this.plugin=o}getViewType(){return ri}getDisplayText(){return"Quiet Outline"}getIcon(){return"lines-of-text"}async onOpen(){let t=this.containerEl.children[1];t.empty();let o=t.createEl("div",{cls:"quiet-outline"});this.vueApp=qm(q0),this.vueApp.provide("plugin",this.plugin),this.vueApp.provide("container",o),this.vueApp.mount(o)}async onClose(){}onunload(){this.vueApp.unmount()}};var Y0=require("obsidian");var Lo=class extends Y0.Component{_loaded=!1;canDrop=!1;plugin;constructor(t){super(),this.plugin=t}async load(){this._loaded||(this._loaded=!0,this.constructor._installed||(await this.install(),this.constructor._installed=!0),await this.onload())}async unload(){if(this._loaded){for(this._loaded=!1;this._events.length>0;)this._events.pop()();await this.onunload()}}getDefaultLevel(){return parseInt(this.plugin.settings.expand_level)}getPath(){return""}async install(){}async onload(){}async onunload(){}async handleDrop(t,o,r){}toBottom(){}},Ts=class extends Lo{getId(){return"dummy"}async jump(t){}async getHeaders(){return[]}async setHeaders(){B.headers=[]}async updateHeaders(){}};var ry=require("obsidian");var X0=require("@codemirror/view"),rp=class{constructor(t){}update(t){t.selectionSet&&document.dispatchEvent(new CustomEvent("quiet-outline-cursorchange",{detail:{docChanged:t.docChanged}}))}destroy(){}},Z0=X0.ViewPlugin.fromClass(rp);function RP(e,t){let o=0,r=0,n=[];for(;os.length-c.length),l[0].type=="add"&&l[1].type=="remove"&&l[0].length===l[1].length?l[1]:l[0]}function Q0(e,t,o){let r=t.slice(o),n=r.findIndex(i=>i.heading===e.heading&&i.level===e.level);return n=n<0?r.length:n,n}function AP(e,t,o,r){let n=Math.min(e.length-o-1,t.length-r-1,5);for(let i=1;n>0&&i<=n;i++)if(e[o+i].heading===t[r+i].heading&&e[o+i].level===t[r+i].level)return i;return Number.MAX_VALUE}function _a(e,t){let o=RP(e,t),r={offsetModifies:[],removes:[],adds:[],modifies:[]},n=0;return o.forEach(i=>{switch(i.type){case"add":{r.adds.push({begin:n+i.begin}),n+=i.length,r.offsetModifies.push({begin:i.begin,offset:n});break}case"remove":{n-=i.length,r.offsetModifies.push({begin:i.begin+i.length,offset:n}),r.removes.push({begin:i.begin,length:i.length});break}case"modify":{if(!i.levelChange||i.levelChangeType==="child2child")break;r.modifies.push({oldBegin:i.begin,newBegin:i.begin+n,levelChangeType:i.levelChangeType});break}}}),r}async function np(e,t){return await e.metadataCache.computeMetadataAsync(new TextEncoder().encode(t).buffer)}async function ey(e){let t=await np(app,e),o=t.headings||[],r=t.sections||[],i=[{heading:"",headingLevel:0,headingExpaned:!1,id:-1,content:{preContent:"",children:[]},type:"section"}],a=0,l=0,s=0;for(let d of r)if(d.type==="heading"){for(l=Math.max(d.position.start.offset,0),i.last().content.preContent=e.slice(a,l);o[s].level<=i.last().headingLevel;)i.pop();let u={heading:o[s].heading,headingLevel:o[s].level,headingExpaned:!1,id:s,content:{preContent:"",children:[]},type:"section"};i.last().content.children.push(u),i.push(u),a=o[s].position.end.offset+1,s++}let c=e.slice(a);return i.length>1&&!c.endsWith(` +`}strong(t){return""+t+""}em(t){return""+t+""}codespan(t){return""+t+""}br(){return this.options.xhtml?"
":"
"}del(t){return""+t+""}link(t,o,r){if(t=Ty(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let n='",n}image(t,o,r){if(t=Ty(this.options.sanitize,this.options.baseUrl,t),t===null)return r;let n=''+r+'":">",n}text(t){return t}},_s=class{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,o,r){return""+r}image(t,o,r){return""+r}br(){return""}},Es=class{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,o){let r=t,n=0;if(this.seen.hasOwnProperty(r)){n=this.seen[t];do n++,r=t+"-"+n;while(this.seen.hasOwnProperty(r))}return o||(this.seen[t]=n,this.seen[r]=0),r}slug(t,o={}){let r=this.serialize(t);return this.getNextSafeSlug(r,o.dryrun)}},Mo=class{constructor(t){this.options=t||ti,this.options.renderer=this.options.renderer||new Sa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new _s,this.slugger=new Es}static parse(t,o){return new Mo(o).parse(t)}static parseInline(t,o){return new Mo(o).parseInline(t)}parse(t,o=!0){let r="",n,i,a,l,s,c,d,u,p,f,m,y,_,h,O,W,w,b,D,x=t.length;for(n=0;n0&&O.tokens[0].type==="paragraph"?(O.tokens[0].text=b+" "+O.tokens[0].text,O.tokens[0].tokens&&O.tokens[0].tokens.length>0&&O.tokens[0].tokens[0].type==="text"&&(O.tokens[0].tokens[0].text=b+" "+O.tokens[0].tokens[0].text)):O.tokens.unshift({type:"text",text:b}):h+=b),h+=this.parse(O.tokens,_),p+=this.renderer.listitem(h,w,W);r+=this.renderer.list(p,m,y);continue}case"html":{r+=this.renderer.html(f.text);continue}case"paragraph":{r+=this.renderer.paragraph(this.parseInline(f.tokens));continue}case"text":{for(p=f.tokens?this.parseInline(f.tokens):f.text;n+1"u"||e===null)throw new Error("marked(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(typeof t=="function"&&(o=t,t=null),t=$o({},De.defaults,t||{}),My(t),o){let r=t.highlight,n;try{n=Ao.lex(e,t)}catch(l){return o(l)}let i=function(l){let s;if(!l)try{t.walkTokens&&De.walkTokens(n,t.walkTokens),s=Mo.parse(n,t)}catch(c){l=c}return t.highlight=r,l?o(l):o(null,s)};if(!r||r.length<3||(delete t.highlight,!n.length))return i();let a=0;De.walkTokens(n,function(l){l.type==="code"&&(a++,setTimeout(()=>{r(l.text,l.lang,function(s,c){if(s)return i(s);c!=null&&c!==l.text&&(l.text=c,l.escaped=!0),a--,a===0&&i()})},0))}),a===0&&i();return}try{let r=Ao.lex(e,t);return t.walkTokens&&De.walkTokens(r,t.walkTokens),Mo.parse(r,t)}catch(r){if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,t.silent)return"

An error occurred:

"+Mt(r.message+"",!0)+"
";throw r}}De.options=De.setOptions=function(e){return $o(De.defaults,e),uN(De.defaults),De};De.getDefaults=Iy;De.defaults=ti;De.use=function(...e){let t=$o({},...e),o=De.defaults.extensions||{renderers:{},childTokens:{}},r;e.forEach(n=>{if(n.extensions&&(r=!0,n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if(i.renderer){let a=o.renderers?o.renderers[i.name]:null;a?o.renderers[i.name]=function(...l){let s=i.renderer.apply(this,l);return s===!1&&(s=a.apply(this,l)),s}:o.renderers[i.name]=i.renderer}if(i.tokenizer){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");o[i.level]?o[i.level].unshift(i.tokenizer):o[i.level]=[i.tokenizer],i.start&&(i.level==="block"?o.startBlock?o.startBlock.push(i.start):o.startBlock=[i.start]:i.level==="inline"&&(o.startInline?o.startInline.push(i.start):o.startInline=[i.start]))}i.childTokens&&(o.childTokens[i.name]=i.childTokens)})),n.renderer){let i=De.defaults.renderer||new Sa;for(let a in n.renderer){let l=i[a];i[a]=(...s)=>{let c=n.renderer[a].apply(i,s);return c===!1&&(c=l.apply(i,s)),c}}t.renderer=i}if(n.tokenizer){let i=De.defaults.tokenizer||new ka;for(let a in n.tokenizer){let l=i[a];i[a]=(...s)=>{let c=n.tokenizer[a].apply(i,s);return c===!1&&(c=l.apply(i,s)),c}}t.tokenizer=i}if(n.walkTokens){let i=De.defaults.walkTokens;t.walkTokens=function(a){n.walkTokens.call(this,a),i&&i.call(this,a)}}r&&(t.extensions=o),De.setOptions(t)})};De.walkTokens=function(e,t){for(let o of e)switch(t.call(De,o),o.type){case"table":{for(let r of o.header)De.walkTokens(r.tokens,t);for(let r of o.rows)for(let n of r)De.walkTokens(n.tokens,t);break}case"list":{De.walkTokens(o.items,t);break}default:De.defaults.extensions&&De.defaults.extensions.childTokens&&De.defaults.extensions.childTokens[o.type]?De.defaults.extensions.childTokens[o.type].forEach(function(r){De.walkTokens(o[r],t)}):o.tokens&&De.walkTokens(o.tokens,t)}};De.parseInline=function(e,t){if(typeof e>"u"||e===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof e!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=$o({},De.defaults,t||{}),My(t);try{let o=Ao.lexInline(e,t);return t.walkTokens&&De.walkTokens(o,t.walkTokens),Mo.parseInline(o,t)}catch(o){if(o.message+=` +Please report this to https://github.com/markedjs/marked.`,t.silent)return"

An error occurred:

"+Mt(o.message+"",!0)+"
";throw o}};De.Parser=Mo;De.parser=Mo.parse;De.Renderer=Sa;De.TextRenderer=_s;De.Lexer=Ao;De.lexer=Ao.lex;De.Tokenizer=ka;De.Slugger=Es;De.parse=De;var oie=De.options,rie=De.setOptions,nie=De.use,iie=De.walkTokens,aie=De.parseInline;var lie=Mo.parse,sie=Ao.lex;var Wy=require("obsidian");var oi=require("obsidian");var B=Fo({activeView(){this.plugin.activateView(),this.refreshTree()},headers:[],onPosChange:e=>{},dark:!0,cssChange:!1,markdown:!0,ellipsis:!1,labelDirection:"left",leafChange:!1,searchSupport:!0,levelSwitch:!0,hideUnsearched:!0,regexSearch:!1,modifyKeys:{},dragModify:!1,textDirectionDecideBy:"system",refreshTree(){this.leafChange=!this.leafChange},patchColor:!1,primaryColorLight:"",primaryColorDark:"",rainbowLine:!1,rainbowColor1:"",rainbowColor2:"",rainbowColor3:"",rainbowColor4:"",rainbowColor5:""});var $y={name:"formula",level:"inline",start(e){return e.match(/\$/)?.index||-1},tokenizer(e,t){let r=/^\$([^\$]+)\$/.exec(e);if(r)return{type:"formula",raw:r[0],formula:r[1].trim()}},renderer(e){try{let t=(0,oi.renderMath)(e.formula,!1).outerHTML;return(0,oi.finishRenderMath)(),t}catch{return(0,oi.loadMathJax)().then(()=>{B.refreshTree()}),!1}}},Ly={name:"internal",level:"inline",start(e){let t=e.match(/!?\[\[/);return t?t.index:-1},tokenizer(e,t){let r=/^!?\[\[([^\[\]]+?)\]\]/.exec(e);if(r){let n=/.*\|(.*)/.exec(r[1]);return{type:"internal",raw:r[0],internal:n?n[1]:r[1]}}},renderer(e){return`${e.internal}`}},zy={name:"ref",level:"inline",start(e){let t=e.match(/\^|\[/);return t?t.index:-1},tokenizer(e,t){let r=/^(\^[A-Za-z0-9\-]+)|^(\^\[[^\]]*\])|^(\[\^[^\]]*\])/.exec(e);if(r)return{type:"ref",raw:r[0],ref:(r[1]||r[2]||r[3]).trim()}},renderer(e){return""}},By={name:"highlight",level:"inline",start(e){let t=e.match(/==/);return t?t.index:-1},tokenizer(e,t){let r=/^==([^=]+)==/.exec(e);if(r)return{type:"highlight",raw:r[0],internal:r[1]}},renderer(e){return`${e.internal}`}},Hy={name:"tag",level:"inline",start(e){let t=e.match(/^#|(?<=\s)#/);return t?t.index:-1},tokenizer(e,t){let r=/^#([^\[\]{}:;'"`~,.<>?|\\!@#$%^&*()=+\d\s][^\[\]{}:;'"`~,.<>?|\\!@#$%^&*()=+\s]*)/.exec(e);if(r)return{type:"tag",raw:r[0],internal:r[1]}},renderer(e){return`
#${e.internal}`}},Vy=e=>{e.type==="link"&&(e.href="javascript:void(0);")},Fy={list(e){}};function jy(e,t,o){Je(()=>{lo(e).addEventListener(t,o)}),Pt(()=>{lo(e).removeEventListener(t,o)})}var Ds=de({__name:"Outline",setup(e,{expose:t}){t(),Bm(S=>({"61117f8c-biDi":lo(m),"61117f8c-rainbowColor1":lo(s),"61117f8c-rainbowColor2":lo(c),"61117f8c-rainbowColor3":lo(d),"61117f8c-rainbowColor4":lo(u),"61117f8c-rainbowColor5":lo(p),"61117f8c-locatedColor":lo(l)}));let o=Fo({common:{primaryColor:"",primaryColorHover:""},Slider:{handleSize:"10px",fillColor:"",fillColorHover:"",dotBorderActive:""},Tree:{nodeTextColor:"var(--nav-item-color)"}}),r=Fo({common:{primaryColor:"",primaryColorHover:""},Slider:{handleSize:"10px",fillColor:"",fillColorHover:"",dotBorderActive:""},Tree:{nodeTextColor:"var(--nav-item-color)"}}),n=j(()=>B.dark?vs:null),i=j(()=>B.dark?{color:"var(--icon-color)"}:{color:"var(--icon-color)"});function a(){let S=document.body.createEl("button",{cls:"mod-cta",attr:{style:"width: 0px; height: 0px;"}}),K=getComputedStyle(S,null).getPropertyValue("background-color");return S.remove(),K}let l=Z(a());Nt(()=>{if(B.patchColor){o.common.primaryColor=o.common.primaryColorHover=o.Slider.fillColor=o.Slider.fillColorHover=B.primaryColorLight,o.Slider.dotBorderActive=`2px solid ${B.primaryColorLight}`,r.common.primaryColor=r.common.primaryColorHover=r.Slider.fillColor=r.Slider.fillColorHover=B.primaryColorDark,r.Slider.dotBorderActive=`2px solid ${B.primaryColorDark}`;return}if(B.cssChange===B.cssChange){let S=a();o.common.primaryColor=o.common.primaryColorHover=o.Slider.fillColor=o.Slider.fillColorHover=r.common.primaryColor=r.common.primaryColorHover=r.Slider.fillColor=r.Slider.fillColorHover=S,o.Slider.dotBorderActive=r.Slider.dotBorderActive=`2px solid ${S}`,l.value=S}});let s=Z(""),c=Z(""),d=Z(""),u=Z(""),p=Z("");function f(S){return`${parseInt(S.slice(1,3),16)},${parseInt(S.slice(3,5),16)},${parseInt(S.slice(5,7),16)}`}Nt(()=>{if(B.rainbowLine){s.value=`rgba(${f(B.rainbowColor1)}, 0.6)`,c.value=`rgba(${f(B.rainbowColor2)}, 0.6)`,d.value=`rgba(${f(B.rainbowColor3)}, 0.6)`,u.value=`rgba(${f(B.rainbowColor4)}, 0.6)`,p.value=`rgba(${f(B.rainbowColor5)}, 0.6)`;return}B.cssChange===B.cssChange&&(s.value=c.value=d.value=u.value=p.value="var(--nav-indentation-guide-color)")});let m=Z("");Nt(()=>{m.value=B.textDirectionDecideBy==="text"?"plaintext":"isolate"});function y(){return v(wa,{size:"12px"},{default:()=>v(Uf)})}function _({option:S}){let K=null;switch(S.icon){case"ArticleOutlined":{K=v(Rf);break}case"AudiotrackOutlined":{K=v(Af);break}case"OndemandVideoOutlined":{K=v(Gf);break}case"CategoryOutlined":{K=v($f);break}case"FilePresentOutlined":{K=v(Wf);break}case"ImageOutlined":{K=v(zf);break}case"PublicOutlined":{K=v(Hf);break}case"TextFieldsOutlined":{K=v(Ff);break}default:return null}return v(wa,{size:"1.2em"},{default:()=>K})}Je(()=>{addEventListener("quiet-outline-reset",V)}),sn(()=>{removeEventListener("quiet-outline-reset",V)});let h=we("plugin"),O=we("container"),W=(S,K)=>"item-"+S.level+"-"+K,w=S=>parseInt(S.split("-")[2]);function b(S){x(S),A(S)}B.onPosChange=b;function D(){return h.navigator.getDefaultLevel()}function x(S){if(h.settings.auto_expand_ext!=="disable"){let K=B.headers[S],T=S0&&(B.headers[ae].level!Me.value.contains(W(B.headers[L],L)));T=T===void 0?K[K.length-1]:T,k.value=T,setTimeout(()=>{let L=O.querySelector(`#no-${T}`);L&&L.scrollIntoView({block:"center",behavior:"smooth"})},100)}let E=j(()=>S=>{let K=parseInt(S.option.key.split("-")[1]),T=parseInt(S.option.key.split("-")[2]),L=S.option.label||"",ae=k.value===T?"located":"";return{class:`level-${K} ${ae}`,id:`no-${T}`,"aria-label":B.ellipsis?S.option.label:"","aria-label-position":B.labelDirection,raw:L}}),H,M,le="";function ye(S){let T=S.target.closest(".n-tree-node");T&&(H=T,M=S,addEventListener("keydown",Ce))}function Pe(S){removeEventListener("keydown",Ce)}let fe=S=>h.settings.show_popover_key==="ctrlKey"&&S.ctrlKey||h.settings.show_popover_key==="altKey"&&S.altKey||h.settings.show_popover_key==="metaKey"&&S.metaKey;function ce(S){fe(S)&&h.app.workspace.trigger("hover-link",{event:M,source:"preview",targetEl:H,hoverParent:{hoverPopover:null},linktext:"#"+H?.getAttribute("raw"),sourcePath:h.navigator.getPath()})}let Ce=Ke(ce,100);function Ke(S,K){let T=!0,L;return function(...ae){let he=this,Ne=H?.getAttribute("raw")||"";if(Ne!==le||T){S.apply(he,ae),T=!1,le=Ne;return}L&&clearTimeout(L),L=setTimeout(()=>{T=!0},K)}}Je(()=>{O.addEventListener("mouseover",ye),O.addEventListener("mouseout",Pe)}),sn(()=>{O.removeEventListener("mouseover",ye),O.removeEventListener("mouseout",Pe),removeEventListener("keydown",Ce)});let He=Z(D()),Me=Z([]);pt(He.value);function Ye(S,K="replace"){if(K==="replace")Me.value=S;else{let T=new Set([...Me.value,...S]);Me.value=[...T]}Xe()}function Xe(){let S=h.navigator.getPath();S&&(h.heading_states[S]=je(Me.value))}function Dt(S,K){Ye(S)}function pt(S){He.value=S;let K=Le(S);Ye(K)}jy(window,"quiet-outline-levelchange",S=>{typeof S.detail.level=="number"?pt(S.detail.level):S.detail.level==="inc"?pt(Math.clamp(He.value+1,0,5)):S.detail.level==="dec"&&pt(Math.clamp(He.value-1,0,5))});function Le(S){return B.headers.map((T,L)=>({level:T.level,no:L})).filter((T,L,ae)=>L===ae.length-1||ae[L].level>=ae[L+1].level?!1:ae[L].level<=S).map(T=>"item-"+T.level+"-"+T.no)}function We(S,K){let T=S.split("-");return`item-${T[1]}-${parseInt(T[2])+K}`}Qe(()=>je(B.modifyKeys),({offsetModifies:S,removes:K,adds:T,modifies:L})=>{let ae=Me.value.filter(he=>{let Ne=w(he),Be=!K.some(Ve=>Ve.begin<=Ne&&NeVe.oldBegin===Ne&&Ve.levelChangeType==="parent2child");return Be&&Ge}).map(he=>{let Ne=w(he),Be=L.find(Ft=>Ft.oldBegin===Ne),Ge=S.findLastIndex(Ft=>Ft.begin<=Ne),Ve=Ge===-1?he:We(he,S[Ge].offset),$t=w(Ve);return Be?`item-${B.headers[Be.newBegin].level}-${$t}`:Ve});L.filter(he=>he.levelChangeType==="child2parent").forEach(he=>{ae.push(`item-${B.headers[he.newBegin].level}-${he.newBegin}`)}),T.forEach(he=>{let Ne=X(he.begin);(he.begin>=B.headers.length-1||B.headers[he.begin].level>=B.headers[he.begin+1].level)&&Ne.pop(),Ne.forEach(Be=>{ae.push(`item-${B.headers[Be].level}-${Be}`)})}),Ye([...new Set(ae)])});let gt=Z(0);Qe(()=>B.leafChange,()=>{let S=mt.value;mt.value="",He.value=D();let K=h.heading_states[h.navigator.getPath()];h.settings.remember_state&&K?Ye(K):pt(He.value),h.settings.keep_search_input&&Bt(()=>{mt.value=S})});let Re={0:"",1:"",2:"",3:"",4:"",5:""};function lt(S){let K=B.headers.filter(T=>T.level===S).length;return S>0?`H${S}: ${K}`:"No expand"}let bt=j(()=>{if(B.markdown)return P}),mt=Z("");function g(S,K){let T=/.*/;try{T=RegExp(S,"i")}catch{}finally{return T.test(K.label||"")}}function C(S,K){return(K.label||"").toLowerCase().contains(S.toLowerCase())}let z=j(()=>B.regexSearch?g:C),q=j(()=>B.headers.filter(S=>{let K={label:S.heading};return z.value(mt.value,K)}).length);async function G(S,K){if(K[0]===void 0)return;let T=K[0].key.split("-"),L=parseInt(T[2]);h.navigator.jump(L)}let re=j(()=>oe(B.headers));function oe(S){return F(S)}function F(S){let K={children:[]},T=[{node:K,level:-1}];return S.forEach((L,ae)=>{let he={label:L.heading,key:"item-"+L.level+"-"+ae,line:L.position.start.line,icon:L.icon};for(;L.level<=T.last().level;)T.pop();let Ne=T.last().node;Ne.children===void 0&&(Ne.children=[]),Ne.children.push(he),T.push({node:he,level:L.level})}),K.children}function Q(S){let K=[];function T(L){if(!L||L.length===0)return;let ae=0;for(let he=L.length-1;he>=0;he--){let Ne=w(L[he].key);if(Ne<=S){K.push(Ne),ae=he;break}}T(L[ae].children)}return T(re.value),K}function X(S){let K=[],T=B.headers[S].level+1;for(let L=S;L>=0;L--)B.headers[L].level.*?<\/mjx-container>/g)||[];return K=K.replace(/.*?<\/mjx-container>/g,()=>""),K=(0,Wy.sanitizeHTMLToDom)(`
${K}
`).children[0].innerHTML,K=K.replace(/.*?<\/math>/g,()=>L[T++]),v("div",{innerHTML:K})}async function $(){h.navigator.toBottom()}function V(){mt.value="",He.value=D(),pt(He.value)}Je(()=>{O.addEventListener("dragstart",S=>{if(!h.navigator.canDrop)return;let K=S.target;if(!K||!K.hasClass("n-tree-node"))return;let T=parseInt(K.id.slice(3)),L=B.headers[T];S.dataTransfer?.setData("text/plain",L.heading),h.app.dragManager.onDragStart(S,{source:"outline",type:"heading",icon:"heading-glyph",title:L.heading,heading:L,file:h.navigator.view.file})})});async function ie({node:S,dragNode:K,dropPosition:T}){if(!h.navigator.canDrop)return;let L=ue(K),ae=ue(S);await h.navigator.handleDrop(L,ae,T)}function ue(S){return typeof S!="string"&&(S=S.key),parseInt(S.split("-")[2])}let Se={lightThemeConfig:o,darkThemeConfig:r,get theme(){return n},set theme(S){n=S},get iconColor(){return i},set iconColor(S){i=S},getDefaultColor:a,get locatedColor(){return l},set locatedColor(S){l=S},get rainbowColor1(){return s},set rainbowColor1(S){s=S},get rainbowColor2(){return c},set rainbowColor2(S){c=S},get rainbowColor3(){return d},set rainbowColor3(S){d=S},get rainbowColor4(){return u},set rainbowColor4(S){u=S},get rainbowColor5(){return p},set rainbowColor5(S){p=S},hexToRGB:f,get biDi(){return m},set biDi(S){m=S},renderSwitcherIcon:y,renderPrefix:_,plugin:h,container:O,get toKey(){return W},set toKey(S){W=S},get fromKey(){return w},set fromKey(S){w=S},onPosChange:b,getDefaultLevel:D,autoExpand:x,get locateIdx(){return k},set locateIdx(S){k=S},resetLocated:A,setAttrs:E,get triggerNode(){return H},set triggerNode(S){H=S},get mouseEvent(){return M},set mouseEvent(S){M=S},get prevShowed(){return le},set prevShowed(S){le=S},onMouseEnter:ye,onMouseLeave:Pe,funcKeyPressed:fe,_openPopover:ce,openPopover:Ce,customDebounce:Ke,get level(){return He},set level(S){He=S},get expanded(){return Me},set expanded(S){Me=S},modifyExpandKeys:Ye,syncExpandKeys:Xe,expand:Dt,switchLevel:pt,filterKeysLessThanEqual:Le,offset:We,get update_tree(){return gt},set update_tree(S){gt=S},marks:Re,formatTooltip:lt,get renderMethod(){return bt},set renderMethod(S){bt=S},get pattern(){return mt},set pattern(S){mt=S},regexFilter:g,simpleFilter:C,get filter(){return z},set filter(S){z=S},get matchCount(){return q},set matchCount(S){q=S},jump:G,get data2(){return re},set data2(S){re=S},makeTree:oe,arrToTree:F,getPath:Q,getPathFromArr:X,renderLabel:P,toBottom:$,reset:V,onDrop:ie,getNo:ue,get NTree(){return Ef},get NButton(){return Fd},get NInput(){return Ad},get NSlider(){return kf},get NConfigProvider(){return ru},get SettingsBackupRestoreRound(){return Nf},get ArrowCircleDownRound(){return Tf},get Icon(){return wa},get store(){return B}};return Object.defineProperty(Se,"__isScriptSetup",{enumerable:!1,value:!0}),Se}});var TN={id:"container"},ON={key:0,class:"function-bar"},NN={key:2};function Ky(e,t,o,r,n,i){return Ze(),ct("div",TN,[dt(r.NConfigProvider,{theme:r.theme,"theme-overrides":r.theme===null?r.lightThemeConfig:r.darkThemeConfig},{default:ln(()=>[r.store.searchSupport?(Ze(),ct("div",ON,[dt(r.NButton,{size:"small",circle:"",onClick:r.toBottom,"aria-label":"To Bottom"},{icon:ln(()=>[dt(r.Icon,null,{default:ln(()=>[dt(r.ArrowCircleDownRound,{style:vr(r.iconColor)},null,8,["style"])]),_:1})]),_:1}),dt(r.NButton,{size:"small",circle:"",onClick:r.reset,"aria-label":"Reset"},{icon:ln(()=>[dt(r.Icon,null,{default:ln(()=>[dt(r.SettingsBackupRestoreRound,{style:vr(r.iconColor)},null,8,["style"])]),_:1})]),_:1}),dt(r.NInput,{value:r.pattern,"onUpdate:value":t[0]||(t[0]=a=>r.pattern=a),placeholder:"Input to search",size:"small",clearable:""},null,8,["value"])])):il("v-if",!0),r.store.levelSwitch?(Ze(),Di(r.NSlider,{key:1,value:r.level,"on-update:value":r.switchLevel,marks:r.marks,step:"mark",min:0,max:5,style:{margin:"4px 0"},"format-tooltip":r.formatTooltip},null,8,["value"])):il("v-if",!0),r.pattern?(Ze(),ct("code",NN,Bs(r.matchCount)+" result(s): ",1)):il("v-if",!0),(Ze(),Di(r.NTree,{"block-line":"",pattern:r.pattern,data:r.data2,"on-update:selected-keys":r.jump,"render-label":r.renderMethod,"render-prefix":r.renderPrefix,"node-props":r.setAttrs,"expanded-keys":r.expanded,"render-switcher-icon":r.renderSwitcherIcon,"on-update:expanded-keys":r.expand,key:r.update_tree,filter:r.filter,"show-irrelevant-nodes":!r.store.hideUnsearched,class:qr({ellipsis:r.store.ellipsis}),draggable:r.store.dragModify,onDrop:r.onDrop,"allow-drop":()=>r.plugin.navigator.canDrop},null,8,["pattern","data","render-label","node-props","expanded-keys","filter","show-irrelevant-nodes","class","draggable","allow-drop"]))]),_:1},8,["theme","theme-overrides"])])}Ds.render=Ky;Ds.__file="src/ui/Outline.vue";var Uy=Ds;var ri="quiet-outline",Ts=class extends qy.ItemView{vueApp;plugin;constructor(t,o){super(t),this.plugin=o}getViewType(){return ri}getDisplayText(){return"Quiet Outline"}getIcon(){return"lines-of-text"}async onOpen(){let t=this.containerEl.children[1];t.empty();let o=t.createEl("div",{cls:"quiet-outline"});this.vueApp=qm(Uy),this.vueApp.provide("plugin",this.plugin),this.vueApp.provide("container",o),this.vueApp.mount(o)}async onClose(){}onunload(){this.vueApp.unmount()}};var Gy=require("obsidian");var Lo=class extends Gy.Component{_loaded=!1;canDrop=!1;plugin;view;constructor(t,o){super(),this.plugin=t,this.view=o}async load(){this._loaded||(this._loaded=!0,this.constructor._installed||(await this.install(),this.constructor._installed=!0),await this.onload(),this.view?.addChild(this))}async unload(){if(this._loaded){for(this._loaded=!1;this._events.length>0;)this._events.pop()();await this.onunload(),this.view?.removeChild(this),this.plugin.navigator=new _a(this.plugin,null)}}getDefaultLevel(){return parseInt(this.plugin.settings.expand_level)}getPath(){return""}async install(){}async onload(){}async onunload(){}async handleDrop(t,o,r){}toBottom(){}},_a=class extends Lo{getId(){return"dummy"}async jump(t){}async getHeaders(){return[]}async setHeaders(){B.headers=[]}async updateHeaders(){}};var o0=require("obsidian");var Yy=require("@codemirror/view"),rp=class{constructor(t){}update(t){t.selectionSet&&document.dispatchEvent(new CustomEvent("quiet-outline-cursorchange",{detail:{docChanged:t.docChanged}}))}destroy(){}},Xy=Yy.ViewPlugin.fromClass(rp);function PN(e,t){let o=0,r=0,n=[];for(;os.length-c.length),l[0].type=="add"&&l[1].type=="remove"&&l[0].length===l[1].length?l[1]:l[0]}function Zy(e,t,o){let r=t.slice(o),n=r.findIndex(i=>i.heading===e.heading&&i.level===e.level);return n=n<0?r.length:n,n}function IN(e,t,o,r){let n=Math.min(e.length-o-1,t.length-r-1,5);for(let i=1;n>0&&i<=n;i++)if(e[o+i].heading===t[r+i].heading&&e[o+i].level===t[r+i].level)return i;return Number.MAX_VALUE}function Ea(e,t){let o=PN(e,t),r={offsetModifies:[],removes:[],adds:[],modifies:[]},n=0;return o.forEach(i=>{switch(i.type){case"add":{r.adds.push({begin:n+i.begin}),n+=i.length,r.offsetModifies.push({begin:i.begin,offset:n});break}case"remove":{n-=i.length,r.offsetModifies.push({begin:i.begin+i.length,offset:n}),r.removes.push({begin:i.begin,length:i.length});break}case"modify":{if(!i.levelChange||i.levelChangeType==="child2child")break;r.modifies.push({oldBegin:i.begin,newBegin:i.begin+n,levelChangeType:i.levelChangeType});break}}}),r}async function np(e,t){return await e.metadataCache.computeMetadataAsync(new TextEncoder().encode(t).buffer)}async function Jy(e){let t=await np(app,e),o=t.headings||[],r=t.sections||[],i=[{heading:"",headingLevel:0,headingExpaned:!1,id:-1,content:{preContent:"",children:[]},type:"section"}],a=0,l=0,s=0;for(let d of r)if(d.type==="heading"){for(l=Math.max(d.position.start.offset,0),i.last().content.preContent=e.slice(a,l);o[s].level<=i.last().headingLevel;)i.pop();let u={heading:o[s].heading,headingLevel:o[s].level,headingExpaned:!1,id:s,content:{preContent:"",children:[]},type:"section"};i.last().content.children.push(u),i.push(u),a=o[s].position.end.offset+1,s++}let c=e.slice(a);return i.length>1&&!c.endsWith(` `)&&(c+=` -`),i.last().content.preContent=c,i[0]}function ty(e,t,o,r){let[n,i]=J0(e,t),[a,l]=J0(e,o),s=structuredClone(i);switch(r){case"before":a.content.children.splice(a.content.children.indexOf(l),0,s),Os(s,l.headingLevel-i.headingLevel);break;case"after":a.content.children.splice(a.content.children.indexOf(l)+1,0,s),Os(s,l.headingLevel-i.headingLevel);break;case"inside":l.content.children.push(s),Os(s,l.headingLevel-i.headingLevel+1);break}n.content.children.splice(n.content.children.indexOf(i),1)}function J0(e,t){let o=oy(e,e,t);if(!o)throw new Error(`section ${t} not found`);return o}function oy(e,t,o){if(e.id===o)return[t,e];for(let r of e.content.children){let n=oy(r,e,o);if(n)return n}}function MP(e){return e.preContent+e.children.map(ip).join("")}function ip(e){let t="#".repeat(e.headingLevel)+" "+e.heading,o=MP(e.content);return e.id<0?o:`${t} -${o}`}function Os(e,t){e.headingLevel+=t,e.content.children.forEach(o=>{Os(o,t)})}var mo,Ur=class extends Lo{view;canDrop=!0;constructor(t,o){super(t),mo=t,this.view=o}getId(){return"markdown"}async getHeaders(){return this.plugin.app.metadataCache.getFileCache(this.view.file)?.headings||[]}async setHeaders(){let t=await this.getHeaders();B.headers=t}async updateHeaders(){let t=await this.getHeaders();B.modifyKeys=_a(B.headers,t),B.headers=t}async jump(t){let o=B.headers[t].position.start.line,n={line:o,cursor:{from:{line:o,ch:0},to:{line:o,ch:0}}};this.plugin.jumping=!0,B.onPosChange(t),setTimeout(()=>{this.view.setEphemeralState(n)})}async install(){this.plugin.registerEditorExtension([Z0])}async onload(){this.registerDomEvent(document,"quiet-outline-cursorchange",$P),this.registerDomEvent(this.view.contentEl,"scroll",BP,!0)}async onunload(){}toBottom(){let t=this.view.data.split(` -`),o=()=>{this.view.setEphemeralState({line:t.length-5})};o(),setTimeout(o,100)}getDefaultLevel(){let t;return t=this.plugin.app.metadataCache.getFileCache(this.view.file)?.frontmatter?.["qo-default-level"],typeof t=="string"&&(t=parseInt(t)),t||parseInt(mo.settings.expand_level)}getPath(){return this.view.file.path}async handleDrop(t,o,r){let n=await ey(this.view.data);ty(n,t,o,r),await mo.app.vault.modify(this.view.file,ip(n))}};function $P(e){if(!(!mo.allow_cursor_change||mo.jumping||e?.detail.docChanged)&&mo.settings.locate_by_cursor){mo.block_scroll();let t=ny(!1,!0),o=iy(t);if(o===void 0)return;B.onPosChange(o)}}function ny(e,t){let r=mo.navigator.view;return mo.settings.locate_by_cursor&&!e?t?r.editor.getCursor("from").line:Math.ceil(r.previewMode.getScroll()):t?LP(r.editor.cm):zP(r)}function LP(e){let{y:t,height:o}=e.dom.getBoundingClientRect(),r=t+o/2,n=e.viewportLineBlocks,i=0;return n.forEach(a=>{let l=e.domAtPos(a.from).node,c=(l.nodeName=="#text"?l.parentNode:l).getBoundingClientRect();c.y+c.height/2<=r&&(i=e.state.doc.lineAt(a.from).number)}),Math.max(i-2,0)}function zP(e){let t=e.previewMode.renderer,o=t.previewEl,r=o.getBoundingClientRect(),n=r.y+r.height/2,i=o.querySelectorAll(".markdown-preview-sizer>div:not(.markdown-preview-pusher)"),a=0;return i.forEach(l=>{let{y:s}=l.getBoundingClientRect();s<=n&&(a=t.getSectionForElement(l).lineStart)}),a}function iy(e){let t=null,o=B.headers.length;for(;--o>=0;)if(B.headers[o].position.start.line<=e){t=B.headers[o];break}if(t)return o}var BP=(0,ry.debounce)(HP,200,!0);function HP(e){if(!mo.allow_scroll)return;if(mo.jumping){mo.jumping=!1;return}let t=e.target;if(!t.classList.contains("markdown-preview-view")&&!t.classList.contains("cm-scroller")&&!t.classList.contains("outliner-plugin-list-lines-scroller"))return;let o=mo.navigator.view.getMode()==="source",r=ny(!0,o),n=iy(r);n!==void 0&&B.onPosChange(n)}var sy=require("obsidian");function ay(e,t){let o=Object.keys(t).map(r=>VP(e,r,t[r]));return o.length===1?o[0]:function(){o.forEach(r=>r())}}function VP(e,t,o){let r=e[t],n=e.hasOwnProperty(t),i=n?r:function(){return Object.getPrototypeOf(e)[t].apply(this,arguments)},a=o(i);return r&&Object.setPrototypeOf(a,r),Object.setPrototypeOf(l,a),e[t]=l,s;function l(...c){return a===i&&e[t]===l&&s(),a.apply(this,c)}function s(){e[t]===l&&(n?e[t]=i:delete e[t]),a!==i&&(a=i,Object.setPrototypeOf(l,r||Function))}}var Ps=class extends Lo{view;constructor(t,o){super(t),this.view=o}async onload(){}async install(){let t=this.plugin;t.klasses.canvas||(this.patchCanvas(this.view.canvas),t.klasses.canvas=this.view.constructor),t.registerEvent(t.app.workspace.on("quiet-outline:canvas-change",()=>{t.refresh()})),t.registerEvent(t.app.workspace.on("quiet-outline:canvas-selection-change",async o=>{if(o.size===0||o.size>1){let i=t.app.workspace.getActiveFileView();if(!i)return;await t.updateNav(i.getViewType(),i),await t.refresh_outline(),B.refreshTree();return}let r=[...o][0];if(!r.hasOwnProperty("nodeEl"))return;let n=r;if(n.unknownData.type==="file"&&n.file.extension==="md"){let i=n.child;await t.updateNav("embed-markdown-file",i),await t.refresh_outline(),B.refreshTree();return}if(n.unknownData.type==="text"){let i=n.child;await t.updateNav("embed-markdown-text",i),await t.refresh_outline(),B.refreshTree();return}}))}async jump(t){let r=this.view.canvas.nodes.get(B.headers[t].id);r!==void 0&&this.view.canvas.zoomToBbox(r.bbox)}async setHeaders(){B.headers=await this.getHeaders()}async getHeaders(){let t=this.view.canvas.data.nodes;return t?FP(t):[]}async updateHeaders(){await this.setHeaders()}getPath(){return this.view.file.path}getId(){return"canvas"}patchCanvas(t){let o=this.plugin;o.register(ay(t.constructor.prototype,{requestSave(r){return function(...n){return o.app.workspace.trigger("quiet-outline:canvas-change"),r.apply(this,n)}},updateSelection(r){return function(...n){r.apply(this,n),o.app.workspace.trigger("quiet-outline:canvas-selection-change",this.selection)}}}))}};function FP(e){let t=e.slice().sort((n,i)=>-WP(n,i)),o=[];for(let n=0;n{r.push({level:i,heading:KP(n),id:n.id,icon:jP(n),position:{start:{line:0,col:0,offset:0},end:{line:0,col:0,offset:0}}})}),r}function jP(e){if(e.type==="group")return"CategoryOutlined";if(e.type==="text")return"TextFieldsOutlined";if(e.type==="link")return"PublicOutlined";if(e.type==="file"){if(e.file.endsWith(".md"))return"ArticleOutlined";if(e.file.endsWith(".mp3"))return"AudiotrackOutlined";if(e.file.endsWith(".mp4"))return"OndemandVideoOutlined";if(e.file.endsWith(".png")||e.file.endsWith(".jpg"))return"ImageOutlined"}return"FilePresentOutlined"}var ly=e=>e.height*e.width;function WP(e,t){return ly(e)-ly(t)}var ap={};function KP(e){let t;switch(e.type){case"text":{t=e.text.split(` -`)[0],t=t.slice(t.search(/[^#\s].*/)),t.length>20&&(t=t.substring(0,20)+"...");break}case"file":{t=e.file.split("/").slice(-1)[0];break}case"link":{ap[e.url]?t=ap[e.url]:(t=e.url,(0,sy.request)(e.url).then(o=>{ap[e.url]=/(.*)<\/title>/.exec(o)?.[1]||""}).catch(()=>{}));break}case"group":{t=e.label||"Unnamed Group";break}}return t}function cy(e,t,o){for(let r=0;r<e.length;r++)o(e[r].node,t),cy(e[r].children,t+1,o)}function dy(e,t){let o=!1;for(let r=0;r<e.length;r++)e[r].node.type==="group"&&UP(t,e[r].node)&&(o=!0,dy(e[r].children,t));o||e.push({node:t,children:[]})}function UP(e,t){return e.x>=t.x&&e.y>=t.y&&e.x+e.width<=t.x+t.width&&e.y+e.height<=t.y+t.height}var Ns=class extends Ur{getId(){return"kanban"}canDrop=!1;async install(){Ur._installed||(await super.install(),Ur._installed=!0)}async jump(t){document.querySelectorAll('.workspace-leaf[style=""] .kanban-plugin__lane-wrapper')[t]?.scrollIntoView({block:"center",inline:"center",behavior:"smooth"})}};var Rs=class extends Lo{view;constructor(t,o){super(t),this.view=o}getId(){return"embed-markdown-file"}async jump(t){let o=B.headers[t].position.start.line;this.plugin.jumping=!0,B.onPosChange(t),setTimeout(()=>{uy(this.view,{line:o})})}async getHeaders(){return this.plugin.app.metadataCache.getFileCache(this.view.file)?.headings||[]}async setHeaders(){let t=await this.getHeaders();B.headers=t}async updateHeaders(){let t=await this.getHeaders();B.modifyKeys=_a(B.headers,t),B.headers=t}},Is=class extends Lo{view;constructor(t,o){super(t),this.view=o}getId(){return"embed-markdown-text"}async jump(t){let o=B.headers[t].position.start.line;uy(this.view,{line:o})}async getHeaders(){let{headings:t}=await np(this.plugin.app,this.view.text);return t||[]}async setHeaders(){B.headers=await this.getHeaders()}async updateHeaders(){let t=await this.getHeaders();B.modifyKeys=_a(B.headers,t),B.headers=t}};function uy(e,t){e.getMode()==="source"?qP(e.editMode.editor,t.line):GP(e.previewMode.renderer,t.line)}function qP(e,t){let o={from:{line:t,ch:0},to:{line:t,ch:e.getLine(t).length}};e.addHighlights([o],"is-flashing",!0,!0),e.setCursor(o.from),e.scrollIntoView(o,!0)}function GP(e,t){e.applyScroll(t,{highlight:!0,center:!0})}var As={dummy:Ts,markdown:Ur,kanban:Ns,canvas:Ps,"embed-markdown-file":Rs,"embed-markdown-text":Is};function lp(e,t,o){let r=-1;return()=>{e(),window.clearTimeout(r),r=window.setTimeout(o,t)}}var Rt=require("obsidian");var fy={"Settings for Quiet Outline.":"Quiet Outline \u7684\u8BBE\u7F6E\u9875\u9762","Set Primary Color":"\u8BBE\u7F6E\u4E3B\u989C\u8272 \u660E/\u6697","Patch default color":"\u7528\u8BBE\u7F6E\u8986\u76D6\u9ED8\u8BA4\u4E3B\u989C\u8272","Set Rainbow Line Color":"\u8BBE\u7F6E\u5F69\u8679\u5927\u7EB2\u7EBF\u989C\u8272","Render Markdown":"\u6E32\u67D3markdown\u5143\u7D20","Render heading string as markdown format.":"\u4EE5markdown\u683C\u5F0F\u6E32\u67D3\u6807\u9898\u6587\u672C","Search Support":"\u5F00\u542F\u641C\u7D22","Add a searching area on the top":"\u5728\u9876\u90E8\u6DFB\u52A0\u4E00\u4E2A\u641C\u7D22\u6846","Level Switch":"\u5C42\u7EA7\u5207\u6362\u5668","Expand headings to certain level.":"\u5C55\u5F00\u6807\u9898\u5230\u7279\u5B9A\u5C42\u7EA7","Default Level":"\u9ED8\u8BA4\u5C42\u7EA7","Default expand level when opening a new note.":"\u6253\u5F00\u65B0\u7B14\u8BB0\u65F6\uFF0C\u6807\u9898\u5C55\u5F00\u5230\u7684\u9ED8\u8BA4\u5C42\u7EA7","No expand":"\u4E0D\u5C55\u5F00","Hide Unsearched":"\u8FC7\u6EE4\u672A\u641C\u7D22\u7684\u6807\u9898","Hide irrelevant headings when searching":"\u641C\u7D22\u65F6\uFF0C\u9690\u85CF\u672A\u547D\u4E2D\u7684\u6807\u9898","Regex Search":"\u6B63\u5219\u641C\u7D22","Search headings using regular expression":"\u652F\u6301\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F\u6765\u641C\u7D22","Auto Expand":"\u81EA\u52A8\u5C55\u5F00","Auto expand and collapse headings when scrolling and cursor position change":"\u5F53\u6EDA\u52A8\u9875\u9762\u65F6\uFF0C\u81EA\u52A8\u8DDF\u8E2A\u5F53\u524D\u6240\u5728\u6807\u9898\u5E76\u5C55\u5F00","Only Expand":"\u4EC5\u5C55\u5F00\u5F53\u524D\u6807\u9898","Expand and Collapse Rest":"\u5C55\u5F00\u540C\u65F6\u6298\u53E0\u5269\u4F59\u6807\u9898","Expand and Collapse Rest to Default":"\u5C55\u5F00\u540C\u65F6\u6298\u53E0\u5269\u4F59\u6807\u9898\u81F3\u9ED8\u8BA4\u5C42\u7EA7","Expand and Collapse Rest to Setting Level (Level Switch)":"\u5C55\u5F00\u540C\u65F6\u6298\u53E0\u5269\u4F59\u6807\u9898\u81F3\u8BBE\u7F6E\u5C42\u7EA7(\u5C42\u7EA7\u5207\u6362\u5668)",Disabled:"\u5173\u95ED\u81EA\u52A8\u5C55\u5F00","Locate By Cursor":"\u5B9A\u4F4D\u5230\u5149\u6807\u5904","Highlight and Auto expand postion will be determined by cursor position":"\u9AD8\u4EAE\u548C\u81EA\u52A8\u5C55\u5F00\u4F4D\u7F6E\u5C06\u7531\u5149\u6807\u4F4D\u7F6E\u51B3\u5B9A","Show Popover on hover":"\u9F20\u6807\u60AC\u505C\u5728\u6807\u9898\u65F6\u663E\u793A\u7B14\u8BB0\u5185\u5BB9","Press functional key and move cursor to heading":"\u6309\u4F4F\u529F\u80FD\u952E\uFF0C\u79FB\u52A8\u5149\u6807\u5230\u6807\u9898\u5904",Disable:"\u5173\u95ED",Ellipsis:"\u7701\u7565\u957F\u6807\u9898","Tooltip direction":"\u5B8C\u6574\u6807\u9898\u663E\u793A\u65B9\u5411","Keep one line per heading":"\u4FDD\u6301\u6807\u9898\u53EA\u6709\u4E00\u884C,\u7701\u7565\u591A\u4F59\u90E8\u5206","Remember States":"\u8BB0\u5FC6\u5C55\u5F00\u72B6\u6001","Remember expanded/collapsed state of headings of opened notes":"\u8BB0\u5FC6\u5DF2\u6253\u5F00\u7B14\u8BB0\u7684\u6807\u9898\u5C55\u5F00\u72B6\u6001","Drag headings to modify note":"\u542F\u7528\u62D6\u62FD\u6807\u9898\u6765\u8C03\u6574\u6587\u6863\u7ED3\u679C","\u2757 This will modify note content, be careful.":"\u2757 \u62D6\u62FD\u64CD\u4F5C\u4F1A\u6539\u53D8\u6587\u6863\u5185\u5BB9\uFF0C\u5C0F\u5FC3\u4F7F\u7528","Export Format":"\u6807\u9898\u8F93\u51FA\u683C\u5F0F"};var sp={"Settings for Quiet Outline.":"Settings for Quiet Outline.","Set Primary Color":"Set Primary Color Light/Dark","Patch default color":"Patch default color","Set Rainbow Line Color":"Set Rainbow Line Color","Render Markdown":"Render Markdown","Render heading string as markdown format.":"Render heading string as markdown format","Search Support":"Search Support","Add a searching area on the top":"Add a search area on the top","Level Switch":"Level Switch","Expand headings to certain level.":"Expand headings to certain level","Default Level":"Default Level","Default expand level when opening a new note.":"Default expand level","No expand":"No expand","Hide Unsearched":"Hide Unsearched","Hide irrelevant headings when searching":"Hide irrelevant headings when searching","Regex Search":"Regex Search","Search headings using regular expression":"Search headings using regular expression","Auto Expand":"Auto Expand","Auto expand and collapse headings when scrolling and cursor position change":"Auto expand and collapse headings when scrolling and cursor position change","Only Expand":"Only Expand","Expand and Collapse Rest":"Expand and Collapse Rest","Expand and Collapse Rest to Default":"Expand and Collapse Rest to Default","Expand and Collapse Rest to Setting Level (Level Switch)":"Expand and Collapse Rest to Setting Level (Level Switch)",Disabled:"Disabled","Locate By Cursor":"Locate By Cursor","Show Popover on hover":"Show Popover on hover","Press functional key and move cursor to heading":"Press functional key and move cursor to heading",Disable:"Disable","Highlight and Auto expand postion will be determined by cursor position":"Highlight and Auto expand postion will be determined by cursor position",Ellipsis:"Ellipsis","Tooltip direction":"Tooltip direction","Keep one line per heading":"Keep one line per heading","Remember States":"Remember States","Remember expanded/collapsed state of headings of opened notes":"Remember expanded/collapsed state of headings of opened notes","Drag headings to modify note":"Drag headings to modify note","\u2757 This will modify note content, be careful.":"\u2757 This will modify note content, be careful","Export Format":"Export Format"};var py={"Settings for Quiet Outline.":"Quiet Outline \u7684\u8A2D\u5B9A\u9801\u9762","Render Markdown":"\u6E32\u67D3markdown\u5143\u7D20","Render heading string as markdown format.":"\u4EE5markdown\u683C\u5F0F\u6E32\u67D3\u6A19\u984C\u6587\u5B57","Search Support":"\u958B\u555F\u641C\u7D22","Add a searching area on the top":"\u5728\u9802\u90E8\u65B0\u589E\u4E00\u500B\u641C\u7D22\u6846","Level Switch":"\u5C64\u7D1A\u5207\u63DB","Expand headings to certain level.":"\u5C55\u958B\u6A19\u984C\u5230\u7279\u5B9A\u5C64\u7D1A","Default Level":"\u9810\u8A2D\u5C64\u7D1A","Default expand level when opening a new note.":"\u6253\u958B\u65B0\u7B46\u8A18\u6642\uFF0C\u6A19\u984C\u5C55\u958B\u5230\u7684\u9810\u8A2D\u5C64\u7D1A","No expand":"\u4E0D\u5C55\u958B","Hide Unsearched":"\u904E\u6FFE\u672A\u641C\u7D22\u7684\u6A19\u984C","Hide irrelevant headings when searching":"\u641C\u7D22\u6642\uFF0C\u96B1\u85CF\u672A\u547D\u4E2D\u7684\u6A19\u984C","Regex Search":"\u6B63\u5247\u641C\u7D22","Search headings using regular expression":"\u652F\u63F4\u4F7F\u7528\u6B63\u5247\u904B\u7B97\u5F0F\u4F86\u641C\u7D22","Auto Expand":"\u81EA\u52D5\u5C55\u958B","Auto expand and collapse headings when scrolling and cursor position change":"\u7576\u6372\u52D5\u9801\u9762\u6216\u5149\u6A19\u6539\u8B8A\u6642\uFF0C\u81EA\u52D5\u8DDF\u96A8\u76EE\u524D\u6240\u5728\u6A19\u984C\u4E26\u5C55\u958B",Ellipsis:"\u7701\u7565\u9577\u6A19\u984C","Keep one line per heading":"\u4FDD\u6301\u6A19\u984C\u53EA\u6709\u4E00\u884C\uFF0C\u7701\u7565\u591A\u9918\u90E8\u5206"};var YP={en:sp,zh:fy,"zh-TW":py},XP=window.localStorage.getItem("language"),my=YP[XP||"en"];function je(e){return my&&my[e]||sp[e]}var hy={patch_color:!0,primary_color_light:"#18a058",primary_color_dark:"#63e2b7",rainbow_line:!1,rainbow_color_1:"#FD8B1F",rainbow_color_2:"#FFDF00",rainbow_color_3:"#07EB23",rainbow_color_4:"#2D8FF0",rainbow_color_5:"#BC01E2",search_support:!0,level_switch:!0,markdown:!0,expand_level:"0",hide_unsearched:!0,auto_expand_ext:"only-expand",regex_search:!1,ellipsis:!1,label_direction:"left",drag_modify:!1,locate_by_cursor:!1,show_popover_key:"ctrlKey",remember_state:!0,export_format:"{title}"},Ms=class extends Rt.PluginSettingTab{plugin;constructor(t,o){super(t,o),this.plugin=o}display(){let{containerEl:t}=this;t.empty(),t.createEl("h2",{text:je("Settings for Quiet Outline.")}),new Rt.Setting(t).setName(je("Set Primary Color")).addToggle(o=>o.setTooltip(je("Patch default color")).setValue(this.plugin.settings.patch_color).onChange(async r=>{this.plugin.settings.patch_color=r,B.patchColor=r,this.plugin.saveSettings()})).addColorPicker(o=>o.setValue(this.plugin.settings.primary_color_light).onChange(async r=>{this.plugin.settings.primary_color_light=r,B.primaryColorLight=r,this.plugin.saveSettings()})).addColorPicker(o=>o.setValue(this.plugin.settings.primary_color_dark).onChange(async r=>{this.plugin.settings.primary_color_dark=r,B.primaryColorDark=r,this.plugin.saveSettings()})),new Rt.Setting(t).setName(je("Set Rainbow Line Color")).addToggle(o=>o.setTooltip(je("Patch default color")).setValue(this.plugin.settings.rainbow_line).onChange(async r=>{this.plugin.settings.rainbow_line=r,B.rainbowLine=r,this.plugin.saveSettings()})).addColorPicker(o=>o.setValue(this.plugin.settings.rainbow_color_1).onChange(async r=>{this.plugin.settings.rainbow_color_1=r,B.rainbowColor1=r,this.plugin.saveSettings()})).addColorPicker(o=>o.setValue(this.plugin.settings.rainbow_color_2).onChange(async r=>{this.plugin.settings.rainbow_color_2=r,B.rainbowColor2=r,this.plugin.saveSettings()})).addColorPicker(o=>o.setValue(this.plugin.settings.rainbow_color_3).onChange(async r=>{this.plugin.settings.rainbow_color_3=r,B.rainbowColor3=r,this.plugin.saveSettings()})).addColorPicker(o=>o.setValue(this.plugin.settings.rainbow_color_4).onChange(async r=>{this.plugin.settings.rainbow_color_4=r,B.rainbowColor4=r,this.plugin.saveSettings()})).addColorPicker(o=>o.setValue(this.plugin.settings.rainbow_color_5).onChange(async r=>{this.plugin.settings.rainbow_color_5=r,B.rainbowColor5=r,this.plugin.saveSettings()})),new Rt.Setting(t).setName(je("Render Markdown")).setDesc(je("Render heading string as markdown format.")).addToggle(o=>o.setValue(this.plugin.settings.markdown).onChange(async r=>{this.plugin.settings.markdown=r,B.markdown=r,await this.plugin.saveSettings()})),new Rt.Setting(t).setName(je("Ellipsis")).setDesc(je("Keep one line per heading")).addToggle(o=>o.setValue(this.plugin.settings.ellipsis).onChange(async r=>{this.plugin.settings.ellipsis=r,B.ellipsis=r,await this.plugin.saveSettings(),B.refreshTree(),this.display()})),this.plugin.settings.ellipsis&&new Rt.Setting(t).setName(je("Tooltip direction")).addDropdown(o=>o.addOption("left","Left").addOption("right","Right").addOption("top","Top").addOption("bottom","Bottom").setValue(this.plugin.settings.label_direction).onChange(async r=>{this.plugin.settings.label_direction=r,B.labelDirection=r,await this.plugin.saveSettings(),B.refreshTree()})),new Rt.Setting(t).setName(je("Search Support")).setDesc(je("Add a searching area on the top")).addToggle(o=>o.setValue(this.plugin.settings.search_support).onChange(async r=>{this.plugin.settings.search_support=r,B.searchSupport=r,await this.plugin.saveSettings()})),new Rt.Setting(t).setName(je("Level Switch")).setDesc(je("Expand headings to certain level.")).addToggle(o=>o.setValue(this.plugin.settings.level_switch).onChange(async r=>{this.plugin.settings.level_switch=r,B.levelSwitch=r,await this.plugin.saveSettings()})),new Rt.Setting(t).setName(je("Default Level")).setDesc(je("Default expand level when opening a new note.")).addDropdown(o=>o.addOption("0",je("No expand")).addOption("1","H1").addOption("2","H2").addOption("3","H3").addOption("4","H4").addOption("5","H5").setValue(this.plugin.settings.expand_level).onChange(async r=>{this.plugin.settings.expand_level=r,await this.plugin.saveSettings()})),new Rt.Setting(t).setName(je("Hide Unsearched")).setDesc(je("Hide irrelevant headings when searching")).addToggle(o=>o.setValue(this.plugin.settings.hide_unsearched).onChange(async r=>{this.plugin.settings.hide_unsearched=r,B.hideUnsearched=r,await this.plugin.saveSettings()})),new Rt.Setting(t).setName(je("Regex Search")).setDesc(je("Search headings using regular expression")).addToggle(o=>o.setValue(this.plugin.settings.regex_search).onChange(async r=>{this.plugin.settings.regex_search=r,B.regexSearch=r,await this.plugin.saveSettings()})),new Rt.Setting(t).setName(je("Auto Expand")).setDesc(je("Auto expand and collapse headings when scrolling and cursor position change")).addDropdown(o=>o.addOption("only-expand",je("Only Expand")).addOption("expand-and-collapse-rest-to-default",je("Expand and Collapse Rest to Default")).addOption("expand-and-collapse-rest-to-setting",je("Expand and Collapse Rest to Setting Level (Level Switch)")).addOption("disable",je("Disabled")).setValue(this.plugin.settings.auto_expand_ext).onChange(async r=>{this.plugin.settings.auto_expand_ext=r,await this.plugin.saveSettings()})),new Rt.Setting(t).setName(je("Locate By Cursor")).setDesc(je("Highlight and Auto expand postion will be determined by cursor position")).addToggle(o=>o.setValue(this.plugin.settings.locate_by_cursor).onChange(async r=>{this.plugin.settings.locate_by_cursor=r,await this.plugin.saveSettings()})),new Rt.Setting(t).setName(je("Show Popover on hover")).setDesc(je("Press functional key and move cursor to heading")).addDropdown(o=>o.addOption("ctrlKey","Ctrl").addOption("altKey","Alt").addOption("metaKey","Meta").addOption("disable",je("Disable")).setValue(this.plugin.settings.show_popover_key).onChange(async r=>{this.plugin.settings.show_popover_key=r,await this.plugin.saveSettings()})),new Rt.Setting(t).setName(je("Remember States")).setDesc(je("Remember expanded/collapsed state of headings of opened notes")).addToggle(o=>o.setValue(this.plugin.settings.remember_state).onChange(async r=>{this.plugin.settings.remember_state=r,await this.plugin.saveSettings()})),new Rt.Setting(t).setName(je("Drag headings to modify note")).setDesc(je("\u2757 This will modify note content, be careful.")).addToggle(o=>o.setValue(this.plugin.settings.drag_modify).onChange(async r=>{this.plugin.settings.drag_modify=r,B.dragModify=r,await this.plugin.saveSettings()})),new Rt.Setting(t).setName(je("Export Format")).addText(o=>o.setValue(this.plugin.settings.export_format).onChange(async r=>{this.plugin.settings.export_format=r,await this.plugin.saveSettings()}).inputEl.setAttribute("style","width: 100%;"))}};var $s=class extends ni.Plugin{settings;navigator=new As.dummy(this,null);jumping;heading_states={};klasses={};allow_scroll=!0;block_scroll;allow_cursor_change=!0;block_cursor_change;async onload(){await this.loadSettings(),this.initStore(),this.registerView(ri,t=>new Ds(t,this)),this.registerListener(),this.registerCommand(),this.addSettingTab(new Ms(this.app,this)),await this.firstTimeInstall()&&this.activateView(),this.block_scroll=lp(()=>{this.allow_scroll=!1},300,()=>{this.allow_scroll=!0}),this.block_cursor_change=lp(()=>{this.allow_cursor_change=!1},300,()=>{this.allow_cursor_change=!0})}async firstTimeInstall(){return!await this.app.vault.adapter.exists(this.manifest.dir+"/data.json")}initStore(){B.headers=[],B.dark=document.body.hasClass("theme-dark"),B.markdown=this.settings.markdown,B.ellipsis=this.settings.ellipsis,B.labelDirection=this.settings.label_direction,B.leafChange=!1,B.searchSupport=this.settings.search_support,B.levelSwitch=this.settings.level_switch,B.hideUnsearched=this.settings.hide_unsearched,B.regexSearch=this.settings.regex_search,B.dragModify=this.settings.drag_modify,B.patchColor=this.settings.patch_color,B.primaryColorLight=this.settings.primary_color_light,B.primaryColorDark=this.settings.primary_color_dark,B.rainbowLine=this.settings.rainbow_line,B.rainbowColor1=this.settings.rainbow_color_1,B.rainbowColor2=this.settings.rainbow_color_2,B.rainbowColor3=this.settings.rainbow_color_3,B.rainbowColor4=this.settings.rainbow_color_4,B.rainbowColor5=this.settings.rainbow_color_5}registerListener(){this.registerEvent(this.app.workspace.on("css-change",()=>{B.dark=document.body.hasClass("theme-dark"),B.cssChange=!B.cssChange})),this.registerEvent(this.app.workspace.on("layout-change",()=>{let t=this.app.workspace.getLeavesOfType("markdown"),o={};t.forEach(r=>{if(r.view.file===void 0)return;let n=r.view.file.path;this.heading_states[n]&&(o[n]=this.heading_states[n])}),this.heading_states=o})),this.registerEvent(this.app.metadataCache.on("changed",(t,o,r)=>{this.refresh("file-modify")})),this.registerEvent(this.app.workspace.on("active-leaf-change",async t=>{let o=this.app.workspace.getActiveFileView();if(!o){await this.updateNav("dummy",null),await this.refresh_outline(),B.refreshTree();return}!t||o&&o!==t.view||(this.block_cursor_change(),await this.updateNav(o.getViewType(),o),await this.refresh_outline(),B.refreshTree())}))}refresh_outline=async t=>{t==="file-modify"?await this.navigator.updateHeaders():await this.navigator.setHeaders()};refresh=(0,ni.debounce)(this.refresh_outline,300,!0);async onunload(){await this.navigator.unload()}async updateNav(t,o){await this.navigator.unload();let r=As[t]||As.dummy;this.navigator=new r(this,o),await this.navigator.load()}async loadSettings(){this.settings=Object.assign({},hy,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}async activateView(){this.app.workspace.rightSplit!==null&&(this.app.workspace.getLeavesOfType(ri).length===0&&await this.app.workspace.getRightLeaf(!1)?.setViewState({type:ri,active:!0}),this.app.workspace.revealLeaf(this.app.workspace.getLeavesOfType(ri)[0]))}registerCommand(){this.addCommand({id:"quiet-outline",name:"Quiet Outline",callback:()=>{this.activateView()}}),this.addCommand({id:"quiet-outline-reset",name:"Reset expanding level",callback:()=>{dispatchEvent(new CustomEvent("quiet-outline-reset"))}}),this.addCommand({id:"quiet-outline-focus-input",name:"Focus on input",callback:()=>{let t=document.querySelector("input.n-input__input-el");t&&t.focus()}}),this.addCommand({id:"quiet-outline-copy-as-text",name:"Copy Current Headings As Text",callback:async()=>{function t(l,s){return Array(l.length+s.length).fill("").map((c,d)=>d%2===0?l[d/2]:s[(d-1)/2])}let o=this.settings.export_format.split(/\{.*?\}/),r=this.settings.export_format.match(/(?<={)(.*?)(?=})/g)||[];function n(l){let s=i[l.level-1],c=r.map(d=>{switch(d){case"title":return l.heading;case"path":return"#"+l.heading.replace(/ /g,"%20");case"bullet":return"-";case"num":return s.toString();case"num-nest":return s.toString()}let u=d.match(/num-nest\[(.*?)\]/);if(u){let p=u[1];return i.slice(0,l.level).join(p)}return""});return t(o,c).join("")}let i=[0,0,0,0,0,0],a=[];B.headers.forEach(l=>{i.forEach((c,d)=>{d>l.level-1&&(i[d]=0)}),i[l.level-1]++;let s=" ".repeat(l.level-1)+n(l);a.push(s)}),await navigator.clipboard.writeText(a.join(` -`)),new ni.Notice("Headings copied")}}),this.addCommand({id:"inc-level",name:"Increase Level",callback:()=>{dispatchEvent(new CustomEvent("quiet-outline-levelchange",{detail:{level:"inc"}}))}}),this.addCommand({id:"dec-level",name:"Decrease Level",callback:()=>{dispatchEvent(new CustomEvent("quiet-outline-levelchange",{detail:{level:"dec"}}))}}),this.addCommand({id:"prev-heading",name:"To previous heading",editorCallback:t=>{let o=t.getCursor().line,r=B.headers.findLastIndex(n=>n.position.start.line<o);r!=-1&&this.navigator.jump(r)}}),this.addCommand({id:"next-heading",name:"To next heading",editorCallback:t=>{let o=t.getCursor().line,r=B.headers.findIndex(n=>n.position.start.line>o);r!=-1&&this.navigator.jump(r)}})}};var ZP=$s; +`),i.last().content.preContent=c,i[0]}function e0(e,t,o,r){let[n,i]=Qy(e,t),[a,l]=Qy(e,o),s=structuredClone(i);switch(r){case"before":a.content.children.splice(a.content.children.indexOf(l),0,s),Os(s,l.headingLevel-i.headingLevel);break;case"after":a.content.children.splice(a.content.children.indexOf(l)+1,0,s),Os(s,l.headingLevel-i.headingLevel);break;case"inside":l.content.children.push(s),Os(s,l.headingLevel-i.headingLevel+1);break}n.content.children.splice(n.content.children.indexOf(i),1)}function Qy(e,t){let o=t0(e,e,t);if(!o)throw new Error(`section ${t} not found`);return o}function t0(e,t,o){if(e.id===o)return[t,e];for(let r of e.content.children){let n=t0(r,e,o);if(n)return n}}function AN(e){return e.preContent+e.children.map(ip).join("")}function ip(e){let t="#".repeat(e.headingLevel)+" "+e.heading,o=AN(e.content);return e.id<0?o:`${t} +${o}`}function Os(e,t){e.headingLevel+=t,e.content.children.forEach(o=>{Os(o,t)})}var go,Ur=class extends Lo{canDrop=!0;constructor(t,o){super(t,o),go=t}getId(){return"markdown"}async getHeaders(){return this.plugin.app.metadataCache.getFileCache(this.view.file)?.headings||[]}async setHeaders(){let t=await this.getHeaders();B.headers=t}async updateHeaders(){let t=await this.getHeaders();B.modifyKeys=Ea(B.headers,t),B.headers=t}async jump(t){let o=B.headers[t].position.start.line,n={line:o,cursor:{from:{line:o,ch:0},to:{line:o,ch:0}}};this.plugin.jumping=!0,B.onPosChange(t),setTimeout(()=>{this.view.setEphemeralState(n)})}async install(){this.plugin.registerEditorExtension([Xy])}async onload(){this.registerDomEvent(document,"quiet-outline-cursorchange",MN),this.registerDomEvent(this.view.contentEl,"scroll",zN,!0)}async onunload(){}toBottom(){let t=this.view.data.split(` +`),o=()=>{this.view.setEphemeralState({line:t.length-5})};o(),setTimeout(o,100)}getDefaultLevel(){let t;return t=this.plugin.app.metadataCache.getFileCache(this.view.file)?.frontmatter?.["qo-default-level"],typeof t=="string"&&(t=parseInt(t)),t||parseInt(go.settings.expand_level)}getPath(){return this.view.file.path}async handleDrop(t,o,r){let n=await Jy(this.view.data);e0(n,t,o,r),await go.app.vault.modify(this.view.file,ip(n))}};function MN(e){if(!(!go.allow_cursor_change||go.jumping||e?.detail.docChanged)&&go.settings.locate_by_cursor){go.block_scroll();let t=r0(!1,!0),o=n0(t);if(o===void 0)return;B.onPosChange(o)}}function r0(e,t){let r=go.navigator.view;return go.settings.locate_by_cursor&&!e?t?r.editor.getCursor("from").line:Math.ceil(r.previewMode.getScroll()):t?$N(r.editor.cm):LN(r)}function $N(e){let{y:t,height:o}=e.dom.getBoundingClientRect(),r=t+o/2,n=e.viewportLineBlocks,i=0;return n.forEach(a=>{let l=e.domAtPos(a.from).node,c=(l.nodeName=="#text"?l.parentNode:l).getBoundingClientRect();c.y+c.height/2<=r&&(i=e.state.doc.lineAt(a.from).number)}),Math.max(i-2,0)}function LN(e){let t=e.previewMode.renderer,o=t.previewEl,r=o.getBoundingClientRect(),n=r.y+r.height/2,i=o.querySelectorAll(".markdown-preview-sizer>div[class|=el]"),a=0;return i.forEach(l=>{let{y:s}=l.getBoundingClientRect();s<=n&&(a=t.getSectionForElement(l).lineStart)}),a}function n0(e){let t=null,o=B.headers.length;for(;--o>=0;)if(B.headers[o].position.start.line<=e){t=B.headers[o];break}if(t)return o}var zN=(0,o0.debounce)(BN,200,!0);function BN(e){if(!go.allow_scroll)return;if(go.jumping){go.jumping=!1;return}let t=e.target;if(!t.classList.contains("markdown-preview-view")&&!t.classList.contains("cm-scroller")&&!t.classList.contains("outliner-plugin-list-lines-scroller"))return;let o=go.navigator.view.getMode()==="source",r=r0(!0,o),n=n0(r);n!==void 0&&B.onPosChange(n)}var l0=require("obsidian");function i0(e,t){let o=Object.keys(t).map(r=>HN(e,r,t[r]));return o.length===1?o[0]:function(){o.forEach(r=>r())}}function HN(e,t,o){let r=e[t],n=e.hasOwnProperty(t),i=n?r:function(){return Object.getPrototypeOf(e)[t].apply(this,arguments)},a=o(i);return r&&Object.setPrototypeOf(a,r),Object.setPrototypeOf(l,a),e[t]=l,s;function l(...c){return a===i&&e[t]===l&&s(),a.apply(this,c)}function s(){e[t]===l&&(n?e[t]=i:delete e[t]),a!==i&&(a=i,Object.setPrototypeOf(l,r||Function))}}var Ns=class extends Lo{constructor(t,o){super(t,o)}async onload(){}async install(){let t=this.plugin;t.klasses.canvas||(this.patchCanvas(this.view.canvas),t.klasses.canvas=this.view.constructor),t.registerEvent(t.app.workspace.on("quiet-outline:canvas-change",()=>{t.refresh()})),t.registerEvent(t.app.workspace.on("quiet-outline:canvas-selection-change",async o=>{if(o.size===0||o.size>1){let i=t.app.workspace.getActiveFileView();if(!i)return;await t.updateNav(i.getViewType(),i),await t.refresh_outline(),B.refreshTree();return}let r=[...o][0];if(!r.hasOwnProperty("nodeEl"))return;let n=r;if(n.unknownData.type==="file"&&n.file.extension==="md"){let i=n.child;await t.updateNav("embed-markdown-file",i),await t.refresh_outline(),B.refreshTree();return}if(n.unknownData.type==="text"){let i=n.child;await t.updateNav("embed-markdown-text",i),await t.refresh_outline(),B.refreshTree();return}}))}async jump(t){let r=this.view.canvas.nodes.get(B.headers[t].id);r!==void 0&&this.view.canvas.zoomToBbox(r.bbox)}async setHeaders(){B.headers=await this.getHeaders()}async getHeaders(){let t=this.view.canvas.data.nodes;return t?VN(t):[]}async updateHeaders(){await this.setHeaders()}getPath(){return this.view.file.path}getId(){return"canvas"}patchCanvas(t){let o=this.plugin;o.register(i0(t.constructor.prototype,{requestSave(r){return function(...n){return o.app.workspace.trigger("quiet-outline:canvas-change"),r.apply(this,n)}},updateSelection(r){return function(...n){r.apply(this,n),o.app.workspace.trigger("quiet-outline:canvas-selection-change",this.selection)}}}))}};function VN(e){let t=e.slice().sort((n,i)=>-jN(n,i)),o=[];for(let n=0;n<t.length;n++)c0(o,t[n]);let r=[];return s0(o,1,(n,i)=>{r.push({level:i,heading:WN(n),id:n.id,icon:FN(n),position:{start:{line:0,col:0,offset:0},end:{line:0,col:0,offset:0}}})}),r}function FN(e){if(e.type==="group")return"CategoryOutlined";if(e.type==="text")return"TextFieldsOutlined";if(e.type==="link")return"PublicOutlined";if(e.type==="file"){if(e.file.endsWith(".md"))return"ArticleOutlined";if(e.file.endsWith(".mp3"))return"AudiotrackOutlined";if(e.file.endsWith(".mp4"))return"OndemandVideoOutlined";if(e.file.endsWith(".png")||e.file.endsWith(".jpg"))return"ImageOutlined"}return"FilePresentOutlined"}var a0=e=>e.height*e.width;function jN(e,t){return a0(e)-a0(t)}var ap={};function WN(e){let t;switch(e.type){case"text":{t=e.text.split(` +`)[0],t=t.slice(t.search(/[^#\s].*/)),t.length>20&&(t=t.substring(0,20)+"...");break}case"file":{t=e.file.split("/").slice(-1)[0];break}case"link":{ap[e.url]?t=ap[e.url]:(t=e.url,(0,l0.request)(e.url).then(o=>{ap[e.url]=/<title>(.*)<\/title>/.exec(o)?.[1]||""}).catch(()=>{}));break}case"group":{t=e.label||"Unnamed Group";break}}return t}function s0(e,t,o){for(let r=0;r<e.length;r++)o(e[r].node,t),s0(e[r].children,t+1,o)}function c0(e,t){let o=!1;for(let r=0;r<e.length;r++)e[r].node.type==="group"&&KN(t,e[r].node)&&(o=!0,c0(e[r].children,t));o||e.push({node:t,children:[]})}function KN(e,t){return e.x>=t.x&&e.y>=t.y&&e.x+e.width<=t.x+t.width&&e.y+e.height<=t.y+t.height}var Ps=class extends Ur{getId(){return"kanban"}canDrop=!1;async install(){Ur._installed||(await super.install(),Ur._installed=!0)}async jump(t){document.querySelectorAll('.workspace-leaf[style=""] .kanban-plugin__lane-wrapper')[t]?.scrollIntoView({block:"center",inline:"center",behavior:"smooth"})}};var Rs=class extends Lo{constructor(t,o){super(t,o)}getId(){return"embed-markdown-file"}async jump(t){let o=B.headers[t].position.start.line;this.plugin.jumping=!0,B.onPosChange(t),setTimeout(()=>{d0(this.view,{line:o})})}async getHeaders(){return this.plugin.app.metadataCache.getFileCache(this.view.file)?.headings||[]}async setHeaders(){let t=await this.getHeaders();B.headers=t}async updateHeaders(){let t=await this.getHeaders();B.modifyKeys=Ea(B.headers,t),B.headers=t}},Is=class extends Lo{constructor(t,o){super(t,o)}getId(){return"embed-markdown-text"}async jump(t){let o=B.headers[t].position.start.line;d0(this.view,{line:o})}async getHeaders(){let{headings:t}=await np(this.plugin.app,this.view.text);return t||[]}async setHeaders(){B.headers=await this.getHeaders()}async updateHeaders(){let t=await this.getHeaders();B.modifyKeys=Ea(B.headers,t),B.headers=t}};function d0(e,t){e.getMode()==="source"?UN(e.editMode.editor,t.line):qN(e.previewMode.renderer,t.line)}function UN(e,t){let o={from:{line:t,ch:0},to:{line:t,ch:e.getLine(t).length}};e.addHighlights([o],"is-flashing",!0,!0),e.setCursor(o.from),e.scrollIntoView(o,!0)}function qN(e,t){e.applyScroll(t,{highlight:!0,center:!0})}var As={dummy:_a,markdown:Ur,kanban:Ps,canvas:Ns,"embed-markdown-file":Rs,"embed-markdown-text":Is};function lp(e,t,o){let r=-1;return()=>{e(),window.clearTimeout(r),r=window.setTimeout(o,t)}}var Et=require("obsidian");var u0={"Settings for Quiet Outline.":"Quiet Outline \u7684\u8BBE\u7F6E\u9875\u9762","Set Primary Color":"\u8BBE\u7F6E\u4E3B\u989C\u8272 \u660E/\u6697","Patch default color":"\u7528\u8BBE\u7F6E\u8986\u76D6\u9ED8\u8BA4\u4E3B\u989C\u8272","Set Rainbow Line Color":"\u8BBE\u7F6E\u5F69\u8679\u5927\u7EB2\u7EBF\u989C\u8272","Render Markdown":"\u6E32\u67D3markdown\u5143\u7D20","Render heading string as markdown format.":"\u4EE5markdown\u683C\u5F0F\u6E32\u67D3\u6807\u9898\u6587\u672C","Search Support":"\u5F00\u542F\u641C\u7D22","Add a searching area on the top":"\u5728\u9876\u90E8\u6DFB\u52A0\u4E00\u4E2A\u641C\u7D22\u6846","Level Switch":"\u5C42\u7EA7\u5207\u6362\u5668","Expand headings to certain level.":"\u5C55\u5F00\u6807\u9898\u5230\u7279\u5B9A\u5C42\u7EA7","Default Level":"\u9ED8\u8BA4\u5C42\u7EA7","Default expand level when opening a new note.":"\u6253\u5F00\u65B0\u7B14\u8BB0\u65F6\uFF0C\u6807\u9898\u5C55\u5F00\u5230\u7684\u9ED8\u8BA4\u5C42\u7EA7","No expand":"\u4E0D\u5C55\u5F00","Hide Unsearched":"\u8FC7\u6EE4\u672A\u641C\u7D22\u7684\u6807\u9898","Hide irrelevant headings when searching":"\u641C\u7D22\u65F6\uFF0C\u9690\u85CF\u672A\u547D\u4E2D\u7684\u6807\u9898","Regex Search":"\u6B63\u5219\u641C\u7D22","Search headings using regular expression":"\u652F\u6301\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F\u6765\u641C\u7D22","Auto Expand":"\u81EA\u52A8\u5C55\u5F00","Auto expand and collapse headings when scrolling and cursor position change":"\u5F53\u6EDA\u52A8\u9875\u9762\u65F6\uFF0C\u81EA\u52A8\u8DDF\u8E2A\u5F53\u524D\u6240\u5728\u6807\u9898\u5E76\u5C55\u5F00","Only Expand":"\u4EC5\u5C55\u5F00\u5F53\u524D\u6807\u9898","Expand and Collapse Rest":"\u5C55\u5F00\u540C\u65F6\u6298\u53E0\u5269\u4F59\u6807\u9898","Expand and Collapse Rest to Default":"\u5C55\u5F00\u540C\u65F6\u6298\u53E0\u5269\u4F59\u6807\u9898\u81F3\u9ED8\u8BA4\u5C42\u7EA7","Expand and Collapse Rest to Setting Level (Level Switch)":"\u5C55\u5F00\u540C\u65F6\u6298\u53E0\u5269\u4F59\u6807\u9898\u81F3\u8BBE\u7F6E\u5C42\u7EA7(\u5C42\u7EA7\u5207\u6362\u5668)",Disabled:"\u5173\u95ED\u81EA\u52A8\u5C55\u5F00","Locate By Cursor":"\u5B9A\u4F4D\u5230\u5149\u6807\u5904","Highlight and Auto expand postion will be determined by cursor position":"\u9AD8\u4EAE\u548C\u81EA\u52A8\u5C55\u5F00\u4F4D\u7F6E\u5C06\u7531\u5149\u6807\u4F4D\u7F6E\u51B3\u5B9A","Show Popover on hover":"\u9F20\u6807\u60AC\u505C\u5728\u6807\u9898\u65F6\u663E\u793A\u7B14\u8BB0\u5185\u5BB9","Press functional key and move cursor to heading":"\u6309\u4F4F\u529F\u80FD\u952E\uFF0C\u79FB\u52A8\u5149\u6807\u5230\u6807\u9898\u5904",Disable:"\u5173\u95ED",Ellipsis:"\u7701\u7565\u957F\u6807\u9898","Tooltip direction":"\u5B8C\u6574\u6807\u9898\u663E\u793A\u65B9\u5411","Keep one line per heading":"\u4FDD\u6301\u6807\u9898\u53EA\u6709\u4E00\u884C,\u7701\u7565\u591A\u4F59\u90E8\u5206","Remember States":"\u8BB0\u5FC6\u5C55\u5F00\u72B6\u6001","Remember expanded/collapsed state of headings of opened notes":"\u8BB0\u5FC6\u5DF2\u6253\u5F00\u7B14\u8BB0\u7684\u6807\u9898\u5C55\u5F00\u72B6\u6001","Keep Search Input":"\u4FDD\u7559\u641C\u7D22\u8F93\u5165","Keep search input when switching between notes":"\u5207\u6362\u7B14\u8BB0\u65F6\u4FDD\u7559\u641C\u7D22\u8F93\u5165","Drag headings to modify note":"\u542F\u7528\u62D6\u62FD\u6807\u9898\u6765\u8C03\u6574\u6587\u6863\u7ED3\u679C","\u2757 This will modify note content, be careful.":"\u2757 \u62D6\u62FD\u64CD\u4F5C\u4F1A\u6539\u53D8\u6587\u6863\u5185\u5BB9\uFF0C\u5C0F\u5FC3\u4F7F\u7528","Text Direction":"\u6587\u672C\u65B9\u5411","is decided by":"\u7531\u4EC0\u4E48\u51B3\u5B9A","Export Format":"\u6807\u9898\u8F93\u51FA\u683C\u5F0F"};var sp={"Settings for Quiet Outline.":"Settings for Quiet Outline.","Set Primary Color":"Set Primary Color Light/Dark","Patch default color":"Patch default color","Set Rainbow Line Color":"Set Rainbow Line Color","Render Markdown":"Render Markdown","Render heading string as markdown format.":"Render heading string as markdown format","Search Support":"Search Support","Add a searching area on the top":"Add a search area on the top","Level Switch":"Level Switch","Expand headings to certain level.":"Expand headings to certain level","Default Level":"Default Level","Default expand level when opening a new note.":"Default expand level","No expand":"No expand","Hide Unsearched":"Hide Unsearched","Hide irrelevant headings when searching":"Hide irrelevant headings when searching","Regex Search":"Regex Search","Search headings using regular expression":"Search headings using regular expression","Auto Expand":"Auto Expand","Auto expand and collapse headings when scrolling and cursor position change":"Auto expand and collapse headings when scrolling and cursor position change","Only Expand":"Only Expand","Expand and Collapse Rest":"Expand and Collapse Rest","Expand and Collapse Rest to Default":"Expand and Collapse Rest to Default","Expand and Collapse Rest to Setting Level (Level Switch)":"Expand and Collapse Rest to Setting Level (Level Switch)",Disabled:"Disabled","Locate By Cursor":"Locate By Cursor","Show Popover on hover":"Show Popover on hover","Press functional key and move cursor to heading":"Press functional key and move cursor to heading",Disable:"Disable","Highlight and Auto expand postion will be determined by cursor position":"Highlight and Auto expand postion will be determined by cursor position",Ellipsis:"Ellipsis","Tooltip direction":"Tooltip direction","Keep one line per heading":"Keep one line per heading","Remember States":"Remember States","Remember expanded/collapsed state of headings of opened notes":"Remember expanded/collapsed state of headings of opened notes","Keep Search Input":"Keep Search Input","Keep search input when switching between notes":"Keep search input when switching between notes","Drag headings to modify note":"Drag headings to modify note","\u2757 This will modify note content, be careful.":"\u2757 This will modify note content, be careful","Text Direction":"Text Direction","is decided by":"is decided by","Export Format":"Export Format"};var f0={"Settings for Quiet Outline.":"Quiet Outline \u7684\u8A2D\u5B9A\u9801\u9762","Render Markdown":"\u6E32\u67D3markdown\u5143\u7D20","Render heading string as markdown format.":"\u4EE5markdown\u683C\u5F0F\u6E32\u67D3\u6A19\u984C\u6587\u5B57","Search Support":"\u958B\u555F\u641C\u7D22","Add a searching area on the top":"\u5728\u9802\u90E8\u65B0\u589E\u4E00\u500B\u641C\u7D22\u6846","Level Switch":"\u5C64\u7D1A\u5207\u63DB","Expand headings to certain level.":"\u5C55\u958B\u6A19\u984C\u5230\u7279\u5B9A\u5C64\u7D1A","Default Level":"\u9810\u8A2D\u5C64\u7D1A","Default expand level when opening a new note.":"\u6253\u958B\u65B0\u7B46\u8A18\u6642\uFF0C\u6A19\u984C\u5C55\u958B\u5230\u7684\u9810\u8A2D\u5C64\u7D1A","No expand":"\u4E0D\u5C55\u958B","Hide Unsearched":"\u904E\u6FFE\u672A\u641C\u7D22\u7684\u6A19\u984C","Hide irrelevant headings when searching":"\u641C\u7D22\u6642\uFF0C\u96B1\u85CF\u672A\u547D\u4E2D\u7684\u6A19\u984C","Regex Search":"\u6B63\u5247\u641C\u7D22","Search headings using regular expression":"\u652F\u63F4\u4F7F\u7528\u6B63\u5247\u904B\u7B97\u5F0F\u4F86\u641C\u7D22","Auto Expand":"\u81EA\u52D5\u5C55\u958B","Auto expand and collapse headings when scrolling and cursor position change":"\u7576\u6372\u52D5\u9801\u9762\u6216\u5149\u6A19\u6539\u8B8A\u6642\uFF0C\u81EA\u52D5\u8DDF\u96A8\u76EE\u524D\u6240\u5728\u6A19\u984C\u4E26\u5C55\u958B",Ellipsis:"\u7701\u7565\u9577\u6A19\u984C","Keep one line per heading":"\u4FDD\u6301\u6A19\u984C\u53EA\u6709\u4E00\u884C\uFF0C\u7701\u7565\u591A\u9918\u90E8\u5206"};var GN={en:sp,zh:u0,"zh-TW":f0},YN=window.localStorage.getItem("language"),p0=GN[YN||"en"];function Fe(e){return p0&&p0[e]||sp[e]}var m0={patch_color:!0,primary_color_light:"#18a058",primary_color_dark:"#63e2b7",rainbow_line:!1,rainbow_color_1:"#FD8B1F",rainbow_color_2:"#FFDF00",rainbow_color_3:"#07EB23",rainbow_color_4:"#2D8FF0",rainbow_color_5:"#BC01E2",search_support:!0,level_switch:!0,markdown:!0,expand_level:"0",hide_unsearched:!0,auto_expand_ext:"only-expand",regex_search:!1,ellipsis:!1,label_direction:"left",drag_modify:!1,locate_by_cursor:!1,show_popover_key:"ctrlKey",remember_state:!0,keep_search_input:!1,export_format:"{title}",lang_direction_decide_by:"system"},Ms=class extends Et.PluginSettingTab{plugin;constructor(t,o){super(t,o),this.plugin=o}display(){let{containerEl:t}=this;t.empty(),t.createEl("h2",{text:Fe("Settings for Quiet Outline.")}),new Et.Setting(t).setName(Fe("Set Primary Color")).addToggle(o=>o.setTooltip(Fe("Patch default color")).setValue(this.plugin.settings.patch_color).onChange(async r=>{this.plugin.settings.patch_color=r,B.patchColor=r,this.plugin.saveSettings()})).addColorPicker(o=>o.setValue(this.plugin.settings.primary_color_light).onChange(async r=>{this.plugin.settings.primary_color_light=r,B.primaryColorLight=r,this.plugin.saveSettings()})).addColorPicker(o=>o.setValue(this.plugin.settings.primary_color_dark).onChange(async r=>{this.plugin.settings.primary_color_dark=r,B.primaryColorDark=r,this.plugin.saveSettings()})),new Et.Setting(t).setName(Fe("Set Rainbow Line Color")).addToggle(o=>o.setTooltip(Fe("Patch default color")).setValue(this.plugin.settings.rainbow_line).onChange(async r=>{this.plugin.settings.rainbow_line=r,B.rainbowLine=r,this.plugin.saveSettings()})).addColorPicker(o=>o.setValue(this.plugin.settings.rainbow_color_1).onChange(async r=>{this.plugin.settings.rainbow_color_1=r,B.rainbowColor1=r,this.plugin.saveSettings()})).addColorPicker(o=>o.setValue(this.plugin.settings.rainbow_color_2).onChange(async r=>{this.plugin.settings.rainbow_color_2=r,B.rainbowColor2=r,this.plugin.saveSettings()})).addColorPicker(o=>o.setValue(this.plugin.settings.rainbow_color_3).onChange(async r=>{this.plugin.settings.rainbow_color_3=r,B.rainbowColor3=r,this.plugin.saveSettings()})).addColorPicker(o=>o.setValue(this.plugin.settings.rainbow_color_4).onChange(async r=>{this.plugin.settings.rainbow_color_4=r,B.rainbowColor4=r,this.plugin.saveSettings()})).addColorPicker(o=>o.setValue(this.plugin.settings.rainbow_color_5).onChange(async r=>{this.plugin.settings.rainbow_color_5=r,B.rainbowColor5=r,this.plugin.saveSettings()})),new Et.Setting(t).setName(Fe("Render Markdown")).setDesc(Fe("Render heading string as markdown format.")).addToggle(o=>o.setValue(this.plugin.settings.markdown).onChange(async r=>{this.plugin.settings.markdown=r,B.markdown=r,await this.plugin.saveSettings()})),new Et.Setting(t).setName(Fe("Ellipsis")).setDesc(Fe("Keep one line per heading")).addToggle(o=>o.setValue(this.plugin.settings.ellipsis).onChange(async r=>{this.plugin.settings.ellipsis=r,B.ellipsis=r,await this.plugin.saveSettings(),B.refreshTree(),this.display()})),this.plugin.settings.ellipsis&&new Et.Setting(t).setName(Fe("Tooltip direction")).addDropdown(o=>o.addOption("left","Left").addOption("right","Right").addOption("top","Top").addOption("bottom","Bottom").setValue(this.plugin.settings.label_direction).onChange(async r=>{this.plugin.settings.label_direction=r,B.labelDirection=r,await this.plugin.saveSettings(),B.refreshTree()})),new Et.Setting(t).setName(Fe("Search Support")).setDesc(Fe("Add a searching area on the top")).addToggle(o=>o.setValue(this.plugin.settings.search_support).onChange(async r=>{this.plugin.settings.search_support=r,B.searchSupport=r,await this.plugin.saveSettings()})),new Et.Setting(t).setName(Fe("Level Switch")).setDesc(Fe("Expand headings to certain level.")).addToggle(o=>o.setValue(this.plugin.settings.level_switch).onChange(async r=>{this.plugin.settings.level_switch=r,B.levelSwitch=r,await this.plugin.saveSettings()})),new Et.Setting(t).setName(Fe("Default Level")).setDesc(Fe("Default expand level when opening a new note.")).addDropdown(o=>o.addOption("0",Fe("No expand")).addOption("1","H1").addOption("2","H2").addOption("3","H3").addOption("4","H4").addOption("5","H5").setValue(this.plugin.settings.expand_level).onChange(async r=>{this.plugin.settings.expand_level=r,await this.plugin.saveSettings()})),new Et.Setting(t).setName(Fe("Hide Unsearched")).setDesc(Fe("Hide irrelevant headings when searching")).addToggle(o=>o.setValue(this.plugin.settings.hide_unsearched).onChange(async r=>{this.plugin.settings.hide_unsearched=r,B.hideUnsearched=r,await this.plugin.saveSettings()})),new Et.Setting(t).setName(Fe("Regex Search")).setDesc(Fe("Search headings using regular expression")).addToggle(o=>o.setValue(this.plugin.settings.regex_search).onChange(async r=>{this.plugin.settings.regex_search=r,B.regexSearch=r,await this.plugin.saveSettings()})),new Et.Setting(t).setName(Fe("Auto Expand")).setDesc(Fe("Auto expand and collapse headings when scrolling and cursor position change")).addDropdown(o=>o.addOption("only-expand",Fe("Only Expand")).addOption("expand-and-collapse-rest-to-default",Fe("Expand and Collapse Rest to Default")).addOption("expand-and-collapse-rest-to-setting",Fe("Expand and Collapse Rest to Setting Level (Level Switch)")).addOption("disable",Fe("Disabled")).setValue(this.plugin.settings.auto_expand_ext).onChange(async r=>{this.plugin.settings.auto_expand_ext=r,await this.plugin.saveSettings()})),new Et.Setting(t).setName(Fe("Locate By Cursor")).setDesc(Fe("Highlight and Auto expand postion will be determined by cursor position")).addToggle(o=>o.setValue(this.plugin.settings.locate_by_cursor).onChange(async r=>{this.plugin.settings.locate_by_cursor=r,await this.plugin.saveSettings()})),new Et.Setting(t).setName(Fe("Show Popover on hover")).setDesc(Fe("Press functional key and move cursor to heading")).addDropdown(o=>o.addOption("ctrlKey","Ctrl").addOption("altKey","Alt").addOption("metaKey","Meta").addOption("disable",Fe("Disable")).setValue(this.plugin.settings.show_popover_key).onChange(async r=>{this.plugin.settings.show_popover_key=r,await this.plugin.saveSettings()})),new Et.Setting(t).setName(Fe("Remember States")).setDesc(Fe("Remember expanded/collapsed state of headings of opened notes")).addToggle(o=>o.setValue(this.plugin.settings.remember_state).onChange(async r=>{this.plugin.settings.remember_state=r,await this.plugin.saveSettings()})),new Et.Setting(t).setName(Fe("Keep Search Input")).setDesc(Fe("Keep search input when switching between notes")).addToggle(o=>o.setValue(this.plugin.settings.keep_search_input).onChange(async r=>{this.plugin.settings.keep_search_input=r,await this.plugin.saveSettings()})),new Et.Setting(t).setName(Fe("Drag headings to modify note")).setDesc(Fe("\u2757 This will modify note content, be careful.")).addToggle(o=>o.setValue(this.plugin.settings.drag_modify).onChange(async r=>{this.plugin.settings.drag_modify=r,B.dragModify=r,await this.plugin.saveSettings()})),new Et.Setting(t).setName(Fe("Text Direction")).setDesc(Fe("is decided by")).addDropdown(o=>o.addOption("system","Obsidian Language").addOption("text","Specific text of heading").setValue(this.plugin.settings.lang_direction_decide_by).onChange(async r=>{this.plugin.settings.lang_direction_decide_by=r,B.textDirectionDecideBy=r,await this.plugin.saveSettings(),B.refreshTree()})),new Et.Setting(t).setName(Fe("Export Format")).addText(o=>o.setValue(this.plugin.settings.export_format).onChange(async r=>{this.plugin.settings.export_format=r,await this.plugin.saveSettings()}).inputEl.setAttribute("style","width: 100%;"))}};var $s=class extends ni.Plugin{settings;navigator=new As.dummy(this,null);jumping;heading_states={};klasses={};allow_scroll=!0;block_scroll;allow_cursor_change=!0;block_cursor_change;async onload(){await this.loadSettings(),this.initStore(),this.registerView(ri,t=>new Ts(t,this)),this.registerListener(),this.registerCommand(),this.addSettingTab(new Ms(this.app,this)),await this.firstTimeInstall()&&(this.activateView(),await this.saveSettings()),this.block_scroll=lp(()=>{this.allow_scroll=!1},300,()=>{this.allow_scroll=!0}),this.block_cursor_change=lp(()=>{this.allow_cursor_change=!1},300,()=>{this.allow_cursor_change=!0})}async firstTimeInstall(){return!await this.app.vault.adapter.exists(this.manifest.dir+"/data.json")}initStore(){B.headers=[],B.dark=document.body.hasClass("theme-dark"),B.markdown=this.settings.markdown,B.ellipsis=this.settings.ellipsis,B.labelDirection=this.settings.label_direction,B.leafChange=!1,B.searchSupport=this.settings.search_support,B.levelSwitch=this.settings.level_switch,B.hideUnsearched=this.settings.hide_unsearched,B.regexSearch=this.settings.regex_search,B.dragModify=this.settings.drag_modify,B.textDirectionDecideBy=this.settings.lang_direction_decide_by,B.patchColor=this.settings.patch_color,B.primaryColorLight=this.settings.primary_color_light,B.primaryColorDark=this.settings.primary_color_dark,B.rainbowLine=this.settings.rainbow_line,B.rainbowColor1=this.settings.rainbow_color_1,B.rainbowColor2=this.settings.rainbow_color_2,B.rainbowColor3=this.settings.rainbow_color_3,B.rainbowColor4=this.settings.rainbow_color_4,B.rainbowColor5=this.settings.rainbow_color_5}registerListener(){this.registerEvent(this.app.workspace.on("css-change",()=>{B.dark=document.body.hasClass("theme-dark"),B.cssChange=!B.cssChange})),this.registerEvent(this.app.workspace.on("layout-change",()=>{let t=this.app.workspace.getLeavesOfType("markdown"),o={};t.forEach(r=>{if(r.view.file===void 0)return;let n=r.view.file.path;this.heading_states[n]&&(o[n]=this.heading_states[n])}),this.heading_states=o})),this.registerEvent(this.app.metadataCache.on("changed",(t,o,r)=>{this.refresh("file-modify")})),this.registerEvent(this.app.workspace.on("active-leaf-change",async t=>{let o=this.app.workspace.getActiveFileView();if(!o){await this.updateNav("dummy",null),await this.refresh_outline(),B.refreshTree();return}!t||o&&o!==t.view||(this.block_cursor_change(),await this.updateNav(o.getViewType(),o),await this.refresh_outline(),B.refreshTree())}))}refresh_outline=async t=>{t==="file-modify"?await this.navigator.updateHeaders():await this.navigator.setHeaders()};refresh=(0,ni.debounce)(this.refresh_outline,300,!0);async onunload(){await this.navigator.unload()}async updateNav(t,o){await this.navigator.unload();let r=As[t]||As.dummy;this.navigator=new r(this,o),await this.navigator.load()}async loadSettings(){this.settings=Object.assign({},m0,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}async activateView(){this.app.workspace.rightSplit!==null&&(this.app.workspace.getLeavesOfType(ri).length===0&&await this.app.workspace.getRightLeaf(!1)?.setViewState({type:ri,active:!0}),this.app.workspace.revealLeaf(this.app.workspace.getLeavesOfType(ri)[0]))}registerCommand(){this.addCommand({id:"quiet-outline",name:"Quiet Outline",callback:()=>{this.activateView()}}),this.addCommand({id:"quiet-outline-reset",name:"Reset expanding level",callback:()=>{dispatchEvent(new CustomEvent("quiet-outline-reset"))}}),this.addCommand({id:"quiet-outline-focus-input",name:"Focus on input",callback:()=>{let t=document.querySelector("input.n-input__input-el");t&&t.focus()}}),this.addCommand({id:"quiet-outline-copy-as-text",name:"Copy Current Headings As Text",callback:async()=>{function t(l,s){return Array(l.length+s.length).fill("").map((c,d)=>d%2===0?l[d/2]:s[(d-1)/2])}let o=this.settings.export_format.split(/\{.*?\}/),r=this.settings.export_format.match(/(?<={)(.*?)(?=})/g)||[];function n(l){let s=i[l.level-1],c=r.map(d=>{switch(d){case"title":return l.heading;case"path":return"#"+l.heading.replace(/ /g,"%20");case"bullet":return"-";case"num":return s.toString();case"num-nest":return s.toString()}let u=d.match(/num-nest\[(.*?)\]/);if(u){let p=u[1];return i.slice(0,l.level).join(p)}return""});return t(o,c).join("")}let i=[0,0,0,0,0,0],a=[];B.headers.forEach(l=>{i.forEach((c,d)=>{d>l.level-1&&(i[d]=0)}),i[l.level-1]++;let s=" ".repeat(l.level-1)+n(l);a.push(s)}),await navigator.clipboard.writeText(a.join(` +`)),new ni.Notice("Headings copied")}}),this.addCommand({id:"inc-level",name:"Increase Level",callback:()=>{dispatchEvent(new CustomEvent("quiet-outline-levelchange",{detail:{level:"inc"}}))}}),this.addCommand({id:"dec-level",name:"Decrease Level",callback:()=>{dispatchEvent(new CustomEvent("quiet-outline-levelchange",{detail:{level:"dec"}}))}}),this.addCommand({id:"prev-heading",name:"To previous heading",editorCallback:t=>{let o=t.getCursor().line,r=B.headers.findLastIndex(n=>n.position.start.line<o);r!=-1&&this.navigator.jump(r)}}),this.addCommand({id:"next-heading",name:"To next heading",editorCallback:t=>{let o=t.getCursor().line,r=B.headers.findIndex(n=>n.position.start.line>o);r!=-1&&this.navigator.jump(r)}})}};var XN=$s; /*! Bundled license information: lodash-es/lodash.js: diff --git a/.obsidian/plugins/obsidian-quiet-outline/manifest.json b/.obsidian/plugins/obsidian-quiet-outline/manifest.json index 2f1ec9f..86350e3 100644 --- a/.obsidian/plugins/obsidian-quiet-outline/manifest.json +++ b/.obsidian/plugins/obsidian-quiet-outline/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-quiet-outline", "name": "Quiet Outline", - "version": "0.3.43", + "version": "0.3.45", "minAppVersion": "0.15.6", "description": "Make outline quiet and more powerful, including no-auto-expand, rendering heading as markdown, and search support.", "author": "the_tree", diff --git a/.obsidian/plugins/obsidian-rollover-daily-todos/main.js b/.obsidian/plugins/obsidian-rollover-daily-todos/main.js index 6dd4895..7877e66 100644 --- a/.obsidian/plugins/obsidian-rollover-daily-todos/main.js +++ b/.obsidian/plugins/obsidian-rollover-daily-todos/main.js @@ -937,6 +937,20 @@ class RolloverSettingTab extends obsidian.PluginSettingTab { this.plugin.loadData().then((value) => console.log(value)); }) ); + + new obsidian.Setting(this.containerEl) + .setName("Done status markers") + .setDesc( + `Characters that represent done status in checkboxes. Default is "xX-". Add any characters that should be considered as marking a task complete.` + ) + .addText((text) => + text + .setValue(this.plugin.settings.doneStatusMarkers || "xX-") + .onChange((value) => { + this.plugin.settings.doneStatusMarkers = value; + this.plugin.saveSettings(); + }) + ); } } @@ -944,21 +958,81 @@ class TodoParser { // Support all unordered list bullet symbols as per spec (https://daringfireball.net/projects/markdown/syntax#list) bulletSymbols = ["-", "*", "+"]; + // Default completed status markers + doneStatusMarkers = ["x", "X", "-"]; + // List of strings that include the Markdown content #lines; // Boolean that encodes whether nested items should be rolled over #withChildren; - constructor(lines, withChildren) { + // Parse content with segmentation to allow for Unicode grapheme clusters + #parseIntoChars(content, contentType = "content") { + // Use Intl.Segmenter to properly split grapheme clusters if available, + // otherwise fall back to Array.from. The fallback should not trigger in + // Obsidian since it uses Electron which supports Intl.Segmenter. + if (typeof Intl !== "undefined" && Intl.Segmenter) { + const segmenter = new Intl.Segmenter("en", { granularity: "grapheme" }); + return Array.from(segmenter.segment(content), (s) => s.segment); + } else { + // Array.from() splits surrogate pairs correctly but not complex grapheme clusters + // (e.g., 👨‍👩‍👧‍👦 would be split incorrectly) and fail to match. + console.error( + `Intl.Segmenter not available, falling back to Array.from() for ${contentType}` + ); + return Array.from(content); + } + } + + constructor(lines, withChildren, doneStatusMarkers) { this.#lines = lines; this.#withChildren = withChildren; + if (doneStatusMarkers) { + this.doneStatusMarkers = this.#parseIntoChars( + doneStatusMarkers, + "done status markers" + ); + } } // Returns true if string s is a todo-item #isTodo(s) { - const r = new RegExp(`\\s*[${this.bulletSymbols.join("")}] \\[[^xX-]\\].*`, "g"); // /\s*[-*+] \[[^xX-]\].*/g; - return r.test(s); + // Extract the checkbox content + const match = s.match(/\s*[*+-] \[(.+?)\]/); + if (!match) return false; + + const checkboxContent = match[1]; + + // Parse content with segmentation to allow for Unicode grapheme clusters + const contentChars = this.#parseIntoChars( + checkboxContent, + "checkbox content" + ); + + // Valid checkbox content must be exactly one grapheme cluster + if (contentChars.length !== 1) { + return false; + } + + contentChars[0]; + + // Exclude grapheme modifiers that are not valid as standalone content + const graphemeModifiers = ['\u202E', '\u200B', '\u200C', '\u200D']; + const hasGraphemeModifier = contentChars.some((char) => + graphemeModifiers.includes(char) + ); + if (hasGraphemeModifier) { + return false; + } + + // Check if the checkbox content contains any characters that are in doneStatusMarkers + const hasDoneMarker = contentChars.some((char) => + this.doneStatusMarkers.includes(char) + ); + + // Return true (is a todo) if it does NOT contain any done markers + return !hasDoneMarker; } // Returns true if line after line-number `l` is a nested item @@ -1017,8 +1091,12 @@ class TodoParser { } // Utility-function that acts as a thin wrapper around `TodoParser` -const getTodos = ({ lines, withChildren = false }) => { - const todoParser = new TodoParser(lines, withChildren); +const getTodos = ({ + lines, + withChildren = false, + doneStatusMarkers = null, +}) => { + const todoParser = new TodoParser(lines, withChildren, doneStatusMarkers); return todoParser.getTodos(); }; @@ -1060,6 +1138,7 @@ class RolloverTodosPlugin extends obsidian.Plugin { removeEmptyTodos: false, rolloverChildren: false, rolloverOnFileCreate: true, + doneStatusMarkers: "xX-", }; this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData()); } @@ -1140,6 +1219,7 @@ class RolloverTodosPlugin extends obsidian.Plugin { return getTodos({ lines: dnLines, withChildren: this.settings.rolloverChildren, + doneStatusMarkers: this.settings.doneStatusMarkers, }); } @@ -1404,4 +1484,6 @@ class RolloverTodosPlugin extends obsidian.Plugin { } module.exports = RolloverTodosPlugin; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzLy5wbnBtL29ic2lkaWFuLWRhaWx5LW5vdGVzLWludGVyZmFjZUAwLjkuNC9ub2RlX21vZHVsZXMvb2JzaWRpYW4tZGFpbHktbm90ZXMtaW50ZXJmYWNlL2Rpc3QvbWFpbi5qcyIsInNyYy91aS9VbmRvTW9kYWwuanMiLCJzcmMvdWkvUm9sbG92ZXJTZXR0aW5nVGFiLmpzIiwic3JjL2dldC10b2Rvcy5qcyIsInNyYy9pbmRleC5qcyJdLCJzb3VyY2VzQ29udGVudCI6bnVsbCwibmFtZXMiOlsib2JzaWRpYW4iLCJNb2RhbCIsIlNldHRpbmciLCJQbHVnaW5TZXR0aW5nVGFiIiwiZ2V0RGFpbHlOb3RlU2V0dGluZ3MiLCJQbHVnaW4iLCJnZXRBbGxEYWlseU5vdGVzIiwiZ2V0RGFpbHlOb3RlIiwiTm90aWNlIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUNBO0FBQ0EsTUFBTSxDQUFDLGNBQWMsQ0FBQyxPQUFPLEVBQUUsWUFBWSxFQUFFLEVBQUUsS0FBSyxFQUFFLElBQUksRUFBRSxDQUFDLENBQUM7QUFDOUQ7QUFDbUM7QUFDbkM7QUFDQSxNQUFNLHlCQUF5QixHQUFHLFlBQVksQ0FBQztBQUMvQyxNQUFNLDBCQUEwQixHQUFHLFlBQVksQ0FBQztBQUNoRCxNQUFNLDJCQUEyQixHQUFHLFNBQVMsQ0FBQztBQUM5QyxNQUFNLDZCQUE2QixHQUFHLFdBQVcsQ0FBQztBQUNsRCxNQUFNLDBCQUEwQixHQUFHLE1BQU0sQ0FBQztBQUMxQztBQUNBLFNBQVMsOEJBQThCLENBQUMsV0FBVyxFQUFFO0FBQ3JEO0FBQ0EsSUFBSSxNQUFNLGFBQWEsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztBQUN6RSxJQUFJLE9BQU8sYUFBYSxJQUFJLGFBQWEsQ0FBQyxRQUFRLEdBQUcsV0FBVyxDQUFDLEVBQUUsT0FBTyxDQUFDO0FBQzNFLENBQUM7QUFDRDtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVMsb0JBQW9CLEdBQUc7QUFDaEMsSUFBSSxJQUFJO0FBQ1I7QUFDQSxRQUFRLE1BQU0sRUFBRSxlQUFlLEVBQUUsT0FBTyxFQUFFLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQztBQUN4RCxRQUFRLElBQUksOEJBQThCLENBQUMsT0FBTyxDQUFDLEVBQUU7QUFDckQsWUFBWSxNQUFNLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxRQUFRLEVBQUUsR0FBRyxPQUFPLENBQUMsU0FBUyxDQUFDLGdCQUFnQixDQUFDLEVBQUUsUUFBUSxFQUFFLEtBQUssSUFBSSxFQUFFLENBQUM7QUFDNUcsWUFBWSxPQUFPO0FBQ25CLGdCQUFnQixNQUFNLEVBQUUsTUFBTSxJQUFJLHlCQUF5QjtBQUMzRCxnQkFBZ0IsTUFBTSxFQUFFLE1BQU0sRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFO0FBQzVDLGdCQUFnQixRQUFRLEVBQUUsUUFBUSxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUU7QUFDaEQsYUFBYSxDQUFDO0FBQ2QsU0FBUztBQUNULFFBQVEsTUFBTSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsUUFBUSxFQUFFLEdBQUcsZUFBZSxDQUFDLGFBQWEsQ0FBQyxhQUFhLENBQUMsRUFBRSxRQUFRLEVBQUUsT0FBTyxJQUFJLEVBQUUsQ0FBQztBQUNuSCxRQUFRLE9BQU87QUFDZixZQUFZLE1BQU0sRUFBRSxNQUFNLElBQUkseUJBQXlCO0FBQ3ZELFlBQVksTUFBTSxFQUFFLE1BQU0sRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFO0FBQ3hDLFlBQVksUUFBUSxFQUFFLFFBQVEsRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFO0FBQzVDLFNBQVMsQ0FBQztBQUNWLEtBQUs7QUFDTCxJQUFJLE9BQU8sR0FBRyxFQUFFO0FBQ2hCLFFBQVEsT0FBTyxDQUFDLElBQUksQ0FBQyxzQ0FBc0MsRUFBRSxHQUFHLENBQUMsQ0FBQztBQUNsRSxLQUFLO0FBQ0wsQ0FBQztBQUNEO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsU0FBUyxxQkFBcUIsR0FBRztBQUNqQyxJQUFJLElBQUk7QUFDUjtBQUNBLFFBQVEsTUFBTSxhQUFhLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUM7QUFDakQsUUFBUSxNQUFNLGdCQUFnQixHQUFHLGFBQWEsQ0FBQyxTQUFTLENBQUMsVUFBVSxDQUFDLEVBQUUsT0FBTyxDQUFDO0FBQzlFLFFBQVEsTUFBTSxxQkFBcUIsR0FBRyxhQUFhLENBQUMsU0FBUyxDQUFDLGdCQUFnQixDQUFDLEVBQUUsUUFBUSxFQUFFLE1BQU0sQ0FBQztBQUNsRyxRQUFRLElBQUksOEJBQThCLENBQUMsUUFBUSxDQUFDLEVBQUU7QUFDdEQsWUFBWSxPQUFPO0FBQ25CLGdCQUFnQixNQUFNLEVBQUUscUJBQXFCLENBQUMsTUFBTSxJQUFJLDBCQUEwQjtBQUNsRixnQkFBZ0IsTUFBTSxFQUFFLHFCQUFxQixDQUFDLE1BQU0sRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFO0FBQ2xFLGdCQUFnQixRQUFRLEVBQUUscUJBQXFCLENBQUMsUUFBUSxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUU7QUFDdEUsYUFBYSxDQUFDO0FBQ2QsU0FBUztBQUNULFFBQVEsTUFBTSxRQUFRLEdBQUcsZ0JBQWdCLElBQUksRUFBRSxDQUFDO0FBQ2hELFFBQVEsT0FBTztBQUNmLFlBQVksTUFBTSxFQUFFLFFBQVEsQ0FBQyxnQkFBZ0IsSUFBSSwwQkFBMEI7QUFDM0UsWUFBWSxNQUFNLEVBQUUsUUFBUSxDQUFDLGdCQUFnQixFQUFFLElBQUksRUFBRSxJQUFJLEVBQUU7QUFDM0QsWUFBWSxRQUFRLEVBQUUsUUFBUSxDQUFDLGtCQUFrQixFQUFFLElBQUksRUFBRSxJQUFJLEVBQUU7QUFDL0QsU0FBUyxDQUFDO0FBQ1YsS0FBSztBQUNMLElBQUksT0FBTyxHQUFHLEVBQUU7QUFDaEIsUUFBUSxPQUFPLENBQUMsSUFBSSxDQUFDLHVDQUF1QyxFQUFFLEdBQUcsQ0FBQyxDQUFDO0FBQ25FLEtBQUs7QUFDTCxDQUFDO0FBQ0Q7QUFDQTtBQUNBO0FBQ0E7QUFDQSxTQUFTLHNCQUFzQixHQUFHO0FBQ2xDO0FBQ0EsSUFBSSxNQUFNLGFBQWEsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQztBQUM3QyxJQUFJLElBQUk7QUFDUixRQUFRLE1BQU0sUUFBUSxHQUFHLENBQUMsOEJBQThCLENBQUMsU0FBUyxDQUFDO0FBQ25FLFlBQVksYUFBYSxDQUFDLFNBQVMsQ0FBQyxnQkFBZ0IsQ0FBQyxFQUFFLFFBQVEsRUFBRSxPQUFPO0FBQ3hFLFlBQVksRUFBRSxDQUFDO0FBQ2YsUUFBUSxPQUFPO0FBQ2YsWUFBWSxNQUFNLEVBQUUsUUFBUSxDQUFDLE1BQU0sSUFBSSwyQkFBMkI7QUFDbEUsWUFBWSxNQUFNLEVBQUUsUUFBUSxDQUFDLE1BQU0sRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFO0FBQ2pELFlBQVksUUFBUSxFQUFFLFFBQVEsQ0FBQyxRQUFRLEVBQUUsSUFBSSxFQUFFLElBQUksRUFBRTtBQUNyRCxTQUFTLENBQUM7QUFDVixLQUFLO0FBQ0wsSUFBSSxPQUFPLEdBQUcsRUFBRTtBQUNoQixRQUFRLE9BQU8sQ0FBQyxJQUFJLENBQUMsd0NBQXdDLEVBQUUsR0FBRyxDQUFDLENBQUM7QUFDcEUsS0FBSztBQUNMLENBQUM7QUFDRDtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVMsd0JBQXdCLEdBQUc7QUFDcEM7QUFDQSxJQUFJLE1BQU0sYUFBYSxHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUMsT0FBTyxDQUFDO0FBQzdDLElBQUksSUFBSTtBQUNSLFFBQVEsTUFBTSxRQUFRLEdBQUcsQ0FBQyw4QkFBOEIsQ0FBQyxXQUFXLENBQUM7QUFDckUsWUFBWSxhQUFhLENBQUMsU0FBUyxDQUFDLGdCQUFnQixDQUFDLEVBQUUsUUFBUSxFQUFFLFNBQVM7QUFDMUUsWUFBWSxFQUFFLENBQUM7QUFDZixRQUFRLE9BQU87QUFDZixZQUFZLE1BQU0sRUFBRSxRQUFRLENBQUMsTUFBTSxJQUFJLDZCQUE2QjtBQUNwRSxZQUFZLE1BQU0sRUFBRSxRQUFRLENBQUMsTUFBTSxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUU7QUFDakQsWUFBWSxRQUFRLEVBQUUsUUFBUSxDQUFDLFFBQVEsRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFO0FBQ3JELFNBQVMsQ0FBQztBQUNWLEtBQUs7QUFDTCxJQUFJLE9BQU8sR0FBRyxFQUFFO0FBQ2hCLFFBQVEsT0FBTyxDQUFDLElBQUksQ0FBQywwQ0FBMEMsRUFBRSxHQUFHLENBQUMsQ0FBQztBQUN0RSxLQUFLO0FBQ0wsQ0FBQztBQUNEO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsU0FBUyxxQkFBcUIsR0FBRztBQUNqQztBQUNBLElBQUksTUFBTSxhQUFhLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUM7QUFDN0MsSUFBSSxJQUFJO0FBQ1IsUUFBUSxNQUFNLFFBQVEsR0FBRyxDQUFDLDhCQUE4QixDQUFDLFFBQVEsQ0FBQztBQUNsRSxZQUFZLGFBQWEsQ0FBQyxTQUFTLENBQUMsZ0JBQWdCLENBQUMsRUFBRSxRQUFRLEVBQUUsTUFBTTtBQUN2RSxZQUFZLEVBQUUsQ0FBQztBQUNmLFFBQVEsT0FBTztBQUNmLFlBQVksTUFBTSxFQUFFLFFBQVEsQ0FBQyxNQUFNLElBQUksMEJBQTBCO0FBQ2pFLFlBQVksTUFBTSxFQUFFLFFBQVEsQ0FBQyxNQUFNLEVBQUUsSUFBSSxFQUFFLElBQUksRUFBRTtBQUNqRCxZQUFZLFFBQVEsRUFBRSxRQUFRLENBQUMsUUFBUSxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUU7QUFDckQsU0FBUyxDQUFDO0FBQ1YsS0FBSztBQUNMLElBQUksT0FBTyxHQUFHLEVBQUU7QUFDaEIsUUFBUSxPQUFPLENBQUMsSUFBSSxDQUFDLHVDQUF1QyxFQUFFLEdBQUcsQ0FBQyxDQUFDO0FBQ25FLEtBQUs7QUFDTCxDQUFDO0FBQ0Q7QUFDQTtBQUNBLFNBQVMsSUFBSSxDQUFDLEdBQUcsWUFBWSxFQUFFO0FBQy9CO0FBQ0EsSUFBSSxJQUFJLEtBQUssR0FBRyxFQUFFLENBQUM7QUFDbkIsSUFBSSxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsWUFBWSxDQUFDLE1BQU0sRUFBRSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFO0FBQ3pELFFBQVEsS0FBSyxHQUFHLEtBQUssQ0FBQyxNQUFNLENBQUMsWUFBWSxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBQ3pELEtBQUs7QUFDTDtBQUNBLElBQUksTUFBTSxRQUFRLEdBQUcsRUFBRSxDQUFDO0FBQ3hCLElBQUksS0FBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLEtBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRTtBQUNsRCxRQUFRLE1BQU0sSUFBSSxHQUFHLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUM5QjtBQUNBO0FBQ0EsUUFBUSxJQUFJLENBQUMsSUFBSSxJQUFJLElBQUksS0FBSyxHQUFHO0FBQ2pDLFlBQVksU0FBUztBQUNyQjtBQUNBO0FBQ0EsWUFBWSxRQUFRLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQ2hDLEtBQUs7QUFDTDtBQUNBLElBQUksSUFBSSxLQUFLLENBQUMsQ0FBQyxDQUFDLEtBQUssRUFBRTtBQUN2QixRQUFRLFFBQVEsQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLENBQUM7QUFDN0I7QUFDQSxJQUFJLE9BQU8sUUFBUSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUM5QixDQUFDO0FBQ0QsU0FBUyxRQUFRLENBQUMsUUFBUSxFQUFFO0FBQzVCLElBQUksSUFBSSxJQUFJLEdBQUcsUUFBUSxDQUFDLFNBQVMsQ0FBQyxRQUFRLENBQUMsV0FBVyxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBQ2pFLElBQUksSUFBSSxJQUFJLENBQUMsV0FBVyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUNuQyxRQUFRLElBQUksR0FBRyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUMsRUFBRSxJQUFJLENBQUMsV0FBVyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUM7QUFDeEQsSUFBSSxPQUFPLElBQUksQ0FBQztBQUNoQixDQUFDO0FBQ0QsZUFBZSxrQkFBa0IsQ0FBQyxJQUFJLEVBQUU7QUFDeEMsSUFBSSxNQUFNLElBQUksR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssRUFBRSxHQUFHLENBQUMsQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUM7QUFDckQsSUFBSSxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUM7QUFDZixJQUFJLElBQUksSUFBSSxDQUFDLE1BQU0sRUFBRTtBQUNyQixRQUFRLE1BQU0sR0FBRyxHQUFHLElBQUksQ0FBQyxHQUFHLElBQUksQ0FBQyxDQUFDO0FBQ2xDLFFBQVEsSUFBSSxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLHFCQUFxQixDQUFDLEdBQUcsQ0FBQyxFQUFFO0FBQzFELFlBQVksTUFBTSxNQUFNLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxZQUFZLENBQUMsR0FBRyxDQUFDLENBQUM7QUFDckQsU0FBUztBQUNULEtBQUs7QUFDTCxDQUFDO0FBQ0QsZUFBZSxXQUFXLENBQUMsU0FBUyxFQUFFLFFBQVEsRUFBRTtBQUNoRCxJQUFJLElBQUksQ0FBQyxRQUFRLENBQUMsUUFBUSxDQUFDLEtBQUssQ0FBQyxFQUFFO0FBQ25DLFFBQVEsUUFBUSxJQUFJLEtBQUssQ0FBQztBQUMxQixLQUFLO0FBQ0wsSUFBSSxNQUFNLElBQUksR0FBR0EsNEJBQVEsQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLFNBQVMsRUFBRSxRQUFRLENBQUMsQ0FBQyxDQUFDO0FBQ25FLElBQUksTUFBTSxrQkFBa0IsQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUNuQyxJQUFJLE9BQU8sSUFBSSxDQUFDO0FBQ2hCLENBQUM7QUFDRCxlQUFlLGVBQWUsQ0FBQyxRQUFRLEVBQUU7QUFDekMsSUFBSSxNQUFNLEVBQUUsYUFBYSxFQUFFLEtBQUssRUFBRSxHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUM7QUFDaEQsSUFBSSxNQUFNLFlBQVksR0FBR0EsNEJBQVEsQ0FBQyxhQUFhLENBQUMsUUFBUSxDQUFDLENBQUM7QUFDMUQsSUFBSSxJQUFJLFlBQVksS0FBSyxHQUFHLEVBQUU7QUFDOUIsUUFBUSxPQUFPLE9BQU8sQ0FBQyxPQUFPLENBQUMsQ0FBQyxFQUFFLEVBQUUsSUFBSSxDQUFDLENBQUMsQ0FBQztBQUMzQyxLQUFLO0FBQ0wsSUFBSSxJQUFJO0FBQ1IsUUFBUSxNQUFNLFlBQVksR0FBRyxhQUFhLENBQUMsb0JBQW9CLENBQUMsWUFBWSxFQUFFLEVBQUUsQ0FBQyxDQUFDO0FBQ2xGLFFBQVEsTUFBTSxRQUFRLEdBQUcsTUFBTSxLQUFLLENBQUMsVUFBVSxDQUFDLFlBQVksQ0FBQyxDQUFDO0FBQzlEO0FBQ0EsUUFBUSxNQUFNLFNBQVMsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsWUFBWSxDQUFDLENBQUM7QUFDcEUsUUFBUSxPQUFPLENBQUMsUUFBUSxFQUFFLFNBQVMsQ0FBQyxDQUFDO0FBQ3JDLEtBQUs7QUFDTCxJQUFJLE9BQU8sR0FBRyxFQUFFO0FBQ2hCLFFBQVEsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDLHdDQUF3QyxFQUFFLFlBQVksQ0FBQyxDQUFDLENBQUMsRUFBRSxHQUFHLENBQUMsQ0FBQztBQUN2RixRQUFRLElBQUlBLDRCQUFRLENBQUMsTUFBTSxDQUFDLHdDQUF3QyxDQUFDLENBQUM7QUFDdEUsUUFBUSxPQUFPLENBQUMsRUFBRSxFQUFFLElBQUksQ0FBQyxDQUFDO0FBQzFCLEtBQUs7QUFDTCxDQUFDO0FBQ0Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVMsVUFBVSxDQUFDLElBQUksRUFBRSxXQUFXLEdBQUcsS0FBSyxFQUFFO0FBQy9DLElBQUksTUFBTSxFQUFFLEdBQUcsSUFBSSxDQUFDLEtBQUssRUFBRSxDQUFDLE9BQU8sQ0FBQyxXQUFXLENBQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQztBQUMxRCxJQUFJLE9BQU8sQ0FBQyxFQUFFLFdBQVcsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUNsQyxDQUFDO0FBQ0QsU0FBUyx1QkFBdUIsQ0FBQyxNQUFNLEVBQUU7QUFDekMsSUFBSSxPQUFPLE1BQU0sQ0FBQyxPQUFPLENBQUMsYUFBYSxFQUFFLEVBQUUsQ0FBQyxDQUFDO0FBQzdDLENBQUM7QUFDRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsU0FBUyxpQkFBaUIsQ0FBQyxNQUFNLEVBQUUsV0FBVyxFQUFFO0FBQ2hELElBQUksSUFBSSxXQUFXLEtBQUssTUFBTSxFQUFFO0FBQ2hDLFFBQVEsTUFBTSxXQUFXLEdBQUcsdUJBQXVCLENBQUMsTUFBTSxDQUFDLENBQUM7QUFDNUQsUUFBUSxRQUFRLFNBQVMsQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDO0FBQzNDLGFBQWEsUUFBUSxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsSUFBSSxRQUFRLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxDQUFDLEVBQUU7QUFDeEUsS0FBSztBQUNMLElBQUksT0FBTyxLQUFLLENBQUM7QUFDakIsQ0FBQztBQUNELFNBQVMsZUFBZSxDQUFDLElBQUksRUFBRSxXQUFXLEVBQUU7QUFDNUMsSUFBSSxPQUFPLG1CQUFtQixDQUFDLElBQUksQ0FBQyxRQUFRLEVBQUUsV0FBVyxDQUFDLENBQUM7QUFDM0QsQ0FBQztBQUNELFNBQVMsZUFBZSxDQUFDLElBQUksRUFBRSxXQUFXLEVBQUU7QUFDNUMsSUFBSSxPQUFPLG1CQUFtQixDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsRUFBRSxXQUFXLENBQUMsQ0FBQztBQUM1RCxDQUFDO0FBQ0QsU0FBUyxtQkFBbUIsQ0FBQyxRQUFRLEVBQUUsV0FBVyxFQUFFO0FBQ3BELElBQUksTUFBTSxXQUFXLEdBQUc7QUFDeEIsUUFBUSxHQUFHLEVBQUUsb0JBQW9CO0FBQ2pDLFFBQVEsSUFBSSxFQUFFLHFCQUFxQjtBQUNuQyxRQUFRLEtBQUssRUFBRSxzQkFBc0I7QUFDckMsUUFBUSxPQUFPLEVBQUUsd0JBQXdCO0FBQ3pDLFFBQVEsSUFBSSxFQUFFLHFCQUFxQjtBQUNuQyxLQUFLLENBQUM7QUFDTixJQUFJLE1BQU0sTUFBTSxHQUFHLFdBQVcsQ0FBQyxXQUFXLENBQUMsRUFBRSxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUMsR0FBRyxFQUFFLENBQUM7QUFDdEUsSUFBSSxNQUFNLFFBQVEsR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDLFFBQVEsRUFBRSxNQUFNLEVBQUUsSUFBSSxDQUFDLENBQUM7QUFDM0QsSUFBSSxJQUFJLENBQUMsUUFBUSxDQUFDLE9BQU8sRUFBRSxFQUFFO0FBQzdCLFFBQVEsT0FBTyxJQUFJLENBQUM7QUFDcEIsS0FBSztBQUNMLElBQUksSUFBSSxpQkFBaUIsQ0FBQyxNQUFNLEVBQUUsV0FBVyxDQUFDLEVBQUU7QUFDaEQsUUFBUSxJQUFJLFdBQVcsS0FBSyxNQUFNLEVBQUU7QUFDcEMsWUFBWSxNQUFNLFdBQVcsR0FBRyx1QkFBdUIsQ0FBQyxNQUFNLENBQUMsQ0FBQztBQUNoRSxZQUFZLElBQUksU0FBUyxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsRUFBRTtBQUM3QyxnQkFBZ0IsT0FBTyxNQUFNLENBQUMsTUFBTSxDQUFDLFFBQVE7QUFDN0M7QUFDQSxnQkFBZ0IsTUFBTSxDQUFDLE9BQU8sQ0FBQyxTQUFTLEVBQUUsRUFBRSxDQUFDLENBQUMsT0FBTyxDQUFDLFNBQVMsRUFBRSxFQUFFLENBQUMsRUFBRSxLQUFLLENBQUMsQ0FBQztBQUM3RSxhQUFhO0FBQ2IsU0FBUztBQUNULEtBQUs7QUFDTCxJQUFJLE9BQU8sUUFBUSxDQUFDO0FBQ3BCLENBQUM7QUFDRDtBQUNBLE1BQU0sNEJBQTRCLFNBQVMsS0FBSyxDQUFDO0FBQ2pELENBQUM7QUFDRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWUsZUFBZSxDQUFDLElBQUksRUFBRTtBQUNyQyxJQUFJLE1BQU0sR0FBRyxHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUM7QUFDM0IsSUFBSSxNQUFNLEVBQUUsS0FBSyxFQUFFLEdBQUcsR0FBRyxDQUFDO0FBQzFCLElBQUksTUFBTSxNQUFNLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQztBQUNqQyxJQUFJLE1BQU0sRUFBRSxRQUFRLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxHQUFHLG9CQUFvQixFQUFFLENBQUM7QUFDaEUsSUFBSSxNQUFNLENBQUMsZ0JBQWdCLEVBQUUsU0FBUyxDQUFDLEdBQUcsTUFBTSxlQUFlLENBQUMsUUFBUSxDQUFDLENBQUM7QUFDMUUsSUFBSSxNQUFNLFFBQVEsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQ3pDLElBQUksTUFBTSxjQUFjLEdBQUcsTUFBTSxXQUFXLENBQUMsTUFBTSxFQUFFLFFBQVEsQ0FBQyxDQUFDO0FBQy9ELElBQUksSUFBSTtBQUNSLFFBQVEsTUFBTSxXQUFXLEdBQUcsTUFBTSxLQUFLLENBQUMsTUFBTSxDQUFDLGNBQWMsRUFBRSxnQkFBZ0I7QUFDL0UsYUFBYSxPQUFPLENBQUMsa0JBQWtCLEVBQUUsUUFBUSxDQUFDO0FBQ2xELGFBQWEsT0FBTyxDQUFDLGtCQUFrQixFQUFFLE1BQU0sRUFBRSxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUNsRSxhQUFhLE9BQU8sQ0FBQyxtQkFBbUIsRUFBRSxRQUFRLENBQUM7QUFDbkQsYUFBYSxPQUFPLENBQUMsMERBQTBELEVBQUUsQ0FBQyxDQUFDLEVBQUUsV0FBVyxFQUFFLElBQUksRUFBRSxTQUFTLEVBQUUsSUFBSSxFQUFFLFlBQVksS0FBSztBQUMxSSxZQUFZLE1BQU0sR0FBRyxHQUFHLE1BQU0sRUFBRSxDQUFDO0FBQ2pDLFlBQVksTUFBTSxXQUFXLEdBQUcsSUFBSSxDQUFDLEtBQUssRUFBRSxDQUFDLEdBQUcsQ0FBQztBQUNqRCxnQkFBZ0IsSUFBSSxFQUFFLEdBQUcsQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDO0FBQ3JDLGdCQUFnQixNQUFNLEVBQUUsR0FBRyxDQUFDLEdBQUcsQ0FBQyxRQUFRLENBQUM7QUFDekMsZ0JBQWdCLE1BQU0sRUFBRSxHQUFHLENBQUMsR0FBRyxDQUFDLFFBQVEsQ0FBQztBQUN6QyxhQUFhLENBQUMsQ0FBQztBQUNmLFlBQVksSUFBSSxJQUFJLEVBQUU7QUFDdEIsZ0JBQWdCLFdBQVcsQ0FBQyxHQUFHLENBQUMsUUFBUSxDQUFDLFNBQVMsRUFBRSxFQUFFLENBQUMsRUFBRSxJQUFJLENBQUMsQ0FBQztBQUMvRCxhQUFhO0FBQ2IsWUFBWSxJQUFJLFlBQVksRUFBRTtBQUM5QixnQkFBZ0IsT0FBTyxXQUFXLENBQUMsTUFBTSxDQUFDLFlBQVksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUMsSUFBSSxFQUFFLENBQUMsQ0FBQztBQUM1RSxhQUFhO0FBQ2IsWUFBWSxPQUFPLFdBQVcsQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUM7QUFDOUMsU0FBUyxDQUFDO0FBQ1YsYUFBYSxPQUFPLENBQUMsdUJBQXVCLEVBQUUsSUFBSSxDQUFDLEtBQUssRUFBRSxDQUFDLFFBQVEsQ0FBQyxDQUFDLEVBQUUsS0FBSyxDQUFDLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQzdGLGFBQWEsT0FBTyxDQUFDLHNCQUFzQixFQUFFLElBQUksQ0FBQyxLQUFLLEVBQUUsQ0FBQyxHQUFHLENBQUMsQ0FBQyxFQUFFLEdBQUcsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDdkY7QUFDQSxRQUFRLEdBQUcsQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDLFdBQVcsRUFBRSxTQUFTLENBQUMsQ0FBQztBQUNyRCxRQUFRLE9BQU8sV0FBVyxDQUFDO0FBQzNCLEtBQUs7QUFDTCxJQUFJLE9BQU8sR0FBRyxFQUFFO0FBQ2hCLFFBQVEsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDLHdCQUF3QixFQUFFLGNBQWMsQ0FBQyxDQUFDLENBQUMsRUFBRSxHQUFHLENBQUMsQ0FBQztBQUN6RSxRQUFRLElBQUlBLDRCQUFRLENBQUMsTUFBTSxDQUFDLDRCQUE0QixDQUFDLENBQUM7QUFDMUQsS0FBSztBQUNMLENBQUM7QUFDRCxTQUFTLFlBQVksQ0FBQyxJQUFJLEVBQUUsVUFBVSxFQUFFO0FBQ3hDLElBQUksT0FBTyxVQUFVLENBQUMsVUFBVSxDQUFDLElBQUksRUFBRSxLQUFLLENBQUMsQ0FBQyxJQUFJLElBQUksQ0FBQztBQUN2RCxDQUFDO0FBQ0QsU0FBUyxnQkFBZ0IsR0FBRztBQUM1QjtBQUNBO0FBQ0E7QUFDQSxJQUFJLE1BQU0sRUFBRSxLQUFLLEVBQUUsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDO0FBQ2pDLElBQUksTUFBTSxFQUFFLE1BQU0sRUFBRSxHQUFHLG9CQUFvQixFQUFFLENBQUM7QUFDOUMsSUFBSSxNQUFNLGdCQUFnQixHQUFHLEtBQUssQ0FBQyxxQkFBcUIsQ0FBQ0EsNEJBQVEsQ0FBQyxhQUFhLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztBQUN6RixJQUFJLElBQUksQ0FBQyxnQkFBZ0IsRUFBRTtBQUMzQixRQUFRLE1BQU0sSUFBSSw0QkFBNEIsQ0FBQyxtQ0FBbUMsQ0FBQyxDQUFDO0FBQ3BGLEtBQUs7QUFDTCxJQUFJLE1BQU0sVUFBVSxHQUFHLEVBQUUsQ0FBQztBQUMxQixJQUFJQSw0QkFBUSxDQUFDLEtBQUssQ0FBQyxlQUFlLENBQUMsZ0JBQWdCLEVBQUUsQ0FBQyxJQUFJLEtBQUs7QUFDL0QsUUFBUSxJQUFJLElBQUksWUFBWUEsNEJBQVEsQ0FBQyxLQUFLLEVBQUU7QUFDNUMsWUFBWSxNQUFNLElBQUksR0FBRyxlQUFlLENBQUMsSUFBSSxFQUFFLEtBQUssQ0FBQyxDQUFDO0FBQ3RELFlBQVksSUFBSSxJQUFJLEVBQUU7QUFDdEIsZ0JBQWdCLE1BQU0sVUFBVSxHQUFHLFVBQVUsQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDLENBQUM7QUFDM0QsZ0JBQWdCLFVBQVUsQ0FBQyxVQUFVLENBQUMsR0FBRyxJQUFJLENBQUM7QUFDOUMsYUFBYTtBQUNiLFNBQVM7QUFDVCxLQUFLLENBQUMsQ0FBQztBQUNQLElBQUksT0FBTyxVQUFVLENBQUM7QUFDdEIsQ0FBQztBQUNEO0FBQ0EsTUFBTSw2QkFBNkIsU0FBUyxLQUFLLENBQUM7QUFDbEQsQ0FBQztBQUNELFNBQVMsYUFBYSxHQUFHO0FBQ3pCLElBQUksTUFBTSxFQUFFLE1BQU0sRUFBRSxHQUFHLE1BQU0sQ0FBQztBQUM5QjtBQUNBLElBQUksSUFBSSxTQUFTLEdBQUcsTUFBTSxDQUFDLFVBQVUsRUFBRSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUM7QUFDbEQsSUFBSSxNQUFNLFVBQVUsR0FBRztBQUN2QixRQUFRLFFBQVE7QUFDaEIsUUFBUSxRQUFRO0FBQ2hCLFFBQVEsU0FBUztBQUNqQixRQUFRLFdBQVc7QUFDbkIsUUFBUSxVQUFVO0FBQ2xCLFFBQVEsUUFBUTtBQUNoQixRQUFRLFVBQVU7QUFDbEIsS0FBSyxDQUFDO0FBQ04sSUFBSSxPQUFPLFNBQVMsRUFBRTtBQUN0QixRQUFRLFVBQVUsQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDLEtBQUssRUFBRSxDQUFDLENBQUM7QUFDNUMsUUFBUSxTQUFTLEVBQUUsQ0FBQztBQUNwQixLQUFLO0FBQ0wsSUFBSSxPQUFPLFVBQVUsQ0FBQztBQUN0QixDQUFDO0FBQ0QsU0FBUywwQkFBMEIsQ0FBQyxhQUFhLEVBQUU7QUFDbkQsSUFBSSxPQUFPLGFBQWEsRUFBRSxDQUFDLE9BQU8sQ0FBQyxhQUFhLENBQUMsV0FBVyxFQUFFLENBQUMsQ0FBQztBQUNoRSxDQUFDO0FBQ0QsZUFBZSxnQkFBZ0IsQ0FBQyxJQUFJLEVBQUU7QUFDdEMsSUFBSSxNQUFNLEVBQUUsS0FBSyxFQUFFLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQztBQUNqQyxJQUFJLE1BQU0sRUFBRSxRQUFRLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxHQUFHLHFCQUFxQixFQUFFLENBQUM7QUFDakUsSUFBSSxNQUFNLENBQUMsZ0JBQWdCLEVBQUUsU0FBUyxDQUFDLEdBQUcsTUFBTSxlQUFlLENBQUMsUUFBUSxDQUFDLENBQUM7QUFDMUUsSUFBSSxNQUFNLFFBQVEsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQ3pDLElBQUksTUFBTSxjQUFjLEdBQUcsTUFBTSxXQUFXLENBQUMsTUFBTSxFQUFFLFFBQVEsQ0FBQyxDQUFDO0FBQy9ELElBQUksSUFBSTtBQUNSLFFBQVEsTUFBTSxXQUFXLEdBQUcsTUFBTSxLQUFLLENBQUMsTUFBTSxDQUFDLGNBQWMsRUFBRSxnQkFBZ0I7QUFDL0UsYUFBYSxPQUFPLENBQUMsMERBQTBELEVBQUUsQ0FBQyxDQUFDLEVBQUUsV0FBVyxFQUFFLElBQUksRUFBRSxTQUFTLEVBQUUsSUFBSSxFQUFFLFlBQVksS0FBSztBQUMxSSxZQUFZLE1BQU0sR0FBRyxHQUFHLE1BQU0sQ0FBQyxNQUFNLEVBQUUsQ0FBQztBQUN4QyxZQUFZLE1BQU0sV0FBVyxHQUFHLElBQUksQ0FBQyxLQUFLLEVBQUUsQ0FBQyxHQUFHLENBQUM7QUFDakQsZ0JBQWdCLElBQUksRUFBRSxHQUFHLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQztBQUNyQyxnQkFBZ0IsTUFBTSxFQUFFLEdBQUcsQ0FBQyxHQUFHLENBQUMsUUFBUSxDQUFDO0FBQ3pDLGdCQUFnQixNQUFNLEVBQUUsR0FBRyxDQUFDLEdBQUcsQ0FBQyxRQUFRLENBQUM7QUFDekMsYUFBYSxDQUFDLENBQUM7QUFDZixZQUFZLElBQUksSUFBSSxFQUFFO0FBQ3RCLGdCQUFnQixXQUFXLENBQUMsR0FBRyxDQUFDLFFBQVEsQ0FBQyxTQUFTLEVBQUUsRUFBRSxDQUFDLEVBQUUsSUFBSSxDQUFDLENBQUM7QUFDL0QsYUFBYTtBQUNiLFlBQVksSUFBSSxZQUFZLEVBQUU7QUFDOUIsZ0JBQWdCLE9BQU8sV0FBVyxDQUFDLE1BQU0sQ0FBQyxZQUFZLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksRUFBRSxDQUFDLENBQUM7QUFDNUUsYUFBYTtBQUNiLFlBQVksT0FBTyxXQUFXLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQzlDLFNBQVMsQ0FBQztBQUNWLGFBQWEsT0FBTyxDQUFDLG1CQUFtQixFQUFFLFFBQVEsQ0FBQztBQUNuRCxhQUFhLE9BQU8sQ0FBQyxrQkFBa0IsRUFBRSxNQUFNLENBQUMsTUFBTSxFQUFFLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0FBQ3pFLGFBQWEsT0FBTyxDQUFDLDhFQUE4RSxFQUFFLENBQUMsQ0FBQyxFQUFFLFNBQVMsRUFBRSxZQUFZLEtBQUs7QUFDckksWUFBWSxNQUFNLEdBQUcsR0FBRywwQkFBMEIsQ0FBQyxTQUFTLENBQUMsQ0FBQztBQUM5RCxZQUFZLE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxNQUFNLENBQUMsWUFBWSxDQUFDLElBQUksRUFBRSxDQUFDLENBQUM7QUFDakUsU0FBUyxDQUFDLENBQUMsQ0FBQztBQUNaO0FBQ0EsUUFBUSxNQUFNLENBQUMsR0FBRyxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUFFLFNBQVMsQ0FBQyxDQUFDO0FBQzVELFFBQVEsT0FBTyxXQUFXLENBQUM7QUFDM0IsS0FBSztBQUNMLElBQUksT0FBTyxHQUFHLEVBQUU7QUFDaEIsUUFBUSxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUMsd0JBQXdCLEVBQUUsY0FBYyxDQUFDLENBQUMsQ0FBQyxFQUFFLEdBQUcsQ0FBQyxDQUFDO0FBQ3pFLFFBQVEsSUFBSUEsNEJBQVEsQ0FBQyxNQUFNLENBQUMsNEJBQTRCLENBQUMsQ0FBQztBQUMxRCxLQUFLO0FBQ0wsQ0FBQztBQUNELFNBQVMsYUFBYSxDQUFDLElBQUksRUFBRSxXQUFXLEVBQUU7QUFDMUMsSUFBSSxPQUFPLFdBQVcsQ0FBQyxVQUFVLENBQUMsSUFBSSxFQUFFLE1BQU0sQ0FBQyxDQUFDLElBQUksSUFBSSxDQUFDO0FBQ3pELENBQUM7QUFDRCxTQUFTLGlCQUFpQixHQUFHO0FBQzdCLElBQUksTUFBTSxXQUFXLEdBQUcsRUFBRSxDQUFDO0FBQzNCLElBQUksSUFBSSxDQUFDLDZCQUE2QixFQUFFLEVBQUU7QUFDMUMsUUFBUSxPQUFPLFdBQVcsQ0FBQztBQUMzQixLQUFLO0FBQ0wsSUFBSSxNQUFNLEVBQUUsS0FBSyxFQUFFLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQztBQUNqQyxJQUFJLE1BQU0sRUFBRSxNQUFNLEVBQUUsR0FBRyxxQkFBcUIsRUFBRSxDQUFDO0FBQy9DLElBQUksTUFBTSxpQkFBaUIsR0FBRyxLQUFLLENBQUMscUJBQXFCLENBQUNBLDRCQUFRLENBQUMsYUFBYSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7QUFDMUYsSUFBSSxJQUFJLENBQUMsaUJBQWlCLEVBQUU7QUFDNUIsUUFBUSxNQUFNLElBQUksNkJBQTZCLENBQUMsb0NBQW9DLENBQUMsQ0FBQztBQUN0RixLQUFLO0FBQ0wsSUFBSUEsNEJBQVEsQ0FBQyxLQUFLLENBQUMsZUFBZSxDQUFDLGlCQUFpQixFQUFFLENBQUMsSUFBSSxLQUFLO0FBQ2hFLFFBQVEsSUFBSSxJQUFJLFlBQVlBLDRCQUFRLENBQUMsS0FBSyxFQUFFO0FBQzVDLFlBQVksTUFBTSxJQUFJLEdBQUcsZUFBZSxDQUFDLElBQUksRUFBRSxNQUFNLENBQUMsQ0FBQztBQUN2RCxZQUFZLElBQUksSUFBSSxFQUFFO0FBQ3RCLGdCQUFnQixNQUFNLFVBQVUsR0FBRyxVQUFVLENBQUMsSUFBSSxFQUFFLE1BQU0sQ0FBQyxDQUFDO0FBQzVELGdCQUFnQixXQUFXLENBQUMsVUFBVSxDQUFDLEdBQUcsSUFBSSxDQUFDO0FBQy9DLGFBQWE7QUFDYixTQUFTO0FBQ1QsS0FBSyxDQUFDLENBQUM7QUFDUCxJQUFJLE9BQU8sV0FBVyxDQUFDO0FBQ3ZCLENBQUM7QUFDRDtBQUNBLE1BQU0sOEJBQThCLFNBQVMsS0FBSyxDQUFDO0FBQ25ELENBQUM7QUFDRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWUsaUJBQWlCLENBQUMsSUFBSSxFQUFFO0FBQ3ZDLElBQUksTUFBTSxFQUFFLEtBQUssRUFBRSxHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUM7QUFDakMsSUFBSSxNQUFNLEVBQUUsUUFBUSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsR0FBRyxzQkFBc0IsRUFBRSxDQUFDO0FBQ2xFLElBQUksTUFBTSxDQUFDLGdCQUFnQixFQUFFLFNBQVMsQ0FBQyxHQUFHLE1BQU0sZUFBZSxDQUFDLFFBQVEsQ0FBQyxDQUFDO0FBQzFFLElBQUksTUFBTSxRQUFRLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsQ0FBQztBQUN6QyxJQUFJLE1BQU0sY0FBYyxHQUFHLE1BQU0sV0FBVyxDQUFDLE1BQU0sRUFBRSxRQUFRLENBQUMsQ0FBQztBQUMvRCxJQUFJLElBQUk7QUFDUixRQUFRLE1BQU0sV0FBVyxHQUFHLE1BQU0sS0FBSyxDQUFDLE1BQU0sQ0FBQyxjQUFjLEVBQUUsZ0JBQWdCO0FBQy9FLGFBQWEsT0FBTyxDQUFDLDBEQUEwRCxFQUFFLENBQUMsQ0FBQyxFQUFFLFdBQVcsRUFBRSxJQUFJLEVBQUUsU0FBUyxFQUFFLElBQUksRUFBRSxZQUFZLEtBQUs7QUFDMUksWUFBWSxNQUFNLEdBQUcsR0FBRyxNQUFNLENBQUMsTUFBTSxFQUFFLENBQUM7QUFDeEMsWUFBWSxNQUFNLFdBQVcsR0FBRyxJQUFJLENBQUMsS0FBSyxFQUFFLENBQUMsR0FBRyxDQUFDO0FBQ2pELGdCQUFnQixJQUFJLEVBQUUsR0FBRyxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUM7QUFDckMsZ0JBQWdCLE1BQU0sRUFBRSxHQUFHLENBQUMsR0FBRyxDQUFDLFFBQVEsQ0FBQztBQUN6QyxnQkFBZ0IsTUFBTSxFQUFFLEdBQUcsQ0FBQyxHQUFHLENBQUMsUUFBUSxDQUFDO0FBQ3pDLGFBQWEsQ0FBQyxDQUFDO0FBQ2YsWUFBWSxJQUFJLElBQUksRUFBRTtBQUN0QixnQkFBZ0IsV0FBVyxDQUFDLEdBQUcsQ0FBQyxRQUFRLENBQUMsU0FBUyxFQUFFLEVBQUUsQ0FBQyxFQUFFLElBQUksQ0FBQyxDQUFDO0FBQy9ELGFBQWE7QUFDYixZQUFZLElBQUksWUFBWSxFQUFFO0FBQzlCLGdCQUFnQixPQUFPLFdBQVcsQ0FBQyxNQUFNLENBQUMsWUFBWSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFJLEVBQUUsQ0FBQyxDQUFDO0FBQzVFLGFBQWE7QUFDYixZQUFZLE9BQU8sV0FBVyxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsQ0FBQztBQUM5QyxTQUFTLENBQUM7QUFDVixhQUFhLE9BQU8sQ0FBQyxrQkFBa0IsRUFBRSxRQUFRLENBQUM7QUFDbEQsYUFBYSxPQUFPLENBQUMsa0JBQWtCLEVBQUUsTUFBTSxDQUFDLE1BQU0sRUFBRSxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUN6RSxhQUFhLE9BQU8sQ0FBQyxtQkFBbUIsRUFBRSxRQUFRLENBQUMsQ0FBQyxDQUFDO0FBQ3JEO0FBQ0EsUUFBUSxNQUFNLENBQUMsR0FBRyxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUFFLFNBQVMsQ0FBQyxDQUFDO0FBQzVELFFBQVEsT0FBTyxXQUFXLENBQUM7QUFDM0IsS0FBSztBQUNMLElBQUksT0FBTyxHQUFHLEVBQUU7QUFDaEIsUUFBUSxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUMsd0JBQXdCLEVBQUUsY0FBYyxDQUFDLENBQUMsQ0FBQyxFQUFFLEdBQUcsQ0FBQyxDQUFDO0FBQ3pFLFFBQVEsSUFBSUEsNEJBQVEsQ0FBQyxNQUFNLENBQUMsNEJBQTRCLENBQUMsQ0FBQztBQUMxRCxLQUFLO0FBQ0wsQ0FBQztBQUNELFNBQVMsY0FBYyxDQUFDLElBQUksRUFBRSxZQUFZLEVBQUU7QUFDNUMsSUFBSSxPQUFPLFlBQVksQ0FBQyxVQUFVLENBQUMsSUFBSSxFQUFFLE9BQU8sQ0FBQyxDQUFDLElBQUksSUFBSSxDQUFDO0FBQzNELENBQUM7QUFDRCxTQUFTLGtCQUFrQixHQUFHO0FBQzlCLElBQUksTUFBTSxZQUFZLEdBQUcsRUFBRSxDQUFDO0FBQzVCLElBQUksSUFBSSxDQUFDLDhCQUE4QixFQUFFLEVBQUU7QUFDM0MsUUFBUSxPQUFPLFlBQVksQ0FBQztBQUM1QixLQUFLO0FBQ0wsSUFBSSxNQUFNLEVBQUUsS0FBSyxFQUFFLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQztBQUNqQyxJQUFJLE1BQU0sRUFBRSxNQUFNLEVBQUUsR0FBRyxzQkFBc0IsRUFBRSxDQUFDO0FBQ2hELElBQUksTUFBTSxrQkFBa0IsR0FBRyxLQUFLLENBQUMscUJBQXFCLENBQUNBLDRCQUFRLENBQUMsYUFBYSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7QUFDM0YsSUFBSSxJQUFJLENBQUMsa0JBQWtCLEVBQUU7QUFDN0IsUUFBUSxNQUFNLElBQUksOEJBQThCLENBQUMscUNBQXFDLENBQUMsQ0FBQztBQUN4RixLQUFLO0FBQ0wsSUFBSUEsNEJBQVEsQ0FBQyxLQUFLLENBQUMsZUFBZSxDQUFDLGtCQUFrQixFQUFFLENBQUMsSUFBSSxLQUFLO0FBQ2pFLFFBQVEsSUFBSSxJQUFJLFlBQVlBLDRCQUFRLENBQUMsS0FBSyxFQUFFO0FBQzVDLFlBQVksTUFBTSxJQUFJLEdBQUcsZUFBZSxDQUFDLElBQUksRUFBRSxPQUFPLENBQUMsQ0FBQztBQUN4RCxZQUFZLElBQUksSUFBSSxFQUFFO0FBQ3RCLGdCQUFnQixNQUFNLFVBQVUsR0FBRyxVQUFVLENBQUMsSUFBSSxFQUFFLE9BQU8sQ0FBQyxDQUFDO0FBQzdELGdCQUFnQixZQUFZLENBQUMsVUFBVSxDQUFDLEdBQUcsSUFBSSxDQUFDO0FBQ2hELGFBQWE7QUFDYixTQUFTO0FBQ1QsS0FBSyxDQUFDLENBQUM7QUFDUCxJQUFJLE9BQU8sWUFBWSxDQUFDO0FBQ3hCLENBQUM7QUFDRDtBQUNBLE1BQU0sZ0NBQWdDLFNBQVMsS0FBSyxDQUFDO0FBQ3JELENBQUM7QUFDRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWUsbUJBQW1CLENBQUMsSUFBSSxFQUFFO0FBQ3pDLElBQUksTUFBTSxFQUFFLEtBQUssRUFBRSxHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUM7QUFDakMsSUFBSSxNQUFNLEVBQUUsUUFBUSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsR0FBRyx3QkFBd0IsRUFBRSxDQUFDO0FBQ3BFLElBQUksTUFBTSxDQUFDLGdCQUFnQixFQUFFLFNBQVMsQ0FBQyxHQUFHLE1BQU0sZUFBZSxDQUFDLFFBQVEsQ0FBQyxDQUFDO0FBQzFFLElBQUksTUFBTSxRQUFRLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsQ0FBQztBQUN6QyxJQUFJLE1BQU0sY0FBYyxHQUFHLE1BQU0sV0FBVyxDQUFDLE1BQU0sRUFBRSxRQUFRLENBQUMsQ0FBQztBQUMvRCxJQUFJLElBQUk7QUFDUixRQUFRLE1BQU0sV0FBVyxHQUFHLE1BQU0sS0FBSyxDQUFDLE1BQU0sQ0FBQyxjQUFjLEVBQUUsZ0JBQWdCO0FBQy9FLGFBQWEsT0FBTyxDQUFDLDBEQUEwRCxFQUFFLENBQUMsQ0FBQyxFQUFFLFdBQVcsRUFBRSxJQUFJLEVBQUUsU0FBUyxFQUFFLElBQUksRUFBRSxZQUFZLEtBQUs7QUFDMUksWUFBWSxNQUFNLEdBQUcsR0FBRyxNQUFNLENBQUMsTUFBTSxFQUFFLENBQUM7QUFDeEMsWUFBWSxNQUFNLFdBQVcsR0FBRyxJQUFJLENBQUMsS0FBSyxFQUFFLENBQUMsR0FBRyxDQUFDO0FBQ2pELGdCQUFnQixJQUFJLEVBQUUsR0FBRyxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUM7QUFDckMsZ0JBQWdCLE1BQU0sRUFBRSxHQUFHLENBQUMsR0FBRyxDQUFDLFFBQVEsQ0FBQztBQUN6QyxnQkFBZ0IsTUFBTSxFQUFFLEdBQUcsQ0FBQyxHQUFHLENBQUMsUUFBUSxDQUFDO0FBQ3pDLGFBQWEsQ0FBQyxDQUFDO0FBQ2YsWUFBWSxJQUFJLElBQUksRUFBRTtBQUN0QixnQkFBZ0IsV0FBVyxDQUFDLEdBQUcsQ0FBQyxRQUFRLENBQUMsU0FBUyxFQUFFLEVBQUUsQ0FBQyxFQUFFLElBQUksQ0FBQyxDQUFDO0FBQy9ELGFBQWE7QUFDYixZQUFZLElBQUksWUFBWSxFQUFFO0FBQzlCLGdCQUFnQixPQUFPLFdBQVcsQ0FBQyxNQUFNLENBQUMsWUFBWSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxJQUFJLEVBQUUsQ0FBQyxDQUFDO0FBQzVFLGFBQWE7QUFDYixZQUFZLE9BQU8sV0FBVyxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsQ0FBQztBQUM5QyxTQUFTLENBQUM7QUFDVixhQUFhLE9BQU8sQ0FBQyxrQkFBa0IsRUFBRSxRQUFRLENBQUM7QUFDbEQsYUFBYSxPQUFPLENBQUMsa0JBQWtCLEVBQUUsTUFBTSxDQUFDLE1BQU0sRUFBRSxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQztBQUN6RSxhQUFhLE9BQU8sQ0FBQyxtQkFBbUIsRUFBRSxRQUFRLENBQUMsQ0FBQyxDQUFDO0FBQ3JEO0FBQ0EsUUFBUSxNQUFNLENBQUMsR0FBRyxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUFFLFNBQVMsQ0FBQyxDQUFDO0FBQzVELFFBQVEsT0FBTyxXQUFXLENBQUM7QUFDM0IsS0FBSztBQUNMLElBQUksT0FBTyxHQUFHLEVBQUU7QUFDaEIsUUFBUSxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUMsd0JBQXdCLEVBQUUsY0FBYyxDQUFDLENBQUMsQ0FBQyxFQUFFLEdBQUcsQ0FBQyxDQUFDO0FBQ3pFLFFBQVEsSUFBSUEsNEJBQVEsQ0FBQyxNQUFNLENBQUMsNEJBQTRCLENBQUMsQ0FBQztBQUMxRCxLQUFLO0FBQ0wsQ0FBQztBQUNELFNBQVMsZ0JBQWdCLENBQUMsSUFBSSxFQUFFLFNBQVMsRUFBRTtBQUMzQyxJQUFJLE9BQU8sU0FBUyxDQUFDLFVBQVUsQ0FBQyxJQUFJLEVBQUUsU0FBUyxDQUFDLENBQUMsSUFBSSxJQUFJLENBQUM7QUFDMUQsQ0FBQztBQUNELFNBQVMsb0JBQW9CLEdBQUc7QUFDaEMsSUFBSSxNQUFNLFNBQVMsR0FBRyxFQUFFLENBQUM7QUFDekIsSUFBSSxJQUFJLENBQUMsZ0NBQWdDLEVBQUUsRUFBRTtBQUM3QyxRQUFRLE9BQU8sU0FBUyxDQUFDO0FBQ3pCLEtBQUs7QUFDTCxJQUFJLE1BQU0sRUFBRSxLQUFLLEVBQUUsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDO0FBQ2pDLElBQUksTUFBTSxFQUFFLE1BQU0sRUFBRSxHQUFHLHdCQUF3QixFQUFFLENBQUM7QUFDbEQsSUFBSSxNQUFNLGVBQWUsR0FBRyxLQUFLLENBQUMscUJBQXFCLENBQUNBLDRCQUFRLENBQUMsYUFBYSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7QUFDeEYsSUFBSSxJQUFJLENBQUMsZUFBZSxFQUFFO0FBQzFCLFFBQVEsTUFBTSxJQUFJLGdDQUFnQyxDQUFDLHVDQUF1QyxDQUFDLENBQUM7QUFDNUYsS0FBSztBQUNMLElBQUlBLDRCQUFRLENBQUMsS0FBSyxDQUFDLGVBQWUsQ0FBQyxlQUFlLEVBQUUsQ0FBQyxJQUFJLEtBQUs7QUFDOUQsUUFBUSxJQUFJLElBQUksWUFBWUEsNEJBQVEsQ0FBQyxLQUFLLEVBQUU7QUFDNUMsWUFBWSxNQUFNLElBQUksR0FBRyxlQUFlLENBQUMsSUFBSSxFQUFFLFNBQVMsQ0FBQyxDQUFDO0FBQzFELFlBQVksSUFBSSxJQUFJLEVBQUU7QUFDdEIsZ0JBQWdCLE1BQU0sVUFBVSxHQUFHLFVBQVUsQ0FBQyxJQUFJLEVBQUUsU0FBUyxDQUFDLENBQUM7QUFDL0QsZ0JBQWdCLFNBQVMsQ0FBQyxVQUFVLENBQUMsR0FBRyxJQUFJLENBQUM7QUFDN0MsYUFBYTtBQUNiLFNBQVM7QUFDVCxLQUFLLENBQUMsQ0FBQztBQUNQLElBQUksT0FBTyxTQUFTLENBQUM7QUFDckIsQ0FBQztBQUNEO0FBQ0EsTUFBTSw2QkFBNkIsU0FBUyxLQUFLLENBQUM7QUFDbEQsQ0FBQztBQUNEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsZUFBZSxnQkFBZ0IsQ0FBQyxJQUFJLEVBQUU7QUFDdEMsSUFBSSxNQUFNLEVBQUUsS0FBSyxFQUFFLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQztBQUNqQyxJQUFJLE1BQU0sRUFBRSxRQUFRLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxHQUFHLHFCQUFxQixFQUFFLENBQUM7QUFDakUsSUFBSSxNQUFNLENBQUMsZ0JBQWdCLEVBQUUsU0FBUyxDQUFDLEdBQUcsTUFBTSxlQUFlLENBQUMsUUFBUSxDQUFDLENBQUM7QUFDMUUsSUFBSSxNQUFNLFFBQVEsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQ3pDLElBQUksTUFBTSxjQUFjLEdBQUcsTUFBTSxXQUFXLENBQUMsTUFBTSxFQUFFLFFBQVEsQ0FBQyxDQUFDO0FBQy9ELElBQUksSUFBSTtBQUNSLFFBQVEsTUFBTSxXQUFXLEdBQUcsTUFBTSxLQUFLLENBQUMsTUFBTSxDQUFDLGNBQWMsRUFBRSxnQkFBZ0I7QUFDL0UsYUFBYSxPQUFPLENBQUMsMERBQTBELEVBQUUsQ0FBQyxDQUFDLEVBQUUsV0FBVyxFQUFFLElBQUksRUFBRSxTQUFTLEVBQUUsSUFBSSxFQUFFLFlBQVksS0FBSztBQUMxSSxZQUFZLE1BQU0sR0FBRyxHQUFHLE1BQU0sQ0FBQyxNQUFNLEVBQUUsQ0FBQztBQUN4QyxZQUFZLE1BQU0sV0FBVyxHQUFHLElBQUksQ0FBQyxLQUFLLEVBQUUsQ0FBQyxHQUFHLENBQUM7QUFDakQsZ0JBQWdCLElBQUksRUFBRSxHQUFHLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQztBQUNyQyxnQkFBZ0IsTUFBTSxFQUFFLEdBQUcsQ0FBQyxHQUFHLENBQUMsUUFBUSxDQUFDO0FBQ3pDLGdCQUFnQixNQUFNLEVBQUUsR0FBRyxDQUFDLEdBQUcsQ0FBQyxRQUFRLENBQUM7QUFDekMsYUFBYSxDQUFDLENBQUM7QUFDZixZQUFZLElBQUksSUFBSSxFQUFFO0FBQ3RCLGdCQUFnQixXQUFXLENBQUMsR0FBRyxDQUFDLFFBQVEsQ0FBQyxTQUFTLEVBQUUsRUFBRSxDQUFDLEVBQUUsSUFBSSxDQUFDLENBQUM7QUFDL0QsYUFBYTtBQUNiLFlBQVksSUFBSSxZQUFZLEVBQUU7QUFDOUIsZ0JBQWdCLE9BQU8sV0FBVyxDQUFDLE1BQU0sQ0FBQyxZQUFZLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksRUFBRSxDQUFDLENBQUM7QUFDNUUsYUFBYTtBQUNiLFlBQVksT0FBTyxXQUFXLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQzlDLFNBQVMsQ0FBQztBQUNWLGFBQWEsT0FBTyxDQUFDLGtCQUFrQixFQUFFLFFBQVEsQ0FBQztBQUNsRCxhQUFhLE9BQU8sQ0FBQyxrQkFBa0IsRUFBRSxNQUFNLENBQUMsTUFBTSxFQUFFLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0FBQ3pFLGFBQWEsT0FBTyxDQUFDLG1CQUFtQixFQUFFLFFBQVEsQ0FBQyxDQUFDLENBQUM7QUFDckQ7QUFDQSxRQUFRLE1BQU0sQ0FBQyxHQUFHLENBQUMsV0FBVyxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsU0FBUyxDQUFDLENBQUM7QUFDNUQsUUFBUSxPQUFPLFdBQVcsQ0FBQztBQUMzQixLQUFLO0FBQ0wsSUFBSSxPQUFPLEdBQUcsRUFBRTtBQUNoQixRQUFRLE9BQU8sQ0FBQyxLQUFLLENBQUMsQ0FBQyx3QkFBd0IsRUFBRSxjQUFjLENBQUMsQ0FBQyxDQUFDLEVBQUUsR0FBRyxDQUFDLENBQUM7QUFDekUsUUFBUSxJQUFJQSw0QkFBUSxDQUFDLE1BQU0sQ0FBQyw0QkFBNEIsQ0FBQyxDQUFDO0FBQzFELEtBQUs7QUFDTCxDQUFDO0FBQ0QsU0FBUyxhQUFhLENBQUMsSUFBSSxFQUFFLFdBQVcsRUFBRTtBQUMxQyxJQUFJLE9BQU8sV0FBVyxDQUFDLFVBQVUsQ0FBQyxJQUFJLEVBQUUsTUFBTSxDQUFDLENBQUMsSUFBSSxJQUFJLENBQUM7QUFDekQsQ0FBQztBQUNELFNBQVMsaUJBQWlCLEdBQUc7QUFDN0IsSUFBSSxNQUFNLFdBQVcsR0FBRyxFQUFFLENBQUM7QUFDM0IsSUFBSSxJQUFJLENBQUMsNkJBQTZCLEVBQUUsRUFBRTtBQUMxQyxRQUFRLE9BQU8sV0FBVyxDQUFDO0FBQzNCLEtBQUs7QUFDTCxJQUFJLE1BQU0sRUFBRSxLQUFLLEVBQUUsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDO0FBQ2pDLElBQUksTUFBTSxFQUFFLE1BQU0sRUFBRSxHQUFHLHFCQUFxQixFQUFFLENBQUM7QUFDL0MsSUFBSSxNQUFNLGlCQUFpQixHQUFHLEtBQUssQ0FBQyxxQkFBcUIsQ0FBQ0EsNEJBQVEsQ0FBQyxhQUFhLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztBQUMxRixJQUFJLElBQUksQ0FBQyxpQkFBaUIsRUFBRTtBQUM1QixRQUFRLE1BQU0sSUFBSSw2QkFBNkIsQ0FBQyxvQ0FBb0MsQ0FBQyxDQUFDO0FBQ3RGLEtBQUs7QUFDTCxJQUFJQSw0QkFBUSxDQUFDLEtBQUssQ0FBQyxlQUFlLENBQUMsaUJBQWlCLEVBQUUsQ0FBQyxJQUFJLEtBQUs7QUFDaEUsUUFBUSxJQUFJLElBQUksWUFBWUEsNEJBQVEsQ0FBQyxLQUFLLEVBQUU7QUFDNUMsWUFBWSxNQUFNLElBQUksR0FBRyxlQUFlLENBQUMsSUFBSSxFQUFFLE1BQU0sQ0FBQyxDQUFDO0FBQ3ZELFlBQVksSUFBSSxJQUFJLEVBQUU7QUFDdEIsZ0JBQWdCLE1BQU0sVUFBVSxHQUFHLFVBQVUsQ0FBQyxJQUFJLEVBQUUsTUFBTSxDQUFDLENBQUM7QUFDNUQsZ0JBQWdCLFdBQVcsQ0FBQyxVQUFVLENBQUMsR0FBRyxJQUFJLENBQUM7QUFDL0MsYUFBYTtBQUNiLFNBQVM7QUFDVCxLQUFLLENBQUMsQ0FBQztBQUNQLElBQUksT0FBTyxXQUFXLENBQUM7QUFDdkIsQ0FBQztBQUNEO0FBQ0EsU0FBUyw0QkFBNEIsR0FBRztBQUN4QyxJQUFJLE1BQU0sRUFBRSxHQUFHLEVBQUUsR0FBRyxNQUFNLENBQUM7QUFDM0I7QUFDQSxJQUFJLE1BQU0sZ0JBQWdCLEdBQUcsR0FBRyxDQUFDLGVBQWUsQ0FBQyxPQUFPLENBQUMsYUFBYSxDQUFDLENBQUM7QUFDeEUsSUFBSSxJQUFJLGdCQUFnQixJQUFJLGdCQUFnQixDQUFDLE9BQU8sRUFBRTtBQUN0RCxRQUFRLE9BQU8sSUFBSSxDQUFDO0FBQ3BCLEtBQUs7QUFDTDtBQUNBLElBQUksTUFBTSxhQUFhLEdBQUcsR0FBRyxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztBQUNsRSxJQUFJLE9BQU8sYUFBYSxJQUFJLGFBQWEsQ0FBQyxRQUFRLEVBQUUsS0FBSyxFQUFFLE9BQU8sQ0FBQztBQUNuRSxDQUFDO0FBQ0Q7QUFDQTtBQUNBO0FBQ0E7QUFDQSxTQUFTLDZCQUE2QixHQUFHO0FBQ3pDLElBQUksTUFBTSxFQUFFLEdBQUcsRUFBRSxHQUFHLE1BQU0sQ0FBQztBQUMzQjtBQUNBLElBQUksSUFBSSxHQUFHLENBQUMsT0FBTyxDQUFDLFNBQVMsQ0FBQyxVQUFVLENBQUMsRUFBRTtBQUMzQyxRQUFRLE9BQU8sSUFBSSxDQUFDO0FBQ3BCLEtBQUs7QUFDTDtBQUNBLElBQUksTUFBTSxhQUFhLEdBQUcsR0FBRyxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztBQUNsRSxJQUFJLE9BQU8sYUFBYSxJQUFJLGFBQWEsQ0FBQyxRQUFRLEVBQUUsTUFBTSxFQUFFLE9BQU8sQ0FBQztBQUNwRSxDQUFDO0FBQ0QsU0FBUyw4QkFBOEIsR0FBRztBQUMxQyxJQUFJLE1BQU0sRUFBRSxHQUFHLEVBQUUsR0FBRyxNQUFNLENBQUM7QUFDM0I7QUFDQSxJQUFJLE1BQU0sYUFBYSxHQUFHLEdBQUcsQ0FBQyxPQUFPLENBQUMsU0FBUyxDQUFDLGdCQUFnQixDQUFDLENBQUM7QUFDbEUsSUFBSSxPQUFPLGFBQWEsSUFBSSxhQUFhLENBQUMsUUFBUSxFQUFFLE9BQU8sRUFBRSxPQUFPLENBQUM7QUFDckUsQ0FBQztBQUNELFNBQVMsZ0NBQWdDLEdBQUc7QUFDNUMsSUFBSSxNQUFNLEVBQUUsR0FBRyxFQUFFLEdBQUcsTUFBTSxDQUFDO0FBQzNCO0FBQ0EsSUFBSSxNQUFNLGFBQWEsR0FBRyxHQUFHLENBQUMsT0FBTyxDQUFDLFNBQVMsQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDO0FBQ2xFLElBQUksT0FBTyxhQUFhLElBQUksYUFBYSxDQUFDLFFBQVEsRUFBRSxTQUFTLEVBQUUsT0FBTyxDQUFDO0FBQ3ZFLENBQUM7QUFDRCxTQUFTLDZCQUE2QixHQUFHO0FBQ3pDLElBQUksTUFBTSxFQUFFLEdBQUcsRUFBRSxHQUFHLE1BQU0sQ0FBQztBQUMzQjtBQUNBLElBQUksTUFBTSxhQUFhLEdBQUcsR0FBRyxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztBQUNsRSxJQUFJLE9BQU8sYUFBYSxJQUFJLGFBQWEsQ0FBQyxRQUFRLEVBQUUsTUFBTSxFQUFFLE9BQU8sQ0FBQztBQUNwRSxDQUFDO0FBQ0QsU0FBUyx1QkFBdUIsQ0FBQyxXQUFXLEVBQUU7QUFDOUMsSUFBSSxNQUFNLFdBQVcsR0FBRztBQUN4QixRQUFRLEdBQUcsRUFBRSxvQkFBb0I7QUFDakMsUUFBUSxJQUFJLEVBQUUscUJBQXFCO0FBQ25DLFFBQVEsS0FBSyxFQUFFLHNCQUFzQjtBQUNyQyxRQUFRLE9BQU8sRUFBRSx3QkFBd0I7QUFDekMsUUFBUSxJQUFJLEVBQUUscUJBQXFCO0FBQ25DLEtBQUssQ0FBQyxXQUFXLENBQUMsQ0FBQztBQUNuQixJQUFJLE9BQU8sV0FBVyxFQUFFLENBQUM7QUFDekIsQ0FBQztBQUNELFNBQVMsa0JBQWtCLENBQUMsV0FBVyxFQUFFLElBQUksRUFBRTtBQUMvQyxJQUFJLE1BQU0sUUFBUSxHQUFHO0FBQ3JCLFFBQVEsR0FBRyxFQUFFLGVBQWU7QUFDNUIsUUFBUSxLQUFLLEVBQUUsaUJBQWlCO0FBQ2hDLFFBQVEsSUFBSSxFQUFFLGdCQUFnQjtBQUM5QixLQUFLLENBQUM7QUFDTixJQUFJLE9BQU8sUUFBUSxDQUFDLFdBQVcsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQ3ZDLENBQUM7QUFDRDtBQUNBLE9BQWlDLENBQUEseUJBQUEsR0FBRyx5QkFBeUIsQ0FBQztBQUM5RCxPQUFtQyxDQUFBLDJCQUFBLEdBQUcsMkJBQTJCLENBQUM7QUFDbEUsT0FBcUMsQ0FBQSw2QkFBQSxHQUFHLDZCQUE2QixDQUFDO0FBQ3RFLE9BQWtDLENBQUEsMEJBQUEsR0FBRywwQkFBMEIsQ0FBQztBQUNoRSxPQUFrQyxDQUFBLDBCQUFBLEdBQUcsMEJBQTBCLENBQUM7QUFDaEUsT0FBb0MsQ0FBQSw0QkFBQSxHQUFHLDRCQUE0QixDQUFDO0FBQ3BFLE9BQXNDLENBQUEsOEJBQUEsR0FBRyw4QkFBOEIsQ0FBQztBQUN4RSxPQUF3QyxDQUFBLGdDQUFBLEdBQUcsZ0NBQWdDLENBQUM7QUFDNUUsT0FBcUMsQ0FBQSw2QkFBQSxHQUFHLDZCQUE2QixDQUFDO0FBQ3RFLE9BQXFDLENBQUEsNkJBQUEsR0FBRyw2QkFBNkIsQ0FBQztBQUN0RSxPQUF1QixDQUFBLGVBQUEsR0FBRyxlQUFlLENBQUM7QUFDMUMsT0FBeUIsQ0FBQSxpQkFBQSxHQUFHLGlCQUFpQixDQUFDO0FBQzlDLE9BQTBCLENBQUEsa0JBQUEsR0FBRyxrQkFBa0IsQ0FBQztBQUNoRCxPQUEyQixDQUFBLG1CQUFBLEdBQUcsbUJBQW1CLENBQUM7QUFDbEQsT0FBd0IsQ0FBQSxnQkFBQSxHQUFHLGdCQUFnQixDQUFDO0FBQzVDLE9BQXdCLENBQUEsZ0JBQUEsR0FBRyxnQkFBZ0IsQ0FBQztBQUM1QyxPQUF3QixDQUFBLGdCQUFBLEdBQUcsZ0JBQWdCLENBQUM7QUFDNUMsT0FBMEIsQ0FBQSxrQkFBQSxHQUFHLGtCQUFrQixDQUFDO0FBQ2hELE9BQTRCLENBQUEsb0JBQUEsR0FBRyxvQkFBb0IsQ0FBQztBQUNwRCxPQUF5QixDQUFBLGlCQUFBLEdBQUcsaUJBQWlCLENBQUM7QUFDOUMsT0FBeUIsQ0FBQSxpQkFBQSxHQUFHLGlCQUFpQixDQUFDO0FBQzlDLE9BQW9CLENBQUEsWUFBQSxHQUFHLFlBQVksQ0FBQztBQUNwQyxPQUE0QixDQUFBLG9CQUFBLEdBQUcsb0JBQW9CLENBQUM7QUFDcEQsT0FBdUIsQ0FBQSxlQUFBLEdBQUcsZUFBZSxDQUFDO0FBQzFDLE9BQXVCLENBQUEsZUFBQSxHQUFHLGVBQWUsQ0FBQztBQUMxQyxPQUFrQixDQUFBLFVBQUEsR0FBRyxVQUFVLENBQUM7QUFDaEMsT0FBc0IsQ0FBQSxjQUFBLEdBQUcsY0FBYyxDQUFDO0FBQ3hDLE9BQThCLENBQUEsc0JBQUEsR0FBRyxzQkFBc0IsQ0FBQztBQUN4RCxPQUErQixDQUFBLHVCQUFBLEdBQUcsdUJBQXVCLENBQUM7QUFDMUQsT0FBd0IsQ0FBQSxnQkFBQSxHQUFHLGdCQUFnQixDQUFDO0FBQzVDLE9BQWdDLENBQUEsd0JBQUEsR0FBRyx3QkFBd0IsQ0FBQztBQUM1RCxPQUF1QixDQUFBLGVBQUEsR0FBRyxlQUFlLENBQUM7QUFDMUMsT0FBcUIsQ0FBQSxhQUFBLEdBQUcsYUFBYSxDQUFDO0FBQ3RDLE9BQTZCLENBQUEscUJBQUEsR0FBRyxxQkFBcUIsQ0FBQztBQUN0RCxPQUFxQixDQUFBLGFBQUEsR0FBRyxhQUFhLENBQUM7QUFDdEMsT0FBQSxDQUFBLHFCQUE2QixHQUFHLHFCQUFxQixDQUFBOzs7QUN4dEJ0QyxNQUFNLFNBQVMsU0FBU0MsY0FBSyxDQUFDO0FBQzdDLEVBQUUsV0FBVyxDQUFDLE1BQU0sRUFBRTtBQUN0QixJQUFJLEtBQUssQ0FBQyxNQUFNLENBQUMsR0FBRyxFQUFDO0FBQ3JCLElBQUksSUFBSSxDQUFDLE1BQU0sR0FBRyxPQUFNO0FBQ3hCLEdBQUc7QUFDSDtBQUNBLEVBQUUsTUFBTSxRQUFRLENBQUMsR0FBRyxFQUFFO0FBQ3RCLElBQUksTUFBTSxFQUFFLElBQUksRUFBRSxVQUFVLEVBQUUsR0FBRyxJQUFHO0FBQ3BDLElBQUksSUFBSSxjQUFjLEdBQUcsTUFBTSxJQUFJLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLElBQUksRUFBQztBQUMvRDtBQUNBLElBQUksTUFBTSxtQkFBbUIsR0FBRyxVQUFVLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLE9BQU07QUFDN0QsSUFBSSxNQUFNLHVCQUF1QixHQUFHLGNBQWMsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUMsT0FBTTtBQUNyRSxJQUFJLE1BQU0sSUFBSSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsbUJBQW1CLEdBQUcsdUJBQXVCLEVBQUM7QUFDeEU7QUFDQSxJQUFJLElBQUksQ0FBQyxHQUFHLEdBQUU7QUFDZCxJQUFJLElBQUksbUJBQW1CLEdBQUcsdUJBQXVCLEVBQUU7QUFDdkQsTUFBTSxDQUFDLEdBQUcsQ0FBQyxFQUFFLEVBQUUsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDLEVBQUUsSUFBSSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEVBQUUsSUFBSSxDQUFDLEtBQUssRUFBRSxJQUFJLENBQUMsTUFBTSxHQUFHLENBQUMsR0FBRyxHQUFHLENBQUMsRUFBRSxDQUFDLENBQUMsRUFBQztBQUM5RixLQUFLLE1BQU0sSUFBSSxtQkFBbUIsR0FBRyx1QkFBdUIsRUFBRTtBQUM5RCxNQUFNLENBQUMsR0FBRyxDQUFDLEVBQUUsRUFBRSxJQUFJLENBQUMsUUFBUSxDQUFDLENBQUMsRUFBRSxJQUFJLENBQUMsU0FBUyxDQUFDLFNBQVMsRUFBRSxJQUFJLENBQUMsS0FBSyxFQUFFLElBQUksQ0FBQyxNQUFNLEdBQUcsQ0FBQyxHQUFHLEdBQUcsQ0FBQyxFQUFFLENBQUMsQ0FBQyxFQUFDO0FBQ2pHLEtBQUssTUFBTTtBQUNYLE1BQU0sSUFBSSxVQUFVLElBQUksY0FBYyxFQUFFO0FBQ3hDLFFBQVEsQ0FBQyxHQUFHLENBQUMsRUFBRSxFQUFFLElBQUksQ0FBQyxRQUFRLENBQUMsQ0FBQyxFQUFFLElBQUksQ0FBQyxTQUFTLENBQUMsdUJBQXVCLEVBQUM7QUFDekUsT0FBTyxNQUFNO0FBQ2IsUUFBUSxDQUFDLEdBQUcsQ0FBQyxFQUFFLEVBQUUsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDLEVBQUUsSUFBSSxDQUFDLFNBQVMsQ0FBQyxnR0FBZ0csRUFBQztBQUNsSixPQUFPO0FBQ1AsS0FBSztBQUNMO0FBQ0EsSUFBSSxPQUFPLENBQUM7QUFDWixHQUFHO0FBQ0g7QUFDQSxFQUFFLE1BQU0sV0FBVyxDQUFDLG1CQUFtQixFQUFFO0FBQ3pDLElBQUksTUFBTSxJQUFJLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLG1CQUFtQixDQUFDLEtBQUssQ0FBQyxJQUFJLEVBQUUsbUJBQW1CLENBQUMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxDQUFDO0FBQzdHLElBQUksSUFBSSxtQkFBbUIsQ0FBQyxXQUFXLENBQUMsSUFBSSxJQUFJLFNBQVMsRUFBRTtBQUMzRCxNQUFNLE1BQU0sSUFBSSxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxtQkFBbUIsQ0FBQyxXQUFXLENBQUMsSUFBSSxFQUFFLG1CQUFtQixDQUFDLFdBQVcsQ0FBQyxVQUFVLENBQUMsQ0FBQztBQUMzSCxLQUFLO0FBQ0wsSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLFdBQVcsR0FBRyxHQUFFO0FBQ2hDLEdBQUc7QUFDSDtBQUNBLEVBQUUsTUFBTSxNQUFNLEdBQUc7QUFDakIsSUFBSSxJQUFJLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxHQUFHLEtBQUk7QUFDcEMsSUFBSSxTQUFTLENBQUMsUUFBUSxDQUFDLElBQUksRUFBRSxFQUFFLElBQUksRUFBRSxvQkFBb0IsRUFBRSxDQUFDLENBQUM7QUFDN0QsSUFBSSxTQUFTLENBQUMsUUFBUSxDQUFDLEtBQUssRUFBRSxFQUFFLElBQUksRUFBRSw2UEFBNlAsRUFBRSxDQUFDLENBQUM7QUFDdlMsSUFBSSxTQUFTLENBQUMsUUFBUSxDQUFDLEtBQUssRUFBRSxFQUFFLElBQUksRUFBRSxtSkFBbUosRUFBRSxFQUFDO0FBQzVMLElBQUksU0FBUyxDQUFDLFFBQVEsQ0FBQyxJQUFJLEVBQUUsRUFBRSxJQUFJLEVBQUUseUJBQXlCLEVBQUUsRUFBQztBQUNqRTtBQUNBLElBQUksTUFBTSxtQkFBbUIsR0FBRyxNQUFNLENBQUMsV0FBVyxDQUFDLENBQUMsRUFBQztBQUNyRCxJQUFJLElBQUksWUFBWSxHQUFHLENBQUMsTUFBTSxJQUFJLENBQUMsUUFBUSxDQUFDLG1CQUFtQixDQUFDLEtBQUssQ0FBQyxFQUFDO0FBQ3ZFLElBQUksSUFBSSxtQkFBbUIsQ0FBQyxXQUFXLENBQUMsSUFBSSxJQUFJLFNBQVMsRUFBRTtBQUMzRCxNQUFNLFlBQVksQ0FBQyxJQUFJLENBQUMsTUFBTSxJQUFJLENBQUMsUUFBUSxDQUFDLG1CQUFtQixDQUFDLFdBQVcsQ0FBQyxFQUFDO0FBQzdFLEtBQUs7QUFDTCxJQUFJLFlBQVksQ0FBQyxPQUFPLENBQUMsR0FBRyxJQUFJO0FBQ2hDLE1BQU0sU0FBUyxDQUFDLFFBQVEsQ0FBQyxLQUFLLEVBQUUsRUFBRSxJQUFJLEVBQUUsR0FBRyxFQUFFLEVBQUM7QUFDOUMsS0FBSyxFQUFDO0FBQ047QUFDQSxJQUFJLElBQUlDLGdCQUFPLENBQUMsU0FBUyxDQUFDO0FBQzFCLE9BQU8sU0FBUyxDQUFDLE1BQU0sSUFBSSxNQUFNO0FBQ2pDLFNBQVMsYUFBYSxDQUFDLGNBQWMsQ0FBQztBQUN0QyxTQUFTLE9BQU8sQ0FBQyxPQUFPLENBQUMsS0FBSztBQUM5QixVQUFVLE1BQU0sSUFBSSxDQUFDLFdBQVcsQ0FBQyxtQkFBbUIsRUFBQztBQUNyRCxVQUFVLElBQUksQ0FBQyxLQUFLLEdBQUU7QUFDdEIsU0FBUyxDQUFDO0FBQ1YsUUFBTztBQUNQLEdBQUc7QUFDSDtBQUNBLEVBQUUsT0FBTyxHQUFHO0FBQ1osSUFBSSxJQUFJLEVBQUUsU0FBUyxFQUFFLEdBQUcsSUFBSSxDQUFDO0FBQzdCLElBQUksU0FBUyxDQUFDLEtBQUssRUFBRSxDQUFDO0FBQ3RCLEdBQUc7QUFDSDs7QUNuRWUsTUFBTSxrQkFBa0IsU0FBU0MseUJBQWdCLENBQUM7QUFDakUsRUFBRSxXQUFXLENBQUMsR0FBRyxFQUFFLE1BQU0sRUFBRTtBQUMzQixJQUFJLEtBQUssQ0FBQyxHQUFHLEVBQUUsTUFBTSxDQUFDLENBQUM7QUFDdkIsSUFBSSxJQUFJLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQztBQUN6QixHQUFHO0FBQ0g7QUFDQSxFQUFFLE1BQU0sbUJBQW1CLEdBQUc7QUFDOUIsSUFBSSxNQUFNLEVBQUUsUUFBUSxFQUFFLEdBQUdDLHlCQUFvQixFQUFFLENBQUM7QUFDaEQsSUFBSSxJQUFJLENBQUMsUUFBUSxFQUFFLE9BQU8sRUFBRSxDQUFDO0FBQzdCO0FBQ0EsSUFBSSxJQUFJLElBQUksR0FBRyxJQUFJLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxxQkFBcUIsQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUM5RDtBQUNBLElBQUksSUFBSSxJQUFJLEtBQUssSUFBSSxFQUFFO0FBQ3ZCLE1BQU0sSUFBSSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLHFCQUFxQixDQUFDLFFBQVEsR0FBRyxLQUFLLENBQUMsQ0FBQztBQUNwRSxLQUFLO0FBQ0w7QUFDQSxJQUFJLElBQUksSUFBSSxLQUFLLElBQUksRUFBRTtBQUN2QjtBQUNBLE1BQU0sT0FBTyxFQUFFLENBQUM7QUFDaEIsS0FBSztBQUNMO0FBQ0EsSUFBSSxNQUFNLGdCQUFnQixHQUFHLE1BQU0sSUFBSSxDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQzdELElBQUksTUFBTSxXQUFXLEdBQUcsS0FBSyxDQUFDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxRQUFRLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQyxHQUFHO0FBQzlFLE1BQU0sQ0FBQyxDQUFDLE9BQU8sQ0FBQyxLQUFLLE9BQU87QUFDNUIsS0FBSyxDQUFDO0FBQ04sSUFBSSxPQUFPLFdBQVcsQ0FBQztBQUN2QixHQUFHO0FBQ0g7QUFDQSxFQUFFLE1BQU0sT0FBTyxHQUFHO0FBQ2xCLElBQUksTUFBTSxnQkFBZ0IsR0FBRyxNQUFNLElBQUksQ0FBQyxtQkFBbUIsRUFBRSxDQUFDO0FBQzlEO0FBQ0EsSUFBSSxJQUFJLENBQUMsV0FBVyxDQUFDLEtBQUssRUFBRSxDQUFDO0FBQzdCLElBQUksSUFBSUYsZ0JBQU8sQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDO0FBQ2pDLE9BQU8sT0FBTyxDQUFDLGtCQUFrQixDQUFDO0FBQ2xDLE9BQU8sT0FBTyxDQUFDLDREQUE0RCxDQUFDO0FBQzVFLE9BQU8sV0FBVyxDQUFDLENBQUMsUUFBUTtBQUM1QixRQUFRLFFBQVE7QUFDaEIsV0FBVyxVQUFVLENBQUM7QUFDdEIsWUFBWSxHQUFHLGdCQUFnQixDQUFDLE1BQU0sQ0FBQyxDQUFDLEdBQUcsRUFBRSxPQUFPLEtBQUs7QUFDekQsY0FBYyxHQUFHLENBQUMsT0FBTyxDQUFDLEdBQUcsT0FBTyxDQUFDO0FBQ3JDLGNBQWMsT0FBTyxHQUFHLENBQUM7QUFDekIsYUFBYSxFQUFFLEVBQUUsQ0FBQztBQUNsQixZQUFZLElBQUksRUFBRSxNQUFNO0FBQ3hCLFdBQVcsQ0FBQztBQUNaLFdBQVcsUUFBUSxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUUsUUFBUSxDQUFDLGVBQWUsQ0FBQztBQUMxRCxXQUFXLFFBQVEsQ0FBQyxDQUFDLEtBQUssS0FBSztBQUMvQixZQUFZLElBQUksQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLGVBQWUsR0FBRyxLQUFLLENBQUM7QUFDekQsWUFBWSxJQUFJLENBQUMsTUFBTSxDQUFDLFlBQVksRUFBRSxDQUFDO0FBQ3ZDLFdBQVcsQ0FBQztBQUNaLE9BQU8sQ0FBQztBQUNSO0FBQ0EsSUFBSSxJQUFJQSxnQkFBTyxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUM7QUFDakMsT0FBTyxPQUFPLENBQUMsZ0NBQWdDLENBQUM7QUFDaEQsT0FBTyxPQUFPO0FBQ2QsUUFBUSxDQUFDLDBhQUEwYSxDQUFDO0FBQ3BiLE9BQU87QUFDUCxPQUFPLFNBQVMsQ0FBQyxDQUFDLE1BQU07QUFDeEIsUUFBUSxNQUFNO0FBQ2QsV0FBVyxRQUFRLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsZ0JBQWdCLElBQUksS0FBSyxDQUFDO0FBQ25FLFdBQVcsUUFBUSxDQUFDLENBQUMsS0FBSyxLQUFLO0FBQy9CLFlBQVksSUFBSSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsZ0JBQWdCLEdBQUcsS0FBSyxDQUFDO0FBQzFELFlBQVksSUFBSSxDQUFDLE1BQU0sQ0FBQyxZQUFZLEVBQUUsQ0FBQztBQUN2QyxXQUFXLENBQUM7QUFDWixPQUFPLENBQUM7QUFDUjtBQUNBLElBQUksSUFBSUEsZ0JBQU8sQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDO0FBQ2pDLE9BQU8sT0FBTyxDQUFDLGdDQUFnQyxDQUFDO0FBQ2hELE9BQU8sT0FBTztBQUNkLFFBQVEsQ0FBQyxzRUFBc0UsQ0FBQztBQUNoRixPQUFPO0FBQ1AsT0FBTyxTQUFTLENBQUMsQ0FBQyxNQUFNO0FBQ3hCLFFBQVEsTUFBTTtBQUNkLFdBQVcsUUFBUSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLGdCQUFnQixJQUFJLEtBQUssQ0FBQztBQUNuRSxXQUFXLFFBQVEsQ0FBQyxDQUFDLEtBQUssS0FBSztBQUMvQixZQUFZLElBQUksQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLGdCQUFnQixHQUFHLEtBQUssQ0FBQztBQUMxRCxZQUFZLElBQUksQ0FBQyxNQUFNLENBQUMsWUFBWSxFQUFFLENBQUM7QUFDdkMsV0FBVyxDQUFDO0FBQ1osT0FBTyxDQUFDO0FBQ1I7QUFDQSxJQUFJLElBQUlBLGdCQUFPLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQztBQUNqQyxPQUFPLE9BQU8sQ0FBQyw2QkFBNkIsQ0FBQztBQUM3QyxPQUFPLE9BQU87QUFDZCxRQUFRLENBQUMsc1FBQXNRLENBQUM7QUFDaFIsT0FBTztBQUNQLE9BQU8sU0FBUyxDQUFDLENBQUMsTUFBTTtBQUN4QixRQUFRLE1BQU07QUFDZCxXQUFXLFFBQVEsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxnQkFBZ0IsSUFBSSxLQUFLLENBQUM7QUFDbkUsV0FBVyxRQUFRLENBQUMsQ0FBQyxLQUFLLEtBQUs7QUFDL0IsWUFBWSxJQUFJLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxnQkFBZ0IsR0FBRyxLQUFLLENBQUM7QUFDMUQsWUFBWSxJQUFJLENBQUMsTUFBTSxDQUFDLFlBQVksRUFBRSxDQUFDO0FBQ3ZDLFdBQVcsQ0FBQztBQUNaLE9BQU8sQ0FBQztBQUNSO0FBQ0EsSUFBSSxJQUFJQSxnQkFBTyxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUM7QUFDakMsT0FBTyxPQUFPLENBQUMsdUNBQXVDLENBQUM7QUFDdkQsT0FBTyxPQUFPO0FBQ2QsUUFBUSxDQUFDLG9GQUFvRixDQUFDO0FBQzlGLE9BQU87QUFDUCxPQUFPLFNBQVMsQ0FBQyxDQUFDLE1BQU07QUFDeEIsUUFBUSxNQUFNO0FBQ2Q7QUFDQSxXQUFXLFFBQVE7QUFDbkIsWUFBWSxJQUFJLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxvQkFBb0IsS0FBSyxTQUFTO0FBQ25FLGNBQWMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsb0JBQW9CLEtBQUssSUFBSTtBQUNoRSxnQkFBZ0IsSUFBSTtBQUNwQixnQkFBZ0IsSUFBSSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsb0JBQW9CO0FBQ3pELFdBQVc7QUFDWCxXQUFXLFFBQVEsQ0FBQyxDQUFDLEtBQUssS0FBSztBQUMvQixZQUFZLE9BQU8sQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUM7QUFDL0IsWUFBWSxJQUFJLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxvQkFBb0IsR0FBRyxLQUFLLENBQUM7QUFDOUQsWUFBWSxJQUFJLENBQUMsTUFBTSxDQUFDLFlBQVksRUFBRSxDQUFDO0FBQ3ZDLFlBQVksSUFBSSxDQUFDLE1BQU0sQ0FBQyxRQUFRLEVBQUUsQ0FBQyxJQUFJLENBQUMsQ0FBQyxLQUFLLEtBQUssT0FBTyxDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDO0FBQ3ZFLFdBQVcsQ0FBQztBQUNaLE9BQU8sQ0FBQztBQUNSLEdBQUc7QUFDSDs7QUN0SEEsTUFBTSxVQUFVLENBQUM7QUFDakI7QUFDQSxFQUFFLGFBQWEsR0FBRyxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxDQUFDLENBQUM7QUFDbEM7QUFDQTtBQUNBLEVBQUUsTUFBTSxDQUFDO0FBQ1Q7QUFDQTtBQUNBLEVBQUUsYUFBYSxDQUFDO0FBQ2hCO0FBQ0EsRUFBRSxXQUFXLENBQUMsS0FBSyxFQUFFLFlBQVksRUFBRTtBQUNuQyxJQUFJLElBQUksQ0FBQyxNQUFNLEdBQUcsS0FBSyxDQUFDO0FBQ3hCLElBQUksSUFBSSxDQUFDLGFBQWEsR0FBRyxZQUFZLENBQUM7QUFDdEMsR0FBRztBQUNIO0FBQ0E7QUFDQSxFQUFFLE9BQU8sQ0FBQyxDQUFDLEVBQUU7QUFDYixJQUFJLE1BQU0sQ0FBQyxHQUFHLElBQUksTUFBTSxDQUFDLENBQUMsS0FBSyxFQUFFLElBQUksQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDLGdCQUFnQixDQUFDLEVBQUUsR0FBRyxDQUFDLENBQUM7QUFDckYsSUFBSSxPQUFPLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDckIsR0FBRztBQUNIO0FBQ0E7QUFDQSxFQUFFLFlBQVksQ0FBQyxDQUFDLEVBQUU7QUFDbEIsSUFBSSxJQUFJLENBQUMsR0FBRyxDQUFDLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLEVBQUU7QUFDckMsTUFBTSxPQUFPLEtBQUssQ0FBQztBQUNuQixLQUFLO0FBQ0wsSUFBSSxNQUFNLE9BQU8sR0FBRyxJQUFJLENBQUMsZUFBZSxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQzVDLElBQUksTUFBTSxPQUFPLEdBQUcsSUFBSSxDQUFDLGVBQWUsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUM7QUFDaEQsSUFBSSxJQUFJLE9BQU8sR0FBRyxPQUFPLEVBQUU7QUFDM0IsTUFBTSxPQUFPLElBQUksQ0FBQztBQUNsQixLQUFLO0FBQ0wsSUFBSSxPQUFPLEtBQUssQ0FBQztBQUNqQixHQUFHO0FBQ0g7QUFDQTtBQUNBLEVBQUUsWUFBWSxDQUFDLFdBQVcsRUFBRTtBQUM1QixJQUFJLE1BQU0sUUFBUSxHQUFHLEVBQUUsQ0FBQztBQUN4QixJQUFJLElBQUksU0FBUyxHQUFHLFdBQVcsR0FBRyxDQUFDLENBQUM7QUFDcEMsSUFBSSxPQUFPLElBQUksQ0FBQyxVQUFVLENBQUMsV0FBVyxFQUFFLFNBQVMsQ0FBQyxFQUFFO0FBQ3BELE1BQU0sUUFBUSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUM7QUFDNUMsTUFBTSxTQUFTLEVBQUUsQ0FBQztBQUNsQixLQUFLO0FBQ0wsSUFBSSxPQUFPLFFBQVEsQ0FBQztBQUNwQixHQUFHO0FBQ0g7QUFDQTtBQUNBLEVBQUUsVUFBVSxDQUFDLFdBQVcsRUFBRSxLQUFLLEVBQUU7QUFDakMsSUFBSSxJQUFJLFdBQVcsSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sSUFBSSxLQUFLLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLEVBQUU7QUFDMUUsTUFBTSxPQUFPLEtBQUssQ0FBQztBQUNuQixLQUFLO0FBQ0wsSUFBSSxPQUFPLElBQUksQ0FBQyxlQUFlLENBQUMsS0FBSyxDQUFDLEdBQUcsSUFBSSxDQUFDLGVBQWUsQ0FBQyxXQUFXLENBQUMsQ0FBQztBQUMzRSxHQUFHO0FBQ0g7QUFDQTtBQUNBLEVBQUUsZUFBZSxDQUFDLENBQUMsRUFBRTtBQUNyQixJQUFJLE9BQU8sSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDdkMsR0FBRztBQUNIO0FBQ0E7QUFDQSxFQUFFLFFBQVEsR0FBRztBQUNiLElBQUksSUFBSSxLQUFLLEdBQUcsRUFBRSxDQUFDO0FBQ25CLElBQUksS0FBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxFQUFFLENBQUMsRUFBRSxFQUFFO0FBQ2pELE1BQU0sTUFBTSxJQUFJLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUNsQyxNQUFNLElBQUksSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsRUFBRTtBQUM5QixRQUFRLEtBQUssQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDekIsUUFBUSxJQUFJLElBQUksQ0FBQyxhQUFhLElBQUksSUFBSSxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQUMsRUFBRTtBQUN4RCxVQUFVLE1BQU0sRUFBRSxHQUFHLElBQUksQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDMUMsVUFBVSxLQUFLLEdBQUcsQ0FBQyxHQUFHLEtBQUssRUFBRSxHQUFHLEVBQUUsQ0FBQyxDQUFDO0FBQ3BDLFVBQVUsQ0FBQyxJQUFJLEVBQUUsQ0FBQyxNQUFNLENBQUM7QUFDekIsU0FBUztBQUNULE9BQU87QUFDUCxLQUFLO0FBQ0wsSUFBSSxPQUFPLEtBQUssQ0FBQztBQUNqQixHQUFHO0FBQ0gsQ0FBQztBQUNEO0FBQ0E7QUFDTyxNQUFNLFFBQVEsR0FBRyxDQUFDLEVBQUUsS0FBSyxFQUFFLFlBQVksR0FBRyxLQUFLLEVBQUUsS0FBSztBQUM3RCxFQUFFLE1BQU0sVUFBVSxHQUFHLElBQUksVUFBVSxDQUFDLEtBQUssRUFBRSxZQUFZLENBQUMsQ0FBQztBQUN6RCxFQUFFLE9BQU8sVUFBVSxDQUFDLFFBQVEsRUFBRSxDQUFDO0FBQy9CLENBQUM7O0FDdEVELE1BQU0sdUJBQXVCLEdBQUcsSUFBSSxDQUFDO0FBQ3JDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDZSxNQUFNLG1CQUFtQixTQUFTRyxlQUFNLENBQUM7QUFDeEQsRUFBRSxNQUFNLFlBQVksR0FBRztBQUN2QixJQUFJLE1BQU0sZ0JBQWdCLEdBQUc7QUFDN0IsTUFBTSxlQUFlLEVBQUUsTUFBTTtBQUM3QixNQUFNLGdCQUFnQixFQUFFLEtBQUs7QUFDN0IsTUFBTSxnQkFBZ0IsRUFBRSxLQUFLO0FBQzdCLE1BQU0sZ0JBQWdCLEVBQUUsS0FBSztBQUM3QixNQUFNLG9CQUFvQixFQUFFLElBQUk7QUFDaEMsS0FBSyxDQUFDO0FBQ04sSUFBSSxJQUFJLENBQUMsUUFBUSxHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUMsRUFBRSxFQUFFLGdCQUFnQixFQUFFLE1BQU0sSUFBSSxDQUFDLFFBQVEsRUFBRSxDQUFDLENBQUM7QUFDL0UsR0FBRztBQUNIO0FBQ0EsRUFBRSxNQUFNLFlBQVksR0FBRztBQUN2QixJQUFJLE1BQU0sSUFBSSxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLENBQUM7QUFDdkMsR0FBRztBQUNIO0FBQ0EsRUFBRSxtQkFBbUIsR0FBRztBQUN4QixJQUFJLE1BQU0sZ0JBQWdCLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxlQUFlLENBQUMsT0FBTyxDQUFDLGFBQWEsQ0FBQyxDQUFDO0FBQzdFLElBQUksTUFBTSxpQkFBaUIsR0FBRyxnQkFBZ0IsSUFBSSxnQkFBZ0IsQ0FBQyxPQUFPLENBQUM7QUFDM0U7QUFDQSxJQUFJLE1BQU0sbUJBQW1CLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsU0FBUyxDQUFDLGdCQUFnQixDQUFDLENBQUM7QUFDN0UsSUFBSSxNQUFNLG9CQUFvQjtBQUM5QixNQUFNLG1CQUFtQixJQUFJLG1CQUFtQixDQUFDLFFBQVEsRUFBRSxLQUFLLEVBQUUsT0FBTyxDQUFDO0FBQzFFO0FBQ0EsSUFBSSxPQUFPLGlCQUFpQixJQUFJLG9CQUFvQixDQUFDO0FBQ3JELEdBQUc7QUFDSDtBQUNBLEVBQUUsZ0JBQWdCLEdBQUc7QUFDckIsSUFBSSxNQUFNLEVBQUUsTUFBTSxFQUFFLEdBQUcsTUFBTSxDQUFDO0FBQzlCLElBQUksSUFBSSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsR0FBR0QseUJBQW9CLEVBQUUsQ0FBQztBQUNwRDtBQUNBLElBQUksTUFBTSxHQUFHLElBQUksQ0FBQyxjQUFjLENBQUMsTUFBTSxDQUFDLENBQUM7QUFDekMsSUFBSSxNQUFNLEdBQUcsTUFBTSxDQUFDLE1BQU0sS0FBSyxDQUFDLEdBQUcsTUFBTSxHQUFHLE1BQU0sR0FBRyxHQUFHLENBQUM7QUFDekQ7QUFDQSxJQUFJLE1BQU0sbUJBQW1CLEdBQUcsSUFBSSxNQUFNLENBQUMsR0FBRyxHQUFHLE1BQU0sR0FBRyxVQUFVLENBQUMsQ0FBQztBQUN0RSxJQUFJLE1BQU0sV0FBVyxHQUFHLE1BQU0sRUFBRSxDQUFDO0FBQ2pDO0FBQ0E7QUFDQSxJQUFJLE1BQU0sY0FBYyxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsS0FBSztBQUN6QyxPQUFPLGdCQUFnQixFQUFFO0FBQ3pCLE9BQU8sTUFBTSxDQUFDLENBQUMsSUFBSSxLQUFLLElBQUksQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQ3JELE9BQU8sTUFBTSxDQUFDLENBQUMsSUFBSTtBQUNuQixRQUFRLE1BQU07QUFDZCxVQUFVLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLG1CQUFtQixFQUFFLElBQUksQ0FBQztBQUN0RCxVQUFVLE1BQU07QUFDaEIsVUFBVSxJQUFJO0FBQ2QsU0FBUyxDQUFDLE9BQU8sRUFBRTtBQUNuQixPQUFPO0FBQ1AsT0FBTyxNQUFNLENBQUMsQ0FBQyxJQUFJLEtBQUssSUFBSSxDQUFDLFFBQVEsQ0FBQztBQUN0QyxPQUFPLE1BQU0sQ0FBQyxDQUFDLElBQUk7QUFDbkIsUUFBUSxJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksRUFBRSxNQUFNLEVBQUUsTUFBTSxDQUFDLENBQUMsY0FBYztBQUMvRCxVQUFVLFdBQVc7QUFDckIsVUFBVSxLQUFLO0FBQ2YsU0FBUztBQUNULE9BQU8sQ0FBQztBQUNSO0FBQ0E7QUFDQSxJQUFJLE1BQU0sTUFBTSxHQUFHLGNBQWMsQ0FBQyxJQUFJO0FBQ3RDLE1BQU0sQ0FBQyxDQUFDLEVBQUUsQ0FBQztBQUNYLFFBQVEsSUFBSSxDQUFDLGFBQWEsQ0FBQyxDQUFDLEVBQUUsTUFBTSxFQUFFLE1BQU0sQ0FBQyxDQUFDLE9BQU8sRUFBRTtBQUN2RCxRQUFRLElBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQyxFQUFFLE1BQU0sRUFBRSxNQUFNLENBQUMsQ0FBQyxPQUFPLEVBQUU7QUFDdkQsS0FBSyxDQUFDO0FBQ04sSUFBSSxPQUFPLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUNyQixHQUFHO0FBQ0g7QUFDQSxFQUFFLGFBQWEsQ0FBQyxJQUFJLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRTtBQUN0QyxJQUFJLElBQUksSUFBSSxHQUFHLElBQUksQ0FBQyxJQUFJLENBQUM7QUFDekI7QUFDQSxJQUFJLElBQUksSUFBSSxDQUFDLFVBQVUsQ0FBQyxNQUFNLENBQUMsRUFBRTtBQUNqQztBQUNBLE1BQU0sSUFBSSxHQUFHLElBQUksQ0FBQyxTQUFTLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQzNDLEtBQUs7QUFDTDtBQUNBLElBQUksSUFBSSxJQUFJLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxFQUFFLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLEVBQUU7QUFDN0M7QUFDQSxNQUFNLElBQUksR0FBRyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUMsRUFBRSxJQUFJLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQyxTQUFTLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBQ3hFLEtBQUs7QUFDTDtBQUNBLElBQUksT0FBTyxNQUFNLENBQUMsSUFBSSxFQUFFLE1BQU0sQ0FBQyxDQUFDO0FBQ2hDLEdBQUc7QUFDSDtBQUNBLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQyxJQUFJLEVBQUU7QUFDcEMsSUFBSSxNQUFNLEVBQUUsR0FBRyxNQUFNLElBQUksQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUMvQyxJQUFJLE1BQU0sT0FBTyxHQUFHLEVBQUUsQ0FBQyxLQUFLLENBQUMsY0FBYyxDQUFDLENBQUM7QUFDN0M7QUFDQSxJQUFJLE9BQU8sUUFBUSxDQUFDO0FBQ3BCLE1BQU0sS0FBSyxFQUFFLE9BQU87QUFDcEIsTUFBTSxZQUFZLEVBQUUsSUFBSSxDQUFDLFFBQVEsQ0FBQyxnQkFBZ0I7QUFDbEQsS0FBSyxDQUFDLENBQUM7QUFDUCxHQUFHO0FBQ0g7QUFDQSxFQUFFLE1BQU0sd0JBQXdCLENBQUMsSUFBSSxFQUFFO0FBQ3ZDO0FBQ0EsSUFBSSxNQUFNLGdCQUFnQixHQUFHLE1BQU0sSUFBSSxDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQzdELElBQUksTUFBTSxXQUFXLEdBQUcsS0FBSyxDQUFDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxRQUFRLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQyxHQUFHO0FBQzlFLE1BQU0sQ0FBQyxDQUFDLE9BQU8sQ0FBQyxLQUFLLE9BQU87QUFDNUIsS0FBSyxDQUFDO0FBQ047QUFDQSxJQUFJLElBQUksV0FBVyxDQUFDLE1BQU0sR0FBRyxDQUFDLEVBQUU7QUFDaEMsTUFBTSxPQUFPLENBQUMsR0FBRyxDQUFDLGdDQUFnQyxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUM7QUFDakUsS0FBSztBQUNMLEdBQUc7QUFDSDtBQUNBLEVBQUUsY0FBYyxDQUFDLE1BQU0sRUFBRTtBQUN6QjtBQUNBLElBQUksSUFBSSxNQUFNLENBQUMsVUFBVSxDQUFDLEdBQUcsQ0FBQyxFQUFFO0FBQ2hDLE1BQU0sTUFBTSxHQUFHLE1BQU0sQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDbkMsS0FBSztBQUNMO0FBQ0E7QUFDQSxJQUFJLElBQUksTUFBTSxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQUMsRUFBRTtBQUM5QixNQUFNLE1BQU0sR0FBRyxNQUFNLENBQUMsU0FBUyxDQUFDLENBQUMsRUFBRSxNQUFNLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBQ3RELEtBQUs7QUFDTDtBQUNBLElBQUksT0FBTyxNQUFNLENBQUM7QUFDbEIsR0FBRztBQUNIO0FBQ0EsRUFBRSxNQUFNLFFBQVEsQ0FBQyxJQUFJLEdBQUcsU0FBUyxFQUFFO0FBQ25DO0FBQ0EsSUFBSSxJQUFJLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxHQUFHQSx5QkFBb0IsRUFBRSxDQUFDO0FBQ3BELElBQUksSUFBSSxrQkFBa0IsR0FBRyxLQUFLLENBQUM7QUFDbkM7QUFDQTtBQUNBLElBQUksSUFBSSxJQUFJLElBQUksU0FBUyxFQUFFO0FBQzNCLE1BQU0sTUFBTSxhQUFhLEdBQUdFLHFCQUFnQixFQUFFLENBQUM7QUFDL0MsTUFBTSxJQUFJLEdBQUdDLGlCQUFZLENBQUMsTUFBTSxDQUFDLE1BQU0sRUFBRSxFQUFFLGFBQWEsQ0FBQyxDQUFDO0FBQzFELE1BQU0sa0JBQWtCLEdBQUcsSUFBSSxDQUFDO0FBQ2hDLEtBQUs7QUFDTCxJQUFJLElBQUksQ0FBQyxJQUFJLEVBQUUsT0FBTztBQUN0QjtBQUNBLElBQUksTUFBTSxHQUFHLElBQUksQ0FBQyxjQUFjLENBQUMsTUFBTSxDQUFDLENBQUM7QUFDekM7QUFDQTtBQUNBLElBQUksSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxFQUFFLE9BQU87QUFDOUM7QUFDQTtBQUNBLElBQUksTUFBTSxLQUFLLEdBQUcsSUFBSSxJQUFJLEVBQUUsQ0FBQztBQUM3QixJQUFJLE1BQU0sY0FBYyxHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBQy9ELElBQUksTUFBTSxtQkFBbUIsR0FBRyxDQUFDLEVBQUUsTUFBTSxDQUFDO0FBQzFDLE1BQU0sTUFBTSxJQUFJLEVBQUUsR0FBRyxFQUFFLEdBQUcsR0FBRztBQUM3QixLQUFLLEVBQUUsY0FBYyxDQUFDLENBQUMsRUFBRSxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQztBQUMxQyxJQUFJLElBQUksbUJBQW1CLEtBQUssSUFBSSxDQUFDLElBQUksRUFBRSxPQUFPO0FBQ2xEO0FBQ0E7QUFDQSxJQUFJO0FBQ0osTUFBTSxLQUFLLENBQUMsT0FBTyxFQUFFLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FBQyxLQUFLLEdBQUcsdUJBQXVCO0FBQ2pFLE1BQU0sQ0FBQyxrQkFBa0I7QUFDekI7QUFDQSxNQUFNLE9BQU87QUFDYjtBQUNBO0FBQ0EsSUFBSSxJQUFJLENBQUMsSUFBSSxDQUFDLG1CQUFtQixFQUFFLEVBQUU7QUFDckMsTUFBTSxJQUFJQyxlQUFNO0FBQ2hCLFFBQVEsbUlBQW1JO0FBQzNJLFFBQVEsS0FBSztBQUNiLE9BQU8sQ0FBQztBQUNSLEtBQUssTUFBTTtBQUNYLE1BQU0sTUFBTSxFQUFFLGVBQWUsRUFBRSxnQkFBZ0IsRUFBRSxnQkFBZ0IsRUFBRTtBQUNuRSxRQUFRLElBQUksQ0FBQyxRQUFRLENBQUM7QUFDdEI7QUFDQTtBQUNBLE1BQU0sTUFBTSxhQUFhLEdBQUcsSUFBSSxDQUFDLGdCQUFnQixFQUFFLENBQUM7QUFDcEQsTUFBTSxJQUFJLENBQUMsYUFBYSxFQUFFLE9BQU87QUFDakM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQU0sSUFBSSxlQUFlLEdBQUcsTUFBTSxJQUFJLENBQUMscUJBQXFCLENBQUMsYUFBYSxDQUFDLENBQUM7QUFDNUU7QUFDQSxNQUFNLE9BQU8sQ0FBQyxHQUFHO0FBQ2pCLFFBQVEsQ0FBQyxzQkFBc0IsRUFBRSxlQUFlLENBQUMsTUFBTSxDQUFDLGdCQUFnQixFQUFFLGFBQWEsQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDO0FBQ3JHLE9BQU8sQ0FBQztBQUNSO0FBQ0EsTUFBTSxJQUFJLGVBQWUsQ0FBQyxNQUFNLElBQUksQ0FBQyxFQUFFO0FBQ3ZDLFFBQVEsT0FBTztBQUNmLE9BQU87QUFDUDtBQUNBO0FBQ0EsTUFBTSxJQUFJLG1CQUFtQixHQUFHO0FBQ2hDLFFBQVEsV0FBVyxFQUFFO0FBQ3JCLFVBQVUsSUFBSSxFQUFFLFNBQVM7QUFDekIsVUFBVSxVQUFVLEVBQUUsRUFBRTtBQUN4QixTQUFTO0FBQ1QsUUFBUSxLQUFLLEVBQUU7QUFDZixVQUFVLElBQUksRUFBRSxTQUFTO0FBQ3pCLFVBQVUsVUFBVSxFQUFFLEVBQUU7QUFDeEIsU0FBUztBQUNULE9BQU8sQ0FBQztBQUNSO0FBQ0E7QUFDQSxNQUFNLElBQUksVUFBVSxHQUFHLENBQUMsQ0FBQztBQUN6QixNQUFNLElBQUkseUJBQXlCLEdBQUcsQ0FBQyxDQUFDO0FBQ3hDLE1BQU0sSUFBSSxXQUFXLEdBQUcsQ0FBQyxnQkFBZ0IsR0FBRyxlQUFlLEdBQUcsRUFBRSxDQUFDO0FBQ2pFLE1BQU0sSUFBSSxnQkFBZ0IsRUFBRTtBQUM1QixRQUFRLGVBQWUsQ0FBQyxPQUFPLENBQUMsQ0FBQyxJQUFJLEVBQUUsQ0FBQyxLQUFLO0FBQzdDLFVBQVUsTUFBTSxXQUFXLEdBQUcsQ0FBQyxJQUFJLElBQUksRUFBRSxFQUFFLElBQUksRUFBRSxDQUFDO0FBQ2xELFVBQVUsSUFBSSxXQUFXLElBQUksT0FBTyxJQUFJLFdBQVcsSUFBSSxRQUFRLEVBQUU7QUFDakUsWUFBWSxXQUFXLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQ25DLFlBQVksVUFBVSxFQUFFLENBQUM7QUFDekIsV0FBVyxNQUFNO0FBQ2pCLFlBQVkseUJBQXlCLEVBQUUsQ0FBQztBQUN4QyxXQUFXO0FBQ1gsU0FBUyxDQUFDLENBQUM7QUFDWCxPQUFPLE1BQU07QUFDYixRQUFRLFVBQVUsR0FBRyxlQUFlLENBQUMsTUFBTSxDQUFDO0FBQzVDLE9BQU87QUFDUDtBQUNBO0FBQ0EsTUFBTSxJQUFJLDhCQUE4QixHQUFHLEVBQUUsQ0FBQztBQUM5QyxNQUFNLE1BQU0sdUJBQXVCLEdBQUcsZUFBZSxLQUFLLE1BQU0sQ0FBQztBQUNqRTtBQUNBLE1BQU0sSUFBSSxXQUFXLENBQUMsTUFBTSxHQUFHLENBQUMsRUFBRTtBQUNsQyxRQUFRLElBQUksZ0JBQWdCLEdBQUcsTUFBTSxJQUFJLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDL0QsUUFBUSxtQkFBbUIsQ0FBQyxLQUFLLEdBQUc7QUFDcEMsVUFBVSxJQUFJLEVBQUUsSUFBSTtBQUNwQixVQUFVLFVBQVUsRUFBRSxDQUFDLEVBQUUsZ0JBQWdCLENBQUMsQ0FBQztBQUMzQyxTQUFTLENBQUM7QUFDVixRQUFRLE1BQU0saUJBQWlCLEdBQUcsQ0FBQyxFQUFFLEVBQUUsV0FBVyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDaEU7QUFDQTtBQUNBLFFBQVEsSUFBSSx1QkFBdUIsRUFBRTtBQUNyQyxVQUFVLE1BQU0scUJBQXFCLEdBQUcsZ0JBQWdCLENBQUMsT0FBTztBQUNoRSxZQUFZLGVBQWU7QUFDM0IsWUFBWSxDQUFDLEVBQUUsZUFBZSxDQUFDLEVBQUUsaUJBQWlCLENBQUMsQ0FBQztBQUNwRCxXQUFXLENBQUM7QUFDWixVQUFVLElBQUkscUJBQXFCLElBQUksZ0JBQWdCLEVBQUU7QUFDekQsWUFBWSw4QkFBOEIsR0FBRyxDQUFDLHdCQUF3QixFQUFFLGVBQWUsQ0FBQyxxREFBcUQsQ0FBQyxDQUFDO0FBQy9JLFdBQVcsTUFBTTtBQUNqQixZQUFZLGdCQUFnQixHQUFHLHFCQUFxQixDQUFDO0FBQ3JELFdBQVc7QUFDWCxTQUFTO0FBQ1Q7QUFDQTtBQUNBLFFBQVE7QUFDUixVQUFVLENBQUMsdUJBQXVCO0FBQ2xDLFVBQVUsOEJBQThCLENBQUMsTUFBTSxHQUFHLENBQUM7QUFDbkQsVUFBVTtBQUNWLFVBQVUsZ0JBQWdCLElBQUksaUJBQWlCLENBQUM7QUFDaEQsU0FBUztBQUNUO0FBQ0EsUUFBUSxNQUFNLElBQUksQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxJQUFJLEVBQUUsZ0JBQWdCLENBQUMsQ0FBQztBQUM1RCxPQUFPO0FBQ1A7QUFDQTtBQUNBLE1BQU0sSUFBSSxnQkFBZ0IsRUFBRTtBQUM1QixRQUFRLElBQUksb0JBQW9CLEdBQUcsTUFBTSxJQUFJLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsYUFBYSxDQUFDLENBQUM7QUFDNUUsUUFBUSxtQkFBbUIsQ0FBQyxXQUFXLEdBQUc7QUFDMUMsVUFBVSxJQUFJLEVBQUUsYUFBYTtBQUM3QixVQUFVLFVBQVUsRUFBRSxDQUFDLEVBQUUsb0JBQW9CLENBQUMsQ0FBQztBQUMvQyxTQUFTLENBQUM7QUFDVixRQUFRLElBQUksS0FBSyxHQUFHLG9CQUFvQixDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUNyRDtBQUNBLFFBQVEsS0FBSyxJQUFJLENBQUMsR0FBRyxLQUFLLENBQUMsTUFBTSxFQUFFLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxFQUFFLEVBQUU7QUFDaEQsVUFBVSxJQUFJLGVBQWUsQ0FBQyxRQUFRLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUU7QUFDbEQsWUFBWSxLQUFLLENBQUMsTUFBTSxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUMvQixXQUFXO0FBQ1gsU0FBUztBQUNUO0FBQ0EsUUFBUSxNQUFNLGVBQWUsR0FBRyxLQUFLLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQ2pELFFBQVEsTUFBTSxJQUFJLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxNQUFNLENBQUMsYUFBYSxFQUFFLGVBQWUsQ0FBQyxDQUFDO0FBQ3BFLE9BQU87QUFDUDtBQUNBO0FBQ0EsTUFBTSxNQUFNLGdCQUFnQjtBQUM1QixRQUFRLFVBQVUsSUFBSSxDQUFDO0FBQ3ZCLFlBQVksRUFBRTtBQUNkLFlBQVksQ0FBQyxFQUFFLEVBQUUsVUFBVSxDQUFDLEtBQUssRUFBRSxVQUFVLEdBQUcsQ0FBQyxHQUFHLEdBQUcsR0FBRyxFQUFFLENBQUMsYUFBYSxDQUFDLENBQUM7QUFDNUUsTUFBTSxNQUFNLCtCQUErQjtBQUMzQyxRQUFRLHlCQUF5QixJQUFJLENBQUM7QUFDdEMsWUFBWSxFQUFFO0FBQ2QsWUFBWSxnQkFBZ0I7QUFDNUIsWUFBWSxDQUFDLEVBQUUsRUFBRSx5QkFBeUIsQ0FBQyxXQUFXO0FBQ3RELGNBQWMseUJBQXlCLEdBQUcsQ0FBQyxHQUFHLEdBQUcsR0FBRyxFQUFFO0FBQ3RELGFBQWEsU0FBUyxDQUFDO0FBQ3ZCLFlBQVksRUFBRSxDQUFDO0FBQ2YsTUFBTSxNQUFNLEtBQUs7QUFDakIsUUFBUSw4QkFBOEIsQ0FBQyxNQUFNLEdBQUcsQ0FBQztBQUNqRCxZQUFZLENBQUMsRUFBRSw4QkFBOEIsQ0FBQyxDQUFDO0FBQy9DLFlBQVksRUFBRSxDQUFDO0FBQ2YsTUFBTSxNQUFNLEtBQUssR0FBRyxDQUFDLEVBQUUsZ0JBQWdCLENBQUM7QUFDeEMsUUFBUSxnQkFBZ0IsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxHQUFHLEdBQUcsR0FBRyxFQUFFO0FBQzlDLE9BQU8sQ0FBQyxDQUFDO0FBQ1QsTUFBTSxNQUFNLEtBQUssR0FBRyxDQUFDLEVBQUUsK0JBQStCLENBQUM7QUFDdkQsUUFBUSwrQkFBK0IsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxHQUFHLEdBQUcsR0FBRyxFQUFFO0FBQzdELE9BQU8sQ0FBQyxDQUFDO0FBQ1Q7QUFDQSxNQUFNLElBQUksUUFBUSxHQUFHLENBQUMsS0FBSyxFQUFFLEtBQUssRUFBRSxLQUFLLENBQUMsQ0FBQztBQUMzQyxNQUFNLElBQUksYUFBYSxHQUFHLEVBQUUsQ0FBQztBQUM3QixNQUFNLFFBQVEsQ0FBQyxPQUFPLENBQUMsQ0FBQyxJQUFJLEtBQUs7QUFDakMsUUFBUSxJQUFJLElBQUksQ0FBQyxNQUFNLEdBQUcsQ0FBQyxFQUFFO0FBQzdCLFVBQVUsYUFBYSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUNuQyxTQUFTO0FBQ1QsT0FBTyxDQUFDLENBQUM7QUFDVDtBQUNBLE1BQU0sTUFBTSxPQUFPLEdBQUcsYUFBYSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUMvQyxNQUFNLElBQUksT0FBTyxDQUFDLE1BQU0sR0FBRyxDQUFDLEVBQUU7QUFDOUIsUUFBUSxJQUFJQSxlQUFNLENBQUMsT0FBTyxFQUFFLElBQUksR0FBRyxPQUFPLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBQ3ZELE9BQU87QUFDUCxNQUFNLElBQUksQ0FBQyxlQUFlLEdBQUcsSUFBSSxJQUFJLEVBQUUsQ0FBQztBQUN4QyxNQUFNLElBQUksQ0FBQyxXQUFXLEdBQUcsQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDO0FBQy9DLEtBQUs7QUFDTCxHQUFHO0FBQ0g7QUFDQSxFQUFFLE1BQU0sTUFBTSxHQUFHO0FBQ2pCLElBQUksTUFBTSxJQUFJLENBQUMsWUFBWSxFQUFFLENBQUM7QUFDOUIsSUFBSSxJQUFJLENBQUMsV0FBVyxHQUFHLEVBQUUsQ0FBQztBQUMxQixJQUFJLElBQUksQ0FBQyxlQUFlLEdBQUcsSUFBSSxJQUFJLEVBQUUsQ0FBQztBQUN0QztBQUNBLElBQUksSUFBSSxDQUFDLGFBQWEsQ0FBQyxJQUFJLGtCQUFrQixDQUFDLElBQUksQ0FBQyxHQUFHLEVBQUUsSUFBSSxDQUFDLENBQUMsQ0FBQztBQUMvRDtBQUNBLElBQUksSUFBSSxDQUFDLGFBQWE7QUFDdEIsTUFBTSxJQUFJLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUMsUUFBUSxFQUFFLE9BQU8sSUFBSSxLQUFLO0FBQ2xEO0FBQ0EsUUFBUSxJQUFJLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxvQkFBb0IsRUFBRSxPQUFPO0FBQ3hELFFBQVEsSUFBSSxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsQ0FBQztBQUM1QixPQUFPLENBQUM7QUFDUixLQUFLLENBQUM7QUFDTjtBQUNBLElBQUksSUFBSSxDQUFDLFVBQVUsQ0FBQztBQUNwQixNQUFNLEVBQUUsRUFBRSx3Q0FBd0M7QUFDbEQsTUFBTSxJQUFJLEVBQUUsb0JBQW9CO0FBQ2hDLE1BQU0sUUFBUSxFQUFFLE1BQU07QUFDdEIsUUFBUSxJQUFJLENBQUMsUUFBUSxFQUFFLENBQUM7QUFDeEIsT0FBTztBQUNQLEtBQUssQ0FBQyxDQUFDO0FBQ1A7QUFDQSxJQUFJLElBQUksQ0FBQyxVQUFVLENBQUM7QUFDcEIsTUFBTSxFQUFFLEVBQUUsb0NBQW9DO0FBQzlDLE1BQU0sSUFBSSxFQUFFLG9CQUFvQjtBQUNoQyxNQUFNLGFBQWEsRUFBRSxDQUFDLFFBQVEsS0FBSztBQUNuQztBQUNBLFFBQVEsSUFBSSxJQUFJLENBQUMsV0FBVyxDQUFDLE1BQU0sR0FBRyxDQUFDLEVBQUU7QUFDekMsVUFBVSxNQUFNLEdBQUcsR0FBRyxNQUFNLENBQUMsTUFBTSxFQUFFLENBQUM7QUFDdEMsVUFBVSxNQUFNLE9BQU8sR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxlQUFlLENBQUMsQ0FBQztBQUM5RCxVQUFVLE1BQU0sSUFBSSxHQUFHLEdBQUcsQ0FBQyxJQUFJLENBQUMsT0FBTyxFQUFFLFNBQVMsQ0FBQyxDQUFDO0FBQ3BEO0FBQ0EsVUFBVSxJQUFJLElBQUksR0FBRyxDQUFDLEdBQUcsRUFBRSxFQUFFO0FBQzdCLFlBQVksT0FBTyxLQUFLLENBQUM7QUFDekIsV0FBVztBQUNYLFVBQVUsSUFBSSxDQUFDLFFBQVEsRUFBRTtBQUN6QixZQUFZLElBQUksU0FBUyxDQUFDLElBQUksQ0FBQyxDQUFDLElBQUksRUFBRSxDQUFDO0FBQ3ZDLFdBQVc7QUFDWCxVQUFVLE9BQU8sSUFBSSxDQUFDO0FBQ3RCLFNBQVM7QUFDVCxRQUFRLE9BQU8sS0FBSyxDQUFDO0FBQ3JCLE9BQU87QUFDUCxLQUFLLENBQUMsQ0FBQztBQUNQLEdBQUc7QUFDSDs7OzsifQ== + + +/* nosourcemap */ \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-rollover-daily-todos/manifest.json b/.obsidian/plugins/obsidian-rollover-daily-todos/manifest.json index fd85e38..d73da22 100644 --- a/.obsidian/plugins/obsidian-rollover-daily-todos/manifest.json +++ b/.obsidian/plugins/obsidian-rollover-daily-todos/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-rollover-daily-todos", "name": "Rollover Daily Todos", - "version": "1.1.8", + "version": "1.2.0", "minAppVersion": "0.12.12", "description": "This Obsidian.md plugin rolls over incomplete TODOs from the previous daily note to today's daily note. (https://obsidian.md). (Originally created by Matthew Sessions)", "author": "Lukas Mölschl", diff --git a/.obsidian/plugins/obsidian-tasks-plugin/main.js b/.obsidian/plugins/obsidian-tasks-plugin/main.js index 1c030e7..0d0e2a4 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/main.js +++ b/.obsidian/plugins/obsidian-tasks-plugin/main.js @@ -161,7 +161,7 @@ MIT License Copyright (c) 2022 Elias Mangoro */ -"use strict";var Cx=Object.create;var $o=Object.defineProperty,Mx=Object.defineProperties,Rx=Object.getOwnPropertyDescriptor,Ax=Object.getOwnPropertyDescriptors,Px=Object.getOwnPropertyNames,Pu=Object.getOwnPropertySymbols,Nx=Object.getPrototypeOf,Af=Object.prototype.hasOwnProperty,vb=Object.prototype.propertyIsEnumerable;var _b=(n,t,e)=>t in n?$o(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,U=(n,t)=>{for(var e in t||(t={}))Af.call(t,e)&&_b(n,e,t[e]);if(Pu)for(var e of Pu(t))vb.call(t,e)&&_b(n,e,t[e]);return n},de=(n,t)=>Mx(n,Ax(t));var pa=(n,t)=>{var e={};for(var r in n)Af.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&Pu)for(var r of Pu(n))t.indexOf(r)<0&&vb.call(n,r)&&(e[r]=n[r]);return e};var ee=(n,t)=>()=>(n&&(t=n(n=0)),t);var x=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),wb=(n,t)=>{for(var e in t)$o(n,e,{get:t[e],enumerable:!0})},kb=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Px(t))!Af.call(n,i)&&i!==e&&$o(n,i,{get:()=>t[i],enumerable:!(r=Rx(t,i))||r.enumerable});return n};var qo=(n,t,e)=>(e=n!=null?Cx(Nx(n)):{},kb(t||!n||!n.__esModule?$o(e,"default",{value:n,enumerable:!0}):e,n)),Sb=n=>kb($o({},"__esModule",{value:!0}),n);var F=(n,t,e)=>new Promise((r,i)=>{var s=l=>{try{o(e.next(l))}catch(u){i(u)}},a=l=>{try{o(e.throw(l))}catch(u){i(u)}},o=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,a);o((e=e.apply(n,t)).next())});var Te,Ho,Db,Ix,Fx,Eb,xb,Go,Ob,Lx,Iu,Ux,Ib,ma,Yx,jx,Nf,Wx,$x,qx,If,Fu,Hx,ga,Ur,ya,Lu,Fb,Cb,ba,Uu,Mb,Rb,Ff,Ab,Pf,Lf,Gx,ha,Uf,Bx,Yf,Pb,Nb,Nu,Vx,hs,yt,VY,zY,KY,QY,XY,ZY,JY,ej,tj,nj,rj,ij,sj,aj,Lb=ee(()=>{Te=n=>typeof n=="string",Ho=()=>{let n,t,e=new Promise((r,i)=>{n=r,t=i});return e.resolve=n,e.reject=t,e},Db=n=>n==null?"":""+n,Ix=(n,t,e)=>{n.forEach(r=>{t[r]&&(e[r]=t[r])})},Fx=/###/g,Eb=n=>n&&n.indexOf("###")>-1?n.replace(Fx,"."):n,xb=n=>!n||Te(n),Go=(n,t,e)=>{let r=Te(t)?t.split("."):t,i=0;for(;i<r.length-1;){if(xb(n))return{};let s=Eb(r[i]);!n[s]&&e&&(n[s]=new e),Object.prototype.hasOwnProperty.call(n,s)?n=n[s]:n={},++i}return xb(n)?{}:{obj:n,k:Eb(r[i])}},Ob=(n,t,e)=>{let{obj:r,k:i}=Go(n,t,Object);if(r!==void 0||t.length===1){r[i]=e;return}let s=t[t.length-1],a=t.slice(0,t.length-1),o=Go(n,a,Object);for(;o.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),o=Go(n,a,Object),(o==null?void 0:o.obj)&&typeof o.obj[`${o.k}.${s}`]!="undefined"&&(o.obj=void 0);o.obj[`${o.k}.${s}`]=e},Lx=(n,t,e,r)=>{let{obj:i,k:s}=Go(n,t,Object);i[s]=i[s]||[],i[s].push(e)},Iu=(n,t)=>{let{obj:e,k:r}=Go(n,t);if(!!e&&!!Object.prototype.hasOwnProperty.call(e,r))return e[r]},Ux=(n,t,e)=>{let r=Iu(n,e);return r!==void 0?r:Iu(t,e)},Ib=(n,t,e)=>{for(let r in t)r!=="__proto__"&&r!=="constructor"&&(r in n?Te(n[r])||n[r]instanceof String||Te(t[r])||t[r]instanceof String?e&&(n[r]=t[r]):Ib(n[r],t[r],e):n[r]=t[r]);return n},ma=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Yx={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},jx=n=>Te(n)?n.replace(/[&<>"'\/]/g,t=>Yx[t]):n,Nf=class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){let e=this.regExpMap.get(t);if(e!==void 0)return e;let r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}},Wx=[" ",",","?","!",";"],$x=new Nf(20),qx=(n,t,e)=>{t=t||"",e=e||"";let r=Wx.filter(a=>t.indexOf(a)<0&&e.indexOf(a)<0);if(r.length===0)return!0;let i=$x.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`),s=!i.test(n);if(!s){let a=n.indexOf(e);a>0&&!i.test(n.substring(0,a))&&(s=!0)}return s},If=function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[t])return Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0;let r=t.split(e),i=n;for(let s=0;s<r.length;){if(!i||typeof i!="object")return;let a,o="";for(let l=s;l<r.length;++l)if(l!==s&&(o+=e),o+=r[l],a=i[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<r.length-1)continue;s+=l-s+1;break}i=a}return i},Fu=n=>n==null?void 0:n.replace("_","-"),Hx={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,t){var e,r;(r=(e=console==null?void 0:console[n])==null?void 0:e.apply)==null||r.call(e,console,t)}},ga=class{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,e)}init(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||Hx,this.options=e,this.debug=e.debug}log(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"log","",!0)}warn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"warn","",!0)}error(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"error","")}deprecate(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(t,e,r,i){return i&&!this.debug?null:(Te(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[e](t))}create(t){return new ga(this.logger,U({prefix:`${this.prefix}:${t}:`},this.options))}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ga(this.logger,t)}},Ur=new ga,ya=class{constructor(){this.observers={}}on(t,e){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);let i=this.observers[r].get(e)||0;this.observers[r].set(e,i+1)}),this}off(t,e){if(!!this.observers[t]){if(!e){delete this.observers[t];return}this.observers[t].delete(e)}}emit(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o.apply(o,[t,...r])})}},Lu=class extends ya{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=e,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){let e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,e,r){var u,c;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure,o;t.indexOf(".")>-1?o=t.split("."):(o=[t,e],r&&(Array.isArray(r)?o.push(...r):Te(r)&&s?o.push(...r.split(s)):o.push(r)));let l=Iu(this.data,o);return!l&&!e&&!r&&t.indexOf(".")>-1&&(t=o[0],e=o[1],r=o.slice(2).join(".")),l||!a||!Te(r)?l:If((c=(u=this.data)==null?void 0:u[t])==null?void 0:c[e],r,s)}addResource(t,e,r,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=[t,e];r&&(o=o.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(o=t.split("."),i=e,e=o[1]),this.addNamespaces(e),Ob(this.data,o,i),s.silent||this.emit("added",t,e,r,i)}addResources(t,e,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(let s in r)(Te(r[s])||Array.isArray(r[s]))&&this.addResource(t,e,s,r[s],{silent:!0});i.silent||this.emit("added",t,e,r)}addResourceBundle(t,e,r,i,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[t,e];t.indexOf(".")>-1&&(o=t.split("."),i=r,r=e,e=o[1]),this.addNamespaces(e);let l=Iu(this.data,o)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Ib(l,r,s):l=U(U({},l),r),Ob(this.data,o,l),a.silent||this.emit("added",t,e,r)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return this.getResource(t,e)!==void 0}getResourceBundle(t,e){return e||(e=this.options.defaultNS),this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){let e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find(i=>e[i]&&Object.keys(e[i]).length>0)}toJSON(){return this.data}},Fb={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,t,e,r,i){return n.forEach(s=>{var a,o;t=(o=(a=this.processors[s])==null?void 0:a.process(t,e,r,i))!=null?o:t}),t}},Cb={},ba=class extends ya{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Ix(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=e,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ur.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;let r=this.resolve(t,e);return(r==null?void 0:r.res)!==void 0}extractFromKey(t,e){let r=e.nsSeparator!==void 0?e.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");let i=e.keySeparator!==void 0?e.keySeparator:this.options.keySeparator,s=e.ns||this.options.defaultNS||[],a=r&&t.indexOf(r)>-1,o=!this.options.userDefinedKeySeparator&&!e.keySeparator&&!this.options.userDefinedNsSeparator&&!e.nsSeparator&&!qx(t,r,i);if(a&&!o){let l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:Te(s)?[s]:s};let u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),t=u.join(i)}return{key:t,namespaces:Te(s)?[s]:s}}translate(t,e,r){if(typeof e!="object"&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),typeof e=="object"&&(e=U({},e)),e||(e={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);let i=e.returnDetails!==void 0?e.returnDetails:this.options.returnDetails,s=e.keySeparator!==void 0?e.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(t[t.length-1],e),l=o[o.length-1],u=e.lng||this.language,c=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode"){if(c){let Y=e.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${Y}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(e)}:`${l}${Y}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(e)}:a}let d=this.resolve(t,e),f=d==null?void 0:d.res,p=(d==null?void 0:d.usedKey)||a,b=(d==null?void 0:d.exactUsedKey)||a,T=Object.prototype.toString.apply(f),_=["[object Number]","[object Function]","[object RegExp]"],O=e.joinArrays!==void 0?e.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,A=!Te(f)&&typeof f!="boolean"&&typeof f!="number";if(E&&f&&A&&_.indexOf(T)<0&&!(Te(O)&&Array.isArray(f))){if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let Y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,f,de(U({},e),{ns:o})):`key '${a} (${this.language})' returned an object instead of string.`;return i?(d.res=Y,d.usedParams=this.getUsedParamsDetails(e),d):Y}if(s){let Y=Array.isArray(f),q=Y?[]:{},se=Y?b:p;for(let H in f)if(Object.prototype.hasOwnProperty.call(f,H)){let Z=`${se}${s}${H}`;q[H]=this.translate(Z,de(U({},e),{joinArrays:!1,ns:o})),q[H]===Z&&(q[H]=f[H])}f=q}}else if(E&&Te(O)&&Array.isArray(f))f=f.join(O),f&&(f=this.extendTranslation(f,t,e,r));else{let Y=!1,q=!1,se=e.count!==void 0&&!Te(e.count),H=ba.hasDefaultValue(e),Z=se?this.pluralResolver.getSuffix(u,e.count,e):"",ye=e.ordinal&&se?this.pluralResolver.getSuffix(u,e.count,{ordinal:!1}):"",we=se&&!e.ordinal&&e.count===0,V=we&&e[`defaultValue${this.options.pluralSeparator}zero`]||e[`defaultValue${Z}`]||e[`defaultValue${ye}`]||e.defaultValue;!this.isValidLookup(f)&&H&&(Y=!0,f=V),this.isValidLookup(f)||(q=!0,f=a);let C=(e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&q?void 0:f,J=H&&V!==f&&this.options.updateMissing;if(q||Y||J){if(this.logger.log(J?"updateKey":"missingKey",u,l,a,J?V:f),s){let y=this.resolve(a,de(U({},e),{keySeparator:!1}));y&&y.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $=[],oe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if(this.options.saveMissingTo==="fallback"&&oe&&oe[0])for(let y=0;y<oe.length;y++)$.push(oe[y]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(e.lng||this.language):$.push(e.lng||this.language);let m=(y,v,w)=>{var M;let S=H&&w!==f?w:C;this.options.missingKeyHandler?this.options.missingKeyHandler(y,l,v,S,J,e):(M=this.backendConnector)!=null&&M.saveMissing&&this.backendConnector.saveMissing(y,l,v,S,J,e),this.emit("missingKey",y,l,v,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&se?$.forEach(y=>{let v=this.pluralResolver.getSuffixes(y,e);we&&e[`defaultValue${this.options.pluralSeparator}zero`]&&v.indexOf(`${this.options.pluralSeparator}zero`)<0&&v.push(`${this.options.pluralSeparator}zero`),v.forEach(w=>{m([y],a+w,e[`defaultValue${w}`]||V)})}):m($,a,V))}f=this.extendTranslation(f,t,e,d,r),q&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${a}`),(q||Y)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,Y?f:void 0))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(e),d):f}extendTranslation(t,e,r,i,s){var u,c;var a=this;if((u=this.i18nFormat)!=null&&u.parse)t=this.i18nFormat.parse(t,U(U({},this.options.interpolation.defaultVariables),r),r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(de(U({},r),{interpolation:U(U({},this.options.interpolation),r.interpolation)}));let d=Te(t)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),f;if(d){let b=t.match(this.interpolator.nestingRegexp);f=b&&b.length}let p=r.replace&&!Te(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p=U(U({},this.options.interpolation.defaultVariables),p)),t=this.interpolator.interpolate(t,p,r.lng||this.language||i.usedLng,r),d){let b=t.match(this.interpolator.nestingRegexp),T=b&&b.length;f<T&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var b=arguments.length,T=new Array(b),_=0;_<b;_++)T[_]=arguments[_];return(s==null?void 0:s[0])===T[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${T[0]} in key: ${e[0]}`),null):a.translate(...T,e)},r)),r.interpolation&&this.interpolator.reset()}let o=r.postProcess||this.options.postProcess,l=Te(o)?[o]:o;return t!=null&&(l==null?void 0:l.length)&&r.applyPostProcessor!==!1&&(t=Fb.handle(l,t,e,this.options&&this.options.postProcessPassResolved?U({i18nResolved:de(U({},i),{usedParams:this.getUsedParamsDetails(r)})},r):r,this)),t}resolve(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,s,a,o;return Te(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;let u=this.extractFromKey(l,e),c=u.key;i=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));let f=e.count!==void 0&&!Te(e.count),p=f&&!e.ordinal&&e.count===0,b=e.context!==void 0&&(Te(e.context)||typeof e.context=="number")&&e.context!=="",T=e.lngs?e.lngs:this.languageUtils.toResolveHierarchy(e.lng||this.language,e.fallbackLng);d.forEach(_=>{var O,E;this.isValidLookup(r)||(o=_,!Cb[`${T[0]}-${_}`]&&((O=this.utils)==null?void 0:O.hasLoadedNamespace)&&!((E=this.utils)!=null&&E.hasLoadedNamespace(o))&&(Cb[`${T[0]}-${_}`]=!0,this.logger.warn(`key "${i}" for languages "${T.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),T.forEach(A=>{var se;if(this.isValidLookup(r))return;a=A;let Y=[c];if((se=this.i18nFormat)!=null&&se.addLookupKeys)this.i18nFormat.addLookupKeys(Y,c,A,_,e);else{let H;f&&(H=this.pluralResolver.getSuffix(A,e.count,e));let Z=`${this.options.pluralSeparator}zero`,ye=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(Y.push(c+H),e.ordinal&&H.indexOf(ye)===0&&Y.push(c+H.replace(ye,this.options.pluralSeparator)),p&&Y.push(c+Z)),b){let we=`${c}${this.options.contextSeparator}${e.context}`;Y.push(we),f&&(Y.push(we+H),e.ordinal&&H.indexOf(ye)===0&&Y.push(we+H.replace(ye,this.options.pluralSeparator)),p&&Y.push(we+Z))}}let q;for(;q=Y.pop();)this.isValidLookup(r)||(s=q,r=this.getResource(A,_,q,e))}))})}),{res:r,usedKey:i,exactUsedKey:s,usedLng:a,usedNS:o}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,e,r){var s;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(t,e,r,i):this.resourceStore.getResource(t,e,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Te(t.replace),i=r?t.replace:t;if(r&&typeof t.count!="undefined"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i=U(U({},this.options.interpolation.defaultVariables),i)),!r){i=U({},i);for(let s of e)delete i[s]}return i}static hasDefaultValue(t){let e="defaultValue";for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e===r.substring(0,e.length)&&t[r]!==void 0)return!0;return!1}},Uu=class{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ur.create("languageUtils")}getScriptPartFromCode(t){if(t=Fu(t),!t||t.indexOf("-")<0)return null;let e=t.split("-");return e.length===2||(e.pop(),e[e.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(e.join("-"))}getLanguagePartFromCode(t){if(t=Fu(t),!t||t.indexOf("-")<0)return t;let e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(Te(t)&&t.indexOf("-")>-1){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(r){}return e&&this.options.lowerCaseLng&&(e=e.toLowerCase()),e||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach(r=>{if(e)return;let i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(e=i)}),!e&&this.options.supportedLngs&&t.forEach(r=>{if(e)return;let i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return e=i;e=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,e){if(!t)return[];if(typeof t=="function"&&(t=t(e)),Te(t)&&(t=[t]),Array.isArray(t))return t;if(!e)return t.default||[];let r=t[e];return r||(r=t[this.getScriptPartFromCode(e)]),r||(r=t[this.formatLanguageCode(e)]),r||(r=t[this.getLanguagePartFromCode(e)]),r||(r=t.default),r||[]}toResolveHierarchy(t,e){let r=this.getFallbackCodes(e||this.options.fallbackLng||[],t),i=[],s=a=>{!a||(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return Te(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):Te(t)&&s(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&s(this.formatLanguageCode(a))}),i}},Mb={zero:0,one:1,two:2,few:3,many:4,other:5},Rb={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})},Ff=class{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=e,this.logger=Ur.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,e){this.rules[t]=e}clearCache(){this.pluralRulesCache={}}getRule(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Fu(t==="dev"?"en":t),i=e.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(r,{type:i})}catch(o){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Rb;if(!t.match(/-|_/))return Rb;let l=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(l,e)}return this.pluralRulesCache[s]=a,a}needsPlural(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,e);return r||(r=this.getRule("dev",e)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${e}${i}`)}getSuffixes(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,e);return r||(r=this.getRule("dev",e)),r?r.resolvedOptions().pluralCategories.sort((i,s)=>Mb[i]-Mb[s]).map(i=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(e)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",e,r))}},Ab=function(n,t,e){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=Ux(n,t,e);return!s&&i&&Te(e)&&(s=If(n,e,r),s===void 0&&(s=If(t,e,r))),s},Pf=n=>n.replace(/\$/g,"$$$$"),Lf=class{constructor(){var e;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ur.create("interpolator"),this.options=t,this.format=((e=t==null?void 0:t.interpolation)==null?void 0:e.format)||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});let{escape:e,escapeValue:r,useRawValueToEscape:i,prefix:s,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:b,nestingSuffixEscaped:T,nestingOptionsSeparator:_,maxReplaces:O,alwaysFormat:E}=t.interpolation;this.escape=e!==void 0?e:jx,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?ma(s):a||"{{",this.suffix=o?ma(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?ma(f):p||ma("$t("),this.nestingSuffix=b?ma(b):T||ma(")"),this.nestingOptionsSeparator=_||",",this.maxReplaces=O||1e3,this.alwaysFormat=E!==void 0?E:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let t=(e,r)=>(e==null?void 0:e.source)===r?(e.lastIndex=0,e):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,e,r,i){var p;let s,a,o,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=b=>{if(b.indexOf(this.formatSeparator)<0){let E=Ab(e,l,b,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(E,void 0,r,de(U(U({},i),e),{interpolationkey:b})):E}let T=b.split(this.formatSeparator),_=T.shift().trim(),O=T.join(this.formatSeparator).trim();return this.format(Ab(e,l,_,this.options.keySeparator,this.options.ignoreJSONStructure),O,r,de(U(U({},i),e),{interpolationkey:_}))};this.resetRegExp();let c=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((p=i==null?void 0:i.interpolation)==null?void 0:p.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:b=>Pf(b)},{regex:this.regexp,safeValue:b=>this.escapeValue?Pf(this.escape(b)):Pf(b)}].forEach(b=>{for(o=0;s=b.regex.exec(t);){let T=s[1].trim();if(a=u(T),a===void 0)if(typeof c=="function"){let O=c(t,s,i);a=Te(O)?O:""}else if(i&&Object.prototype.hasOwnProperty.call(i,T))a="";else if(d){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${T} for interpolating ${t}`),a="";else!Te(a)&&!this.useRawValueToEscape&&(a=Db(a));let _=b.safeValue(a);if(t=t.replace(s[0],_),d?(b.regex.lastIndex+=a.length,b.regex.lastIndex-=s[0].length):b.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),t}nest(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,a,o=(l,u)=>{var T;let c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;let d=l.split(new RegExp(`${c}[ ]*{`)),f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);let p=f.match(/'/g),b=f.match(/"/g);(((T=p==null?void 0:p.length)!=null?T:0)%2===0&&!b||b.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),u&&(a=U(U({},u),a))}catch(_){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,_),`${l}${c}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];a=U({},r),a=a.replace&&!Te(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){let c=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=c.shift(),l=c,u=!0}if(s=e(o.call(this,i[1].trim(),a),a),s&&i[0]===t&&!Te(s))return s;Te(s)||(s=Db(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),u&&(s=l.reduce((c,d)=>this.format(c,d,r.lng,de(U({},r),{interpolationkey:i[1].trim()})),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}},Gx=n=>{let t=n.toLowerCase().trim(),e={};if(n.indexOf("(")>-1){let r=n.split("(");t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?e.currency||(e.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?e.range||(e.range=i.trim()):i.split(";").forEach(a=>{if(a){let[o,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=o.trim();e[c]||(e[c]=u),u==="false"&&(e[c]=!1),u==="true"&&(e[c]=!0),isNaN(u)||(e[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:e}},ha=n=>{let t={};return(e,r,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s=de(U({},s),{[i.interpolationkey]:void 0}));let a=r+JSON.stringify(s),o=t[a];return o||(o=n(Fu(r),i),t[a]=o),o(e)}},Uf=class{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ur.create("formatter"),this.options=t,this.formats={number:ha((e,r)=>{let i=new Intl.NumberFormat(e,U({},r));return s=>i.format(s)}),currency:ha((e,r)=>{let i=new Intl.NumberFormat(e,de(U({},r),{style:"currency"}));return s=>i.format(s)}),datetime:ha((e,r)=>{let i=new Intl.DateTimeFormat(e,U({},r));return s=>i.format(s)}),relativetime:ha((e,r)=>{let i=new Intl.RelativeTimeFormat(e,U({},r));return s=>i.format(s,r.range||"day")}),list:ha((e,r)=>{let i=new Intl.ListFormat(e,U({},r));return s=>i.format(s)})},this.init(t)}init(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=e.interpolation.formatSeparator||","}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=ha(e)}format(t,e,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=e.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(o=>o.indexOf(")")>-1)){let o=s.findIndex(l=>l.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,o)].join(this.formatSeparator)}return s.reduce((o,l)=>{var d;let{formatName:u,formatOptions:c}=Gx(l);if(this.formats[u]){let f=o;try{let p=((d=i==null?void 0:i.formatParams)==null?void 0:d[i.interpolationkey])||{},b=p.locale||p.lng||i.locale||i.lng||r;f=this.formats[u](o,b,U(U(U({},c),i),p))}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${u}`);return o},t)}},Bx=(n,t)=>{n.pending[t]!==void 0&&(delete n.pending[t],n.pendingCount--)},Yf=class extends ya{constructor(t,e,r){var s,a;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=e,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Ur.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(a=(s=this.backend)==null?void 0:s.init)==null||a.call(s,r,i.backend,i)}queueLoad(t,e,r,i){let s={},a={},o={},l={};return t.forEach(u=>{let c=!0;e.forEach(d=>{let f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,c=!1,a[f]===void 0&&(a[f]=!0),s[f]===void 0&&(s[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(o[u]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(t,e,r){let i=t.split("|"),s=i[0],a=i[1];e&&this.emit("failedLoading",s,a,e),!e&&r&&this.store.addResourceBundle(s,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=e?-1:2,e&&r&&(this.state[t]=0);let o={};this.queue.forEach(l=>{Lx(l.loaded,[s],a),Bx(l,t),e&&l.errors.push(e),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});let c=l.loaded[u];c.length&&c.forEach(d=>{o[u][d]===void 0&&(o[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(t,e,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:e,fcName:r,tried:i,wait:s,callback:a});return}this.readingCalls++;let o=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){let d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,e,r,i+1,s*2,a)},s);return}a(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{let u=l(t,e);u&&typeof u.then=="function"?u.then(c=>o(null,c)).catch(o):o(null,u)}catch(u){o(u)}return}return l(t,e,o)}prepareLoading(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Te(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Te(e)&&(e=[e]);let s=this.queueLoad(t,e,r,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(t,e,r){this.prepareLoading(t,e,{},r)}reload(t,e,r){this.prepareLoading(t,e,{reload:!0},r)}loadOne(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=t.split("|"),i=r[0],s=r[1];this.read(i,s,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${e}loading namespace ${s} for language ${i} failed`,a),!a&&o&&this.logger.log(`${e}loaded namespace ${s} for language ${i}`,o),this.loaded(t,a,o)})}saveMissing(t,e,r,i,s){var l,u,c,d,f;let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(((u=(l=this.services)==null?void 0:l.utils)==null?void 0:u.hasLoadedNamespace)&&!((d=(c=this.services)==null?void 0:c.utils)!=null&&d.hasLoadedNamespace(e))){this.logger.warn(`did not save key "${r}" as the namespace "${e}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){let p=de(U({},a),{isUpdate:s}),b=this.backend.create.bind(this.backend);if(b.length<6)try{let T;b.length===5?T=b(t,e,r,i,p):T=b(t,e,r,i),T&&typeof T.then=="function"?T.then(_=>o(null,_)).catch(o):o(null,T)}catch(T){o(T)}else b(t,e,r,i,o,p)}!t||!t[0]||this.store.addResource(t[0],e,r,i)}}},Pb=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let t={};if(typeof n[1]=="object"&&(t=n[1]),Te(n[1])&&(t.defaultValue=n[1]),Te(n[2])&&(t.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){let e=n[3]||n[2];Object.keys(e).forEach(r=>{t[r]=e[r]})}return t},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Nb=n=>{var t,e;return Te(n.ns)&&(n.ns=[n.ns]),Te(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Te(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((e=(t=n.supportedLngs)==null?void 0:t.indexOf)==null?void 0:e.call(t,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},Nu=()=>{},Vx=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{typeof n[e]=="function"&&(n[e]=n[e].bind(n))})},hs=class extends ya{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Nb(t),this.services={},this.logger=Ur,this.modules={external:[]},Vx(this),e&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,e),this;setTimeout(()=>{this.init(t,e)},0)}}init(){var t=this;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof e=="function"&&(r=e,e={}),e.defaultNS==null&&e.ns&&(Te(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));let i=Pb();this.options=U(U(U({},i),this.options),Nb(e)),this.options.interpolation=U(U({},i.interpolation),this.options.interpolation),e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);let s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Ur.init(s(this.modules.logger),this.options):Ur.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Uf;let d=new Uu(this.options);this.store=new Lu(this.options.resources,this.options);let f=this.services;f.logger=Ur,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new Ff(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=s(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Lf(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Yf(s(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var b=arguments.length,T=new Array(b>1?b-1:0),_=1;_<b;_++)T[_-1]=arguments[_];t.emit(p,...T)}),this.modules.languageDetector&&(f.languageDetector=s(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=s(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new ba(this.services,this.options),this.translator.on("*",function(p){for(var b=arguments.length,T=new Array(b>1?b-1:0),_=1;_<b;_++)T[_-1]=arguments[_];t.emit(p,...T)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Nu),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});let l=Ho(),u=()=>{let c=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),l}loadResources(t){var s,a;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Nu,i=Te(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();let o=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(d=>{d!=="cimode"&&o.indexOf(d)<0&&o.push(d)})};i?l(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>l(c)),(a=(s=this.options.preload)==null?void 0:s.forEach)==null||a.call(s,u=>l(u)),this.services.backendConnector.load(o,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,e,r){let i=Ho();return typeof t=="function"&&(r=t,t=void 0),typeof e=="function"&&(r=e,e=void 0),t||(t=this.languages),e||(e=this.options.ns),r||(r=Nu),this.services.backendConnector.reload(t,e,s=>{i.resolve(),r(s)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Fb.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let e=0;e<this.languages.length;e++){let r=this.languages[e];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,e){var r=this;this.isLanguageChangingTo=t;let i=Ho();this.emit("languageChanging",t);let s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,u)=>{u?(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),e&&e(l,function(){return r.t(...arguments)})},o=l=>{var c,d;!t&&!l&&this.services.languageDetector&&(l=[]);let u=Te(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),(d=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||d.call(c,u)),this.loadResources(u,f=>{a(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),i}getFixedT(t,e,r){var i=this;let s=function(a,o){let l;if(typeof o!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d<u;d++)c[d-2]=arguments[d];l=i.options.overloadTranslationOptionHandler([a,o].concat(c))}else l=U({},o);l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||s.keyPrefix);let f=i.options.keySeparator||".",p;return l.keyPrefix&&Array.isArray(a)?p=a.map(b=>`${l.keyPrefix}${f}${b}`):p=l.keyPrefix?`${l.keyPrefix}${f}${a}`:a,i.t(p,l)};return Te(t)?s.lng=t:s.lngs=t,s.ns=e,s.keyPrefix=r,s}t(){var i;for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return(i=this.translator)==null?void 0:i.translate(...e)}exists(){var i;for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return(i=this.translator)==null?void 0:i.exists(...e)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let r=e.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;let a=(o,l)=>{let u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(e.precheck){let o=e.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(s,t)))}loadNamespaces(t,e){let r=Ho();return this.options.ns?(Te(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),e&&e(i)}),r):(e&&e(),Promise.resolve())}loadLanguages(t,e){let r=Ho();Te(t)&&(t=[t]);let i=this.options.preload||[],s=t.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=i.concat(s),this.loadResources(a=>{r.resolve(),e&&e(a)}),r):(e&&e(),Promise.resolve())}dir(t){var i,s;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";let e=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((s=this.services)==null?void 0:s.languageUtils)||new Uu(Pb());return e.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new hs(t,e)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Nu,r=t.forkResourceStore;r&&delete t.forkResourceStore;let i=de(U(U({},this.options),t),{isClone:!0}),s=new hs(i);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(o=>{s[o]=this[o]}),s.services=U({},this.services),s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r){let o=Object.keys(this.store.data).reduce((l,u)=>(l[u]=U({},this.store.data[u]),Object.keys(l[u]).reduce((c,d)=>(c[d]=U({},l[u][d]),c),{})),{});s.store=new Lu(o,i),s.services.resourceStore=s.store}return s.translator=new ba(s.services,i),s.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];s.emit(o,...u)}),s.init(i,e),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},yt=hs.createInstance();yt.createInstance=hs.createInstance;VY=yt.createInstance,zY=yt.dir,KY=yt.init,QY=yt.loadResources,XY=yt.reloadResources,ZY=yt.use,JY=yt.changeLanguage,ej=yt.getFixedT,tj=yt.t,nj=yt.exists,rj=yt.setDefaultNamespace,ij=yt.hasLoadedNamespace,sj=yt.loadNamespaces,aj=yt.loadLanguages});var Yb,Ub=ee(()=>{Yb={main:{loadingPlugin:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043F\u043B\u0430\u0433\u0456\u043D\u0430: {{name}} v{{version}}",unloadingPlugin:"\u0412\u044B\u0433\u0440\u0443\u0437\u043A\u0430 \u043F\u043B\u0430\u0433\u0456\u043D\u0430: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"\u041A\u0430\u043B\u0456 \u045E\u043A\u043B\u044E\u0447\u0430\u043D\u0430, \u0433\u044D\u0442\u044B \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0437\u0435 \u0434\u0430\u0441\u0442\u0443\u043F\u043D\u044B \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u043A\u0430\u043C\u0430\u043D\u0434\u044B, \u0442\u0430\u043A \u0448\u0442\u043E \u0432\u044B \u0437\u043C\u043E\u0436\u0430\u0446\u0435 \u043F\u0440\u044B\u0437\u043D\u0430\u0447\u044B\u0446\u044C \u0433\u0430\u0440\u0430\u0447\u0443\u044E \u043A\u043B\u0430\u0432\u0456\u0448\u0443 \u0456 \u043F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u0430\u0446\u044C \u0441\u0442\u0430\u0442\u0443\u0441 \u0437 \u044F\u0435 \u0434\u0430\u043F\u0430\u043C\u043E\u0433\u0430\u0439.",name:"\u0414\u0430\u0441\u0442\u0443\u043F\u043D\u044B \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u043A\u0430\u043C\u0430\u043D\u0434\u044B"},editNextStatusSymbol:{description:"\u041F\u0440\u044B \u043D\u0430\u0446\u0456\u0441\u043A\u0443 \u0433\u044D\u0442\u0430 \u0441\u0456\u043C\u0432\u0430\u043B, \u044F\u043A\u0456 \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043D\u044B \u0434\u0430\u043B\u0435\u0439.",name:"\u0421\u0456\u043C\u0432\u0430\u043B \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0433\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u044B"},editStatusName:{description:"\u0413\u044D\u0442\u0430 \u0437\u0440\u0430\u0437\u0443\u043C\u0435\u043B\u0430\u0435 \u0456\u043C\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u044B.",name:"\u0406\u043C\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u044B"},editStatusSymbol:{description:"\u0413\u044D\u0442\u0430 \u0441\u0456\u043C\u0432\u0430\u043B \u043F\u0430\u043C\u0456\u0436 \u043A\u0432\u0430\u0434\u0440\u0430\u0442\u043D\u044B\u043C\u0456 \u0434\u0443\u0436\u043A\u0430\u043C\u0456. (\u042F\u0433\u043E \u043C\u043E\u0436\u043D\u0430 \u0440\u044D\u0434\u0430\u0433\u0430\u0432\u0430\u0446\u044C \u0442\u043E\u043B\u044C\u043A\u0456 \u0434\u043B\u044F \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E, \u0430 \u043D\u0435 \u0434\u043B\u044F \u0430\u0441\u043D\u043E\u045E\u043D\u044B\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E.)",name:"\u0421\u0456\u043C\u0432\u0430\u043B \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u044B"},editStatusType:{description:"\u041A\u0456\u0440\u0443\u0439\u0446\u0435 \u0442\u044B\u043C, \u044F\u043A \u0441\u0442\u0430\u0442\u0443\u0441 \u043F\u0430\u0432\u043E\u0434\u0437\u0456\u0446\u044C \u0441\u044F\u0431\u0435 \u043F\u0440\u044B \u043F\u043E\u0448\u0443\u043A\u0443 \u0456 \u043F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0456.",name:"\u0422\u044B\u043F \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u044B"},fixErrorsBeforeSaving:"\u0412\u044B\u043F\u0440\u0430\u045E\u0446\u0435 \u043F\u0430\u043C\u044B\u043B\u043A\u0456 \u043F\u0435\u0440\u0430\u0434 \u0437\u0430\u0445\u0430\u0432\u0430\u043D\u043D\u0435\u043C."}},reports:{statusRegistry:{about:{createdBy:"\u0413\u044D\u0442\u044B \u0444\u0430\u0439\u043B \u0431\u044B\u045E \u0441\u0442\u0432\u043E\u0440\u0430\u043D\u044B \u043F\u043B\u0430\u0433\u0456\u043D\u0430\u043C Obsidian Tasks (\u0432\u0435\u0440\u0441\u0456\u044F {{version}}) \u0434\u043B\u044F \u0432\u0456\u0437\u0443\u0430\u043B\u0456\u0437\u0430\u0446\u044B\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E \u0437\u0430\u0434\u0430\u0447 \u0443 \u0433\u044D\u0442\u044B\u043C \u0441\u0445\u043E\u0432\u0456\u0448\u0447\u044B.",deleteFileAnyTime:"\u0412\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u0432\u044B\u0434\u0430\u043B\u0456\u0446\u044C \u0433\u044D\u0442\u044B \u0444\u0430\u0439\u043B \u0443 \u043B\u044E\u0431\u044B \u043C\u043E\u043C\u0430\u043D\u0442.",title:"\u041F\u0440\u0430 \u0433\u044D\u0442\u044B \u0444\u0430\u0439\u043B",updateReport:{line1:"\u041A\u0430\u043B\u0456 \u0432\u044B \u0437\u043C\u044F\u043D\u044F\u0435\u0446\u0435 \u043D\u0430\u043B\u0430\u0434\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u0443 Tasks, \u0432\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u0430\u0442\u0440\u044B\u043C\u0430\u0446\u044C \u0430\u0431\u043D\u043E\u045E\u043B\u0435\u043D\u044B \u0441\u043F\u0440\u0430\u0432\u0430\u0437\u0434\u0430\u0447\u0443:",line2:"\u041F\u0435\u0440\u0430\u0439\u0448\u043E\u045E\u0448\u044B \u045E `\u041D\u0430\u043B\u0430\u0434\u044B` -> `Tasks`.",line3:"\u041D\u0430\u0446\u0456\u0441\u043D\u0443\u045E\u0448\u044B \u043D\u0430 `\u041F\u0440\u0430\u0433\u043B\u044F\u0434\u0437\u0435\u0446\u044C \u0456 \u043F\u0440\u0430\u0432\u0435\u0440\u044B\u0446\u044C \u0432\u0430\u0448\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u044B`."}},columnHeadings:{nextStatusSymbol:"\u0421\u0456\u043C\u0432\u0430\u043B \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0433\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443",problems:"\u041F\u0440\u0430\u0431\u043B\u0435\u043C\u044B (\u043A\u0430\u043B\u0456 \u0451\u0441\u0446\u044C)",statusName:"\u0406\u043C\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0443",statusSymbol:"\u0421\u0456\u043C\u0432\u0430\u043B \u0441\u0442\u0430\u0442\u0443\u0441\u0443",statusType:"\u0422\u044B\u043F \u0441\u0442\u0430\u0442\u0443\u0441\u0443"},loadedSettings:{settingsActuallyUsed:"\u0413\u044D\u0442\u0430 \u043D\u0430\u043B\u0430\u0434\u044B, \u044F\u043A\u0456\u044F \u0441\u0430\u043F\u0440\u0430\u045E\u0434\u044B \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u044E\u0446\u0446\u0430 Tasks.",switchToLivePreview:"\u041F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u044B\u0446\u0435\u0441\u044F \u045E \u0440\u044D\u0436\u044B\u043C \u043F\u0430\u043F\u044F\u0440\u044D\u0434\u043D\u044F\u0433\u0430 \u043F\u0440\u0430\u0433\u043B\u044F\u0434\u0443 \u045E \u0440\u044D\u0430\u043B\u044C\u043D\u044B\u043C \u0447\u0430\u0441\u0435 \u0430\u0431\u043E \u0440\u044D\u0436\u044B\u043C \u0447\u044B\u0442\u0430\u043D\u043D\u044F, \u043A\u0430\u0431 \u0443\u0431\u0430\u0447\u044B\u0446\u044C \u0434\u044B\u044F\u0433\u0440\u0430\u043C\u0443.",title:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u043D\u044B\u044F \u043D\u0430\u043B\u0430\u0434\u044B"},messages:{cannotFindNextStatus:"\u041D\u0435\u0447\u0430\u043A\u0430\u043D\u0430\u044F \u043F\u0430\u043C\u044B\u043B\u043A\u0430 \u043F\u0440\u044B \u043F\u043E\u0448\u0443\u043A\u0443 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0433\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443.",duplicateSymbol:"\u0414\u0443\u0431\u043B\u0456\u043A\u0430\u0442 \u0441\u0456\u043C\u0432\u0430\u043B\u0430 '{{symbol}}': \u0433\u044D\u0442\u044B \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0437\u0435 \u043F\u0440\u0430\u0456\u0433\u043D\u0430\u0440\u0430\u0432\u0430\u043D\u044B.",emptySymbol:"\u041F\u0443\u0441\u0442\u044B \u0441\u0456\u043C\u0432\u0430\u043B: \u0433\u044D\u0442\u044B \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0437\u0435 \u043F\u0440\u0430\u0456\u0433\u043D\u0430\u0440\u0430\u0432\u0430\u043D\u044B.",nextSymbolUnknown:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u044B \u0441\u0456\u043C\u0432\u0430\u043B {{symbol}} \u043D\u0435\u0432\u044F\u0434\u043E\u043C\u044B: \u0441\u0442\u0432\u0430\u0440\u044B\u0446\u0435 \u0441\u0442\u0430\u0442\u0443\u0441 \u0437 \u0441\u0456\u043C\u0432\u0430\u043B\u0430\u043C {{symbol}}.",notConventionalType:"\u0414\u043B\u044F \u0456\u043D\u0444\u0430\u0440\u043C\u0430\u0446\u044B\u0456, \u0437\u0432\u044B\u0447\u0430\u0439\u043D\u044B \u0442\u044B\u043F \u0434\u043B\u044F \u0441\u0456\u043C\u0432\u0430\u043B\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 {{symbol}} - {{type}}: \u0432\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u043F\u0435\u0440\u0430\u0433\u043B\u0435\u0434\u0437\u0435\u0446\u044C \u0433\u044D\u0442\u044B \u0442\u044B\u043F.",wrongTypeAfterDone:{line1:"\u041F\u0430\u0441\u043B\u044F \u0433\u044D\u0442\u0430\u0433\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 `DONE` \u0456\u0434\u0437\u0435 {{nextType}}, \u0430 \u043D\u0435 `TODO` \u0430\u0431\u043E `IN_PROGRESS`.",line2:"\u041F\u0440\u044B \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043D\u043D\u0456 \u0434\u043B\u044F \u0437\u0430\u0432\u044F\u0440\u0448\u044D\u043D\u043D\u044F \u043F\u0435\u0440\u044B\u044F\u0434\u044B\u0447\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u044B \u044F\u043D\u0430 \u0437\u0430\u043C\u0435\u0441\u0442 \u0433\u044D\u0442\u0430\u0433\u0430 \u0431\u0443\u0434\u0437\u0435 \u0441\u0443\u043F\u0440\u0430\u0432\u0430\u0434\u0436\u0430\u0446\u0446\u0430 `TODO` \u0430\u0431\u043E `IN_PROGRESS`, \u043A\u0430\u0431 \u0433\u0430\u0440\u0430\u043D\u0442\u0430\u0432\u0430\u0446\u044C, \u0448\u0442\u043E \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u044F \u0437\u0430\u0434\u0430\u0447\u0430 \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0435 \u0444\u0456\u043B\u044C\u0442\u0440\u0443 `\u043D\u0435 \u0432\u044B\u043A\u0430\u043D\u0430\u043D\u0430`.",line3:"\u0413\u043B\u044F\u0434\u0437\u0456\u0446\u0435 [Recurring Tasks and Custom Statuses]({{helpURL}})."}},statusSettings:{comment:{line1:"\u041F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u044B\u0446\u0435\u0441\u044F \u045E \u0440\u044D\u0436\u044B\u043C \u043F\u0430\u043F\u044F\u0440\u044D\u0434\u043D\u044F\u0433\u0430 \u043F\u0440\u0430\u0433\u043B\u044F\u0434\u0443 \u045E \u0440\u044D\u0430\u043B\u044C\u043D\u044B\u043C \u0447\u0430\u0441\u0435 \u0430\u0431\u043E \u0440\u044D\u0436\u044B\u043C \u0447\u044B\u0442\u0430\u043D\u043D\u044F, \u043A\u0430\u0431 \u0443\u0431\u0430\u0447\u044B\u0446\u044C \u0442\u0430\u0431\u043B\u0456\u0446\u0443.",line2:"\u041A\u0430\u043B\u0456 \u045E \u0456\u043C\u0451\u043D\u0430\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E \u0451\u0441\u0446\u044C \u044F\u043A\u0456\u044F-\u043D\u0435\u0431\u0443\u0434\u0437\u044C \u0441\u0456\u043C\u0432\u0430\u043B\u044B \u0444\u0430\u0440\u043C\u0430\u0442\u0430\u0432\u0430\u043D\u043D\u044F Markdown, \u0442\u0430\u043A\u0456\u044F \u044F\u043A '*' \u0430\u0431\u043E '_',",line3:"Obsidian \u043C\u043E\u0436\u0430 \u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430 \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u0446\u044C \u0442\u0430\u0431\u043B\u0456\u0446\u0443 \u0442\u043E\u043B\u044C\u043A\u0456 \u045E \u0440\u044D\u0436\u044B\u043C\u0435 \u0447\u044B\u0442\u0430\u043D\u043D\u044F."},theseAreStatusValues:"\u0413\u044D\u0442\u0430 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u045E \u0440\u0430\u0437\u0434\u0437\u0435\u043B\u0430\u0445 Core \u0456 Custom statuses.",title:"\u041D\u0430\u043B\u0430\u0434\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u0443"}}},settings:{autoSuggest:{heading:"\u0410\u045E\u0442\u0430\u043F\u0430\u0434\u043A\u0430\u0437\u043A\u0430",maxSuggestions:{description:"\u041A\u043E\u043B\u044C\u043A\u0456 \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u045E \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C \u043F\u0430\u043A\u0430\u0437\u0430\u043D\u0430 \u043F\u0440\u044B \u0437'\u044F\u045E\u043B\u0435\u043D\u043D\u0456 \u043C\u0435\u043D\u044E \u0430\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u044B\u0445 \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u045E (\u0443\u043A\u043B\u044E\u0447\u0430\u044E\u0447\u044B \u043E\u043F\u0446\u044B\u044E \xAB\u23CE\xBB).",name:"\u041C\u0430\u043A\u0441\u0456\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u043A\u043E\u043B\u044C\u043A\u0430\u0441\u0446\u044C \u0430\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u044B\u0445 \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u045E \u0434\u043B\u044F \u043F\u0430\u043A\u0430\u0437\u0443"},minLength:{description:"\u041A\u0430\u043B\u0456 \u0432\u044B\u0448\u044D\u0439 \u0437\u0430 0, \u0430\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u0430\u044F \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u0432\u0430 \u0431\u0443\u0434\u0437\u0435 \u0441\u043F\u0440\u0430\u0446\u043E\u045E\u0432\u0430\u0446\u044C \u0442\u043E\u043B\u044C\u043A\u0456 \u0442\u0430\u0434\u044B, \u043A\u0430\u043B\u0456 \u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u0435\u0446\u0446\u0430 \u043F\u0430\u0447\u0430\u0442\u0430\u043A \u043B\u044E\u0431\u043E\u0433\u0430 \u043F\u0430\u0434\u0442\u0440\u044B\u043C\u043E\u045E\u0432\u0430\u043D\u0430\u0433\u0430 \u043A\u043B\u044E\u0447\u0430\u0432\u043E\u0433\u0430 \u0441\u043B\u043E\u0432\u0430.",name:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0434\u0430\u045E\u0436\u044B\u043D\u044F \u0441\u0443\u043F\u0430\u0434\u0437\u0435\u043D\u043D\u044F \u0434\u043B\u044F \u0430\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u0430\u0439 \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u0432\u044B"},toggle:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0430\u0434\u043A\u0440\u044B\u0435 \u0456\u043D\u0442\u044D\u043B\u0435\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u0430\u0435 \u043C\u0435\u043D\u044E \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u045E \u043F\u0440\u044B \u045E\u0432\u043E\u0434\u0437\u0435 \u0442\u044D\u043A\u0441\u0442\u0443 \u045E\u043D\u0443\u0442\u0440\u044B \u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u0430\u0439 \u043B\u0456\u043D\u0456\u0456 \u0437\u0430\u0434\u0430\u0447\u044B.",name:"\u0410\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u0430 \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u045E\u0432\u0430\u0446\u044C \u0437\u043C\u0435\u0441\u0442 \u0437\u0430\u0434\u0430\u0447\u044B"}},changeRequiresRestart:"\u0417\u043C\u0435\u043D\u0430 \u043B\u044E\u0431\u044B\u0445 \u043D\u0430\u043B\u0430\u0434 \u043F\u0430\u0442\u0440\u0430\u0431\u0443\u0435 \u043F\u0435\u0440\u0430\u0437\u0430\u043F\u0443\u0441\u043A\u0443 Obsidian.",dates:{cancelledDate:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0434\u0430\u0434\u0430\u0441\u0446\u044C \u0447\u0430\u0441\u043E\u0432\u0443\u044E \u043F\u0430\u0437\u043D\u0430\u043A\u0443 \u274C YYYY-MM-DD \u045E \u043A\u0430\u043D\u0446\u044B, \u043A\u0430\u043B\u0456 \u0437\u0430\u0434\u0430\u0447\u0430 \u043F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u0430\u0435\u0446\u0446\u0430 \u045E \u0430\u0434\u043C\u0435\u043D\u0435\u043D\u044B \u0441\u0442\u0430\u043D.",name:"\u0423\u0441\u0442\u0430\u043D\u0430\u0432\u0456\u0446\u044C \u0434\u0430\u0442\u0443 \u0430\u0434\u043C\u0435\u043D\u044B \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u0430\u0439 \u0430\u0434\u043C\u0435\u043D\u0435\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u044B"},createdDate:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0434\u0430\u0434\u0430\u0441\u0446\u044C \u0447\u0430\u0441\u043E\u0432\u0443\u044E \u043F\u0430\u0437\u043D\u0430\u043A\u0443 \u2795 YYYY-MM-DD \u043F\u0435\u0440\u0430\u0434 \u0456\u043D\u0448\u044B\u043C\u0456 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u044F\u043C\u0456 \u0434\u0430\u0442\u044B, \u043A\u0430\u043B\u0456 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0442\u0432\u0430\u0440\u0430\u0435\u0446\u0446\u0430 \u0437 \u0434\u0430\u043F\u0430\u043C\u043E\u0433\u0430\u0439 \xAB\u0421\u0442\u0432\u0430\u0440\u044B\u0446\u044C \u0430\u0431\u043E \u0440\u044D\u0434\u0430\u0433\u0430\u0432\u0430\u0446\u044C \u0437\u0430\u0434\u0430\u0447\u0443\xBB \u0430\u0431\u043E \u043F\u0440\u044B \u0437\u0430\u0432\u044F\u0440\u0448\u044D\u043D\u043D\u0456 \u043F\u0435\u0440\u044B\u044F\u0434\u044B\u0447\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u044B.",name:"\u0423\u0441\u0442\u0430\u043D\u0430\u0432\u0456\u0446\u044C \u0434\u0430\u0442\u0443 \u0441\u0442\u0432\u0430\u0440\u044D\u043D\u043D\u044F \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u0430\u0439 \u0434\u0430\u0434\u0430\u0434\u0437\u0435\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u044B"},doneDate:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0434\u0430\u0434\u0430\u0441\u0446\u044C \u0447\u0430\u0441\u043E\u0432\u0443\u044E \u043F\u0430\u0437\u043D\u0430\u043A\u0443 \u2705 YYYY-MM-DD \u045E \u043A\u0430\u043D\u0446\u044B, \u043A\u0430\u043B\u0456 \u0437\u0430\u0434\u0430\u0447\u0430 \u043F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u0430\u0435\u0446\u0446\u0430 \u045E \u0432\u044B\u043A\u0430\u043D\u0430\u043D\u044B \u0441\u0442\u0430\u043D.",name:"\u0423\u0441\u0442\u0430\u043D\u0430\u0432\u0456\u0446\u044C \u0434\u0430\u0442\u0443 \u0432\u044B\u043A\u0430\u043D\u0430\u043D\u043D\u044F \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u0430\u0439 \u0432\u044B\u043A\u0430\u043D\u0430\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u044B"},heading:"\u0414\u0430\u0442\u044B"},datesFromFileNames:{heading:"\u0414\u0430\u0442\u044B \u0437 \u0456\u043C\u0451\u043D\u0430\u045E \u0444\u0430\u0439\u043B\u0430\u045E",scheduledDate:{extraFormat:{description:{line1:"\u0414\u0430\u0434\u0430\u0442\u043A\u043E\u0432\u044B \u0444\u0430\u0440\u043C\u0430\u0442 \u0434\u0430\u0442\u044B, \u044F\u043A\u0456 \u043F\u043B\u0430\u0433\u0456\u043D Tasks \u0431\u0443\u0434\u0437\u0435 \u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u0432\u0430\u0446\u044C \u043F\u0440\u044B \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043D\u043D\u0456 \u0456\u043C\u044F \u0444\u0430\u0439\u043B\u0430 \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u0430\u0439 \u0434\u0430\u0442\u044B \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0434\u0430\u0442\u044B.",line2:"\u0414\u0430\u0432\u0435\u0434\u043A\u0430 \u043F\u0430 \u0441\u0456\u043D\u0442\u0430\u043A\u0441\u0456\u0441\u0435"},name:"\u0414\u0430\u0434\u0430\u0442\u043A\u043E\u0432\u044B \u0444\u0430\u0440\u043C\u0430\u0442 \u0434\u0430\u0442\u044B \u0456\u043C\u044F \u0444\u0430\u0439\u043B\u0430 \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u0430\u0439 \u0434\u0430\u0442\u044B \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0434\u0430\u0442\u044B",placeholder:"\u043F\u0440\u044B\u043A\u043B\u0430\u0434: MMM DD YYYY"},folders:{description:"\u041F\u0430\u043A\u0456\u043D\u044C\u0446\u0435 \u043F\u0443\u0441\u0442\u044B\u043C, \u043A\u0430\u043B\u0456 \u0445\u043E\u0447\u0430\u0446\u0435 \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u0446\u044C \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u044B\u044F \u0434\u0430\u0442\u044B \u043F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456 \u043F\u0430\u045E\u0441\u044E\u043B\u044C, \u0430\u0431\u043E \u045E\u0432\u044F\u0434\u0437\u0456\u0446\u0435 \u0441\u043F\u0456\u0441 \u0442\u044D\u0447\u0430\u043A, \u043F\u0430\u0434\u0437\u0435\u043B\u0435\u043D\u044B\u0445 \u043A\u043E\u0441\u043A\u0430\u043C\u0456.",name:"\u0422\u044D\u0447\u043A\u0456 \u0437 \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u044B\u043C\u0456 \u0434\u0430\u0442\u0430\u043C\u0456 \u043F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456"},toggle:{description:{line1:"\u042D\u043A\u0430\u043D\u043E\u043C\u0446\u0435 \u0447\u0430\u0441, \u0443\u0432\u043E\u0434\u0437\u044F\u0447\u044B \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u044B\u044F (\u23F3) \u0434\u0430\u0442\u044B.",line2:"\u041A\u0430\u043B\u0456 \u0433\u044D\u0442\u0430\u044F \u043E\u043F\u0446\u044B\u044F \u045E\u043A\u043B\u044E\u0447\u0430\u043D\u0430, \u043B\u044E\u0431\u044B\u043C \u0437\u0430\u0434\u0430\u0447\u0430\u043C \u0431\u0435\u0437 \u0434\u0430\u0442\u044B \u0431\u0443\u0434\u0437\u0435 \u043F\u0440\u044B\u0437\u043D\u0430\u0447\u0430\u043D\u0430 \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u0430\u044F \u0434\u0430\u0442\u0430 \u043F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456, \u0432\u044B\u043D\u044F\u0442\u0430\u044F \u0437 \u0456\u0445 \u0456\u043C\u044F \u0444\u0430\u0439\u043B\u0430.",line3:"\u041F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456 \u043F\u043B\u0430\u0433\u0456\u043D Tasks \u0431\u0443\u0434\u0437\u0435 \u0441\u0443\u043F\u0430\u0441\u0442\u0430\u045E\u043B\u044F\u0446\u044C \u0444\u0430\u0440\u043C\u0430\u0442\u044B \u0434\u0430\u0442\u044B <code>YYYY-MM-DD</code> \u0456 <code>YYYYMMDD</code>.",line4:"\u0417\u0430\u0434\u0430\u0447\u044B \u0431\u0435\u0437 \u0434\u0430\u0442\u044B \u043D\u0435 \u043C\u0430\u044E\u0446\u044C \u043D\u0456\u0432\u043E\u0434\u043D\u0430\u0439 \u0437 \u0434\u0430\u0442: Due (\u{1F4C5} ), Scheduled (\u23F3) \u0456 Start (\u{1F6EB})."},name:"\u0412\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u0446\u044C \u0456\u043C\u044F \u0444\u0430\u0439\u043B\u0430 \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u0430\u0439 \u0434\u0430\u0442\u044B \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0434\u0430\u0442\u044B"}}},dialogs:{accessKeys:{description:"\u041A\u0430\u043B\u0456 \u043A\u043B\u0430\u0432\u0456\u0448\u044B \u0434\u043E\u0441\u0442\u0443\u043F\u0443 (\u043A\u043B\u0430\u0432\u0456\u044F\u0442\u0443\u0440\u043D\u044B\u044F \u0441\u043A\u0430\u0440\u0430\u0447\u044D\u043D\u043D\u0456) \u0434\u043B\u044F \u0440\u043E\u0437\u043D\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E \u043A\u0456\u0440\u0430\u0432\u0430\u043D\u043D\u044F \u045E \u0434\u044B\u044F\u043B\u043E\u0433\u0430\u0432\u044B\u0445 \u0432\u043E\u043A\u043D\u0430\u0445 \u043A\u0430\u043D\u0444\u043B\u0456\u043A\u0442\u0443\u044E\u0446\u044C \u0437 \u0441\u0456\u0441\u0442\u044D\u043C\u043D\u044B\u043C\u0456 \u043A\u043B\u0430\u0432\u0456\u044F\u0442\u0443\u0440\u043D\u044B\u043C\u0456 \u0441\u043A\u0430\u0440\u0430\u0447\u044D\u043D\u043D\u044F\u043C\u0456 \u0430\u0431\u043E \u0444\u0443\u043D\u043A\u0446\u044B\u044F\u043C\u0456 \u0434\u0430\u043F\u0430\u043C\u043E\u0436\u043D\u0430\u0439 \u0442\u044D\u0445\u043D\u0430\u043B\u043E\u0433\u0456\u0456, \u044F\u043A\u0456\u044F \u0432\u0430\u0436\u043D\u044B\u044F \u0434\u043B\u044F \u0432\u0430\u0441, \u0432\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u0430\u0434\u043A\u043B\u044E\u0447\u044B\u0446\u044C \u0456\u0445 \u0442\u0443\u0442.",name:"\u0417\u0430\u0431\u044F\u0441\u043F\u0435\u0447\u044B\u0446\u044C \u043A\u043B\u0430\u0432\u0456\u0448\u044B \u0434\u043E\u0441\u0442\u0443\u043F\u0443 \u045E \u0434\u044B\u044F\u043B\u043E\u0433\u0430\u0445"},heading:"\u0414\u044B\u044F\u043B\u043E\u0433\u0456"},format:{description:{line1:"\u0424\u0430\u0440\u043C\u0430\u0442, \u044F\u043A\u0456 Tasks \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u0435 \u0434\u043B\u044F \u0447\u044B\u0442\u0430\u043D\u043D\u044F \u0456 \u0437\u0430\u043F\u0456\u0441\u0443 \u0437\u0430\u0434\u0430\u0447.",line2:"<b>\u0412\u0430\u0436\u043D\u0430:</b> Tasks \u0443 \u0446\u044F\u043F\u0435\u0440\u0430\u0448\u043D\u0456 \u0447\u0430\u0441 \u043F\u0430\u0434\u0442\u0440\u044B\u043C\u043B\u0456\u0432\u0430\u0435 \u0442\u043E\u043B\u044C\u043A\u0456 \u0430\u0434\u0437\u0456\u043D \u0444\u0430\u0440\u043C\u0430\u0442 \u0430\u0434\u043D\u0430\u0447\u0430\u0441\u043E\u0432\u0430. \u0412\u044B\u0431\u0430\u0440 Dataview \u0443 \u0446\u044F\u043F\u0435\u0440\u0430\u0448\u043D\u0456 \u0447\u0430\u0441 <b>\u0441\u043F\u044B\u043D\u0456\u0446\u044C \u0447\u044B\u0442\u0430\u043D\u043D\u0435 Tasks \u0441\u0432\u0430\u0456\u0445 \u0443\u043B\u0430\u0441\u043D\u044B\u0445 \u0437\u043D\u0430\u043A\u0430\u045E \u044D\u043C\u043E\u0434\u0437\u0456</b>."},displayName:{dataview:"Dataview",tasksEmojiFormat:"\u0424\u0430\u0440\u043C\u0430\u0442 \u044D\u043C\u043E\u0434\u0437\u0456 Tasks"},name:"\u0424\u0430\u0440\u043C\u0430\u0442 \u0437\u0430\u0434\u0430\u0447\u044B"},globalFilter:{filter:{description:{line1:"\u0420\u044D\u043A\u0430\u043C\u0435\u043D\u0434\u0443\u0435\u0446\u0446\u0430: \u043F\u0430\u043A\u0456\u043D\u044C\u0446\u0435 \u043F\u0443\u0441\u0442\u044B\u043C, \u043A\u0430\u043B\u0456 \u0445\u043E\u0447\u0430\u0446\u0435, \u043A\u0430\u0431 \u0443\u0441\u0435 \u043F\u0443\u043D\u043A\u0442\u044B \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443 \u045E \u0432\u0430\u0448\u044B\u043C \u0441\u0445\u043E\u0432\u0456\u0448\u0447\u044B \u0431\u044B\u043B\u0456 \u0437\u0430\u0434\u0430\u0447\u0430\u043C\u0456, \u044F\u043A\u0456\u043C\u0456 \u043A\u0456\u0440\u0443\u0435 \u0433\u044D\u0442\u044B \u043F\u043B\u0430\u0433\u0456\u043D.",line2:"\u0412\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u0439\u0446\u0435 \u0433\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0444\u0456\u043B\u044C\u0442\u0440, \u043A\u0430\u043B\u0456 \u0432\u044B \u0445\u043E\u0447\u0430\u0446\u0435, \u043A\u0430\u0431 Tasks \u0434\u0437\u0435\u0439\u043D\u0456\u0447\u0430\u045E \u0442\u043E\u043B\u044C\u043A\u0456 \u043D\u0430 \u043F\u0430\u0434\u043C\u043D\u043E\u0441\u0442\u0432\u0430 \u0432\u0430\u0448\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443 \xAB<code>- [ ]</code>\xBB, \u0442\u0430\u043A\u0456\u043C \u0447\u044B\u043D\u0430\u043C, \u043A\u0430\u0431 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443 \u045E\u043A\u043B\u044E\u0447\u0430\u045E \u0443 \u0441\u0432\u0430\u0451 \u0430\u043F\u0456\u0441\u0430\u043D\u043D\u0435 \u0432\u044B\u0437\u043D\u0430\u0447\u0430\u043D\u044B \u0440\u0430\u0434\u043E\u043A, \u043A\u0430\u0431 \u043B\u0456\u0447\u044B\u0446\u0446\u0430 \u0437\u0430\u0434\u0430\u0447\u0430\u0439.",line3:"\u041D\u0430\u043F\u0440\u044B\u043A\u043B\u0430\u0434, \u043A\u0430\u043B\u0456 \u0432\u044B \u045E\u0441\u0442\u0430\u043B\u044E\u0435\u0446\u0435 \u0433\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0444\u0456\u043B\u044C\u0442\u0440 \u043D\u0430 <code>#task</code>, \u043F\u043B\u0430\u0433\u0456\u043D Tasks \u0431\u0443\u0434\u0437\u0435 \u0430\u043F\u0440\u0430\u0446\u043E\u045E\u0432\u0430\u0446\u044C \u0442\u043E\u043B\u044C\u043A\u0456 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443, \u043F\u0430\u0437\u043D\u0430\u0447\u0430\u043D\u044B\u044F <code>#task</code>.",line4:"\u0406\u043D\u0448\u044B\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443 \u0437\u0430\u0441\u0442\u0430\u043D\u0443\u0446\u0446\u0430 \u0437\u0432\u044B\u0447\u0430\u0439\u043D\u044B\u043C\u0456 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u043C\u0456 \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443 \u0456 \u043D\u0435 \u0431\u0443\u0434\u0443\u0446\u044C \u0437'\u044F\u045E\u043B\u044F\u0446\u0446\u0430 \u045E \u0437\u0430\u043F\u044B\u0442\u0430\u0445, \u0456 \u0434\u043B\u044F \u0456\u0445 \u043D\u0435 \u0431\u0443\u0434\u0437\u0435 \u045E\u0441\u0442\u0430\u043D\u043E\u045E\u043B\u0435\u043D\u0430 \u0434\u0430\u0442\u0430 \u0432\u044B\u043A\u0430\u043D\u0430\u043D\u043D\u044F."},name:"\u0413\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0444\u0456\u043B\u044C\u0442\u0440",placeholder:"\u043D\u0430\u043F\u0440\u044B\u043A\u043B\u0430\u0434 #task \u0430\u0431\u043E TODO"},heading:"\u0413\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0444\u0456\u043B\u044C\u0442\u0440 \u0437\u0430\u0434\u0430\u0447",removeFilter:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0432\u044B\u0434\u0430\u043B\u0456\u0446\u044C \u0440\u0430\u0434\u043E\u043A, \u044F\u043A\u0456 \u0432\u044B \u045E\u0441\u0442\u0430\u043B\u044F\u0432\u0430\u043B\u0456 \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u0433\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u0430\u0433\u0430 \u0444\u0456\u043B\u044C\u0442\u0440\u0430, \u0437 \u0430\u043F\u0456\u0441\u0430\u043D\u043D\u044F \u0437\u0430\u0434\u0430\u0447\u044B \u043F\u0440\u044B \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u043D\u043D\u0456 \u0437\u0430\u0434\u0430\u0447\u044B.",name:"\u0412\u044B\u0434\u0430\u043B\u0456\u0446\u044C \u0433\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0444\u0456\u043B\u044C\u0442\u0440 \u0437 \u0430\u043F\u0456\u0441\u0430\u043D\u043D\u044F"}},globalQuery:{heading:"\u0413\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0437\u0430\u043F\u044B\u0442",query:{description:"\u0417\u0430\u043F\u044B\u0442, \u044F\u043A\u0456 \u0430\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u0430 \u045E\u043A\u043B\u044E\u0447\u0430\u0435\u0446\u0446\u0430 \u045E \u043F\u0430\u0447\u0430\u0442\u043A\u0443 \u043A\u043E\u0436\u043D\u0430\u0433\u0430 \u0431\u043B\u043E\u043A\u0430 Tasks \u0443 \u0441\u0445\u043E\u0432\u0456\u0448\u0447\u044B. \u041A\u0430\u0440\u044B\u0441\u043D\u044B \u0434\u043B\u044F \u0434\u0430\u0434\u0430\u043D\u043D\u044F \u0444\u0456\u043B\u044C\u0442\u0440\u0430\u045E \u043F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456 \u0430\u0431\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430\u045E \u043C\u0430\u043A\u0435\u0442\u0430.",placeholder:`\u041D\u0430\u043F\u0440\u044B\u043A\u043B\u0430\u0434... +"use strict";var Cx=Object.create;var $o=Object.defineProperty,Mx=Object.defineProperties,Rx=Object.getOwnPropertyDescriptor,Ax=Object.getOwnPropertyDescriptors,Px=Object.getOwnPropertyNames,Pu=Object.getOwnPropertySymbols,Nx=Object.getPrototypeOf,Af=Object.prototype.hasOwnProperty,vb=Object.prototype.propertyIsEnumerable;var _b=(n,t,e)=>t in n?$o(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,U=(n,t)=>{for(var e in t||(t={}))Af.call(t,e)&&_b(n,e,t[e]);if(Pu)for(var e of Pu(t))vb.call(t,e)&&_b(n,e,t[e]);return n},de=(n,t)=>Mx(n,Ax(t));var pa=(n,t)=>{var e={};for(var r in n)Af.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&Pu)for(var r of Pu(n))t.indexOf(r)<0&&vb.call(n,r)&&(e[r]=n[r]);return e};var ee=(n,t)=>()=>(n&&(t=n(n=0)),t);var x=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),wb=(n,t)=>{for(var e in t)$o(n,e,{get:t[e],enumerable:!0})},kb=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Px(t))!Af.call(n,i)&&i!==e&&$o(n,i,{get:()=>t[i],enumerable:!(r=Rx(t,i))||r.enumerable});return n};var qo=(n,t,e)=>(e=n!=null?Cx(Nx(n)):{},kb(t||!n||!n.__esModule?$o(e,"default",{value:n,enumerable:!0}):e,n)),Sb=n=>kb($o({},"__esModule",{value:!0}),n);var F=(n,t,e)=>new Promise((r,i)=>{var s=l=>{try{o(e.next(l))}catch(u){i(u)}},a=l=>{try{o(e.throw(l))}catch(u){i(u)}},o=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,a);o((e=e.apply(n,t)).next())});var Te,Ho,Db,Ix,Fx,Eb,xb,Go,Ob,Lx,Iu,Ux,Ib,ma,Yx,jx,Nf,Wx,$x,qx,If,Fu,Hx,ga,Ur,ya,Lu,Fb,Cb,ba,Uu,Mb,Rb,Ff,Ab,Pf,Lf,Gx,ha,Uf,Bx,Yf,Pb,Nb,Nu,Vx,hs,yt,VY,zY,KY,QY,XY,ZY,JY,ej,tj,nj,rj,ij,sj,aj,Lb=ee(()=>{Te=n=>typeof n=="string",Ho=()=>{let n,t,e=new Promise((r,i)=>{n=r,t=i});return e.resolve=n,e.reject=t,e},Db=n=>n==null?"":""+n,Ix=(n,t,e)=>{n.forEach(r=>{t[r]&&(e[r]=t[r])})},Fx=/###/g,Eb=n=>n&&n.indexOf("###")>-1?n.replace(Fx,"."):n,xb=n=>!n||Te(n),Go=(n,t,e)=>{let r=Te(t)?t.split("."):t,i=0;for(;i<r.length-1;){if(xb(n))return{};let s=Eb(r[i]);!n[s]&&e&&(n[s]=new e),Object.prototype.hasOwnProperty.call(n,s)?n=n[s]:n={},++i}return xb(n)?{}:{obj:n,k:Eb(r[i])}},Ob=(n,t,e)=>{let{obj:r,k:i}=Go(n,t,Object);if(r!==void 0||t.length===1){r[i]=e;return}let s=t[t.length-1],a=t.slice(0,t.length-1),o=Go(n,a,Object);for(;o.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),o=Go(n,a,Object),(o==null?void 0:o.obj)&&typeof o.obj[`${o.k}.${s}`]!="undefined"&&(o.obj=void 0);o.obj[`${o.k}.${s}`]=e},Lx=(n,t,e,r)=>{let{obj:i,k:s}=Go(n,t,Object);i[s]=i[s]||[],i[s].push(e)},Iu=(n,t)=>{let{obj:e,k:r}=Go(n,t);if(!!e&&!!Object.prototype.hasOwnProperty.call(e,r))return e[r]},Ux=(n,t,e)=>{let r=Iu(n,e);return r!==void 0?r:Iu(t,e)},Ib=(n,t,e)=>{for(let r in t)r!=="__proto__"&&r!=="constructor"&&(r in n?Te(n[r])||n[r]instanceof String||Te(t[r])||t[r]instanceof String?e&&(n[r]=t[r]):Ib(n[r],t[r],e):n[r]=t[r]);return n},ma=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),Yx={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},jx=n=>Te(n)?n.replace(/[&<>"'\/]/g,t=>Yx[t]):n,Nf=class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){let e=this.regExpMap.get(t);if(e!==void 0)return e;let r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}},Wx=[" ",",","?","!",";"],$x=new Nf(20),qx=(n,t,e)=>{t=t||"",e=e||"";let r=Wx.filter(a=>t.indexOf(a)<0&&e.indexOf(a)<0);if(r.length===0)return!0;let i=$x.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`),s=!i.test(n);if(!s){let a=n.indexOf(e);a>0&&!i.test(n.substring(0,a))&&(s=!0)}return s},If=function(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[t])return Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0;let r=t.split(e),i=n;for(let s=0;s<r.length;){if(!i||typeof i!="object")return;let a,o="";for(let l=s;l<r.length;++l)if(l!==s&&(o+=e),o+=r[l],a=i[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<r.length-1)continue;s+=l-s+1;break}i=a}return i},Fu=n=>n==null?void 0:n.replace("_","-"),Hx={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,t){var e,r;(r=(e=console==null?void 0:console[n])==null?void 0:e.apply)==null||r.call(e,console,t)}},ga=class{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,e)}init(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||Hx,this.options=e,this.debug=e.debug}log(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"log","",!0)}warn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"warn","",!0)}error(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"error","")}deprecate(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(t,e,r,i){return i&&!this.debug?null:(Te(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[e](t))}create(t){return new ga(this.logger,U({prefix:`${this.prefix}:${t}:`},this.options))}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ga(this.logger,t)}},Ur=new ga,ya=class{constructor(){this.observers={}}on(t,e){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);let i=this.observers[r].get(e)||0;this.observers[r].set(e,i+1)}),this}off(t,e){if(!!this.observers[t]){if(!e){delete this.observers[t];return}this.observers[t].delete(e)}}emit(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o.apply(o,[t,...r])})}},Lu=class extends ya{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=e,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){let e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,e,r){var u,c;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure,o;t.indexOf(".")>-1?o=t.split("."):(o=[t,e],r&&(Array.isArray(r)?o.push(...r):Te(r)&&s?o.push(...r.split(s)):o.push(r)));let l=Iu(this.data,o);return!l&&!e&&!r&&t.indexOf(".")>-1&&(t=o[0],e=o[1],r=o.slice(2).join(".")),l||!a||!Te(r)?l:If((c=(u=this.data)==null?void 0:u[t])==null?void 0:c[e],r,s)}addResource(t,e,r,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=[t,e];r&&(o=o.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(o=t.split("."),i=e,e=o[1]),this.addNamespaces(e),Ob(this.data,o,i),s.silent||this.emit("added",t,e,r,i)}addResources(t,e,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(let s in r)(Te(r[s])||Array.isArray(r[s]))&&this.addResource(t,e,s,r[s],{silent:!0});i.silent||this.emit("added",t,e,r)}addResourceBundle(t,e,r,i,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[t,e];t.indexOf(".")>-1&&(o=t.split("."),i=r,r=e,e=o[1]),this.addNamespaces(e);let l=Iu(this.data,o)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Ib(l,r,s):l=U(U({},l),r),Ob(this.data,o,l),a.silent||this.emit("added",t,e,r)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return this.getResource(t,e)!==void 0}getResourceBundle(t,e){return e||(e=this.options.defaultNS),this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){let e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find(i=>e[i]&&Object.keys(e[i]).length>0)}toJSON(){return this.data}},Fb={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,t,e,r,i){return n.forEach(s=>{var a,o;t=(o=(a=this.processors[s])==null?void 0:a.process(t,e,r,i))!=null?o:t}),t}},Cb={},ba=class extends ya{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Ix(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=e,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ur.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;let r=this.resolve(t,e);return(r==null?void 0:r.res)!==void 0}extractFromKey(t,e){let r=e.nsSeparator!==void 0?e.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");let i=e.keySeparator!==void 0?e.keySeparator:this.options.keySeparator,s=e.ns||this.options.defaultNS||[],a=r&&t.indexOf(r)>-1,o=!this.options.userDefinedKeySeparator&&!e.keySeparator&&!this.options.userDefinedNsSeparator&&!e.nsSeparator&&!qx(t,r,i);if(a&&!o){let l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:Te(s)?[s]:s};let u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(s=u.shift()),t=u.join(i)}return{key:t,namespaces:Te(s)?[s]:s}}translate(t,e,r){if(typeof e!="object"&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),typeof e=="object"&&(e=U({},e)),e||(e={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);let i=e.returnDetails!==void 0?e.returnDetails:this.options.returnDetails,s=e.keySeparator!==void 0?e.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(t[t.length-1],e),l=o[o.length-1],u=e.lng||this.language,c=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode"){if(c){let Y=e.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${Y}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(e)}:`${l}${Y}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(e)}:a}let d=this.resolve(t,e),f=d==null?void 0:d.res,p=(d==null?void 0:d.usedKey)||a,b=(d==null?void 0:d.exactUsedKey)||a,T=Object.prototype.toString.apply(f),_=["[object Number]","[object Function]","[object RegExp]"],O=e.joinArrays!==void 0?e.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,A=!Te(f)&&typeof f!="boolean"&&typeof f!="number";if(E&&f&&A&&_.indexOf(T)<0&&!(Te(O)&&Array.isArray(f))){if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let Y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,f,de(U({},e),{ns:o})):`key '${a} (${this.language})' returned an object instead of string.`;return i?(d.res=Y,d.usedParams=this.getUsedParamsDetails(e),d):Y}if(s){let Y=Array.isArray(f),q=Y?[]:{},se=Y?b:p;for(let H in f)if(Object.prototype.hasOwnProperty.call(f,H)){let Z=`${se}${s}${H}`;q[H]=this.translate(Z,de(U({},e),{joinArrays:!1,ns:o})),q[H]===Z&&(q[H]=f[H])}f=q}}else if(E&&Te(O)&&Array.isArray(f))f=f.join(O),f&&(f=this.extendTranslation(f,t,e,r));else{let Y=!1,q=!1,se=e.count!==void 0&&!Te(e.count),H=ba.hasDefaultValue(e),Z=se?this.pluralResolver.getSuffix(u,e.count,e):"",ye=e.ordinal&&se?this.pluralResolver.getSuffix(u,e.count,{ordinal:!1}):"",we=se&&!e.ordinal&&e.count===0,V=we&&e[`defaultValue${this.options.pluralSeparator}zero`]||e[`defaultValue${Z}`]||e[`defaultValue${ye}`]||e.defaultValue;!this.isValidLookup(f)&&H&&(Y=!0,f=V),this.isValidLookup(f)||(q=!0,f=a);let C=(e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&q?void 0:f,J=H&&V!==f&&this.options.updateMissing;if(q||Y||J){if(this.logger.log(J?"updateKey":"missingKey",u,l,a,J?V:f),s){let y=this.resolve(a,de(U({},e),{keySeparator:!1}));y&&y.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $=[],le=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if(this.options.saveMissingTo==="fallback"&&le&&le[0])for(let y=0;y<le.length;y++)$.push(le[y]);else this.options.saveMissingTo==="all"?$=this.languageUtils.toResolveHierarchy(e.lng||this.language):$.push(e.lng||this.language);let m=(y,v,w)=>{var M;let S=H&&w!==f?w:C;this.options.missingKeyHandler?this.options.missingKeyHandler(y,l,v,S,J,e):(M=this.backendConnector)!=null&&M.saveMissing&&this.backendConnector.saveMissing(y,l,v,S,J,e),this.emit("missingKey",y,l,v,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&se?$.forEach(y=>{let v=this.pluralResolver.getSuffixes(y,e);we&&e[`defaultValue${this.options.pluralSeparator}zero`]&&v.indexOf(`${this.options.pluralSeparator}zero`)<0&&v.push(`${this.options.pluralSeparator}zero`),v.forEach(w=>{m([y],a+w,e[`defaultValue${w}`]||V)})}):m($,a,V))}f=this.extendTranslation(f,t,e,d,r),q&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${a}`),(q||Y)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,Y?f:void 0))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(e),d):f}extendTranslation(t,e,r,i,s){var u,c;var a=this;if((u=this.i18nFormat)!=null&&u.parse)t=this.i18nFormat.parse(t,U(U({},this.options.interpolation.defaultVariables),r),r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(de(U({},r),{interpolation:U(U({},this.options.interpolation),r.interpolation)}));let d=Te(t)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),f;if(d){let b=t.match(this.interpolator.nestingRegexp);f=b&&b.length}let p=r.replace&&!Te(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p=U(U({},this.options.interpolation.defaultVariables),p)),t=this.interpolator.interpolate(t,p,r.lng||this.language||i.usedLng,r),d){let b=t.match(this.interpolator.nestingRegexp),T=b&&b.length;f<T&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var b=arguments.length,T=new Array(b),_=0;_<b;_++)T[_]=arguments[_];return(s==null?void 0:s[0])===T[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${T[0]} in key: ${e[0]}`),null):a.translate(...T,e)},r)),r.interpolation&&this.interpolator.reset()}let o=r.postProcess||this.options.postProcess,l=Te(o)?[o]:o;return t!=null&&(l==null?void 0:l.length)&&r.applyPostProcessor!==!1&&(t=Fb.handle(l,t,e,this.options&&this.options.postProcessPassResolved?U({i18nResolved:de(U({},i),{usedParams:this.getUsedParamsDetails(r)})},r):r,this)),t}resolve(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,s,a,o;return Te(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;let u=this.extractFromKey(l,e),c=u.key;i=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));let f=e.count!==void 0&&!Te(e.count),p=f&&!e.ordinal&&e.count===0,b=e.context!==void 0&&(Te(e.context)||typeof e.context=="number")&&e.context!=="",T=e.lngs?e.lngs:this.languageUtils.toResolveHierarchy(e.lng||this.language,e.fallbackLng);d.forEach(_=>{var O,E;this.isValidLookup(r)||(o=_,!Cb[`${T[0]}-${_}`]&&((O=this.utils)==null?void 0:O.hasLoadedNamespace)&&!((E=this.utils)!=null&&E.hasLoadedNamespace(o))&&(Cb[`${T[0]}-${_}`]=!0,this.logger.warn(`key "${i}" for languages "${T.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),T.forEach(A=>{var se;if(this.isValidLookup(r))return;a=A;let Y=[c];if((se=this.i18nFormat)!=null&&se.addLookupKeys)this.i18nFormat.addLookupKeys(Y,c,A,_,e);else{let H;f&&(H=this.pluralResolver.getSuffix(A,e.count,e));let Z=`${this.options.pluralSeparator}zero`,ye=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(Y.push(c+H),e.ordinal&&H.indexOf(ye)===0&&Y.push(c+H.replace(ye,this.options.pluralSeparator)),p&&Y.push(c+Z)),b){let we=`${c}${this.options.contextSeparator}${e.context}`;Y.push(we),f&&(Y.push(we+H),e.ordinal&&H.indexOf(ye)===0&&Y.push(we+H.replace(ye,this.options.pluralSeparator)),p&&Y.push(we+Z))}}let q;for(;q=Y.pop();)this.isValidLookup(r)||(s=q,r=this.getResource(A,_,q,e))}))})}),{res:r,usedKey:i,exactUsedKey:s,usedLng:a,usedNS:o}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,e,r){var s;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(t,e,r,i):this.resourceStore.getResource(t,e,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Te(t.replace),i=r?t.replace:t;if(r&&typeof t.count!="undefined"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i=U(U({},this.options.interpolation.defaultVariables),i)),!r){i=U({},i);for(let s of e)delete i[s]}return i}static hasDefaultValue(t){let e="defaultValue";for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e===r.substring(0,e.length)&&t[r]!==void 0)return!0;return!1}},Uu=class{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ur.create("languageUtils")}getScriptPartFromCode(t){if(t=Fu(t),!t||t.indexOf("-")<0)return null;let e=t.split("-");return e.length===2||(e.pop(),e[e.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(e.join("-"))}getLanguagePartFromCode(t){if(t=Fu(t),!t||t.indexOf("-")<0)return t;let e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(Te(t)&&t.indexOf("-")>-1){let e;try{e=Intl.getCanonicalLocales(t)[0]}catch(r){}return e&&this.options.lowerCaseLng&&(e=e.toLowerCase()),e||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach(r=>{if(e)return;let i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(e=i)}),!e&&this.options.supportedLngs&&t.forEach(r=>{if(e)return;let i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return e=i;e=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,e){if(!t)return[];if(typeof t=="function"&&(t=t(e)),Te(t)&&(t=[t]),Array.isArray(t))return t;if(!e)return t.default||[];let r=t[e];return r||(r=t[this.getScriptPartFromCode(e)]),r||(r=t[this.formatLanguageCode(e)]),r||(r=t[this.getLanguagePartFromCode(e)]),r||(r=t.default),r||[]}toResolveHierarchy(t,e){let r=this.getFallbackCodes(e||this.options.fallbackLng||[],t),i=[],s=a=>{!a||(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return Te(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):Te(t)&&s(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&s(this.formatLanguageCode(a))}),i}},Mb={zero:0,one:1,two:2,few:3,many:4,other:5},Rb={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})},Ff=class{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=e,this.logger=Ur.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,e){this.rules[t]=e}clearCache(){this.pluralRulesCache={}}getRule(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Fu(t==="dev"?"en":t),i=e.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(r,{type:i})}catch(o){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Rb;if(!t.match(/-|_/))return Rb;let l=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(l,e)}return this.pluralRulesCache[s]=a,a}needsPlural(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,e);return r||(r=this.getRule("dev",e)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${e}${i}`)}getSuffixes(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,e);return r||(r=this.getRule("dev",e)),r?r.resolvedOptions().pluralCategories.sort((i,s)=>Mb[i]-Mb[s]).map(i=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(e)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",e,r))}},Ab=function(n,t,e){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=Ux(n,t,e);return!s&&i&&Te(e)&&(s=If(n,e,r),s===void 0&&(s=If(t,e,r))),s},Pf=n=>n.replace(/\$/g,"$$$$"),Lf=class{constructor(){var e;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ur.create("interpolator"),this.options=t,this.format=((e=t==null?void 0:t.interpolation)==null?void 0:e.format)||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});let{escape:e,escapeValue:r,useRawValueToEscape:i,prefix:s,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:b,nestingSuffixEscaped:T,nestingOptionsSeparator:_,maxReplaces:O,alwaysFormat:E}=t.interpolation;this.escape=e!==void 0?e:jx,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?ma(s):a||"{{",this.suffix=o?ma(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?ma(f):p||ma("$t("),this.nestingSuffix=b?ma(b):T||ma(")"),this.nestingOptionsSeparator=_||",",this.maxReplaces=O||1e3,this.alwaysFormat=E!==void 0?E:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let t=(e,r)=>(e==null?void 0:e.source)===r?(e.lastIndex=0,e):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,e,r,i){var p;let s,a,o,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=b=>{if(b.indexOf(this.formatSeparator)<0){let E=Ab(e,l,b,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(E,void 0,r,de(U(U({},i),e),{interpolationkey:b})):E}let T=b.split(this.formatSeparator),_=T.shift().trim(),O=T.join(this.formatSeparator).trim();return this.format(Ab(e,l,_,this.options.keySeparator,this.options.ignoreJSONStructure),O,r,de(U(U({},i),e),{interpolationkey:_}))};this.resetRegExp();let c=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((p=i==null?void 0:i.interpolation)==null?void 0:p.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:b=>Pf(b)},{regex:this.regexp,safeValue:b=>this.escapeValue?Pf(this.escape(b)):Pf(b)}].forEach(b=>{for(o=0;s=b.regex.exec(t);){let T=s[1].trim();if(a=u(T),a===void 0)if(typeof c=="function"){let O=c(t,s,i);a=Te(O)?O:""}else if(i&&Object.prototype.hasOwnProperty.call(i,T))a="";else if(d){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${T} for interpolating ${t}`),a="";else!Te(a)&&!this.useRawValueToEscape&&(a=Db(a));let _=b.safeValue(a);if(t=t.replace(s[0],_),d?(b.regex.lastIndex+=a.length,b.regex.lastIndex-=s[0].length):b.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),t}nest(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,a,o=(l,u)=>{var T;let c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;let d=l.split(new RegExp(`${c}[ ]*{`)),f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);let p=f.match(/'/g),b=f.match(/"/g);(((T=p==null?void 0:p.length)!=null?T:0)%2===0&&!b||b.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),u&&(a=U(U({},u),a))}catch(_){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,_),`${l}${c}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];a=U({},r),a=a.replace&&!Te(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){let c=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=c.shift(),l=c,u=!0}if(s=e(o.call(this,i[1].trim(),a),a),s&&i[0]===t&&!Te(s))return s;Te(s)||(s=Db(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),u&&(s=l.reduce((c,d)=>this.format(c,d,r.lng,de(U({},r),{interpolationkey:i[1].trim()})),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}},Gx=n=>{let t=n.toLowerCase().trim(),e={};if(n.indexOf("(")>-1){let r=n.split("(");t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?e.currency||(e.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?e.range||(e.range=i.trim()):i.split(";").forEach(a=>{if(a){let[o,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=o.trim();e[c]||(e[c]=u),u==="false"&&(e[c]=!1),u==="true"&&(e[c]=!0),isNaN(u)||(e[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:e}},ha=n=>{let t={};return(e,r,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s=de(U({},s),{[i.interpolationkey]:void 0}));let a=r+JSON.stringify(s),o=t[a];return o||(o=n(Fu(r),i),t[a]=o),o(e)}},Uf=class{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ur.create("formatter"),this.options=t,this.formats={number:ha((e,r)=>{let i=new Intl.NumberFormat(e,U({},r));return s=>i.format(s)}),currency:ha((e,r)=>{let i=new Intl.NumberFormat(e,de(U({},r),{style:"currency"}));return s=>i.format(s)}),datetime:ha((e,r)=>{let i=new Intl.DateTimeFormat(e,U({},r));return s=>i.format(s)}),relativetime:ha((e,r)=>{let i=new Intl.RelativeTimeFormat(e,U({},r));return s=>i.format(s,r.range||"day")}),list:ha((e,r)=>{let i=new Intl.ListFormat(e,U({},r));return s=>i.format(s)})},this.init(t)}init(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=e.interpolation.formatSeparator||","}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=ha(e)}format(t,e,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=e.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(o=>o.indexOf(")")>-1)){let o=s.findIndex(l=>l.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,o)].join(this.formatSeparator)}return s.reduce((o,l)=>{var d;let{formatName:u,formatOptions:c}=Gx(l);if(this.formats[u]){let f=o;try{let p=((d=i==null?void 0:i.formatParams)==null?void 0:d[i.interpolationkey])||{},b=p.locale||p.lng||i.locale||i.lng||r;f=this.formats[u](o,b,U(U(U({},c),i),p))}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${u}`);return o},t)}},Bx=(n,t)=>{n.pending[t]!==void 0&&(delete n.pending[t],n.pendingCount--)},Yf=class extends ya{constructor(t,e,r){var s,a;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=e,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Ur.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(a=(s=this.backend)==null?void 0:s.init)==null||a.call(s,r,i.backend,i)}queueLoad(t,e,r,i){let s={},a={},o={},l={};return t.forEach(u=>{let c=!0;e.forEach(d=>{let f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,c=!1,a[f]===void 0&&(a[f]=!0),s[f]===void 0&&(s[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(o[u]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(t,e,r){let i=t.split("|"),s=i[0],a=i[1];e&&this.emit("failedLoading",s,a,e),!e&&r&&this.store.addResourceBundle(s,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=e?-1:2,e&&r&&(this.state[t]=0);let o={};this.queue.forEach(l=>{Lx(l.loaded,[s],a),Bx(l,t),e&&l.errors.push(e),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});let c=l.loaded[u];c.length&&c.forEach(d=>{o[u][d]===void 0&&(o[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(t,e,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:e,fcName:r,tried:i,wait:s,callback:a});return}this.readingCalls++;let o=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){let d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,e,r,i+1,s*2,a)},s);return}a(u,c)},l=this.backend[r].bind(this.backend);if(l.length===2){try{let u=l(t,e);u&&typeof u.then=="function"?u.then(c=>o(null,c)).catch(o):o(null,u)}catch(u){o(u)}return}return l(t,e,o)}prepareLoading(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Te(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Te(e)&&(e=[e]);let s=this.queueLoad(t,e,r,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(t,e,r){this.prepareLoading(t,e,{},r)}reload(t,e,r){this.prepareLoading(t,e,{reload:!0},r)}loadOne(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=t.split("|"),i=r[0],s=r[1];this.read(i,s,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${e}loading namespace ${s} for language ${i} failed`,a),!a&&o&&this.logger.log(`${e}loaded namespace ${s} for language ${i}`,o),this.loaded(t,a,o)})}saveMissing(t,e,r,i,s){var l,u,c,d,f;let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(((u=(l=this.services)==null?void 0:l.utils)==null?void 0:u.hasLoadedNamespace)&&!((d=(c=this.services)==null?void 0:c.utils)!=null&&d.hasLoadedNamespace(e))){this.logger.warn(`did not save key "${r}" as the namespace "${e}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){let p=de(U({},a),{isUpdate:s}),b=this.backend.create.bind(this.backend);if(b.length<6)try{let T;b.length===5?T=b(t,e,r,i,p):T=b(t,e,r,i),T&&typeof T.then=="function"?T.then(_=>o(null,_)).catch(o):o(null,T)}catch(T){o(T)}else b(t,e,r,i,o,p)}!t||!t[0]||this.store.addResource(t[0],e,r,i)}}},Pb=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let t={};if(typeof n[1]=="object"&&(t=n[1]),Te(n[1])&&(t.defaultValue=n[1]),Te(n[2])&&(t.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){let e=n[3]||n[2];Object.keys(e).forEach(r=>{t[r]=e[r]})}return t},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Nb=n=>{var t,e;return Te(n.ns)&&(n.ns=[n.ns]),Te(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Te(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((e=(t=n.supportedLngs)==null?void 0:t.indexOf)==null?void 0:e.call(t,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},Nu=()=>{},Vx=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{typeof n[e]=="function"&&(n[e]=n[e].bind(n))})},hs=class extends ya{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Nb(t),this.services={},this.logger=Ur,this.modules={external:[]},Vx(this),e&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,e),this;setTimeout(()=>{this.init(t,e)},0)}}init(){var t=this;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof e=="function"&&(r=e,e={}),e.defaultNS==null&&e.ns&&(Te(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));let i=Pb();this.options=U(U(U({},i),this.options),Nb(e)),this.options.interpolation=U(U({},i.interpolation),this.options.interpolation),e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);let s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Ur.init(s(this.modules.logger),this.options):Ur.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Uf;let d=new Uu(this.options);this.store=new Lu(this.options.resources,this.options);let f=this.services;f.logger=Ur,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new Ff(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=s(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Lf(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Yf(s(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var b=arguments.length,T=new Array(b>1?b-1:0),_=1;_<b;_++)T[_-1]=arguments[_];t.emit(p,...T)}),this.modules.languageDetector&&(f.languageDetector=s(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=s(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new ba(this.services,this.options),this.translator.on("*",function(p){for(var b=arguments.length,T=new Array(b>1?b-1:0),_=1;_<b;_++)T[_-1]=arguments[_];t.emit(p,...T)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Nu),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});let l=Ho(),u=()=>{let c=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),l}loadResources(t){var s,a;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Nu,i=Te(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();let o=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(d=>{d!=="cimode"&&o.indexOf(d)<0&&o.push(d)})};i?l(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>l(c)),(a=(s=this.options.preload)==null?void 0:s.forEach)==null||a.call(s,u=>l(u)),this.services.backendConnector.load(o,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,e,r){let i=Ho();return typeof t=="function"&&(r=t,t=void 0),typeof e=="function"&&(r=e,e=void 0),t||(t=this.languages),e||(e=this.options.ns),r||(r=Nu),this.services.backendConnector.reload(t,e,s=>{i.resolve(),r(s)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Fb.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let e=0;e<this.languages.length;e++){let r=this.languages[e];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,e){var r=this;this.isLanguageChangingTo=t;let i=Ho();this.emit("languageChanging",t);let s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,u)=>{u?(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),e&&e(l,function(){return r.t(...arguments)})},o=l=>{var c,d;!t&&!l&&this.services.languageDetector&&(l=[]);let u=Te(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),(d=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||d.call(c,u)),this.loadResources(u,f=>{a(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),i}getFixedT(t,e,r){var i=this;let s=function(a,o){let l;if(typeof o!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d<u;d++)c[d-2]=arguments[d];l=i.options.overloadTranslationOptionHandler([a,o].concat(c))}else l=U({},o);l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||s.keyPrefix);let f=i.options.keySeparator||".",p;return l.keyPrefix&&Array.isArray(a)?p=a.map(b=>`${l.keyPrefix}${f}${b}`):p=l.keyPrefix?`${l.keyPrefix}${f}${a}`:a,i.t(p,l)};return Te(t)?s.lng=t:s.lngs=t,s.ns=e,s.keyPrefix=r,s}t(){var i;for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return(i=this.translator)==null?void 0:i.translate(...e)}exists(){var i;for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return(i=this.translator)==null?void 0:i.exists(...e)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let r=e.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;let a=(o,l)=>{let u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(e.precheck){let o=e.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(s,t)))}loadNamespaces(t,e){let r=Ho();return this.options.ns?(Te(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),e&&e(i)}),r):(e&&e(),Promise.resolve())}loadLanguages(t,e){let r=Ho();Te(t)&&(t=[t]);let i=this.options.preload||[],s=t.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=i.concat(s),this.loadResources(a=>{r.resolve(),e&&e(a)}),r):(e&&e(),Promise.resolve())}dir(t){var i,s;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";let e=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((s=this.services)==null?void 0:s.languageUtils)||new Uu(Pb());return e.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new hs(t,e)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Nu,r=t.forkResourceStore;r&&delete t.forkResourceStore;let i=de(U(U({},this.options),t),{isClone:!0}),s=new hs(i);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(o=>{s[o]=this[o]}),s.services=U({},this.services),s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r){let o=Object.keys(this.store.data).reduce((l,u)=>(l[u]=U({},this.store.data[u]),Object.keys(l[u]).reduce((c,d)=>(c[d]=U({},l[u][d]),c),{})),{});s.store=new Lu(o,i),s.services.resourceStore=s.store}return s.translator=new ba(s.services,i),s.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];s.emit(o,...u)}),s.init(i,e),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},yt=hs.createInstance();yt.createInstance=hs.createInstance;VY=yt.createInstance,zY=yt.dir,KY=yt.init,QY=yt.loadResources,XY=yt.reloadResources,ZY=yt.use,JY=yt.changeLanguage,ej=yt.getFixedT,tj=yt.t,nj=yt.exists,rj=yt.setDefaultNamespace,ij=yt.hasLoadedNamespace,sj=yt.loadNamespaces,aj=yt.loadLanguages});var Yb,Ub=ee(()=>{Yb={main:{loadingPlugin:"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043F\u043B\u0430\u0433\u0456\u043D\u0430: {{name}} v{{version}}",unloadingPlugin:"\u0412\u044B\u0433\u0440\u0443\u0437\u043A\u0430 \u043F\u043B\u0430\u0433\u0456\u043D\u0430: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"\u041A\u0430\u043B\u0456 \u045E\u043A\u043B\u044E\u0447\u0430\u043D\u0430, \u0433\u044D\u0442\u044B \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0437\u0435 \u0434\u0430\u0441\u0442\u0443\u043F\u043D\u044B \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u043A\u0430\u043C\u0430\u043D\u0434\u044B, \u0442\u0430\u043A \u0448\u0442\u043E \u0432\u044B \u0437\u043C\u043E\u0436\u0430\u0446\u0435 \u043F\u0440\u044B\u0437\u043D\u0430\u0447\u044B\u0446\u044C \u0433\u0430\u0440\u0430\u0447\u0443\u044E \u043A\u043B\u0430\u0432\u0456\u0448\u0443 \u0456 \u043F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u0430\u0446\u044C \u0441\u0442\u0430\u0442\u0443\u0441 \u0437 \u044F\u0435 \u0434\u0430\u043F\u0430\u043C\u043E\u0433\u0430\u0439.",name:"\u0414\u0430\u0441\u0442\u0443\u043F\u043D\u044B \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u043A\u0430\u043C\u0430\u043D\u0434\u044B"},editNextStatusSymbol:{description:"\u041F\u0440\u044B \u043D\u0430\u0446\u0456\u0441\u043A\u0443 \u0433\u044D\u0442\u0430 \u0441\u0456\u043C\u0432\u0430\u043B, \u044F\u043A\u0456 \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043D\u044B \u0434\u0430\u043B\u0435\u0439.",name:"\u0421\u0456\u043C\u0432\u0430\u043B \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0433\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u044B"},editStatusName:{description:"\u0413\u044D\u0442\u0430 \u0437\u0440\u0430\u0437\u0443\u043C\u0435\u043B\u0430\u0435 \u0456\u043C\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u044B.",name:"\u0406\u043C\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u044B"},editStatusSymbol:{description:"\u0413\u044D\u0442\u0430 \u0441\u0456\u043C\u0432\u0430\u043B \u043F\u0430\u043C\u0456\u0436 \u043A\u0432\u0430\u0434\u0440\u0430\u0442\u043D\u044B\u043C\u0456 \u0434\u0443\u0436\u043A\u0430\u043C\u0456. (\u042F\u0433\u043E \u043C\u043E\u0436\u043D\u0430 \u0440\u044D\u0434\u0430\u0433\u0430\u0432\u0430\u0446\u044C \u0442\u043E\u043B\u044C\u043A\u0456 \u0434\u043B\u044F \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E, \u0430 \u043D\u0435 \u0434\u043B\u044F \u0430\u0441\u043D\u043E\u045E\u043D\u044B\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E.)",name:"\u0421\u0456\u043C\u0432\u0430\u043B \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u044B"},editStatusType:{description:"\u041A\u0456\u0440\u0443\u0439\u0446\u0435 \u0442\u044B\u043C, \u044F\u043A \u0441\u0442\u0430\u0442\u0443\u0441 \u043F\u0430\u0432\u043E\u0434\u0437\u0456\u0446\u044C \u0441\u044F\u0431\u0435 \u043F\u0440\u044B \u043F\u043E\u0448\u0443\u043A\u0443 \u0456 \u043F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0456.",name:"\u0422\u044B\u043F \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u044B"},fixErrorsBeforeSaving:"\u0412\u044B\u043F\u0440\u0430\u045E\u0446\u0435 \u043F\u0430\u043C\u044B\u043B\u043A\u0456 \u043F\u0435\u0440\u0430\u0434 \u0437\u0430\u0445\u0430\u0432\u0430\u043D\u043D\u0435\u043C."}},reports:{statusRegistry:{about:{createdBy:"\u0413\u044D\u0442\u044B \u0444\u0430\u0439\u043B \u0431\u044B\u045E \u0441\u0442\u0432\u043E\u0440\u0430\u043D\u044B \u043F\u043B\u0430\u0433\u0456\u043D\u0430\u043C Obsidian Tasks (\u0432\u0435\u0440\u0441\u0456\u044F {{version}}) \u0434\u043B\u044F \u0432\u0456\u0437\u0443\u0430\u043B\u0456\u0437\u0430\u0446\u044B\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E \u0437\u0430\u0434\u0430\u0447 \u0443 \u0433\u044D\u0442\u044B\u043C \u0441\u0445\u043E\u0432\u0456\u0448\u0447\u044B.",deleteFileAnyTime:"\u0412\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u0432\u044B\u0434\u0430\u043B\u0456\u0446\u044C \u0433\u044D\u0442\u044B \u0444\u0430\u0439\u043B \u0443 \u043B\u044E\u0431\u044B \u043C\u043E\u043C\u0430\u043D\u0442.",title:"\u041F\u0440\u0430 \u0433\u044D\u0442\u044B \u0444\u0430\u0439\u043B",updateReport:{line1:"\u041A\u0430\u043B\u0456 \u0432\u044B \u0437\u043C\u044F\u043D\u044F\u0435\u0446\u0435 \u043D\u0430\u043B\u0430\u0434\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u0443 Tasks, \u0432\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u0430\u0442\u0440\u044B\u043C\u0430\u0446\u044C \u0430\u0431\u043D\u043E\u045E\u043B\u0435\u043D\u044B \u0441\u043F\u0440\u0430\u0432\u0430\u0437\u0434\u0430\u0447\u0443:",line2:"\u041F\u0435\u0440\u0430\u0439\u0448\u043E\u045E\u0448\u044B \u045E `\u041D\u0430\u043B\u0430\u0434\u044B` -> `Tasks`.",line3:"\u041D\u0430\u0446\u0456\u0441\u043D\u0443\u045E\u0448\u044B \u043D\u0430 `\u041F\u0440\u0430\u0433\u043B\u044F\u0434\u0437\u0435\u0446\u044C \u0456 \u043F\u0440\u0430\u0432\u0435\u0440\u044B\u0446\u044C \u0432\u0430\u0448\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u044B`."}},columnHeadings:{nextStatusSymbol:"\u0421\u0456\u043C\u0432\u0430\u043B \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0433\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443",problems:"\u041F\u0440\u0430\u0431\u043B\u0435\u043C\u044B (\u043A\u0430\u043B\u0456 \u0451\u0441\u0446\u044C)",statusName:"\u0406\u043C\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0443",statusSymbol:"\u0421\u0456\u043C\u0432\u0430\u043B \u0441\u0442\u0430\u0442\u0443\u0441\u0443",statusType:"\u0422\u044B\u043F \u0441\u0442\u0430\u0442\u0443\u0441\u0443"},loadedSettings:{settingsActuallyUsed:"\u0413\u044D\u0442\u0430 \u043D\u0430\u043B\u0430\u0434\u044B, \u044F\u043A\u0456\u044F \u0441\u0430\u043F\u0440\u0430\u045E\u0434\u044B \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u044E\u0446\u0446\u0430 Tasks.",switchToLivePreview:"\u041F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u044B\u0446\u0435\u0441\u044F \u045E \u0440\u044D\u0436\u044B\u043C \u043F\u0430\u043F\u044F\u0440\u044D\u0434\u043D\u044F\u0433\u0430 \u043F\u0440\u0430\u0433\u043B\u044F\u0434\u0443 \u045E \u0440\u044D\u0430\u043B\u044C\u043D\u044B\u043C \u0447\u0430\u0441\u0435 \u0430\u0431\u043E \u0440\u044D\u0436\u044B\u043C \u0447\u044B\u0442\u0430\u043D\u043D\u044F, \u043A\u0430\u0431 \u0443\u0431\u0430\u0447\u044B\u0446\u044C \u0434\u044B\u044F\u0433\u0440\u0430\u043C\u0443.",title:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u043D\u044B\u044F \u043D\u0430\u043B\u0430\u0434\u044B"},messages:{cannotFindNextStatus:"\u041D\u0435\u0447\u0430\u043A\u0430\u043D\u0430\u044F \u043F\u0430\u043C\u044B\u043B\u043A\u0430 \u043F\u0440\u044B \u043F\u043E\u0448\u0443\u043A\u0443 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0433\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443.",duplicateSymbol:"\u0414\u0443\u0431\u043B\u0456\u043A\u0430\u0442 \u0441\u0456\u043C\u0432\u0430\u043B\u0430 '{{symbol}}': \u0433\u044D\u0442\u044B \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0437\u0435 \u043F\u0440\u0430\u0456\u0433\u043D\u0430\u0440\u0430\u0432\u0430\u043D\u044B.",emptySymbol:"\u041F\u0443\u0441\u0442\u044B \u0441\u0456\u043C\u0432\u0430\u043B: \u0433\u044D\u0442\u044B \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0437\u0435 \u043F\u0440\u0430\u0456\u0433\u043D\u0430\u0440\u0430\u0432\u0430\u043D\u044B.",nextSymbolUnknown:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u044B \u0441\u0456\u043C\u0432\u0430\u043B {{symbol}} \u043D\u0435\u0432\u044F\u0434\u043E\u043C\u044B: \u0441\u0442\u0432\u0430\u0440\u044B\u0446\u0435 \u0441\u0442\u0430\u0442\u0443\u0441 \u0437 \u0441\u0456\u043C\u0432\u0430\u043B\u0430\u043C {{symbol}}.",notConventionalType:"\u0414\u043B\u044F \u0456\u043D\u0444\u0430\u0440\u043C\u0430\u0446\u044B\u0456, \u0437\u0432\u044B\u0447\u0430\u0439\u043D\u044B \u0442\u044B\u043F \u0434\u043B\u044F \u0441\u0456\u043C\u0432\u0430\u043B\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 {{symbol}} - {{type}}: \u0432\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u043F\u0435\u0440\u0430\u0433\u043B\u0435\u0434\u0437\u0435\u0446\u044C \u0433\u044D\u0442\u044B \u0442\u044B\u043F.",wrongTypeAfterDone:{line1:"\u041F\u0430\u0441\u043B\u044F \u0433\u044D\u0442\u0430\u0433\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 `DONE` \u0456\u0434\u0437\u0435 {{nextType}}, \u0430 \u043D\u0435 `TODO` \u0430\u0431\u043E `IN_PROGRESS`.",line2:"\u041F\u0440\u044B \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043D\u043D\u0456 \u0434\u043B\u044F \u0437\u0430\u0432\u044F\u0440\u0448\u044D\u043D\u043D\u044F \u043F\u0435\u0440\u044B\u044F\u0434\u044B\u0447\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u044B \u044F\u043D\u0430 \u0437\u0430\u043C\u0435\u0441\u0442 \u0433\u044D\u0442\u0430\u0433\u0430 \u0431\u0443\u0434\u0437\u0435 \u0441\u0443\u043F\u0440\u0430\u0432\u0430\u0434\u0436\u0430\u0446\u0446\u0430 `TODO` \u0430\u0431\u043E `IN_PROGRESS`, \u043A\u0430\u0431 \u0433\u0430\u0440\u0430\u043D\u0442\u0430\u0432\u0430\u0446\u044C, \u0448\u0442\u043E \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u044F \u0437\u0430\u0434\u0430\u0447\u0430 \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0435 \u0444\u0456\u043B\u044C\u0442\u0440\u0443 `\u043D\u0435 \u0432\u044B\u043A\u0430\u043D\u0430\u043D\u0430`.",line3:"\u0413\u043B\u044F\u0434\u0437\u0456\u0446\u0435 [Recurring Tasks and Custom Statuses]({{helpURL}})."}},statusSettings:{comment:{line1:"\u041F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u044B\u0446\u0435\u0441\u044F \u045E \u0440\u044D\u0436\u044B\u043C \u043F\u0430\u043F\u044F\u0440\u044D\u0434\u043D\u044F\u0433\u0430 \u043F\u0440\u0430\u0433\u043B\u044F\u0434\u0443 \u045E \u0440\u044D\u0430\u043B\u044C\u043D\u044B\u043C \u0447\u0430\u0441\u0435 \u0430\u0431\u043E \u0440\u044D\u0436\u044B\u043C \u0447\u044B\u0442\u0430\u043D\u043D\u044F, \u043A\u0430\u0431 \u0443\u0431\u0430\u0447\u044B\u0446\u044C \u0442\u0430\u0431\u043B\u0456\u0446\u0443.",line2:"\u041A\u0430\u043B\u0456 \u045E \u0456\u043C\u0451\u043D\u0430\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E \u0451\u0441\u0446\u044C \u044F\u043A\u0456\u044F-\u043D\u0435\u0431\u0443\u0434\u0437\u044C \u0441\u0456\u043C\u0432\u0430\u043B\u044B \u0444\u0430\u0440\u043C\u0430\u0442\u0430\u0432\u0430\u043D\u043D\u044F Markdown, \u0442\u0430\u043A\u0456\u044F \u044F\u043A '*' \u0430\u0431\u043E '_',",line3:"Obsidian \u043C\u043E\u0436\u0430 \u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430 \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u0446\u044C \u0442\u0430\u0431\u043B\u0456\u0446\u0443 \u0442\u043E\u043B\u044C\u043A\u0456 \u045E \u0440\u044D\u0436\u044B\u043C\u0435 \u0447\u044B\u0442\u0430\u043D\u043D\u044F."},theseAreStatusValues:"\u0413\u044D\u0442\u0430 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u045E \u0440\u0430\u0437\u0434\u0437\u0435\u043B\u0430\u0445 Core \u0456 Custom statuses.",title:"\u041D\u0430\u043B\u0430\u0434\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u0443"}}},settings:{autoSuggest:{heading:"\u0410\u045E\u0442\u0430\u043F\u0430\u0434\u043A\u0430\u0437\u043A\u0430",maxSuggestions:{description:"\u041A\u043E\u043B\u044C\u043A\u0456 \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u045E \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C \u043F\u0430\u043A\u0430\u0437\u0430\u043D\u0430 \u043F\u0440\u044B \u0437'\u044F\u045E\u043B\u0435\u043D\u043D\u0456 \u043C\u0435\u043D\u044E \u0430\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u044B\u0445 \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u045E (\u0443\u043A\u043B\u044E\u0447\u0430\u044E\u0447\u044B \u043E\u043F\u0446\u044B\u044E \xAB\u23CE\xBB).",name:"\u041C\u0430\u043A\u0441\u0456\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u043A\u043E\u043B\u044C\u043A\u0430\u0441\u0446\u044C \u0430\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u044B\u0445 \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u045E \u0434\u043B\u044F \u043F\u0430\u043A\u0430\u0437\u0443"},minLength:{description:"\u041A\u0430\u043B\u0456 \u0432\u044B\u0448\u044D\u0439 \u0437\u0430 0, \u0430\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u0430\u044F \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u0432\u0430 \u0431\u0443\u0434\u0437\u0435 \u0441\u043F\u0440\u0430\u0446\u043E\u045E\u0432\u0430\u0446\u044C \u0442\u043E\u043B\u044C\u043A\u0456 \u0442\u0430\u0434\u044B, \u043A\u0430\u043B\u0456 \u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u0435\u0446\u0446\u0430 \u043F\u0430\u0447\u0430\u0442\u0430\u043A \u043B\u044E\u0431\u043E\u0433\u0430 \u043F\u0430\u0434\u0442\u0440\u044B\u043C\u043E\u045E\u0432\u0430\u043D\u0430\u0433\u0430 \u043A\u043B\u044E\u0447\u0430\u0432\u043E\u0433\u0430 \u0441\u043B\u043E\u0432\u0430.",name:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0434\u0430\u045E\u0436\u044B\u043D\u044F \u0441\u0443\u043F\u0430\u0434\u0437\u0435\u043D\u043D\u044F \u0434\u043B\u044F \u0430\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u0430\u0439 \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u0432\u044B"},toggle:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0430\u0434\u043A\u0440\u044B\u0435 \u0456\u043D\u0442\u044D\u043B\u0435\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u0430\u0435 \u043C\u0435\u043D\u044E \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u045E \u043F\u0440\u044B \u045E\u0432\u043E\u0434\u0437\u0435 \u0442\u044D\u043A\u0441\u0442\u0443 \u045E\u043D\u0443\u0442\u0440\u044B \u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u0430\u0439 \u043B\u0456\u043D\u0456\u0456 \u0437\u0430\u0434\u0430\u0447\u044B.",name:"\u0410\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u0430 \u043F\u0440\u0430\u043F\u0430\u043D\u043E\u045E\u0432\u0430\u0446\u044C \u0437\u043C\u0435\u0441\u0442 \u0437\u0430\u0434\u0430\u0447\u044B"}},changeRequiresRestart:"\u0417\u043C\u0435\u043D\u0430 \u043B\u044E\u0431\u044B\u0445 \u043D\u0430\u043B\u0430\u0434 \u043F\u0430\u0442\u0440\u0430\u0431\u0443\u0435 \u043F\u0435\u0440\u0430\u0437\u0430\u043F\u0443\u0441\u043A\u0443 Obsidian.",dates:{cancelledDate:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0434\u0430\u0434\u0430\u0441\u0446\u044C \u0447\u0430\u0441\u043E\u0432\u0443\u044E \u043F\u0430\u0437\u043D\u0430\u043A\u0443 \u274C YYYY-MM-DD \u045E \u043A\u0430\u043D\u0446\u044B, \u043A\u0430\u043B\u0456 \u0437\u0430\u0434\u0430\u0447\u0430 \u043F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u0430\u0435\u0446\u0446\u0430 \u045E \u0430\u0434\u043C\u0435\u043D\u0435\u043D\u044B \u0441\u0442\u0430\u043D.",name:"\u0423\u0441\u0442\u0430\u043D\u0430\u0432\u0456\u0446\u044C \u0434\u0430\u0442\u0443 \u0430\u0434\u043C\u0435\u043D\u044B \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u0430\u0439 \u0430\u0434\u043C\u0435\u043D\u0435\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u044B"},createdDate:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0434\u0430\u0434\u0430\u0441\u0446\u044C \u0447\u0430\u0441\u043E\u0432\u0443\u044E \u043F\u0430\u0437\u043D\u0430\u043A\u0443 \u2795 YYYY-MM-DD \u043F\u0435\u0440\u0430\u0434 \u0456\u043D\u0448\u044B\u043C\u0456 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u044F\u043C\u0456 \u0434\u0430\u0442\u044B, \u043A\u0430\u043B\u0456 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0442\u0432\u0430\u0440\u0430\u0435\u0446\u0446\u0430 \u0437 \u0434\u0430\u043F\u0430\u043C\u043E\u0433\u0430\u0439 \xAB\u0421\u0442\u0432\u0430\u0440\u044B\u0446\u044C \u0430\u0431\u043E \u0440\u044D\u0434\u0430\u0433\u0430\u0432\u0430\u0446\u044C \u0437\u0430\u0434\u0430\u0447\u0443\xBB \u0430\u0431\u043E \u043F\u0440\u044B \u0437\u0430\u0432\u044F\u0440\u0448\u044D\u043D\u043D\u0456 \u043F\u0435\u0440\u044B\u044F\u0434\u044B\u0447\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u044B.",name:"\u0423\u0441\u0442\u0430\u043D\u0430\u0432\u0456\u0446\u044C \u0434\u0430\u0442\u0443 \u0441\u0442\u0432\u0430\u0440\u044D\u043D\u043D\u044F \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u0430\u0439 \u0434\u0430\u0434\u0430\u0434\u0437\u0435\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u044B"},doneDate:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0434\u0430\u0434\u0430\u0441\u0446\u044C \u0447\u0430\u0441\u043E\u0432\u0443\u044E \u043F\u0430\u0437\u043D\u0430\u043A\u0443 \u2705 YYYY-MM-DD \u045E \u043A\u0430\u043D\u0446\u044B, \u043A\u0430\u043B\u0456 \u0437\u0430\u0434\u0430\u0447\u0430 \u043F\u0435\u0440\u0430\u043A\u043B\u044E\u0447\u0430\u0435\u0446\u0446\u0430 \u045E \u0432\u044B\u043A\u0430\u043D\u0430\u043D\u044B \u0441\u0442\u0430\u043D.",name:"\u0423\u0441\u0442\u0430\u043D\u0430\u0432\u0456\u0446\u044C \u0434\u0430\u0442\u0443 \u0432\u044B\u043A\u0430\u043D\u0430\u043D\u043D\u044F \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u0430\u0439 \u0432\u044B\u043A\u0430\u043D\u0430\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u044B"},heading:"\u0414\u0430\u0442\u044B"},datesFromFileNames:{heading:"\u0414\u0430\u0442\u044B \u0437 \u0456\u043C\u0451\u043D\u0430\u045E \u0444\u0430\u0439\u043B\u0430\u045E",scheduledDate:{extraFormat:{description:{line1:"\u0414\u0430\u0434\u0430\u0442\u043A\u043E\u0432\u044B \u0444\u0430\u0440\u043C\u0430\u0442 \u0434\u0430\u0442\u044B, \u044F\u043A\u0456 \u043F\u043B\u0430\u0433\u0456\u043D Tasks \u0431\u0443\u0434\u0437\u0435 \u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u0432\u0430\u0446\u044C \u043F\u0440\u044B \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043D\u043D\u0456 \u0456\u043C\u044F \u0444\u0430\u0439\u043B\u0430 \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u0430\u0439 \u0434\u0430\u0442\u044B \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0434\u0430\u0442\u044B.",line2:"\u0414\u0430\u0432\u0435\u0434\u043A\u0430 \u043F\u0430 \u0441\u0456\u043D\u0442\u0430\u043A\u0441\u0456\u0441\u0435"},name:"\u0414\u0430\u0434\u0430\u0442\u043A\u043E\u0432\u044B \u0444\u0430\u0440\u043C\u0430\u0442 \u0434\u0430\u0442\u044B \u0456\u043C\u044F \u0444\u0430\u0439\u043B\u0430 \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u0430\u0439 \u0434\u0430\u0442\u044B \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0434\u0430\u0442\u044B",placeholder:"\u043F\u0440\u044B\u043A\u043B\u0430\u0434: MMM DD YYYY"},folders:{description:"\u041F\u0430\u043A\u0456\u043D\u044C\u0446\u0435 \u043F\u0443\u0441\u0442\u044B\u043C, \u043A\u0430\u043B\u0456 \u0445\u043E\u0447\u0430\u0446\u0435 \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u0446\u044C \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u044B\u044F \u0434\u0430\u0442\u044B \u043F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456 \u043F\u0430\u045E\u0441\u044E\u043B\u044C, \u0430\u0431\u043E \u045E\u0432\u044F\u0434\u0437\u0456\u0446\u0435 \u0441\u043F\u0456\u0441 \u0442\u044D\u0447\u0430\u043A, \u043F\u0430\u0434\u0437\u0435\u043B\u0435\u043D\u044B\u0445 \u043A\u043E\u0441\u043A\u0430\u043C\u0456.",name:"\u0422\u044D\u0447\u043A\u0456 \u0437 \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u044B\u043C\u0456 \u0434\u0430\u0442\u0430\u043C\u0456 \u043F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456"},toggle:{description:{line1:"\u042D\u043A\u0430\u043D\u043E\u043C\u0446\u0435 \u0447\u0430\u0441, \u0443\u0432\u043E\u0434\u0437\u044F\u0447\u044B \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u044B\u044F (\u23F3) \u0434\u0430\u0442\u044B.",line2:"\u041A\u0430\u043B\u0456 \u0433\u044D\u0442\u0430\u044F \u043E\u043F\u0446\u044B\u044F \u045E\u043A\u043B\u044E\u0447\u0430\u043D\u0430, \u043B\u044E\u0431\u044B\u043C \u0437\u0430\u0434\u0430\u0447\u0430\u043C \u0431\u0435\u0437 \u0434\u0430\u0442\u044B \u0431\u0443\u0434\u0437\u0435 \u043F\u0440\u044B\u0437\u043D\u0430\u0447\u0430\u043D\u0430 \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u0430\u044F \u0434\u0430\u0442\u0430 \u043F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456, \u0432\u044B\u043D\u044F\u0442\u0430\u044F \u0437 \u0456\u0445 \u0456\u043C\u044F \u0444\u0430\u0439\u043B\u0430.",line3:"\u041F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456 \u043F\u043B\u0430\u0433\u0456\u043D Tasks \u0431\u0443\u0434\u0437\u0435 \u0441\u0443\u043F\u0430\u0441\u0442\u0430\u045E\u043B\u044F\u0446\u044C \u0444\u0430\u0440\u043C\u0430\u0442\u044B \u0434\u0430\u0442\u044B <code>YYYY-MM-DD</code> \u0456 <code>YYYYMMDD</code>.",line4:"\u0417\u0430\u0434\u0430\u0447\u044B \u0431\u0435\u0437 \u0434\u0430\u0442\u044B \u043D\u0435 \u043C\u0430\u044E\u0446\u044C \u043D\u0456\u0432\u043E\u0434\u043D\u0430\u0439 \u0437 \u0434\u0430\u0442: Due (\u{1F4C5} ), Scheduled (\u23F3) \u0456 Start (\u{1F6EB})."},name:"\u0412\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u0446\u044C \u0456\u043C\u044F \u0444\u0430\u0439\u043B\u0430 \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u0437\u0430\u043F\u043B\u0430\u043D\u0430\u0432\u0430\u043D\u0430\u0439 \u0434\u0430\u0442\u044B \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0434\u0430\u0442\u044B"}}},dialogs:{accessKeys:{description:"\u041A\u0430\u043B\u0456 \u043A\u043B\u0430\u0432\u0456\u0448\u044B \u0434\u043E\u0441\u0442\u0443\u043F\u0443 (\u043A\u043B\u0430\u0432\u0456\u044F\u0442\u0443\u0440\u043D\u044B\u044F \u0441\u043A\u0430\u0440\u0430\u0447\u044D\u043D\u043D\u0456) \u0434\u043B\u044F \u0440\u043E\u0437\u043D\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E \u043A\u0456\u0440\u0430\u0432\u0430\u043D\u043D\u044F \u045E \u0434\u044B\u044F\u043B\u043E\u0433\u0430\u0432\u044B\u0445 \u0432\u043E\u043A\u043D\u0430\u0445 \u043A\u0430\u043D\u0444\u043B\u0456\u043A\u0442\u0443\u044E\u0446\u044C \u0437 \u0441\u0456\u0441\u0442\u044D\u043C\u043D\u044B\u043C\u0456 \u043A\u043B\u0430\u0432\u0456\u044F\u0442\u0443\u0440\u043D\u044B\u043C\u0456 \u0441\u043A\u0430\u0440\u0430\u0447\u044D\u043D\u043D\u044F\u043C\u0456 \u0430\u0431\u043E \u0444\u0443\u043D\u043A\u0446\u044B\u044F\u043C\u0456 \u0434\u0430\u043F\u0430\u043C\u043E\u0436\u043D\u0430\u0439 \u0442\u044D\u0445\u043D\u0430\u043B\u043E\u0433\u0456\u0456, \u044F\u043A\u0456\u044F \u0432\u0430\u0436\u043D\u044B\u044F \u0434\u043B\u044F \u0432\u0430\u0441, \u0432\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u0430\u0434\u043A\u043B\u044E\u0447\u044B\u0446\u044C \u0456\u0445 \u0442\u0443\u0442.",name:"\u0417\u0430\u0431\u044F\u0441\u043F\u0435\u0447\u044B\u0446\u044C \u043A\u043B\u0430\u0432\u0456\u0448\u044B \u0434\u043E\u0441\u0442\u0443\u043F\u0443 \u045E \u0434\u044B\u044F\u043B\u043E\u0433\u0430\u0445"},heading:"\u0414\u044B\u044F\u043B\u043E\u0433\u0456"},format:{description:{line1:"\u0424\u0430\u0440\u043C\u0430\u0442, \u044F\u043A\u0456 Tasks \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u0435 \u0434\u043B\u044F \u0447\u044B\u0442\u0430\u043D\u043D\u044F \u0456 \u0437\u0430\u043F\u0456\u0441\u0443 \u0437\u0430\u0434\u0430\u0447.",line2:"<b>\u0412\u0430\u0436\u043D\u0430:</b> Tasks \u0443 \u0446\u044F\u043F\u0435\u0440\u0430\u0448\u043D\u0456 \u0447\u0430\u0441 \u043F\u0430\u0434\u0442\u0440\u044B\u043C\u043B\u0456\u0432\u0430\u0435 \u0442\u043E\u043B\u044C\u043A\u0456 \u0430\u0434\u0437\u0456\u043D \u0444\u0430\u0440\u043C\u0430\u0442 \u0430\u0434\u043D\u0430\u0447\u0430\u0441\u043E\u0432\u0430. \u0412\u044B\u0431\u0430\u0440 Dataview \u0443 \u0446\u044F\u043F\u0435\u0440\u0430\u0448\u043D\u0456 \u0447\u0430\u0441 <b>\u0441\u043F\u044B\u043D\u0456\u0446\u044C \u0447\u044B\u0442\u0430\u043D\u043D\u0435 Tasks \u0441\u0432\u0430\u0456\u0445 \u0443\u043B\u0430\u0441\u043D\u044B\u0445 \u0437\u043D\u0430\u043A\u0430\u045E \u044D\u043C\u043E\u0434\u0437\u0456</b>."},displayName:{dataview:"Dataview",tasksEmojiFormat:"\u0424\u0430\u0440\u043C\u0430\u0442 \u044D\u043C\u043E\u0434\u0437\u0456 Tasks"},name:"\u0424\u0430\u0440\u043C\u0430\u0442 \u0437\u0430\u0434\u0430\u0447\u044B"},globalFilter:{filter:{description:{line1:"\u0420\u044D\u043A\u0430\u043C\u0435\u043D\u0434\u0443\u0435\u0446\u0446\u0430: \u043F\u0430\u043A\u0456\u043D\u044C\u0446\u0435 \u043F\u0443\u0441\u0442\u044B\u043C, \u043A\u0430\u043B\u0456 \u0445\u043E\u0447\u0430\u0446\u0435, \u043A\u0430\u0431 \u0443\u0441\u0435 \u043F\u0443\u043D\u043A\u0442\u044B \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443 \u045E \u0432\u0430\u0448\u044B\u043C \u0441\u0445\u043E\u0432\u0456\u0448\u0447\u044B \u0431\u044B\u043B\u0456 \u0437\u0430\u0434\u0430\u0447\u0430\u043C\u0456, \u044F\u043A\u0456\u043C\u0456 \u043A\u0456\u0440\u0443\u0435 \u0433\u044D\u0442\u044B \u043F\u043B\u0430\u0433\u0456\u043D.",line2:"\u0412\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u0439\u0446\u0435 \u0433\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0444\u0456\u043B\u044C\u0442\u0440, \u043A\u0430\u043B\u0456 \u0432\u044B \u0445\u043E\u0447\u0430\u0446\u0435, \u043A\u0430\u0431 Tasks \u0434\u0437\u0435\u0439\u043D\u0456\u0447\u0430\u045E \u0442\u043E\u043B\u044C\u043A\u0456 \u043D\u0430 \u043F\u0430\u0434\u043C\u043D\u043E\u0441\u0442\u0432\u0430 \u0432\u0430\u0448\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443 \xAB<code>- [ ]</code>\xBB, \u0442\u0430\u043A\u0456\u043C \u0447\u044B\u043D\u0430\u043C, \u043A\u0430\u0431 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443 \u045E\u043A\u043B\u044E\u0447\u0430\u045E \u0443 \u0441\u0432\u0430\u0451 \u0430\u043F\u0456\u0441\u0430\u043D\u043D\u0435 \u0432\u044B\u0437\u043D\u0430\u0447\u0430\u043D\u044B \u0440\u0430\u0434\u043E\u043A, \u043A\u0430\u0431 \u043B\u0456\u0447\u044B\u0446\u0446\u0430 \u0437\u0430\u0434\u0430\u0447\u0430\u0439.",line3:"\u041D\u0430\u043F\u0440\u044B\u043A\u043B\u0430\u0434, \u043A\u0430\u043B\u0456 \u0432\u044B \u045E\u0441\u0442\u0430\u043B\u044E\u0435\u0446\u0435 \u0433\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0444\u0456\u043B\u044C\u0442\u0440 \u043D\u0430 <code>#task</code>, \u043F\u043B\u0430\u0433\u0456\u043D Tasks \u0431\u0443\u0434\u0437\u0435 \u0430\u043F\u0440\u0430\u0446\u043E\u045E\u0432\u0430\u0446\u044C \u0442\u043E\u043B\u044C\u043A\u0456 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443, \u043F\u0430\u0437\u043D\u0430\u0447\u0430\u043D\u044B\u044F <code>#task</code>.",line4:"\u0406\u043D\u0448\u044B\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443 \u0437\u0430\u0441\u0442\u0430\u043D\u0443\u0446\u0446\u0430 \u0437\u0432\u044B\u0447\u0430\u0439\u043D\u044B\u043C\u0456 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u043C\u0456 \u043A\u0430\u043D\u0442\u0440\u043E\u043B\u044C\u043D\u0430\u0433\u0430 \u0441\u043F\u0456\u0441\u0443 \u0456 \u043D\u0435 \u0431\u0443\u0434\u0443\u0446\u044C \u0437'\u044F\u045E\u043B\u044F\u0446\u0446\u0430 \u045E \u0437\u0430\u043F\u044B\u0442\u0430\u0445, \u0456 \u0434\u043B\u044F \u0456\u0445 \u043D\u0435 \u0431\u0443\u0434\u0437\u0435 \u045E\u0441\u0442\u0430\u043D\u043E\u045E\u043B\u0435\u043D\u0430 \u0434\u0430\u0442\u0430 \u0432\u044B\u043A\u0430\u043D\u0430\u043D\u043D\u044F."},name:"\u0413\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0444\u0456\u043B\u044C\u0442\u0440",placeholder:"\u043D\u0430\u043F\u0440\u044B\u043A\u043B\u0430\u0434 #task \u0430\u0431\u043E TODO"},heading:"\u0413\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0444\u0456\u043B\u044C\u0442\u0440 \u0437\u0430\u0434\u0430\u0447",removeFilter:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0432\u044B\u0434\u0430\u043B\u0456\u0446\u044C \u0440\u0430\u0434\u043E\u043A, \u044F\u043A\u0456 \u0432\u044B \u045E\u0441\u0442\u0430\u043B\u044F\u0432\u0430\u043B\u0456 \u045E \u044F\u043A\u0430\u0441\u0446\u0456 \u0433\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u0430\u0433\u0430 \u0444\u0456\u043B\u044C\u0442\u0440\u0430, \u0437 \u0430\u043F\u0456\u0441\u0430\u043D\u043D\u044F \u0437\u0430\u0434\u0430\u0447\u044B \u043F\u0440\u044B \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u043D\u043D\u0456 \u0437\u0430\u0434\u0430\u0447\u044B.",name:"\u0412\u044B\u0434\u0430\u043B\u0456\u0446\u044C \u0433\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0444\u0456\u043B\u044C\u0442\u0440 \u0437 \u0430\u043F\u0456\u0441\u0430\u043D\u043D\u044F"}},globalQuery:{heading:"\u0413\u043B\u0430\u0431\u0430\u043B\u044C\u043D\u044B \u0437\u0430\u043F\u044B\u0442",query:{description:"\u0417\u0430\u043F\u044B\u0442, \u044F\u043A\u0456 \u0430\u045E\u0442\u0430\u043C\u0430\u0442\u044B\u0447\u043D\u0430 \u045E\u043A\u043B\u044E\u0447\u0430\u0435\u0446\u0446\u0430 \u045E \u043F\u0430\u0447\u0430\u0442\u043A\u0443 \u043A\u043E\u0436\u043D\u0430\u0433\u0430 \u0431\u043B\u043E\u043A\u0430 Tasks \u0443 \u0441\u0445\u043E\u0432\u0456\u0448\u0447\u044B. \u041A\u0430\u0440\u044B\u0441\u043D\u044B \u0434\u043B\u044F \u0434\u0430\u0434\u0430\u043D\u043D\u044F \u0444\u0456\u043B\u044C\u0442\u0440\u0430\u045E \u043F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456 \u0430\u0431\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430\u045E \u043C\u0430\u043A\u0435\u0442\u0430.",placeholder:`\u041D\u0430\u043F\u0440\u044B\u043A\u043B\u0430\u0434... path does not include _templates/ limit 300 show urgency`}},recurringTasks:{heading:"\u041F\u0435\u0440\u044B\u044F\u0434\u044B\u0447\u043D\u044B\u044F \u0437\u0430\u0434\u0430\u0447\u044B",nextLine:{description:"\u0423\u043A\u043B\u044E\u0447\u044D\u043D\u043D\u0435 \u0433\u044D\u0442\u0430\u0433\u0430 \u0437\u0440\u043E\u0431\u0456\u0446\u044C \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0435 \u043F\u0430\u045E\u0442\u0430\u0440\u044D\u043D\u043D\u0435 \u0437\u0430\u0434\u0430\u0447\u044B \u043D\u0430 \u0440\u0430\u0434\u043A\u0443 \u043D\u0456\u0436\u044D\u0439 \u0437\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u043D\u0443\u044E \u0437\u0430\u0434\u0430\u0447\u0443. \u0423 \u0430\u0434\u0432\u0430\u0440\u043E\u0442\u043D\u044B\u043C \u0432\u044B\u043F\u0430\u0434\u043A\u0443 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0435 \u043F\u0430\u045E\u0442\u0430\u0440\u044D\u043D\u043D\u0435 \u0437'\u044F\u0432\u0456\u0446\u0446\u0430 \u043F\u0435\u0440\u0430\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u043D\u0430\u0439 \u0437\u0430\u0434\u0430\u0447\u0430\u0439.",name:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0430\u0435 \u043F\u0430\u045E\u0442\u0430\u0440\u044D\u043D\u043D\u0435 \u0437'\u044F\u045E\u043B\u044F\u0435\u0446\u0446\u0430 \u043D\u0430 \u0440\u0430\u0434\u043A\u0443 \u043D\u0456\u0436\u044D\u0439"},removeScheduledDate:{description:{line1:"",line2:""},name:""}},seeTheDocumentation:"\u0413\u043B\u044F\u0434\u0437\u0456\u0446\u0435 \u0434\u0430\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u044B\u044E",statuses:{collections:{anuppuccinTheme:"\u0422\u044D\u043C\u0430 AnuPpuccin",auraTheme:"\u0422\u044D\u043C\u0430 Aura",borderTheme:"\u0422\u044D\u043C\u0430 Border",buttons:{addCollection:{name:"{{themeName}}: \u0414\u0430\u0434\u0430\u0446\u044C {{numberOfStatuses}} \u043F\u0430\u0434\u0442\u0440\u044B\u043C\u043E\u045E\u0432\u0430\u043D\u044B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B"}},ebullientworksTheme:"\u0422\u044D\u043C\u0430 Ebullientworks",itsThemeAndSlrvbCheckboxes:"\u0422\u044D\u043C\u0430 ITS \u0456 \u0441\u0446\u044F\u0436\u043A\u0456 SlRvb",lytModeTheme:"\u0422\u044D\u043C\u0430 LYT Mode (\u0442\u043E\u043B\u044C\u043A\u0456 \u0446\u0451\u043C\u043D\u044B \u0440\u044D\u0436\u044B\u043C)",minimalTheme:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0442\u044D\u043C\u0430",thingsTheme:"\u0422\u044D\u043C\u0430 Things"},coreStatuses:{buttons:{checkStatuses:{name:"\u041F\u0440\u0430\u0433\u043B\u044F\u0434\u0437\u0435\u0446\u044C \u0456 \u043F\u0440\u0430\u0432\u0435\u0440\u044B\u0446\u044C \u0432\u0430\u0448\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u044B",tooltip:"\u0421\u0442\u0432\u0430\u0440\u044B\u0446\u044C \u043D\u043E\u0432\u044B \u0444\u0430\u0439\u043B \u0443 \u043A\u0430\u0440\u0430\u043D\u0451\u0432\u0430\u0439 \u0442\u044D\u0447\u0446\u044B \u0441\u0445\u043E\u0432\u0456\u0448\u0447\u0430, \u044F\u043A\u0456 \u0437\u043C\u044F\u0448\u0447\u0430\u0435 \u0434\u044B\u044F\u0433\u0440\u0430\u043C\u0443 Mermaid \u0437 \u0431\u044F\u0433\u0443\u0447\u044B\u043C\u0456 \u043D\u0430\u043B\u0430\u0434\u0430\u043C\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0443."}},description:{line1:"\u0413\u044D\u0442\u0430 \u0430\u0441\u043D\u043E\u045E\u043D\u044B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B, \u044F\u043A\u0456\u044F Tasks \u043F\u0430\u0434\u0442\u0440\u044B\u043C\u043B\u0456\u0432\u0430\u0435 \u045E\u043B\u0430\u0441\u043D\u0430, \u0431\u0435\u0437 \u043F\u0430\u0442\u0440\u044D\u0431\u044B \u045E \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u043C CSS-\u0441\u0442\u044B\u043B\u0456 \u0430\u0431\u043E \u0442\u044D\u043C\u0430\u0442\u044B\u0437\u0430\u0446\u044B\u0456.",line2:"\u0412\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u0440\u044D\u0434\u0430\u0433\u0430\u0432\u0430\u0446\u044C \u0456 \u0434\u0430\u0434\u0430\u0432\u0430\u0446\u044C \u0441\u0432\u0430\u0435 \u045E\u043B\u0430\u0441\u043D\u044B\u044F \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B \u045E \u0440\u0430\u0437\u0434\u0437\u0435\u043B\u0435 \u043D\u0456\u0436\u044D\u0439."},heading:"\u0410\u0441\u043D\u043E\u045E\u043D\u044B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B"},customStatuses:{buttons:{addAllUnknown:{name:"\u0414\u0430\u0434\u0430\u0446\u044C \u0443\u0441\u0435 \u043D\u0435\u0432\u044F\u0434\u043E\u043C\u044B\u044F \u0442\u044B\u043F\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E"},addNewStatus:{name:"\u0414\u0430\u0434\u0430\u0446\u044C \u043D\u043E\u0432\u044B \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u044B"},resetCustomStatuses:{name:"\u0421\u043A\u0456\u043D\u0443\u0446\u044C \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u044F \u0442\u044B\u043F\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E \u0434\u0430 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u044F\u045E \u043F\u0430 \u0437\u043C\u0430\u045E\u0447\u0430\u043D\u043D\u0456"}},description:{line1:"\u0421\u043F\u0430\u0447\u0430\u0442\u043A\u0443 \u0432\u044B \u043F\u0430\u0432\u0456\u043D\u043D\u044B <b>\u0432\u044B\u0431\u0440\u0430\u0446\u044C \u0456 \u045E\u0441\u0442\u0430\u043B\u044F\u0432\u0430\u0446\u044C CSS Snippet \u0430\u0431\u043E Theme</b>, \u043A\u0430\u0431 \u0441\u0442\u044B\u043B\u0456\u0437\u0430\u0432\u0430\u0446\u044C \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u044F \u0441\u0446\u044F\u0436\u043A\u0456.",line2:"\u0417\u0430\u0442\u044B\u043C \u0432\u044B\u043A\u0430\u0440\u044B\u0441\u0442\u043E\u045E\u0432\u0430\u0439\u0446\u0435 \u043A\u043D\u043E\u043F\u043A\u0456 \u043D\u0456\u0436\u044D\u0439, \u043A\u0430\u0431 \u043D\u0430\u043B\u0430\u0434\u0437\u0456\u0446\u044C \u0441\u0432\u0430\u0435 \u043A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B \u045E \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u0446\u0456 \u0437 \u0432\u044B\u0431\u0440\u0430\u043D\u044B\u043C\u0456 CSS-\u0441\u0446\u044F\u0436\u043A\u0430\u043C\u0456.",line3:"<b>\u0417\u0430\u045E\u0432\u0430\u0433\u0430</b> \u041B\u044E\u0431\u044B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B \u0437 \u0442\u044B\u043C \u0436\u0430 \u0441\u0456\u043C\u0432\u0430\u043B\u0430\u043C, \u0448\u0442\u043E \u0456 \u045E \u043F\u0430\u043F\u044F\u0440\u044D\u0434\u043D\u0456\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u045E, \u0431\u0443\u0434\u0443\u0446\u044C \u043F\u0440\u0430\u0456\u0433\u043D\u0430\u0440\u0430\u0432\u0430\u043D\u044B\u044F. \u0412\u044B \u043C\u043E\u0436\u0430\u0446\u0435 \u043F\u0430\u0446\u0432\u0435\u0440\u0434\u0437\u0456\u0446\u044C \u0444\u0430\u043A\u0442\u044B\u0447\u043D\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u043D\u044B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B, \u0437\u0430\u043F\u0443\u0441\u0446\u0456\u045E\u0448\u044B \u043A\u0430\u043C\u0430\u043D\u0434\u0443 \xAB\u0421\u0442\u0432\u0430\u0440\u044B\u0446\u044C \u0430\u0431\u043E \u0440\u044D\u0434\u0430\u0433\u0430\u0432\u0430\u0446\u044C \u0437\u0430\u0434\u0430\u0447\u0443\xBB \u0456 \u043F\u0430\u0433\u043B\u044F\u0434\u0437\u0435\u045E\u0448\u044B \u043D\u0430 \u0432\u044B\u043F\u0430\u0434\u0430\u043B\u044C\u043D\u044B \u0441\u043F\u0456\u0441 \u0421\u0442\u0430\u0442\u0443\u0441.",line4:"\u0413\u043B\u044F\u0434\u0437\u0456\u0446\u0435 \u0434\u0430\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u044B\u044E, \u043A\u0430\u0431 \u043F\u0430\u0447\u0430\u0446\u044C!"},heading:"\u041A\u0430\u0440\u044B\u0441\u0442\u0430\u043B\u044C\u043D\u0456\u0446\u043A\u0456\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u044B"},heading:"\u0421\u0442\u0430\u0442\u0443\u0441\u044B \u0437\u0430\u0434\u0430\u0447"}}}});var Wb,jb=ee(()=>{Wb={main:{loadingPlugin:"Loading plugin: {{name}} v{{version}}",unloadingPlugin:"Unloading plugin: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"If enabled this status will be available as a command so you can assign a hotkey and toggle the status using it.",name:"Available as command"},editNextStatusSymbol:{description:"When clicked on this is the symbol that should be used next.",name:"Task Next Status Symbol"},editStatusName:{description:"This is the friendly name of the task status.",name:"Task Status Name"},editStatusSymbol:{description:"This is the character between the square braces. (It can only be edited for Custom statuses, and not Core statuses.)",name:"Task Status Symbol"},editStatusType:{description:"Control how the status behaves for searching and toggling.",name:"Task Status Type"},fixErrorsBeforeSaving:"Fix errors before saving."}},reports:{statusRegistry:{about:{createdBy:"This file was created by the Obsidian Tasks plugin (version {{version}}) to help visualise the task statuses in this vault.",deleteFileAnyTime:"You can delete this file any time.",title:"About this file",updateReport:{line1:"If you change the Tasks status settings, you can get an updated report by:",line2:"Going to `Settings` -> `Tasks`.",line3:"Clicking on `Review and check your Statuses`."}},columnHeadings:{nextStatusSymbol:"Next Status Symbol",problems:"Problems (if any)",statusName:"Status Name",statusSymbol:"Status Symbol",statusType:"Status Type"},loadedSettings:{settingsActuallyUsed:"These are the settings actually used by Tasks.",switchToLivePreview:"Switch to Live Preview or Reading Mode to see the diagram.",title:"Loaded Settings"},messages:{cannotFindNextStatus:"Unexpected failure to find the next status.",duplicateSymbol:"Duplicate symbol '{{symbol}}': this status will be ignored.",emptySymbol:"Empty symbol: this status will be ignored.",nextSymbolUnknown:"Next symbol {{symbol}} is unknown: create a status with symbol {{symbol}}.",notConventionalType:"For information, the conventional type for status symbol {{symbol}} is {{type}}: you may wish to review this type.",wrongTypeAfterDone:{line1:"This `DONE` status is followed by {{nextType}}, not `TODO` or `IN_PROGRESS`.",line2:"If used to complete a recurring task, it will instead be followed by `TODO` or `IN_PROGRESS`, to ensure the next task matches the `not done` filter.",line3:"See [Recurring Tasks and Custom Statuses]({{helpURL}})."}},statusSettings:{comment:{line1:"Switch to Live Preview or Reading Mode to see the table.",line2:"If there are any Markdown formatting characters in status names, such as '*' or '_',",line3:"Obsidian may only render the table correctly in Reading Mode."},theseAreStatusValues:"These are the status values in the Core and Custom statuses sections.",title:"Status Settings"}}},settings:{autoSuggest:{heading:"Auto-suggest",maxSuggestions:{description:'How many suggestions should be shown when an auto-suggest menu pops up (including the "\u23CE" option).',name:"Maximum number of auto-suggestions to show"},minLength:{description:"If higher than 0, auto-suggest will be triggered only when the beginning of any supported keywords is recognized.",name:"Minimum match length for auto-suggest"},toggle:{description:"Enabling this will open an intelligent suggest menu while typing inside a recognized task line.",name:"Auto-suggest task content"}},changeRequiresRestart:"Changing any settings requires a restart of obsidian.",dates:{cancelledDate:{description:"Enabling this will add a timestamp \u274C YYYY-MM-DD at the end when a task is toggled to cancelled.",name:"Set cancelled date on every cancelled task"},createdDate:{description:"Enabling this will add a timestamp \u2795 YYYY-MM-DD before other date values, when a task is created with 'Create or edit task', or by completing a recurring task.",name:"Set created date on every added task"},doneDate:{description:"Enabling this will add a timestamp \u2705 YYYY-MM-DD at the end when a task is toggled to done.",name:"Set done date on every completed task"},heading:"Dates"},datesFromFileNames:{heading:"Dates from file names",scheduledDate:{extraFormat:{description:{line1:"An additional date format that Tasks plugin will recogize when using the file name as the Scheduled date for undated tasks.",line2:"Syntax Reference"},name:"Additional filename date format as Scheduled date for undated tasks",placeholder:"example: MMM DD YYYY"},folders:{description:"Leave empty if you want to use default Scheduled dates everywhere, or enter a comma-separated list of folders.",name:"Folders with default Scheduled dates"},toggle:{description:{line1:"Save time entering Scheduled (\u23F3) dates.",line2:"If this option is enabled, any undated tasks will be given a default Scheduled date extracted from their file name.",line3:"By default, Tasks plugin will match both <code>YYYY-MM-DD</code> and <code>YYYYMMDD</code> date formats.",line4:"Undated tasks have none of Due (\u{1F4C5} ), Scheduled (\u23F3) and Start (\u{1F6EB}) dates."},name:"Use filename as Scheduled date for undated tasks"}}},dialogs:{accessKeys:{description:"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.",name:"Provide access keys in dialogs"},heading:"Dialogs"},format:{description:{line1:"The format that Tasks uses to read and write tasks.",line2:"<b>Important:</b> Tasks currently only supports one format at a time. Selecting Dataview will currently <b>stop Tasks reading its own emoji signifiers</b>."},displayName:{dataview:"Dataview",tasksEmojiFormat:"Tasks Emoji Format"},name:"Task Format"},globalFilter:{filter:{description:{line1:"Recommended: Leave empty if you want all checklist items in your vault to be tasks managed by this plugin.",line2:'Use a global filter if you want Tasks to only act on a subset of your "<code>- [ ]</code>" checklist items, so that a checklist item must include the specified string in its description in order to be considered a task.',line3:"For example, if you set the global filter to <code>#task</code>, the Tasks plugin will only handle checklist items tagged with <code>#task</code>.",line4:"Other checklist items will remain normal checklist items and not appear in queries or get a done date set."},name:"Global filter",placeholder:"e.g. #task or TODO"},heading:"Global task filter",removeFilter:{description:"Enabling this removes the string that you set as global filter from the task description when displaying a task.",name:"Remove global filter from description"}},globalQuery:{heading:"Global Query",query:{description:"A query that is automatically included at the start of every Tasks block in the vault. Useful for adding default filters, or layout options.",placeholder:`For example... @@ -173,17 +173,17 @@ limit 300 show urgency`}},recurringTasks:{heading:"\u041F\u043E\u0432\u0442\u043E\u0440\u044F\u044E\u0449\u0438\u0435\u0441\u044F \u0437\u0430\u0434\u0430\u0447\u0438",nextLine:{description:"\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u044D\u0442\u043E\u0439 \u043E\u043F\u0446\u0438\u0438 \u043F\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043A \u0442\u043E\u043C\u0443, \u0447\u0442\u043E \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u043D\u0430 \u0441\u0442\u0440\u043E\u043A\u0435 \u043D\u0438\u0436\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043D\u043E\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u0412 \u043F\u0440\u043E\u0442\u0438\u0432\u043D\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u0438\u0435 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u043F\u0435\u0440\u0435\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043D\u043E\u0439.",name:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u0438\u0435 \u043F\u043E\u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043D\u0430 \u0441\u0442\u0440\u043E\u043A\u0435 \u043D\u0438\u0436\u0435"},removeScheduledDate:{description:{line1:"",line2:""},name:""}},seeTheDocumentation:"\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044E",statuses:{collections:{anuppuccinTheme:"\u0422\u0435\u043C\u0430 AnuPpuccin",auraTheme:"\u0422\u0435\u043C\u0430 Aura",borderTheme:"\u0422\u0435\u043C\u0430 Border",buttons:{addCollection:{name:"{{themeName}}: \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C {{numberOfStatuses}} \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432"}},ebullientworksTheme:"\u0422\u0435\u043C\u0430 Ebullientworks",itsThemeAndSlrvbCheckboxes:"\u0422\u0435\u043C\u0430 ITS \u0438 \u0444\u043B\u0430\u0436\u043A\u0438 SlRvb",lytModeTheme:"\u0422\u0435\u043C\u0430 LYT Mode (\u0442\u043E\u043B\u044C\u043A\u043E \u0442\u0435\u043C\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C)",minimalTheme:"\u0422\u0435\u043C\u0430 Minimal",thingsTheme:"\u0422\u0435\u043C\u0430 Things"},coreStatuses:{buttons:{checkStatuses:{name:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0441\u0432\u043E\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u044B",tooltip:"\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u0444\u0430\u0439\u043B \u0432 \u043A\u043E\u0440\u043D\u0435 \u0445\u0440\u0430\u043D\u0438\u043B\u0438\u0449\u0430, \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 Mermaid \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u043C\u0443 \u0442\u0435\u043A\u0443\u0449\u0438\u0445 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432."}},description:{line1:"\u042D\u0442\u043E \u043E\u0441\u043D\u043E\u0432\u043D\u044B\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 Tasks \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0437\u043D\u0430\u0447\u0430\u043B\u044C\u043D\u043E, \u0431\u0435\u0437 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E\u0441\u0442\u0438 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0445 CSS \u0441\u0442\u0438\u043B\u0435\u0439 \u0438\u043B\u0438 \u0442\u0435\u043C.",line2:"\u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u0442\u044C \u0441\u0432\u043E\u0438 \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0435 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B \u0432 \u0440\u0430\u0437\u0434\u0435\u043B\u0435 \u043D\u0438\u0436\u0435."},heading:"\u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B"},customStatuses:{buttons:{addAllUnknown:{name:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0435 \u0442\u0438\u043F\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432"},addNewStatus:{name:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0438"},resetCustomStatuses:{name:"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0442\u0438\u043F\u044B \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432 \u043A \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F\u043C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E"}},description:{line1:"\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0441\u043B\u0435\u0434\u0443\u0435\u0442 <b>\u0432\u044B\u0431\u0440\u0430\u0442\u044C \u0438 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C CSS \u0441\u043D\u0438\u043F\u043F\u0435\u0442 \u0438\u043B\u0438 \u0442\u0435\u043C\u0443</b> \u0434\u043B\u044F \u0441\u0442\u0438\u043B\u0438\u0437\u0430\u0446\u0438\u0438 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0445 \u0444\u043B\u0430\u0436\u043A\u043E\u0432.",line2:"\u0417\u0430\u0442\u0435\u043C \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043A\u043D\u043E\u043F\u043A\u0438 \u043D\u0438\u0436\u0435, \u0447\u0442\u043E\u0431\u044B \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u0441\u0432\u043E\u0438 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B \u0432 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u043C\u0438 CSS \u0444\u043B\u0430\u0436\u043A\u0430\u043C\u0438.",line3:"<b>\u041F\u0440\u0438\u043C\u0435\u0447\u0430\u043D\u0438\u0435.</b> \u041B\u044E\u0431\u044B\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B \u0441 \u0442\u0435\u043C \u0436\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u043C, \u0447\u0442\u043E \u0438 \u0443 \u0431\u043E\u043B\u0435\u0435 \u0440\u0430\u043D\u043D\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432, \u0431\u0443\u0434\u0443\u0442 \u0438\u0433\u043D\u043E\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F. \u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0444\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043D\u044B\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B, \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0432 \u043A\u043E\u043C\u0430\u043D\u0434\u0443 '\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0438\u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0437\u0430\u0434\u0430\u0447\u0443' \u0438 \u043F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0432 \u043D\u0430 \u0440\u0430\u0441\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0438\u0439\u0441\u044F \u0441\u043F\u0438\u0441\u043E\u043A \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u0432.",line4:"\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044E, \u0447\u0442\u043E\u0431\u044B \u043D\u0430\u0447\u0430\u0442\u044C!"},heading:"\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B"},heading:"\u0421\u0442\u0430\u0442\u0443\u0441\u044B \u0437\u0430\u0434\u0430\u0447"}}}});var Gb,Hb=ee(()=>{Gb={main:{loadingPlugin:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F \u043F\u043B\u0430\u0433\u0456\u043D\u0430: {{name}} v{{version}}",unloadingPlugin:"\u0412\u0438\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F \u043F\u043B\u0430\u0433\u0456\u043D\u0430: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"\u042F\u043A\u0449\u043E \u0432\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043E, \u0446\u0435\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0435 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0438\u0439 \u044F\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u0430, \u0449\u043E\u0431 \u0432\u0438 \u043C\u043E\u0433\u043B\u0438 \u043F\u0440\u0438\u0437\u043D\u0430\u0447\u0438\u0442\u0438 \u0433\u0430\u0440\u044F\u0447\u0443 \u043A\u043B\u0430\u0432\u0456\u0448\u0443 \u0442\u0430 \u043F\u0435\u0440\u0435\u043C\u0438\u043A\u0430\u0442\u0438 \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430 \u0457\u0457 \u0434\u043E\u043F\u043E\u043C\u043E\u0433\u043E\u044E.",name:"\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u0438\u0439 \u044F\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u0430"},editNextStatusSymbol:{description:"\u0421\u0438\u043C\u0432\u043E\u043B, \u044F\u043A\u0438\u0439 \u043C\u0430\u0454 \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0438\u043C \u043F\u0440\u0438 \u043D\u0430\u0442\u0438\u0441\u043A\u0430\u043D\u043D\u0456.",name:"\u0421\u0438\u043C\u0432\u043E\u043B \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u0433\u043E \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u0456"},editStatusName:{description:"\u0426\u0435 \u0437\u0440\u043E\u0437\u0443\u043C\u0456\u043B\u0430 \u043D\u0430\u0437\u0432\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u0456.",name:"\u041D\u0430\u0437\u0432\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u0456"},editStatusSymbol:{description:"\u0426\u0435 \u0441\u0438\u043C\u0432\u043E\u043B \u043C\u0456\u0436 \u043A\u0432\u0430\u0434\u0440\u0430\u0442\u043D\u0438\u043C\u0438 \u0434\u0443\u0436\u043A\u0430\u043C\u0438. (\u0419\u043E\u0433\u043E \u043C\u043E\u0436\u043D\u0430 \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u043B\u0438\u0448\u0435 \u0434\u043B\u044F \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432, \u0430 \u043D\u0435 \u0434\u043B\u044F \u043E\u0441\u043D\u043E\u0432\u043D\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432.)",name:"\u0421\u0438\u043C\u0432\u043E\u043B \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u0456"},editStatusType:{description:"\u041A\u0435\u0440\u0443\u0439\u0442\u0435 \u0442\u0438\u043C, \u044F\u043A \u0441\u0442\u0430\u0442\u0443\u0441 \u043F\u043E\u0432\u043E\u0434\u0438\u0442\u044C\u0441\u044F \u043F\u0456\u0434 \u0447\u0430\u0441 \u043F\u043E\u0448\u0443\u043A\u0443 \u0442\u0430 \u043F\u0435\u0440\u0435\u043C\u0438\u043A\u0430\u043D\u043D\u044F.",name:"\u0422\u0438\u043F \u0441\u0442\u0430\u0442\u0443\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u0456"},fixErrorsBeforeSaving:"\u0412\u0438\u043F\u0440\u0430\u0432\u0442\u0435 \u043F\u043E\u043C\u0438\u043B\u043A\u0438 \u043F\u0435\u0440\u0435\u0434 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043D\u043D\u044F\u043C."}},reports:{statusRegistry:{about:{createdBy:"\u0426\u0435\u0439 \u0444\u0430\u0439\u043B \u0441\u0442\u0432\u043E\u0440\u0435\u043D\u043E \u043F\u043B\u0430\u0433\u0456\u043D\u043E\u043C Obsidian Tasks (\u0432\u0435\u0440\u0441\u0456\u044F {{version}}), \u0449\u043E\u0431 \u0434\u043E\u043F\u043E\u043C\u043E\u0433\u0442\u0438 \u0432\u0456\u0437\u0443\u0430\u043B\u0456\u0437\u0443\u0432\u0430\u0442\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0438 \u0437\u0430\u0434\u0430\u0447 \u0443 \u0446\u044C\u043E\u043C\u0443 \u0441\u0445\u043E\u0432\u0438\u0449\u0456.",deleteFileAnyTime:"\u0412\u0438 \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0446\u0435\u0439 \u0444\u0430\u0439\u043B \u0443 \u0431\u0443\u0434\u044C-\u044F\u043A\u0438\u0439 \u0447\u0430\u0441.",title:"\u041F\u0440\u043E \u0446\u0435\u0439 \u0444\u0430\u0439\u043B",updateReport:{line1:"\u042F\u043A\u0449\u043E \u0432\u0438 \u0437\u043C\u0456\u043D\u0438\u0442\u0435 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432 Tasks, \u0432\u0438 \u043C\u043E\u0436\u0435\u0442\u0435 \u043E\u0442\u0440\u0438\u043C\u0430\u0442\u0438 \u043E\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0439 \u0437\u0432\u0456\u0442, \u0432\u0438\u043A\u043E\u043D\u0430\u0432\u0448\u0438 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0456 \u0434\u0456\u0457:",line2:"\u041F\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044C \u0434\u043E `\u041D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F` -> `Tasks`.",line3:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C `\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0442\u0438 \u0442\u0430 \u043F\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u0442\u0438 \u0432\u0430\u0448\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438`."}},columnHeadings:{nextStatusSymbol:"\u0421\u0438\u043C\u0432\u043E\u043B \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u0433\u043E \u0441\u0442\u0430\u0442\u0443\u0441\u0443",problems:"\u041F\u0440\u043E\u0431\u043B\u0435\u043C\u0438 (\u044F\u043A\u0449\u043E \u0454)",statusName:"\u041D\u0430\u0437\u0432\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0443",statusSymbol:"\u0421\u0438\u043C\u0432\u043E\u043B \u0441\u0442\u0430\u0442\u0443\u0441\u0443",statusType:"\u0422\u0438\u043F \u0441\u0442\u0430\u0442\u0443\u0441\u0443"},loadedSettings:{settingsActuallyUsed:"\u0426\u0435 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F, \u044F\u043A\u0456 \u0444\u0430\u043A\u0442\u0438\u0447\u043D\u043E \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u044E\u0442\u044C\u0441\u044F Tasks.",switchToLivePreview:"\u041F\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044C \u0443 \u0440\u0435\u0436\u0438\u043C Live Preview \u0430\u0431\u043E \u0440\u0435\u0436\u0438\u043C \u0447\u0438\u0442\u0430\u043D\u043D\u044F, \u0449\u043E\u0431 \u043F\u043E\u0431\u0430\u0447\u0438\u0442\u0438 \u0434\u0456\u0430\u0433\u0440\u0430\u043C\u0443.",title:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u0456 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F"},messages:{cannotFindNextStatus:"\u041D\u0435\u043E\u0447\u0456\u043A\u0443\u0432\u0430\u043D\u0430 \u043F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u043F\u043E\u0448\u0443\u043A\u0443 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u043E\u0433\u043E \u0441\u0442\u0430\u0442\u0443\u0441\u0443.",duplicateSymbol:"\u0414\u0443\u0431\u043B\u0456\u043A\u0430\u0442 \u0441\u0438\u043C\u0432\u043E\u043B\u0443 '{{symbol}}': \u0446\u0435\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0435 \u043F\u0440\u043E\u0456\u0433\u043D\u043E\u0440\u043E\u0432\u0430\u043D\u043E.",emptySymbol:"\u041F\u043E\u0440\u043E\u0436\u043D\u0456\u0439 \u0441\u0438\u043C\u0432\u043E\u043B: \u0446\u0435\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0443\u0434\u0435 \u043F\u0440\u043E\u0456\u0433\u043D\u043E\u0440\u043E\u0432\u0430\u043D\u043E.",nextSymbolUnknown:"\u041D\u0435\u0432\u0456\u0434\u043E\u043C\u0438\u0439 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0438\u0439 \u0441\u0438\u043C\u0432\u043E\u043B {{symbol}}: \u0441\u0442\u0432\u043E\u0440\u0456\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441 \u0456\u0437 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u043C {{symbol}}.",notConventionalType:"\u0414\u043B\u044F \u0456\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0456\u0457, \u0437\u0432\u0438\u0447\u0430\u0439\u043D\u0438\u0439 \u0442\u0438\u043F \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u0443 \u0441\u0442\u0430\u0442\u0443\u0441\u0443 {{symbol}} - {{type}}: \u043C\u043E\u0436\u043B\u0438\u0432\u043E, \u0432\u0438 \u0437\u0430\u0445\u043E\u0447\u0435\u0442\u0435 \u043F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0442\u0438 \u0446\u0435\u0439 \u0442\u0438\u043F.",wrongTypeAfterDone:{line1:"\u0417\u0430 \u0446\u0438\u043C \u0441\u0442\u0430\u0442\u0443\u0441\u043E\u043C `DONE` \u0439\u0434\u0435 {{nextType}}, \u0430 \u043D\u0435 `TODO` \u0430\u0431\u043E `IN_PROGRESS`.",line2:"\u042F\u043A\u0449\u043E \u0439\u043E\u0433\u043E \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0432\u0430\u0442\u0438 \u0434\u043B\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043D\u044F \u043F\u043E\u0432\u0442\u043E\u0440\u044E\u0432\u0430\u043D\u043E\u0457 \u0437\u0430\u0434\u0430\u0447\u0456, \u0437\u0430\u043C\u0456\u0441\u0442\u044C \u0446\u044C\u043E\u0433\u043E \u0437\u0430 \u043D\u0438\u043C \u0431\u0443\u0434\u0435 \u0441\u043B\u0456\u0434\u0443\u0432\u0430\u0442\u0438 `TODO` \u0430\u0431\u043E `IN_PROGRESS`, \u0449\u043E\u0431 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u043B\u0430 \u0444\u0456\u043B\u044C\u0442\u0440\u0443 `\u043D\u0435 \u0432\u0438\u043A\u043E\u043D\u0430\u043D\u043E`.",line3:"\u0414\u0438\u0432. [\u041F\u043E\u0432\u0442\u043E\u0440\u044E\u0432\u0430\u043D\u0456 \u0437\u0430\u0434\u0430\u0447\u0456 \u0442\u0430 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438]({{helpURL}})."}},statusSettings:{comment:{line1:"\u041F\u0435\u0440\u0435\u0439\u0434\u0456\u0442\u044C \u0443 \u0440\u0435\u0436\u0438\u043C Live Preview \u0430\u0431\u043E \u0440\u0435\u0436\u0438\u043C \u0447\u0438\u0442\u0430\u043D\u043D\u044F, \u0449\u043E\u0431 \u043F\u043E\u0431\u0430\u0447\u0438\u0442\u0438 \u0442\u0430\u0431\u043B\u0438\u0446\u044E.",line2:"\u042F\u043A\u0449\u043E \u0432 \u043D\u0430\u0437\u0432\u0430\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432 \u0454 \u0441\u0438\u043C\u0432\u043E\u043B\u0438 \u0444\u043E\u0440\u043C\u0430\u0442\u0443\u0432\u0430\u043D\u043D\u044F Markdown, \u043D\u0430\u043F\u0440\u0438\u043A\u043B\u0430\u0434 '*' \u0430\u0431\u043E '_',",line3:"Obsidian \u043C\u043E\u0436\u0435 \u043A\u043E\u0440\u0435\u043A\u0442\u043D\u043E \u0432\u0456\u0434\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u0438 \u0442\u0430\u0431\u043B\u0438\u0446\u044E \u043B\u0438\u0448\u0435 \u0432 \u0440\u0435\u0436\u0438\u043C\u0456 \u0447\u0438\u0442\u0430\u043D\u043D\u044F."},theseAreStatusValues:"\u0426\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432 \u0443 \u0440\u043E\u0437\u0434\u0456\u043B\u0430\u0445 \u043E\u0441\u043D\u043E\u0432\u043D\u0438\u0445 \u0456 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432.",title:"\u041D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u043D\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432"}}},settings:{autoSuggest:{heading:"\u0410\u0432\u0442\u043E\u0437\u0430\u043F\u043E\u0432\u043D\u0435\u043D\u043D\u044F",maxSuggestions:{description:'\u0421\u043A\u0456\u043B\u044C\u043A\u0438 \u043F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0439 \u043C\u0430\u0454 \u0432\u0456\u0434\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u0438\u0441\u044F, \u043A\u043E\u043B\u0438 \u0437\u2019\u044F\u0432\u043B\u044F\u0454\u0442\u044C\u0441\u044F \u043C\u0435\u043D\u044E \u0430\u0432\u0442\u043E\u0437\u0430\u043F\u043E\u0432\u043D\u0435\u043D\u043D\u044F (\u0432\u043A\u043B\u044E\u0447\u0430\u044E\u0447\u0438 \u043E\u043F\u0446\u0456\u044E "\u23CE").',name:"\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0430 \u043A\u0456\u043B\u044C\u043A\u0456\u0441\u0442\u044C \u043F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0439 \u0434\u043B\u044F \u0432\u0456\u0434\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F"},minLength:{description:"\u042F\u043A\u0449\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0431\u0456\u043B\u044C\u0448\u0435 0, \u0430\u0432\u0442\u043E\u0437\u0430\u043F\u043E\u0432\u043D\u0435\u043D\u043D\u044F \u0431\u0443\u0434\u0435 \u0437\u0430\u043F\u0443\u0441\u043A\u0430\u0442\u0438\u0441\u044F \u043B\u0438\u0448\u0435 \u0442\u043E\u0434\u0456, \u043A\u043E\u043B\u0438 \u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u0454\u0442\u044C\u0441\u044F \u043F\u043E\u0447\u0430\u0442\u043E\u043A \u0431\u0443\u0434\u044C-\u044F\u043A\u0438\u0445 \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0432\u0430\u043D\u0438\u0445 \u043A\u043B\u044E\u0447\u043E\u0432\u0438\u0445 \u0441\u043B\u0456\u0432.",name:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0430 \u0434\u043E\u0432\u0436\u0438\u043D\u0430 \u0437\u0431\u0456\u0433\u0443 \u0434\u043B\u044F \u0430\u0432\u0442\u043E\u0437\u0430\u043F\u043E\u0432\u043D\u0435\u043D\u043D\u044F"},toggle:{description:"\u0423\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0432\u0456\u0434\u043A\u0440\u0438\u0454 \u0456\u043D\u0442\u0435\u043B\u0435\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u0435 \u043C\u0435\u043D\u044E \u043F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0439 \u043F\u0456\u0434 \u0447\u0430\u0441 \u0432\u0432\u0435\u0434\u0435\u043D\u043D\u044F \u0442\u0435\u043A\u0441\u0442\u0443 \u0432\u0441\u0435\u0440\u0435\u0434\u0438\u043D\u0456 \u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u043E\u0433\u043E \u0440\u044F\u0434\u043A\u0430 \u0437\u0430\u0434\u0430\u0447\u0456.",name:"\u0410\u0432\u0442\u043E\u0437\u0430\u043F\u043E\u0432\u043D\u0435\u043D\u043D\u044F \u0432\u043C\u0456\u0441\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0456"}},changeRequiresRestart:"\u0417\u043C\u0456\u043D\u0430 \u0431\u0443\u0434\u044C-\u044F\u043A\u0438\u0445 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u044C \u0432\u0438\u043C\u0430\u0433\u0430\u0454 \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u043A\u0443 obsidian.",dates:{cancelledDate:{description:"\u0423\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0434\u043E\u0434\u0430\u0441\u0442\u044C \u043F\u043E\u0437\u043D\u0430\u0447\u043A\u0443 \u0447\u0430\u0441\u0443 \u274C YYYY-MM-DD \u0432 \u043A\u0456\u043D\u0446\u0456, \u043A\u043E\u043B\u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u043F\u0435\u0440\u0435\u043C\u0438\u043A\u0430\u0454\u0442\u044C\u0441\u044F \u0432 \u0441\u043A\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0439 \u0441\u0442\u0430\u043D.",name:"\u0412\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0438 \u0434\u0430\u0442\u0443 \u0441\u043A\u0430\u0441\u0443\u0432\u0430\u043D\u043D\u044F \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u043E\u0457 \u0441\u043A\u0430\u0441\u043E\u0432\u0430\u043D\u043E\u0457 \u0437\u0430\u0434\u0430\u0447\u0456"},createdDate:{description:"\u0423\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0434\u043E\u0434\u0430\u0441\u0442\u044C \u043F\u043E\u0437\u043D\u0430\u0447\u043A\u0443 \u0447\u0430\u0441\u0443 \u2795 YYYY-MM-DD \u043F\u0435\u0440\u0435\u0434 \u0456\u043D\u0448\u0438\u043C\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F\u043C\u0438 \u0434\u0430\u0442, \u043A\u043E\u043B\u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0442\u0432\u043E\u0440\u044E\u0454\u0442\u044C\u0441\u044F \u0437\u0430 \u0434\u043E\u043F\u043E\u043C\u043E\u0433\u043E\u044E '\u0421\u0442\u0432\u043E\u0440\u0438\u0442\u0438 \u0430\u0431\u043E \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0437\u0430\u0434\u0430\u0447\u0443' \u0430\u0431\u043E \u0448\u043B\u044F\u0445\u043E\u043C \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043D\u044F \u043F\u043E\u0432\u0442\u043E\u0440\u044E\u0432\u0430\u043D\u043E\u0457 \u0437\u0430\u0434\u0430\u0447\u0456.",name:"\u0412\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0438 \u0434\u0430\u0442\u0443 \u0441\u0442\u0432\u043E\u0440\u0435\u043D\u043D\u044F \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u043E\u0457 \u0434\u043E\u0434\u0430\u043D\u043E\u0457 \u0437\u0430\u0434\u0430\u0447\u0456"},doneDate:{description:"\u0423\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0434\u043E\u0434\u0430\u0441\u0442\u044C \u043F\u043E\u0437\u043D\u0430\u0447\u043A\u0443 \u0447\u0430\u0441\u0443 \u2705 YYYY-MM-DD \u0432 \u043A\u0456\u043D\u0446\u0456, \u043A\u043E\u043B\u0438 \u0437\u0430\u0434\u0430\u0447\u0430 \u043F\u0435\u0440\u0435\u043C\u0438\u043A\u0430\u0454\u0442\u044C\u0441\u044F \u0443 \u0432\u0438\u043A\u043E\u043D\u0430\u043D\u0438\u0439 \u0441\u0442\u0430\u043D.",name:"\u0412\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0438 \u0434\u0430\u0442\u0443 \u0432\u0438\u043A\u043E\u043D\u0430\u043D\u043D\u044F \u0434\u043B\u044F \u043A\u043E\u0436\u043D\u043E\u0457 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E\u0457 \u0437\u0430\u0434\u0430\u0447\u0456"},heading:"\u0414\u0430\u0442\u0438"},datesFromFileNames:{heading:"\u0414\u0430\u0442\u0438 \u0437 \u043D\u0430\u0437\u0432 \u0444\u0430\u0439\u043B\u0456\u0432",scheduledDate:{extraFormat:{description:{line1:"\u0414\u043E\u0434\u0430\u0442\u043A\u043E\u0432\u0438\u0439 \u0444\u043E\u0440\u043C\u0430\u0442 \u0434\u0430\u0442\u0438, \u044F\u043A\u0438\u0439 \u043F\u043B\u0430\u0433\u0456\u043D Tasks \u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u0432\u0430\u0442\u0438\u043C\u0435 \u043F\u0456\u0434 \u0447\u0430\u0441 \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u0430\u043D\u043D\u044F \u043D\u0430\u0437\u0432\u0438 \u0444\u0430\u0439\u043B\u0443 \u044F\u043A \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0443 \u0434\u0430\u0442\u0443 \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0434\u0430\u0442\u0438.",line2:"\u0414\u043E\u0432\u0456\u0434\u043A\u0430 \u0437 \u0441\u0438\u043D\u0442\u0430\u043A\u0441\u0438\u0441\u0443"},name:"\u0414\u043E\u0434\u0430\u0442\u043A\u043E\u0432\u0438\u0439 \u0444\u043E\u0440\u043C\u0430\u0442 \u0434\u0430\u0442\u0438 \u043D\u0430\u0437\u0432\u0438 \u0444\u0430\u0439\u043B\u0443 \u044F\u043A \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0430 \u0434\u0430\u0442\u0430 \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0434\u0430\u0442\u0438",placeholder:"\u043F\u0440\u0438\u043A\u043B\u0430\u0434: MMM DD YYYY"},folders:{description:"\u0417\u0430\u043B\u0438\u0448\u0442\u0435 \u043F\u043E\u0440\u043E\u0436\u043D\u0456\u043C, \u044F\u043A\u0449\u043E \u0432\u0438 \u0445\u043E\u0447\u0435\u0442\u0435 \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0432\u0430\u0442\u0438 \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0456 \u0434\u0430\u0442\u0438 \u0437\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C \u0432\u0441\u044E\u0434\u0438, \u0430\u0431\u043E \u0432\u0432\u0435\u0434\u0456\u0442\u044C \u0441\u043F\u0438\u0441\u043E\u043A \u043F\u0430\u043F\u043E\u043A, \u0440\u043E\u0437\u0434\u0456\u043B\u0435\u043D\u0438\u0445 \u043A\u043E\u043C\u0430\u043C\u0438.",name:"\u041F\u0430\u043F\u043A\u0438 \u0437 \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0438\u043C\u0438 \u0434\u0430\u0442\u0430\u043C\u0438 \u0437\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C"},toggle:{description:{line1:"\u0417\u0430\u043E\u0449\u0430\u0434\u0436\u0443\u0439\u0442\u0435 \u0447\u0430\u0441 \u043D\u0430 \u0432\u0432\u0435\u0434\u0435\u043D\u043D\u0456 \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0438\u0445 (\u23F3) \u0434\u0430\u0442.",line2:"\u042F\u043A\u0449\u043E \u0446\u0435\u0439 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0443\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043E, \u0443\u0441\u0456\u043C \u0437\u0430\u0434\u0430\u0447\u0430\u043C \u0431\u0435\u0437 \u0434\u0430\u0442\u0438 \u0431\u0443\u0434\u0435 \u043F\u0440\u0438\u0441\u0432\u043E\u0454\u043D\u043E \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0443 \u0434\u0430\u0442\u0443 \u0437\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C, \u0432\u0438\u0442\u044F\u0433\u043D\u0443\u0442\u0443 \u0437 \u0457\u0445 \u043D\u0430\u0437\u0432\u0438 \u0444\u0430\u0439\u043B\u0443.",line3:"\u0417\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C \u043F\u043B\u0430\u0433\u0456\u043D Tasks \u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u0432\u0430\u0442\u0438\u043C\u0435 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 \u0434\u0430\u0442 <code>YYYY-MM-DD</code> \u0456 <code>YYYYMMDD</code>.",line4:"\u0417\u0430\u0434\u0430\u0447\u0456 \u0431\u0435\u0437 \u0434\u0430\u0442\u0438 \u043D\u0435 \u043C\u0430\u044E\u0442\u044C \u0434\u0430\u0442 \u0432\u0438\u043A\u043E\u043D\u0430\u043D\u043D\u044F (\u{1F4C5}), \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u043E\u0457 (\u23F3) \u0442\u0430 \u043F\u043E\u0447\u0430\u0442\u043A\u0443 (\u{1F6EB})."},name:"\u0412\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0432\u0430\u0442\u0438 \u043D\u0430\u0437\u0432\u0443 \u0444\u0430\u0439\u043B\u0443 \u044F\u043A \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u0443 \u0434\u0430\u0442\u0443 \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u0447 \u0431\u0435\u0437 \u0434\u0430\u0442\u0438"}}},dialogs:{accessKeys:{description:"\u042F\u043A\u0449\u043E \u043A\u043B\u0430\u0432\u0456\u0448\u0456 \u0434\u043E\u0441\u0442\u0443\u043F\u0443 (\u043A\u043E\u043C\u0431\u0456\u043D\u0430\u0446\u0456\u0457 \u043A\u043B\u0430\u0432\u0456\u0448) \u0434\u043B\u044F \u0440\u0456\u0437\u043D\u0438\u0445 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432 \u043A\u0435\u0440\u0443\u0432\u0430\u043D\u043D\u044F \u0432 \u0434\u0456\u0430\u043B\u043E\u0433\u043E\u0432\u0438\u0445 \u0432\u0456\u043A\u043D\u0430\u0445 \u043A\u043E\u043D\u0444\u043B\u0456\u043A\u0442\u0443\u044E\u0442\u044C \u0456\u0437 \u0441\u0438\u0441\u0442\u0435\u043C\u043D\u0438\u043C\u0438 \u043A\u043E\u043C\u0431\u0456\u043D\u0430\u0446\u0456\u044F\u043C\u0438 \u043A\u043B\u0430\u0432\u0456\u0448 \u0430\u0431\u043E \u0444\u0443\u043D\u043A\u0446\u0456\u043E\u043D\u0430\u043B\u044C\u043D\u0456\u0441\u0442\u044E \u0434\u043E\u043F\u043E\u043C\u0456\u0436\u043D\u0438\u0445 \u0442\u0435\u0445\u043D\u043E\u043B\u043E\u0433\u0456\u0439, \u044F\u043A\u0456 \u0432\u0430\u0436\u043B\u0438\u0432\u0456 \u0434\u043B\u044F \u0432\u0430\u0441, \u0432\u0438 \u043C\u043E\u0436\u0435\u0442\u0435 \u0434\u0435\u0430\u043A\u0442\u0438\u0432\u0443\u0432\u0430\u0442\u0438 \u0457\u0445 \u0442\u0443\u0442.",name:"\u041D\u0430\u0434\u0430\u0432\u0430\u0442\u0438 \u043A\u043B\u0430\u0432\u0456\u0448\u0456 \u0434\u043E\u0441\u0442\u0443\u043F\u0443 \u0432 \u0434\u0456\u0430\u043B\u043E\u0433\u043E\u0432\u0438\u0445 \u0432\u0456\u043A\u043D\u0430\u0445"},heading:"\u0414\u0456\u0430\u043B\u043E\u0433\u043E\u0432\u0456 \u0432\u0456\u043A\u043D\u0430"},format:{description:{line1:"\u0424\u043E\u0440\u043C\u0430\u0442, \u044F\u043A\u0438\u0439 Tasks \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0454 \u0434\u043B\u044F \u0447\u0438\u0442\u0430\u043D\u043D\u044F \u0442\u0430 \u0437\u0430\u043F\u0438\u0441\u0443 \u0437\u0430\u0434\u0430\u0447.",line2:"<b>\u0412\u0430\u0436\u043B\u0438\u0432\u043E:</b> Tasks \u0437\u0430\u0440\u0430\u0437 \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454 \u043B\u0438\u0448\u0435 \u043E\u0434\u0438\u043D \u0444\u043E\u0440\u043C\u0430\u0442 \u0437\u0430 \u0440\u0430\u0437. \u0412\u0438\u0431\u0456\u0440 Dataview \u043D\u0430\u0440\u0430\u0437\u0456 <b>\u0437\u0443\u043F\u0438\u043D\u0438\u0442\u044C \u0447\u0438\u0442\u0430\u043D\u043D\u044F Tasks \u0432\u043B\u0430\u0441\u043D\u0438\u0445 \u0437\u043D\u0430\u043A\u0456\u0432 \u0435\u043C\u043E\u0434\u0437\u0456</b>."},displayName:{dataview:"Dataview",tasksEmojiFormat:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0435\u043C\u043E\u0434\u0437\u0456 Tasks"},name:"\u0424\u043E\u0440\u043C\u0430\u0442 \u0437\u0430\u0434\u0430\u0447"},globalFilter:{filter:{description:{line1:"\u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u043E\u0432\u0430\u043D\u043E: \u0417\u0430\u043B\u0438\u0448\u0442\u0435 \u043F\u043E\u0440\u043E\u0436\u043D\u0456\u043C, \u044F\u043A\u0449\u043E \u0432\u0438 \u0445\u043E\u0447\u0435\u0442\u0435, \u0449\u043E\u0431 \u0443\u0441\u0456 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438 \u0441\u043F\u0438\u0441\u043A\u0443 \u0441\u043F\u0440\u0430\u0432 \u0443 \u0432\u0430\u0448\u043E\u043C\u0443 \u0441\u0445\u043E\u0432\u0438\u0449\u0456 \u0431\u0443\u043B\u0438 \u0437\u0430\u0434\u0430\u0447\u0430\u043C\u0438, \u044F\u043A\u0438\u043C\u0438 \u043A\u0435\u0440\u0443\u0454 \u0446\u0435\u0439 \u043F\u043B\u0430\u0433\u0456\u043D.",line2:'\u0412\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0439\u0442\u0435 \u0433\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u0438\u0439 \u0444\u0456\u043B\u044C\u0442\u0440, \u044F\u043A\u0449\u043E \u0432\u0438 \u0445\u043E\u0447\u0435\u0442\u0435, \u0449\u043E\u0431 Tasks \u0434\u0456\u044F\u043B\u0438 \u043B\u0438\u0448\u0435 \u043D\u0430 \u043F\u0456\u0434\u043C\u043D\u043E\u0436\u0438\u043D\u0443 \u0432\u0430\u0448\u0438\u0445 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432 \u0441\u043F\u0438\u0441\u043A\u0443 \u0441\u043F\u0440\u0430\u0432 "<code>- [ ]</code>", \u0449\u043E\u0431 \u0435\u043B\u0435\u043C\u0435\u043D\u0442 \u0441\u043F\u0438\u0441\u043A\u0443 \u0441\u043F\u0440\u0430\u0432 \u0432\u043A\u043B\u044E\u0447\u0430\u0432 \u0432 \u043E\u043F\u0438\u0441\u0456 \u0432\u043A\u0430\u0437\u0430\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A, \u0449\u043E\u0431 \u0432\u0432\u0430\u0436\u0430\u0442\u0438\u0441\u044F \u0437\u0430\u0434\u0430\u0447\u0435\u044E.',line3:"\u041D\u0430\u043F\u0440\u0438\u043A\u043B\u0430\u0434, \u044F\u043A\u0449\u043E \u0432\u0438 \u0432\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0435 \u0433\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u0438\u0439 \u0444\u0456\u043B\u044C\u0442\u0440 \u043D\u0430 <code>#task</code>, \u043F\u043B\u0430\u0433\u0456\u043D Tasks \u043E\u0431\u0440\u043E\u0431\u043B\u044F\u0442\u0438\u043C\u0435 \u043B\u0438\u0448\u0435 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438 \u0441\u043F\u0438\u0441\u043A\u0443 \u0441\u043F\u0440\u0430\u0432, \u043F\u043E\u0437\u043D\u0430\u0447\u0435\u043D\u0456 \u0442\u0435\u0433\u043E\u043C <code>#task</code>.",line4:"\u0406\u043D\u0448\u0456 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438 \u0441\u043F\u0438\u0441\u043A\u0443 \u0441\u043F\u0440\u0430\u0432 \u0437\u0430\u043B\u0438\u0448\u0430\u0442\u044C\u0441\u044F \u0437\u0432\u0438\u0447\u0430\u0439\u043D\u0438\u043C\u0438 \u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u043C\u0438 \u0441\u043F\u0438\u0441\u043A\u0443 \u0441\u043F\u0440\u0430\u0432 \u0456 \u043D\u0435 \u0437\u2019\u044F\u0432\u043B\u044F\u0442\u0438\u043C\u0443\u0442\u044C\u0441\u044F \u0432 \u0437\u0430\u043F\u0438\u0442\u0430\u0445 \u0430\u0431\u043E \u043D\u0435 \u0432\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u044E\u0432\u0430\u0442\u0438\u043C\u0443\u0442\u044C \u0434\u0430\u0442\u0443 \u0432\u0438\u043A\u043E\u043D\u0430\u043D\u043D\u044F."},name:"\u0413\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u0438\u0439 \u0444\u0456\u043B\u044C\u0442\u0440",placeholder:"\u043D\u0430\u043F\u0440. #task \u0430\u0431\u043E TODO"},heading:"\u0413\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u0438\u0439 \u0444\u0456\u043B\u044C\u0442\u0440 \u0437\u0430\u0434\u0430\u0447",removeFilter:{description:"\u0423\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0432\u0438\u0434\u0430\u043B\u044F\u0454 \u0440\u044F\u0434\u043E\u043A, \u044F\u043A\u0438\u0439 \u0432\u0438 \u0432\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u0438 \u044F\u043A \u0433\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u0438\u0439 \u0444\u0456\u043B\u044C\u0442\u0440, \u0437 \u043E\u043F\u0438\u0441\u0443 \u0437\u0430\u0434\u0430\u0447\u0456 \u043F\u0456\u0434 \u0447\u0430\u0441 \u0432\u0456\u0434\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u043D\u044F \u0437\u0430\u0434\u0430\u0447\u0456.",name:"\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0433\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u0438\u0439 \u0444\u0456\u043B\u044C\u0442\u0440 \u0437 \u043E\u043F\u0438\u0441\u0443"}},globalQuery:{heading:"\u0413\u043B\u043E\u0431\u0430\u043B\u044C\u043D\u0438\u0439 \u0437\u0430\u043F\u0438\u0442",query:{description:"\u0417\u0430\u043F\u0438\u0442, \u044F\u043A\u0438\u0439 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u043D\u043E \u0432\u043A\u043B\u044E\u0447\u0430\u0454\u0442\u044C\u0441\u044F \u043D\u0430 \u043F\u043E\u0447\u0430\u0442\u043A\u0443 \u043A\u043E\u0436\u043D\u043E\u0433\u043E \u0431\u043B\u043E\u043A\u0443 Tasks \u0443 \u0441\u0445\u043E\u0432\u0438\u0449\u0456. \u041A\u043E\u0440\u0438\u0441\u043D\u043E \u0434\u043B\u044F \u0434\u043E\u0434\u0430\u0432\u0430\u043D\u043D\u044F \u0444\u0456\u043B\u044C\u0442\u0440\u0456\u0432 \u0437\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C \u0430\u0431\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0456\u0432 \u043C\u0430\u043A\u0435\u0442\u0430.",placeholder:`\u041D\u0430\u043F\u0440\u0438\u043A\u043B\u0430\u0434... path does not include _templates/ limit 300 -show urgency`}},recurringTasks:{heading:"\u041F\u043E\u0432\u0442\u043E\u0440\u044E\u0432\u0430\u043D\u0456 \u0437\u0430\u0434\u0430\u0447\u0456",nextLine:{description:"\u0423\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0437\u043C\u0443\u0441\u0438\u0442\u044C \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u043D\u044F \u0437\u0430\u0434\u0430\u0447\u0456 \u0437\u2019\u044F\u0432\u043B\u044F\u0442\u0438\u0441\u044F \u043D\u0430 \u0440\u044F\u0434\u043A\u0443 \u043D\u0438\u0436\u0447\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E\u0457 \u0437\u0430\u0434\u0430\u0447\u0456. \u0406\u043D\u0430\u043A\u0448\u0435 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u043D\u044F \u0437\u2019\u044F\u0432\u0438\u0442\u044C\u0441\u044F \u043F\u0435\u0440\u0435\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E\u044E.",name:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u043D\u044F \u0437\u2019\u044F\u0432\u043B\u044F\u0454\u0442\u044C\u0441\u044F \u043D\u0430 \u0440\u044F\u0434\u043A\u0443 \u043D\u0438\u0436\u0447\u0435"},removeScheduledDate:{description:{line1:"",line2:""},name:""}},seeTheDocumentation:"\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0442\u0438 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0456\u044E",statuses:{collections:{anuppuccinTheme:"\u0422\u0435\u043C\u0430 AnuPpuccin",auraTheme:"\u0422\u0435\u043C\u0430 Aura",borderTheme:"\u0422\u0435\u043C\u0430 Border",buttons:{addCollection:{name:"{{themeName}}: \u0414\u043E\u0434\u0430\u0442\u0438 {{numberOfStatuses}} \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0432\u0430\u043D\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432"}},ebullientworksTheme:"\u0422\u0435\u043C\u0430 Ebullientworks",itsThemeAndSlrvbCheckboxes:"\u0422\u0435\u043C\u0430 ITS \u0456 \u043F\u0440\u0430\u043F\u043E\u0440\u0446\u0456 SlRvb",lytModeTheme:"\u0422\u0435\u043C\u0430 LYT Mode (\u043B\u0438\u0448\u0435 \u0442\u0435\u043C\u043D\u0438\u0439 \u0440\u0435\u0436\u0438\u043C)",minimalTheme:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0430 \u0442\u0435\u043C\u0430",thingsTheme:"\u0422\u0435\u043C\u0430 Things"},coreStatuses:{buttons:{checkStatuses:{name:"\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0442\u0438 \u0442\u0430 \u043F\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u0442\u0438 \u0432\u0430\u0448\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438",tooltip:"\u0421\u0442\u0432\u043E\u0440\u0456\u0442\u044C \u043D\u043E\u0432\u0438\u0439 \u0444\u0430\u0439\u043B \u0443 \u043A\u043E\u0440\u0435\u043D\u0456 \u0441\u0445\u043E\u0432\u0438\u0449\u0430, \u0449\u043E \u043C\u0456\u0441\u0442\u0438\u0442\u044C \u0434\u0456\u0430\u0433\u0440\u0430\u043C\u0443 Mermaid \u043F\u043E\u0442\u043E\u0447\u043D\u0438\u0445 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u044C \u0441\u0442\u0430\u0442\u0443\u0441\u0443."}},description:{line1:"\u0426\u0435 \u043E\u0441\u043D\u043E\u0432\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438, \u044F\u043A\u0456 Tasks \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454 \u043D\u0430\u0442\u0438\u0432\u043D\u043E, \u0431\u0435\u0437 \u043F\u043E\u0442\u0440\u0435\u0431\u0438 \u0432 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u043E\u043C\u0443 CSS-\u0441\u0442\u0438\u043B\u044E\u0432\u0430\u043D\u043D\u0456 \u0447\u0438 \u0442\u0435\u043C\u0430\u0445.",line2:"\u0412\u0438 \u043C\u043E\u0436\u0435\u0442\u0435 \u0434\u043E\u0434\u0430\u0432\u0430\u0442\u0438, \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0442\u0430 \u0434\u043E\u0434\u0430\u0432\u0430\u0442\u0438 \u0432\u043B\u0430\u0441\u043D\u0456 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438 \u0432 \u0440\u043E\u0437\u0434\u0456\u043B\u0456 \u043D\u0438\u0436\u0447\u0435."},heading:"\u041E\u0441\u043D\u043E\u0432\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438"},customStatuses:{buttons:{addAllUnknown:{name:"\u0414\u043E\u0434\u0430\u0442\u0438 \u0432\u0441\u0456 \u043D\u0435\u0432\u0456\u0434\u043E\u043C\u0456 \u0442\u0438\u043F\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432"},addNewStatus:{name:"\u0414\u043E\u0434\u0430\u0442\u0438 \u043D\u043E\u0432\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0456"},resetCustomStatuses:{name:"\u0421\u043A\u0438\u043D\u0443\u0442\u0438 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u0442\u0438\u043F\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432 \u0434\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u044C \u0437\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C"}},description:{line1:"\u0421\u043F\u043E\u0447\u0430\u0442\u043A\u0443 \u0441\u043B\u0456\u0434 <b>\u0432\u0438\u0431\u0440\u0430\u0442\u0438 \u0442\u0430 \u0432\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0438 CSS-\u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442 \u0430\u0431\u043E \u0442\u0435\u043C\u0443</b> \u0434\u043B\u044F \u0441\u0442\u0438\u043B\u0456\u0437\u0430\u0446\u0456\u0457 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0438\u0445 \u043F\u0440\u0430\u043F\u043E\u0440\u0446\u0456\u0432.",line2:"\u041F\u043E\u0442\u0456\u043C \u0441\u043A\u043E\u0440\u0438\u0441\u0442\u0430\u0439\u0442\u0435\u0441\u044F \u043A\u043D\u043E\u043F\u043A\u0430\u043C\u0438 \u043D\u0438\u0436\u0447\u0435, \u0449\u043E\u0431 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u0442\u0438 \u0441\u0432\u043E\u0457 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438 \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u043D\u043E \u0434\u043E \u0432\u0438\u0431\u0440\u0430\u043D\u0438\u0445 CSS-\u043F\u0440\u0430\u043F\u043E\u0440\u0446\u0456\u0432.",line3:"<b>\u041F\u0440\u0438\u043C\u0456\u0442\u043A\u0430</b> \u0411\u0443\u0434\u044C-\u044F\u043A\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438 \u0437 \u0442\u0438\u043C \u0441\u0430\u043C\u0438\u043C \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u043C, \u0449\u043E \u0439 \u043F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438, \u0431\u0443\u0434\u0435 \u043F\u0440\u043E\u0456\u0433\u043D\u043E\u0440\u043E\u0432\u0430\u043D\u043E. \u0412\u0438 \u043C\u043E\u0436\u0435\u0442\u0435 \u043F\u0456\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0438 \u0444\u0430\u043A\u0442\u0438\u0447\u043D\u043E \u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438, \u0432\u0438\u043A\u043E\u043D\u0430\u0432\u0448\u0438 \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \xAB\u0421\u0442\u0432\u043E\u0440\u0438\u0442\u0438 \u0430\u0431\u043E \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0437\u0430\u0434\u0430\u0447\u0443\xBB \u0442\u0430 \u043F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0432\u0448\u0438 \u0441\u043F\u0430\u0434\u043D\u0435 \u043C\u0435\u043D\u044E \xAB\u0421\u0442\u0430\u0442\u0443\u0441\xBB.",line4:"\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u044C\u0442\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0456\u044E, \u0449\u043E\u0431 \u0440\u043E\u0437\u043F\u043E\u0447\u0430\u0442\u0438!"},heading:"\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438"},heading:"\u0421\u0442\u0430\u0442\u0443\u0441\u0438 \u0437\u0430\u0434\u0430\u0447"}}}});var Vb,Bb=ee(()=>{Vb={main:{loadingPlugin:"\u52A0\u8F7D\u63D2\u4EF6: {{name}} v{{version}}",unloadingPlugin:"\u5378\u8F7D\u63D2\u4EF6: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"\u5982\u679C\u542F\u7528\uFF0C\u6B64\u72B6\u6001\u5C06\u4F5C\u4E3A\u547D\u4EE4\u53EF\u7528,\u56E0\u6B64\u60A8\u53EF\u4EE5\u6307\u5B9A\u5FEB\u6377\u952E\u5E76\u4F7F\u7528\u5B83\u5207\u6362\u72B6\u6001\u3002",name:"\u53EF\u7528\u4F5C\u547D\u4EE4"},editNextStatusSymbol:{description:"\u5355\u51FB\u65F6\uFF0C\u8FD9\u662F\u4E0B\u4E00\u6B65\u5E94\u8BE5\u4F7F\u7528\u7684\u7B26\u53F7\u3002",name:"\u4EFB\u52A1\u4E0B\u4E00\u4E2A\u72B6\u6001\u7B26\u53F7"},editStatusName:{description:"\u8FD9\u662F\u4EFB\u52A1\u72B6\u6001\u7684\u53CB\u597D\u540D\u79F0.",name:"\u4EFB\u52A1\u72B6\u6001\u540D\u79F0"},editStatusSymbol:{description:"\u8FD9\u662F\u65B9\u62EC\u53F7\u4E2D\u7684\u5B57\u7B26\u3002\uFF08\u4EC5\u53EF\u7F16\u8F91\u81EA\u5B9A\u4E49\u72B6\u6001,\u4E0D\u53EF\u7F16\u8F91\u6838\u5FC3\u72B6\u6001\u3002\uFF09",name:"\u4EFB\u52A1\u72B6\u6001\u7B26\u53F7"},editStatusType:{description:"\u63A7\u5236\u641C\u7D22\u548C\u5207\u6362\u72B6\u6001\u7684\u884C\u4E3A\u3002",name:"\u4EFB\u52A1\u72B6\u6001\u7C7B\u578B"},fixErrorsBeforeSaving:"\u5728\u4FDD\u5B58\u524D\u4FEE\u590D\u9519\u8BEF\u3002"}},reports:{statusRegistry:{about:{createdBy:"\u6B64\u6587\u4EF6\u7531 Obsidian tasks \u63D2\u4EF6(version {{version}})\u521B\u5EFA,\u4EE5\u5E2E\u52A9\u53EF\u89C6\u5316\u6B64\u4ED3\u5E93\u4E2D\u7684\u4EFB\u52A1\u72B6\u6001.",deleteFileAnyTime:"\u60A8\u53EF\u4EE5\u968F\u65F6\u5220\u9664\u6B64\u6587\u4EF6.",title:"\u5173\u4E8E\u6B64\u6587\u4EF6",updateReport:{line1:"\u5982\u679C\u66F4\u6539 Tasks \u72B6\u6001\u8BBE\u7F6E,\u5219\u53EF\u4EE5\u901A\u8FC7\u4EE5\u4E0B\u65B9\u5F0F\u83B7\u53D6\u66F4\u65B0\u540E\u7684\u62A5\u544A:",line2:"\u524D\u5F80 `\u8BBE\u7F6E` -> `Tasks`\u3002",line3:"\u70B9\u51FB `\u67E5\u770B\u5E76\u68C0\u67E5\u60A8\u7684\u72B6\u6001`\u3002"}},columnHeadings:{nextStatusSymbol:"\u4E0B\u4E00\u4E2A\u72B6\u6001\u7B26\u53F7",problems:"\u95EE\u9898 (\u5982\u679C\u5B58\u5728)",statusName:"\u72B6\u6001\u540D\u79F0",statusSymbol:"\u72B6\u6001\u7B26\u53F7",statusType:"\u72B6\u6001\u7C7B\u578B"},loadedSettings:{settingsActuallyUsed:"\u8FD9\u4E9B\u662F Tasks \u5B9E\u9645\u4F7F\u7528\u7684\u8BBE\u7F6E.",switchToLivePreview:"\u5207\u6362\u5230\u5B9E\u65F6\u9884\u89C8\u6216\u9605\u8BFB\u6A21\u5F0F\u4EE5\u67E5\u770B\u56FE\u8868.",title:"\u5DF2\u52A0\u8F7D\u8BBE\u7F6E"},messages:{cannotFindNextStatus:"\u672A\u80FD\u610F\u5916\u627E\u5230\u4E0B\u4E00\u4E2A\u72B6\u6001.",duplicateSymbol:"\u91CD\u590D\u7684\u7B26\u53F7 '{{symbol}}':\u6B64\u72B6\u6001\u5C06\u88AB\u5FFD\u7565.",emptySymbol:"\u7A7A\u7B26\u53F7:\u6B64\u72B6\u6001\u5C06\u88AB\u5FFD\u7565.",nextSymbolUnknown:"\u4E0B\u4E00\u4E2A\u7B26\u53F7 {{symbol}} \u672A\u77E5:\u8BF7\u521B\u5EFA\u7B26\u53F7\u4E3A {{symbol}} \u7684\u72B6\u6001.",notConventionalType:"\u4F9B\u53C2\u8003,\u72B6\u6001\u7B26\u53F7 {{symbol}} \u7684\u5E38\u89C4\u7C7B\u578B\u662F {{type}}:\u60A8\u53EF\u80FD\u5E0C\u671B\u67E5\u770B\u6B64\u7C7B\u578B.",wrongTypeAfterDone:{line1:"\u6B64`\u5B8C\u6210`\u72B6\u6001\u540E\u8DDF\u968F\u7684\u662F{{nextType}}\uFF0C\u800C\u4E0D\u662F`\u5F85\u529E`\u6216`\u8FDB\u884C\u4E2D`\u3002",line2:"\u5982\u679C\u7528\u4E8E\u5B8C\u6210\u4E00\u4E2A\u91CD\u590D\u4EFB\u52A1\uFF0C\u5B83\u540E\u9762\u4F1A\u8DDF\u7740\u5F85\u529E`\u6216`\u8FDB\u884C\u4E2D`\uFF0C\u4EE5\u786E\u4FDD\u4E0B\u4E00\u4E2A\u4EFB\u52A1\u7B26\u5408\u201C\u672A\u5B8C\u6210\u201D\u7684\u7B5B\u9009\u6761\u4EF6\u3002",line3:"\u8BF7\u53C2\u9605[\u91CD\u590D\u4EFB\u52A1\u548C\u81EA\u5B9A\u4E49\u72B6\u6001]({{helpURL}})\u3002"}},statusSettings:{comment:{line1:"\u5207\u6362\u5230\u5B9E\u65F6\u9884\u89C8\u6216\u9605\u8BFB\u6A21\u5F0F\u4EE5\u67E5\u770B\u8868\u683C.",line2:"\u5982\u679C\u72B6\u6001\u540D\u79F0\u4E2D\u6709\u4EFB\u4F55Markdown\u683C\u5F0F\u5B57\u7B26,\u5982 '*' \u6216 '_',",line3:"\u9ED1\u66DC\u77F3\u53EA\u80FD\u5728\u9605\u8BFB\u6A21\u5F0F\u4E0B\u6B63\u786E\u6E32\u67D3\u8868\u683C."},theseAreStatusValues:"\u8FD9\u4E9B\u662F\u6838\u5FC3\u548C\u81EA\u5B9A\u4E49\u72B6\u6001\u90E8\u5206\u4E2D\u7684\u72B6\u6001\u503C.",title:"\u72B6\u6001\u8BBE\u7F6E"}}},settings:{autoSuggest:{heading:"\u81EA\u52A8\u5EFA\u8BAE",maxSuggestions:{description:'\u5F53\u81EA\u52A8\u5EFA\u8BAE\u83DC\u5355\u5F39\u51FA\u65F6\uFF0C\u5E94\u663E\u793A\u591A\u5C11\u6761\u5EFA\u8BAE (\u5305\u542B "\u23CE" \u9009\u9879)\u3002',name:"\u8981\u663E\u793A\u7684\u6700\u5927\u81EA\u52A8\u5EFA\u8BAE\u6570"},minLength:{description:"\u5982\u679C\u9AD8\u4E8E0\uFF0C\u5219\u53EA\u6709\u5728\u8BC6\u522B\u51FA\u4EFB\u4F55\u652F\u6301\u7684\u5173\u952E\u5B57\u7684\u5F00\u5934\u65F6\u624D\u4F1A\u89E6\u53D1\u81EA\u52A8\u5EFA\u8BAE\u3002",name:"\u81EA\u52A8\u5EFA\u8BAE\u7684\u6700\u5C0F\u5339\u914D\u957F\u5EA6"},toggle:{description:"\u542F\u7528\u6B64\u529F\u80FD\u5C06\u5728\u8BC6\u522B\u7684\u4EFB\u52A1\u884C\u5185\u8F93\u5165\u65F6\u6253\u5F00\u667A\u80FD\u5EFA\u8BAE\u83DC\u5355\u3002",name:"\u81EA\u52A8\u5EFA\u8BAE\u4EFB\u52A1\u5185\u5BB9"}},changeRequiresRestart:"\u66F4\u6539\u4EFB\u4F55\u8BBE\u7F6E\u90FD\u9700\u8981\u91CD\u65B0\u542F\u52A8Obsidian\u3002",dates:{cancelledDate:{description:"\u542F\u7528\u6B64\u529F\u80FD\u5C06\u5728\u4EFB\u52A1\u8BBE\u7F6E\u4E3A\u53D6\u6D88\u65F6\uFF0C\u5728\u5176\u672B\u5C3E\u6DFB\u52A0\u65F6\u95F4\u6233 \u274C YYYY-MM-DD\u3002",name:"\u8BBE\u7F6E\u6BCF\u4E2A\u5DF2\u53D6\u6D88\u7684\u4EFB\u52A1\u7684\u53D6\u6D88\u65E5\u671F"},createdDate:{description:"\u542F\u7528\u6B64\u529F\u80FD\u5C06\u5728\u901A\u8FC7\u201CCreate or edit task\u201D\u547D\u4EE4\u6216\u5B8C\u6210\u91CD\u590D\u4EFB\u52A1\u65F6\uFF0C\u5728\u5176\u4ED6\u65E5\u671F\u503C\u4E4B\u524D\u6DFB\u52A0\u65F6\u95F4\u6233\u2795YYYY-MM-DD\u3002",name:"\u8BBE\u7F6E\u6BCF\u4E2A\u5DF2\u6DFB\u52A0\u4EFB\u52A1\u7684\u521B\u5EFA\u65E5\u671F"},doneDate:{description:"\u542F\u7528\u6B64\u529F\u80FD\u5C06\u5728\u4EFB\u52A1\u88AB\u8BBE\u7F6E\u4E3A\u5B8C\u6210\u65F6\uFF0C\u5728\u5176\u672B\u5C3E\u6DFB\u52A0\u65F6\u95F4\u6233 \u2705 YYYY-MM-DD\u3002",name:"\u8BBE\u7F6E\u6BCF\u4E2A\u5DF2\u5B8C\u6210\u4EFB\u52A1\u7684\u5B8C\u6210\u65E5\u671F"},heading:"\u65E5\u671F"},datesFromFileNames:{heading:"\u4ECE\u6587\u4EF6\u540D\u4E2D\u63D0\u53D6\u65E5\u671F",scheduledDate:{extraFormat:{description:{line1:"\u4EFB\u52A1\u63D2\u4EF6\u5728\u5C06\u6587\u4EF6\u540D\u7528\u4F5C\u672A\u6CE8\u660E\u65E5\u671F\u4EFB\u52A1\u7684\u8BA1\u5212\u65E5\u671F\u65F6\uFF0C\u5C06\u8BC6\u522B\u7684\u9644\u52A0\u65E5\u671F\u683C\u5F0F\u3002",line2:"\u8BED\u6CD5\u53C2\u8003"},name:"\u4E3A\u65E0\u65E5\u671F\u4EFB\u52A1\u6DFB\u52A0\u6587\u4EF6\u540D\u65E5\u671F\u683C\u5F0F\u4F5C\u4E3A\u8BA1\u5212\u65E5\u671F",placeholder:"\u793A\u4F8B\uFF1AMMM DD YYYY"},folders:{description:"\u5982\u679C\u8981\u5728\u5168\u5C40\u4F7F\u7528\u9ED8\u8BA4\u7684\u8BA1\u5212\u65E5\u671F\uFF0C\u8BF7\u4FDD\u7559\u4E3A\u7A7A,\u6216\u8005\u8F93\u5165\u4EE5\u9017\u53F7\u5206\u9694\u7684\u6587\u4EF6\u5939\u5217\u8868\u3002",name:"\u5177\u6709\u9ED8\u8BA4\u8BA1\u5212\u65E5\u671F\u7684\u6587\u4EF6\u5939"},toggle:{description:{line1:"\u7528\u4E8E\u8282\u7701\u8F93\u5165\u8BA1\u5212 (\u23F3) \u65E5\u671F\u7684\u65F6\u95F4\u3002",line2:"\u5982\u679C\u542F\u7528\u6B64\u9009\u9879\uFF0C\u5219\u4EFB\u4F55\u672A\u6CE8\u660E\u65E5\u671F\u7684\u4EFB\u52A1\u90FD\u5C06\u88AB\u8D4B\u4E88\u4ECE\u5176\u6587\u4EF6\u540D\u4E2D\u63D0\u53D6\u7684\u9ED8\u8BA4\u201C\u8BA1\u5212\u65E5\u671F\u201D\u3002",line3:"\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0CTasks \u63D2\u4EF6\u5C06\u5339\u914D <code>YYYY-MM-DD</code> \u548C <code>YYYYMMDD</code> \u4E24\u79CD\u65E5\u671F\u683C\u5F0F\u3002",line4:"\u672A\u6CE8\u660E\u65E5\u671F\u7684\u4EFB\u52A1\u6307\u6CA1\u6709\u622A\u6B62\u65E5\u671F (\u{1F4C5} ), \u8BA1\u5212\u65E5\u671F (\u23F3) \u548C\u5F00\u59CB\u65E5\u671F(\u{1F6EB}) \u7684\u4EFB\u52A1\u3002"},name:"\u5C06\u6587\u4EF6\u540D\u7528\u4F5C\u672A\u6CE8\u660E\u65E5\u671F\u7684\u4EFB\u52A1\u7684\u8BA1\u5212\u65E5\u671F"}}},dialogs:{accessKeys:{description:"\u5982\u679C\u5BF9\u8BDD\u6846\u4E2D\u5404\u79CD\u63A7\u4EF6\u7684\u5FEB\u6377\u952E\u4E0E\u7CFB\u7EDF\u5FEB\u6377\u952E\u53D1\u751F\u51B2\u7A81\uFF0C\u60A8\u53EF\u4EE5\u5728\u8FD9\u91CC\u505C\u7528\u5B83\u4EEC\u3002",name:"\u5728\u5BF9\u8BDD\u6846\u4E2D\u4F7F\u7528\u5FEB\u6377\u952E"},heading:"\u5BF9\u8BDD\u6846"},format:{description:{line1:"Tasks \u7528\u4E8E\u8BFB\u53D6\u548C\u5199\u5165\u4EFB\u52A1\u7684\u683C\u5F0F.",line2:"<b>\u91CD\u70B9:</b> \u76EE\u524D Tasks \u53EA\u652F\u6301\u540C\u65F6\u4F7F\u7528\u4E00\u79CD\u683C\u5F0F\u3002\u9009\u62E9 dataview \u5C06 <b>\u4F7F Tasks \u505C\u6B62\u8BFB\u53D6\u81EA\u6709\u7684\u8868\u60C5\u7B26\u53F7\u683C\u5F0F</b>"},displayName:{dataview:"Dataview \u683C\u5F0F",tasksEmojiFormat:"Tasks \u8868\u60C5\u683C\u5F0F"},name:"\u4EFB\u52A1\u683C\u5F0F"},globalFilter:{filter:{description:{line1:"\u5EFA\u8BAE\uFF1A\u5982\u679C\u60A8\u5E0C\u671B\u4ED3\u5E93\u4E2D\u7684\u6240\u6709\u4EFB\u52A1\u5217\u8868\u9879\u90FD\u7531\u6B64\u63D2\u4EF6\u7BA1\u7406\uFF0C\u8BF7\u7559\u7A7A\u3002",line2:'\u5982\u679C\u60A8\u5E0C\u671B Tasks \u4EC5\u4F5C\u7528\u4E8E "<code>- [ ]</code>" \u4EFB\u52A1\u5217\u8868\u9879\u7684\u5B50\u96C6\uFF0C\u8BF7\u4F7F\u7528\u5168\u5C40\u7B5B\u9009\u5668,\u4EE5\u4FBF\u53EA\u6709\u5728\u5176\u63CF\u8FF0\u4E2D\u5305\u542B\u6307\u5B9A\u7684\u5B57\u7B26\u4E32\u7684\u4EFB\u52A1\u5217\u8868\u9879\u624D\u88AB\u89C6\u4E3A\u4EFB\u52A1\u3002',line3:"\u4F8B\u5982\uFF0C\u5982\u679C\u5C06\u5168\u5C40\u7B5B\u9009\u5668\u8BBE\u7F6E\u4E3A <code>#task</code>\uFF0C\u5219 Tasks \u63D2\u4EF6\u5C06\u4EC5\u5904\u7406\u6807\u8BB0\u4E3A <code>#task</code> \u7684\u4EFB\u52A1\u5217\u8868\u9879\u3002",line4:"\u5176\u4ED6\u4EFB\u52A1\u5217\u8868\u9879\u5C06\u4FDD\u6301\u6B63\u5E38,\u4E0D\u4F1A\u51FA\u73B0\u5728\u67E5\u8BE2\u4E2D\u6216\u8BBE\u7F6E\u5B8C\u6210\u65E5\u671F\u3002"},name:"\u5168\u5C40\u7B5B\u9009\u5668",placeholder:"\u4F8B\u5982:#task \u6216 TODO"},heading:"\u5168\u5C40\u4EFB\u52A1\u7B5B\u9009\u5668",removeFilter:{description:"\u542F\u7528\u6B64\u9009\u9879\u5C06\u5728\u663E\u793A\u4EFB\u52A1\u65F6\u4ECE\u4EFB\u52A1\u63CF\u8FF0\u4E2D\u5220\u9664\u8BBE\u7F6E\u4E3A\u5168\u5C40\u7B5B\u9009\u5668\u7684\u5B57\u7B26\u4E32.",name:"\u4ECE\u63CF\u8FF0\u4E2D\u5220\u9664\u5168\u5C40\u7B5B\u9009\u5668"}},globalQuery:{heading:"\u5168\u5C40\u67E5\u8BE2",query:{description:"\u81EA\u52A8\u5305\u542B\u5728\u5E93\u4E2D\u6BCF\u4E2A Tasks \u5757\u5F00\u5934\u7684\u67E5\u8BE2\u8BED\u53E5.\u7528\u4E8E\u6DFB\u52A0\u9ED8\u8BA4\u8FC7\u6EE4\u5668\u6216\u5E03\u5C40\u9009\u9879\u3002",placeholder:`\u4F8B\u5982... +show urgency`}},recurringTasks:{heading:"\u041F\u043E\u0432\u0442\u043E\u0440\u044E\u0432\u0430\u043D\u0456 \u0437\u0430\u0434\u0430\u0447\u0456",nextLine:{description:"\u0423\u0432\u0456\u043C\u043A\u043D\u0435\u043D\u043D\u044F \u0446\u044C\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0437\u043C\u0443\u0441\u0438\u0442\u044C \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u043D\u044F \u0437\u0430\u0434\u0430\u0447\u0456 \u0437\u2019\u044F\u0432\u043B\u044F\u0442\u0438\u0441\u044F \u043D\u0430 \u0440\u044F\u0434\u043A\u0443 \u043D\u0438\u0436\u0447\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E\u0457 \u0437\u0430\u0434\u0430\u0447\u0456. \u0406\u043D\u0430\u043A\u0448\u0435 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u043D\u044F \u0437\u2019\u044F\u0432\u0438\u0442\u044C\u0441\u044F \u043F\u0435\u0440\u0435\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E\u044E.",name:"\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0435 \u043F\u043E\u0432\u0442\u043E\u0440\u0435\u043D\u043D\u044F \u0437\u2019\u044F\u0432\u043B\u044F\u0454\u0442\u044C\u0441\u044F \u043D\u0430 \u0440\u044F\u0434\u043A\u0443 \u043D\u0438\u0436\u0447\u0435"},removeScheduledDate:{description:{line1:"",line2:""},name:""}},seeTheDocumentation:"\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0442\u0438 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0456\u044E",statuses:{collections:{anuppuccinTheme:"\u0422\u0435\u043C\u0430 AnuPpuccin",auraTheme:"\u0422\u0435\u043C\u0430 Aura",borderTheme:"\u0422\u0435\u043C\u0430 Border",buttons:{addCollection:{name:"{{themeName}}: \u0414\u043E\u0434\u0430\u0442\u0438 {{numberOfStatuses}} \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0432\u0430\u043D\u0438\u0445 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432"}},ebullientworksTheme:"\u0422\u0435\u043C\u0430 Ebullientworks",itsThemeAndSlrvbCheckboxes:"\u0422\u0435\u043C\u0430 ITS \u0456 \u043F\u0440\u0430\u043F\u043E\u0440\u0446\u0456 SlRvb",lytModeTheme:"\u0422\u0435\u043C\u0430 LYT Mode (\u043B\u0438\u0448\u0435 \u0442\u0435\u043C\u043D\u0438\u0439 \u0440\u0435\u0436\u0438\u043C)",minimalTheme:"\u041C\u0456\u043D\u0456\u043C\u0430\u043B\u044C\u043D\u0430 \u0442\u0435\u043C\u0430",thingsTheme:"\u0422\u0435\u043C\u0430 Things"},coreStatuses:{buttons:{checkStatuses:{name:"\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0442\u0438 \u0442\u0430 \u043F\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u0442\u0438 \u0432\u0430\u0448\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438",tooltip:"\u0421\u0442\u0432\u043E\u0440\u0456\u0442\u044C \u043D\u043E\u0432\u0438\u0439 \u0444\u0430\u0439\u043B \u0443 \u043A\u043E\u0440\u0435\u043D\u0456 \u0441\u0445\u043E\u0432\u0438\u0449\u0430, \u0449\u043E \u043C\u0456\u0441\u0442\u0438\u0442\u044C \u0434\u0456\u0430\u0433\u0440\u0430\u043C\u0443 Mermaid \u043F\u043E\u0442\u043E\u0447\u043D\u0438\u0445 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u043D\u044C \u0441\u0442\u0430\u0442\u0443\u0441\u0443."}},description:{line1:"\u0426\u0435 \u043E\u0441\u043D\u043E\u0432\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438, \u044F\u043A\u0456 Tasks \u043F\u0456\u0434\u0442\u0440\u0438\u043C\u0443\u0454 \u043D\u0430\u0442\u0438\u0432\u043D\u043E, \u0431\u0435\u0437 \u043F\u043E\u0442\u0440\u0435\u0431\u0438 \u0432 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u043E\u043C\u0443 CSS-\u0441\u0442\u0438\u043B\u044E\u0432\u0430\u043D\u043D\u0456 \u0447\u0438 \u0442\u0435\u043C\u0430\u0445.",line2:"\u0412\u0438 \u043C\u043E\u0436\u0435\u0442\u0435 \u0434\u043E\u0434\u0430\u0432\u0430\u0442\u0438, \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0442\u0430 \u0434\u043E\u0434\u0430\u0432\u0430\u0442\u0438 \u0432\u043B\u0430\u0441\u043D\u0456 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438 \u0432 \u0440\u043E\u0437\u0434\u0456\u043B\u0456 \u043D\u0438\u0436\u0447\u0435."},heading:"\u041E\u0441\u043D\u043E\u0432\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438"},customStatuses:{buttons:{addAllUnknown:{name:"\u0414\u043E\u0434\u0430\u0442\u0438 \u0432\u0441\u0456 \u043D\u0435\u0432\u0456\u0434\u043E\u043C\u0456 \u0442\u0438\u043F\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432"},addNewStatus:{name:"\u0414\u043E\u0434\u0430\u0442\u0438 \u043D\u043E\u0432\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0456"},resetCustomStatuses:{name:"\u0421\u043A\u0438\u043D\u0443\u0442\u0438 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u0442\u0438\u043F\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0456\u0432 \u0434\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u044C \u0437\u0430 \u0437\u0430\u043C\u043E\u0432\u0447\u0443\u0432\u0430\u043D\u043D\u044F\u043C"}},description:{line1:"\u0421\u043F\u043E\u0447\u0430\u0442\u043A\u0443 \u0441\u043B\u0456\u0434 <b>\u0432\u0438\u0431\u0440\u0430\u0442\u0438 \u0442\u0430 \u0432\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0438 CSS-\u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442 \u0430\u0431\u043E \u0442\u0435\u043C\u0443</b> \u0434\u043B\u044F \u0441\u0442\u0438\u043B\u0456\u0437\u0430\u0446\u0456\u0457 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0438\u0445 \u043F\u0440\u0430\u043F\u043E\u0440\u0446\u0456\u0432.",line2:"\u041F\u043E\u0442\u0456\u043C \u0441\u043A\u043E\u0440\u0438\u0441\u0442\u0430\u0439\u0442\u0435\u0441\u044F \u043A\u043D\u043E\u043F\u043A\u0430\u043C\u0438 \u043D\u0438\u0436\u0447\u0435, \u0449\u043E\u0431 \u043D\u0430\u043B\u0430\u0448\u0442\u0443\u0432\u0430\u0442\u0438 \u0441\u0432\u043E\u0457 \u043A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438 \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u043D\u043E \u0434\u043E \u0432\u0438\u0431\u0440\u0430\u043D\u0438\u0445 CSS-\u043F\u0440\u0430\u043F\u043E\u0440\u0446\u0456\u0432.",line3:"<b>\u041F\u0440\u0438\u043C\u0456\u0442\u043A\u0430</b> \u0411\u0443\u0434\u044C-\u044F\u043A\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438 \u0437 \u0442\u0438\u043C \u0441\u0430\u043C\u0438\u043C \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u043C, \u0449\u043E \u0439 \u043F\u043E\u043F\u0435\u0440\u0435\u0434\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438, \u0431\u0443\u0434\u0435 \u043F\u0440\u043E\u0456\u0433\u043D\u043E\u0440\u043E\u0432\u0430\u043D\u043E. \u0412\u0438 \u043C\u043E\u0436\u0435\u0442\u0435 \u043F\u0456\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0438 \u0444\u0430\u043A\u0442\u0438\u0447\u043D\u043E \u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438, \u0432\u0438\u043A\u043E\u043D\u0430\u0432\u0448\u0438 \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \xAB\u0421\u0442\u0432\u043E\u0440\u0438\u0442\u0438 \u0430\u0431\u043E \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0437\u0430\u0434\u0430\u0447\u0443\xBB \u0442\u0430 \u043F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u0443\u0432\u0448\u0438 \u0441\u043F\u0430\u0434\u043D\u0435 \u043C\u0435\u043D\u044E \xAB\u0421\u0442\u0430\u0442\u0443\u0441\xBB.",line4:"\u041F\u0435\u0440\u0435\u0433\u043B\u044F\u043D\u044C\u0442\u0435 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0456\u044E, \u0449\u043E\u0431 \u0440\u043E\u0437\u043F\u043E\u0447\u0430\u0442\u0438!"},heading:"\u041A\u043E\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0446\u044C\u043A\u0456 \u0441\u0442\u0430\u0442\u0443\u0441\u0438"},heading:"\u0421\u0442\u0430\u0442\u0443\u0441\u0438 \u0437\u0430\u0434\u0430\u0447"}}}});var Vb,Bb=ee(()=>{Vb={main:{loadingPlugin:"\u52A0\u8F7D\u63D2\u4EF6: {{name}} v{{version}}",unloadingPlugin:"\u5378\u8F7D\u63D2\u4EF6: {{name}} v{{version}}"},modals:{customStatusModal:{editAvailableAsCommand:{description:"\u5982\u679C\u542F\u7528\uFF0C\u6B64\u72B6\u6001\u5C06\u4F5C\u4E3A\u547D\u4EE4\u53EF\u7528,\u56E0\u6B64\u60A8\u53EF\u4EE5\u6307\u5B9A\u5FEB\u6377\u952E\u5E76\u4F7F\u7528\u5B83\u5207\u6362\u72B6\u6001\u3002",name:"\u53EF\u7528\u4F5C\u547D\u4EE4"},editNextStatusSymbol:{description:"\u5355\u51FB\u65F6\uFF0C\u8FD9\u662F\u4E0B\u4E00\u6B65\u5E94\u8BE5\u4F7F\u7528\u7684\u7B26\u53F7\u3002",name:"\u4EFB\u52A1\u4E0B\u4E00\u4E2A\u72B6\u6001\u7B26\u53F7"},editStatusName:{description:"\u8FD9\u662F\u4EFB\u52A1\u72B6\u6001\u7684\u53CB\u597D\u540D\u79F0.",name:"\u4EFB\u52A1\u72B6\u6001\u540D\u79F0"},editStatusSymbol:{description:"\u8FD9\u662F\u65B9\u62EC\u53F7\u4E2D\u7684\u5B57\u7B26\u3002\uFF08\u4EC5\u53EF\u7F16\u8F91\u81EA\u5B9A\u4E49\u72B6\u6001,\u4E0D\u53EF\u7F16\u8F91\u6838\u5FC3\u72B6\u6001\u3002\uFF09",name:"\u4EFB\u52A1\u72B6\u6001\u7B26\u53F7"},editStatusType:{description:"\u63A7\u5236\u641C\u7D22\u548C\u5207\u6362\u72B6\u6001\u7684\u884C\u4E3A\u3002",name:"\u4EFB\u52A1\u72B6\u6001\u7C7B\u578B"},fixErrorsBeforeSaving:"\u5728\u4FDD\u5B58\u524D\u4FEE\u590D\u9519\u8BEF\u3002"}},reports:{statusRegistry:{about:{createdBy:"\u6B64\u6587\u4EF6\u7531 Obsidian tasks \u63D2\u4EF6(version {{version}})\u521B\u5EFA,\u4EE5\u5E2E\u52A9\u53EF\u89C6\u5316\u6B64\u4ED3\u5E93\u4E2D\u7684\u4EFB\u52A1\u72B6\u6001.",deleteFileAnyTime:"\u60A8\u53EF\u4EE5\u968F\u65F6\u5220\u9664\u6B64\u6587\u4EF6.",title:"\u5173\u4E8E\u6B64\u6587\u4EF6",updateReport:{line1:"\u5982\u679C\u66F4\u6539 Tasks \u72B6\u6001\u8BBE\u7F6E,\u5219\u53EF\u4EE5\u901A\u8FC7\u4EE5\u4E0B\u65B9\u5F0F\u83B7\u53D6\u66F4\u65B0\u540E\u7684\u62A5\u544A:",line2:"\u524D\u5F80 `\u8BBE\u7F6E` -> `Tasks`\u3002",line3:"\u70B9\u51FB `\u67E5\u770B\u5E76\u68C0\u67E5\u60A8\u7684\u72B6\u6001`\u3002"}},columnHeadings:{nextStatusSymbol:"\u4E0B\u4E00\u4E2A\u72B6\u6001\u7B26\u53F7",problems:"\u95EE\u9898 (\u5982\u679C\u5B58\u5728)",statusName:"\u72B6\u6001\u540D\u79F0",statusSymbol:"\u72B6\u6001\u7B26\u53F7",statusType:"\u72B6\u6001\u7C7B\u578B"},loadedSettings:{settingsActuallyUsed:"\u8FD9\u4E9B\u662F Tasks \u5B9E\u9645\u4F7F\u7528\u7684\u8BBE\u7F6E.",switchToLivePreview:"\u5207\u6362\u5230\u5B9E\u65F6\u9884\u89C8\u6216\u9605\u8BFB\u6A21\u5F0F\u4EE5\u67E5\u770B\u56FE\u8868.",title:"\u5DF2\u52A0\u8F7D\u8BBE\u7F6E"},messages:{cannotFindNextStatus:"\u672A\u80FD\u610F\u5916\u627E\u5230\u4E0B\u4E00\u4E2A\u72B6\u6001.",duplicateSymbol:"\u91CD\u590D\u7684\u7B26\u53F7 '{{symbol}}':\u6B64\u72B6\u6001\u5C06\u88AB\u5FFD\u7565.",emptySymbol:"\u7A7A\u7B26\u53F7:\u6B64\u72B6\u6001\u5C06\u88AB\u5FFD\u7565.",nextSymbolUnknown:"\u4E0B\u4E00\u4E2A\u7B26\u53F7 {{symbol}} \u672A\u77E5:\u8BF7\u521B\u5EFA\u7B26\u53F7\u4E3A {{symbol}} \u7684\u72B6\u6001.",notConventionalType:"\u4F9B\u53C2\u8003,\u72B6\u6001\u7B26\u53F7 {{symbol}} \u7684\u5E38\u89C4\u7C7B\u578B\u662F {{type}}:\u60A8\u53EF\u80FD\u5E0C\u671B\u67E5\u770B\u6B64\u7C7B\u578B.",wrongTypeAfterDone:{line1:"\u6B64`\u5B8C\u6210`\u72B6\u6001\u540E\u8DDF\u968F\u7684\u662F{{nextType}}\uFF0C\u800C\u4E0D\u662F`\u5F85\u529E`\u6216`\u8FDB\u884C\u4E2D`\u3002",line2:"\u5982\u679C\u7528\u4E8E\u5B8C\u6210\u4E00\u4E2A\u91CD\u590D\u4EFB\u52A1\uFF0C\u5B83\u540E\u9762\u4F1A\u8DDF\u7740\u5F85\u529E`\u6216`\u8FDB\u884C\u4E2D`\uFF0C\u4EE5\u786E\u4FDD\u4E0B\u4E00\u4E2A\u4EFB\u52A1\u7B26\u5408\u201C\u672A\u5B8C\u6210\u201D\u7684\u7B5B\u9009\u6761\u4EF6\u3002",line3:"\u8BF7\u53C2\u9605[\u91CD\u590D\u4EFB\u52A1\u548C\u81EA\u5B9A\u4E49\u72B6\u6001]({{helpURL}})\u3002"}},statusSettings:{comment:{line1:"\u5207\u6362\u5230\u5B9E\u65F6\u9884\u89C8\u6216\u9605\u8BFB\u6A21\u5F0F\u4EE5\u67E5\u770B\u8868\u683C.",line2:"\u5982\u679C\u72B6\u6001\u540D\u79F0\u4E2D\u6709\u4EFB\u4F55Markdown\u683C\u5F0F\u5B57\u7B26,\u5982 '*' \u6216 '_',",line3:"\u9ED1\u66DC\u77F3\u53EA\u80FD\u5728\u9605\u8BFB\u6A21\u5F0F\u4E0B\u6B63\u786E\u6E32\u67D3\u8868\u683C."},theseAreStatusValues:"\u8FD9\u4E9B\u662F\u6838\u5FC3\u548C\u81EA\u5B9A\u4E49\u72B6\u6001\u90E8\u5206\u4E2D\u7684\u72B6\u6001\u503C.",title:"\u72B6\u6001\u8BBE\u7F6E"}}},settings:{autoSuggest:{heading:"\u81EA\u52A8\u5EFA\u8BAE",maxSuggestions:{description:'\u5F53\u81EA\u52A8\u5EFA\u8BAE\u83DC\u5355\u5F39\u51FA\u65F6\uFF0C\u5E94\u663E\u793A\u591A\u5C11\u6761\u5EFA\u8BAE (\u5305\u542B "\u23CE" \u9009\u9879)\u3002',name:"\u8981\u663E\u793A\u7684\u6700\u5927\u81EA\u52A8\u5EFA\u8BAE\u6570"},minLength:{description:"\u5982\u679C\u9AD8\u4E8E0\uFF0C\u5219\u53EA\u6709\u5728\u8BC6\u522B\u51FA\u4EFB\u4F55\u652F\u6301\u7684\u5173\u952E\u5B57\u7684\u5F00\u5934\u65F6\u624D\u4F1A\u89E6\u53D1\u81EA\u52A8\u5EFA\u8BAE\u3002",name:"\u81EA\u52A8\u5EFA\u8BAE\u7684\u6700\u5C0F\u5339\u914D\u957F\u5EA6"},toggle:{description:"\u542F\u7528\u6B64\u529F\u80FD\u5C06\u5728\u8BC6\u522B\u7684\u4EFB\u52A1\u884C\u5185\u8F93\u5165\u65F6\u6253\u5F00\u667A\u80FD\u5EFA\u8BAE\u83DC\u5355\u3002",name:"\u81EA\u52A8\u5EFA\u8BAE\u4EFB\u52A1\u5185\u5BB9"}},changeRequiresRestart:"\u66F4\u6539\u4EFB\u4F55\u8BBE\u7F6E\u90FD\u9700\u8981\u91CD\u65B0\u542F\u52A8Obsidian\u3002",dates:{cancelledDate:{description:"\u542F\u7528\u6B64\u529F\u80FD\u5C06\u5728\u4EFB\u52A1\u8BBE\u7F6E\u4E3A\u53D6\u6D88\u65F6\uFF0C\u5728\u5176\u672B\u5C3E\u6DFB\u52A0\u65F6\u95F4\u6233 \u274C YYYY-MM-DD\u3002",name:"\u8BBE\u7F6E\u6BCF\u4E2A\u5DF2\u53D6\u6D88\u7684\u4EFB\u52A1\u7684\u53D6\u6D88\u65E5\u671F"},createdDate:{description:"\u542F\u7528\u6B64\u529F\u80FD\u5C06\u5728\u901A\u8FC7\u201CCreate or edit task\u201D\u547D\u4EE4\u6216\u5B8C\u6210\u91CD\u590D\u4EFB\u52A1\u65F6\uFF0C\u5728\u5176\u4ED6\u65E5\u671F\u503C\u4E4B\u524D\u6DFB\u52A0\u65F6\u95F4\u6233\u2795YYYY-MM-DD\u3002",name:"\u8BBE\u7F6E\u6BCF\u4E2A\u5DF2\u6DFB\u52A0\u4EFB\u52A1\u7684\u521B\u5EFA\u65E5\u671F"},doneDate:{description:"\u542F\u7528\u6B64\u529F\u80FD\u5C06\u5728\u4EFB\u52A1\u88AB\u8BBE\u7F6E\u4E3A\u5B8C\u6210\u65F6\uFF0C\u5728\u5176\u672B\u5C3E\u6DFB\u52A0\u65F6\u95F4\u6233 \u2705 YYYY-MM-DD\u3002",name:"\u8BBE\u7F6E\u6BCF\u4E2A\u5DF2\u5B8C\u6210\u4EFB\u52A1\u7684\u5B8C\u6210\u65E5\u671F"},heading:"\u65E5\u671F"},datesFromFileNames:{heading:"\u4ECE\u6587\u4EF6\u540D\u4E2D\u63D0\u53D6\u65E5\u671F",scheduledDate:{extraFormat:{description:{line1:"\u4EFB\u52A1\u63D2\u4EF6\u5728\u5C06\u6587\u4EF6\u540D\u7528\u4F5C\u672A\u6CE8\u660E\u65E5\u671F\u4EFB\u52A1\u7684\u8BA1\u5212\u65E5\u671F\u65F6\uFF0C\u5C06\u8BC6\u522B\u7684\u9644\u52A0\u65E5\u671F\u683C\u5F0F\u3002",line2:"\u8BED\u6CD5\u53C2\u8003"},name:"\u4E3A\u65E0\u65E5\u671F\u4EFB\u52A1\u6DFB\u52A0\u6587\u4EF6\u540D\u65E5\u671F\u683C\u5F0F\u4F5C\u4E3A\u8BA1\u5212\u65E5\u671F",placeholder:"\u793A\u4F8B\uFF1AMMM DD YYYY"},folders:{description:"\u5982\u679C\u8981\u5728\u5168\u5C40\u4F7F\u7528\u9ED8\u8BA4\u7684\u8BA1\u5212\u65E5\u671F\uFF0C\u8BF7\u4FDD\u7559\u4E3A\u7A7A,\u6216\u8005\u8F93\u5165\u4EE5\u9017\u53F7\u5206\u9694\u7684\u6587\u4EF6\u5939\u5217\u8868\u3002",name:"\u5177\u6709\u9ED8\u8BA4\u8BA1\u5212\u65E5\u671F\u7684\u6587\u4EF6\u5939"},toggle:{description:{line1:"\u7528\u4E8E\u8282\u7701\u8F93\u5165\u8BA1\u5212\u65E5\u671F (\u23F3) \u7684\u65F6\u95F4\u3002",line2:"\u5982\u679C\u542F\u7528\u6B64\u9009\u9879\uFF0C\u5219\u4EFB\u4F55\u672A\u6CE8\u660E\u65E5\u671F\u7684\u4EFB\u52A1\u90FD\u5C06\u88AB\u8D4B\u4E88\u4ECE\u5176\u6587\u4EF6\u540D\u4E2D\u63D0\u53D6\u7684\u9ED8\u8BA4\u201C\u8BA1\u5212\u65E5\u671F\u201D\u3002",line3:"\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0CTasks \u63D2\u4EF6\u5C06\u5339\u914D <code>YYYY-MM-DD</code> \u548C <code>YYYYMMDD</code> \u4E24\u79CD\u65E5\u671F\u683C\u5F0F\u3002",line4:"\u672A\u6CE8\u660E\u65E5\u671F\u7684\u4EFB\u52A1\u6307\u6CA1\u6709\u622A\u6B62\u65E5\u671F (\u{1F4C5} ), \u8BA1\u5212\u65E5\u671F (\u23F3) \u548C\u5F00\u59CB\u65E5\u671F(\u{1F6EB}) \u7684\u4EFB\u52A1\u3002"},name:"\u5C06\u6587\u4EF6\u540D\u7528\u4F5C\u672A\u6CE8\u660E\u65E5\u671F\u7684\u4EFB\u52A1\u7684\u8BA1\u5212\u65E5\u671F"}}},dialogs:{accessKeys:{description:"\u5982\u679C\u5BF9\u8BDD\u6846\u4E2D\u5404\u79CD\u63A7\u4EF6\u7684\u5FEB\u6377\u952E\u4E0E\u7CFB\u7EDF\u5FEB\u6377\u952E\u53D1\u751F\u51B2\u7A81\uFF0C\u60A8\u53EF\u4EE5\u5728\u8FD9\u91CC\u505C\u7528\u5B83\u4EEC\u3002",name:"\u5728\u5BF9\u8BDD\u6846\u4E2D\u4F7F\u7528\u5FEB\u6377\u952E"},heading:"\u5BF9\u8BDD\u6846"},format:{description:{line1:"Tasks \u7528\u4E8E\u8BFB\u53D6\u548C\u5199\u5165\u4EFB\u52A1\u7684\u683C\u5F0F.",line2:"<b>\u91CD\u70B9:</b> \u76EE\u524D Tasks \u53EA\u652F\u6301\u540C\u65F6\u4F7F\u7528\u4E00\u79CD\u683C\u5F0F\u3002\u9009\u62E9 dataview \u5C06 <b>\u4F7F Tasks \u505C\u6B62\u8BFB\u53D6\u81EA\u6709\u7684\u8868\u60C5\u7B26\u53F7\u683C\u5F0F</b>"},displayName:{dataview:"Dataview \u683C\u5F0F",tasksEmojiFormat:"Tasks \u8868\u60C5\u683C\u5F0F"},name:"\u4EFB\u52A1\u683C\u5F0F"},globalFilter:{filter:{description:{line1:"\u5EFA\u8BAE\uFF1A\u5982\u679C\u60A8\u5E0C\u671B\u4ED3\u5E93\u4E2D\u7684\u6240\u6709\u4EFB\u52A1\u5217\u8868\u9879\u90FD\u7531\u6B64\u63D2\u4EF6\u7BA1\u7406\uFF0C\u8BF7\u7559\u7A7A\u3002",line2:'\u5982\u679C\u60A8\u5E0C\u671B Tasks \u4EC5\u4F5C\u7528\u4E8E "<code>- [ ]</code>" \u4EFB\u52A1\u5217\u8868\u9879\u7684\u5B50\u96C6\uFF0C\u8BF7\u4F7F\u7528\u5168\u5C40\u7B5B\u9009\u5668,\u4EE5\u4FBF\u53EA\u6709\u5728\u5176\u63CF\u8FF0\u4E2D\u5305\u542B\u6307\u5B9A\u7684\u5B57\u7B26\u4E32\u7684\u4EFB\u52A1\u5217\u8868\u9879\u624D\u88AB\u89C6\u4E3A\u4EFB\u52A1\u3002',line3:"\u4F8B\u5982\uFF0C\u5982\u679C\u5C06\u5168\u5C40\u7B5B\u9009\u5668\u8BBE\u7F6E\u4E3A <code>#task</code>\uFF0C\u5219 Tasks \u63D2\u4EF6\u5C06\u4EC5\u5904\u7406\u6807\u8BB0\u4E3A <code>#task</code> \u7684\u4EFB\u52A1\u5217\u8868\u9879\u3002",line4:"\u5176\u4ED6\u4EFB\u52A1\u5217\u8868\u9879\u5C06\u4FDD\u6301\u6B63\u5E38,\u4E0D\u4F1A\u51FA\u73B0\u5728\u67E5\u8BE2\u4E2D\u6216\u8BBE\u7F6E\u5B8C\u6210\u65E5\u671F\u3002"},name:"\u5168\u5C40\u7B5B\u9009\u5668",placeholder:"\u4F8B\u5982:#task \u6216 TODO"},heading:"\u5168\u5C40\u4EFB\u52A1\u7B5B\u9009\u5668",removeFilter:{description:"\u542F\u7528\u6B64\u9009\u9879\u5C06\u5728\u663E\u793A\u4EFB\u52A1\u65F6\u4ECE\u4EFB\u52A1\u63CF\u8FF0\u4E2D\u5220\u9664\u8BBE\u7F6E\u4E3A\u5168\u5C40\u7B5B\u9009\u5668\u7684\u5B57\u7B26\u4E32.",name:"\u4ECE\u63CF\u8FF0\u4E2D\u5220\u9664\u5168\u5C40\u7B5B\u9009\u5668"}},globalQuery:{heading:"\u5168\u5C40\u67E5\u8BE2",query:{description:"\u81EA\u52A8\u5305\u542B\u5728\u5E93\u4E2D\u6BCF\u4E2A Tasks \u5757\u5F00\u5934\u7684\u67E5\u8BE2\u8BED\u53E5.\u7528\u4E8E\u6DFB\u52A0\u9ED8\u8BA4\u8FC7\u6EE4\u5668\u6216\u5E03\u5C40\u9009\u9879\u3002",placeholder:`\u4F8B\u5982... path does not include _templates/ limit 300 -show urgency`}},recurringTasks:{heading:"\u91CD\u590D\u6027\u4EFB\u52A1",nextLine:{description:"\u542F\u7528\u6B64\u529F\u80FD\u540E\uFF0C\u4EFB\u52A1\u7684\u4E0B\u4E00\u6B21\u91CD\u590D\u5C06\u663E\u793A\u5728\u5DF2\u5B8C\u6210\u4EFB\u52A1\u7684\u4E0B\u4E00\u884C\u3002\u82E5\u5173\u95ED\u6B64\u529F\u80FD\uFF0C\u5219\u4E0B\u4E00\u6B21\u91CD\u590D\u5C06\u51FA\u73B0\u5728\u5DF2\u5B8C\u6210\u4EFB\u52A1\u7684\u4E0A\u4E00\u884C\u3002",name:"\u628A\u4EFB\u52A1\u7684\u4E0B\u4E00\u6B21\u91CD\u590D\u653E\u5728\u4E0B\u4E00\u884C"},removeScheduledDate:{description:{line1:"",line2:""},name:""}},seeTheDocumentation:"\u53C2\u9605\u6587\u6863",statuses:{collections:{anuppuccinTheme:"AnuPpuccin \u4E3B\u9898",auraTheme:"Aura \u4E3B\u9898",borderTheme:"Border \u4E3B\u9898",buttons:{addCollection:{name:"{{themeName}}: \u6DFB\u52A0 {{numberOfStatuses}} \u79CD\u652F\u6301\u72B6\u6001"}},ebullientworksTheme:"Ebullientworks \u4E3B\u9898",itsThemeAndSlrvbCheckboxes:"ITS \u4E3B\u9898\u548C SlRvb \u590D\u9009\u6846",lytModeTheme:"LYT Mode \u4E3B\u9898 (\u4EC5\u6DF1\u8272\u6A21\u5F0F)",minimalTheme:"Minimal \u4E3B\u9898",thingsTheme:"Things \u4E3B\u9898"},coreStatuses:{buttons:{checkStatuses:{name:"\u67E5\u770B\u5E76\u68C0\u67E5\u60A8\u7684\u72B6\u6001",tooltip:"\u5728\u5E93\u7684\u6839\u76EE\u5F55\u4E0B\u521B\u5EFA\u4E00\u4E2A\u65B0\u6587\u4EF6,\u5305\u542B\u5F53\u524D\u72B6\u6001\u8BBE\u7F6E\u7684 Mermaid \u56FE\u8868."}},description:{line1:"\u8FD9\u4E9B\u662F Tasks \u539F\u751F\u652F\u6301\u7684\u6838\u5FC3\u72B6\u6001\uFF0C\u4E0D\u9700\u8981\u81EA\u5B9A\u4E49CSS\u6837\u5F0F\u6216\u4E3B\u9898\u3002",line2:"\u60A8\u53EF\u4EE5\u5728\u4E0B\u9762\u7F16\u8F91\u548C\u6DFB\u52A0\u81EA\u5B9A\u4E49\u72B6\u6001\u3002"},heading:"\u6838\u5FC3\u72B6\u6001"},customStatuses:{buttons:{addAllUnknown:{name:"\u6DFB\u52A0\u6240\u6709\u672A\u77E5\u72B6\u6001\u7C7B\u578B"},addNewStatus:{name:"\u6DFB\u52A0\u65B0\u4EFB\u52A1\u72B6\u6001"},resetCustomStatuses:{name:"\u91CD\u7F6E\u81EA\u5B9A\u4E49\u72B6\u6001\u7C7B\u578B\u4E3A\u9ED8\u8BA4\u503C"}},description:{line1:"\u60A8\u5E94\u8BE5\u9996\u5148<b>\u9009\u62E9\u5E76\u5B89\u88C5 CSS\u4EE3\u7801\u6BB5\u6216\u4E3B\u9898<b>\u4EE5\u8BBE\u7F6E\u81EA\u5B9A\u4E49\u590D\u9009\u6846\u7684\u6837\u5F0F",line2:"\u7136\u540E\uFF0C\u4F7F\u7528\u4E0B\u9762\u7684\u6309\u94AE\u8BBE\u7F6E\u60A8\u7684\u81EA\u5B9A\u4E49\u72B6\u6001,\u4EE5\u5339\u914D\u60A8\u9009\u62E9\u7684CSS\u590D\u9009\u6846.",line3:"<b>\u6CE8\u610F</b>\u4EFB\u4F55\u4E0E\u66F4\u65E9\u7684\u72B6\u6001\u5177\u6709\u76F8\u540C\u7B26\u53F7\u7684\u72B6\u6001\u90FD\u5C06\u88AB\u5FFD\u7565.\u60A8\u53EF\u4EE5\u901A\u8FC7\u8FD0\u884C\u201CCreate or edit task\u201D\u547D\u4EE4\u5E76\u67E5\u770B\u201CStatus\u201D\u4E0B\u62C9\u5217\u8868\u6765\u786E\u8BA4\u5B9E\u9645\u52A0\u8F7D\u7684\u72B6\u6001\u3002",line4:"\u53C2\u9605\u6587\u6863\uFF01"},heading:"\u81EA\u5B9A\u4E49\u72B6\u6001"},heading:"\u4EFB\u52A1\u72B6\u6001"}}}});var jf,Jx,zb,N,gs=ee(()=>{"use strict";Lb();Ub();jb();$b();Hb();Bb();jf=!1,Jx=()=>{let n=localStorage.getItem("language"),t=(n==null?void 0:n.toLowerCase())||"en";return console.log(`Language in Obsidian settings: '${t}'; requesting Tasks in '${t}'.`),t},zb=()=>F(void 0,null,function*(){jf||(yield yt.init({lng:Jx(),fallbackLng:"en",returnEmptyString:!1,resources:{be:{translation:Yb},en:{translation:Wb},ru:{translation:qb},uk:{translation:Gb},zh:{translation:Vb}},interpolation:{escapeValue:!1}}),jf=!0)}),N=new Proxy(yt,{get(n,t){if(!jf&&t==="t")throw new Error("i18n.t() called before initialization. Call initializeI18n() first.");return Reflect.get(n,t)}})});var wn,fe,ii=ee(()=>{"use strict";wn=class{},fe=wn;fe.dateFormat="YYYY-MM-DD",fe.dateTimeFormat="YYYY-MM-DD HH:mm",fe.indentationRegex=/^([\s\t>]*)/,fe.listMarkerRegex=/([-*+]|[0-9]+[.)])/,fe.checkboxRegex=/\[(.)\]/u,fe.afterCheckboxRegex=/ *(.*)/u,fe.taskRegex=new RegExp(wn.indentationRegex.source+wn.listMarkerRegex.source+" +"+wn.checkboxRegex.source+wn.afterCheckboxRegex.source,"u"),fe.nonTaskRegex=new RegExp(wn.indentationRegex.source+wn.listMarkerRegex.source+"? *("+wn.checkboxRegex.source+")?"+wn.afterCheckboxRegex.source,"u"),fe.listItemRegex=new RegExp(wn.indentationRegex.source+wn.listMarkerRegex.source),fe.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,fe.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,fe.hashTagsFromEnd=new RegExp(wn.hashTags.source+"$")});var Ke=x(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.matchAnyPattern=Ni.extractTerms=Ni.repeatedTimeunitPattern=void 0;function rO(n,t){let e=t.replace(/\((?!\?)/g,"(?:");return`${n}${e}\\s{0,5}(?:,?\\s{0,5}${e}){0,10}`}Ni.repeatedTimeunitPattern=rO;function Kb(n){let t;return n instanceof Array?t=[...n]:n instanceof Map?t=Array.from(n.keys()):t=Object.keys(n),t}Ni.extractTerms=Kb;function iO(n){return`(?:${Kb(n).sort((e,r)=>r.length-e.length).join("|").replace(/\./g,"\\.")})`}Ni.matchAnyPattern=iO});var Ue=x(($f,qf)=>{(function(n,t){typeof $f=="object"&&typeof qf!="undefined"?qf.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis!="undefined"?globalThis:n||self).dayjs=t()})($f,function(){"use strict";var n=1e3,t=6e4,e=36e5,r="millisecond",i="second",s="minute",a="hour",o="day",l="week",u="month",c="quarter",d="year",f="date",p="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},O=function(V,K,C){var J=String(V);return!J||J.length>=K?V:""+Array(K+1-J.length).join(C)+V},E={s:O,z:function(V){var K=-V.utcOffset(),C=Math.abs(K),J=Math.floor(C/60),$=C%60;return(K<=0?"+":"-")+O(J,2,"0")+":"+O($,2,"0")},m:function V(K,C){if(K.date()<C.date())return-V(C,K);var J=12*(C.year()-K.year())+(C.month()-K.month()),$=K.clone().add(J,u),oe=C-$<0,m=K.clone().add(J+(oe?-1:1),u);return+(-(J+(C-$)/(oe?$-m:m-$))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:u,y:d,w:l,d:o,D:f,h:a,m:s,s:i,ms:r,Q:c}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},A="en",Y={};Y[A]=_;var q=function(V){return V instanceof ye},se=function(V,K,C){var J;if(!V)return A;if(typeof V=="string")Y[V]&&(J=V),K&&(Y[V]=K,J=V);else{var $=V.name;Y[$]=V,J=$}return!C&&J&&(A=J),J||!C&&A},H=function(V,K){if(q(V))return V.clone();var C=typeof K=="object"?K:{};return C.date=V,C.args=arguments,new ye(C)},Z=E;Z.l=se,Z.i=q,Z.w=function(V,K){return H(V,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var ye=function(){function V(C){this.$L=se(C.locale,null,!0),this.parse(C)}var K=V.prototype;return K.parse=function(C){this.$d=function(J){var $=J.date,oe=J.utc;if($===null)return new Date(NaN);if(Z.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var m=$.match(b);if(m){var y=m[2]-1||0,v=(m[7]||"0").substring(0,3);return oe?new Date(Date.UTC(m[1],y,m[3]||1,m[4]||0,m[5]||0,m[6]||0,v)):new Date(m[1],y,m[3]||1,m[4]||0,m[5]||0,m[6]||0,v)}}return new Date($)}(C),this.$x=C.x||{},this.init()},K.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},K.$utils=function(){return Z},K.isValid=function(){return this.$d.toString()!==p},K.isSame=function(C,J){var $=H(C);return this.startOf(J)<=$&&$<=this.endOf(J)},K.isAfter=function(C,J){return H(C)<this.startOf(J)},K.isBefore=function(C,J){return this.endOf(J)<H(C)},K.$g=function(C,J,$){return Z.u(C)?this[J]:this.set($,C)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(C,J){var $=this,oe=!!Z.u(J)||J,m=Z.p(C),y=function(P,W){var ce=Z.w($.$u?Date.UTC($.$y,W,P):new Date($.$y,W,P),$);return oe?ce:ce.endOf(o)},v=function(P,W){return Z.w($.toDate()[P].apply($.toDate("s"),(oe?[0,0,0,0]:[23,59,59,999]).slice(W)),$)},w=this.$W,S=this.$M,M=this.$D,I="set"+(this.$u?"UTC":"");switch(m){case d:return oe?y(1,0):y(31,11);case u:return oe?y(1,S):y(0,S+1);case l:var j=this.$locale().weekStart||0,D=(w<j?w+7:w)-j;return y(oe?M-D:M+(6-D),S);case o:case f:return v(I+"Hours",0);case a:return v(I+"Minutes",1);case s:return v(I+"Seconds",2);case i:return v(I+"Milliseconds",3);default:return this.clone()}},K.endOf=function(C){return this.startOf(C,!1)},K.$set=function(C,J){var $,oe=Z.p(C),m="set"+(this.$u?"UTC":""),y=($={},$[o]=m+"Date",$[f]=m+"Date",$[u]=m+"Month",$[d]=m+"FullYear",$[a]=m+"Hours",$[s]=m+"Minutes",$[i]=m+"Seconds",$[r]=m+"Milliseconds",$)[oe],v=oe===o?this.$D+(J-this.$W):J;if(oe===u||oe===d){var w=this.clone().set(f,1);w.$d[y](v),w.init(),this.$d=w.set(f,Math.min(this.$D,w.daysInMonth())).$d}else y&&this.$d[y](v);return this.init(),this},K.set=function(C,J){return this.clone().$set(C,J)},K.get=function(C){return this[Z.p(C)]()},K.add=function(C,J){var $,oe=this;C=Number(C);var m=Z.p(J),y=function(S){var M=H(oe);return Z.w(M.date(M.date()+Math.round(S*C)),oe)};if(m===u)return this.set(u,this.$M+C);if(m===d)return this.set(d,this.$y+C);if(m===o)return y(1);if(m===l)return y(7);var v=($={},$[s]=t,$[a]=e,$[i]=n,$)[m]||1,w=this.$d.getTime()+C*v;return Z.w(w,this)},K.subtract=function(C,J){return this.add(-1*C,J)},K.format=function(C){var J=this,$=this.$locale();if(!this.isValid())return $.invalidDate||p;var oe=C||"YYYY-MM-DDTHH:mm:ssZ",m=Z.z(this),y=this.$H,v=this.$m,w=this.$M,S=$.weekdays,M=$.months,I=function(W,ce,be,Oe){return W&&(W[ce]||W(J,oe))||be[ce].substr(0,Oe)},j=function(W){return Z.s(y%12||12,W,"0")},D=$.meridiem||function(W,ce,be){var Oe=W<12?"AM":"PM";return be?Oe.toLowerCase():Oe},P={YY:String(this.$y).slice(-2),YYYY:this.$y,M:w+1,MM:Z.s(w+1,2,"0"),MMM:I($.monthsShort,w,M,3),MMMM:I(M,w),D:this.$D,DD:Z.s(this.$D,2,"0"),d:String(this.$W),dd:I($.weekdaysMin,this.$W,S,2),ddd:I($.weekdaysShort,this.$W,S,3),dddd:S[this.$W],H:String(y),HH:Z.s(y,2,"0"),h:j(1),hh:j(2),a:D(y,v,!0),A:D(y,v,!1),m:String(v),mm:Z.s(v,2,"0"),s:String(this.$s),ss:Z.s(this.$s,2,"0"),SSS:Z.s(this.$ms,3,"0"),Z:m};return oe.replace(T,function(W,ce){return ce||P[W]||m.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(C,J,$){var oe,m=Z.p(J),y=H(C),v=(y.utcOffset()-this.utcOffset())*t,w=this-y,S=Z.m(this,y);return S=(oe={},oe[d]=S/12,oe[u]=S,oe[c]=S/3,oe[l]=(w-v)/6048e5,oe[o]=(w-v)/864e5,oe[a]=w/e,oe[s]=w/t,oe[i]=w/n,oe)[m]||w,$?S:Z.a(S)},K.daysInMonth=function(){return this.endOf(u).$D},K.$locale=function(){return Y[this.$L]},K.locale=function(C,J){if(!C)return this.$L;var $=this.clone(),oe=se(C,J,!0);return oe&&($.$L=oe),$},K.clone=function(){return Z.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},V}(),we=ye.prototype;return H.prototype=we,[["$ms",r],["$s",i],["$m",s],["$H",a],["$W",o],["$M",u],["$y",d],["$D",f]].forEach(function(V){we[V[1]]=function(K){return this.$g(K,V[0],V[1])}}),H.extend=function(V,K){return V.$i||(V(K,ye,H),V.$i=!0),H},H.locale=se,H.isDayjs=q,H.unix=function(V){return H(1e3*V)},H.en=Y[A],H.Ls=Y,H.p={},H})});var Ct=x(Ii=>{"use strict";var sO=Ii&&Ii.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ii,"__esModule",{value:!0});Ii.findYearClosestToRef=Ii.findMostLikelyADYear=void 0;var aO=sO(Ue());function oO(n){return n<100&&(n>50?n=n+1900:n=n+2e3),n}Ii.findMostLikelyADYear=oO;function lO(n,t,e){let r=aO.default(n),i=r;i=i.month(e-1),i=i.date(t),i=i.year(r.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(r))<Math.abs(i.diff(r))?i=s:Math.abs(a.diff(r))<Math.abs(i.diff(r))&&(i=a),i.year()}Ii.findYearClosestToRef=lO});var Mt=x(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.parseTimeUnits=Me.TIME_UNITS_PATTERN=Me.parseYear=Me.YEAR_PATTERN=Me.parseOrdinalNumberPattern=Me.ORDINAL_NUMBER_PATTERN=Me.parseNumberPattern=Me.NUMBER_PATTERN=Me.TIME_UNIT_DICTIONARY=Me.ORDINAL_WORD_DICTIONARY=Me.INTEGER_WORD_DICTIONARY=Me.MONTH_DICTIONARY=Me.FULL_MONTH_NAME_DICTIONARY=Me.WEEKDAY_DICTIONARY=void 0;var Wu=Ke(),uO=Ct();Me.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};Me.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};Me.MONTH_DICTIONARY=Object.assign(Object.assign({},Me.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});Me.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};Me.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};Me.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"};Me.NUMBER_PATTERN=`(?:${Wu.matchAnyPattern(Me.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 Xb(n){let t=n.toLowerCase();return Me.INTEGER_WORD_DICTIONARY[t]!==void 0?Me.INTEGER_WORD_DICTIONARY[t]:t==="a"||t==="an"?1:t.match(/few/)?3:t.match(/half/)?.5:t.match(/couple/)?2:t.match(/several/)?7:parseFloat(t)}Me.parseNumberPattern=Xb;Me.ORDINAL_NUMBER_PATTERN=`(?:${Wu.matchAnyPattern(Me.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function cO(n){let t=n.toLowerCase();return Me.ORDINAL_WORD_DICTIONARY[t]!==void 0?Me.ORDINAL_WORD_DICTIONARY[t]:(t=t.replace(/(?:st|nd|rd|th)$/i,""),parseInt(t))}Me.parseOrdinalNumberPattern=cO;Me.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 dO(n){if(/BE/i.test(n))return n=n.replace(/BE/i,""),parseInt(n)-543;if(/BCE?/i.test(n))return n=n.replace(/BCE?/i,""),-parseInt(n);if(/(AD|CE)/i.test(n))return n=n.replace(/(AD|CE)/i,""),parseInt(n);let t=parseInt(n);return uO.findMostLikelyADYear(t)}Me.parseYear=dO;var Zb=`(${Me.NUMBER_PATTERN})\\s{0,3}(${Wu.matchAnyPattern(Me.TIME_UNIT_DICTIONARY)})`,Qb=new RegExp(Zb,"i");Me.TIME_UNITS_PATTERN=Wu.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",Zb);function fO(n){let t={},e=n,r=Qb.exec(e);for(;r;)pO(t,r),e=e.substring(r[0].length).trim(),r=Qb.exec(e);return t}Me.parseTimeUnits=fO;function pO(n,t){let e=Xb(t[1]),r=Me.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];n[r]=e}});var Jb=x((Hf,Gf)=>{(function(n,t){typeof Hf=="object"&&typeof Gf!="undefined"?Gf.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis!="undefined"?globalThis:n||self).dayjs_plugin_quarterOfYear=t()})(Hf,function(){"use strict";var n="month",t="quarter";return function(e,r){var i=r.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,l){return o=Number(o),this.$utils().p(l)===t?this.add(3*o,n):s.bind(this)(o,l)};var a=i.startOf;i.startOf=function(o,l){var u=this.$utils(),c=!!u.u(l)||l;if(u.p(o)===t){var d=this.quarter()-1;return c?this.month(3*d).startOf(n).startOf("day"):this.month(3*d+2).endOf(n).endOf("day")}return a.bind(this)(o,l)}}})});var qn=x(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.implySimilarTime=Yr.assignSimilarTime=Yr.assignSimilarDate=Yr.assignTheNextDay=void 0;var eT=ht();function mO(n,t){t=t.add(1,"day"),tT(n,t),nT(n,t)}Yr.assignTheNextDay=mO;function tT(n,t){n.assign("day",t.date()),n.assign("month",t.month()+1),n.assign("year",t.year())}Yr.assignSimilarDate=tT;function hO(n,t){n.assign("hour",t.hour()),n.assign("minute",t.minute()),n.assign("second",t.second()),n.assign("millisecond",t.millisecond()),n.get("hour")<12?n.assign("meridiem",eT.Meridiem.AM):n.assign("meridiem",eT.Meridiem.PM)}Yr.assignSimilarTime=hO;function nT(n,t){n.imply("hour",t.hour()),n.imply("minute",t.minute()),n.imply("second",t.second()),n.imply("millisecond",t.millisecond())}Yr.implySimilarTime=nT});var rT=x(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});ys.toTimezoneOffset=ys.TIMEZONE_ABBR_MAP=void 0;ys.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 gO(n){var t;return n==null?null:typeof n=="number"?n:(t=ys.TIMEZONE_ABBR_MAP[n])!==null&&t!==void 0?t:null}ys.toTimezoneOffset=gO});var nt=x(jr=>{"use strict";var iT=jr&&jr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(jr,"__esModule",{value:!0});jr.ParsingResult=jr.ParsingComponents=jr.ReferenceWithTimezone=void 0;var yO=iT(Jb()),$u=iT(Ue()),Bf=qn(),bO=rT();$u.default.extend(yO.default);var Vf=class{constructor(t){var e;t=t!=null?t:new Date,t instanceof Date?this.instant=t:(this.instant=(e=t.instant)!==null&&e!==void 0?e:new Date,this.timezoneOffset=bO.toTimezoneOffset(t.timezone))}};jr.ReferenceWithTimezone=Vf;var bs=class{constructor(t,e){if(this.reference=t,this.knownValues={},this.impliedValues={},e)for(let i in e)this.knownValues[i]=e[i];let r=$u.default(t.instant);this.imply("day",r.date()),this.imply("month",r.month()+1),this.imply("year",r.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(t){return t in this.knownValues?this.knownValues[t]:t in this.impliedValues?this.impliedValues[t]:null}isCertain(t){return t in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(t,e){return t in this.knownValues?this:(this.impliedValues[t]=e,this)}assign(t,e){return this.knownValues[t]=e,delete this.impliedValues[t],this}delete(t){delete this.knownValues[t],delete this.impliedValues[t]}clone(){let t=new bs(this.reference);t.knownValues={},t.impliedValues={};for(let e in this.knownValues)t.knownValues[e]=this.knownValues[e];for(let e in this.impliedValues)t.impliedValues[e]=this.impliedValues[e];return t}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 t=this.dateWithoutTimezoneAdjustment();return!(t.getFullYear()!==this.get("year")||t.getMonth()!==this.get("month")-1||t.getDate()!==this.get("day")||this.get("hour")!=null&&t.getHours()!=this.get("hour")||this.get("minute")!=null&&t.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return $u.default(this.date())}date(){let t=this.dateWithoutTimezoneAdjustment();return new Date(t.getTime()+this.getSystemTimezoneAdjustmentMinute(t)*6e4)}dateWithoutTimezoneAdjustment(){let t=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 t.setFullYear(this.get("year")),t}getSystemTimezoneAdjustmentMinute(t){var e,r;(!t||t.getTime()<0)&&(t=new Date);let i=-t.getTimezoneOffset(),s=(r=(e=this.get("timezoneOffset"))!==null&&e!==void 0?e:this.reference.timezoneOffset)!==null&&r!==void 0?r:i;return i-s}static createRelativeFromReference(t,e){let r=$u.default(t.instant);for(let s in e)r=r.add(e[s],s);let i=new bs(t);return e.hour||e.minute||e.second?(Bf.assignSimilarTime(i,r),Bf.assignSimilarDate(i,r),t.timezoneOffset!==null&&i.assign("timezoneOffset",-t.instant.getTimezoneOffset())):(Bf.implySimilarTime(i,r),t.timezoneOffset!==null&&i.imply("timezoneOffset",-t.instant.getTimezoneOffset()),e.d?(i.assign("day",r.date()),i.assign("month",r.month()+1),i.assign("year",r.year())):(e.week&&i.imply("weekday",r.day()),i.imply("day",r.date()),e.month?(i.assign("month",r.month()+1),i.assign("year",r.year())):(i.imply("month",r.month()+1),e.year?i.assign("year",r.year()):i.imply("year",r.year())))),i}};jr.ParsingComponents=bs;var Bo=class{constructor(t,e,r,i,s){this.reference=t,this.refDate=t.instant,this.index=e,this.text=r,this.start=i||new bs(t),this.end=s}clone(){let t=new Bo(this.reference,this.index,this.text);return t.start=this.start?this.start.clone():null,t.end=this.end?this.end.clone():null,t}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};jr.ParsingResult=Bo});var re=x(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});qu.AbstractParserWithWordBoundaryChecking=void 0;var zf=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(t){let e=this.innerPattern(t);return e==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${e.source}`,e.flags),this.cachedInnerPattern=e,this.cachedPattern)}extract(t,e){var r;let i=(r=e[1])!==null&&r!==void 0?r:"";e.index=e.index+i.length,e[0]=e[0].substring(i.length);for(let s=2;s<e.length;s++)e[s-1]=e[s];return this.innerExtract(t,e)}};qu.AbstractParserWithWordBoundaryChecking=zf});var sT=x(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});var Qf=Mt(),TO=nt(),_O=re(),vO=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Qf.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),wO=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Qf.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Kf=class extends _O.AbstractParserWithWordBoundaryChecking{innerPattern(t){return t.option.forwardDate?wO:vO}innerExtract(t,e){let r=Qf.parseTimeUnits(e[1]);return TO.ParsingComponents.createRelativeFromReference(t.reference,r)}};Xf.default=Kf});var dT=x(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});var kO=Ct(),uT=Mt(),cT=Mt(),Hu=Mt(),SO=Ke(),DO=re(),EO=new RegExp(`(?:on\\s{0,3})?(${Hu.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Hu.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${SO.matchAnyPattern(uT.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${cT.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),aT=1,oT=2,xO=3,lT=4,Zf=class extends DO.AbstractParserWithWordBoundaryChecking{innerPattern(){return EO}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=uT.MONTH_DICTIONARY[e[xO].toLowerCase()],s=Hu.parseOrdinalNumberPattern(e[aT]);if(s>31)return e.index=e.index+e[aT].length,null;if(r.start.assign("month",i),r.start.assign("day",s),e[lT]){let a=cT.parseYear(e[lT]);r.start.assign("year",a)}else{let a=kO.findYearClosestToRef(t.refDate,s,i);r.start.imply("year",a)}if(e[oT]){let a=Hu.parseOrdinalNumberPattern(e[oT]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};Jf.default=Zf});var gT=x(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});var OO=Ct(),mT=Mt(),Gu=Mt(),hT=Mt(),CO=Ke(),MO=re(),RO=new RegExp(`(${CO.matchAnyPattern(mT.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Gu.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Gu.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${hT.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),AO=1,PO=2,fT=3,pT=4,ep=class extends MO.AbstractParserWithWordBoundaryChecking{innerPattern(){return RO}innerExtract(t,e){let r=mT.MONTH_DICTIONARY[e[AO].toLowerCase()],i=Gu.parseOrdinalNumberPattern(e[PO]);if(i>31)return null;let s=t.createParsingComponents({day:i,month:r});if(e[pT]){let l=hT.parseYear(e[pT]);s.assign("year",l)}else{let l=OO.findYearClosestToRef(t.refDate,i,r);s.imply("year",l)}if(!e[fT])return s;let a=Gu.parseOrdinalNumberPattern(e[fT]),o=t.createParsingResult(e.index,e[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};tp.default=ep});var TT=x(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});var np=Mt(),NO=Ct(),IO=Ke(),bT=Mt(),FO=re(),LO=new RegExp(`((?:in)\\s*)?(${IO.matchAnyPattern(np.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${bT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),UO=1,YO=2,yT=3,rp=class extends FO.AbstractParserWithWordBoundaryChecking{innerPattern(){return LO}innerExtract(t,e){let r=e[YO].toLowerCase();if(e[0].length<=3&&!np.FULL_MONTH_NAME_DICTIONARY[r])return null;let i=t.createParsingResult(e.index+(e[UO]||"").length,e.index+e[0].length);i.start.imply("day",1);let s=np.MONTH_DICTIONARY[r];if(i.start.assign("month",s),e[yT]){let a=bT.parseYear(e[yT]);i.start.assign("year",a)}else{let a=NO.findYearClosestToRef(t.refDate,1,s);i.start.imply("year",a)}return i}};ip.default=rp});var wT=x(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});var vT=Mt(),jO=Ke(),WO=re(),$O=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${jO.matchAnyPattern(vT.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),qO=1,HO=2,_T=3,GO=4,sp=class extends WO.AbstractParserWithWordBoundaryChecking{innerPattern(){return $O}innerExtract(t,e){let r=e[_T]?parseInt(e[_T]):vT.MONTH_DICTIONARY[e[HO].toLowerCase()];if(r<1||r>12)return null;let i=parseInt(e[qO]);return{day:parseInt(e[GO]),month:r,year:i}}};ap.default=sp});var kT=x(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});var BO=re(),VO=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),zO=1,KO=2,op=class extends BO.AbstractParserWithWordBoundaryChecking{innerPattern(){return VO}innerExtract(t,e){let r=parseInt(e[KO]),i=parseInt(e[zO]);return t.createParsingComponents().imply("day",1).assign("month",i).assign("year",r)}};lp.default=op});var Ts=x(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});zu.AbstractTimeExpressionParser=void 0;var en=ht();function QO(n,t,e,r){return new RegExp(`${n}${t}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,r)}function XO(n,t){return new RegExp(`^(${n})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,"i")}var ST=2,Ta=3,Bu=4,Vu=5,Vo=6,up=class{constructor(t=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=t}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(t){return this.getPrimaryTimePatternThroughCache()}extract(t,e){let r=this.extractPrimaryTimeComponents(t,e);if(!r)return e.index+=e[0].length,null;let i=e.index+e[1].length,s=e[0].substring(e[1].length),a=t.createParsingResult(i,s,r);e.index+=e[0].length;let o=t.text.substring(e.index),u=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&u&&u[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!u||u[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(t,u,a),a.end&&(a.text+=u[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(t,e,r=!1){let i=t.createParsingComponents(),s=0,a=null,o=parseInt(e[ST]);if(o>100){if(this.strictMode||e[Ta]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(e[Ta]!=null){if(e[Ta].length==1&&!e[Vo])return null;s=parseInt(e[Ta])}if(s>=60)return null;if(o>12&&(a=en.Meridiem.PM),e[Vo]!=null){if(o>12)return null;let l=e[Vo][0].toLowerCase();l=="a"&&(a=en.Meridiem.AM,o==12&&(o=0)),l=="p"&&(a=en.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",en.Meridiem.AM):i.imply("meridiem",en.Meridiem.PM),e[Vu]!=null){let l=parseInt(e[Vu].substring(0,3));if(l>=1e3)return null;i.assign("millisecond",l)}if(e[Bu]!=null){let l=parseInt(e[Bu]);if(l>=60)return null;i.assign("second",l)}return i}extractFollowingTimeComponents(t,e,r){let i=t.createParsingComponents();if(e[Vu]!=null){let l=parseInt(e[Vu].substring(0,3));if(l>=1e3)return null;i.assign("millisecond",l)}if(e[Bu]!=null){let l=parseInt(e[Bu]);if(l>=60)return null;i.assign("second",l)}let s=parseInt(e[ST]),a=0,o=-1;if(e[Ta]!=null?a=parseInt(e[Ta]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=en.Meridiem.PM),e[Vo]!=null){if(s>12)return null;let l=e[Vo][0].toLowerCase();l=="a"&&(o=en.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),l=="p"&&(o=en.Meridiem.PM,s!=12&&(s+=12)),r.start.isCertain("meridiem")||(o==en.Meridiem.AM?(r.start.imply("meridiem",en.Meridiem.AM),r.start.get("hour")==12&&r.start.assign("hour",0)):(r.start.imply("meridiem",en.Meridiem.PM),r.start.get("hour")!=12&&r.start.assign("hour",r.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):r.start.isCertain("meridiem")&&r.start.get("hour")>12?r.start.get("hour")-12>s?i.imply("meridiem",en.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",en.Meridiem.PM)):s>12?i.imply("meridiem",en.Meridiem.PM):s<=12&&i.imply("meridiem",en.Meridiem.AM),i.date().getTime()<r.start.date().getTime()&&i.imply("day",i.get("day")+1),i}checkAndReturnWithoutFollowingPattern(t){if(t.text.match(/^\d$/)||t.text.match(/^\d\d\d+$/)||t.text.match(/\d[apAP]$/))return null;let e=t.text.match(/[^\d:.](\d[\d.]+)$/);if(e){let r=e[1];if(this.strictMode||r.includes(".")&&!r.match(/\d(\.\d{2})+$/)||parseInt(r)>24)return null}return t}checkAndReturnWithFollowingPattern(t){if(t.text.match(/^\d+-\d+$/))return null;let e=t.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(e){if(this.strictMode)return null;let r=e[1],i=e[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(r);if(s>24||a>24)return null}return t}getPrimaryTimePatternThroughCache(){let t=this.primaryPrefix(),e=this.primarySuffix();return this.cachedPrimaryPrefix===t&&this.cachedPrimarySuffix===e?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=QO(this.primaryPatternLeftBoundary(),t,e,this.patternFlags()),this.cachedPrimaryPrefix=t,this.cachedPrimarySuffix=e,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let t=this.followingPhase(),e=this.followingSuffix();return this.cachedFollowingPhase===t&&this.cachedFollowingSuffix===e?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=XO(t,e),this.cachedFollowingPhase=t,this.cachedFollowingSuffix=e,this.cachedFollowingTimePatten)}};zu.AbstractTimeExpressionParser=up});var DT=x(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});var Ku=ht(),ZO=Ts(),cp=class extends ZO.AbstractTimeExpressionParser{constructor(t){super(t)}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(t,e){let r=super.extractPrimaryTimeComponents(t,e);if(r){if(e[0].endsWith("night")){let i=r.get("hour");i>=6&&i<12?(r.assign("hour",r.get("hour")+12),r.assign("meridiem",Ku.Meridiem.PM)):i<6&&r.assign("meridiem",Ku.Meridiem.AM)}if(e[0].endsWith("afternoon")){r.assign("meridiem",Ku.Meridiem.PM);let i=r.get("hour");i>=0&&i<=6&&r.assign("hour",r.get("hour")+12)}e[0].endsWith("morning")&&(r.assign("meridiem",Ku.Meridiem.AM),r.get("hour")<12&&r.assign("hour",r.get("hour")))}return r}};dp.default=cp});var Hn=x(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});_a.addImpliedTimeUnits=_a.reverseTimeUnits=void 0;function JO(n){let t={};for(let e in n)t[e]=-n[e];return t}_a.reverseTimeUnits=JO;function e0(n,t){let e=n.clone(),r=n.dayjs();for(let i in t)r=r.add(t[i],i);return("day"in t||"d"in t||"week"in t||"month"in t||"year"in t)&&(e.imply("day",r.date()),e.imply("month",r.month()+1),e.imply("year",r.year())),("second"in t||"minute"in t||"hour"in t)&&(e.imply("second",r.second()),e.imply("minute",r.minute()),e.imply("hour",r.hour())),e}_a.addImpliedTimeUnits=e0});var ET=x(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});var pp=Mt(),t0=nt(),n0=re(),r0=Hn(),i0=new RegExp(`(${pp.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),s0=new RegExp(`(${pp.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),fp=class extends n0.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?s0:i0}innerExtract(t,e){let r=pp.parseTimeUnits(e[1]),i=r0.reverseTimeUnits(r);return t0.ParsingComponents.createRelativeFromReference(t.reference,i)}};mp.default=fp});var xT=x(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});var gp=Mt(),a0=nt(),o0=re(),l0=new RegExp(`(${gp.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),u0=new RegExp("("+gp.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),c0=1,hp=class extends o0.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?u0:l0}innerExtract(t,e){let r=gp.parseTimeUnits(e[c0]);return a0.ParsingComponents.createRelativeFromReference(t.reference,r)}};yp.default=hp});var wa=x(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.MergingRefiner=va.Filter=void 0;var bp=class{refine(t,e){return e.filter(r=>this.isValid(t,r))}};va.Filter=bp;var Tp=class{refine(t,e){if(e.length<2)return e;let r=[],i=e[0],s=null;for(let a=1;a<e.length;a++){s=e[a];let o=t.text.substring(i.index+i.text.length,s.index);if(!this.shouldMergeResults(o,i,s,t))r.push(i),i=s;else{let l=i,u=s,c=this.mergeResults(o,l,u,t);t.debug(()=>{console.log(`${this.constructor.name} merged ${l} and ${u} into ${c}`)}),i=c}}return i!=null&&r.push(i),r}};va.MergingRefiner=Tp});var Wr=x(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});var d0=wa(),_p=class extends d0.MergingRefiner{shouldMergeResults(t,e,r){return!e.end&&!r.end&&t.match(this.patternBetween())!=null}mergeResults(t,e,r){if(!e.start.isOnlyWeekdayComponent()&&!r.start.isOnlyWeekdayComponent()&&(r.start.getCertainComponents().forEach(s=>{e.start.isCertain(s)||e.start.assign(s,r.start.get(s))}),e.start.getCertainComponents().forEach(s=>{r.start.isCertain(s)||r.start.assign(s,e.start.get(s))})),e.start.date().getTime()>r.start.date().getTime()){let s=e.start.dayjs(),a=r.start.dayjs();e.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),e.start.imply("day",s.date()),e.start.imply("month",s.month()+1),e.start.imply("year",s.year())):r.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),r.start.imply("day",a.date()),r.start.imply("month",a.month()+1),r.start.imply("year",a.year())):[r,e]=[e,r]}let i=e.clone();return i.start=e.start,i.end=r.start,i.index=Math.min(e.index,r.index),e.index<r.index?i.text=e.text+t+r.text:i.text=r.text+t+e.text,i}};vp.default=_p});var OT=x(zo=>{"use strict";var f0=zo&&zo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(zo,"__esModule",{value:!0});var p0=f0(Wr()),wp=class extends p0.default{patternBetween(){return/^\s*(to|-)\s*$/i}};zo.default=wp});var CT=x(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.mergeDateTimeComponent=ka.mergeDateTimeResult=void 0;var m0=ht();function h0(n,t){let e=n.clone(),r=n.start,i=t.start;if(e.start=kp(r,i),n.end!=null||t.end!=null){let s=n.end==null?n.start:n.end,a=t.end==null?t.start:t.end,o=kp(s,a);n.end==null&&o.date().getTime()<e.start.date().getTime()&&(o.isCertain("day")?o.assign("day",o.get("day")+1):o.imply("day",o.get("day")+1)),e.end=o}return e}ka.mergeDateTimeResult=h0;function kp(n,t){let e=n.clone();return t.isCertain("hour")?(e.assign("hour",t.get("hour")),e.assign("minute",t.get("minute")),t.isCertain("second")?(e.assign("second",t.get("second")),t.isCertain("millisecond")?e.assign("millisecond",t.get("millisecond")):e.imply("millisecond",t.get("millisecond"))):(e.imply("second",t.get("second")),e.imply("millisecond",t.get("millisecond")))):(e.imply("hour",t.get("hour")),e.imply("minute",t.get("minute")),e.imply("second",t.get("second")),e.imply("millisecond",t.get("millisecond"))),t.isCertain("timezoneOffset")&&e.assign("timezoneOffset",t.get("timezoneOffset")),t.isCertain("meridiem")?e.assign("meridiem",t.get("meridiem")):t.get("meridiem")!=null&&e.get("meridiem")==null&&e.imply("meridiem",t.get("meridiem")),e.get("meridiem")==m0.Meridiem.PM&&e.get("hour")<12&&(t.isCertain("hour")?e.assign("hour",e.get("hour")+12):e.imply("hour",e.get("hour")+12)),e}ka.mergeDateTimeComponent=kp});var si=x(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});var g0=wa(),MT=CT(),Sp=class extends g0.MergingRefiner{shouldMergeResults(t,e,r){return(e.start.isOnlyDate()&&r.start.isOnlyTime()||r.start.isOnlyDate()&&e.start.isOnlyTime())&&t.match(this.patternBetween())!=null}mergeResults(t,e,r){let i=e.start.isOnlyDate()?MT.mergeDateTimeResult(e,r):MT.mergeDateTimeResult(r,e);return i.index=e.index,i.text=e.text+t+r.text,i}};Dp.default=Sp});var RT=x(Ko=>{"use strict";var y0=Ko&&Ko.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ko,"__esModule",{value:!0});var b0=y0(si()),Ep=class extends b0.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};Ko.default=Ep});var AT=x(Op=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});var T0=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),_0={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},xp=class{constructor(t){this.timezone=Object.assign(Object.assign({},_0),t)}refine(t,e){var r;let i=(r=t.option.timezones)!==null&&r!==void 0?r:{};return e.forEach(s=>{var a,o;let l=t.text.substring(s.index+s.text.length),u=T0.exec(l);if(!u)return;let c=u[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;t.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!=u[1])||s.start.isOnlyDate()&&c!=u[1]||(s.text+=u[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",d),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",d))}),e}};Op.default=xp});var Qu=x(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});var v0=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),w0=1,k0=2,S0=3,Cp=class{refine(t,e){return e.forEach(function(r){if(r.start.isCertain("timezoneOffset"))return;let i=t.text.substring(r.index+r.text.length),s=v0.exec(i);if(!s)return;t.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${r}`)});let a=parseInt(s[k0]),o=parseInt(s[S0]||"0"),l=a*60+o;l>14*60||(s[w0]==="-"&&(l=-l),r.end!=null&&r.end.assign("timezoneOffset",l),r.start.assign("timezoneOffset",l),r.text+=s[0])}),e}};Mp.default=Cp});var PT=x(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});var Rp=class{refine(t,e){if(e.length<2)return e;let r=[],i=e[0];for(let s=1;s<e.length;s++){let a=e[s];a.index<i.index+i.text.length?a.text.length>i.text.length&&(i=a):(r.push(i),i=a)}return i!=null&&r.push(i),r}};Ap.default=Rp});var NT=x(Qo=>{"use strict";var D0=Qo&&Qo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Qo,"__esModule",{value:!0});var E0=D0(Ue()),Pp=class{refine(t,e){return t.option.forwardDate&&e.forEach(function(r){let i=E0.default(t.refDate);if(r.start.isOnlyDayMonthComponent()&&i.isAfter(r.start.dayjs()))for(let s=0;s<3&&i.isAfter(r.start.dayjs());s++)r.start.imply("year",r.start.get("year")+1),t.debug(()=>{console.log(`Forward yearly adjusted for ${r} (${r.start})`)}),r.end&&!r.end.isCertain("year")&&(r.end.imply("year",r.end.get("year")+1),t.debug(()=>{console.log(`Forward yearly adjusted for ${r} (${r.end})`)}));r.start.isOnlyWeekdayComponent()&&i.isAfter(r.start.dayjs())&&(i.day()>=r.start.get("weekday")?i=i.day(r.start.get("weekday")+7):i=i.day(r.start.get("weekday")),r.start.imply("day",i.date()),r.start.imply("month",i.month()+1),r.start.imply("year",i.year()),t.debug(()=>{console.log(`Forward weekly adjusted for ${r} (${r.start})`)}),r.end&&r.end.isOnlyWeekdayComponent()&&(i.day()>r.end.get("weekday")?i=i.day(r.end.get("weekday")+7):i=i.day(r.end.get("weekday")),r.end.imply("day",i.date()),r.end.imply("month",i.month()+1),r.end.imply("year",i.year()),t.debug(()=>{console.log(`Forward weekly adjusted for ${r} (${r.end})`)})))}),e}};Qo.default=Pp});var IT=x(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});var x0=wa(),Np=class extends x0.Filter{constructor(t){super(),this.strictMode=t}isValid(t,e){return e.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(t.debug(()=>{console.log(`Removing unlikely result '${e.text}'`)}),!1):e.start.isValidDate()?e.end&&!e.end.isValidDate()?(t.debug(()=>{console.log(`Removing invalid result: ${e} (${e.end})`)}),!1):this.strictMode?this.isStrictModeValid(t,e):!0:(t.debug(()=>{console.log(`Removing invalid result: ${e} (${e.start})`)}),!1)}isStrictModeValid(t,e){return e.start.isOnlyWeekdayComponent()?(t.debug(()=>{console.log(`(Strict) Removing weekday only component: ${e} (${e.end})`)}),!1):e.start.isOnlyTime()&&(!e.start.isCertain("hour")||!e.start.isCertain("minute"))?(t.debug(()=>{console.log(`(Strict) Removing uncertain time component: ${e} (${e.end})`)}),!1):!0}};Ip.default=Np});var Up=x(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});var O0=re(),C0=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"),M0=1,R0=2,A0=3,FT=4,P0=5,LT=6,UT=7,YT=8,jT=9,Fp=class extends O0.AbstractParserWithWordBoundaryChecking{innerPattern(){return C0}innerExtract(t,e){let r={};if(r.year=parseInt(e[M0]),r.month=parseInt(e[R0]),r.day=parseInt(e[A0]),e[FT]!=null)if(r.hour=parseInt(e[FT]),r.minute=parseInt(e[P0]),e[LT]!=null&&(r.second=parseInt(e[LT])),e[UT]!=null&&(r.millisecond=parseInt(e[UT])),e[YT]==null)r.timezoneOffset=0;else{let i=parseInt(e[YT]),s=0;e[jT]!=null&&(s=parseInt(e[jT]));let a=i*60;a<0?a-=s:a+=s,r.timezoneOffset=a}return r}};Lp.default=Fp});var WT=x(jp=>{"use strict";Object.defineProperty(jp,"__esModule",{value:!0});var N0=wa(),Yp=class extends N0.MergingRefiner{mergeResults(t,e,r){let i=r.clone();return i.index=e.index,i.text=e.text+t+i.text,i.start.assign("weekday",e.start.get("weekday")),i.end&&i.end.assign("weekday",e.start.get("weekday")),i}shouldMergeResults(t,e,r){return e.start.isOnlyWeekdayComponent()&&!e.start.isCertain("hour")&&r.start.isCertain("day")&&t.match(/^,?\s*$/)!=null}};jp.default=Yp});var ai=x(Sa=>{"use strict";var _s=Sa&&Sa.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Sa,"__esModule",{value:!0});Sa.includeCommonConfiguration=void 0;var I0=_s(AT()),F0=_s(Qu()),$T=_s(PT()),L0=_s(NT()),U0=_s(IT()),Y0=_s(Up()),j0=_s(WT());function W0(n,t=!1){return n.parsers.unshift(new Y0.default),n.refiners.unshift(new j0.default),n.refiners.unshift(new I0.default),n.refiners.unshift(new F0.default),n.refiners.unshift(new $T.default),n.refiners.push(new $T.default),n.refiners.push(new L0.default),n.refiners.push(new U0.default(t)),n}Sa.includeCommonConfiguration=W0});var li=x(Ge=>{"use strict";var $0=Ge&&Ge.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.noon=Ge.morning=Ge.midnight=Ge.yesterdayEvening=Ge.evening=Ge.lastNight=Ge.tonight=Ge.theDayAfter=Ge.tomorrow=Ge.theDayBefore=Ge.yesterday=Ge.today=Ge.now=void 0;var $r=nt(),Da=$0(Ue()),oi=qn(),Xo=ht();function q0(n){let t=Da.default(n.instant),e=new $r.ParsingComponents(n,{});return oi.assignSimilarDate(e,t),oi.assignSimilarTime(e,t),n.timezoneOffset!==null&&e.assign("timezoneOffset",t.utcOffset()),e}Ge.now=q0;function H0(n){let t=Da.default(n.instant),e=new $r.ParsingComponents(n,{});return oi.assignSimilarDate(e,t),oi.implySimilarTime(e,t),e}Ge.today=H0;function G0(n){return qT(n,1)}Ge.yesterday=G0;function qT(n,t){return Wp(n,-t)}Ge.theDayBefore=qT;function B0(n){return Wp(n,1)}Ge.tomorrow=B0;function Wp(n,t){let e=Da.default(n.instant),r=new $r.ParsingComponents(n,{});return e=e.add(t,"day"),oi.assignSimilarDate(r,e),oi.implySimilarTime(r,e),r}Ge.theDayAfter=Wp;function V0(n,t=22){let e=Da.default(n.instant),r=new $r.ParsingComponents(n,{});return r.imply("hour",t),r.imply("meridiem",Xo.Meridiem.PM),oi.assignSimilarDate(r,e),r}Ge.tonight=V0;function z0(n,t=0){let e=Da.default(n.instant),r=new $r.ParsingComponents(n,{});return e.hour()<6&&(e=e.add(-1,"day")),oi.assignSimilarDate(r,e),r.imply("hour",t),r}Ge.lastNight=z0;function K0(n,t=20){let e=new $r.ParsingComponents(n,{});return e.imply("meridiem",Xo.Meridiem.PM),e.imply("hour",t),e}Ge.evening=K0;function Q0(n,t=20){let e=Da.default(n.instant),r=new $r.ParsingComponents(n,{});return e=e.add(-1,"day"),oi.assignSimilarDate(r,e),r.imply("hour",t),r.imply("meridiem",Xo.Meridiem.PM),r}Ge.yesterdayEvening=Q0;function X0(n){let t=new $r.ParsingComponents(n,{});return t.imply("hour",0),t.imply("minute",0),t.imply("second",0),t}Ge.midnight=X0;function Z0(n,t=6){let e=new $r.ParsingComponents(n,{});return e.imply("meridiem",Xo.Meridiem.AM),e.imply("hour",t),e}Ge.morning=Z0;function J0(n){let t=new $r.ParsingComponents(n,{});return t.imply("meridiem",Xo.Meridiem.AM),t.imply("hour",12),t}Ge.noon=J0});var HT=x(yr=>{"use strict";var e1=yr&&yr.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),t1=yr&&yr.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),n1=yr&&yr.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&e1(t,n,e);return t1(t,n),t},r1=yr&&yr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(yr,"__esModule",{value:!0});var i1=r1(Ue()),s1=re(),a1=qn(),Zo=n1(li()),o1=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,$p=class extends s1.AbstractParserWithWordBoundaryChecking{innerPattern(t){return o1}innerExtract(t,e){let r=i1.default(t.refDate),i=e[0].toLowerCase(),s=t.createParsingComponents();switch(i){case"now":return Zo.now(t.reference);case"today":return Zo.today(t.reference);case"yesterday":return Zo.yesterday(t.reference);case"tomorrow":case"tmr":case"tmrw":return Zo.tomorrow(t.reference);case"tonight":return Zo.tonight(t.reference);default:i.match(/last\s*night/)&&(r.hour()>6&&(r=r.add(-1,"day")),a1.assignSimilarDate(s,r),s.imply("hour",0));break}return s}};yr.default=$p});var GT=x(Jo=>{"use strict";var l1=Jo&&Jo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Jo,"__esModule",{value:!0});var Xu=ht(),u1=re(),c1=l1(Ue()),d1=qn(),f1=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,qp=class extends u1.AbstractParserWithWordBoundaryChecking{innerPattern(){return f1}innerExtract(t,e){let r=c1.default(t.refDate),i=t.createParsingComponents();switch(e[1].toLowerCase()){case"afternoon":i.imply("meridiem",Xu.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",Xu.Meridiem.PM),i.imply("hour",20);break;case"midnight":d1.assignTheNextDay(i,r),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",Xu.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",Xu.Meridiem.AM),i.imply("hour",12);break}return i}};Jo.default=qp});var vs=x(Fi=>{"use strict";var p1=Fi&&Fi.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Fi,"__esModule",{value:!0});Fi.toDayJSClosestWeekday=Fi.toDayJSWeekday=void 0;var BT=p1(Ue());function m1(n,t,e){if(!e)return VT(n,t);let r=BT.default(n);switch(e){case"this":r=r.day(t);break;case"next":r=r.day(t+7);break;case"last":r=r.day(t-7);break}return r}Fi.toDayJSWeekday=m1;function VT(n,t){let e=BT.default(n),r=e.day();return Math.abs(t-7-r)<Math.abs(t-r)?e=e.day(t-7):Math.abs(t+7-r)<Math.abs(t-r)?e=e.day(t+7):e=e.day(t),e}Fi.toDayJSClosestWeekday=VT});var KT=x(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});var zT=Mt(),h1=Ke(),g1=re(),y1=vs(),b1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${h1.matchAnyPattern(zT.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),T1=1,_1=2,v1=3,Hp=class extends g1.AbstractParserWithWordBoundaryChecking{innerPattern(){return b1}innerExtract(t,e){let r=e[_1].toLowerCase(),i=zT.WEEKDAY_DICTIONARY[r],s=e[T1],a=e[v1],o=s||a;o=o||"",o=o.toLowerCase();let l=null;o=="last"||o=="past"?l="last":o=="next"?l="next":o=="this"&&(l="this");let u=y1.toDayJSWeekday(t.refDate,i,l);return t.createParsingComponents().assign("weekday",i).imply("day",u.date()).imply("month",u.month()+1).imply("year",u.year())}};Gp.default=Hp});var ZT=x(el=>{"use strict";var w1=el&&el.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(el,"__esModule",{value:!0});var XT=Mt(),QT=nt(),k1=w1(Ue()),S1=re(),D1=Ke(),E1=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${D1.matchAnyPattern(XT.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),x1=1,O1=2,Bp=class extends S1.AbstractParserWithWordBoundaryChecking{innerPattern(){return E1}innerExtract(t,e){let r=e[x1].toLowerCase(),i=e[O1].toLowerCase(),s=XT.TIME_UNIT_DICTIONARY[i];if(r=="next"||r.startsWith("after")){let l={};return l[s]=1,QT.ParsingComponents.createRelativeFromReference(t.reference,l)}if(r=="last"||r=="past"){let l={};return l[s]=-1,QT.ParsingComponents.createRelativeFromReference(t.reference,l)}let a=t.createParsingComponents(),o=k1.default(t.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}};el.default=Bp});var br=x(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.ParsingContext=Oa.Chrono=void 0;var Ea=nt(),C1=Vp(),xa=class{constructor(t){t=t||C1.createCasualConfiguration(),this.parsers=[...t.parsers],this.refiners=[...t.refiners]}clone(){return new xa({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(t,e,r){let i=this.parse(t,e,r);return i.length>0?i[0].start.date():null}parse(t,e,r){let i=new Zu(t,e,r),s=[];return this.parsers.forEach(a=>{let o=xa.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(t,e){let r=[],i=e.pattern(t),s=t.text,a=t.text,o=i.exec(a);for(;o;){let l=o.index+s.length-a.length;o.index=l;let u=e.extract(t,o);if(!u){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;u instanceof Ea.ParsingResult?c=u:u instanceof Ea.ParsingComponents?(c=t.createParsingResult(o.index,o[0]),c.start=u):c=t.createParsingResult(o.index,o[0],u),t.debug(()=>console.log(`${e.constructor.name} extracted result ${c}`)),r.push(c),a=s.substring(l+c.text.length),o=i.exec(a)}return r}};Oa.Chrono=xa;var Zu=class{constructor(t,e,r){this.text=t,this.reference=new Ea.ReferenceWithTimezone(e),this.option=r!=null?r:{},this.refDate=this.reference.instant}createParsingComponents(t){return t instanceof Ea.ParsingComponents?t:new Ea.ParsingComponents(this.reference,t)}createParsingResult(t,e,r,i){let s=typeof e=="string"?e:this.text.substring(t,e),a=r?this.createParsingComponents(r):null,o=i?this.createParsingComponents(i):null;return new Ea.ParsingResult(this.reference,t,s,a,o)}debug(t){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(t):this.option.debug.debug(t))}};Oa.ParsingContext=Zu});var ws=x(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});var JT=Ct(),M1=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"),Ju=1,e_=5,t_=2,n_=3,zp=4,Kp=class{constructor(t){this.groupNumberMonth=t?n_:t_,this.groupNumberDay=t?t_:n_}pattern(){return M1}extract(t,e){if(e[Ju]=="/"||e[e_]=="/"){e.index+=e[0].length;return}let r=e.index+e[Ju].length,i=e[0].substr(e[Ju].length,e[0].length-e[Ju].length-e[e_].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!e[zp]&&e[0].indexOf("/")<0)return;let s=t.createParsingResult(r,i),a=parseInt(e[this.groupNumberMonth]),o=parseInt(e[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),e[zp]){let l=parseInt(e[zp]),u=JT.findMostLikelyADYear(l);s.start.assign("year",u)}else{let l=JT.findYearClosestToRef(t.refDate,o,a);s.start.imply("year",l)}return s}};Qp.default=Kp});var i_=x(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});var r_=Mt(),R1=nt(),A1=re(),P1=Hn(),N1=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${r_.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Xp=class extends A1.AbstractParserWithWordBoundaryChecking{innerPattern(){return N1}innerExtract(t,e){let r=e[1].toLowerCase(),i=r_.parseTimeUnits(e[2]);switch(r){case"last":case"past":case"-":i=P1.reverseTimeUnits(i);break}return R1.ParsingComponents.createRelativeFromReference(t.reference,i)}};Zp.default=Xp});var a_=x(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var I1=wa(),Jp=nt(),F1=Mt(),L1=Hn();function s_(n){return n.text.match(/\s+(before|from)$/i)!=null}function U1(n){return n.text.match(/\s+(after|since)$/i)!=null}var em=class extends I1.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(t,e,r){return!t.match(this.patternBetween())||!s_(e)&&!U1(e)?!1:!!r.start.get("day")&&!!r.start.get("month")&&!!r.start.get("year")}mergeResults(t,e,r){let i=F1.parseTimeUnits(e.text);s_(e)&&(i=L1.reverseTimeUnits(i));let s=Jp.ParsingComponents.createRelativeFromReference(new Jp.ReferenceWithTimezone(r.start.date()),i);return new Jp.ParsingResult(r.reference,e.index,`${e.text}${t}${r.text}`,s)}};tm.default=em});var Vp=x(ut=>{"use strict";var bt=ut&&ut.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ut,"__esModule",{value:!0});ut.createConfiguration=ut.createCasualConfiguration=ut.parseDate=ut.parse=ut.GB=ut.strict=ut.casual=void 0;var Y1=bt(sT()),j1=bt(dT()),W1=bt(gT()),$1=bt(TT()),q1=bt(wT()),H1=bt(kT()),G1=bt(DT()),B1=bt(ET()),V1=bt(xT()),z1=bt(OT()),K1=bt(RT()),Q1=ai(),X1=bt(HT()),Z1=bt(GT()),J1=bt(KT()),eC=bt(ZT()),nm=br(),tC=bt(ws()),nC=bt(i_()),rC=bt(a_());ut.casual=new nm.Chrono(o_(!1));ut.strict=new nm.Chrono(ec(!0,!1));ut.GB=new nm.Chrono(ec(!1,!0));function iC(n,t,e){return ut.casual.parse(n,t,e)}ut.parse=iC;function sC(n,t,e){return ut.casual.parseDate(n,t,e)}ut.parseDate=sC;function o_(n=!1){let t=ec(!1,n);return t.parsers.unshift(new X1.default),t.parsers.unshift(new Z1.default),t.parsers.unshift(new $1.default),t.parsers.unshift(new eC.default),t.parsers.unshift(new nC.default),t}ut.createCasualConfiguration=o_;function ec(n=!0,t=!1){return Q1.includeCommonConfiguration({parsers:[new tC.default(t),new Y1.default,new j1.default,new W1.default,new J1.default,new q1.default,new H1.default,new G1.default(n),new B1.default(n),new V1.default(n)],refiners:[new rC.default,new K1.default,new z1.default]},n)}ut.createConfiguration=ec});var l_=x(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var aC=Ts(),rm=class extends aC.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(t,e){return e[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(t,e)}};im.default=rm});var tl=x(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.parseTimeUnits=Qe.TIME_UNITS_PATTERN=Qe.parseYear=Qe.YEAR_PATTERN=Qe.parseNumberPattern=Qe.NUMBER_PATTERN=Qe.TIME_UNIT_DICTIONARY=Qe.INTEGER_WORD_DICTIONARY=Qe.MONTH_DICTIONARY=Qe.WEEKDAY_DICTIONARY=void 0;var sm=Ke(),oC=Ct();Qe.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};Qe.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};Qe.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};Qe.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"};Qe.NUMBER_PATTERN=`(?:${sm.matchAnyPattern(Qe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function c_(n){let t=n.toLowerCase();return Qe.INTEGER_WORD_DICTIONARY[t]!==void 0?Qe.INTEGER_WORD_DICTIONARY[t]:t==="a"||t==="an"?1:t.match(/few/)?3:t.match(/half/)?.5:t.match(/couple/)?2:t.match(/several/)?7:parseFloat(t)}Qe.parseNumberPattern=c_;Qe.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 lC(n){if(/v/i.test(n))return-parseInt(n.replace(/[^0-9]+/gi,""));if(/n/i.test(n))return parseInt(n.replace(/[^0-9]+/gi,""));if(/z/i.test(n))return parseInt(n.replace(/[^0-9]+/gi,""));let t=parseInt(n);return oC.findMostLikelyADYear(t)}Qe.parseYear=lC;var d_=`(${Qe.NUMBER_PATTERN})\\s{0,5}(${sm.matchAnyPattern(Qe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,u_=new RegExp(d_,"i");Qe.TIME_UNITS_PATTERN=sm.repeatedTimeunitPattern("",d_);function uC(n){let t={},e=n,r=u_.exec(e);for(;r;)cC(t,r),e=e.substring(r[0].length),r=u_.exec(e);return t}Qe.parseTimeUnits=uC;function cC(n,t){let e=c_(t[1]),r=Qe.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];n[r]=e}});var p_=x(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var f_=tl(),dC=Ke(),fC=re(),pC=vs(),mC=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${dC.matchAnyPattern(f_.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),hC=1,gC=3,yC=2,am=class extends fC.AbstractParserWithWordBoundaryChecking{innerPattern(){return mC}innerExtract(t,e){let r=e[yC].toLowerCase(),i=f_.WEEKDAY_DICTIONARY[r],s=e[hC],a=e[gC],o=s||a;o=o||"",o=o.toLowerCase();let l=null;o.match(/letzte/)?l="last":o.match(/chste/)?l="next":o.match(/diese/)&&(l="this");let u=pC.toDayJSWeekday(t.refDate,i,l);return t.createParsingComponents().assign("weekday",i).imply("day",u.date()).imply("month",u.month()+1).imply("year",u.year())}};om.default=am});var y_=x(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});var Li=ht(),bC=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"),TC=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"),_C=2,m_=3,h_=4,g_=5,Ca=class{pattern(t){return bC}extract(t,e){let r=t.createParsingResult(e.index+e[1].length,e[0].substring(e[1].length));if(r.text.match(/^\d{4}$/)||(r.start=Ca.extractTimeComponent(r.start.clone(),e),!r.start))return e.index+=e[0].length,null;let i=t.text.substring(e.index+e[0].length),s=TC.exec(i);return s&&(r.end=Ca.extractTimeComponent(r.start.clone(),s),r.end&&(r.text+=s[0])),r}static extractTimeComponent(t,e){let r=0,i=0,s=null;if(r=parseInt(e[_C]),e[m_]!=null&&(i=parseInt(e[m_])),i>=60||r>24)return null;if(r>=12&&(s=Li.Meridiem.PM),e[g_]!=null){if(r>12)return null;let a=e[g_].toLowerCase();a.match(/morgen|vormittag/)&&(s=Li.Meridiem.AM,r==12&&(r=0)),a.match(/nachmittag|abend/)&&(s=Li.Meridiem.PM,r!=12&&(r+=12)),a.match(/nacht/)&&(r==12?(s=Li.Meridiem.AM,r=0):r<6?s=Li.Meridiem.AM:(s=Li.Meridiem.PM,r+=12))}if(t.assign("hour",r),t.assign("minute",i),s!==null?t.assign("meridiem",s):r<12?t.imply("meridiem",Li.Meridiem.AM):t.imply("meridiem",Li.Meridiem.PM),e[h_]!=null){let a=parseInt(e[h_]);if(a>=60)return null;t.assign("second",a)}return t}};lm.default=Ca});var b_=x(nl=>{"use strict";var vC=nl&&nl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(nl,"__esModule",{value:!0});var wC=vC(Wr()),um=class extends wC.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};nl.default=um});var T_=x(rl=>{"use strict";var kC=rl&&rl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(rl,"__esModule",{value:!0});var SC=kC(si()),cm=class extends SC.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};rl.default=cm});var dm=x(sl=>{"use strict";var DC=sl&&sl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(sl,"__esModule",{value:!0});var EC=DC(Ue()),ks=ht(),xC=re(),OC=qn(),CC=Hn(),il=class extends xC.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(t,e){let r=EC.default(t.refDate),i=e[2].toLowerCase(),s=t.createParsingComponents();return OC.implySimilarTime(s,r),il.extractTimeComponents(s,i)}static extractTimeComponents(t,e){switch(e){case"morgen":t.imply("hour",6),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ks.Meridiem.AM);break;case"vormittag":t.imply("hour",9),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ks.Meridiem.AM);break;case"mittag":case"mittags":t.imply("hour",12),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ks.Meridiem.AM);break;case"nachmittag":t.imply("hour",15),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ks.Meridiem.PM);break;case"abend":t.imply("hour",18),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ks.Meridiem.PM);break;case"nacht":t.imply("hour",22),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ks.Meridiem.PM);break;case"mitternacht":t.get("hour")>1&&(t=CC.addImpliedTimeUnits(t,{day:1})),t.imply("hour",0),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ks.Meridiem.AM);break}return t}};sl.default=il});var w_=x(Tr=>{"use strict";var MC=Tr&&Tr.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),RC=Tr&&Tr.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),AC=Tr&&Tr.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&MC(t,n,e);return RC(t,n),t},v_=Tr&&Tr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Tr,"__esModule",{value:!0});var PC=v_(Ue()),NC=re(),Ss=qn(),IC=v_(dm()),__=AC(li()),FC=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),LC=1,UC=2,fm=class extends NC.AbstractParserWithWordBoundaryChecking{innerPattern(t){return FC}innerExtract(t,e){let r=PC.default(t.refDate),i=(e[LC]||"").toLowerCase(),s=(e[UC]||"").toLowerCase(),a=t.createParsingComponents();switch(i){case"jetzt":a=__.now(t.reference);break;case"heute":a=__.today(t.reference);break;case"morgen":Ss.assignTheNextDay(a,r);break;case"\xFCbermorgen":case"uebermorgen":r=r.add(1,"day"),Ss.assignTheNextDay(a,r);break;case"gestern":r=r.add(-1,"day"),Ss.assignSimilarDate(a,r),Ss.implySimilarTime(a,r);break;case"vorgestern":r=r.add(-2,"day"),Ss.assignSimilarDate(a,r),Ss.implySimilarTime(a,r);break;default:i.match(/letzte\s*nacht/)&&(r.hour()>6&&(r=r.add(-1,"day")),Ss.assignSimilarDate(a,r),a.imply("hour",0));break}return s&&(a=IC.default.extractTimeComponents(a,s)),a}};Tr.default=fm});var O_=x(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});var YC=Ct(),E_=tl(),x_=tl(),jC=Ke(),WC=re(),$C=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${jC.matchAnyPattern(E_.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${x_.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),k_=1,S_=2,qC=3,D_=4,pm=class extends WC.AbstractParserWithWordBoundaryChecking{innerPattern(){return $C}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=E_.MONTH_DICTIONARY[e[qC].toLowerCase()],s=parseInt(e[k_]);if(s>31)return e.index=e.index+e[k_].length,null;if(r.start.assign("month",i),r.start.assign("day",s),e[D_]){let a=x_.parseYear(e[D_]);r.start.assign("year",a)}else{let a=YC.findYearClosestToRef(t.refDate,s,i);r.start.imply("year",a)}if(e[S_]){let a=parseInt(e[S_]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};mm.default=pm});var C_=x(gm=>{"use strict";Object.defineProperty(gm,"__esModule",{value:!0});var tc=tl(),HC=nt(),GC=re(),BC=Hn(),VC=Ke(),hm=class extends GC.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*)?(${tc.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${VC.matchAnyPattern(tc.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(t,e){let r=e[2]?tc.parseNumberPattern(e[2]):1,i=tc.TIME_UNIT_DICTIONARY[e[4].toLowerCase()],s={};s[i]=r;let a=e[1]||e[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=BC.reverseTimeUnits(s)),HC.ParsingComponents.createRelativeFromReference(t.reference,s)}};gm.default=hm});var A_=x(Tt=>{"use strict";var _r=Tt&&Tt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.createConfiguration=Tt.createCasualConfiguration=Tt.parseDate=Tt.parse=Tt.strict=Tt.casual=void 0;var zC=ai(),M_=br(),KC=_r(ws()),QC=_r(Up()),XC=_r(l_()),ZC=_r(p_()),JC=_r(y_()),eM=_r(b_()),tM=_r(T_()),nM=_r(w_()),rM=_r(dm()),iM=_r(O_()),sM=_r(C_());Tt.casual=new M_.Chrono(R_());Tt.strict=new M_.Chrono(ym(!0));function aM(n,t,e){return Tt.casual.parse(n,t,e)}Tt.parse=aM;function oM(n,t,e){return Tt.casual.parseDate(n,t,e)}Tt.parseDate=oM;function R_(n=!0){let t=ym(!1,n);return t.parsers.unshift(new rM.default),t.parsers.unshift(new nM.default),t.parsers.unshift(new sM.default),t}Tt.createCasualConfiguration=R_;function ym(n=!0,t=!0){return zC.includeCommonConfiguration({parsers:[new QC.default,new KC.default(t),new XC.default,new JC.default,new iM.default,new ZC.default],refiners:[new eM.default,new tM.default]},n)}Tt.createConfiguration=ym});var N_=x(vr=>{"use strict";var lM=vr&&vr.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),uM=vr&&vr.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),cM=vr&&vr.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&lM(t,n,e);return uM(t,n),t},dM=vr&&vr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(vr,"__esModule",{value:!0});var fM=dM(Ue()),pM=ht(),mM=re(),P_=qn(),nc=cM(li()),bm=class extends mM.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(t,e){let r=fM.default(t.refDate),i=e[0].toLowerCase(),s=t.createParsingComponents();switch(i){case"maintenant":return nc.now(t.reference);case"aujourd'hui":return nc.today(t.reference);case"hier":return nc.yesterday(t.reference);case"demain":return nc.tomorrow(t.reference);default:i.match(/cette\s*nuit/)?(P_.assignSimilarDate(s,r),s.imply("hour",22),s.imply("meridiem",pM.Meridiem.PM)):i.match(/la\s*veille/)&&(r=r.add(-1,"day"),P_.assignSimilarDate(s,r),s.imply("hour",0))}return s}};vr.default=bm});var I_=x(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});var al=ht(),hM=re(),Tm=class extends hM.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(t,e){let r=e[2].toLowerCase(),i=t.createParsingComponents();switch(r){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",al.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",al.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",al.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",al.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",al.Meridiem.AM);break}return i}};_m.default=Tm});var F_=x(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});var gM=Ts(),vm=class extends gM.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(t,e){return e[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(t,e)}};wm.default=vm});var L_=x(ol=>{"use strict";var yM=ol&&ol.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ol,"__esModule",{value:!0});var bM=yM(si()),km=class extends bM.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};ol.default=km});var U_=x(ll=>{"use strict";var TM=ll&&ll.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ll,"__esModule",{value:!0});var _M=TM(Wr()),Sm=class extends _M.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};ll.default=Sm});var Ui=x(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.parseTimeUnits=Ye.TIME_UNITS_PATTERN=Ye.parseYear=Ye.YEAR_PATTERN=Ye.parseOrdinalNumberPattern=Ye.ORDINAL_NUMBER_PATTERN=Ye.parseNumberPattern=Ye.NUMBER_PATTERN=Ye.TIME_UNIT_DICTIONARY=Ye.INTEGER_WORD_DICTIONARY=Ye.MONTH_DICTIONARY=Ye.WEEKDAY_DICTIONARY=void 0;var Dm=Ke();Ye.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};Ye.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};Ye.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};Ye.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"};Ye.NUMBER_PATTERN=`(?:${Dm.matchAnyPattern(Ye.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function j_(n){let t=n.toLowerCase();return Ye.INTEGER_WORD_DICTIONARY[t]!==void 0?Ye.INTEGER_WORD_DICTIONARY[t]:t==="une"||t==="un"?1:t.match(/quelques?/)?3:t.match(/demi-?/)?.5:parseFloat(t)}Ye.parseNumberPattern=j_;Ye.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function vM(n){let t=n.toLowerCase();return t=t.replace(/(?:er)$/i,""),parseInt(t)}Ye.parseOrdinalNumberPattern=vM;Ye.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 wM(n){if(/AC/i.test(n))return n=n.replace(/BC/i,""),-parseInt(n);if(/AD/i.test(n)||/C/i.test(n))return n=n.replace(/[^\d]+/i,""),parseInt(n);let t=parseInt(n);return t<100&&(t>50?t=t+1900:t=t+2e3),t}Ye.parseYear=wM;var W_=`(${Ye.NUMBER_PATTERN})\\s{0,5}(${Dm.matchAnyPattern(Ye.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Y_=new RegExp(W_,"i");Ye.TIME_UNITS_PATTERN=Dm.repeatedTimeunitPattern("",W_);function kM(n){let t={},e=n,r=Y_.exec(e);for(;r;)SM(t,r),e=e.substring(r[0].length),r=Y_.exec(e);return t}Ye.parseTimeUnits=kM;function SM(n,t){let e=j_(t[1]),r=Ye.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];n[r]=e}});var q_=x(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var $_=Ui(),DM=Ke(),EM=re(),xM=vs(),OM=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${DM.matchAnyPattern($_.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),CM=1,MM=2,Em=class extends EM.AbstractParserWithWordBoundaryChecking{innerPattern(){return OM}innerExtract(t,e){let r=e[CM].toLowerCase(),i=$_.WEEKDAY_DICTIONARY[r];if(i===void 0)return null;let s=e[MM];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=xM.toDayJSWeekday(t.refDate,i,a);return t.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};xm.default=Em});var V_=x(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});var ul=ht(),RM=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"),AM=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"),PM=2,H_=3,G_=4,B_=5,Ma=class{pattern(t){return RM}extract(t,e){let r=t.createParsingResult(e.index+e[1].length,e[0].substring(e[1].length));if(r.text.match(/^\d{4}$/)||(r.start=Ma.extractTimeComponent(r.start.clone(),e),!r.start))return e.index+=e[0].length,null;let i=t.text.substring(e.index+e[0].length),s=AM.exec(i);return s&&(r.end=Ma.extractTimeComponent(r.start.clone(),s),r.end&&(r.text+=s[0])),r}static extractTimeComponent(t,e){let r=0,i=0,s=null;if(r=parseInt(e[PM]),e[H_]!=null&&(i=parseInt(e[H_])),i>=60||r>24)return null;if(r>=12&&(s=ul.Meridiem.PM),e[B_]!=null){if(r>12)return null;let a=e[B_][0].toLowerCase();a=="a"&&(s=ul.Meridiem.AM,r==12&&(r=0)),a=="p"&&(s=ul.Meridiem.PM,r!=12&&(r+=12))}if(t.assign("hour",r),t.assign("minute",i),s!==null?t.assign("meridiem",s):r<12?t.imply("meridiem",ul.Meridiem.AM):t.imply("meridiem",ul.Meridiem.PM),e[G_]!=null){let a=parseInt(e[G_]);if(a>=60)return null;t.assign("second",a)}return t}};Om.default=Ma});var J_=x(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});var NM=Ct(),X_=Ui(),Z_=Ui(),rc=Ui(),IM=Ke(),FM=re(),LM=new RegExp(`(?:on\\s*?)?(${rc.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${rc.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${IM.matchAnyPattern(X_.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Z_.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),z_=1,K_=2,UM=3,Q_=4,Cm=class extends FM.AbstractParserWithWordBoundaryChecking{innerPattern(){return LM}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=X_.MONTH_DICTIONARY[e[UM].toLowerCase()],s=rc.parseOrdinalNumberPattern(e[z_]);if(s>31)return e.index=e.index+e[z_].length,null;if(r.start.assign("month",i),r.start.assign("day",s),e[Q_]){let a=Z_.parseYear(e[Q_]);r.start.assign("year",a)}else{let a=NM.findYearClosestToRef(t.refDate,s,i);r.start.imply("year",a)}if(e[K_]){let a=rc.parseOrdinalNumberPattern(e[K_]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};Mm.default=Cm});var tv=x(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});var ev=Ui(),YM=nt(),jM=re(),WM=Hn(),Rm=class extends jM.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${ev.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(t,e){let r=ev.parseTimeUnits(e[1]),i=WM.reverseTimeUnits(r);return YM.ParsingComponents.createRelativeFromReference(t.reference,i)}};Am.default=Rm});var rv=x(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var nv=Ui(),$M=nt(),qM=re(),Pm=class extends qM.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${nv.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(t,e){let r=nv.parseTimeUnits(e[1]);return $M.ParsingComponents.createRelativeFromReference(t.reference,r)}};Nm.default=Pm});var iv=x(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});var ic=Ui(),HM=nt(),GM=re(),BM=Hn(),VM=Ke(),Im=class extends GM.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${ic.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${VM.matchAnyPattern(ic.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(t,e){let r=e[1]?ic.parseNumberPattern(e[1]):1,i=ic.TIME_UNIT_DICTIONARY[e[3].toLowerCase()],s={};s[i]=r;let a=e[2]||e[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=BM.reverseTimeUnits(s)),HM.ParsingComponents.createRelativeFromReference(t.reference,s)}};Fm.default=Im});var ov=x(_t=>{"use strict";var Gn=_t&&_t.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(_t,"__esModule",{value:!0});_t.createConfiguration=_t.createCasualConfiguration=_t.parseDate=_t.parse=_t.strict=_t.casual=void 0;var zM=ai(),sv=br(),KM=Gn(N_()),QM=Gn(I_()),XM=Gn(ws()),ZM=Gn(F_()),JM=Gn(L_()),eR=Gn(U_()),tR=Gn(q_()),nR=Gn(V_()),rR=Gn(J_()),iR=Gn(tv()),sR=Gn(rv()),aR=Gn(iv());_t.casual=new sv.Chrono(av());_t.strict=new sv.Chrono(Lm(!0));function oR(n,t,e){return _t.casual.parse(n,t,e)}_t.parse=oR;function lR(n,t,e){return _t.casual.parseDate(n,t,e)}_t.parseDate=lR;function av(n=!0){let t=Lm(!1,n);return t.parsers.unshift(new KM.default),t.parsers.unshift(new QM.default),t.parsers.unshift(new aR.default),t}_t.createCasualConfiguration=av;function Lm(n=!0,t=!0){return zM.includeCommonConfiguration({parsers:[new XM.default(t),new rR.default,new ZM.default,new nR.default,new iR.default,new sR.default,new tR.default],refiners:[new JM.default,new eR.default]},n)}_t.createConfiguration=Lm});var lv=x(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});sc.toHankaku=void 0;function uR(n){return String(n).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,cR)}sc.toHankaku=uR;function cR(n){return String.fromCharCode(n.charCodeAt(0)-65248)}});var cv=x(cl=>{"use strict";var dR=cl&&cl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(cl,"__esModule",{value:!0});var Um=lv(),fR=Ct(),pR=dR(Ue()),mR=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,uv=1,hR=2,Ym=3,gR=4,yR=5,bR=6,jm=class{pattern(){return mR}extract(t,e){let r=parseInt(Um.toHankaku(e[yR])),i=parseInt(Um.toHankaku(e[bR])),s=t.createParsingComponents({day:i,month:r});if(e[uv]&&e[uv].match("\u540C|\u4ECA|\u672C")){let a=pR.default(t.refDate);s.assign("year",a.year())}if(e[hR]){let a=e[gR],o=a=="\u5143"?1:parseInt(Um.toHankaku(a));e[Ym]=="\u4EE4\u548C"?o+=2018:e[Ym]=="\u5E73\u6210"?o+=1988:e[Ym]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=fR.findYearClosestToRef(t.refDate,i,r);s.imply("year",a)}return s}};cl.default=jm});var dv=x(dl=>{"use strict";var TR=dl&&dl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(dl,"__esModule",{value:!0});var _R=TR(Wr()),Wm=class extends _R.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};dl.default=Wm});var pv=x(wr=>{"use strict";var vR=wr&&wr.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),wR=wr&&wr.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),kR=wr&&wr.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&vR(t,n,e);return wR(t,n),t},SR=wr&&wr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(wr,"__esModule",{value:!0});var DR=SR(Ue()),fv=ht(),$m=kR(li()),ER=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,qm=class{pattern(){return ER}extract(t,e){let r=e[0],i=DR.default(t.refDate),s=t.createParsingComponents();switch(r){case"\u6628\u65E5":return $m.yesterday(t.reference);case"\u660E\u65E5":return $m.tomorrow(t.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return $m.today(t.reference)}return r=="\u4ECA\u591C"||r=="\u4ECA\u5915"||r=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",fv.Meridiem.PM)):r.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",fv.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};wr.default=qm});var gv=x(vt=>{"use strict";var Hm=vt&&vt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(vt,"__esModule",{value:!0});vt.createConfiguration=vt.createCasualConfiguration=vt.parseDate=vt.parse=vt.strict=vt.casual=void 0;var xR=Hm(cv()),OR=Hm(dv()),CR=Hm(pv()),mv=br();vt.casual=new mv.Chrono(hv());vt.strict=new mv.Chrono(Gm());function MR(n,t,e){return vt.casual.parse(n,t,e)}vt.parse=MR;function RR(n,t,e){return vt.casual.parseDate(n,t,e)}vt.parseDate=RR;function hv(){let n=Gm();return n.parsers.unshift(new CR.default),n}vt.createCasualConfiguration=hv;function Gm(){return{parsers:[new xR.default],refiners:[new OR.default]}}vt.createConfiguration=Gm});var ac=x(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.parseYear=qr.YEAR_PATTERN=qr.MONTH_DICTIONARY=qr.WEEKDAY_DICTIONARY=void 0;qr.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};qr.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};qr.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function AR(n){if(n.match(/^[0-9]{1,4}$/)){let t=parseInt(n);return t<100&&(t>50?t=t+1900:t=t+2e3),t}return n.match(/a\.?\s*c\.?/i)?(n=n.replace(/a\.?\s*c\.?/i,""),-parseInt(n)):parseInt(n)}qr.parseYear=AR});var bv=x(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0});var yv=ac(),PR=Ke(),NR=re(),IR=vs(),FR=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${PR.matchAnyPattern(yv.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),LR=1,UR=2,YR=3,Bm=class extends NR.AbstractParserWithWordBoundaryChecking{innerPattern(){return FR}innerExtract(t,e){let r=e[UR].toLowerCase(),i=yv.WEEKDAY_DICTIONARY[r];if(i===void 0)return null;let s=e[LR],a=e[YR],o=s||a||"";o=o.toLowerCase();let l=null;o=="passado"?l="this":o=="pr\xF3ximo"||o=="proximo"?l="next":o=="este"&&(l="this");let u=IR.toDayJSWeekday(t.refDate,i,l);return t.createParsingComponents().assign("weekday",i).imply("day",u.date()).imply("month",u.month()+1).imply("year",u.year())}};Vm.default=Bm});var Tv=x(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});var jR=Ts(),zm=class extends jR.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Km.default=zm});var _v=x(fl=>{"use strict";var WR=fl&&fl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(fl,"__esModule",{value:!0});var $R=WR(si()),Qm=class extends $R.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};fl.default=Qm});var vv=x(pl=>{"use strict";var qR=pl&&pl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(pl,"__esModule",{value:!0});var HR=qR(Wr()),Xm=class extends HR.default{patternBetween(){return/^\s*(?:-)\s*$/i}};pl.default=Xm});var xv=x(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});var GR=Ct(),Dv=ac(),Ev=ac(),BR=Ke(),VR=re(),zR=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*)(${BR.matchAnyPattern(Dv.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Ev.YEAR_PATTERN}))?(?=\\W|$)`,"i"),wv=1,kv=2,KR=3,Sv=4,Zm=class extends VR.AbstractParserWithWordBoundaryChecking{innerPattern(){return zR}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=Dv.MONTH_DICTIONARY[e[KR].toLowerCase()],s=parseInt(e[wv]);if(s>31)return e.index=e.index+e[wv].length,null;if(r.start.assign("month",i),r.start.assign("day",s),e[Sv]){let a=Ev.parseYear(e[Sv]);r.start.assign("year",a)}else{let a=GR.findYearClosestToRef(t.refDate,s,i);r.start.imply("year",a)}if(e[kv]){let a=parseInt(e[kv]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};Jm.default=Zm});var Ov=x(ui=>{"use strict";var QR=ui&&ui.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),XR=ui&&ui.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),ZR=ui&&ui.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&QR(t,n,e);return XR(t,n),t};Object.defineProperty(ui,"__esModule",{value:!0});var JR=re(),oc=ZR(li()),eh=class extends JR.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(t,e){let r=e[0].toLowerCase(),i=t.createParsingComponents();switch(r){case"agora":return oc.now(t.reference);case"hoje":return oc.today(t.reference);case"amanha":case"amanh\xE3":return oc.tomorrow(t.reference);case"ontem":return oc.yesterday(t.reference)}return i}};ui.default=eh});var Cv=x(ml=>{"use strict";var eA=ml&&ml.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ml,"__esModule",{value:!0});var lc=ht(),tA=re(),nA=qn(),rA=eA(Ue()),th=class extends tA.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(t,e){let r=rA.default(t.refDate),i=t.createParsingComponents();switch(e[1].toLowerCase()){case"tarde":i.imply("meridiem",lc.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",lc.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",lc.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":nA.assignTheNextDay(i,r),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",lc.Meridiem.AM),i.imply("hour",12);break}return i}};ml.default=th});var Av=x(wt=>{"use strict";var Yi=wt&&wt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(wt,"__esModule",{value:!0});wt.createConfiguration=wt.createCasualConfiguration=wt.parseDate=wt.parse=wt.strict=wt.casual=void 0;var iA=ai(),Mv=br(),sA=Yi(ws()),aA=Yi(bv()),oA=Yi(Tv()),lA=Yi(_v()),uA=Yi(vv()),cA=Yi(xv()),dA=Yi(Ov()),fA=Yi(Cv());wt.casual=new Mv.Chrono(Rv());wt.strict=new Mv.Chrono(nh(!0));function pA(n,t,e){return wt.casual.parse(n,t,e)}wt.parse=pA;function mA(n,t,e){return wt.casual.parseDate(n,t,e)}wt.parseDate=mA;function Rv(n=!0){let t=nh(!1,n);return t.parsers.push(new dA.default),t.parsers.push(new fA.default),t}wt.createCasualConfiguration=Rv;function nh(n=!0,t=!0){return iA.includeCommonConfiguration({parsers:[new sA.default(t),new aA.default,new oA.default,new cA.default],refiners:[new lA.default,new uA.default]},n)}wt.createConfiguration=nh});var Pv=x(hl=>{"use strict";var hA=hl&&hl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(hl,"__esModule",{value:!0});var gA=hA(Wr()),rh=class extends gA.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};hl.default=rh});var Nv=x(gl=>{"use strict";var yA=gl&&gl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(gl,"__esModule",{value:!0});var bA=yA(si()),ih=class extends bA.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};gl.default=ih});var Iv=x(ci=>{"use strict";var TA=ci&&ci.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),_A=ci&&ci.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),vA=ci&&ci.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&TA(t,n,e);return _A(t,n),t};Object.defineProperty(ci,"__esModule",{value:!0});var wA=re(),uc=vA(li()),sh=class extends wA.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(t,e){let r=e[0].toLowerCase(),i=t.createParsingComponents();switch(r){case"nu":return uc.now(t.reference);case"vandaag":return uc.today(t.reference);case"morgen":case"morgend":return uc.tomorrow(t.reference);case"gisteren":return uc.yesterday(t.reference)}return i}};ci.default=sh});var Fv=x(yl=>{"use strict";var kA=yl&&yl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(yl,"__esModule",{value:!0});var cc=ht(),SA=re(),DA=kA(Ue()),EA=qn(),xA=1,OA=2,ah=class extends SA.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(t,e){let r=DA.default(t.refDate),i=t.createParsingComponents();switch(e[xA]==="deze"&&(i.assign("day",t.refDate.getDate()),i.assign("month",t.refDate.getMonth()+1),i.assign("year",t.refDate.getFullYear())),e[OA].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",cc.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",cc.Meridiem.PM),i.imply("hour",20);break;case"middernacht":EA.assignTheNextDay(i,r),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",cc.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",cc.Meridiem.AM),i.imply("hour",12);break}return i}};yl.default=ah});var kn=x(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.parseTimeUnits=Pe.TIME_UNITS_PATTERN=Pe.parseYear=Pe.YEAR_PATTERN=Pe.parseOrdinalNumberPattern=Pe.ORDINAL_NUMBER_PATTERN=Pe.parseNumberPattern=Pe.NUMBER_PATTERN=Pe.TIME_UNIT_DICTIONARY=Pe.ORDINAL_WORD_DICTIONARY=Pe.INTEGER_WORD_DICTIONARY=Pe.MONTH_DICTIONARY=Pe.WEEKDAY_DICTIONARY=void 0;var dc=Ke(),CA=Ct();Pe.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};Pe.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};Pe.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};Pe.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};Pe.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"};Pe.NUMBER_PATTERN=`(?:${dc.matchAnyPattern(Pe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function Uv(n){let t=n.toLowerCase();return Pe.INTEGER_WORD_DICTIONARY[t]!==void 0?Pe.INTEGER_WORD_DICTIONARY[t]:t==="paar"?2:t==="half"||t.match(/halve?/)?.5:parseFloat(t.replace(",","."))}Pe.parseNumberPattern=Uv;Pe.ORDINAL_NUMBER_PATTERN=`(?:${dc.matchAnyPattern(Pe.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function MA(n){let t=n.toLowerCase();return Pe.ORDINAL_WORD_DICTIONARY[t]!==void 0?Pe.ORDINAL_WORD_DICTIONARY[t]:(t=t.replace(/(?:ste|de)$/i,""),parseInt(t))}Pe.parseOrdinalNumberPattern=MA;Pe.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function RA(n){if(/voor Christus/i.test(n))return n=n.replace(/voor Christus/i,""),-parseInt(n);if(/na Christus/i.test(n))return n=n.replace(/na Christus/i,""),parseInt(n);let t=parseInt(n);return CA.findMostLikelyADYear(t)}Pe.parseYear=RA;var Yv=`(${Pe.NUMBER_PATTERN})\\s{0,5}(${dc.matchAnyPattern(Pe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Lv=new RegExp(Yv,"i");Pe.TIME_UNITS_PATTERN=dc.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",Yv);function AA(n){let t={},e=n,r=Lv.exec(e);for(;r;)PA(t,r),e=e.substring(r[0].length),r=Lv.exec(e);return t}Pe.parseTimeUnits=AA;function PA(n,t){let e=Uv(t[1]),r=Pe.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];n[r]=e}});var Wv=x(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});var jv=kn(),NA=nt(),IA=re(),oh=class extends IA.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+jv.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(t,e){let r=jv.parseTimeUnits(e[1]);return NA.ParsingComponents.createRelativeFromReference(t.reference,r)}};lh.default=oh});var qv=x(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});var $v=kn(),FA=Ke(),LA=re(),UA=vs(),YA=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${FA.matchAnyPattern($v.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),jA=1,WA=2,$A=3,uh=class extends LA.AbstractParserWithWordBoundaryChecking{innerPattern(){return YA}innerExtract(t,e){let r=e[WA].toLowerCase(),i=$v.WEEKDAY_DICTIONARY[r],s=e[jA],a=e[$A],o=s||a;o=o||"",o=o.toLowerCase();let l=null;o=="vorige"?l="last":o=="volgende"?l="next":o=="deze"&&(l="this");let u=UA.toDayJSWeekday(t.refDate,i,l);return t.createParsingComponents().assign("weekday",i).imply("day",u.date()).imply("month",u.month()+1).imply("year",u.year())}};ch.default=uh});var Kv=x(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});var qA=Ct(),Vv=kn(),fc=kn(),zv=kn(),HA=Ke(),GA=re(),BA=new RegExp(`(?:on\\s*?)?(${fc.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${fc.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+HA.matchAnyPattern(Vv.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${zv.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),VA=3,Hv=1,Gv=2,Bv=4,dh=class extends GA.AbstractParserWithWordBoundaryChecking{innerPattern(){return BA}innerExtract(t,e){let r=Vv.MONTH_DICTIONARY[e[VA].toLowerCase()],i=fc.parseOrdinalNumberPattern(e[Hv]);if(i>31)return e.index=e.index+e[Hv].length,null;let s=t.createParsingComponents({day:i,month:r});if(e[Bv]){let l=zv.parseYear(e[Bv]);s.assign("year",l)}else{let l=qA.findYearClosestToRef(t.refDate,i,r);s.imply("year",l)}if(!e[Gv])return s;let a=fc.parseOrdinalNumberPattern(e[Gv]),o=t.createParsingResult(e.index,e[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};fh.default=dh});var Jv=x(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});var Xv=kn(),zA=Ct(),KA=Ke(),Zv=kn(),QA=re(),XA=new RegExp(`(${KA.matchAnyPattern(Xv.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Zv.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),ZA=1,Qv=2,ph=class extends QA.AbstractParserWithWordBoundaryChecking{innerPattern(){return XA}innerExtract(t,e){let r=t.createParsingComponents();r.imply("day",1);let i=e[ZA],s=Xv.MONTH_DICTIONARY[i.toLowerCase()];if(r.assign("month",s),e[Qv]){let a=Zv.parseYear(e[Qv]);r.assign("year",a)}else{let a=zA.findYearClosestToRef(t.refDate,1,s);r.imply("year",a)}return r}};mh.default=ph});var ew=x(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});var JA=re(),eP=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),tP=1,nP=2,hh=class extends JA.AbstractParserWithWordBoundaryChecking{innerPattern(){return eP}innerExtract(t,e){let r=parseInt(e[nP]),i=parseInt(e[tP]);return t.createParsingComponents().imply("day",1).assign("month",i).assign("year",r)}};gh.default=hh});var tw=x(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});var rP=Ts(),yh=class extends rP.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(t,e){return e[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(t,e)}};bh.default=yh});var iw=x(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});var rw=kn(),iP=Ke(),sP=re(),aP=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${iP.matchAnyPattern(rw.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),oP=1,lP=2,nw=3,uP=4,Th=class extends sP.AbstractParserWithWordBoundaryChecking{innerPattern(){return aP}innerExtract(t,e){let r=e[nw]?parseInt(e[nw]):rw.MONTH_DICTIONARY[e[lP].toLowerCase()];if(r<1||r>12)return null;let i=parseInt(e[oP]);return{day:parseInt(e[uP]),month:r,year:i}}};_h.default=Th});var sw=x(bl=>{"use strict";var cP=bl&&bl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(bl,"__esModule",{value:!0});var dP=re(),pc=ht(),vh=qn(),fP=cP(Ue()),pP=1,mP=2,wh=class extends dP.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(t,e){let r=e[pP].toLowerCase(),i=e[mP].toLowerCase(),s=t.createParsingComponents(),a=fP.default(t.refDate);switch(r){case"gisteren":vh.assignSimilarDate(s,a.add(-1,"day"));break;case"van":vh.assignSimilarDate(s,a);break;case"morgen":vh.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",pc.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",pc.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",pc.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",pc.Meridiem.PM),s.imply("hour",20);break}return s}};bl.default=wh});var ow=x(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});var aw=kn(),hP=nt(),gP=re(),yP=Hn(),bP=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${aw.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),kh=class extends gP.AbstractParserWithWordBoundaryChecking{innerPattern(){return bP}innerExtract(t,e){let r=e[1].toLowerCase(),i=aw.parseTimeUnits(e[2]);switch(r){case"vorige":case"afgelopen":case"-":i=yP.reverseTimeUnits(i);break}return hP.ParsingComponents.createRelativeFromReference(t.reference,i)}};Sh.default=kh});var cw=x(Tl=>{"use strict";var TP=Tl&&Tl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Tl,"__esModule",{value:!0});var uw=kn(),lw=nt(),_P=TP(Ue()),vP=re(),wP=Ke(),kP=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${wP.matchAnyPattern(uw.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),SP=1,DP=2,Dh=class extends vP.AbstractParserWithWordBoundaryChecking{innerPattern(){return kP}innerExtract(t,e){let r=e[SP].toLowerCase(),i=e[DP].toLowerCase(),s=uw.TIME_UNIT_DICTIONARY[i];if(r=="volgend"||r=="volgende"||r=="komende"){let l={};return l[s]=1,lw.ParsingComponents.createRelativeFromReference(t.reference,l)}if(r=="afgelopen"||r=="vorige"){let l={};return l[s]=-1,lw.ParsingComponents.createRelativeFromReference(t.reference,l)}let a=t.createParsingComponents(),o=_P.default(t.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}};Tl.default=Dh});var dw=x(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var xh=kn(),EP=nt(),xP=re(),OP=Hn(),CP=new RegExp("("+xh.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),MP=new RegExp("("+xh.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),Eh=class extends xP.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?MP:CP}innerExtract(t,e){let r=xh.parseTimeUnits(e[1]),i=OP.reverseTimeUnits(r);return EP.ParsingComponents.createRelativeFromReference(t.reference,i)}};Oh.default=Eh});var fw=x(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});var Mh=kn(),RP=nt(),AP=re(),PP=new RegExp("("+Mh.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),NP=new RegExp("("+Mh.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),IP=1,Ch=class extends AP.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?NP:PP}innerExtract(t,e){let r=Mh.parseTimeUnits(e[IP]);return RP.ParsingComponents.createRelativeFromReference(t.reference,r)}};Rh.default=Ch});var gw=x(kt=>{"use strict";var Rt=kt&&kt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(kt,"__esModule",{value:!0});kt.createConfiguration=kt.createCasualConfiguration=kt.parseDate=kt.parse=kt.strict=kt.casual=void 0;var FP=ai(),pw=br(),LP=Rt(Pv()),UP=Rt(Nv()),YP=Rt(Iv()),jP=Rt(Fv()),WP=Rt(ws()),$P=Rt(Wv()),qP=Rt(qv()),HP=Rt(Kv()),mw=Rt(Jv()),GP=Rt(ew()),BP=Rt(tw()),VP=Rt(iw()),zP=Rt(sw()),KP=Rt(ow()),QP=Rt(cw()),XP=Rt(dw()),ZP=Rt(fw());kt.casual=new pw.Chrono(hw());kt.strict=new pw.Chrono(Ah(!0));function JP(n,t,e){return kt.casual.parse(n,t,e)}kt.parse=JP;function eN(n,t,e){return kt.casual.parseDate(n,t,e)}kt.parseDate=eN;function hw(n=!0){let t=Ah(!1,n);return t.parsers.unshift(new YP.default),t.parsers.unshift(new jP.default),t.parsers.unshift(new zP.default),t.parsers.unshift(new mw.default),t.parsers.unshift(new QP.default),t.parsers.unshift(new KP.default),t}kt.createCasualConfiguration=hw;function Ah(n=!0,t=!0){return FP.includeCommonConfiguration({parsers:[new WP.default(t),new $P.default,new HP.default,new mw.default,new qP.default,new VP.default,new GP.default,new BP.default(n),new XP.default(n),new ZP.default(n)],refiners:[new UP.default,new LP.default]},n)}kt.createConfiguration=Ah});var _w=x(_l=>{"use strict";var tN=_l&&_l.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(_l,"__esModule",{value:!0});var nN=tN(Ue()),rN=re(),iN=1,yw=2,sN=3,bw=4,Tw=5,aN=6,Ph=class extends rN.AbstractParserWithWordBoundaryChecking{innerPattern(t){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(t,e){let r=e.index,i=t.createParsingResult(r,e[0]),s=nN.default(t.refDate),a=s;if(e[iN])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(e[yw]){let o=e[yw],l=e[sN];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")),l=="\u65E9"||l=="\u671D"?i.start.imply("hour",6):l=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(e[bw]){let l=e[bw][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)}else if(e[Tw]){let o=e[Tw];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 l=e[aN];if(l){let u=l[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)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};_l.default=Ph});var Ra=x(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.zhStringToYear=un.zhStringToNumber=un.WEEKDAY_OFFSET=un.NUMBER=void 0;un.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};un.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function oN(n){let t=0;for(let e=0;e<n.length;e++){let r=n[e];r==="\u5341"?t=t===0?un.NUMBER[r]:t*un.NUMBER[r]:t+=un.NUMBER[r]}return t}un.zhStringToNumber=oN;function lN(n){let t="";for(let e=0;e<n.length;e++){let r=n[e];t=t+un.NUMBER[r]}return parseInt(t)}un.zhStringToYear=lN});var ww=x(vl=>{"use strict";var uN=vl&&vl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(vl,"__esModule",{value:!0});var cN=uN(Ue()),dN=re(),Ds=Ra(),Nh=1,vw=2,Ih=3,Fh=class extends dN.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Ds.NUMBER).join("")+"]{4}|["+Object.keys(Ds.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Ds.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Ds.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(t,e){let r=cN.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=parseInt(e[vw]);if(isNaN(s)&&(s=Ds.zhStringToNumber(e[vw])),i.start.assign("month",s),e[Ih]){let a=parseInt(e[Ih]);isNaN(a)&&(a=Ds.zhStringToNumber(e[Ih])),i.start.assign("day",a)}else i.start.imply("day",r.date());if(e[Nh]){let a=parseInt(e[Nh]);isNaN(a)&&(a=Ds.zhStringToYear(e[Nh])),i.start.assign("year",a)}else i.start.imply("year",r.year());return i}};vl.default=Fh});var Sw=x(wl=>{"use strict";var fN=wl&&wl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(wl,"__esModule",{value:!0});var pN=fN(Ue()),mN=re(),kw=Ra(),hN=new RegExp("(\\d+|["+Object.keys(kw.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"),Lh=1,gN=2,Uh=class extends mN.AbstractParserWithWordBoundaryChecking{innerPattern(){return hN}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=parseInt(e[Lh]);if(isNaN(i)&&(i=kw.zhStringToNumber(e[Lh])),isNaN(i)){let l=e[Lh];if(l==="\u5E7E")i=3;else if(l==="\u534A")i=.5;else return null}let s=pN.default(t.refDate),o=e[gN][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")),r.start.assign("year",s.year()),r.start.assign("month",s.month()+1),r.start.assign("day",s.date()),r):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),r.start.imply("year",s.year()),r.start.imply("month",s.month()+1),r.start.imply("day",s.date()),r.start.assign("hour",s.hour()),r.start.assign("minute",s.minute()),r.start.assign("second",s.second()),r)}};wl.default=Uh});var Ew=x(kl=>{"use strict";var yN=kl&&kl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(kl,"__esModule",{value:!0});var bN=yN(Ue()),TN=re(),Dw=Ra(),_N=new RegExp("(?<prefix>\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(Dw.WEEKDAY_OFFSET).join("|")+")"),Yh=class extends TN.AbstractParserWithWordBoundaryChecking{innerPattern(){return _N}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=Dw.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=e.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let l=bN.default(t.refDate),u=!1,c=l.day();return a=="last"||a=="past"?(l=l.day(s-7),u=!0):a=="next"?(l=l.day(s+7),u=!0):a=="this"?l=l.day(s):Math.abs(s-7-c)<Math.abs(s-c)?l=l.day(s-7):Math.abs(s+7-c)<Math.abs(s-c)?l=l.day(s+7):l=l.day(s),r.start.assign("weekday",s),u?(r.start.assign("day",l.date()),r.start.assign("month",l.month()+1),r.start.assign("year",l.year())):(r.start.imply("day",l.date()),r.start.imply("month",l.month()+1),r.start.imply("year",l.year())),r}};kl.default=Yh});var xw=x(Sl=>{"use strict";var vN=Sl&&Sl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Sl,"__esModule",{value:!0});var wN=vN(Ue()),kN=re(),Vn=Ra(),SN=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(Vn.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Vn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Vn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),DN=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(Vn.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Vn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Vn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),mc=1,hc=2,gc=3,yc=4,bc=5,Tc=6,Bn=7,Aa=8,_c=9,jh=class extends kN.AbstractParserWithWordBoundaryChecking{innerPattern(){return SN}innerExtract(t,e){if(e.index>0&&t.text[e.index-1].match(/\w/))return null;let r=wN.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=r.clone();if(e[mc]){var a=e[mc];a=="\u660E"||a=="\u807D"?r.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(e[yc]){var o=e[yc];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 l=0,u=0,c=-1;if(e[Aa]){var d=parseInt(e[Aa]);if(isNaN(d)&&(d=Vn.zhStringToNumber(e[Aa])),d>=60)return null;i.start.assign("second",d)}if(l=parseInt(e[Tc]),isNaN(l)&&(l=Vn.zhStringToNumber(e[Tc])),e[Bn]?e[Bn]=="\u534A"?u=30:e[Bn]=="\u6B63"||e[Bn]=="\u6574"?u=0:(u=parseInt(e[Bn]),isNaN(u)&&(u=Vn.zhStringToNumber(e[Bn]))):l>100&&(u=l%100,l=Math.floor(l/100)),u>=60||l>24)return null;if(l>=12&&(c=1),e[_c]){if(l>12)return null;var f=e[_c][0].toLowerCase();f=="a"&&(c=0,l==12&&(l=0)),f=="p"&&(c=1,l!=12&&(l+=12))}else if(e[hc]){var p=e[hc],b=p[0];b=="\u671D"||b=="\u65E9"?(c=0,l==12&&(l=0)):b=="\u665A"&&(c=1,l!=12&&(l+=12))}else if(e[gc]){var T=e[gc],_=T[0];_=="\u4E0A"||_=="\u671D"||_=="\u65E9"||_=="\u51CC"?(c=0,l==12&&(l=0)):(_=="\u4E0B"||_=="\u664F"||_=="\u665A")&&(c=1,l!=12&&(l+=12))}else if(e[bc]){var O=e[bc],E=O[0];E=="\u4E0A"||E=="\u671D"||E=="\u65E9"||E=="\u51CC"?(c=0,l==12&&(l=0)):(E=="\u4E0B"||E=="\u664F"||E=="\u665A")&&(c=1,l!=12&&(l+=12))}if(i.start.assign("hour",l),i.start.assign("minute",u),c>=0?i.start.assign("meridiem",c):l<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),e=DN.exec(t.text.substring(i.index+i.text.length)),!e)return i.text.match(/^\d+$/)?null:i;let A=s.clone();if(i.end=t.createParsingComponents(),e[mc]){var a=e[mc];a=="\u660E"||a=="\u807D"?r.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(e[yc]){var o=e[yc];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(l=0,u=0,c=-1,e[Aa]){var d=parseInt(e[Aa]);if(isNaN(d)&&(d=Vn.zhStringToNumber(e[Aa])),d>=60)return null;i.end.assign("second",d)}if(l=parseInt(e[Tc]),isNaN(l)&&(l=Vn.zhStringToNumber(e[Tc])),e[Bn]?e[Bn]=="\u534A"?u=30:e[Bn]=="\u6B63"||e[Bn]=="\u6574"?u=0:(u=parseInt(e[Bn]),isNaN(u)&&(u=Vn.zhStringToNumber(e[Bn]))):l>100&&(u=l%100,l=Math.floor(l/100)),u>=60||l>24)return null;if(l>=12&&(c=1),e[_c]){if(l>12)return null;var f=e[_c][0].toLowerCase();f=="a"&&(c=0,l==12&&(l=0)),f=="p"&&(c=1,l!=12&&(l+=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(e[hc]){var p=e[hc],b=p[0];b=="\u671D"||b=="\u65E9"?(c=0,l==12&&(l=0)):b=="\u665A"&&(c=1,l!=12&&(l+=12))}else if(e[gc]){var T=e[gc],_=T[0];_=="\u4E0A"||_=="\u671D"||_=="\u65E9"||_=="\u51CC"?(c=0,l==12&&(l=0)):(_=="\u4E0B"||_=="\u664F"||_=="\u665A")&&(c=1,l!=12&&(l+=12))}else if(e[bc]){var O=e[bc],E=O[0];E=="\u4E0A"||E=="\u671D"||E=="\u65E9"||E=="\u51CC"?(c=0,l==12&&(l=0)):(E=="\u4E0B"||E=="\u664F"||E=="\u665A")&&(c=1,l!=12&&(l+=12))}return i.text=i.text+e[0],i.end.assign("hour",l),i.end.assign("minute",u),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>l?i.end.imply("meridiem",0):l>12&&i.end.imply("meridiem",1),i.end.date().getTime()<i.start.date().getTime()&&i.end.imply("day",i.end.get("day")+1),i}};Sl.default=jh});var Cw=x(Dl=>{"use strict";var EN=Dl&&Dl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Dl,"__esModule",{value:!0});var xN=EN(Ue()),ON=re(),Ow=Ra(),CN=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(Ow.WEEKDAY_OFFSET).join("|")+")"),Wh=class extends ON.AbstractParserWithWordBoundaryChecking{innerPattern(){return CN}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=Ow.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=xN.default(t.refDate),o=!1,l=a.day();return Math.abs(s-7-l)<Math.abs(s-l)?a=a.day(s-7):Math.abs(s+7-l)<Math.abs(s-l)?a=a.day(s+7):a=a.day(s),r.start.assign("weekday",s),o?(r.start.assign("day",a.date()),r.start.assign("month",a.month()+1),r.start.assign("year",a.year())):(r.start.imply("day",a.date()),r.start.imply("month",a.month()+1),r.start.imply("year",a.year())),r}};Dl.default=Wh});var Mw=x(El=>{"use strict";var MN=El&&El.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(El,"__esModule",{value:!0});var RN=MN(Wr()),$h=class extends RN.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};El.default=$h});var Rw=x(xl=>{"use strict";var AN=xl&&xl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(xl,"__esModule",{value:!0});var PN=AN(si()),qh=class extends PN.default{patternBetween(){return/^\s*$/i}};xl.default=qh});var Aw=x(ct=>{"use strict";var di=ct&&ct.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ct,"__esModule",{value:!0});ct.createConfiguration=ct.createCasualConfiguration=ct.parseDate=ct.parse=ct.strict=ct.casual=ct.hant=void 0;var Hh=br(),NN=di(Qu()),IN=ai(),FN=di(_w()),LN=di(ww()),UN=di(Sw()),YN=di(Ew()),jN=di(xw()),WN=di(Cw()),$N=di(Mw()),qN=di(Rw());ct.hant=new Hh.Chrono(Gh());ct.casual=new Hh.Chrono(Gh());ct.strict=new Hh.Chrono(Bh());function HN(n,t,e){return ct.casual.parse(n,t,e)}ct.parse=HN;function GN(n,t,e){return ct.casual.parseDate(n,t,e)}ct.parseDate=GN;function Gh(){let n=Bh();return n.parsers.unshift(new FN.default),n}ct.createCasualConfiguration=Gh;function Bh(){let n=IN.includeCommonConfiguration({parsers:[new LN.default,new YN.default,new WN.default,new jN.default,new UN.default],refiners:[new $N.default,new qN.default]});return n.refiners=n.refiners.filter(t=>!(t instanceof NN.default)),n}ct.createConfiguration=Bh});var Fw=x(Ol=>{"use strict";var BN=Ol&&Ol.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ol,"__esModule",{value:!0});var VN=BN(Ue()),zN=re(),KN=1,Pw=2,QN=3,Nw=4,Iw=5,XN=6,Vh=class extends zN.AbstractParserWithWordBoundaryChecking{innerPattern(t){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(t,e){let r=e.index,i=t.createParsingResult(r,e[0]),s=VN.default(t.refDate),a=s;if(e[KN])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(e[Pw]){let o=e[Pw],l=e[QN];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")),l=="\u65E9"?i.start.imply("hour",6):l=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(e[Nw]){let l=e[Nw][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)}else if(e[Iw]){let o=e[Iw];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 l=e[XN];if(l){let u=l[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)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Ol.default=Vh});var Pa=x(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.zhStringToYear=cn.zhStringToNumber=cn.WEEKDAY_OFFSET=cn.NUMBER=void 0;cn.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};cn.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function ZN(n){let t=0;for(let e=0;e<n.length;e++){let r=n[e];r==="\u5341"?t=t===0?cn.NUMBER[r]:t*cn.NUMBER[r]:t+=cn.NUMBER[r]}return t}cn.zhStringToNumber=ZN;function JN(n){let t="";for(let e=0;e<n.length;e++){let r=n[e];t=t+cn.NUMBER[r]}return parseInt(t)}cn.zhStringToYear=JN});var Uw=x(Cl=>{"use strict";var eI=Cl&&Cl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Cl,"__esModule",{value:!0});var tI=eI(Ue()),nI=re(),Es=Pa(),zh=1,Lw=2,Kh=3,Qh=class extends nI.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Es.NUMBER).join("")+"]{4}|["+Object.keys(Es.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Es.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Es.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(t,e){let r=tI.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=parseInt(e[Lw]);if(isNaN(s)&&(s=Es.zhStringToNumber(e[Lw])),i.start.assign("month",s),e[Kh]){let a=parseInt(e[Kh]);isNaN(a)&&(a=Es.zhStringToNumber(e[Kh])),i.start.assign("day",a)}else i.start.imply("day",r.date());if(e[zh]){let a=parseInt(e[zh]);isNaN(a)&&(a=Es.zhStringToYear(e[zh])),i.start.assign("year",a)}else i.start.imply("year",r.year());return i}};Cl.default=Qh});var jw=x(Ml=>{"use strict";var rI=Ml&&Ml.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ml,"__esModule",{value:!0});var iI=rI(Ue()),sI=re(),Yw=Pa(),aI=new RegExp("(\\d+|["+Object.keys(Yw.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"),Xh=1,oI=2,Zh=class extends sI.AbstractParserWithWordBoundaryChecking{innerPattern(){return aI}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=parseInt(e[Xh]);if(isNaN(i)&&(i=Yw.zhStringToNumber(e[Xh])),isNaN(i)){let l=e[Xh];if(l==="\u51E0")i=3;else if(l==="\u534A")i=.5;else return null}let s=iI.default(t.refDate),o=e[oI][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")),r.start.assign("year",s.year()),r.start.assign("month",s.month()+1),r.start.assign("day",s.date()),r):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),r.start.imply("year",s.year()),r.start.imply("month",s.month()+1),r.start.imply("day",s.date()),r.start.assign("hour",s.hour()),r.start.assign("minute",s.minute()),r.start.assign("second",s.second()),r)}};Ml.default=Zh});var $w=x(Rl=>{"use strict";var lI=Rl&&Rl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Rl,"__esModule",{value:!0});var uI=lI(Ue()),cI=re(),Ww=Pa(),dI=new RegExp("(?<prefix>\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(Ww.WEEKDAY_OFFSET).join("|")+")"),Jh=class extends cI.AbstractParserWithWordBoundaryChecking{innerPattern(){return dI}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=Ww.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=e.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let l=uI.default(t.refDate),u=!1,c=l.day();return a=="last"||a=="past"?(l=l.day(s-7),u=!0):a=="next"?(l=l.day(s+7),u=!0):a=="this"?l=l.day(s):Math.abs(s-7-c)<Math.abs(s-c)?l=l.day(s-7):Math.abs(s+7-c)<Math.abs(s-c)?l=l.day(s+7):l=l.day(s),r.start.assign("weekday",s),u?(r.start.assign("day",l.date()),r.start.assign("month",l.month()+1),r.start.assign("year",l.year())):(r.start.imply("day",l.date()),r.start.imply("month",l.month()+1),r.start.imply("year",l.year())),r}};Rl.default=Jh});var qw=x(Al=>{"use strict";var fI=Al&&Al.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Al,"__esModule",{value:!0});var pI=fI(Ue()),mI=re(),Kn=Pa(),hI=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(Kn.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Kn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Kn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),gI=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(Kn.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Kn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Kn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),vc=1,wc=2,kc=3,Sc=4,Dc=5,Ec=6,zn=7,Na=8,xc=9,eg=class extends mI.AbstractParserWithWordBoundaryChecking{innerPattern(){return hI}innerExtract(t,e){if(e.index>0&&t.text[e.index-1].match(/\w/))return null;let r=pI.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=r.clone();if(e[vc]){let c=e[vc];c=="\u660E"?r.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(e[Sc]){let c=e[Sc];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,l=-1;if(e[Na]){let c=parseInt(e[Na]);if(isNaN(c)&&(c=Kn.zhStringToNumber(e[Na])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(e[Ec]),isNaN(a)&&(a=Kn.zhStringToNumber(e[Ec])),e[zn]?e[zn]=="\u534A"?o=30:e[zn]=="\u6B63"||e[zn]=="\u6574"?o=0:(o=parseInt(e[zn]),isNaN(o)&&(o=Kn.zhStringToNumber(e[zn]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(l=1),e[xc]){if(a>12)return null;let c=e[xc][0].toLowerCase();c=="a"&&(l=0,a==12&&(a=0)),c=="p"&&(l=1,a!=12&&(a+=12))}else if(e[wc]){let d=e[wc][0];d=="\u65E9"?(l=0,a==12&&(a=0)):d=="\u665A"&&(l=1,a!=12&&(a+=12))}else if(e[kc]){let d=e[kc][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(l=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(l=1,a!=12&&(a+=12))}else if(e[Dc]){let d=e[Dc][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(l=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(l=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),l>=0?i.start.assign("meridiem",l):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),e=gI.exec(t.text.substring(i.index+i.text.length)),!e)return i.text.match(/^\d+$/)?null:i;let u=s.clone();if(i.end=t.createParsingComponents(),e[vc]){let c=e[vc];c=="\u660E"?r.hour()>1&&u.add(1,"day"):c=="\u6628"?u.add(-1,"day"):c=="\u524D"?u.add(-2,"day"):c=="\u5927\u524D"?u.add(-3,"day"):c=="\u540E"?u.add(2,"day"):c=="\u5927\u540E"&&u.add(3,"day"),i.end.assign("day",u.date()),i.end.assign("month",u.month()+1),i.end.assign("year",u.year())}else if(e[Sc]){let c=e[Sc];c=="\u660E"?u.add(1,"day"):c=="\u6628"?u.add(-1,"day"):c=="\u524D"?u.add(-2,"day"):c=="\u5927\u524D"?u.add(-3,"day"):c=="\u540E"?u.add(2,"day"):c=="\u5927\u540E"&&u.add(3,"day"),i.end.assign("day",u.date()),i.end.assign("month",u.month()+1),i.end.assign("year",u.year())}else i.end.imply("day",u.date()),i.end.imply("month",u.month()+1),i.end.imply("year",u.year());if(a=0,o=0,l=-1,e[Na]){let c=parseInt(e[Na]);if(isNaN(c)&&(c=Kn.zhStringToNumber(e[Na])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(e[Ec]),isNaN(a)&&(a=Kn.zhStringToNumber(e[Ec])),e[zn]?e[zn]=="\u534A"?o=30:e[zn]=="\u6B63"||e[zn]=="\u6574"?o=0:(o=parseInt(e[zn]),isNaN(o)&&(o=Kn.zhStringToNumber(e[zn]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(l=1),e[xc]){if(a>12)return null;let c=e[xc][0].toLowerCase();c=="a"&&(l=0,a==12&&(a=0)),c=="p"&&(l=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(l==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(e[wc]){let d=e[wc][0];d=="\u65E9"?(l=0,a==12&&(a=0)):d=="\u665A"&&(l=1,a!=12&&(a+=12))}else if(e[kc]){let d=e[kc][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(l=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(l=1,a!=12&&(a+=12))}else if(e[Dc]){let d=e[Dc][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(l=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(l=1,a!=12&&(a+=12))}return i.text=i.text+e[0],i.end.assign("hour",a),i.end.assign("minute",o),l>=0?i.end.assign("meridiem",l):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()<i.start.date().getTime()&&i.end.imply("day",i.end.get("day")+1),i}};Al.default=eg});var Gw=x(Pl=>{"use strict";var yI=Pl&&Pl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Pl,"__esModule",{value:!0});var bI=yI(Ue()),TI=re(),Hw=Pa(),_I=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(Hw.WEEKDAY_OFFSET).join("|")+")"),tg=class extends TI.AbstractParserWithWordBoundaryChecking{innerPattern(){return _I}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=Hw.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=bI.default(t.refDate),o=!1,l=a.day();return Math.abs(s-7-l)<Math.abs(s-l)?a=a.day(s-7):Math.abs(s+7-l)<Math.abs(s-l)?a=a.day(s+7):a=a.day(s),r.start.assign("weekday",s),o?(r.start.assign("day",a.date()),r.start.assign("month",a.month()+1),r.start.assign("year",a.year())):(r.start.imply("day",a.date()),r.start.imply("month",a.month()+1),r.start.imply("year",a.year())),r}};Pl.default=tg});var Bw=x(Nl=>{"use strict";var vI=Nl&&Nl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Nl,"__esModule",{value:!0});var wI=vI(Wr()),ng=class extends wI.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};Nl.default=ng});var Vw=x(Il=>{"use strict";var kI=Il&&Il.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Il,"__esModule",{value:!0});var SI=kI(si()),rg=class extends SI.default{patternBetween(){return/^\s*$/i}};Il.default=rg});var zw=x(dt=>{"use strict";var fi=dt&&dt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(dt,"__esModule",{value:!0});dt.createConfiguration=dt.createCasualConfiguration=dt.parseDate=dt.parse=dt.strict=dt.casual=dt.hans=void 0;var ig=br(),DI=fi(Qu()),EI=ai(),xI=fi(Fw()),OI=fi(Uw()),CI=fi(jw()),MI=fi($w()),RI=fi(qw()),AI=fi(Gw()),PI=fi(Bw()),NI=fi(Vw());dt.hans=new ig.Chrono(sg());dt.casual=new ig.Chrono(sg());dt.strict=new ig.Chrono(ag());function II(n,t,e){return dt.casual.parse(n,t,e)}dt.parse=II;function FI(n,t,e){return dt.casual.parseDate(n,t,e)}dt.parseDate=FI;function sg(){let n=ag();return n.parsers.unshift(new xI.default),n}dt.createCasualConfiguration=sg;function ag(){let n=EI.includeCommonConfiguration({parsers:[new OI.default,new MI.default,new AI.default,new RI.default,new CI.default],refiners:[new PI.default,new NI.default]});return n.refiners=n.refiners.filter(t=>!(t instanceof DI.default)),n}dt.createConfiguration=ag});var Qw=x(Sn=>{"use strict";var Kw=Sn&&Sn.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),LI=Sn&&Sn.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),UI=Sn&&Sn.__exportStar||function(n,t){for(var e in n)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Kw(t,n,e)},YI=Sn&&Sn.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&Kw(t,n,e);return LI(t,n),t};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.hans=void 0;UI(Aw(),Sn);Sn.hans=YI(zw())});var dn=x(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.parseTimeUnits=Se.TIME_UNITS_PATTERN=Se.parseYear=Se.YEAR_PATTERN=Se.parseOrdinalNumberPattern=Se.ORDINAL_NUMBER_PATTERN=Se.parseNumberPattern=Se.NUMBER_PATTERN=Se.TIME_UNIT_DICTIONARY=Se.ORDINAL_WORD_DICTIONARY=Se.INTEGER_WORD_DICTIONARY=Se.MONTH_DICTIONARY=Se.FULL_MONTH_NAME_DICTIONARY=Se.WEEKDAY_DICTIONARY=Se.REGEX_PARTS=void 0;var Oc=Ke(),jI=Ct();Se.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};Se.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};Se.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};Se.MONTH_DICTIONARY=Object.assign(Object.assign({},Se.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});Se.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};Se.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};Se.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"};Se.NUMBER_PATTERN=`(?:${Oc.matchAnyPattern(Se.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 Zw(n){let t=n.toLowerCase();return Se.INTEGER_WORD_DICTIONARY[t]!==void 0?Se.INTEGER_WORD_DICTIONARY[t]:t.match(/несколько/)?3:t.match(/пол/)?.5:t.match(/пар/)?2:t===""?1:parseFloat(t)}Se.parseNumberPattern=Zw;Se.ORDINAL_NUMBER_PATTERN=`(?:${Oc.matchAnyPattern(Se.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function WI(n){let t=n.toLowerCase();return Se.ORDINAL_WORD_DICTIONARY[t]!==void 0?Se.ORDINAL_WORD_DICTIONARY[t]:(t=t.replace(/(?:st|nd|rd|th)$/i,""),parseInt(t))}Se.parseOrdinalNumberPattern=WI;var og="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";Se.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${og}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${og}|[5-9][0-9]${og})`;function $I(n){if(/(год|года|г|г.)/i.test(n)&&(n=n.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(n))return n=n.replace(/(до н.э.|до н. э.)/i,""),-parseInt(n);if(/(н. э.|н.э.)/i.test(n))return n=n.replace(/(н. э.|н.э.)/i,""),parseInt(n);let t=parseInt(n);return jI.findMostLikelyADYear(t)}Se.parseYear=$I;var Jw=`(${Se.NUMBER_PATTERN})\\s{0,3}(${Oc.matchAnyPattern(Se.TIME_UNIT_DICTIONARY)})`,Xw=new RegExp(Jw,"i");Se.TIME_UNITS_PATTERN=Oc.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",Jw);function qI(n){let t={},e=n,r=Xw.exec(e);for(;r;)HI(t,r),e=e.substring(r[0].length).trim(),r=Xw.exec(e);return t}Se.parseTimeUnits=qI;function HI(n,t){let e=Zw(t[1]),r=Se.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];n[r]=e}});var tk=x(ug=>{"use strict";Object.defineProperty(ug,"__esModule",{value:!0});var Fl=dn(),GI=nt(),BI=re(),ek=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Fl.TIME_UNITS_PATTERN})${Fl.REGEX_PARTS.rightBoundary}`,VI=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${ek}`,Fl.REGEX_PARTS.flags),zI=new RegExp(ek,"i"),lg=class extends BI.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Fl.REGEX_PARTS.leftBoundary}innerPattern(t){return t.option.forwardDate?zI:VI}innerExtract(t,e){let r=Fl.parseTimeUnits(e[1]);return GI.ParsingComponents.createRelativeFromReference(t.reference,r)}};ug.default=lg});var ak=x(dg=>{"use strict";Object.defineProperty(dg,"__esModule",{value:!0});var KI=Ct(),Ll=dn(),sk=dn(),Cc=dn(),QI=Ke(),XI=re(),ZI=new RegExp(`(?:\u0441)?\\s*(${Cc.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Cc.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${QI.matchAnyPattern(Ll.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${sk.YEAR_PATTERN}(?![^\\s]\\d)))?${Ll.REGEX_PARTS.rightBoundary}`,Ll.REGEX_PARTS.flags),nk=1,rk=2,JI=3,ik=4,cg=class extends XI.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ll.REGEX_PARTS.leftBoundary}innerPattern(){return ZI}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=Ll.MONTH_DICTIONARY[e[JI].toLowerCase()],s=Cc.parseOrdinalNumberPattern(e[nk]);if(s>31)return e.index=e.index+e[nk].length,null;if(r.start.assign("month",i),r.start.assign("day",s),e[ik]){let a=sk.parseYear(e[ik]);r.start.assign("year",a)}else{let a=KI.findYearClosestToRef(t.refDate,s,i);r.start.imply("year",a)}if(e[rk]){let a=Cc.parseOrdinalNumberPattern(e[rk]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};dg.default=cg});var uk=x(pg=>{"use strict";Object.defineProperty(pg,"__esModule",{value:!0});var Ul=dn(),eF=Ct(),tF=Ke(),lk=dn(),nF=re(),rF=new RegExp(`((?:\u0432)\\s*)?(${tF.matchAnyPattern(Ul.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${lk.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Ul.REGEX_PARTS.flags),iF=2,ok=3,fg=class extends nF.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ul.REGEX_PARTS.leftBoundary}innerPattern(){return rF}innerExtract(t,e){let r=e[iF].toLowerCase();if(e[0].length<=3&&!Ul.FULL_MONTH_NAME_DICTIONARY[r])return null;let i=t.createParsingResult(e.index,e.index+e[0].length);i.start.imply("day",1);let s=Ul.MONTH_DICTIONARY[r];if(i.start.assign("month",s),e[ok]){let a=lk.parseYear(e[ok]);i.start.assign("year",a)}else{let a=eF.findYearClosestToRef(t.refDate,1,s);i.start.imply("year",a)}return i}};pg.default=fg});var dk=x(hg=>{"use strict";Object.defineProperty(hg,"__esModule",{value:!0});var Mc=ht(),sF=Ts(),ck=dn(),mg=class extends sF.AbstractTimeExpressionParser{constructor(t){super(t)}patternFlags(){return ck.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))?(?!\\/)${ck.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(t,e){let r=super.extractPrimaryTimeComponents(t,e);if(r){if(e[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=r.get("hour");i>=6&&i<12?(r.assign("hour",r.get("hour")+12),r.assign("meridiem",Mc.Meridiem.PM)):i<6&&r.assign("meridiem",Mc.Meridiem.AM)}if(e[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){r.assign("meridiem",Mc.Meridiem.PM);let i=r.get("hour");i>=0&&i<=6&&r.assign("hour",r.get("hour")+12)}e[0].endsWith("\u0443\u0442\u0440\u0430")&&(r.assign("meridiem",Mc.Meridiem.AM),r.get("hour")<12&&r.assign("hour",r.get("hour")))}return r}};hg.default=mg});var fk=x(yg=>{"use strict";Object.defineProperty(yg,"__esModule",{value:!0});var Rc=dn(),aF=nt(),oF=re(),lF=Hn(),uF=new RegExp(`(${Rc.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Rc.REGEX_PARTS.flags),gg=class extends oF.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Rc.REGEX_PARTS.leftBoundary}innerPattern(){return uF}innerExtract(t,e){let r=Rc.parseTimeUnits(e[1]),i=lF.reverseTimeUnits(r);return aF.ParsingComponents.createRelativeFromReference(t.reference,i)}};yg.default=gg});var pk=x(Yl=>{"use strict";var cF=Yl&&Yl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Yl,"__esModule",{value:!0});var dF=cF(Wr()),bg=class extends dF.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};Yl.default=bg});var mk=x(jl=>{"use strict";var fF=jl&&jl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(jl,"__esModule",{value:!0});var pF=fF(si()),Tg=class extends pF.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};jl.default=Tg});var hk=x(pi=>{"use strict";var mF=pi&&pi.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),hF=pi&&pi.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),gF=pi&&pi.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&mF(t,n,e);return hF(t,n),t};Object.defineProperty(pi,"__esModule",{value:!0});var yF=re(),Wl=gF(li()),_g=dn(),bF=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)${_g.REGEX_PARTS.rightBoundary}`,_g.REGEX_PARTS.flags),vg=class extends yF.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return _g.REGEX_PARTS.leftBoundary}innerPattern(t){return bF}innerExtract(t,e){let r=e[1].toLowerCase(),i=t.createParsingComponents();switch(r){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return Wl.today(t.reference);case"\u0432\u0447\u0435\u0440\u0430":return Wl.yesterday(t.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Wl.tomorrow(t.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Wl.theDayAfter(t.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Wl.theDayBefore(t.reference,2)}return i}};pi.default=vg});var gk=x(kr=>{"use strict";var TF=kr&&kr.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),_F=kr&&kr.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),vF=kr&&kr.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&TF(t,n,e);return _F(t,n),t},wF=kr&&kr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(kr,"__esModule",{value:!0});var kF=re(),xs=vF(li()),SF=qn(),DF=wF(Ue()),wg=dn(),EF=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)${wg.REGEX_PARTS.rightBoundary}`,wg.REGEX_PARTS.flags),kg=class extends kF.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return wg.REGEX_PARTS.leftBoundary}innerPattern(){return EF}innerExtract(t,e){let r=DF.default(t.refDate),i=e[0].toLowerCase(),s=t.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return xs.now(t.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return xs.evening(t.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return xs.morning(t.reference);if(i.match(/в\s*полдень/))return xs.noon(t.reference);if(i.match(/прошлой\s*ночью/))return xs.lastNight(t.reference);if(i.match(/прошлым\s*вечером/))return xs.yesterdayEvening(t.reference);if(i.match(/следующей\s*ночью/)){let a=r.hour()<22?1:2;r=r.add(a,"day"),SF.assignSimilarDate(s,r),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?xs.midnight(t.reference):s}};kr.default=kg});var yk=x(Dg=>{"use strict";Object.defineProperty(Dg,"__esModule",{value:!0});var $l=dn(),xF=Ke(),OF=re(),CF=vs(),MF=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*)?(${xF.matchAnyPattern($l.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)?${$l.REGEX_PARTS.rightBoundary}`,$l.REGEX_PARTS.flags),RF=1,AF=2,PF=3,Sg=class extends OF.AbstractParserWithWordBoundaryChecking{innerPattern(){return MF}patternLeftBoundary(){return $l.REGEX_PARTS.leftBoundary}innerExtract(t,e){let r=e[AF].toLowerCase(),i=$l.WEEKDAY_DICTIONARY[r],s=e[RF],a=e[PF],o=s||a;o=o||"",o=o.toLowerCase();let l=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"?l="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"?l="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(l="this");let u=CF.toDayJSWeekday(t.refDate,i,l);return t.createParsingComponents().assign("weekday",i).imply("day",u.date()).imply("month",u.month()+1).imply("year",u.year())}};Dg.default=Sg});var Tk=x(Hl=>{"use strict";var NF=Hl&&Hl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Hl,"__esModule",{value:!0});var ql=dn(),bk=nt(),IF=NF(Ue()),FF=re(),LF=Ke(),UF=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*(${LF.matchAnyPattern(ql.TIME_UNIT_DICTIONARY)})(?=\\s*)${ql.REGEX_PARTS.rightBoundary}`,ql.REGEX_PARTS.flags),YF=1,jF=2,Eg=class extends FF.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ql.REGEX_PARTS.leftBoundary}innerPattern(){return UF}innerExtract(t,e){let r=e[YF].toLowerCase(),i=e[jF].toLowerCase(),s=ql.TIME_UNIT_DICTIONARY[i];if(r=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||r=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let l={};return l[s]=1,bk.ParsingComponents.createRelativeFromReference(t.reference,l)}if(r=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||r=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let l={};return l[s]=-1,bk.ParsingComponents.createRelativeFromReference(t.reference,l)}let a=t.createParsingComponents(),o=IF.default(t.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}};Hl.default=Eg});var _k=x(Og=>{"use strict";Object.defineProperty(Og,"__esModule",{value:!0});var Gl=dn(),WF=nt(),$F=re(),qF=Hn(),HF=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*(${Gl.TIME_UNITS_PATTERN})${Gl.REGEX_PARTS.rightBoundary}`,Gl.REGEX_PARTS.flags),xg=class extends $F.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Gl.REGEX_PARTS.leftBoundary}innerPattern(){return HF}innerExtract(t,e){let r=e[1].toLowerCase(),i=Gl.parseTimeUnits(e[2]);switch(r){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=qF.reverseTimeUnits(i);break}return WF.ParsingComponents.createRelativeFromReference(t.reference,i)}};Og.default=xg});var kk=x(St=>{"use strict";var Dn=St&&St.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(St,"__esModule",{value:!0});St.createConfiguration=St.createCasualConfiguration=St.parseDate=St.parse=St.strict=St.casual=void 0;var GF=Dn(tk()),BF=Dn(ak()),VF=Dn(uk()),zF=Dn(dk()),KF=Dn(fk()),QF=Dn(pk()),XF=Dn(mk()),ZF=ai(),JF=Dn(hk()),eL=Dn(gk()),tL=Dn(yk()),nL=Dn(Tk()),vk=br(),rL=Dn(ws()),iL=Dn(_k());St.casual=new vk.Chrono(wk());St.strict=new vk.Chrono(Cg(!0));function sL(n,t,e){return St.casual.parse(n,t,e)}St.parse=sL;function aL(n,t,e){return St.casual.parseDate(n,t,e)}St.parseDate=aL;function wk(){let n=Cg(!1);return n.parsers.unshift(new JF.default),n.parsers.unshift(new eL.default),n.parsers.unshift(new VF.default),n.parsers.unshift(new nL.default),n.parsers.unshift(new iL.default),n}St.createCasualConfiguration=wk;function Cg(n=!0){return ZF.includeCommonConfiguration({parsers:[new rL.default(!0),new GF.default,new BF.default,new tL.default,new zF.default(n),new KF.default],refiners:[new XF.default,new QF.default]},n)}St.createConfiguration=Cg});var ht=x(Re=>{"use strict";var oL=Re&&Re.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),lL=Re&&Re.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),ji=Re&&Re.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&oL(t,n,e);return lL(t,n),t};Object.defineProperty(Re,"__esModule",{value:!0});Re.parseDate=Re.parse=Re.casual=Re.strict=Re.ru=Re.zh=Re.nl=Re.pt=Re.ja=Re.fr=Re.de=Re.Meridiem=Re.Chrono=Re.en=void 0;var Mg=ji(Vp());Re.en=Mg;var uL=br();Object.defineProperty(Re,"Chrono",{enumerable:!0,get:function(){return uL.Chrono}});var cL;(function(n){n[n.AM=0]="AM",n[n.PM=1]="PM"})(cL=Re.Meridiem||(Re.Meridiem={}));var dL=ji(A_());Re.de=dL;var fL=ji(ov());Re.fr=fL;var pL=ji(gv());Re.ja=pL;var mL=ji(Av());Re.pt=mL;var hL=ji(gw());Re.nl=hL;var gL=ji(Qw());Re.zh=gL;var yL=ji(kk());Re.ru=yL;Re.strict=Mg.strict;Re.casual=Mg.casual;function bL(n,t,e){return Re.casual.parse(n,t,e)}Re.parse=bL;function TL(n,t,e){return Re.casual.parseDate(n,t,e)}Re.parseDate=TL});var tn,Rg=ee(()=>{"use strict";tn=class{constructor(t,e){this.start=t,this.end=e,e.isBefore(t)&&(this.start=e,this.end=t),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(t){let e=t==="week"?"isoWeek":t;return new tn(window.moment().startOf(e).startOf("day"),window.moment().endOf(e).startOf("day"))}static buildInvalid(){return new tn(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(t){let e=window.moment.duration(1,t);this.start.subtract(e),this.end.subtract(e),(t==="month"||t==="quarter")&&(this.end=this.end.endOf(t).startOf("day"))}moveToNext(t){let e=window.moment.duration(1,t);this.start.add(e),this.end.add(e),(t==="month"||t==="quarter")&&(this.end=this.end.endOf(t).startOf("day"))}}});var Ac,En,Ag=ee(()=>{"use strict";Ac=qo(ht());Rg();En=class{static parseDate(t,e=!1){return window.moment(Ac.parseDate(t,void 0,{forwardDate:e})).startOf("day")}static parseDateRange(t,e=!1){let r=[En.parseRelativeDateRange,En.parseNumberedDateRange,En.parseAbsoluteDateRange];for(let i of r){let s=i(t,e);if(s.isValid())return s}return tn.buildInvalid()}static parseAbsoluteDateRange(t,e){let r=Ac.parse(t,void 0,{forwardDate:e});if(r.length===0)return tn.buildInvalid();let i=r[0].start,s=r[1]&&r[1].start?r[1].start:i,a=window.moment(i.date()),o=window.moment(s.date());return new tn(a,o)}static parseRelativeDateRange(t,e){let r=/(last|this|next) (week|month|quarter|year)/,i=t.match(r);if(i&&i.length===3){let s=i[1],a=i[2],o=tn.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return tn.buildInvalid()}static parseNumberedDateRange(t,e){let r=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[i,s,a]of r){let o=t.match(i);if(o){let l=o[0].trim();return new tn(window.moment(l,s).startOf(a),window.moment(l,s).endOf(a))}}return tn.buildInvalid()}}});function Pc(n){for(let[t,e]of Object.entries(_L))n=n.replace(RegExp(`\\b${t}\\s`,"i"),e);return n}var _L,Pg=ee(()=>{"use strict";_L={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"}});function Qn(n,t){return n!==null&&t===null?-1:n===null&&t!==null?1:n!==null&&t!==null?n.isValid()&&!t.isValid()?1:!n.isValid()&&t.isValid()?-1:n.isAfter(t)?1:n.isBefore(t)?-1:0:0}function vL(n,t,e=void 0){if(!t)return`<i>no ${n} date</i>`;let r=Ng.parseDate(t,e,{forwardDate:e!=null});return r!==null?window.moment(r).format("YYYY-MM-DD"):`<i>invalid ${n} date</i>`}function Sk(n,t,e){return vL(n,t,e?new Date:void 0)}function Os(n,t){let e=null,r=Ng.parseDate(n,new Date,{forwardDate:t});return r!==null&&(e=window.moment(r)),e}var Ng,Cs=ee(()=>{"use strict";Ng=qo(ht())});var Xn,Nc=ee(()=>{"use strict";Cs();Xn=class{constructor({startDate:t=null,scheduledDate:e=null,dueDate:r=null}){this.startDate=t!=null?t:null,this.scheduledDate=e!=null?e:null,this.dueDate=r!=null?r:null,this.referenceDate=this.getReferenceDate()}getReferenceDate(){return this.dueDate?window.moment(this.dueDate):this.scheduledDate?window.moment(this.scheduledDate):this.startDate?window.moment(this.startDate):null}isIdenticalTo(t){return!(Qn(this.startDate,t.startDate)!==0||Qn(this.scheduledDate,t.scheduledDate)!==0||Qn(this.dueDate,t.dueDate)!==0)}next(t,e=!1){if(this.referenceDate===null)return new Xn({startDate:null,scheduledDate:null,dueDate:null});let r=this.startDate!==null,i=this.dueDate!==null,a=e&&(r||i),o=this.nextOccurrenceDate(this.startDate,t),l=a?null:this.nextOccurrenceDate(this.scheduledDate,t),u=this.nextOccurrenceDate(this.dueDate,t);return new Xn({startDate:o,scheduledDate:l,dueDate:u})}nextOccurrenceDate(t,e){if(t===null)return null;let r=window.moment.duration(t.diff(this.referenceDate)),i=window.moment(e);return i.add(Math.round(r.asDays()),"days"),i}}});var Ic,ft,Ms=ee(()=>{Ic=["MO","TU","WE","TH","FR","SA","SU"],ft=function(){function n(t,e){if(e===0)throw new Error("Can't create weekday with n == 0");this.weekday=t,this.n=e}return n.fromStr=function(t){return new n(Ic.indexOf(t))},n.prototype.nth=function(t){return this.n===t?this:new n(this.weekday,t)},n.prototype.equals=function(t){return this.weekday===t.weekday&&this.n===t.n},n.prototype.toString=function(){var t=Ic[this.weekday];return this.n&&(t=(this.n>0?"+":"")+String(this.n)+t),t},n.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},n}()});function Rs(n,t,e){e===void 0&&(e=" ");var r=String(n);return t=t>>0,r.length>t?String(r):(t=t-r.length,t>e.length&&(e+=Ne(e,t/e.length)),e.slice(0,t)+String(r))}var Je,xn,Ig,At,Zn,Ne,Dk,Ek,Wt,Fc,On,st,Ie,nn=ee(()=>{Ms();Je=function(n){return n!=null},xn=function(n){return typeof n=="number"},Ig=function(n){return typeof n=="string"&&Ic.includes(n)},At=Array.isArray,Zn=function(n,t){t===void 0&&(t=n),arguments.length===1&&(t=n,n=0);for(var e=[],r=n;r<t;r++)e.push(r);return e},Ne=function(n,t){var e=0,r=[];if(At(n))for(;e<t;e++)r[e]=[].concat(n);else for(;e<t;e++)r[e]=n;return r},Dk=function(n){return At(n)?n:[n]};Ek=function(n,t,e){var r=n.split(t);return e?r.slice(0,e).concat([r.slice(e).join(t)]):r},Wt=function(n,t){var e=n%t;return e*t<0?e+t:e},Fc=function(n,t){return{div:Math.floor(n/t),mod:Wt(n,t)}},On=function(n){return!Je(n)||n.length===0},st=function(n){return!On(n)},Ie=function(n,t){return st(n)&&n.indexOf(t)!==-1}});var Hr,wL,Ck,Lc,Mk,kL,Ia,Fg,As,xk,SL,Bl,Uc,DL,mi,Lg,Yc,jc,Ug,hi,Fa,Vl,Ok,Rk,$t=ee(()=>{nn();Hr=function(n,t,e,r,i,s){return r===void 0&&(r=0),i===void 0&&(i=0),s===void 0&&(s=0),new Date(Date.UTC(n,t-1,e,r,i,s))},wL=[31,28,31,30,31,30,31,31,30,31,30,31],Ck=1e3*60*60*24,Lc=9999,Mk=Hr(1970,1,1),kL=[6,0,1,2,3,4,5],Ia=function(n){return n%4===0&&n%100!==0||n%400===0},Fg=function(n){return n instanceof Date},As=function(n){return Fg(n)&&!isNaN(n.getTime())},xk=function(n){return n.getTimezoneOffset()*60*1e3},SL=function(n,t){var e=n.getTime()-xk(n),r=t.getTime()-xk(t),i=e-r;return Math.round(i/Ck)},Bl=function(n){return SL(n,Mk)},Uc=function(n){return new Date(Mk.getTime()+n*Ck)},DL=function(n){var t=n.getUTCMonth();return t===1&&Ia(n.getUTCFullYear())?29:wL[t]},mi=function(n){return kL[n.getUTCDay()]},Lg=function(n,t){var e=Hr(n,t+1,1);return[mi(e),DL(e)]},Yc=function(n,t){return t=t||n,new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},jc=function(n){var t=new Date(n.getTime());return t},Ug=function(n){for(var t=[],e=0;e<n.length;e++)t.push(jc(n[e]));return t},hi=function(n){n.sort(function(t,e){return t.getTime()-e.getTime()})},Fa=function(n,t){t===void 0&&(t=!0);var e=new Date(n);return[Rs(e.getUTCFullYear().toString(),4,"0"),Rs(e.getUTCMonth()+1,2,"0"),Rs(e.getUTCDate(),2,"0"),"T",Rs(e.getUTCHours(),2,"0"),Rs(e.getUTCMinutes(),2,"0"),Rs(e.getUTCSeconds(),2,"0"),t?"Z":""].join("")},Vl=function(n){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,e=t.exec(n);if(!e)throw new Error("Invalid UNTIL value: ".concat(n));return new Date(Date.UTC(parseInt(e[1],10),parseInt(e[2],10)-1,parseInt(e[3],10),parseInt(e[5],10)||0,parseInt(e[6],10)||0,parseInt(e[7],10)||0))},Ok=function(n,t){var e=n.toLocaleString("sv-SE",{timeZone:t});return e.replace(" ","T")+"Z"},Rk=function(n,t){var e=Intl.DateTimeFormat().resolvedOptions().timeZone,r=new Date(Ok(n,e)),i=new Date(Ok(n,t!=null?t:"UTC")),s=i.getTime()-r.getTime();return new Date(n.getTime()-s)}});var EL,gi,Wc=ee(()=>{EL=function(){function n(t,e){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=t,this.args=e,t==="between"?(this.maxDate=e.inc?e.before:new Date(e.before.getTime()-1),this.minDate=e.inc?e.after:new Date(e.after.getTime()+1)):t==="before"?this.maxDate=e.inc?e.dt:new Date(e.dt.getTime()-1):t==="after"&&(this.minDate=e.inc?e.dt:new Date(e.dt.getTime()+1))}return n.prototype.accept=function(t){++this.total;var e=this.minDate&&t<this.minDate,r=this.maxDate&&t>this.maxDate;if(this.method==="between"){if(e)return!0;if(r)return!1}else if(this.method==="before"){if(r)return!1}else if(this.method==="after")return e?!0:(this.add(t),!1);return this.add(t)},n.prototype.add=function(t){return this._result.push(t),!0},n.prototype.getValue=function(){var t=this._result;switch(this.method){case"all":case"between":return t;case"before":case"after":default:return t.length?t[t.length-1]:null}},n.prototype.clone=function(){return new n(this.method,this.args)},n}(),gi=EL});function La(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Yg(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Q(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return n.concat(s||Array.prototype.slice.call(t))}var Yg,Pt,yi=ee(()=>{Yg=function(n,t){return Yg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},Yg(n,t)};Pt=function(){return Pt=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},Pt.apply(this,arguments)}});var xL,jg,Ak=ee(()=>{yi();Wc();xL=function(n){La(t,n);function t(e,r,i){var s=n.call(this,e,r)||this;return s.iterator=i,s}return t.prototype.add=function(e){return this.iterator(e,this._result.length)?(this._result.push(e),!0):!1},t}(gi),jg=xL});var OL,Ps,$c=ee(()=>{OL={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}},Ps=OL});var Pk,CL,ML,RL,Gr,Nk=ee(()=>{$c();Jn();nn();Pk=function(n,t){return n.indexOf(t)!==-1},CL=function(n){return n.toString()},ML=function(n,t,e){return"".concat(t," ").concat(e,", ").concat(n)},RL=function(){function n(t,e,r,i){if(e===void 0&&(e=CL),r===void 0&&(r=Ps),i===void 0&&(i=ML),this.text=[],this.language=r||Ps,this.gettext=e,this.dateFormatter=i,this.rrule=t,this.options=t.options,this.origOptions=t.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(Je(this.origOptions.byweekday)){var o=At(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],l=String(o);this.byweekday={allWeeks:o.filter(function(c){return!c.n}),someWeeks:o.filter(function(c){return Boolean(c.n)}),isWeekdays:l.indexOf("MO")!==-1&&l.indexOf("TU")!==-1&&l.indexOf("WE")!==-1&&l.indexOf("TH")!==-1&&l.indexOf("FR")!==-1&&l.indexOf("SA")===-1&&l.indexOf("SU")===-1,isEveryDay:l.indexOf("MO")!==-1&&l.indexOf("TU")!==-1&&l.indexOf("WE")!==-1&&l.indexOf("TH")!==-1&&l.indexOf("FR")!==-1&&l.indexOf("SA")!==-1&&l.indexOf("SU")!==-1};var u=function(c,d){return c.weekday-d.weekday};this.byweekday.allWeeks.sort(u),this.byweekday.someWeeks.sort(u),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return n.isFullyConvertible=function(t){var e=!0;if(!(t.options.freq in n.IMPLEMENTED)||t.origOptions.until&&t.origOptions.count)return!1;for(var r in t.origOptions){if(Pk(["dtstart","wkst","freq"],r))return!0;if(!Pk(n.IMPLEMENTED[t.options.freq],r))return!1}return e},n.prototype.isFullyConvertible=function(){return n.isFullyConvertible(this.rrule)},n.prototype.toString=function(){var t=this.gettext;if(!(this.options.freq in n.IMPLEMENTED))return t("RRule error: Unable to fully convert this rrule to text");if(this.text=[t("every")],this[ae.FREQUENCIES[this.options.freq]](),this.options.until){this.add(t("until"));var e=this.options.until;this.add(this.dateFormatter(e.getUTCFullYear(),this.language.monthNames[e.getUTCMonth()],e.getUTCDate()))}else this.options.count&&this.add(t("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?t("times"):t("time"));return this.isFullyConvertible()||this.add(t("(~ approximate)")),this.text.join("")},n.prototype.HOURLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("hours"):t("hour"))},n.prototype.MINUTELY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("minutes"):t("minute"))},n.prototype.DAILY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(this.plural(this.options.interval)?t("days"):t("day")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},n.prototype.WEEKLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?t("weeks"):t("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(t("on")).add(t("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?t("days"):t("day")):(this.options.interval===1&&this.add(t("week")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},n.prototype.MONTHLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(t("months")),this.plural(this.options.interval)&&this.add(t("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("months"):t("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(t("on")).add(t("weekdays")):this.byweekday&&this._byweekday()},n.prototype.YEARLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(t("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("years"):t("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(t("on the")).add(this.list(this.options.byyearday,this.nth,t("and"))).add(t("day")),this.options.byweekno&&this.add(t("in")).add(this.plural(this.options.byweekno.length)?t("weeks"):t("week")).add(this.list(this.options.byweekno,void 0,t("and")))},n.prototype._bymonthday=function(){var t=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,t("or"))).add(t("the")).add(this.list(this.bymonthday,this.nth,t("or"))):this.add(t("on the")).add(this.list(this.bymonthday,this.nth,t("and")))},n.prototype._byweekday=function(){var t=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(t("and")),this.add(t("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,t("and"))))},n.prototype._byhour=function(){var t=this.gettext;this.add(t("at")).add(this.list(this.origOptions.byhour,void 0,t("and")))},n.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},n.prototype.nth=function(t){t=parseInt(t.toString(),10);var e,r=this.gettext;if(t===-1)return r("last");var i=Math.abs(t);switch(i){case 1:case 21:case 31:e=i+r("st");break;case 2:case 22:e=i+r("nd");break;case 3:case 23:e=i+r("rd");break;default:e=i+r("th")}return t<0?e+" "+r("last"):e},n.prototype.monthtext=function(t){return this.language.monthNames[t-1]},n.prototype.weekdaytext=function(t){var e=xn(t)?(t+1)%7:t.getJsWeekday();return(t.n?this.nth(t.n)+" ":"")+this.language.dayNames[e]},n.prototype.plural=function(t){return t%100!==1},n.prototype.add=function(t){return this.text.push(" "),this.text.push(t),this},n.prototype.list=function(t,e,r,i){var s=this;i===void 0&&(i=","),At(t)||(t=[t]);var a=function(l,u,c){for(var d="",f=0;f<l.length;f++)f!==0&&(f===l.length-1?d+=" "+c+" ":d+=u+" "),d+=l[f];return d};e=e||function(l){return l.toString()};var o=function(l){return e&&e.call(s,l)};return r?a(t.map(o),i,r):t.map(o).join(i+" ")},n}(),Gr=RL});function zl(n,t){t===void 0&&(t=Ps);var e={},r=new AL(t.tokens);if(!r.start(n))return null;return i(),e;function i(){r.expect("every");var f=r.acceptNumber();if(f&&(e.interval=parseInt(f[0],10)),r.isDone())throw new Error("Unexpected end");switch(r.symbol){case"day(s)":e.freq=ae.DAILY,r.nextSymbol()&&(a(),d());break;case"weekday(s)":e.freq=ae.WEEKLY,e.byweekday=[ae.MO,ae.TU,ae.WE,ae.TH,ae.FR],r.nextSymbol(),d();break;case"week(s)":e.freq=ae.WEEKLY,r.nextSymbol()&&(s(),d());break;case"hour(s)":e.freq=ae.HOURLY,r.nextSymbol()&&(s(),d());break;case"minute(s)":e.freq=ae.MINUTELY,r.nextSymbol()&&(s(),d());break;case"month(s)":e.freq=ae.MONTHLY,r.nextSymbol()&&(s(),d());break;case"year(s)":e.freq=ae.YEARLY,r.nextSymbol()&&(s(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":e.freq=ae.WEEKLY;var p=r.symbol.substr(0,2).toUpperCase();if(e.byweekday=[ae[p]],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var b=l();if(!b)throw new Error("Unexpected symbol "+r.symbol+", expected weekday");e.byweekday.push(ae[b]),r.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(e.freq=ae.YEARLY,e.bymonth=[o()],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var T=o();if(!T)throw new Error("Unexpected symbol "+r.symbol+", expected month");e.bymonth.push(T),r.nextSymbol()}s(),d();break;default:throw new Error("Unknown symbol")}}function s(){var f=r.accept("on"),p=r.accept("the");if(!!(f||p))do{var b=u(),T=l(),_=o();if(b)T?(r.nextSymbol(),e.byweekday||(e.byweekday=[]),e.byweekday.push(ae[T].nth(b))):(e.bymonthday||(e.bymonthday=[]),e.bymonthday.push(b),r.accept("day(s)"));else if(T)r.nextSymbol(),e.byweekday||(e.byweekday=[]),e.byweekday.push(ae[T]);else if(r.symbol==="weekday(s)")r.nextSymbol(),e.byweekday||(e.byweekday=[ae.MO,ae.TU,ae.WE,ae.TH,ae.FR]);else if(r.symbol==="week(s)"){r.nextSymbol();var O=r.acceptNumber();if(!O)throw new Error("Unexpected symbol "+r.symbol+", expected week number");for(e.byweekno=[parseInt(O[0],10)];r.accept("comma");){if(O=r.acceptNumber(),!O)throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");e.byweekno.push(parseInt(O[0],10))}}else if(_)r.nextSymbol(),e.bymonth||(e.bymonth=[]),e.bymonth.push(_);else return}while(r.accept("comma")||r.accept("the")||r.accept("on"))}function a(){var f=r.accept("at");if(!!f)do{var p=r.acceptNumber();if(!p)throw new Error("Unexpected symbol "+r.symbol+", expected hour");for(e.byhour=[parseInt(p[0],10)];r.accept("comma");){if(p=r.acceptNumber(),!p)throw new Error("Unexpected symbol "+r.symbol+"; expected hour");e.byhour.push(parseInt(p[0],10))}}while(r.accept("comma")||r.accept("at"))}function o(){switch(r.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 l(){switch(r.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return r.symbol.substr(0,2).toUpperCase();default:return!1}}function u(){switch(r.symbol){case"last":return r.nextSymbol(),-1;case"first":return r.nextSymbol(),1;case"second":return r.nextSymbol(),r.accept("last")?-2:2;case"third":return r.nextSymbol(),r.accept("last")?-3:3;case"nth":var f=parseInt(r.value[1],10);if(f<-366||f>366)throw new Error("Nth out of range: "+f);return r.nextSymbol(),r.accept("last")?-f:f;default:return!1}}function c(){r.accept("on"),r.accept("the");var f=u();if(!!f)for(e.bymonthday=[f],r.nextSymbol();r.accept("comma");){if(f=u(),!f)throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");e.bymonthday.push(f),r.nextSymbol()}}function d(){if(r.symbol==="until"){var f=Date.parse(r.text);if(!f)throw new Error("Cannot parse until date:"+r.text);e.until=new Date(f)}else r.accept("for")&&(e.count=parseInt(r.value[0],10),r.expect("number"))}}var AL,Ik=ee(()=>{$c();Jn();AL=function(){function n(t){this.done=!0,this.rules=t}return n.prototype.start=function(t){return this.text=t,this.done=!1,this.nextSymbol()},n.prototype.isDone=function(){return this.done&&this.symbol===null},n.prototype.nextSymbol=function(){var t,e;this.symbol=null,this.value=null;do{if(this.done)return!1;var r=void 0;t=null;for(var i in this.rules){r=this.rules[i];var s=r.exec(this.text);s&&(t===null||s[0].length>t[0].length)&&(t=s,e=i)}if(t!=null&&(this.text=this.text.substr(t[0].length),this.text===""&&(this.done=!0)),t==null){this.done=!0,this.symbol=null,this.value=null;return}}while(e==="SKIP");return this.symbol=e,this.value=t,!0},n.prototype.accept=function(t){if(this.symbol===t){if(this.value){var e=this.value;return this.nextSymbol(),e}return this.nextSymbol(),!0}return!1},n.prototype.acceptNumber=function(){return this.accept("number")},n.prototype.expect=function(t){if(this.accept(t))return!0;throw new Error("expected "+t+" but found "+this.symbol)},n}()});function Kl(n){return n<Ae.HOURLY}var Ae,bi=ee(()=>{(function(n){n[n.YEARLY=0]="YEARLY",n[n.MONTHLY=1]="MONTHLY",n[n.WEEKLY=2]="WEEKLY",n[n.DAILY=3]="DAILY",n[n.HOURLY=4]="HOURLY",n[n.MINUTELY=5]="MINUTELY",n[n.SECONDLY=6]="SECONDLY"})(Ae||(Ae={}))});var Fk,Ua,Lk,Uk,Yk=ee(()=>{Nk();Ik();Jn();bi();$c();Fk=function(n,t){return t===void 0&&(t=Ps),new ae(zl(n,t)||void 0)},Ua=["count","until","interval","byweekday","bymonthday","bymonth"];Gr.IMPLEMENTED=[];Gr.IMPLEMENTED[Ae.HOURLY]=Ua;Gr.IMPLEMENTED[Ae.MINUTELY]=Ua;Gr.IMPLEMENTED[Ae.DAILY]=["byhour"].concat(Ua);Gr.IMPLEMENTED[Ae.WEEKLY]=Ua;Gr.IMPLEMENTED[Ae.MONTHLY]=Ua;Gr.IMPLEMENTED[Ae.YEARLY]=["byweekno","byyearday"].concat(Ua);Lk=function(n,t,e,r){return new Gr(n,t,e,r).toString()},Uk=Gr.isFullyConvertible});var Ya,jk,qc=ee(()=>{yi();bi();nn();$t();Ya=function(){function n(t,e,r,i){this.hour=t,this.minute=e,this.second=r,this.millisecond=i||0}return n.prototype.getHours=function(){return this.hour},n.prototype.getMinutes=function(){return this.minute},n.prototype.getSeconds=function(){return this.second},n.prototype.getMilliseconds=function(){return this.millisecond},n.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},n}(),jk=function(n){La(t,n);function t(e,r,i,s,a,o,l){var u=n.call(this,s,a,o,l)||this;return u.year=e,u.month=r,u.day=i,u}return t.fromDate=function(e){return new this(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.valueOf()%1e3)},t.prototype.getWeekday=function(){return mi(new Date(this.getTime()))},t.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},t.prototype.getDay=function(){return this.day},t.prototype.getMonth=function(){return this.month},t.prototype.getYear=function(){return this.year},t.prototype.addYears=function(e){this.year+=e},t.prototype.addMonths=function(e){if(this.month+=e,this.month>12){var r=Math.floor(this.month/12),i=Wt(this.month,12);this.month=i,this.year+=r,this.month===0&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(e,r){r>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-r))+e*7:this.day+=-(this.getWeekday()-r)+e*7,this.fixDay()},t.prototype.addDaily=function(e){this.day+=e,this.fixDay()},t.prototype.addHours=function(e,r,i){for(r&&(this.hour+=Math.floor((23-this.hour)/e)*e);;){this.hour+=e;var s=Fc(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),On(i)||Ie(i,this.hour))break}},t.prototype.addMinutes=function(e,r,i,s){for(r&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/e)*e);;){this.minute+=e;var a=Fc(this.minute,60),o=a.div,l=a.mod;if(o&&(this.minute=l,this.addHours(o,!1,i)),(On(i)||Ie(i,this.hour))&&(On(s)||Ie(s,this.minute)))break}},t.prototype.addSeconds=function(e,r,i,s,a){for(r&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/e)*e);;){this.second+=e;var o=Fc(this.second,60),l=o.div,u=o.mod;if(l&&(this.second=u,this.addMinutes(l,!1,i,s)),(On(i)||Ie(i,this.hour))&&(On(s)||Ie(s,this.minute))&&(On(a)||Ie(a,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var e=Lg(this.year,this.month-1)[1];if(!(this.day<=e))for(;this.day>e;){if(this.day-=e,++this.month,this.month===13&&(this.month=1,++this.year,this.year>Lc))return;e=Lg(this.year,this.month-1)[1]}}},t.prototype.add=function(e,r){var i=e.freq,s=e.interval,a=e.wkst,o=e.byhour,l=e.byminute,u=e.bysecond;switch(i){case Ae.YEARLY:return this.addYears(s);case Ae.MONTHLY:return this.addMonths(s);case Ae.WEEKLY:return this.addWeekly(s,a);case Ae.DAILY:return this.addDaily(s);case Ae.HOURLY:return this.addHours(s,r,o);case Ae.MINUTELY:return this.addMinutes(s,r,o,l);case Ae.SECONDLY:return this.addSeconds(s,r,o,l,u)}},t}(Ya)});function Wg(n){for(var t=[],e=Object.keys(n),r=0,i=e;r<i.length;r++){var s=i[r];Ie(qk,s)||t.push(s),Fg(n[s])&&!As(n[s])&&t.push(s)}if(t.length)throw new Error("Invalid options: "+t.join(", "));return Pt({},n)}function Wk(n){var t=Pt(Pt({},Ql),Wg(n));if(Je(t.byeaster)&&(t.freq=ae.YEARLY),!(Je(t.freq)&&ae.FREQUENCIES[t.freq]))throw new Error("Invalid frequency: ".concat(t.freq," ").concat(n.freq));if(t.dtstart||(t.dtstart=new Date(new Date().setMilliseconds(0))),Je(t.wkst)?xn(t.wkst)||(t.wkst=t.wkst.weekday):t.wkst=ae.MO.weekday,Je(t.bysetpos)){xn(t.bysetpos)&&(t.bysetpos=[t.bysetpos]);for(var e=0;e<t.bysetpos.length;e++){var r=t.bysetpos[e];if(r===0||!(r>=-366&&r<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(t.byweekno)||st(t.byweekno)||st(t.byyearday)||Boolean(t.bymonthday)||st(t.bymonthday)||Je(t.byweekday)||Je(t.byeaster)))switch(t.freq){case ae.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case ae.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case ae.WEEKLY:t.byweekday=[mi(t.dtstart)];break}if(Je(t.bymonth)&&!At(t.bymonth)&&(t.bymonth=[t.bymonth]),Je(t.byyearday)&&!At(t.byyearday)&&xn(t.byyearday)&&(t.byyearday=[t.byyearday]),!Je(t.bymonthday))t.bymonthday=[],t.bynmonthday=[];else if(At(t.bymonthday)){for(var i=[],s=[],e=0;e<t.bymonthday.length;e++){var r=t.bymonthday[e];r>0?i.push(r):r<0&&s.push(r)}t.bymonthday=i,t.bynmonthday=s}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);if(Je(t.byweekno)&&!At(t.byweekno)&&(t.byweekno=[t.byweekno]),!Je(t.byweekday))t.bynweekday=null;else if(xn(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(Ig(t.byweekday))t.byweekday=[ft.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof ft)!t.byweekday.n||t.freq>ae.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{for(var a=[],o=[],e=0;e<t.byweekday.length;e++){var l=t.byweekday[e];if(xn(l)){a.push(l);continue}else if(Ig(l)){a.push(ft.fromStr(l).weekday);continue}!l.n||t.freq>ae.MONTHLY?a.push(l.weekday):o.push([l.weekday,l.n])}t.byweekday=st(a)?a:null,t.bynweekday=st(o)?o:null}return Je(t.byhour)?xn(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq<ae.HOURLY?[t.dtstart.getUTCHours()]:null,Je(t.byminute)?xn(t.byminute)&&(t.byminute=[t.byminute]):t.byminute=t.freq<ae.MINUTELY?[t.dtstart.getUTCMinutes()]:null,Je(t.bysecond)?xn(t.bysecond)&&(t.bysecond=[t.bysecond]):t.bysecond=t.freq<ae.SECONDLY?[t.dtstart.getUTCSeconds()]:null,{parsedOptions:t}}function $k(n){var t=n.dtstart.getTime()%1e3;if(!Kl(n.freq))return[];var e=[];return n.byhour.forEach(function(r){n.byminute.forEach(function(i){n.bysecond.forEach(function(s){e.push(new Ya(r,i,s,t))})})}),e}var $g=ee(()=>{yi();bi();nn();Jn();$t();Ms();qc()});function Zl(n){var t=n.split(` +show urgency`}},recurringTasks:{heading:"\u91CD\u590D\u6027\u4EFB\u52A1",nextLine:{description:"\u542F\u7528\u6B64\u529F\u80FD\u540E\uFF0C\u4EFB\u52A1\u7684\u4E0B\u4E00\u6B21\u91CD\u590D\u5C06\u663E\u793A\u5728\u5DF2\u5B8C\u6210\u4EFB\u52A1\u7684\u4E0B\u4E00\u884C\u3002\u82E5\u5173\u95ED\u6B64\u529F\u80FD\uFF0C\u5219\u4E0B\u4E00\u6B21\u91CD\u590D\u5C06\u51FA\u73B0\u5728\u5DF2\u5B8C\u6210\u4EFB\u52A1\u7684\u4E0A\u4E00\u884C\u3002",name:"\u628A\u4EFB\u52A1\u7684\u4E0B\u4E00\u6B21\u91CD\u590D\u653E\u5728\u4E0B\u4E00\u884C"},removeScheduledDate:{description:{line1:"\u5F00\u542F\u6B64\u9009\u9879\u540E\uFF0C\u5F53\u4EFB\u52A1\u81F3\u5C11\u8BBE\u7F6E\u4E86\u5F00\u59CB\u65E5\u671F(\u{1F6EB})\u6216\u8BA1\u5212\u65E5\u671F(\u{1F4C5})\u4E2D\u7684\u4E00\u4E2A\u65F6\uFF0C\u8BE5\u4EFB\u52A1\u7684\u4E0B\u4E00\u6B21\u91CD\u590D\u5468\u671F\u5C06\u4E0D\u518D\u5305\u542B\u8BA1\u5212\u65E5\u671F(\u23F3)\u3002",line2:"\u6B64\u529F\u80FD\u9002\u7528\u4E8E\u4F60\u5E0C\u671B\u5C06\u5F00\u59CB\u548C\u622A\u6B62\u65E5\u671F\u5EF6\u7EED\u5230\u4E0B\u4E00\u4E2A\u5468\u671F\uFF0C\u4F46\u8BA1\u5212\u65E5\u671F\u6682\u4E0D\u8BBE\u7F6E\uFF0C\u7B49\u5B9E\u9645\u5F00\u59CB\u5904\u7406\u65F6\u518D\u786E\u5B9A\u7684\u60C5\u51B5\u3002"},name:"\u5728\u91CD\u590D\u6027\u4EFB\u52A1\u4E2D\u79FB\u9664\u8BA1\u5212\u65E5\u671F"}},seeTheDocumentation:"\u53C2\u9605\u6587\u6863",statuses:{collections:{anuppuccinTheme:"AnuPpuccin \u4E3B\u9898",auraTheme:"Aura \u4E3B\u9898",borderTheme:"Border \u4E3B\u9898",buttons:{addCollection:{name:"{{themeName}}: \u6DFB\u52A0 {{numberOfStatuses}} \u79CD\u652F\u6301\u72B6\u6001"}},ebullientworksTheme:"Ebullientworks \u4E3B\u9898",itsThemeAndSlrvbCheckboxes:"ITS \u4E3B\u9898\u548C SlRvb \u590D\u9009\u6846",lytModeTheme:"LYT Mode \u4E3B\u9898 (\u4EC5\u6DF1\u8272\u6A21\u5F0F)",minimalTheme:"Minimal \u4E3B\u9898",thingsTheme:"Things \u4E3B\u9898"},coreStatuses:{buttons:{checkStatuses:{name:"\u67E5\u770B\u5E76\u68C0\u67E5\u60A8\u7684\u72B6\u6001",tooltip:"\u5728\u5E93\u7684\u6839\u76EE\u5F55\u4E0B\u521B\u5EFA\u4E00\u4E2A\u65B0\u6587\u4EF6,\u5305\u542B\u5F53\u524D\u72B6\u6001\u8BBE\u7F6E\u7684 Mermaid \u56FE\u8868."}},description:{line1:"\u8FD9\u4E9B\u662F Tasks \u539F\u751F\u652F\u6301\u7684\u6838\u5FC3\u72B6\u6001\uFF0C\u4E0D\u9700\u8981\u81EA\u5B9A\u4E49CSS\u6837\u5F0F\u6216\u4E3B\u9898\u3002",line2:"\u60A8\u53EF\u4EE5\u5728\u4E0B\u9762\u7F16\u8F91\u548C\u6DFB\u52A0\u81EA\u5B9A\u4E49\u72B6\u6001\u3002"},heading:"\u6838\u5FC3\u72B6\u6001"},customStatuses:{buttons:{addAllUnknown:{name:"\u6DFB\u52A0\u6240\u6709\u672A\u77E5\u72B6\u6001\u7C7B\u578B"},addNewStatus:{name:"\u6DFB\u52A0\u65B0\u4EFB\u52A1\u72B6\u6001"},resetCustomStatuses:{name:"\u91CD\u7F6E\u81EA\u5B9A\u4E49\u72B6\u6001\u7C7B\u578B\u4E3A\u9ED8\u8BA4\u503C"}},description:{line1:"\u60A8\u5E94\u8BE5\u9996\u5148<b>\u9009\u62E9\u5E76\u5B89\u88C5 CSS\u4EE3\u7801\u6BB5\u6216\u4E3B\u9898<b>\u4EE5\u8BBE\u7F6E\u81EA\u5B9A\u4E49\u590D\u9009\u6846\u7684\u6837\u5F0F",line2:"\u7136\u540E\uFF0C\u4F7F\u7528\u4E0B\u9762\u7684\u6309\u94AE\u8BBE\u7F6E\u60A8\u7684\u81EA\u5B9A\u4E49\u72B6\u6001,\u4EE5\u5339\u914D\u60A8\u9009\u62E9\u7684CSS\u590D\u9009\u6846.",line3:"<b>\u6CE8\u610F</b>\u4EFB\u4F55\u4E0E\u66F4\u65E9\u7684\u72B6\u6001\u5177\u6709\u76F8\u540C\u7B26\u53F7\u7684\u72B6\u6001\u90FD\u5C06\u88AB\u5FFD\u7565.\u60A8\u53EF\u4EE5\u901A\u8FC7\u8FD0\u884C\u201CCreate or edit task\u201D\u547D\u4EE4\u5E76\u67E5\u770B\u201CStatus\u201D\u4E0B\u62C9\u5217\u8868\u6765\u786E\u8BA4\u5B9E\u9645\u52A0\u8F7D\u7684\u72B6\u6001\u3002",line4:"\u53C2\u9605\u6587\u6863\uFF01"},heading:"\u81EA\u5B9A\u4E49\u72B6\u6001"},heading:"\u4EFB\u52A1\u72B6\u6001"}}}});var jf,Jx,zb,N,gs=ee(()=>{"use strict";Lb();Ub();jb();$b();Hb();Bb();jf=!1,Jx=()=>{let n=localStorage.getItem("language"),t=(n==null?void 0:n.toLowerCase())||"en";return console.log(`Language in Obsidian settings: '${t}'; requesting Tasks in '${t}'.`),t},zb=()=>F(void 0,null,function*(){jf||(yield yt.init({lng:Jx(),fallbackLng:"en",returnEmptyString:!1,resources:{be:{translation:Yb},en:{translation:Wb},ru:{translation:qb},uk:{translation:Gb},zh:{translation:Vb}},interpolation:{escapeValue:!1}}),jf=!0)}),N=new Proxy(yt,{get(n,t){if(!jf&&t==="t")throw new Error("i18n.t() called before initialization. Call initializeI18n() first.");return Reflect.get(n,t)}})});var wn,fe,ii=ee(()=>{"use strict";wn=class{},fe=wn;fe.dateFormat="YYYY-MM-DD",fe.dateTimeFormat="YYYY-MM-DD HH:mm",fe.indentationRegex=/^([\s\t>]*)/,fe.listMarkerRegex=/([-*+]|[0-9]+[.)])/,fe.checkboxRegex=/\[(.)\]/u,fe.afterCheckboxRegex=/ *(.*)/u,fe.taskRegex=new RegExp(wn.indentationRegex.source+wn.listMarkerRegex.source+" +"+wn.checkboxRegex.source+wn.afterCheckboxRegex.source,"u"),fe.nonTaskRegex=new RegExp(wn.indentationRegex.source+wn.listMarkerRegex.source+"? *("+wn.checkboxRegex.source+")?"+wn.afterCheckboxRegex.source,"u"),fe.listItemRegex=new RegExp(wn.indentationRegex.source+wn.listMarkerRegex.source),fe.blockLinkRegex=/ \^[a-zA-Z0-9-]+$/u,fe.hashTags=/(^|\s)#[^ !@#$%^&*(),.?":{}|<>]+/g,fe.hashTagsFromEnd=new RegExp(wn.hashTags.source+"$")});var Ke=x(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.matchAnyPattern=Ni.extractTerms=Ni.repeatedTimeunitPattern=void 0;function rO(n,t){let e=t.replace(/\((?!\?)/g,"(?:");return`${n}${e}\\s{0,5}(?:,?\\s{0,5}${e}){0,10}`}Ni.repeatedTimeunitPattern=rO;function Kb(n){let t;return n instanceof Array?t=[...n]:n instanceof Map?t=Array.from(n.keys()):t=Object.keys(n),t}Ni.extractTerms=Kb;function iO(n){return`(?:${Kb(n).sort((e,r)=>r.length-e.length).join("|").replace(/\./g,"\\.")})`}Ni.matchAnyPattern=iO});var Ue=x(($f,qf)=>{(function(n,t){typeof $f=="object"&&typeof qf!="undefined"?qf.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis!="undefined"?globalThis:n||self).dayjs=t()})($f,function(){"use strict";var n=1e3,t=6e4,e=36e5,r="millisecond",i="second",s="minute",a="hour",o="day",l="week",u="month",c="quarter",d="year",f="date",p="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},O=function(V,K,C){var J=String(V);return!J||J.length>=K?V:""+Array(K+1-J.length).join(C)+V},E={s:O,z:function(V){var K=-V.utcOffset(),C=Math.abs(K),J=Math.floor(C/60),$=C%60;return(K<=0?"+":"-")+O(J,2,"0")+":"+O($,2,"0")},m:function V(K,C){if(K.date()<C.date())return-V(C,K);var J=12*(C.year()-K.year())+(C.month()-K.month()),$=K.clone().add(J,u),le=C-$<0,m=K.clone().add(J+(le?-1:1),u);return+(-(J+(C-$)/(le?$-m:m-$))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:u,y:d,w:l,d:o,D:f,h:a,m:s,s:i,ms:r,Q:c}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},A="en",Y={};Y[A]=_;var q=function(V){return V instanceof ye},se=function(V,K,C){var J;if(!V)return A;if(typeof V=="string")Y[V]&&(J=V),K&&(Y[V]=K,J=V);else{var $=V.name;Y[$]=V,J=$}return!C&&J&&(A=J),J||!C&&A},H=function(V,K){if(q(V))return V.clone();var C=typeof K=="object"?K:{};return C.date=V,C.args=arguments,new ye(C)},Z=E;Z.l=se,Z.i=q,Z.w=function(V,K){return H(V,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var ye=function(){function V(C){this.$L=se(C.locale,null,!0),this.parse(C)}var K=V.prototype;return K.parse=function(C){this.$d=function(J){var $=J.date,le=J.utc;if($===null)return new Date(NaN);if(Z.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var m=$.match(b);if(m){var y=m[2]-1||0,v=(m[7]||"0").substring(0,3);return le?new Date(Date.UTC(m[1],y,m[3]||1,m[4]||0,m[5]||0,m[6]||0,v)):new Date(m[1],y,m[3]||1,m[4]||0,m[5]||0,m[6]||0,v)}}return new Date($)}(C),this.$x=C.x||{},this.init()},K.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},K.$utils=function(){return Z},K.isValid=function(){return this.$d.toString()!==p},K.isSame=function(C,J){var $=H(C);return this.startOf(J)<=$&&$<=this.endOf(J)},K.isAfter=function(C,J){return H(C)<this.startOf(J)},K.isBefore=function(C,J){return this.endOf(J)<H(C)},K.$g=function(C,J,$){return Z.u(C)?this[J]:this.set($,C)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(C,J){var $=this,le=!!Z.u(J)||J,m=Z.p(C),y=function(P,W){var ce=Z.w($.$u?Date.UTC($.$y,W,P):new Date($.$y,W,P),$);return le?ce:ce.endOf(o)},v=function(P,W){return Z.w($.toDate()[P].apply($.toDate("s"),(le?[0,0,0,0]:[23,59,59,999]).slice(W)),$)},w=this.$W,S=this.$M,M=this.$D,I="set"+(this.$u?"UTC":"");switch(m){case d:return le?y(1,0):y(31,11);case u:return le?y(1,S):y(0,S+1);case l:var j=this.$locale().weekStart||0,D=(w<j?w+7:w)-j;return y(le?M-D:M+(6-D),S);case o:case f:return v(I+"Hours",0);case a:return v(I+"Minutes",1);case s:return v(I+"Seconds",2);case i:return v(I+"Milliseconds",3);default:return this.clone()}},K.endOf=function(C){return this.startOf(C,!1)},K.$set=function(C,J){var $,le=Z.p(C),m="set"+(this.$u?"UTC":""),y=($={},$[o]=m+"Date",$[f]=m+"Date",$[u]=m+"Month",$[d]=m+"FullYear",$[a]=m+"Hours",$[s]=m+"Minutes",$[i]=m+"Seconds",$[r]=m+"Milliseconds",$)[le],v=le===o?this.$D+(J-this.$W):J;if(le===u||le===d){var w=this.clone().set(f,1);w.$d[y](v),w.init(),this.$d=w.set(f,Math.min(this.$D,w.daysInMonth())).$d}else y&&this.$d[y](v);return this.init(),this},K.set=function(C,J){return this.clone().$set(C,J)},K.get=function(C){return this[Z.p(C)]()},K.add=function(C,J){var $,le=this;C=Number(C);var m=Z.p(J),y=function(S){var M=H(le);return Z.w(M.date(M.date()+Math.round(S*C)),le)};if(m===u)return this.set(u,this.$M+C);if(m===d)return this.set(d,this.$y+C);if(m===o)return y(1);if(m===l)return y(7);var v=($={},$[s]=t,$[a]=e,$[i]=n,$)[m]||1,w=this.$d.getTime()+C*v;return Z.w(w,this)},K.subtract=function(C,J){return this.add(-1*C,J)},K.format=function(C){var J=this,$=this.$locale();if(!this.isValid())return $.invalidDate||p;var le=C||"YYYY-MM-DDTHH:mm:ssZ",m=Z.z(this),y=this.$H,v=this.$m,w=this.$M,S=$.weekdays,M=$.months,I=function(W,ce,be,Oe){return W&&(W[ce]||W(J,le))||be[ce].substr(0,Oe)},j=function(W){return Z.s(y%12||12,W,"0")},D=$.meridiem||function(W,ce,be){var Oe=W<12?"AM":"PM";return be?Oe.toLowerCase():Oe},P={YY:String(this.$y).slice(-2),YYYY:this.$y,M:w+1,MM:Z.s(w+1,2,"0"),MMM:I($.monthsShort,w,M,3),MMMM:I(M,w),D:this.$D,DD:Z.s(this.$D,2,"0"),d:String(this.$W),dd:I($.weekdaysMin,this.$W,S,2),ddd:I($.weekdaysShort,this.$W,S,3),dddd:S[this.$W],H:String(y),HH:Z.s(y,2,"0"),h:j(1),hh:j(2),a:D(y,v,!0),A:D(y,v,!1),m:String(v),mm:Z.s(v,2,"0"),s:String(this.$s),ss:Z.s(this.$s,2,"0"),SSS:Z.s(this.$ms,3,"0"),Z:m};return le.replace(T,function(W,ce){return ce||P[W]||m.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(C,J,$){var le,m=Z.p(J),y=H(C),v=(y.utcOffset()-this.utcOffset())*t,w=this-y,S=Z.m(this,y);return S=(le={},le[d]=S/12,le[u]=S,le[c]=S/3,le[l]=(w-v)/6048e5,le[o]=(w-v)/864e5,le[a]=w/e,le[s]=w/t,le[i]=w/n,le)[m]||w,$?S:Z.a(S)},K.daysInMonth=function(){return this.endOf(u).$D},K.$locale=function(){return Y[this.$L]},K.locale=function(C,J){if(!C)return this.$L;var $=this.clone(),le=se(C,J,!0);return le&&($.$L=le),$},K.clone=function(){return Z.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},V}(),we=ye.prototype;return H.prototype=we,[["$ms",r],["$s",i],["$m",s],["$H",a],["$W",o],["$M",u],["$y",d],["$D",f]].forEach(function(V){we[V[1]]=function(K){return this.$g(K,V[0],V[1])}}),H.extend=function(V,K){return V.$i||(V(K,ye,H),V.$i=!0),H},H.locale=se,H.isDayjs=q,H.unix=function(V){return H(1e3*V)},H.en=Y[A],H.Ls=Y,H.p={},H})});var Ct=x(Ii=>{"use strict";var sO=Ii&&Ii.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ii,"__esModule",{value:!0});Ii.findYearClosestToRef=Ii.findMostLikelyADYear=void 0;var aO=sO(Ue());function oO(n){return n<100&&(n>50?n=n+1900:n=n+2e3),n}Ii.findMostLikelyADYear=oO;function lO(n,t,e){let r=aO.default(n),i=r;i=i.month(e-1),i=i.date(t),i=i.year(r.year());let s=i.add(1,"y"),a=i.add(-1,"y");return Math.abs(s.diff(r))<Math.abs(i.diff(r))?i=s:Math.abs(a.diff(r))<Math.abs(i.diff(r))&&(i=a),i.year()}Ii.findYearClosestToRef=lO});var Mt=x(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.parseTimeUnits=Me.TIME_UNITS_PATTERN=Me.parseYear=Me.YEAR_PATTERN=Me.parseOrdinalNumberPattern=Me.ORDINAL_NUMBER_PATTERN=Me.parseNumberPattern=Me.NUMBER_PATTERN=Me.TIME_UNIT_DICTIONARY=Me.ORDINAL_WORD_DICTIONARY=Me.INTEGER_WORD_DICTIONARY=Me.MONTH_DICTIONARY=Me.FULL_MONTH_NAME_DICTIONARY=Me.WEEKDAY_DICTIONARY=void 0;var Wu=Ke(),uO=Ct();Me.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};Me.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};Me.MONTH_DICTIONARY=Object.assign(Object.assign({},Me.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});Me.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};Me.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};Me.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"};Me.NUMBER_PATTERN=`(?:${Wu.matchAnyPattern(Me.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 Xb(n){let t=n.toLowerCase();return Me.INTEGER_WORD_DICTIONARY[t]!==void 0?Me.INTEGER_WORD_DICTIONARY[t]:t==="a"||t==="an"?1:t.match(/few/)?3:t.match(/half/)?.5:t.match(/couple/)?2:t.match(/several/)?7:parseFloat(t)}Me.parseNumberPattern=Xb;Me.ORDINAL_NUMBER_PATTERN=`(?:${Wu.matchAnyPattern(Me.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:st|nd|rd|th)?)`;function cO(n){let t=n.toLowerCase();return Me.ORDINAL_WORD_DICTIONARY[t]!==void 0?Me.ORDINAL_WORD_DICTIONARY[t]:(t=t.replace(/(?:st|nd|rd|th)$/i,""),parseInt(t))}Me.parseOrdinalNumberPattern=cO;Me.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 dO(n){if(/BE/i.test(n))return n=n.replace(/BE/i,""),parseInt(n)-543;if(/BCE?/i.test(n))return n=n.replace(/BCE?/i,""),-parseInt(n);if(/(AD|CE)/i.test(n))return n=n.replace(/(AD|CE)/i,""),parseInt(n);let t=parseInt(n);return uO.findMostLikelyADYear(t)}Me.parseYear=dO;var Zb=`(${Me.NUMBER_PATTERN})\\s{0,3}(${Wu.matchAnyPattern(Me.TIME_UNIT_DICTIONARY)})`,Qb=new RegExp(Zb,"i");Me.TIME_UNITS_PATTERN=Wu.repeatedTimeunitPattern("(?:(?:about|around)\\s{0,3})?",Zb);function fO(n){let t={},e=n,r=Qb.exec(e);for(;r;)pO(t,r),e=e.substring(r[0].length).trim(),r=Qb.exec(e);return t}Me.parseTimeUnits=fO;function pO(n,t){let e=Xb(t[1]),r=Me.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];n[r]=e}});var Jb=x((Hf,Gf)=>{(function(n,t){typeof Hf=="object"&&typeof Gf!="undefined"?Gf.exports=t():typeof define=="function"&&define.amd?define(t):(n=typeof globalThis!="undefined"?globalThis:n||self).dayjs_plugin_quarterOfYear=t()})(Hf,function(){"use strict";var n="month",t="quarter";return function(e,r){var i=r.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,l){return o=Number(o),this.$utils().p(l)===t?this.add(3*o,n):s.bind(this)(o,l)};var a=i.startOf;i.startOf=function(o,l){var u=this.$utils(),c=!!u.u(l)||l;if(u.p(o)===t){var d=this.quarter()-1;return c?this.month(3*d).startOf(n).startOf("day"):this.month(3*d+2).endOf(n).endOf("day")}return a.bind(this)(o,l)}}})});var qn=x(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.implySimilarTime=Yr.assignSimilarTime=Yr.assignSimilarDate=Yr.assignTheNextDay=void 0;var eT=ht();function mO(n,t){t=t.add(1,"day"),tT(n,t),nT(n,t)}Yr.assignTheNextDay=mO;function tT(n,t){n.assign("day",t.date()),n.assign("month",t.month()+1),n.assign("year",t.year())}Yr.assignSimilarDate=tT;function hO(n,t){n.assign("hour",t.hour()),n.assign("minute",t.minute()),n.assign("second",t.second()),n.assign("millisecond",t.millisecond()),n.get("hour")<12?n.assign("meridiem",eT.Meridiem.AM):n.assign("meridiem",eT.Meridiem.PM)}Yr.assignSimilarTime=hO;function nT(n,t){n.imply("hour",t.hour()),n.imply("minute",t.minute()),n.imply("second",t.second()),n.imply("millisecond",t.millisecond())}Yr.implySimilarTime=nT});var rT=x(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});ys.toTimezoneOffset=ys.TIMEZONE_ABBR_MAP=void 0;ys.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 gO(n){var t;return n==null?null:typeof n=="number"?n:(t=ys.TIMEZONE_ABBR_MAP[n])!==null&&t!==void 0?t:null}ys.toTimezoneOffset=gO});var nt=x(jr=>{"use strict";var iT=jr&&jr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(jr,"__esModule",{value:!0});jr.ParsingResult=jr.ParsingComponents=jr.ReferenceWithTimezone=void 0;var yO=iT(Jb()),$u=iT(Ue()),Bf=qn(),bO=rT();$u.default.extend(yO.default);var Vf=class{constructor(t){var e;t=t!=null?t:new Date,t instanceof Date?this.instant=t:(this.instant=(e=t.instant)!==null&&e!==void 0?e:new Date,this.timezoneOffset=bO.toTimezoneOffset(t.timezone))}};jr.ReferenceWithTimezone=Vf;var bs=class{constructor(t,e){if(this.reference=t,this.knownValues={},this.impliedValues={},e)for(let i in e)this.knownValues[i]=e[i];let r=$u.default(t.instant);this.imply("day",r.date()),this.imply("month",r.month()+1),this.imply("year",r.year()),this.imply("hour",12),this.imply("minute",0),this.imply("second",0),this.imply("millisecond",0)}get(t){return t in this.knownValues?this.knownValues[t]:t in this.impliedValues?this.impliedValues[t]:null}isCertain(t){return t in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(t,e){return t in this.knownValues?this:(this.impliedValues[t]=e,this)}assign(t,e){return this.knownValues[t]=e,delete this.impliedValues[t],this}delete(t){delete this.knownValues[t],delete this.impliedValues[t]}clone(){let t=new bs(this.reference);t.knownValues={},t.impliedValues={};for(let e in this.knownValues)t.knownValues[e]=this.knownValues[e];for(let e in this.impliedValues)t.impliedValues[e]=this.impliedValues[e];return t}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 t=this.dateWithoutTimezoneAdjustment();return!(t.getFullYear()!==this.get("year")||t.getMonth()!==this.get("month")-1||t.getDate()!==this.get("day")||this.get("hour")!=null&&t.getHours()!=this.get("hour")||this.get("minute")!=null&&t.getMinutes()!=this.get("minute"))}toString(){return`[ParsingComponents {knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}dayjs(){return $u.default(this.date())}date(){let t=this.dateWithoutTimezoneAdjustment();return new Date(t.getTime()+this.getSystemTimezoneAdjustmentMinute(t)*6e4)}dateWithoutTimezoneAdjustment(){let t=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 t.setFullYear(this.get("year")),t}getSystemTimezoneAdjustmentMinute(t){var e,r;(!t||t.getTime()<0)&&(t=new Date);let i=-t.getTimezoneOffset(),s=(r=(e=this.get("timezoneOffset"))!==null&&e!==void 0?e:this.reference.timezoneOffset)!==null&&r!==void 0?r:i;return i-s}static createRelativeFromReference(t,e){let r=$u.default(t.instant);for(let s in e)r=r.add(e[s],s);let i=new bs(t);return e.hour||e.minute||e.second?(Bf.assignSimilarTime(i,r),Bf.assignSimilarDate(i,r),t.timezoneOffset!==null&&i.assign("timezoneOffset",-t.instant.getTimezoneOffset())):(Bf.implySimilarTime(i,r),t.timezoneOffset!==null&&i.imply("timezoneOffset",-t.instant.getTimezoneOffset()),e.d?(i.assign("day",r.date()),i.assign("month",r.month()+1),i.assign("year",r.year())):(e.week&&i.imply("weekday",r.day()),i.imply("day",r.date()),e.month?(i.assign("month",r.month()+1),i.assign("year",r.year())):(i.imply("month",r.month()+1),e.year?i.assign("year",r.year()):i.imply("year",r.year())))),i}};jr.ParsingComponents=bs;var Bo=class{constructor(t,e,r,i,s){this.reference=t,this.refDate=t.instant,this.index=e,this.text=r,this.start=i||new bs(t),this.end=s}clone(){let t=new Bo(this.reference,this.index,this.text);return t.start=this.start?this.start.clone():null,t.end=this.end?this.end.clone():null,t}date(){return this.start.date()}toString(){return`[ParsingResult {index: ${this.index}, text: '${this.text}', ...}]`}};jr.ParsingResult=Bo});var re=x(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});qu.AbstractParserWithWordBoundaryChecking=void 0;var zf=class{constructor(){this.cachedInnerPattern=null,this.cachedPattern=null}patternLeftBoundary(){return"(\\W|^)"}pattern(t){let e=this.innerPattern(t);return e==this.cachedInnerPattern?this.cachedPattern:(this.cachedPattern=new RegExp(`${this.patternLeftBoundary()}${e.source}`,e.flags),this.cachedInnerPattern=e,this.cachedPattern)}extract(t,e){var r;let i=(r=e[1])!==null&&r!==void 0?r:"";e.index=e.index+i.length,e[0]=e[0].substring(i.length);for(let s=2;s<e.length;s++)e[s-1]=e[s];return this.innerExtract(t,e)}};qu.AbstractParserWithWordBoundaryChecking=zf});var sT=x(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});var Qf=Mt(),TO=nt(),_O=re(),vO=new RegExp(`(?:within|in|for)\\s*(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Qf.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),wO=new RegExp(`(?:(?:about|around|roughly|approximately|just)\\s*(?:~\\s*)?)?(${Qf.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Kf=class extends _O.AbstractParserWithWordBoundaryChecking{innerPattern(t){return t.option.forwardDate?wO:vO}innerExtract(t,e){let r=Qf.parseTimeUnits(e[1]);return TO.ParsingComponents.createRelativeFromReference(t.reference,r)}};Xf.default=Kf});var dT=x(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});var kO=Ct(),uT=Mt(),cT=Mt(),Hu=Mt(),SO=Ke(),DO=re(),EO=new RegExp(`(?:on\\s{0,3})?(${Hu.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:to|\\-|\\\u2013|until|through|till)?\\s{0,3}(${Hu.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s{0,3}(?:of)?\\s{0,3})(${SO.matchAnyPattern(uT.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s{0,3})(${cT.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),aT=1,oT=2,xO=3,lT=4,Zf=class extends DO.AbstractParserWithWordBoundaryChecking{innerPattern(){return EO}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=uT.MONTH_DICTIONARY[e[xO].toLowerCase()],s=Hu.parseOrdinalNumberPattern(e[aT]);if(s>31)return e.index=e.index+e[aT].length,null;if(r.start.assign("month",i),r.start.assign("day",s),e[lT]){let a=cT.parseYear(e[lT]);r.start.assign("year",a)}else{let a=kO.findYearClosestToRef(t.refDate,s,i);r.start.imply("year",a)}if(e[oT]){let a=Hu.parseOrdinalNumberPattern(e[oT]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};Jf.default=Zf});var gT=x(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});var OO=Ct(),mT=Mt(),Gu=Mt(),hT=Mt(),CO=Ke(),MO=re(),RO=new RegExp(`(${CO.matchAnyPattern(mT.MONTH_DICTIONARY)})(?:-|/|\\s*,?\\s*)(${Gu.ORDINAL_NUMBER_PATTERN})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${Gu.ORDINAL_NUMBER_PATTERN})\\s*)?(?:(?:-|/|\\s*,?\\s*)(${hT.YEAR_PATTERN}))?(?=\\W|$)(?!\\:\\d)`,"i"),AO=1,PO=2,fT=3,pT=4,ep=class extends MO.AbstractParserWithWordBoundaryChecking{innerPattern(){return RO}innerExtract(t,e){let r=mT.MONTH_DICTIONARY[e[AO].toLowerCase()],i=Gu.parseOrdinalNumberPattern(e[PO]);if(i>31)return null;let s=t.createParsingComponents({day:i,month:r});if(e[pT]){let l=hT.parseYear(e[pT]);s.assign("year",l)}else{let l=OO.findYearClosestToRef(t.refDate,i,r);s.imply("year",l)}if(!e[fT])return s;let a=Gu.parseOrdinalNumberPattern(e[fT]),o=t.createParsingResult(e.index,e[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};tp.default=ep});var TT=x(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});var np=Mt(),NO=Ct(),IO=Ke(),bT=Mt(),FO=re(),LO=new RegExp(`((?:in)\\s*)?(${IO.matchAnyPattern(np.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${bT.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),UO=1,YO=2,yT=3,rp=class extends FO.AbstractParserWithWordBoundaryChecking{innerPattern(){return LO}innerExtract(t,e){let r=e[YO].toLowerCase();if(e[0].length<=3&&!np.FULL_MONTH_NAME_DICTIONARY[r])return null;let i=t.createParsingResult(e.index+(e[UO]||"").length,e.index+e[0].length);i.start.imply("day",1);let s=np.MONTH_DICTIONARY[r];if(i.start.assign("month",s),e[yT]){let a=bT.parseYear(e[yT]);i.start.assign("year",a)}else{let a=NO.findYearClosestToRef(t.refDate,1,s);i.start.imply("year",a)}return i}};ip.default=rp});var wT=x(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});var vT=Mt(),jO=Ke(),WO=re(),$O=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${jO.matchAnyPattern(vT.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),qO=1,HO=2,_T=3,GO=4,sp=class extends WO.AbstractParserWithWordBoundaryChecking{innerPattern(){return $O}innerExtract(t,e){let r=e[_T]?parseInt(e[_T]):vT.MONTH_DICTIONARY[e[HO].toLowerCase()];if(r<1||r>12)return null;let i=parseInt(e[qO]);return{day:parseInt(e[GO]),month:r,year:i}}};ap.default=sp});var kT=x(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});var BO=re(),VO=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),zO=1,KO=2,op=class extends BO.AbstractParserWithWordBoundaryChecking{innerPattern(){return VO}innerExtract(t,e){let r=parseInt(e[KO]),i=parseInt(e[zO]);return t.createParsingComponents().imply("day",1).assign("month",i).assign("year",r)}};lp.default=op});var Ts=x(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});zu.AbstractTimeExpressionParser=void 0;var tn=ht();function QO(n,t,e,r){return new RegExp(`${n}${t}(\\d{1,4})(?:(?:\\.|:|\uFF1A)(\\d{1,2})(?:(?::|\uFF1A)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${e}`,r)}function XO(n,t){return new RegExp(`^(${n})(\\d{1,4})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:(?:\\.|\\:|\\\uFF1A)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,"i")}var ST=2,Ta=3,Bu=4,Vu=5,Vo=6,up=class{constructor(t=!1){this.cachedPrimaryPrefix=null,this.cachedPrimarySuffix=null,this.cachedPrimaryTimePattern=null,this.cachedFollowingPhase=null,this.cachedFollowingSuffix=null,this.cachedFollowingTimePatten=null,this.strictMode=t}patternFlags(){return"i"}primaryPatternLeftBoundary(){return"(^|\\s|T|\\b)"}primarySuffix(){return"(?=\\W|$)"}followingSuffix(){return"(?=\\W|$)"}pattern(t){return this.getPrimaryTimePatternThroughCache()}extract(t,e){let r=this.extractPrimaryTimeComponents(t,e);if(!r)return e.index+=e[0].length,null;let i=e.index+e[1].length,s=e[0].substring(e[1].length),a=t.createParsingResult(i,s,r);e.index+=e[0].length;let o=t.text.substring(e.index),u=this.getFollowingTimePatternThroughCache().exec(o);return s.match(/^\d{3,4}/)&&u&&u[0].match(/^\s*([+-])\s*\d{2,4}$/)?null:!u||u[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(t,u,a),a.end&&(a.text+=u[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(t,e,r=!1){let i=t.createParsingComponents(),s=0,a=null,o=parseInt(e[ST]);if(o>100){if(this.strictMode||e[Ta]!=null)return null;s=o%100,o=Math.floor(o/100)}if(o>24)return null;if(e[Ta]!=null){if(e[Ta].length==1&&!e[Vo])return null;s=parseInt(e[Ta])}if(s>=60)return null;if(o>12&&(a=tn.Meridiem.PM),e[Vo]!=null){if(o>12)return null;let l=e[Vo][0].toLowerCase();l=="a"&&(a=tn.Meridiem.AM,o==12&&(o=0)),l=="p"&&(a=tn.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",tn.Meridiem.AM):i.imply("meridiem",tn.Meridiem.PM),e[Vu]!=null){let l=parseInt(e[Vu].substring(0,3));if(l>=1e3)return null;i.assign("millisecond",l)}if(e[Bu]!=null){let l=parseInt(e[Bu]);if(l>=60)return null;i.assign("second",l)}return i}extractFollowingTimeComponents(t,e,r){let i=t.createParsingComponents();if(e[Vu]!=null){let l=parseInt(e[Vu].substring(0,3));if(l>=1e3)return null;i.assign("millisecond",l)}if(e[Bu]!=null){let l=parseInt(e[Bu]);if(l>=60)return null;i.assign("second",l)}let s=parseInt(e[ST]),a=0,o=-1;if(e[Ta]!=null?a=parseInt(e[Ta]):s>100&&(a=s%100,s=Math.floor(s/100)),a>=60||s>24)return null;if(s>=12&&(o=tn.Meridiem.PM),e[Vo]!=null){if(s>12)return null;let l=e[Vo][0].toLowerCase();l=="a"&&(o=tn.Meridiem.AM,s==12&&(s=0,i.isCertain("day")||i.imply("day",i.get("day")+1))),l=="p"&&(o=tn.Meridiem.PM,s!=12&&(s+=12)),r.start.isCertain("meridiem")||(o==tn.Meridiem.AM?(r.start.imply("meridiem",tn.Meridiem.AM),r.start.get("hour")==12&&r.start.assign("hour",0)):(r.start.imply("meridiem",tn.Meridiem.PM),r.start.get("hour")!=12&&r.start.assign("hour",r.start.get("hour")+12)))}return i.assign("hour",s),i.assign("minute",a),o>=0?i.assign("meridiem",o):r.start.isCertain("meridiem")&&r.start.get("hour")>12?r.start.get("hour")-12>s?i.imply("meridiem",tn.Meridiem.AM):s<=12&&(i.assign("hour",s+12),i.assign("meridiem",tn.Meridiem.PM)):s>12?i.imply("meridiem",tn.Meridiem.PM):s<=12&&i.imply("meridiem",tn.Meridiem.AM),i.date().getTime()<r.start.date().getTime()&&i.imply("day",i.get("day")+1),i}checkAndReturnWithoutFollowingPattern(t){if(t.text.match(/^\d$/)||t.text.match(/^\d\d\d+$/)||t.text.match(/\d[apAP]$/))return null;let e=t.text.match(/[^\d:.](\d[\d.]+)$/);if(e){let r=e[1];if(this.strictMode||r.includes(".")&&!r.match(/\d(\.\d{2})+$/)||parseInt(r)>24)return null}return t}checkAndReturnWithFollowingPattern(t){if(t.text.match(/^\d+-\d+$/))return null;let e=t.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(e){if(this.strictMode)return null;let r=e[1],i=e[2];if(i.includes(".")&&!i.match(/\d(\.\d{2})+$/))return null;let s=parseInt(i),a=parseInt(r);if(s>24||a>24)return null}return t}getPrimaryTimePatternThroughCache(){let t=this.primaryPrefix(),e=this.primarySuffix();return this.cachedPrimaryPrefix===t&&this.cachedPrimarySuffix===e?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=QO(this.primaryPatternLeftBoundary(),t,e,this.patternFlags()),this.cachedPrimaryPrefix=t,this.cachedPrimarySuffix=e,this.cachedPrimaryTimePattern)}getFollowingTimePatternThroughCache(){let t=this.followingPhase(),e=this.followingSuffix();return this.cachedFollowingPhase===t&&this.cachedFollowingSuffix===e?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=XO(t,e),this.cachedFollowingPhase=t,this.cachedFollowingSuffix=e,this.cachedFollowingTimePatten)}};zu.AbstractTimeExpressionParser=up});var DT=x(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});var Ku=ht(),ZO=Ts(),cp=class extends ZO.AbstractTimeExpressionParser{constructor(t){super(t)}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(t,e){let r=super.extractPrimaryTimeComponents(t,e);if(r){if(e[0].endsWith("night")){let i=r.get("hour");i>=6&&i<12?(r.assign("hour",r.get("hour")+12),r.assign("meridiem",Ku.Meridiem.PM)):i<6&&r.assign("meridiem",Ku.Meridiem.AM)}if(e[0].endsWith("afternoon")){r.assign("meridiem",Ku.Meridiem.PM);let i=r.get("hour");i>=0&&i<=6&&r.assign("hour",r.get("hour")+12)}e[0].endsWith("morning")&&(r.assign("meridiem",Ku.Meridiem.AM),r.get("hour")<12&&r.assign("hour",r.get("hour")))}return r}};dp.default=cp});var Hn=x(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});_a.addImpliedTimeUnits=_a.reverseTimeUnits=void 0;function JO(n){let t={};for(let e in n)t[e]=-n[e];return t}_a.reverseTimeUnits=JO;function e0(n,t){let e=n.clone(),r=n.dayjs();for(let i in t)r=r.add(t[i],i);return("day"in t||"d"in t||"week"in t||"month"in t||"year"in t)&&(e.imply("day",r.date()),e.imply("month",r.month()+1),e.imply("year",r.year())),("second"in t||"minute"in t||"hour"in t)&&(e.imply("second",r.second()),e.imply("minute",r.minute()),e.imply("hour",r.hour())),e}_a.addImpliedTimeUnits=e0});var ET=x(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});var pp=Mt(),t0=nt(),n0=re(),r0=Hn(),i0=new RegExp(`(${pp.TIME_UNITS_PATTERN})\\s{0,5}(?:ago|before|earlier)(?=(?:\\W|$))`,"i"),s0=new RegExp(`(${pp.TIME_UNITS_PATTERN})\\s{0,5}ago(?=(?:\\W|$))`,"i"),fp=class extends n0.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?s0:i0}innerExtract(t,e){let r=pp.parseTimeUnits(e[1]),i=r0.reverseTimeUnits(r);return t0.ParsingComponents.createRelativeFromReference(t.reference,i)}};mp.default=fp});var xT=x(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});var gp=Mt(),a0=nt(),o0=re(),l0=new RegExp(`(${gp.TIME_UNITS_PATTERN})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|$))`,"i"),u0=new RegExp("("+gp.TIME_UNITS_PATTERN+")(later|from now)(?=(?:\\W|$))","i"),c0=1,hp=class extends o0.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?u0:l0}innerExtract(t,e){let r=gp.parseTimeUnits(e[c0]);return a0.ParsingComponents.createRelativeFromReference(t.reference,r)}};yp.default=hp});var wa=x(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.MergingRefiner=va.Filter=void 0;var bp=class{refine(t,e){return e.filter(r=>this.isValid(t,r))}};va.Filter=bp;var Tp=class{refine(t,e){if(e.length<2)return e;let r=[],i=e[0],s=null;for(let a=1;a<e.length;a++){s=e[a];let o=t.text.substring(i.index+i.text.length,s.index);if(!this.shouldMergeResults(o,i,s,t))r.push(i),i=s;else{let l=i,u=s,c=this.mergeResults(o,l,u,t);t.debug(()=>{console.log(`${this.constructor.name} merged ${l} and ${u} into ${c}`)}),i=c}}return i!=null&&r.push(i),r}};va.MergingRefiner=Tp});var Wr=x(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});var d0=wa(),_p=class extends d0.MergingRefiner{shouldMergeResults(t,e,r){return!e.end&&!r.end&&t.match(this.patternBetween())!=null}mergeResults(t,e,r){if(!e.start.isOnlyWeekdayComponent()&&!r.start.isOnlyWeekdayComponent()&&(r.start.getCertainComponents().forEach(s=>{e.start.isCertain(s)||e.start.assign(s,r.start.get(s))}),e.start.getCertainComponents().forEach(s=>{r.start.isCertain(s)||r.start.assign(s,e.start.get(s))})),e.start.date().getTime()>r.start.date().getTime()){let s=e.start.dayjs(),a=r.start.dayjs();e.start.isOnlyWeekdayComponent()&&s.add(-7,"days").isBefore(a)?(s=s.add(-7,"days"),e.start.imply("day",s.date()),e.start.imply("month",s.month()+1),e.start.imply("year",s.year())):r.start.isOnlyWeekdayComponent()&&a.add(7,"days").isAfter(s)?(a=a.add(7,"days"),r.start.imply("day",a.date()),r.start.imply("month",a.month()+1),r.start.imply("year",a.year())):[r,e]=[e,r]}let i=e.clone();return i.start=e.start,i.end=r.start,i.index=Math.min(e.index,r.index),e.index<r.index?i.text=e.text+t+r.text:i.text=r.text+t+e.text,i}};vp.default=_p});var OT=x(zo=>{"use strict";var f0=zo&&zo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(zo,"__esModule",{value:!0});var p0=f0(Wr()),wp=class extends p0.default{patternBetween(){return/^\s*(to|-)\s*$/i}};zo.default=wp});var CT=x(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.mergeDateTimeComponent=ka.mergeDateTimeResult=void 0;var m0=ht();function h0(n,t){let e=n.clone(),r=n.start,i=t.start;if(e.start=kp(r,i),n.end!=null||t.end!=null){let s=n.end==null?n.start:n.end,a=t.end==null?t.start:t.end,o=kp(s,a);n.end==null&&o.date().getTime()<e.start.date().getTime()&&(o.isCertain("day")?o.assign("day",o.get("day")+1):o.imply("day",o.get("day")+1)),e.end=o}return e}ka.mergeDateTimeResult=h0;function kp(n,t){let e=n.clone();return t.isCertain("hour")?(e.assign("hour",t.get("hour")),e.assign("minute",t.get("minute")),t.isCertain("second")?(e.assign("second",t.get("second")),t.isCertain("millisecond")?e.assign("millisecond",t.get("millisecond")):e.imply("millisecond",t.get("millisecond"))):(e.imply("second",t.get("second")),e.imply("millisecond",t.get("millisecond")))):(e.imply("hour",t.get("hour")),e.imply("minute",t.get("minute")),e.imply("second",t.get("second")),e.imply("millisecond",t.get("millisecond"))),t.isCertain("timezoneOffset")&&e.assign("timezoneOffset",t.get("timezoneOffset")),t.isCertain("meridiem")?e.assign("meridiem",t.get("meridiem")):t.get("meridiem")!=null&&e.get("meridiem")==null&&e.imply("meridiem",t.get("meridiem")),e.get("meridiem")==m0.Meridiem.PM&&e.get("hour")<12&&(t.isCertain("hour")?e.assign("hour",e.get("hour")+12):e.imply("hour",e.get("hour")+12)),e}ka.mergeDateTimeComponent=kp});var si=x(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});var g0=wa(),MT=CT(),Sp=class extends g0.MergingRefiner{shouldMergeResults(t,e,r){return(e.start.isOnlyDate()&&r.start.isOnlyTime()||r.start.isOnlyDate()&&e.start.isOnlyTime())&&t.match(this.patternBetween())!=null}mergeResults(t,e,r){let i=e.start.isOnlyDate()?MT.mergeDateTimeResult(e,r):MT.mergeDateTimeResult(r,e);return i.index=e.index,i.text=e.text+t+r.text,i}};Dp.default=Sp});var RT=x(Ko=>{"use strict";var y0=Ko&&Ko.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ko,"__esModule",{value:!0});var b0=y0(si()),Ep=class extends b0.default{patternBetween(){return new RegExp("^\\s*(T|at|after|before|on|of|,|-)?\\s*$")}};Ko.default=Ep});var AT=x(Op=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});var T0=new RegExp("^\\s*,?\\s*\\(?([A-Z]{2,4})\\)?(?=\\W|$)","i"),_0={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},xp=class{constructor(t){this.timezone=Object.assign(Object.assign({},_0),t)}refine(t,e){var r;let i=(r=t.option.timezones)!==null&&r!==void 0?r:{};return e.forEach(s=>{var a,o;let l=t.text.substring(s.index+s.text.length),u=T0.exec(l);if(!u)return;let c=u[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;t.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!=u[1])||s.start.isOnlyDate()&&c!=u[1]||(s.text+=u[0],s.start.isCertain("timezoneOffset")||s.start.assign("timezoneOffset",d),s.end!=null&&!s.end.isCertain("timezoneOffset")&&s.end.assign("timezoneOffset",d))}),e}};Op.default=xp});var Qu=x(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});var v0=new RegExp("^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?","i"),w0=1,k0=2,S0=3,Cp=class{refine(t,e){return e.forEach(function(r){if(r.start.isCertain("timezoneOffset"))return;let i=t.text.substring(r.index+r.text.length),s=v0.exec(i);if(!s)return;t.debug(()=>{console.log(`Extracting timezone: '${s[0]}' into : ${r}`)});let a=parseInt(s[k0]),o=parseInt(s[S0]||"0"),l=a*60+o;l>14*60||(s[w0]==="-"&&(l=-l),r.end!=null&&r.end.assign("timezoneOffset",l),r.start.assign("timezoneOffset",l),r.text+=s[0])}),e}};Mp.default=Cp});var PT=x(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});var Rp=class{refine(t,e){if(e.length<2)return e;let r=[],i=e[0];for(let s=1;s<e.length;s++){let a=e[s];a.index<i.index+i.text.length?a.text.length>i.text.length&&(i=a):(r.push(i),i=a)}return i!=null&&r.push(i),r}};Ap.default=Rp});var NT=x(Qo=>{"use strict";var D0=Qo&&Qo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Qo,"__esModule",{value:!0});var E0=D0(Ue()),Pp=class{refine(t,e){return t.option.forwardDate&&e.forEach(function(r){let i=E0.default(t.refDate);if(r.start.isOnlyDayMonthComponent()&&i.isAfter(r.start.dayjs()))for(let s=0;s<3&&i.isAfter(r.start.dayjs());s++)r.start.imply("year",r.start.get("year")+1),t.debug(()=>{console.log(`Forward yearly adjusted for ${r} (${r.start})`)}),r.end&&!r.end.isCertain("year")&&(r.end.imply("year",r.end.get("year")+1),t.debug(()=>{console.log(`Forward yearly adjusted for ${r} (${r.end})`)}));r.start.isOnlyWeekdayComponent()&&i.isAfter(r.start.dayjs())&&(i.day()>=r.start.get("weekday")?i=i.day(r.start.get("weekday")+7):i=i.day(r.start.get("weekday")),r.start.imply("day",i.date()),r.start.imply("month",i.month()+1),r.start.imply("year",i.year()),t.debug(()=>{console.log(`Forward weekly adjusted for ${r} (${r.start})`)}),r.end&&r.end.isOnlyWeekdayComponent()&&(i.day()>r.end.get("weekday")?i=i.day(r.end.get("weekday")+7):i=i.day(r.end.get("weekday")),r.end.imply("day",i.date()),r.end.imply("month",i.month()+1),r.end.imply("year",i.year()),t.debug(()=>{console.log(`Forward weekly adjusted for ${r} (${r.end})`)})))}),e}};Qo.default=Pp});var IT=x(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});var x0=wa(),Np=class extends x0.Filter{constructor(t){super(),this.strictMode=t}isValid(t,e){return e.text.replace(" ","").match(/^\d*(\.\d*)?$/)?(t.debug(()=>{console.log(`Removing unlikely result '${e.text}'`)}),!1):e.start.isValidDate()?e.end&&!e.end.isValidDate()?(t.debug(()=>{console.log(`Removing invalid result: ${e} (${e.end})`)}),!1):this.strictMode?this.isStrictModeValid(t,e):!0:(t.debug(()=>{console.log(`Removing invalid result: ${e} (${e.start})`)}),!1)}isStrictModeValid(t,e){return e.start.isOnlyWeekdayComponent()?(t.debug(()=>{console.log(`(Strict) Removing weekday only component: ${e} (${e.end})`)}),!1):e.start.isOnlyTime()&&(!e.start.isCertain("hour")||!e.start.isCertain("minute"))?(t.debug(()=>{console.log(`(Strict) Removing uncertain time component: ${e} (${e.end})`)}),!1):!0}};Ip.default=Np});var Up=x(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});var O0=re(),C0=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"),M0=1,R0=2,A0=3,FT=4,P0=5,LT=6,UT=7,YT=8,jT=9,Fp=class extends O0.AbstractParserWithWordBoundaryChecking{innerPattern(){return C0}innerExtract(t,e){let r={};if(r.year=parseInt(e[M0]),r.month=parseInt(e[R0]),r.day=parseInt(e[A0]),e[FT]!=null)if(r.hour=parseInt(e[FT]),r.minute=parseInt(e[P0]),e[LT]!=null&&(r.second=parseInt(e[LT])),e[UT]!=null&&(r.millisecond=parseInt(e[UT])),e[YT]==null)r.timezoneOffset=0;else{let i=parseInt(e[YT]),s=0;e[jT]!=null&&(s=parseInt(e[jT]));let a=i*60;a<0?a-=s:a+=s,r.timezoneOffset=a}return r}};Lp.default=Fp});var WT=x(jp=>{"use strict";Object.defineProperty(jp,"__esModule",{value:!0});var N0=wa(),Yp=class extends N0.MergingRefiner{mergeResults(t,e,r){let i=r.clone();return i.index=e.index,i.text=e.text+t+i.text,i.start.assign("weekday",e.start.get("weekday")),i.end&&i.end.assign("weekday",e.start.get("weekday")),i}shouldMergeResults(t,e,r){return e.start.isOnlyWeekdayComponent()&&!e.start.isCertain("hour")&&r.start.isCertain("day")&&t.match(/^,?\s*$/)!=null}};jp.default=Yp});var ai=x(Sa=>{"use strict";var _s=Sa&&Sa.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Sa,"__esModule",{value:!0});Sa.includeCommonConfiguration=void 0;var I0=_s(AT()),F0=_s(Qu()),$T=_s(PT()),L0=_s(NT()),U0=_s(IT()),Y0=_s(Up()),j0=_s(WT());function W0(n,t=!1){return n.parsers.unshift(new Y0.default),n.refiners.unshift(new j0.default),n.refiners.unshift(new I0.default),n.refiners.unshift(new F0.default),n.refiners.unshift(new $T.default),n.refiners.push(new $T.default),n.refiners.push(new L0.default),n.refiners.push(new U0.default(t)),n}Sa.includeCommonConfiguration=W0});var li=x(Ge=>{"use strict";var $0=Ge&&Ge.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.noon=Ge.morning=Ge.midnight=Ge.yesterdayEvening=Ge.evening=Ge.lastNight=Ge.tonight=Ge.theDayAfter=Ge.tomorrow=Ge.theDayBefore=Ge.yesterday=Ge.today=Ge.now=void 0;var $r=nt(),Da=$0(Ue()),oi=qn(),Xo=ht();function q0(n){let t=Da.default(n.instant),e=new $r.ParsingComponents(n,{});return oi.assignSimilarDate(e,t),oi.assignSimilarTime(e,t),n.timezoneOffset!==null&&e.assign("timezoneOffset",t.utcOffset()),e}Ge.now=q0;function H0(n){let t=Da.default(n.instant),e=new $r.ParsingComponents(n,{});return oi.assignSimilarDate(e,t),oi.implySimilarTime(e,t),e}Ge.today=H0;function G0(n){return qT(n,1)}Ge.yesterday=G0;function qT(n,t){return Wp(n,-t)}Ge.theDayBefore=qT;function B0(n){return Wp(n,1)}Ge.tomorrow=B0;function Wp(n,t){let e=Da.default(n.instant),r=new $r.ParsingComponents(n,{});return e=e.add(t,"day"),oi.assignSimilarDate(r,e),oi.implySimilarTime(r,e),r}Ge.theDayAfter=Wp;function V0(n,t=22){let e=Da.default(n.instant),r=new $r.ParsingComponents(n,{});return r.imply("hour",t),r.imply("meridiem",Xo.Meridiem.PM),oi.assignSimilarDate(r,e),r}Ge.tonight=V0;function z0(n,t=0){let e=Da.default(n.instant),r=new $r.ParsingComponents(n,{});return e.hour()<6&&(e=e.add(-1,"day")),oi.assignSimilarDate(r,e),r.imply("hour",t),r}Ge.lastNight=z0;function K0(n,t=20){let e=new $r.ParsingComponents(n,{});return e.imply("meridiem",Xo.Meridiem.PM),e.imply("hour",t),e}Ge.evening=K0;function Q0(n,t=20){let e=Da.default(n.instant),r=new $r.ParsingComponents(n,{});return e=e.add(-1,"day"),oi.assignSimilarDate(r,e),r.imply("hour",t),r.imply("meridiem",Xo.Meridiem.PM),r}Ge.yesterdayEvening=Q0;function X0(n){let t=new $r.ParsingComponents(n,{});return t.imply("hour",0),t.imply("minute",0),t.imply("second",0),t}Ge.midnight=X0;function Z0(n,t=6){let e=new $r.ParsingComponents(n,{});return e.imply("meridiem",Xo.Meridiem.AM),e.imply("hour",t),e}Ge.morning=Z0;function J0(n){let t=new $r.ParsingComponents(n,{});return t.imply("meridiem",Xo.Meridiem.AM),t.imply("hour",12),t}Ge.noon=J0});var HT=x(yr=>{"use strict";var e1=yr&&yr.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),t1=yr&&yr.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),n1=yr&&yr.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&e1(t,n,e);return t1(t,n),t},r1=yr&&yr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(yr,"__esModule",{value:!0});var i1=r1(Ue()),s1=re(),a1=qn(),Zo=n1(li()),o1=/(now|today|tonight|tomorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,$p=class extends s1.AbstractParserWithWordBoundaryChecking{innerPattern(t){return o1}innerExtract(t,e){let r=i1.default(t.refDate),i=e[0].toLowerCase(),s=t.createParsingComponents();switch(i){case"now":return Zo.now(t.reference);case"today":return Zo.today(t.reference);case"yesterday":return Zo.yesterday(t.reference);case"tomorrow":case"tmr":case"tmrw":return Zo.tomorrow(t.reference);case"tonight":return Zo.tonight(t.reference);default:i.match(/last\s*night/)&&(r.hour()>6&&(r=r.add(-1,"day")),a1.assignSimilarDate(s,r),s.imply("hour",0));break}return s}};yr.default=$p});var GT=x(Jo=>{"use strict";var l1=Jo&&Jo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Jo,"__esModule",{value:!0});var Xu=ht(),u1=re(),c1=l1(Ue()),d1=qn(),f1=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|noon)(?=\W|$)/i,qp=class extends u1.AbstractParserWithWordBoundaryChecking{innerPattern(){return f1}innerExtract(t,e){let r=c1.default(t.refDate),i=t.createParsingComponents();switch(e[1].toLowerCase()){case"afternoon":i.imply("meridiem",Xu.Meridiem.PM),i.imply("hour",15);break;case"evening":case"night":i.imply("meridiem",Xu.Meridiem.PM),i.imply("hour",20);break;case"midnight":d1.assignTheNextDay(i,r),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"morning":i.imply("meridiem",Xu.Meridiem.AM),i.imply("hour",6);break;case"noon":i.imply("meridiem",Xu.Meridiem.AM),i.imply("hour",12);break}return i}};Jo.default=qp});var vs=x(Fi=>{"use strict";var p1=Fi&&Fi.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Fi,"__esModule",{value:!0});Fi.toDayJSClosestWeekday=Fi.toDayJSWeekday=void 0;var BT=p1(Ue());function m1(n,t,e){if(!e)return VT(n,t);let r=BT.default(n);switch(e){case"this":r=r.day(t);break;case"next":r=r.day(t+7);break;case"last":r=r.day(t-7);break}return r}Fi.toDayJSWeekday=m1;function VT(n,t){let e=BT.default(n),r=e.day();return Math.abs(t-7-r)<Math.abs(t-r)?e=e.day(t-7):Math.abs(t+7-r)<Math.abs(t-r)?e=e.day(t+7):e=e.day(t),e}Fi.toDayJSClosestWeekday=VT});var KT=x(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});var zT=Mt(),h1=Ke(),g1=re(),y1=vs(),b1=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${h1.matchAnyPattern(zT.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|$)`,"i"),T1=1,_1=2,v1=3,Hp=class extends g1.AbstractParserWithWordBoundaryChecking{innerPattern(){return b1}innerExtract(t,e){let r=e[_1].toLowerCase(),i=zT.WEEKDAY_DICTIONARY[r],s=e[T1],a=e[v1],o=s||a;o=o||"",o=o.toLowerCase();let l=null;o=="last"||o=="past"?l="last":o=="next"?l="next":o=="this"&&(l="this");let u=y1.toDayJSWeekday(t.refDate,i,l);return t.createParsingComponents().assign("weekday",i).imply("day",u.date()).imply("month",u.month()+1).imply("year",u.year())}};Gp.default=Hp});var ZT=x(el=>{"use strict";var w1=el&&el.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(el,"__esModule",{value:!0});var XT=Mt(),QT=nt(),k1=w1(Ue()),S1=re(),D1=Ke(),E1=new RegExp(`(this|last|past|next|after\\s*this)\\s*(${D1.matchAnyPattern(XT.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),x1=1,O1=2,Bp=class extends S1.AbstractParserWithWordBoundaryChecking{innerPattern(){return E1}innerExtract(t,e){let r=e[x1].toLowerCase(),i=e[O1].toLowerCase(),s=XT.TIME_UNIT_DICTIONARY[i];if(r=="next"||r.startsWith("after")){let l={};return l[s]=1,QT.ParsingComponents.createRelativeFromReference(t.reference,l)}if(r=="last"||r=="past"){let l={};return l[s]=-1,QT.ParsingComponents.createRelativeFromReference(t.reference,l)}let a=t.createParsingComponents(),o=k1.default(t.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}};el.default=Bp});var br=x(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.ParsingContext=Oa.Chrono=void 0;var Ea=nt(),C1=Vp(),xa=class{constructor(t){t=t||C1.createCasualConfiguration(),this.parsers=[...t.parsers],this.refiners=[...t.refiners]}clone(){return new xa({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(t,e,r){let i=this.parse(t,e,r);return i.length>0?i[0].start.date():null}parse(t,e,r){let i=new Zu(t,e,r),s=[];return this.parsers.forEach(a=>{let o=xa.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(t,e){let r=[],i=e.pattern(t),s=t.text,a=t.text,o=i.exec(a);for(;o;){let l=o.index+s.length-a.length;o.index=l;let u=e.extract(t,o);if(!u){a=s.substring(o.index+1),o=i.exec(a);continue}let c=null;u instanceof Ea.ParsingResult?c=u:u instanceof Ea.ParsingComponents?(c=t.createParsingResult(o.index,o[0]),c.start=u):c=t.createParsingResult(o.index,o[0],u),t.debug(()=>console.log(`${e.constructor.name} extracted result ${c}`)),r.push(c),a=s.substring(l+c.text.length),o=i.exec(a)}return r}};Oa.Chrono=xa;var Zu=class{constructor(t,e,r){this.text=t,this.reference=new Ea.ReferenceWithTimezone(e),this.option=r!=null?r:{},this.refDate=this.reference.instant}createParsingComponents(t){return t instanceof Ea.ParsingComponents?t:new Ea.ParsingComponents(this.reference,t)}createParsingResult(t,e,r,i){let s=typeof e=="string"?e:this.text.substring(t,e),a=r?this.createParsingComponents(r):null,o=i?this.createParsingComponents(i):null;return new Ea.ParsingResult(this.reference,t,s,a,o)}debug(t){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(t):this.option.debug.debug(t))}};Oa.ParsingContext=Zu});var ws=x(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});var JT=Ct(),M1=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"),Ju=1,e_=5,t_=2,n_=3,zp=4,Kp=class{constructor(t){this.groupNumberMonth=t?n_:t_,this.groupNumberDay=t?t_:n_}pattern(){return M1}extract(t,e){if(e[Ju]=="/"||e[e_]=="/"){e.index+=e[0].length;return}let r=e.index+e[Ju].length,i=e[0].substr(e[Ju].length,e[0].length-e[Ju].length-e[e_].length);if(i.match(/^\d\.\d$/)||i.match(/^\d\.\d{1,2}\.\d{1,2}\s*$/)||!e[zp]&&e[0].indexOf("/")<0)return;let s=t.createParsingResult(r,i),a=parseInt(e[this.groupNumberMonth]),o=parseInt(e[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),e[zp]){let l=parseInt(e[zp]),u=JT.findMostLikelyADYear(l);s.start.assign("year",u)}else{let l=JT.findYearClosestToRef(t.refDate,o,a);s.start.imply("year",l)}return s}};Qp.default=Kp});var i_=x(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});var r_=Mt(),R1=nt(),A1=re(),P1=Hn(),N1=new RegExp(`(this|last|past|next|after|\\+|-)\\s*(${r_.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),Xp=class extends A1.AbstractParserWithWordBoundaryChecking{innerPattern(){return N1}innerExtract(t,e){let r=e[1].toLowerCase(),i=r_.parseTimeUnits(e[2]);switch(r){case"last":case"past":case"-":i=P1.reverseTimeUnits(i);break}return R1.ParsingComponents.createRelativeFromReference(t.reference,i)}};Zp.default=Xp});var a_=x(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var I1=wa(),Jp=nt(),F1=Mt(),L1=Hn();function s_(n){return n.text.match(/\s+(before|from)$/i)!=null}function U1(n){return n.text.match(/\s+(after|since)$/i)!=null}var em=class extends I1.MergingRefiner{patternBetween(){return/^\s*$/i}shouldMergeResults(t,e,r){return!t.match(this.patternBetween())||!s_(e)&&!U1(e)?!1:!!r.start.get("day")&&!!r.start.get("month")&&!!r.start.get("year")}mergeResults(t,e,r){let i=F1.parseTimeUnits(e.text);s_(e)&&(i=L1.reverseTimeUnits(i));let s=Jp.ParsingComponents.createRelativeFromReference(new Jp.ReferenceWithTimezone(r.start.date()),i);return new Jp.ParsingResult(r.reference,e.index,`${e.text}${t}${r.text}`,s)}};tm.default=em});var Vp=x(ut=>{"use strict";var bt=ut&&ut.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ut,"__esModule",{value:!0});ut.createConfiguration=ut.createCasualConfiguration=ut.parseDate=ut.parse=ut.GB=ut.strict=ut.casual=void 0;var Y1=bt(sT()),j1=bt(dT()),W1=bt(gT()),$1=bt(TT()),q1=bt(wT()),H1=bt(kT()),G1=bt(DT()),B1=bt(ET()),V1=bt(xT()),z1=bt(OT()),K1=bt(RT()),Q1=ai(),X1=bt(HT()),Z1=bt(GT()),J1=bt(KT()),eC=bt(ZT()),nm=br(),tC=bt(ws()),nC=bt(i_()),rC=bt(a_());ut.casual=new nm.Chrono(o_(!1));ut.strict=new nm.Chrono(ec(!0,!1));ut.GB=new nm.Chrono(ec(!1,!0));function iC(n,t,e){return ut.casual.parse(n,t,e)}ut.parse=iC;function sC(n,t,e){return ut.casual.parseDate(n,t,e)}ut.parseDate=sC;function o_(n=!1){let t=ec(!1,n);return t.parsers.unshift(new X1.default),t.parsers.unshift(new Z1.default),t.parsers.unshift(new $1.default),t.parsers.unshift(new eC.default),t.parsers.unshift(new nC.default),t}ut.createCasualConfiguration=o_;function ec(n=!0,t=!1){return Q1.includeCommonConfiguration({parsers:[new tC.default(t),new Y1.default,new j1.default,new W1.default,new J1.default,new q1.default,new H1.default,new G1.default(n),new B1.default(n),new V1.default(n)],refiners:[new rC.default,new K1.default,new z1.default]},n)}ut.createConfiguration=ec});var l_=x(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var aC=Ts(),rm=class extends aC.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:um|von)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|bis)\\s*"}extractPrimaryTimeComponents(t,e){return e[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(t,e)}};im.default=rm});var tl=x(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.parseTimeUnits=Qe.TIME_UNITS_PATTERN=Qe.parseYear=Qe.YEAR_PATTERN=Qe.parseNumberPattern=Qe.NUMBER_PATTERN=Qe.TIME_UNIT_DICTIONARY=Qe.INTEGER_WORD_DICTIONARY=Qe.MONTH_DICTIONARY=Qe.WEEKDAY_DICTIONARY=void 0;var sm=Ke(),oC=Ct();Qe.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};Qe.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};Qe.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};Qe.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"};Qe.NUMBER_PATTERN=`(?:${sm.matchAnyPattern(Qe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|half(?:\\s*an?)?|an?\\b(?:\\s*few)?|few|several|a?\\s*couple\\s*(?:of)?)`;function c_(n){let t=n.toLowerCase();return Qe.INTEGER_WORD_DICTIONARY[t]!==void 0?Qe.INTEGER_WORD_DICTIONARY[t]:t==="a"||t==="an"?1:t.match(/few/)?3:t.match(/half/)?.5:t.match(/couple/)?2:t.match(/several/)?7:parseFloat(t)}Qe.parseNumberPattern=c_;Qe.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 lC(n){if(/v/i.test(n))return-parseInt(n.replace(/[^0-9]+/gi,""));if(/n/i.test(n))return parseInt(n.replace(/[^0-9]+/gi,""));if(/z/i.test(n))return parseInt(n.replace(/[^0-9]+/gi,""));let t=parseInt(n);return oC.findMostLikelyADYear(t)}Qe.parseYear=lC;var d_=`(${Qe.NUMBER_PATTERN})\\s{0,5}(${sm.matchAnyPattern(Qe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,u_=new RegExp(d_,"i");Qe.TIME_UNITS_PATTERN=sm.repeatedTimeunitPattern("",d_);function uC(n){let t={},e=n,r=u_.exec(e);for(;r;)cC(t,r),e=e.substring(r[0].length),r=u_.exec(e);return t}Qe.parseTimeUnits=uC;function cC(n,t){let e=c_(t[1]),r=Qe.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];n[r]=e}});var p_=x(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var f_=tl(),dC=Ke(),fC=re(),pC=vs(),mC=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:a[mn]\\s*?)?(?:(diese[mn]|letzte[mn]|n(?:\xE4|ae)chste[mn])\\s*)?(${dC.matchAnyPattern(f_.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(diese|letzte|n(?:\xE4|ae)chste)\\s*woche)?(?=\\W|$)`,"i"),hC=1,gC=3,yC=2,am=class extends fC.AbstractParserWithWordBoundaryChecking{innerPattern(){return mC}innerExtract(t,e){let r=e[yC].toLowerCase(),i=f_.WEEKDAY_DICTIONARY[r],s=e[hC],a=e[gC],o=s||a;o=o||"",o=o.toLowerCase();let l=null;o.match(/letzte/)?l="last":o.match(/chste/)?l="next":o.match(/diese/)&&(l="this");let u=pC.toDayJSWeekday(t.refDate,i,l);return t.createParsingComponents().assign("weekday",i).imply("day",u.date()).imply("month",u.month()+1).imply("year",u.year())}};om.default=am});var y_=x(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});var Li=ht(),bC=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"),TC=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"),_C=2,m_=3,h_=4,g_=5,Ca=class{pattern(t){return bC}extract(t,e){let r=t.createParsingResult(e.index+e[1].length,e[0].substring(e[1].length));if(r.text.match(/^\d{4}$/)||(r.start=Ca.extractTimeComponent(r.start.clone(),e),!r.start))return e.index+=e[0].length,null;let i=t.text.substring(e.index+e[0].length),s=TC.exec(i);return s&&(r.end=Ca.extractTimeComponent(r.start.clone(),s),r.end&&(r.text+=s[0])),r}static extractTimeComponent(t,e){let r=0,i=0,s=null;if(r=parseInt(e[_C]),e[m_]!=null&&(i=parseInt(e[m_])),i>=60||r>24)return null;if(r>=12&&(s=Li.Meridiem.PM),e[g_]!=null){if(r>12)return null;let a=e[g_].toLowerCase();a.match(/morgen|vormittag/)&&(s=Li.Meridiem.AM,r==12&&(r=0)),a.match(/nachmittag|abend/)&&(s=Li.Meridiem.PM,r!=12&&(r+=12)),a.match(/nacht/)&&(r==12?(s=Li.Meridiem.AM,r=0):r<6?s=Li.Meridiem.AM:(s=Li.Meridiem.PM,r+=12))}if(t.assign("hour",r),t.assign("minute",i),s!==null?t.assign("meridiem",s):r<12?t.imply("meridiem",Li.Meridiem.AM):t.imply("meridiem",Li.Meridiem.PM),e[h_]!=null){let a=parseInt(e[h_]);if(a>=60)return null;t.assign("second",a)}return t}};lm.default=Ca});var b_=x(nl=>{"use strict";var vC=nl&&nl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(nl,"__esModule",{value:!0});var wC=vC(Wr()),um=class extends wC.default{patternBetween(){return/^\s*(bis(?:\s*(?:am|zum))?|-)\s*$/i}};nl.default=um});var T_=x(rl=>{"use strict";var kC=rl&&rl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(rl,"__esModule",{value:!0});var SC=kC(si()),cm=class extends SC.default{patternBetween(){return new RegExp("^\\s*(T|um|am|,|-)?\\s*$")}};rl.default=cm});var dm=x(sl=>{"use strict";var DC=sl&&sl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(sl,"__esModule",{value:!0});var EC=DC(Ue()),ks=ht(),xC=re(),OC=qn(),CC=Hn(),il=class extends xC.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(diesen)?\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht)(?=\W|$)/i}innerExtract(t,e){let r=EC.default(t.refDate),i=e[2].toLowerCase(),s=t.createParsingComponents();return OC.implySimilarTime(s,r),il.extractTimeComponents(s,i)}static extractTimeComponents(t,e){switch(e){case"morgen":t.imply("hour",6),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ks.Meridiem.AM);break;case"vormittag":t.imply("hour",9),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ks.Meridiem.AM);break;case"mittag":case"mittags":t.imply("hour",12),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ks.Meridiem.AM);break;case"nachmittag":t.imply("hour",15),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ks.Meridiem.PM);break;case"abend":t.imply("hour",18),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ks.Meridiem.PM);break;case"nacht":t.imply("hour",22),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ks.Meridiem.PM);break;case"mitternacht":t.get("hour")>1&&(t=CC.addImpliedTimeUnits(t,{day:1})),t.imply("hour",0),t.imply("minute",0),t.imply("second",0),t.imply("meridiem",ks.Meridiem.AM);break}return t}};sl.default=il});var w_=x(Tr=>{"use strict";var MC=Tr&&Tr.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),RC=Tr&&Tr.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),AC=Tr&&Tr.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&MC(t,n,e);return RC(t,n),t},v_=Tr&&Tr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Tr,"__esModule",{value:!0});var PC=v_(Ue()),NC=re(),Ss=qn(),IC=v_(dm()),__=AC(li()),FC=new RegExp("(jetzt|heute|morgen|\xFCbermorgen|uebermorgen|gestern|vorgestern|letzte\\s*nacht)(?:\\s*(morgen|vormittag|mittags?|nachmittag|abend|nacht|mitternacht))?(?=\\W|$)","i"),LC=1,UC=2,fm=class extends NC.AbstractParserWithWordBoundaryChecking{innerPattern(t){return FC}innerExtract(t,e){let r=PC.default(t.refDate),i=(e[LC]||"").toLowerCase(),s=(e[UC]||"").toLowerCase(),a=t.createParsingComponents();switch(i){case"jetzt":a=__.now(t.reference);break;case"heute":a=__.today(t.reference);break;case"morgen":Ss.assignTheNextDay(a,r);break;case"\xFCbermorgen":case"uebermorgen":r=r.add(1,"day"),Ss.assignTheNextDay(a,r);break;case"gestern":r=r.add(-1,"day"),Ss.assignSimilarDate(a,r),Ss.implySimilarTime(a,r);break;case"vorgestern":r=r.add(-2,"day"),Ss.assignSimilarDate(a,r),Ss.implySimilarTime(a,r);break;default:i.match(/letzte\s*nacht/)&&(r.hour()>6&&(r=r.add(-1,"day")),Ss.assignSimilarDate(a,r),a.imply("hour",0));break}return s&&(a=IC.default.extractTimeComponents(a,s)),a}};Tr.default=fm});var O_=x(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});var YC=Ct(),E_=tl(),x_=tl(),jC=Ke(),WC=re(),$C=new RegExp(`(?:am\\s*?)?(?:den\\s*?)?([0-9]{1,2})\\.(?:\\s*(?:bis(?:\\s*(?:am|zum))?|\\-|\\\u2013|\\s)\\s*([0-9]{1,2})\\.?)?\\s*(${jC.matchAnyPattern(E_.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${x_.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),k_=1,S_=2,qC=3,D_=4,pm=class extends WC.AbstractParserWithWordBoundaryChecking{innerPattern(){return $C}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=E_.MONTH_DICTIONARY[e[qC].toLowerCase()],s=parseInt(e[k_]);if(s>31)return e.index=e.index+e[k_].length,null;if(r.start.assign("month",i),r.start.assign("day",s),e[D_]){let a=x_.parseYear(e[D_]);r.start.assign("year",a)}else{let a=YC.findYearClosestToRef(t.refDate,s,i);r.start.imply("year",a)}if(e[S_]){let a=parseInt(e[S_]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};mm.default=pm});var C_=x(gm=>{"use strict";Object.defineProperty(gm,"__esModule",{value:!0});var tc=tl(),HC=nt(),GC=re(),BC=Hn(),VC=Ke(),hm=class extends GC.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*)?(${tc.NUMBER_PATTERN})?(?:\\s*(n\xE4chste|kommende|folgende|letzte|vergangene|vorige|vor(?:her|an)gegangene)(?:s|n|m|r)?)?\\s*(${VC.matchAnyPattern(tc.TIME_UNIT_DICTIONARY)})`,"i")}innerExtract(t,e){let r=e[2]?tc.parseNumberPattern(e[2]):1,i=tc.TIME_UNIT_DICTIONARY[e[4].toLowerCase()],s={};s[i]=r;let a=e[1]||e[3]||"";if(a=a.toLowerCase(),!!a)return(/vor/.test(a)||/letzte/.test(a)||/vergangen/.test(a))&&(s=BC.reverseTimeUnits(s)),HC.ParsingComponents.createRelativeFromReference(t.reference,s)}};gm.default=hm});var A_=x(Tt=>{"use strict";var _r=Tt&&Tt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.createConfiguration=Tt.createCasualConfiguration=Tt.parseDate=Tt.parse=Tt.strict=Tt.casual=void 0;var zC=ai(),M_=br(),KC=_r(ws()),QC=_r(Up()),XC=_r(l_()),ZC=_r(p_()),JC=_r(y_()),eM=_r(b_()),tM=_r(T_()),nM=_r(w_()),rM=_r(dm()),iM=_r(O_()),sM=_r(C_());Tt.casual=new M_.Chrono(R_());Tt.strict=new M_.Chrono(ym(!0));function aM(n,t,e){return Tt.casual.parse(n,t,e)}Tt.parse=aM;function oM(n,t,e){return Tt.casual.parseDate(n,t,e)}Tt.parseDate=oM;function R_(n=!0){let t=ym(!1,n);return t.parsers.unshift(new rM.default),t.parsers.unshift(new nM.default),t.parsers.unshift(new sM.default),t}Tt.createCasualConfiguration=R_;function ym(n=!0,t=!0){return zC.includeCommonConfiguration({parsers:[new QC.default,new KC.default(t),new XC.default,new JC.default,new iM.default,new ZC.default],refiners:[new eM.default,new tM.default]},n)}Tt.createConfiguration=ym});var N_=x(vr=>{"use strict";var lM=vr&&vr.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),uM=vr&&vr.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),cM=vr&&vr.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&lM(t,n,e);return uM(t,n),t},dM=vr&&vr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(vr,"__esModule",{value:!0});var fM=dM(Ue()),pM=ht(),mM=re(),P_=qn(),nc=cM(li()),bm=class extends mM.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(maintenant|aujourd'hui|demain|hier|cette\s*nuit|la\s*veille)(?=\W|$)/i}innerExtract(t,e){let r=fM.default(t.refDate),i=e[0].toLowerCase(),s=t.createParsingComponents();switch(i){case"maintenant":return nc.now(t.reference);case"aujourd'hui":return nc.today(t.reference);case"hier":return nc.yesterday(t.reference);case"demain":return nc.tomorrow(t.reference);default:i.match(/cette\s*nuit/)?(P_.assignSimilarDate(s,r),s.imply("hour",22),s.imply("meridiem",pM.Meridiem.PM)):i.match(/la\s*veille/)&&(r=r.add(-1,"day"),P_.assignSimilarDate(s,r),s.imply("hour",0))}return s}};vr.default=bm});var I_=x(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});var al=ht(),hM=re(),Tm=class extends hM.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(cet?)?\s*(matin|soir|après-midi|aprem|a midi|à minuit)(?=\W|$)/i}innerExtract(t,e){let r=e[2].toLowerCase(),i=t.createParsingComponents();switch(r){case"apr\xE8s-midi":case"aprem":i.imply("hour",14),i.imply("minute",0),i.imply("meridiem",al.Meridiem.PM);break;case"soir":i.imply("hour",18),i.imply("minute",0),i.imply("meridiem",al.Meridiem.PM);break;case"matin":i.imply("hour",8),i.imply("minute",0),i.imply("meridiem",al.Meridiem.AM);break;case"a midi":i.imply("hour",12),i.imply("minute",0),i.imply("meridiem",al.Meridiem.AM);break;case"\xE0 minuit":i.imply("hour",0),i.imply("meridiem",al.Meridiem.AM);break}return i}};_m.default=Tm});var F_=x(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});var gM=Ts(),vm=class extends gM.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:[\xE0a])\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|[\xE0a]|\\?)\\s*"}extractPrimaryTimeComponents(t,e){return e[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(t,e)}};wm.default=vm});var L_=x(ol=>{"use strict";var yM=ol&&ol.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ol,"__esModule",{value:!0});var bM=yM(si()),km=class extends bM.default{patternBetween(){return new RegExp("^\\s*(T|\xE0|a|vers|de|,|-)?\\s*$")}};ol.default=km});var U_=x(ll=>{"use strict";var TM=ll&&ll.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ll,"__esModule",{value:!0});var _M=TM(Wr()),Sm=class extends _M.default{patternBetween(){return/^\s*(à|a|-)\s*$/i}};ll.default=Sm});var Ui=x(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.parseTimeUnits=Ye.TIME_UNITS_PATTERN=Ye.parseYear=Ye.YEAR_PATTERN=Ye.parseOrdinalNumberPattern=Ye.ORDINAL_NUMBER_PATTERN=Ye.parseNumberPattern=Ye.NUMBER_PATTERN=Ye.TIME_UNIT_DICTIONARY=Ye.INTEGER_WORD_DICTIONARY=Ye.MONTH_DICTIONARY=Ye.WEEKDAY_DICTIONARY=void 0;var Dm=Ke();Ye.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};Ye.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};Ye.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};Ye.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"};Ye.NUMBER_PATTERN=`(?:${Dm.matchAnyPattern(Ye.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+\\.[0-9]+|une?\\b|quelques?|demi-?)`;function j_(n){let t=n.toLowerCase();return Ye.INTEGER_WORD_DICTIONARY[t]!==void 0?Ye.INTEGER_WORD_DICTIONARY[t]:t==="une"||t==="un"?1:t.match(/quelques?/)?3:t.match(/demi-?/)?.5:parseFloat(t)}Ye.parseNumberPattern=j_;Ye.ORDINAL_NUMBER_PATTERN="(?:[0-9]{1,2}(?:er)?)";function vM(n){let t=n.toLowerCase();return t=t.replace(/(?:er)$/i,""),parseInt(t)}Ye.parseOrdinalNumberPattern=vM;Ye.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 wM(n){if(/AC/i.test(n))return n=n.replace(/BC/i,""),-parseInt(n);if(/AD/i.test(n)||/C/i.test(n))return n=n.replace(/[^\d]+/i,""),parseInt(n);let t=parseInt(n);return t<100&&(t>50?t=t+1900:t=t+2e3),t}Ye.parseYear=wM;var W_=`(${Ye.NUMBER_PATTERN})\\s{0,5}(${Dm.matchAnyPattern(Ye.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Y_=new RegExp(W_,"i");Ye.TIME_UNITS_PATTERN=Dm.repeatedTimeunitPattern("",W_);function kM(n){let t={},e=n,r=Y_.exec(e);for(;r;)SM(t,r),e=e.substring(r[0].length),r=Y_.exec(e);return t}Ye.parseTimeUnits=kM;function SM(n,t){let e=j_(t[1]),r=Ye.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];n[r]=e}});var q_=x(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var $_=Ui(),DM=Ke(),EM=re(),xM=vs(),OM=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(?:ce)\\s*)?(${DM.matchAnyPattern($_.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(dernier|prochain)\\s*)?(?=\\W|\\d|$)`,"i"),CM=1,MM=2,Em=class extends EM.AbstractParserWithWordBoundaryChecking{innerPattern(){return OM}innerExtract(t,e){let r=e[CM].toLowerCase(),i=$_.WEEKDAY_DICTIONARY[r];if(i===void 0)return null;let s=e[MM];s=s||"",s=s.toLowerCase();let a=null;s=="dernier"?a="last":s=="prochain"&&(a="next");let o=xM.toDayJSWeekday(t.refDate,i,a);return t.createParsingComponents().assign("weekday",i).imply("day",o.date()).imply("month",o.month()+1).imply("year",o.year())}};xm.default=Em});var V_=x(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});var ul=ht(),RM=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"),AM=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"),PM=2,H_=3,G_=4,B_=5,Ma=class{pattern(t){return RM}extract(t,e){let r=t.createParsingResult(e.index+e[1].length,e[0].substring(e[1].length));if(r.text.match(/^\d{4}$/)||(r.start=Ma.extractTimeComponent(r.start.clone(),e),!r.start))return e.index+=e[0].length,null;let i=t.text.substring(e.index+e[0].length),s=AM.exec(i);return s&&(r.end=Ma.extractTimeComponent(r.start.clone(),s),r.end&&(r.text+=s[0])),r}static extractTimeComponent(t,e){let r=0,i=0,s=null;if(r=parseInt(e[PM]),e[H_]!=null&&(i=parseInt(e[H_])),i>=60||r>24)return null;if(r>=12&&(s=ul.Meridiem.PM),e[B_]!=null){if(r>12)return null;let a=e[B_][0].toLowerCase();a=="a"&&(s=ul.Meridiem.AM,r==12&&(r=0)),a=="p"&&(s=ul.Meridiem.PM,r!=12&&(r+=12))}if(t.assign("hour",r),t.assign("minute",i),s!==null?t.assign("meridiem",s):r<12?t.imply("meridiem",ul.Meridiem.AM):t.imply("meridiem",ul.Meridiem.PM),e[G_]!=null){let a=parseInt(e[G_]);if(a>=60)return null;t.assign("second",a)}return t}};Om.default=Ma});var J_=x(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});var NM=Ct(),X_=Ui(),Z_=Ui(),rc=Ui(),IM=Ke(),FM=re(),LM=new RegExp(`(?:on\\s*?)?(${rc.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:au|\\-|\\\u2013|jusqu'au?|\\s)\\s*(${rc.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:de)?\\s*)(${IM.matchAnyPattern(X_.MONTH_DICTIONARY)})(?:(?:-|/|,?\\s*)(${Z_.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),z_=1,K_=2,UM=3,Q_=4,Cm=class extends FM.AbstractParserWithWordBoundaryChecking{innerPattern(){return LM}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=X_.MONTH_DICTIONARY[e[UM].toLowerCase()],s=rc.parseOrdinalNumberPattern(e[z_]);if(s>31)return e.index=e.index+e[z_].length,null;if(r.start.assign("month",i),r.start.assign("day",s),e[Q_]){let a=Z_.parseYear(e[Q_]);r.start.assign("year",a)}else{let a=NM.findYearClosestToRef(t.refDate,s,i);r.start.imply("year",a)}if(e[K_]){let a=rc.parseOrdinalNumberPattern(e[K_]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};Mm.default=Cm});var tv=x(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});var ev=Ui(),YM=nt(),jM=re(),WM=Hn(),Rm=class extends jM.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`il y a\\s*(${ev.TIME_UNITS_PATTERN})(?=(?:\\W|$))`,"i")}innerExtract(t,e){let r=ev.parseTimeUnits(e[1]),i=WM.reverseTimeUnits(r);return YM.ParsingComponents.createRelativeFromReference(t.reference,i)}};Am.default=Rm});var rv=x(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var nv=Ui(),$M=nt(),qM=re(),Pm=class extends qM.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp(`(?:dans|en|pour|pendant|de)\\s*(${nv.TIME_UNITS_PATTERN})(?=\\W|$)`,"i")}innerExtract(t,e){let r=nv.parseTimeUnits(e[1]);return $M.ParsingComponents.createRelativeFromReference(t.reference,r)}};Nm.default=Pm});var iv=x(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});var ic=Ui(),HM=nt(),GM=re(),BM=Hn(),VM=Ke(),Im=class extends GM.AbstractParserWithWordBoundaryChecking{constructor(){super()}innerPattern(){return new RegExp(`(?:les?|la|l'|du|des?)\\s*(${ic.NUMBER_PATTERN})?(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?\\s*(${VM.matchAnyPattern(ic.TIME_UNIT_DICTIONARY)})(?:\\s*(prochaine?s?|derni[e\xE8]re?s?|pass[\xE9e]e?s?|pr[\xE9e]c[\xE9e]dents?|suivante?s?))?`,"i")}innerExtract(t,e){let r=e[1]?ic.parseNumberPattern(e[1]):1,i=ic.TIME_UNIT_DICTIONARY[e[3].toLowerCase()],s={};s[i]=r;let a=e[2]||e[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=BM.reverseTimeUnits(s)),HM.ParsingComponents.createRelativeFromReference(t.reference,s)}};Fm.default=Im});var ov=x(_t=>{"use strict";var Gn=_t&&_t.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(_t,"__esModule",{value:!0});_t.createConfiguration=_t.createCasualConfiguration=_t.parseDate=_t.parse=_t.strict=_t.casual=void 0;var zM=ai(),sv=br(),KM=Gn(N_()),QM=Gn(I_()),XM=Gn(ws()),ZM=Gn(F_()),JM=Gn(L_()),eR=Gn(U_()),tR=Gn(q_()),nR=Gn(V_()),rR=Gn(J_()),iR=Gn(tv()),sR=Gn(rv()),aR=Gn(iv());_t.casual=new sv.Chrono(av());_t.strict=new sv.Chrono(Lm(!0));function oR(n,t,e){return _t.casual.parse(n,t,e)}_t.parse=oR;function lR(n,t,e){return _t.casual.parseDate(n,t,e)}_t.parseDate=lR;function av(n=!0){let t=Lm(!1,n);return t.parsers.unshift(new KM.default),t.parsers.unshift(new QM.default),t.parsers.unshift(new aR.default),t}_t.createCasualConfiguration=av;function Lm(n=!0,t=!0){return zM.includeCommonConfiguration({parsers:[new XM.default(t),new rR.default,new ZM.default,new nR.default,new iR.default,new sR.default,new tR.default],refiners:[new JM.default,new eR.default]},n)}_t.createConfiguration=Lm});var lv=x(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});sc.toHankaku=void 0;function uR(n){return String(n).replace(/\u2019/g,"'").replace(/\u201D/g,'"').replace(/\u3000/g," ").replace(/\uFFE5/g,"\xA5").replace(/[\uFF01\uFF03-\uFF06\uFF08\uFF09\uFF0C-\uFF19\uFF1C-\uFF1F\uFF21-\uFF3B\uFF3D\uFF3F\uFF41-\uFF5B\uFF5D\uFF5E]/g,cR)}sc.toHankaku=uR;function cR(n){return String.fromCharCode(n.charCodeAt(0)-65248)}});var cv=x(cl=>{"use strict";var dR=cl&&cl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(cl,"__esModule",{value:!0});var Um=lv(),fR=Ct(),pR=dR(Ue()),mR=/(?:(?:([同今本])|((昭和|平成|令和)?([0-90-9]{1,4}|元)))年\s*)?([0-90-9]{1,2})月\s*([0-90-9]{1,2})日/i,uv=1,hR=2,Ym=3,gR=4,yR=5,bR=6,jm=class{pattern(){return mR}extract(t,e){let r=parseInt(Um.toHankaku(e[yR])),i=parseInt(Um.toHankaku(e[bR])),s=t.createParsingComponents({day:i,month:r});if(e[uv]&&e[uv].match("\u540C|\u4ECA|\u672C")){let a=pR.default(t.refDate);s.assign("year",a.year())}if(e[hR]){let a=e[gR],o=a=="\u5143"?1:parseInt(Um.toHankaku(a));e[Ym]=="\u4EE4\u548C"?o+=2018:e[Ym]=="\u5E73\u6210"?o+=1988:e[Ym]=="\u662D\u548C"&&(o+=1925),s.assign("year",o)}else{let a=fR.findYearClosestToRef(t.refDate,i,r);s.imply("year",a)}return s}};cl.default=jm});var dv=x(dl=>{"use strict";var TR=dl&&dl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(dl,"__esModule",{value:!0});var _R=TR(Wr()),Wm=class extends _R.default{patternBetween(){return/^\s*(から|ー|-)\s*$/i}};dl.default=Wm});var pv=x(wr=>{"use strict";var vR=wr&&wr.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),wR=wr&&wr.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),kR=wr&&wr.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&vR(t,n,e);return wR(t,n),t},SR=wr&&wr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(wr,"__esModule",{value:!0});var DR=SR(Ue()),fv=ht(),$m=kR(li()),ER=/今日|当日|昨日|明日|今夜|今夕|今晩|今朝/i,qm=class{pattern(){return ER}extract(t,e){let r=e[0],i=DR.default(t.refDate),s=t.createParsingComponents();switch(r){case"\u6628\u65E5":return $m.yesterday(t.reference);case"\u660E\u65E5":return $m.tomorrow(t.reference);case"\u4ECA\u65E5":case"\u5F53\u65E5":return $m.today(t.reference)}return r=="\u4ECA\u591C"||r=="\u4ECA\u5915"||r=="\u4ECA\u6669"?(s.imply("hour",22),s.assign("meridiem",fv.Meridiem.PM)):r.match("\u4ECA\u671D")&&(s.imply("hour",6),s.assign("meridiem",fv.Meridiem.AM)),s.assign("day",i.date()),s.assign("month",i.month()+1),s.assign("year",i.year()),s}};wr.default=qm});var gv=x(vt=>{"use strict";var Hm=vt&&vt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(vt,"__esModule",{value:!0});vt.createConfiguration=vt.createCasualConfiguration=vt.parseDate=vt.parse=vt.strict=vt.casual=void 0;var xR=Hm(cv()),OR=Hm(dv()),CR=Hm(pv()),mv=br();vt.casual=new mv.Chrono(hv());vt.strict=new mv.Chrono(Gm());function MR(n,t,e){return vt.casual.parse(n,t,e)}vt.parse=MR;function RR(n,t,e){return vt.casual.parseDate(n,t,e)}vt.parseDate=RR;function hv(){let n=Gm();return n.parsers.unshift(new CR.default),n}vt.createCasualConfiguration=hv;function Gm(){return{parsers:[new xR.default],refiners:[new OR.default]}}vt.createConfiguration=Gm});var ac=x(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.parseYear=qr.YEAR_PATTERN=qr.MONTH_DICTIONARY=qr.WEEKDAY_DICTIONARY=void 0;qr.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};qr.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};qr.YEAR_PATTERN="[0-9]{1,4}(?![^\\s]\\d)(?:\\s*[a|d]\\.?\\s*c\\.?|\\s*a\\.?\\s*d\\.?)?";function AR(n){if(n.match(/^[0-9]{1,4}$/)){let t=parseInt(n);return t<100&&(t>50?t=t+1900:t=t+2e3),t}return n.match(/a\.?\s*c\.?/i)?(n=n.replace(/a\.?\s*c\.?/i,""),-parseInt(n)):parseInt(n)}qr.parseYear=AR});var bv=x(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0});var yv=ac(),PR=Ke(),NR=re(),IR=vs(),FR=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:(este|esta|passado|pr[o\xF3]ximo)\\s*)?(${PR.matchAnyPattern(yv.WEEKDAY_DICTIONARY)})(?:\\s*(?:\\,|\\)|\\\uFF09))?(?:\\s*(este|esta|passado|pr[\xF3o]ximo)\\s*semana)?(?=\\W|\\d|$)`,"i"),LR=1,UR=2,YR=3,Bm=class extends NR.AbstractParserWithWordBoundaryChecking{innerPattern(){return FR}innerExtract(t,e){let r=e[UR].toLowerCase(),i=yv.WEEKDAY_DICTIONARY[r];if(i===void 0)return null;let s=e[LR],a=e[YR],o=s||a||"";o=o.toLowerCase();let l=null;o=="passado"?l="this":o=="pr\xF3ximo"||o=="proximo"?l="next":o=="este"&&(l="this");let u=IR.toDayJSWeekday(t.refDate,i,l);return t.createParsingComponents().assign("weekday",i).imply("day",u.date()).imply("month",u.month()+1).imply("year",u.year())}};Vm.default=Bm});var Tv=x(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});var jR=Ts(),zm=class extends jR.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:ao?|\xE0s?|das|da|de|do)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|a(?:o)?|\\?)\\s*"}};Km.default=zm});var _v=x(fl=>{"use strict";var WR=fl&&fl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(fl,"__esModule",{value:!0});var $R=WR(si()),Qm=class extends $R.default{patternBetween(){return new RegExp("^\\s*(?:,|\xE0)?\\s*$")}};fl.default=Qm});var vv=x(pl=>{"use strict";var qR=pl&&pl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(pl,"__esModule",{value:!0});var HR=qR(Wr()),Xm=class extends HR.default{patternBetween(){return/^\s*(?:-)\s*$/i}};pl.default=Xm});var xv=x(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});var GR=Ct(),Dv=ac(),Ev=ac(),BR=Ke(),VR=re(),zR=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*)(${BR.matchAnyPattern(Dv.MONTH_DICTIONARY)})(?:\\s*(?:de|,)?\\s*(${Ev.YEAR_PATTERN}))?(?=\\W|$)`,"i"),wv=1,kv=2,KR=3,Sv=4,Zm=class extends VR.AbstractParserWithWordBoundaryChecking{innerPattern(){return zR}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=Dv.MONTH_DICTIONARY[e[KR].toLowerCase()],s=parseInt(e[wv]);if(s>31)return e.index=e.index+e[wv].length,null;if(r.start.assign("month",i),r.start.assign("day",s),e[Sv]){let a=Ev.parseYear(e[Sv]);r.start.assign("year",a)}else{let a=GR.findYearClosestToRef(t.refDate,s,i);r.start.imply("year",a)}if(e[kv]){let a=parseInt(e[kv]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};Jm.default=Zm});var Ov=x(ui=>{"use strict";var QR=ui&&ui.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),XR=ui&&ui.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),ZR=ui&&ui.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&QR(t,n,e);return XR(t,n),t};Object.defineProperty(ui,"__esModule",{value:!0});var JR=re(),oc=ZR(li()),eh=class extends JR.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(agora|hoje|amanha|amanhã|ontem)(?=\W|$)/i}innerExtract(t,e){let r=e[0].toLowerCase(),i=t.createParsingComponents();switch(r){case"agora":return oc.now(t.reference);case"hoje":return oc.today(t.reference);case"amanha":case"amanh\xE3":return oc.tomorrow(t.reference);case"ontem":return oc.yesterday(t.reference)}return i}};ui.default=eh});var Cv=x(ml=>{"use strict";var eA=ml&&ml.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ml,"__esModule",{value:!0});var lc=ht(),tA=re(),nA=qn(),rA=eA(Ue()),th=class extends tA.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(?:esta\s*)?(manha|manhã|tarde|meia-noite|meio-dia|noite)(?=\W|$)/i}innerExtract(t,e){let r=rA.default(t.refDate),i=t.createParsingComponents();switch(e[1].toLowerCase()){case"tarde":i.imply("meridiem",lc.Meridiem.PM),i.imply("hour",15);break;case"noite":i.imply("meridiem",lc.Meridiem.PM),i.imply("hour",22);break;case"manha":case"manh\xE3":i.imply("meridiem",lc.Meridiem.AM),i.imply("hour",6);break;case"meia-noite":nA.assignTheNextDay(i,r),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"meio-dia":i.imply("meridiem",lc.Meridiem.AM),i.imply("hour",12);break}return i}};ml.default=th});var Av=x(wt=>{"use strict";var Yi=wt&&wt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(wt,"__esModule",{value:!0});wt.createConfiguration=wt.createCasualConfiguration=wt.parseDate=wt.parse=wt.strict=wt.casual=void 0;var iA=ai(),Mv=br(),sA=Yi(ws()),aA=Yi(bv()),oA=Yi(Tv()),lA=Yi(_v()),uA=Yi(vv()),cA=Yi(xv()),dA=Yi(Ov()),fA=Yi(Cv());wt.casual=new Mv.Chrono(Rv());wt.strict=new Mv.Chrono(nh(!0));function pA(n,t,e){return wt.casual.parse(n,t,e)}wt.parse=pA;function mA(n,t,e){return wt.casual.parseDate(n,t,e)}wt.parseDate=mA;function Rv(n=!0){let t=nh(!1,n);return t.parsers.push(new dA.default),t.parsers.push(new fA.default),t}wt.createCasualConfiguration=Rv;function nh(n=!0,t=!0){return iA.includeCommonConfiguration({parsers:[new sA.default(t),new aA.default,new oA.default,new cA.default],refiners:[new lA.default,new uA.default]},n)}wt.createConfiguration=nh});var Pv=x(hl=>{"use strict";var hA=hl&&hl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(hl,"__esModule",{value:!0});var gA=hA(Wr()),rh=class extends gA.default{patternBetween(){return/^\s*(tot|-)\s*$/i}};hl.default=rh});var Nv=x(gl=>{"use strict";var yA=gl&&gl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(gl,"__esModule",{value:!0});var bA=yA(si()),ih=class extends bA.default{patternBetween(){return new RegExp("^\\s*(om|na|voor|in de|,|-)?\\s*$")}};gl.default=ih});var Iv=x(ci=>{"use strict";var TA=ci&&ci.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),_A=ci&&ci.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),vA=ci&&ci.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&TA(t,n,e);return _A(t,n),t};Object.defineProperty(ci,"__esModule",{value:!0});var wA=re(),uc=vA(li()),sh=class extends wA.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(nu|vandaag|morgen|morgend|gisteren)(?=\W|$)/i}innerExtract(t,e){let r=e[0].toLowerCase(),i=t.createParsingComponents();switch(r){case"nu":return uc.now(t.reference);case"vandaag":return uc.today(t.reference);case"morgen":case"morgend":return uc.tomorrow(t.reference);case"gisteren":return uc.yesterday(t.reference)}return i}};ci.default=sh});var Fv=x(yl=>{"use strict";var kA=yl&&yl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(yl,"__esModule",{value:!0});var cc=ht(),SA=re(),DA=kA(Ue()),EA=qn(),xA=1,OA=2,ah=class extends SA.AbstractParserWithWordBoundaryChecking{innerPattern(){return/(deze)?\s*(namiddag|avond|middernacht|ochtend|middag|'s middags|'s avonds|'s ochtends)(?=\W|$)/i}innerExtract(t,e){let r=DA.default(t.refDate),i=t.createParsingComponents();switch(e[xA]==="deze"&&(i.assign("day",t.refDate.getDate()),i.assign("month",t.refDate.getMonth()+1),i.assign("year",t.refDate.getFullYear())),e[OA].toLowerCase()){case"namiddag":case"'s namiddags":i.imply("meridiem",cc.Meridiem.PM),i.imply("hour",15);break;case"avond":case"'s avonds'":i.imply("meridiem",cc.Meridiem.PM),i.imply("hour",20);break;case"middernacht":EA.assignTheNextDay(i,r),i.imply("hour",0),i.imply("minute",0),i.imply("second",0);break;case"ochtend":case"'s ochtends":i.imply("meridiem",cc.Meridiem.AM),i.imply("hour",6);break;case"middag":case"'s middags":i.imply("meridiem",cc.Meridiem.AM),i.imply("hour",12);break}return i}};yl.default=ah});var kn=x(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.parseTimeUnits=Pe.TIME_UNITS_PATTERN=Pe.parseYear=Pe.YEAR_PATTERN=Pe.parseOrdinalNumberPattern=Pe.ORDINAL_NUMBER_PATTERN=Pe.parseNumberPattern=Pe.NUMBER_PATTERN=Pe.TIME_UNIT_DICTIONARY=Pe.ORDINAL_WORD_DICTIONARY=Pe.INTEGER_WORD_DICTIONARY=Pe.MONTH_DICTIONARY=Pe.WEEKDAY_DICTIONARY=void 0;var dc=Ke(),CA=Ct();Pe.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};Pe.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};Pe.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};Pe.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};Pe.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"};Pe.NUMBER_PATTERN=`(?:${dc.matchAnyPattern(Pe.INTEGER_WORD_DICTIONARY)}|[0-9]+|[0-9]+[\\.,][0-9]+|halve?|half|paar)`;function Uv(n){let t=n.toLowerCase();return Pe.INTEGER_WORD_DICTIONARY[t]!==void 0?Pe.INTEGER_WORD_DICTIONARY[t]:t==="paar"?2:t==="half"||t.match(/halve?/)?.5:parseFloat(t.replace(",","."))}Pe.parseNumberPattern=Uv;Pe.ORDINAL_NUMBER_PATTERN=`(?:${dc.matchAnyPattern(Pe.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:ste|de)?)`;function MA(n){let t=n.toLowerCase();return Pe.ORDINAL_WORD_DICTIONARY[t]!==void 0?Pe.ORDINAL_WORD_DICTIONARY[t]:(t=t.replace(/(?:ste|de)$/i,""),parseInt(t))}Pe.parseOrdinalNumberPattern=MA;Pe.YEAR_PATTERN="(?:[1-9][0-9]{0,3}\\s*(?:voor Christus|na Christus)|[1-2][0-9]{3}|[5-9][0-9])";function RA(n){if(/voor Christus/i.test(n))return n=n.replace(/voor Christus/i,""),-parseInt(n);if(/na Christus/i.test(n))return n=n.replace(/na Christus/i,""),parseInt(n);let t=parseInt(n);return CA.findMostLikelyADYear(t)}Pe.parseYear=RA;var Yv=`(${Pe.NUMBER_PATTERN})\\s{0,5}(${dc.matchAnyPattern(Pe.TIME_UNIT_DICTIONARY)})\\s{0,5}`,Lv=new RegExp(Yv,"i");Pe.TIME_UNITS_PATTERN=dc.repeatedTimeunitPattern("(?:(?:binnen|in)\\s*)?",Yv);function AA(n){let t={},e=n,r=Lv.exec(e);for(;r;)PA(t,r),e=e.substring(r[0].length),r=Lv.exec(e);return t}Pe.parseTimeUnits=AA;function PA(n,t){let e=Uv(t[1]),r=Pe.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];n[r]=e}});var Wv=x(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});var jv=kn(),NA=nt(),IA=re(),oh=class extends IA.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(?:binnen|in|binnen de|voor)\\s*("+jv.TIME_UNITS_PATTERN+")(?=\\W|$)","i")}innerExtract(t,e){let r=jv.parseTimeUnits(e[1]);return NA.ParsingComponents.createRelativeFromReference(t.reference,r)}};lh.default=oh});var qv=x(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});var $v=kn(),FA=Ke(),LA=re(),UA=vs(),YA=new RegExp(`(?:(?:\\,|\\(|\\\uFF08)\\s*)?(?:op\\s*?)?(?:(deze|vorige|volgende)\\s*(?:week\\s*)?)?(${FA.matchAnyPattern($v.WEEKDAY_DICTIONARY)})(?=\\W|$)`,"i"),jA=1,WA=2,$A=3,uh=class extends LA.AbstractParserWithWordBoundaryChecking{innerPattern(){return YA}innerExtract(t,e){let r=e[WA].toLowerCase(),i=$v.WEEKDAY_DICTIONARY[r],s=e[jA],a=e[$A],o=s||a;o=o||"",o=o.toLowerCase();let l=null;o=="vorige"?l="last":o=="volgende"?l="next":o=="deze"&&(l="this");let u=UA.toDayJSWeekday(t.refDate,i,l);return t.createParsingComponents().assign("weekday",i).imply("day",u.date()).imply("month",u.month()+1).imply("year",u.year())}};ch.default=uh});var Kv=x(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});var qA=Ct(),Vv=kn(),fc=kn(),zv=kn(),HA=Ke(),GA=re(),BA=new RegExp(`(?:on\\s*?)?(${fc.ORDINAL_NUMBER_PATTERN})(?:\\s*(?:tot|\\-|\\\u2013|until|through|till|\\s)\\s*(${fc.ORDINAL_NUMBER_PATTERN}))?(?:-|/|\\s*(?:of)?\\s*)(`+HA.matchAnyPattern(Vv.MONTH_DICTIONARY)+`)(?:(?:-|/|,?\\s*)(${zv.YEAR_PATTERN}(?![^\\s]\\d)))?(?=\\W|$)`,"i"),VA=3,Hv=1,Gv=2,Bv=4,dh=class extends GA.AbstractParserWithWordBoundaryChecking{innerPattern(){return BA}innerExtract(t,e){let r=Vv.MONTH_DICTIONARY[e[VA].toLowerCase()],i=fc.parseOrdinalNumberPattern(e[Hv]);if(i>31)return e.index=e.index+e[Hv].length,null;let s=t.createParsingComponents({day:i,month:r});if(e[Bv]){let l=zv.parseYear(e[Bv]);s.assign("year",l)}else{let l=qA.findYearClosestToRef(t.refDate,i,r);s.imply("year",l)}if(!e[Gv])return s;let a=fc.parseOrdinalNumberPattern(e[Gv]),o=t.createParsingResult(e.index,e[0]);return o.start=s,o.end=s.clone(),o.end.assign("day",a),o}};fh.default=dh});var Jv=x(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});var Xv=kn(),zA=Ct(),KA=Ke(),Zv=kn(),QA=re(),XA=new RegExp(`(${KA.matchAnyPattern(Xv.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${Zv.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,"i"),ZA=1,Qv=2,ph=class extends QA.AbstractParserWithWordBoundaryChecking{innerPattern(){return XA}innerExtract(t,e){let r=t.createParsingComponents();r.imply("day",1);let i=e[ZA],s=Xv.MONTH_DICTIONARY[i.toLowerCase()];if(r.assign("month",s),e[Qv]){let a=Zv.parseYear(e[Qv]);r.assign("year",a)}else{let a=zA.findYearClosestToRef(t.refDate,1,s);r.imply("year",a)}return r}};mh.default=ph});var ew=x(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});var JA=re(),eP=new RegExp("([0-9]|0[1-9]|1[012])/([0-9]{4})","i"),tP=1,nP=2,hh=class extends JA.AbstractParserWithWordBoundaryChecking{innerPattern(){return eP}innerExtract(t,e){let r=parseInt(e[nP]),i=parseInt(e[tP]);return t.createParsingComponents().imply("day",1).assign("month",i).assign("year",r)}};gh.default=hh});var tw=x(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});var rP=Ts(),yh=class extends rP.AbstractTimeExpressionParser{primaryPrefix(){return"(?:(?:om)\\s*)?"}followingPhase(){return"\\s*(?:\\-|\\\u2013|\\~|\\\u301C|om|\\?)\\s*"}primarySuffix(){return"(?:\\s*(?:uur))?(?!/)(?=\\W|$)"}extractPrimaryTimeComponents(t,e){return e[0].match(/^\s*\d{4}\s*$/)?null:super.extractPrimaryTimeComponents(t,e)}};bh.default=yh});var iw=x(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});var rw=kn(),iP=Ke(),sP=re(),aP=new RegExp(`([0-9]{4})[\\.\\/\\s](?:(${iP.matchAnyPattern(rw.MONTH_DICTIONARY)})|([0-9]{1,2}))[\\.\\/\\s]([0-9]{1,2})(?=\\W|$)`,"i"),oP=1,lP=2,nw=3,uP=4,Th=class extends sP.AbstractParserWithWordBoundaryChecking{innerPattern(){return aP}innerExtract(t,e){let r=e[nw]?parseInt(e[nw]):rw.MONTH_DICTIONARY[e[lP].toLowerCase()];if(r<1||r>12)return null;let i=parseInt(e[oP]);return{day:parseInt(e[uP]),month:r,year:i}}};_h.default=Th});var sw=x(bl=>{"use strict";var cP=bl&&bl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(bl,"__esModule",{value:!0});var dP=re(),pc=ht(),vh=qn(),fP=cP(Ue()),pP=1,mP=2,wh=class extends dP.AbstractParserWithWordBoundaryChecking{innerPattern(t){return/(gisteren|morgen|van)(ochtend|middag|namiddag|avond|nacht)(?=\W|$)/i}innerExtract(t,e){let r=e[pP].toLowerCase(),i=e[mP].toLowerCase(),s=t.createParsingComponents(),a=fP.default(t.refDate);switch(r){case"gisteren":vh.assignSimilarDate(s,a.add(-1,"day"));break;case"van":vh.assignSimilarDate(s,a);break;case"morgen":vh.assignTheNextDay(s,a);break}switch(i){case"ochtend":s.imply("meridiem",pc.Meridiem.AM),s.imply("hour",6);break;case"middag":s.imply("meridiem",pc.Meridiem.AM),s.imply("hour",12);break;case"namiddag":s.imply("meridiem",pc.Meridiem.PM),s.imply("hour",15);break;case"avond":s.imply("meridiem",pc.Meridiem.PM),s.imply("hour",20);break}return s}};bl.default=wh});var ow=x(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});var aw=kn(),hP=nt(),gP=re(),yP=Hn(),bP=new RegExp(`(deze|vorige|afgelopen|komende|over|\\+|-)\\s*(${aw.TIME_UNITS_PATTERN})(?=\\W|$)`,"i"),kh=class extends gP.AbstractParserWithWordBoundaryChecking{innerPattern(){return bP}innerExtract(t,e){let r=e[1].toLowerCase(),i=aw.parseTimeUnits(e[2]);switch(r){case"vorige":case"afgelopen":case"-":i=yP.reverseTimeUnits(i);break}return hP.ParsingComponents.createRelativeFromReference(t.reference,i)}};Sh.default=kh});var cw=x(Tl=>{"use strict";var TP=Tl&&Tl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Tl,"__esModule",{value:!0});var uw=kn(),lw=nt(),_P=TP(Ue()),vP=re(),wP=Ke(),kP=new RegExp(`(dit|deze|komende|volgend|volgende|afgelopen|vorige)\\s*(${wP.matchAnyPattern(uw.TIME_UNIT_DICTIONARY)})(?=\\s*)(?=\\W|$)`,"i"),SP=1,DP=2,Dh=class extends vP.AbstractParserWithWordBoundaryChecking{innerPattern(){return kP}innerExtract(t,e){let r=e[SP].toLowerCase(),i=e[DP].toLowerCase(),s=uw.TIME_UNIT_DICTIONARY[i];if(r=="volgend"||r=="volgende"||r=="komende"){let l={};return l[s]=1,lw.ParsingComponents.createRelativeFromReference(t.reference,l)}if(r=="afgelopen"||r=="vorige"){let l={};return l[s]=-1,lw.ParsingComponents.createRelativeFromReference(t.reference,l)}let a=t.createParsingComponents(),o=_P.default(t.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}};Tl.default=Dh});var dw=x(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var xh=kn(),EP=nt(),xP=re(),OP=Hn(),CP=new RegExp("("+xh.TIME_UNITS_PATTERN+")(?:geleden|voor|eerder)(?=(?:\\W|$))","i"),MP=new RegExp("("+xh.TIME_UNITS_PATTERN+")geleden(?=(?:\\W|$))","i"),Eh=class extends xP.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?MP:CP}innerExtract(t,e){let r=xh.parseTimeUnits(e[1]),i=OP.reverseTimeUnits(r);return EP.ParsingComponents.createRelativeFromReference(t.reference,i)}};Oh.default=Eh});var fw=x(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});var Mh=kn(),RP=nt(),AP=re(),PP=new RegExp("("+Mh.TIME_UNITS_PATTERN+")(later|na|vanaf nu|voortaan|vooruit|uit)(?=(?:\\W|$))","i"),NP=new RegExp("("+Mh.TIME_UNITS_PATTERN+")(later|vanaf nu)(?=(?:\\W|$))","i"),IP=1,Ch=class extends AP.AbstractParserWithWordBoundaryChecking{constructor(t){super(),this.strictMode=t}innerPattern(){return this.strictMode?NP:PP}innerExtract(t,e){let r=Mh.parseTimeUnits(e[IP]);return RP.ParsingComponents.createRelativeFromReference(t.reference,r)}};Rh.default=Ch});var gw=x(kt=>{"use strict";var Rt=kt&&kt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(kt,"__esModule",{value:!0});kt.createConfiguration=kt.createCasualConfiguration=kt.parseDate=kt.parse=kt.strict=kt.casual=void 0;var FP=ai(),pw=br(),LP=Rt(Pv()),UP=Rt(Nv()),YP=Rt(Iv()),jP=Rt(Fv()),WP=Rt(ws()),$P=Rt(Wv()),qP=Rt(qv()),HP=Rt(Kv()),mw=Rt(Jv()),GP=Rt(ew()),BP=Rt(tw()),VP=Rt(iw()),zP=Rt(sw()),KP=Rt(ow()),QP=Rt(cw()),XP=Rt(dw()),ZP=Rt(fw());kt.casual=new pw.Chrono(hw());kt.strict=new pw.Chrono(Ah(!0));function JP(n,t,e){return kt.casual.parse(n,t,e)}kt.parse=JP;function eN(n,t,e){return kt.casual.parseDate(n,t,e)}kt.parseDate=eN;function hw(n=!0){let t=Ah(!1,n);return t.parsers.unshift(new YP.default),t.parsers.unshift(new jP.default),t.parsers.unshift(new zP.default),t.parsers.unshift(new mw.default),t.parsers.unshift(new QP.default),t.parsers.unshift(new KP.default),t}kt.createCasualConfiguration=hw;function Ah(n=!0,t=!0){return FP.includeCommonConfiguration({parsers:[new WP.default(t),new $P.default,new HP.default,new mw.default,new qP.default,new VP.default,new GP.default,new BP.default(n),new XP.default(n),new ZP.default(n)],refiners:[new UP.default,new LP.default]},n)}kt.createConfiguration=Ah});var _w=x(_l=>{"use strict";var tN=_l&&_l.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(_l,"__esModule",{value:!0});var nN=tN(Ue()),rN=re(),iN=1,yw=2,sN=3,bw=4,Tw=5,aN=6,Ph=class extends rN.AbstractParserWithWordBoundaryChecking{innerPattern(t){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(t,e){let r=e.index,i=t.createParsingResult(r,e[0]),s=nN.default(t.refDate),a=s;if(e[iN])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(e[yw]){let o=e[yw],l=e[sN];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")),l=="\u65E9"||l=="\u671D"?i.start.imply("hour",6):l=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(e[bw]){let l=e[bw][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)}else if(e[Tw]){let o=e[Tw];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 l=e[aN];if(l){let u=l[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)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};_l.default=Ph});var Ra=x(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.zhStringToYear=un.zhStringToNumber=un.WEEKDAY_OFFSET=un.NUMBER=void 0;un.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};un.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function oN(n){let t=0;for(let e=0;e<n.length;e++){let r=n[e];r==="\u5341"?t=t===0?un.NUMBER[r]:t*un.NUMBER[r]:t+=un.NUMBER[r]}return t}un.zhStringToNumber=oN;function lN(n){let t="";for(let e=0;e<n.length;e++){let r=n[e];t=t+un.NUMBER[r]}return parseInt(t)}un.zhStringToYear=lN});var ww=x(vl=>{"use strict";var uN=vl&&vl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(vl,"__esModule",{value:!0});var cN=uN(Ue()),dN=re(),Ds=Ra(),Nh=1,vw=2,Ih=3,Fh=class extends dN.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Ds.NUMBER).join("")+"]{4}|["+Object.keys(Ds.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Ds.NUMBER).join("")+"]{1,2})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Ds.NUMBER).join("")+"]{1,2})?(?:\\s*)(?:\u65E5|\u865F)?")}innerExtract(t,e){let r=cN.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=parseInt(e[vw]);if(isNaN(s)&&(s=Ds.zhStringToNumber(e[vw])),i.start.assign("month",s),e[Ih]){let a=parseInt(e[Ih]);isNaN(a)&&(a=Ds.zhStringToNumber(e[Ih])),i.start.assign("day",a)}else i.start.imply("day",r.date());if(e[Nh]){let a=parseInt(e[Nh]);isNaN(a)&&(a=Ds.zhStringToYear(e[Nh])),i.start.assign("year",a)}else i.start.imply("year",r.year());return i}};vl.default=Fh});var Sw=x(wl=>{"use strict";var fN=wl&&wl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(wl,"__esModule",{value:!0});var pN=fN(Ue()),mN=re(),kw=Ra(),hN=new RegExp("(\\d+|["+Object.keys(kw.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"),Lh=1,gN=2,Uh=class extends mN.AbstractParserWithWordBoundaryChecking{innerPattern(){return hN}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=parseInt(e[Lh]);if(isNaN(i)&&(i=kw.zhStringToNumber(e[Lh])),isNaN(i)){let l=e[Lh];if(l==="\u5E7E")i=3;else if(l==="\u534A")i=.5;else return null}let s=pN.default(t.refDate),o=e[gN][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")),r.start.assign("year",s.year()),r.start.assign("month",s.month()+1),r.start.assign("day",s.date()),r):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u9418")&&(s=s.add(i,"hour")),r.start.imply("year",s.year()),r.start.imply("month",s.month()+1),r.start.imply("day",s.date()),r.start.assign("hour",s.hour()),r.start.assign("minute",s.minute()),r.start.assign("second",s.second()),r)}};wl.default=Uh});var Ew=x(kl=>{"use strict";var yN=kl&&kl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(kl,"__esModule",{value:!0});var bN=yN(Ue()),TN=re(),Dw=Ra(),_N=new RegExp("(?<prefix>\u4E0A|\u4ECA|\u4E0B|\u9019|\u5462)(?:\u500B)?(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(Dw.WEEKDAY_OFFSET).join("|")+")"),Yh=class extends TN.AbstractParserWithWordBoundaryChecking{innerPattern(){return _N}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=Dw.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=e.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":(o=="\u4ECA"||o=="\u9019"||o=="\u5462")&&(a="this");let l=bN.default(t.refDate),u=!1,c=l.day();return a=="last"||a=="past"?(l=l.day(s-7),u=!0):a=="next"?(l=l.day(s+7),u=!0):a=="this"?l=l.day(s):Math.abs(s-7-c)<Math.abs(s-c)?l=l.day(s-7):Math.abs(s+7-c)<Math.abs(s-c)?l=l.day(s+7):l=l.day(s),r.start.assign("weekday",s),u?(r.start.assign("day",l.date()),r.start.assign("month",l.month()+1),r.start.assign("year",l.year())):(r.start.imply("day",l.date()),r.start.imply("month",l.month()+1),r.start.imply("year",l.year())),r}};kl.default=Yh});var xw=x(Sl=>{"use strict";var vN=Sl&&Sl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Sl,"__esModule",{value:!0});var wN=vN(Ue()),kN=re(),Vn=Ra(),SN=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(Vn.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Vn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Vn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),DN=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(Vn.NUMBER).join("")+"]+)(?:\\s*)(?:\u9EDE|\u6642|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Vn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Vn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),mc=1,hc=2,gc=3,yc=4,bc=5,Tc=6,Bn=7,Aa=8,_c=9,jh=class extends kN.AbstractParserWithWordBoundaryChecking{innerPattern(){return SN}innerExtract(t,e){if(e.index>0&&t.text[e.index-1].match(/\w/))return null;let r=wN.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=r.clone();if(e[mc]){var a=e[mc];a=="\u660E"||a=="\u807D"?r.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(e[yc]){var o=e[yc];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 l=0,u=0,c=-1;if(e[Aa]){var d=parseInt(e[Aa]);if(isNaN(d)&&(d=Vn.zhStringToNumber(e[Aa])),d>=60)return null;i.start.assign("second",d)}if(l=parseInt(e[Tc]),isNaN(l)&&(l=Vn.zhStringToNumber(e[Tc])),e[Bn]?e[Bn]=="\u534A"?u=30:e[Bn]=="\u6B63"||e[Bn]=="\u6574"?u=0:(u=parseInt(e[Bn]),isNaN(u)&&(u=Vn.zhStringToNumber(e[Bn]))):l>100&&(u=l%100,l=Math.floor(l/100)),u>=60||l>24)return null;if(l>=12&&(c=1),e[_c]){if(l>12)return null;var f=e[_c][0].toLowerCase();f=="a"&&(c=0,l==12&&(l=0)),f=="p"&&(c=1,l!=12&&(l+=12))}else if(e[hc]){var p=e[hc],b=p[0];b=="\u671D"||b=="\u65E9"?(c=0,l==12&&(l=0)):b=="\u665A"&&(c=1,l!=12&&(l+=12))}else if(e[gc]){var T=e[gc],_=T[0];_=="\u4E0A"||_=="\u671D"||_=="\u65E9"||_=="\u51CC"?(c=0,l==12&&(l=0)):(_=="\u4E0B"||_=="\u664F"||_=="\u665A")&&(c=1,l!=12&&(l+=12))}else if(e[bc]){var O=e[bc],E=O[0];E=="\u4E0A"||E=="\u671D"||E=="\u65E9"||E=="\u51CC"?(c=0,l==12&&(l=0)):(E=="\u4E0B"||E=="\u664F"||E=="\u665A")&&(c=1,l!=12&&(l+=12))}if(i.start.assign("hour",l),i.start.assign("minute",u),c>=0?i.start.assign("meridiem",c):l<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),e=DN.exec(t.text.substring(i.index+i.text.length)),!e)return i.text.match(/^\d+$/)?null:i;let A=s.clone();if(i.end=t.createParsingComponents(),e[mc]){var a=e[mc];a=="\u660E"||a=="\u807D"?r.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(e[yc]){var o=e[yc];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(l=0,u=0,c=-1,e[Aa]){var d=parseInt(e[Aa]);if(isNaN(d)&&(d=Vn.zhStringToNumber(e[Aa])),d>=60)return null;i.end.assign("second",d)}if(l=parseInt(e[Tc]),isNaN(l)&&(l=Vn.zhStringToNumber(e[Tc])),e[Bn]?e[Bn]=="\u534A"?u=30:e[Bn]=="\u6B63"||e[Bn]=="\u6574"?u=0:(u=parseInt(e[Bn]),isNaN(u)&&(u=Vn.zhStringToNumber(e[Bn]))):l>100&&(u=l%100,l=Math.floor(l/100)),u>=60||l>24)return null;if(l>=12&&(c=1),e[_c]){if(l>12)return null;var f=e[_c][0].toLowerCase();f=="a"&&(c=0,l==12&&(l=0)),f=="p"&&(c=1,l!=12&&(l+=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(e[hc]){var p=e[hc],b=p[0];b=="\u671D"||b=="\u65E9"?(c=0,l==12&&(l=0)):b=="\u665A"&&(c=1,l!=12&&(l+=12))}else if(e[gc]){var T=e[gc],_=T[0];_=="\u4E0A"||_=="\u671D"||_=="\u65E9"||_=="\u51CC"?(c=0,l==12&&(l=0)):(_=="\u4E0B"||_=="\u664F"||_=="\u665A")&&(c=1,l!=12&&(l+=12))}else if(e[bc]){var O=e[bc],E=O[0];E=="\u4E0A"||E=="\u671D"||E=="\u65E9"||E=="\u51CC"?(c=0,l==12&&(l=0)):(E=="\u4E0B"||E=="\u664F"||E=="\u665A")&&(c=1,l!=12&&(l+=12))}return i.text=i.text+e[0],i.end.assign("hour",l),i.end.assign("minute",u),c>=0?i.end.assign("meridiem",c):i.start.isCertain("meridiem")&&i.start.get("meridiem")==1&&i.start.get("hour")>l?i.end.imply("meridiem",0):l>12&&i.end.imply("meridiem",1),i.end.date().getTime()<i.start.date().getTime()&&i.end.imply("day",i.end.get("day")+1),i}};Sl.default=jh});var Cw=x(Dl=>{"use strict";var EN=Dl&&Dl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Dl,"__esModule",{value:!0});var xN=EN(Ue()),ON=re(),Ow=Ra(),CN=new RegExp("(?:\u661F\u671F|\u79AE\u62DC|\u9031)(?<weekday>"+Object.keys(Ow.WEEKDAY_OFFSET).join("|")+")"),Wh=class extends ON.AbstractParserWithWordBoundaryChecking{innerPattern(){return CN}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=Ow.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=xN.default(t.refDate),o=!1,l=a.day();return Math.abs(s-7-l)<Math.abs(s-l)?a=a.day(s-7):Math.abs(s+7-l)<Math.abs(s-l)?a=a.day(s+7):a=a.day(s),r.start.assign("weekday",s),o?(r.start.assign("day",a.date()),r.start.assign("month",a.month()+1),r.start.assign("year",a.year())):(r.start.imply("day",a.date()),r.start.imply("month",a.month()+1),r.start.imply("year",a.year())),r}};Dl.default=Wh});var Mw=x(El=>{"use strict";var MN=El&&El.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(El,"__esModule",{value:!0});var RN=MN(Wr()),$h=class extends RN.default{patternBetween(){return/^\s*(至|到|\-|\~|~|-|ー)\s*$/i}};El.default=$h});var Rw=x(xl=>{"use strict";var AN=xl&&xl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(xl,"__esModule",{value:!0});var PN=AN(si()),qh=class extends PN.default{patternBetween(){return/^\s*$/i}};xl.default=qh});var Aw=x(ct=>{"use strict";var di=ct&&ct.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(ct,"__esModule",{value:!0});ct.createConfiguration=ct.createCasualConfiguration=ct.parseDate=ct.parse=ct.strict=ct.casual=ct.hant=void 0;var Hh=br(),NN=di(Qu()),IN=ai(),FN=di(_w()),LN=di(ww()),UN=di(Sw()),YN=di(Ew()),jN=di(xw()),WN=di(Cw()),$N=di(Mw()),qN=di(Rw());ct.hant=new Hh.Chrono(Gh());ct.casual=new Hh.Chrono(Gh());ct.strict=new Hh.Chrono(Bh());function HN(n,t,e){return ct.casual.parse(n,t,e)}ct.parse=HN;function GN(n,t,e){return ct.casual.parseDate(n,t,e)}ct.parseDate=GN;function Gh(){let n=Bh();return n.parsers.unshift(new FN.default),n}ct.createCasualConfiguration=Gh;function Bh(){let n=IN.includeCommonConfiguration({parsers:[new LN.default,new YN.default,new WN.default,new jN.default,new UN.default],refiners:[new $N.default,new qN.default]});return n.refiners=n.refiners.filter(t=>!(t instanceof NN.default)),n}ct.createConfiguration=Bh});var Fw=x(Ol=>{"use strict";var BN=Ol&&Ol.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ol,"__esModule",{value:!0});var VN=BN(Ue()),zN=re(),KN=1,Pw=2,QN=3,Nw=4,Iw=5,XN=6,Vh=class extends zN.AbstractParserWithWordBoundaryChecking{innerPattern(t){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(t,e){let r=e.index,i=t.createParsingResult(r,e[0]),s=VN.default(t.refDate),a=s;if(e[KN])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(e[Pw]){let o=e[Pw],l=e[QN];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")),l=="\u65E9"?i.start.imply("hour",6):l=="\u665A"&&(i.start.imply("hour",22),i.start.imply("meridiem",1))}else if(e[Nw]){let l=e[Nw][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)}else if(e[Iw]){let o=e[Iw];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 l=e[XN];if(l){let u=l[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)}}return i.start.assign("day",a.date()),i.start.assign("month",a.month()+1),i.start.assign("year",a.year()),i}};Ol.default=Vh});var Pa=x(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.zhStringToYear=cn.zhStringToNumber=cn.WEEKDAY_OFFSET=cn.NUMBER=void 0;cn.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};cn.WEEKDAY_OFFSET={\u5929:0,\u65E5:0,\u4E00:1,\u4E8C:2,\u4E09:3,\u56DB:4,\u4E94:5,\u516D:6};function ZN(n){let t=0;for(let e=0;e<n.length;e++){let r=n[e];r==="\u5341"?t=t===0?cn.NUMBER[r]:t*cn.NUMBER[r]:t+=cn.NUMBER[r]}return t}cn.zhStringToNumber=ZN;function JN(n){let t="";for(let e=0;e<n.length;e++){let r=n[e];t=t+cn.NUMBER[r]}return parseInt(t)}cn.zhStringToYear=JN});var Uw=x(Cl=>{"use strict";var eI=Cl&&Cl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Cl,"__esModule",{value:!0});var tI=eI(Ue()),nI=re(),Es=Pa(),zh=1,Lw=2,Kh=3,Qh=class extends nI.AbstractParserWithWordBoundaryChecking{innerPattern(){return new RegExp("(\\d{2,4}|["+Object.keys(Es.NUMBER).join("")+"]{4}|["+Object.keys(Es.NUMBER).join("")+"]{2})?(?:\\s*)(?:\u5E74)?(?:[\\s|,|\uFF0C]*)(\\d{1,2}|["+Object.keys(Es.NUMBER).join("")+"]{1,3})(?:\\s*)(?:\u6708)(?:\\s*)(\\d{1,2}|["+Object.keys(Es.NUMBER).join("")+"]{1,3})?(?:\\s*)(?:\u65E5|\u53F7)?")}innerExtract(t,e){let r=tI.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=parseInt(e[Lw]);if(isNaN(s)&&(s=Es.zhStringToNumber(e[Lw])),i.start.assign("month",s),e[Kh]){let a=parseInt(e[Kh]);isNaN(a)&&(a=Es.zhStringToNumber(e[Kh])),i.start.assign("day",a)}else i.start.imply("day",r.date());if(e[zh]){let a=parseInt(e[zh]);isNaN(a)&&(a=Es.zhStringToYear(e[zh])),i.start.assign("year",a)}else i.start.imply("year",r.year());return i}};Cl.default=Qh});var jw=x(Ml=>{"use strict";var rI=Ml&&Ml.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ml,"__esModule",{value:!0});var iI=rI(Ue()),sI=re(),Yw=Pa(),aI=new RegExp("(\\d+|["+Object.keys(Yw.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"),Xh=1,oI=2,Zh=class extends sI.AbstractParserWithWordBoundaryChecking{innerPattern(){return aI}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=parseInt(e[Xh]);if(isNaN(i)&&(i=Yw.zhStringToNumber(e[Xh])),isNaN(i)){let l=e[Xh];if(l==="\u51E0")i=3;else if(l==="\u534A")i=.5;else return null}let s=iI.default(t.refDate),o=e[oI][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")),r.start.assign("year",s.year()),r.start.assign("month",s.month()+1),r.start.assign("day",s.date()),r):(o=="\u79D2"?s=s.add(i,"second"):o=="\u5206"?s=s.add(i,"minute"):(o=="\u5C0F"||o=="\u949F")&&(s=s.add(i,"hour")),r.start.imply("year",s.year()),r.start.imply("month",s.month()+1),r.start.imply("day",s.date()),r.start.assign("hour",s.hour()),r.start.assign("minute",s.minute()),r.start.assign("second",s.second()),r)}};Ml.default=Zh});var $w=x(Rl=>{"use strict";var lI=Rl&&Rl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Rl,"__esModule",{value:!0});var uI=lI(Ue()),cI=re(),Ww=Pa(),dI=new RegExp("(?<prefix>\u4E0A|\u4E0B|\u8FD9)(?:\u4E2A)?(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(Ww.WEEKDAY_OFFSET).join("|")+")"),Jh=class extends cI.AbstractParserWithWordBoundaryChecking{innerPattern(){return dI}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=Ww.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=null,o=e.groups.prefix;o=="\u4E0A"?a="last":o=="\u4E0B"?a="next":o=="\u8FD9"&&(a="this");let l=uI.default(t.refDate),u=!1,c=l.day();return a=="last"||a=="past"?(l=l.day(s-7),u=!0):a=="next"?(l=l.day(s+7),u=!0):a=="this"?l=l.day(s):Math.abs(s-7-c)<Math.abs(s-c)?l=l.day(s-7):Math.abs(s+7-c)<Math.abs(s-c)?l=l.day(s+7):l=l.day(s),r.start.assign("weekday",s),u?(r.start.assign("day",l.date()),r.start.assign("month",l.month()+1),r.start.assign("year",l.year())):(r.start.imply("day",l.date()),r.start.imply("month",l.month()+1),r.start.imply("year",l.year())),r}};Rl.default=Jh});var qw=x(Al=>{"use strict";var fI=Al&&Al.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Al,"__esModule",{value:!0});var pI=fI(Ue()),mI=re(),Kn=Pa(),hI=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(Kn.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Kn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Kn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),gI=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(Kn.NUMBER).join("")+"]+)(?:\\s*)(?:\u70B9|\u65F6|:|\uFF1A)(?:\\s*)(\\d+|\u534A|\u6B63|\u6574|["+Object.keys(Kn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u5206|:|\uFF1A)?(?:\\s*)(\\d+|["+Object.keys(Kn.NUMBER).join("")+"]+)?(?:\\s*)(?:\u79D2)?)(?:\\s*(A.M.|P.M.|AM?|PM?))?","i"),vc=1,wc=2,kc=3,Sc=4,Dc=5,Ec=6,zn=7,Na=8,xc=9,eg=class extends mI.AbstractParserWithWordBoundaryChecking{innerPattern(){return hI}innerExtract(t,e){if(e.index>0&&t.text[e.index-1].match(/\w/))return null;let r=pI.default(t.refDate),i=t.createParsingResult(e.index,e[0]),s=r.clone();if(e[vc]){let c=e[vc];c=="\u660E"?r.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(e[Sc]){let c=e[Sc];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,l=-1;if(e[Na]){let c=parseInt(e[Na]);if(isNaN(c)&&(c=Kn.zhStringToNumber(e[Na])),c>=60)return null;i.start.assign("second",c)}if(a=parseInt(e[Ec]),isNaN(a)&&(a=Kn.zhStringToNumber(e[Ec])),e[zn]?e[zn]=="\u534A"?o=30:e[zn]=="\u6B63"||e[zn]=="\u6574"?o=0:(o=parseInt(e[zn]),isNaN(o)&&(o=Kn.zhStringToNumber(e[zn]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(l=1),e[xc]){if(a>12)return null;let c=e[xc][0].toLowerCase();c=="a"&&(l=0,a==12&&(a=0)),c=="p"&&(l=1,a!=12&&(a+=12))}else if(e[wc]){let d=e[wc][0];d=="\u65E9"?(l=0,a==12&&(a=0)):d=="\u665A"&&(l=1,a!=12&&(a+=12))}else if(e[kc]){let d=e[kc][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(l=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(l=1,a!=12&&(a+=12))}else if(e[Dc]){let d=e[Dc][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(l=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(l=1,a!=12&&(a+=12))}if(i.start.assign("hour",a),i.start.assign("minute",o),l>=0?i.start.assign("meridiem",l):a<12?i.start.imply("meridiem",0):i.start.imply("meridiem",1),e=gI.exec(t.text.substring(i.index+i.text.length)),!e)return i.text.match(/^\d+$/)?null:i;let u=s.clone();if(i.end=t.createParsingComponents(),e[vc]){let c=e[vc];c=="\u660E"?r.hour()>1&&u.add(1,"day"):c=="\u6628"?u.add(-1,"day"):c=="\u524D"?u.add(-2,"day"):c=="\u5927\u524D"?u.add(-3,"day"):c=="\u540E"?u.add(2,"day"):c=="\u5927\u540E"&&u.add(3,"day"),i.end.assign("day",u.date()),i.end.assign("month",u.month()+1),i.end.assign("year",u.year())}else if(e[Sc]){let c=e[Sc];c=="\u660E"?u.add(1,"day"):c=="\u6628"?u.add(-1,"day"):c=="\u524D"?u.add(-2,"day"):c=="\u5927\u524D"?u.add(-3,"day"):c=="\u540E"?u.add(2,"day"):c=="\u5927\u540E"&&u.add(3,"day"),i.end.assign("day",u.date()),i.end.assign("month",u.month()+1),i.end.assign("year",u.year())}else i.end.imply("day",u.date()),i.end.imply("month",u.month()+1),i.end.imply("year",u.year());if(a=0,o=0,l=-1,e[Na]){let c=parseInt(e[Na]);if(isNaN(c)&&(c=Kn.zhStringToNumber(e[Na])),c>=60)return null;i.end.assign("second",c)}if(a=parseInt(e[Ec]),isNaN(a)&&(a=Kn.zhStringToNumber(e[Ec])),e[zn]?e[zn]=="\u534A"?o=30:e[zn]=="\u6B63"||e[zn]=="\u6574"?o=0:(o=parseInt(e[zn]),isNaN(o)&&(o=Kn.zhStringToNumber(e[zn]))):a>100&&(o=a%100,a=Math.floor(a/100)),o>=60||a>24)return null;if(a>=12&&(l=1),e[xc]){if(a>12)return null;let c=e[xc][0].toLowerCase();c=="a"&&(l=0,a==12&&(a=0)),c=="p"&&(l=1,a!=12&&(a+=12)),i.start.isCertain("meridiem")||(l==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(e[wc]){let d=e[wc][0];d=="\u65E9"?(l=0,a==12&&(a=0)):d=="\u665A"&&(l=1,a!=12&&(a+=12))}else if(e[kc]){let d=e[kc][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(l=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(l=1,a!=12&&(a+=12))}else if(e[Dc]){let d=e[Dc][0];d=="\u4E0A"||d=="\u65E9"||d=="\u51CC"?(l=0,a==12&&(a=0)):(d=="\u4E0B"||d=="\u665A")&&(l=1,a!=12&&(a+=12))}return i.text=i.text+e[0],i.end.assign("hour",a),i.end.assign("minute",o),l>=0?i.end.assign("meridiem",l):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()<i.start.date().getTime()&&i.end.imply("day",i.end.get("day")+1),i}};Al.default=eg});var Gw=x(Pl=>{"use strict";var yI=Pl&&Pl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Pl,"__esModule",{value:!0});var bI=yI(Ue()),TI=re(),Hw=Pa(),_I=new RegExp("(?:\u661F\u671F|\u793C\u62DC|\u5468)(?<weekday>"+Object.keys(Hw.WEEKDAY_OFFSET).join("|")+")"),tg=class extends TI.AbstractParserWithWordBoundaryChecking{innerPattern(){return _I}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=e.groups.weekday,s=Hw.WEEKDAY_OFFSET[i];if(s===void 0)return null;let a=bI.default(t.refDate),o=!1,l=a.day();return Math.abs(s-7-l)<Math.abs(s-l)?a=a.day(s-7):Math.abs(s+7-l)<Math.abs(s-l)?a=a.day(s+7):a=a.day(s),r.start.assign("weekday",s),o?(r.start.assign("day",a.date()),r.start.assign("month",a.month()+1),r.start.assign("year",a.year())):(r.start.imply("day",a.date()),r.start.imply("month",a.month()+1),r.start.imply("year",a.year())),r}};Pl.default=tg});var Bw=x(Nl=>{"use strict";var vI=Nl&&Nl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Nl,"__esModule",{value:!0});var wI=vI(Wr()),ng=class extends wI.default{patternBetween(){return/^\s*(至|到|-|~|~|-|ー)\s*$/i}};Nl.default=ng});var Vw=x(Il=>{"use strict";var kI=Il&&Il.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Il,"__esModule",{value:!0});var SI=kI(si()),rg=class extends SI.default{patternBetween(){return/^\s*$/i}};Il.default=rg});var zw=x(dt=>{"use strict";var fi=dt&&dt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(dt,"__esModule",{value:!0});dt.createConfiguration=dt.createCasualConfiguration=dt.parseDate=dt.parse=dt.strict=dt.casual=dt.hans=void 0;var ig=br(),DI=fi(Qu()),EI=ai(),xI=fi(Fw()),OI=fi(Uw()),CI=fi(jw()),MI=fi($w()),RI=fi(qw()),AI=fi(Gw()),PI=fi(Bw()),NI=fi(Vw());dt.hans=new ig.Chrono(sg());dt.casual=new ig.Chrono(sg());dt.strict=new ig.Chrono(ag());function II(n,t,e){return dt.casual.parse(n,t,e)}dt.parse=II;function FI(n,t,e){return dt.casual.parseDate(n,t,e)}dt.parseDate=FI;function sg(){let n=ag();return n.parsers.unshift(new xI.default),n}dt.createCasualConfiguration=sg;function ag(){let n=EI.includeCommonConfiguration({parsers:[new OI.default,new MI.default,new AI.default,new RI.default,new CI.default],refiners:[new PI.default,new NI.default]});return n.refiners=n.refiners.filter(t=>!(t instanceof DI.default)),n}dt.createConfiguration=ag});var Qw=x(Sn=>{"use strict";var Kw=Sn&&Sn.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),LI=Sn&&Sn.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),UI=Sn&&Sn.__exportStar||function(n,t){for(var e in n)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Kw(t,n,e)},YI=Sn&&Sn.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&Kw(t,n,e);return LI(t,n),t};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.hans=void 0;UI(Aw(),Sn);Sn.hans=YI(zw())});var dn=x(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.parseTimeUnits=Se.TIME_UNITS_PATTERN=Se.parseYear=Se.YEAR_PATTERN=Se.parseOrdinalNumberPattern=Se.ORDINAL_NUMBER_PATTERN=Se.parseNumberPattern=Se.NUMBER_PATTERN=Se.TIME_UNIT_DICTIONARY=Se.ORDINAL_WORD_DICTIONARY=Se.INTEGER_WORD_DICTIONARY=Se.MONTH_DICTIONARY=Se.FULL_MONTH_NAME_DICTIONARY=Se.WEEKDAY_DICTIONARY=Se.REGEX_PARTS=void 0;var Oc=Ke(),jI=Ct();Se.REGEX_PARTS={leftBoundary:"([^\\p{L}\\p{N}_]|^)",rightBoundary:"(?=[^\\p{L}\\p{N}_]|$)",flags:"iu"};Se.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};Se.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};Se.MONTH_DICTIONARY=Object.assign(Object.assign({},Se.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});Se.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};Se.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};Se.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"};Se.NUMBER_PATTERN=`(?:${Oc.matchAnyPattern(Se.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 Zw(n){let t=n.toLowerCase();return Se.INTEGER_WORD_DICTIONARY[t]!==void 0?Se.INTEGER_WORD_DICTIONARY[t]:t.match(/несколько/)?3:t.match(/пол/)?.5:t.match(/пар/)?2:t===""?1:parseFloat(t)}Se.parseNumberPattern=Zw;Se.ORDINAL_NUMBER_PATTERN=`(?:${Oc.matchAnyPattern(Se.ORDINAL_WORD_DICTIONARY)}|[0-9]{1,2}(?:\u0433\u043E|\u043E\u0433\u043E|\u0435|\u043E\u0435)?)`;function WI(n){let t=n.toLowerCase();return Se.ORDINAL_WORD_DICTIONARY[t]!==void 0?Se.ORDINAL_WORD_DICTIONARY[t]:(t=t.replace(/(?:st|nd|rd|th)$/i,""),parseInt(t))}Se.parseOrdinalNumberPattern=WI;var og="(?:\\s+(?:\u0433\u043E\u0434\u0443|\u0433\u043E\u0434\u0430|\u0433\u043E\u0434|\u0433|\u0433.))?";Se.YEAR_PATTERN=`(?:[1-9][0-9]{0,3}${og}\\s*(?:\u043D.\u044D.|\u0434\u043E \u043D.\u044D.|\u043D. \u044D.|\u0434\u043E \u043D. \u044D.)|[1-2][0-9]{3}${og}|[5-9][0-9]${og})`;function $I(n){if(/(год|года|г|г.)/i.test(n)&&(n=n.replace(/(год|года|г|г.)/i,"")),/(до н.э.|до н. э.)/i.test(n))return n=n.replace(/(до н.э.|до н. э.)/i,""),-parseInt(n);if(/(н. э.|н.э.)/i.test(n))return n=n.replace(/(н. э.|н.э.)/i,""),parseInt(n);let t=parseInt(n);return jI.findMostLikelyADYear(t)}Se.parseYear=$I;var Jw=`(${Se.NUMBER_PATTERN})\\s{0,3}(${Oc.matchAnyPattern(Se.TIME_UNIT_DICTIONARY)})`,Xw=new RegExp(Jw,"i");Se.TIME_UNITS_PATTERN=Oc.repeatedTimeunitPattern("(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s{0,3})?",Jw);function qI(n){let t={},e=n,r=Xw.exec(e);for(;r;)HI(t,r),e=e.substring(r[0].length).trim(),r=Xw.exec(e);return t}Se.parseTimeUnits=qI;function HI(n,t){let e=Zw(t[1]),r=Se.TIME_UNIT_DICTIONARY[t[2].toLowerCase()];n[r]=e}});var tk=x(ug=>{"use strict";Object.defineProperty(ug,"__esModule",{value:!0});var Fl=dn(),GI=nt(),BI=re(),ek=`(?:(?:\u043E\u043A\u043E\u043B\u043E|\u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E)\\s*(?:~\\s*)?)?(${Fl.TIME_UNITS_PATTERN})${Fl.REGEX_PARTS.rightBoundary}`,VI=new RegExp(`(?:\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435|\u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0438)\\s*${ek}`,Fl.REGEX_PARTS.flags),zI=new RegExp(ek,"i"),lg=class extends BI.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Fl.REGEX_PARTS.leftBoundary}innerPattern(t){return t.option.forwardDate?zI:VI}innerExtract(t,e){let r=Fl.parseTimeUnits(e[1]);return GI.ParsingComponents.createRelativeFromReference(t.reference,r)}};ug.default=lg});var ak=x(dg=>{"use strict";Object.defineProperty(dg,"__esModule",{value:!0});var KI=Ct(),Ll=dn(),sk=dn(),Cc=dn(),QI=Ke(),XI=re(),ZI=new RegExp(`(?:\u0441)?\\s*(${Cc.ORDINAL_NUMBER_PATTERN})(?:\\s{0,3}(?:\u043F\u043E|-|\u2013|\u0434\u043E)?\\s{0,3}(${Cc.ORDINAL_NUMBER_PATTERN}))?(?:-|\\/|\\s{0,3}(?:of)?\\s{0,3})(${QI.matchAnyPattern(Ll.MONTH_DICTIONARY)})(?:(?:-|\\/|,?\\s{0,3})(${sk.YEAR_PATTERN}(?![^\\s]\\d)))?${Ll.REGEX_PARTS.rightBoundary}`,Ll.REGEX_PARTS.flags),nk=1,rk=2,JI=3,ik=4,cg=class extends XI.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ll.REGEX_PARTS.leftBoundary}innerPattern(){return ZI}innerExtract(t,e){let r=t.createParsingResult(e.index,e[0]),i=Ll.MONTH_DICTIONARY[e[JI].toLowerCase()],s=Cc.parseOrdinalNumberPattern(e[nk]);if(s>31)return e.index=e.index+e[nk].length,null;if(r.start.assign("month",i),r.start.assign("day",s),e[ik]){let a=sk.parseYear(e[ik]);r.start.assign("year",a)}else{let a=KI.findYearClosestToRef(t.refDate,s,i);r.start.imply("year",a)}if(e[rk]){let a=Cc.parseOrdinalNumberPattern(e[rk]);r.end=r.start.clone(),r.end.assign("day",a)}return r}};dg.default=cg});var uk=x(pg=>{"use strict";Object.defineProperty(pg,"__esModule",{value:!0});var Ul=dn(),eF=Ct(),tF=Ke(),lk=dn(),nF=re(),rF=new RegExp(`((?:\u0432)\\s*)?(${tF.matchAnyPattern(Ul.MONTH_DICTIONARY)})\\s*(?:[,-]?\\s*(${lk.YEAR_PATTERN})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+$|$)`,Ul.REGEX_PARTS.flags),iF=2,ok=3,fg=class extends nF.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Ul.REGEX_PARTS.leftBoundary}innerPattern(){return rF}innerExtract(t,e){let r=e[iF].toLowerCase();if(e[0].length<=3&&!Ul.FULL_MONTH_NAME_DICTIONARY[r])return null;let i=t.createParsingResult(e.index,e.index+e[0].length);i.start.imply("day",1);let s=Ul.MONTH_DICTIONARY[r];if(i.start.assign("month",s),e[ok]){let a=lk.parseYear(e[ok]);i.start.assign("year",a)}else{let a=eF.findYearClosestToRef(t.refDate,1,s);i.start.imply("year",a)}return i}};pg.default=fg});var dk=x(hg=>{"use strict";Object.defineProperty(hg,"__esModule",{value:!0});var Mc=ht(),sF=Ts(),ck=dn(),mg=class extends sF.AbstractTimeExpressionParser{constructor(t){super(t)}patternFlags(){return ck.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))?(?!\\/)${ck.REGEX_PARTS.rightBoundary}`}extractPrimaryTimeComponents(t,e){let r=super.extractPrimaryTimeComponents(t,e);if(r){if(e[0].endsWith("\u0432\u0435\u0447\u0435\u0440\u0430")){let i=r.get("hour");i>=6&&i<12?(r.assign("hour",r.get("hour")+12),r.assign("meridiem",Mc.Meridiem.PM)):i<6&&r.assign("meridiem",Mc.Meridiem.AM)}if(e[0].endsWith("\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u043B\u0443\u0434\u043D\u044F")){r.assign("meridiem",Mc.Meridiem.PM);let i=r.get("hour");i>=0&&i<=6&&r.assign("hour",r.get("hour")+12)}e[0].endsWith("\u0443\u0442\u0440\u0430")&&(r.assign("meridiem",Mc.Meridiem.AM),r.get("hour")<12&&r.assign("hour",r.get("hour")))}return r}};hg.default=mg});var fk=x(yg=>{"use strict";Object.defineProperty(yg,"__esModule",{value:!0});var Rc=dn(),aF=nt(),oF=re(),lF=Hn(),uF=new RegExp(`(${Rc.TIME_UNITS_PATTERN})\\s{0,5}\u043D\u0430\u0437\u0430\u0434(?=(?:\\W|$))`,Rc.REGEX_PARTS.flags),gg=class extends oF.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Rc.REGEX_PARTS.leftBoundary}innerPattern(){return uF}innerExtract(t,e){let r=Rc.parseTimeUnits(e[1]),i=lF.reverseTimeUnits(r);return aF.ParsingComponents.createRelativeFromReference(t.reference,i)}};yg.default=gg});var pk=x(Yl=>{"use strict";var cF=Yl&&Yl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Yl,"__esModule",{value:!0});var dF=cF(Wr()),bg=class extends dF.default{patternBetween(){return/^\s*(и до|и по|до|по|-)\s*$/i}};Yl.default=bg});var mk=x(jl=>{"use strict";var fF=jl&&jl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(jl,"__esModule",{value:!0});var pF=fF(si()),Tg=class extends pF.default{patternBetween(){return new RegExp("^\\s*(T|\u0432|,|-)?\\s*$")}};jl.default=Tg});var hk=x(pi=>{"use strict";var mF=pi&&pi.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),hF=pi&&pi.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),gF=pi&&pi.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&mF(t,n,e);return hF(t,n),t};Object.defineProperty(pi,"__esModule",{value:!0});var yF=re(),Wl=gF(li()),_g=dn(),bF=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)${_g.REGEX_PARTS.rightBoundary}`,_g.REGEX_PARTS.flags),vg=class extends yF.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return _g.REGEX_PARTS.leftBoundary}innerPattern(t){return bF}innerExtract(t,e){let r=e[1].toLowerCase(),i=t.createParsingComponents();switch(r){case"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":return Wl.today(t.reference);case"\u0432\u0447\u0435\u0440\u0430":return Wl.yesterday(t.reference);case"\u0437\u0430\u0432\u0442\u0440\u0430":return Wl.tomorrow(t.reference);case"\u043F\u043E\u0441\u043B\u0435\u0437\u0430\u0432\u0442\u0440\u0430":return Wl.theDayAfter(t.reference,2);case"\u043F\u043E\u0437\u0430\u0432\u0447\u0435\u0440\u0430":return Wl.theDayBefore(t.reference,2)}return i}};pi.default=vg});var gk=x(kr=>{"use strict";var TF=kr&&kr.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),_F=kr&&kr.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),vF=kr&&kr.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&TF(t,n,e);return _F(t,n),t},wF=kr&&kr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(kr,"__esModule",{value:!0});var kF=re(),xs=vF(li()),SF=qn(),DF=wF(Ue()),wg=dn(),EF=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)${wg.REGEX_PARTS.rightBoundary}`,wg.REGEX_PARTS.flags),kg=class extends kF.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return wg.REGEX_PARTS.leftBoundary}innerPattern(){return EF}innerExtract(t,e){let r=DF.default(t.refDate),i=e[0].toLowerCase(),s=t.createParsingComponents();if(i==="\u0441\u0435\u0439\u0447\u0430\u0441")return xs.now(t.reference);if(i==="\u0432\u0435\u0447\u0435\u0440\u043E\u043C"||i==="\u0432\u0435\u0447\u0435\u0440\u0430")return xs.evening(t.reference);if(i.endsWith("\u0443\u0442\u0440\u043E\u043C")||i.endsWith("\u0443\u0442\u0440\u0430"))return xs.morning(t.reference);if(i.match(/в\s*полдень/))return xs.noon(t.reference);if(i.match(/прошлой\s*ночью/))return xs.lastNight(t.reference);if(i.match(/прошлым\s*вечером/))return xs.yesterdayEvening(t.reference);if(i.match(/следующей\s*ночью/)){let a=r.hour()<22?1:2;r=r.add(a,"day"),SF.assignSimilarDate(s,r),s.imply("hour",0)}return i.match(/в\s*полночь/)||i.endsWith("\u043D\u043E\u0447\u044C\u044E")?xs.midnight(t.reference):s}};kr.default=kg});var yk=x(Dg=>{"use strict";Object.defineProperty(Dg,"__esModule",{value:!0});var $l=dn(),xF=Ke(),OF=re(),CF=vs(),MF=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*)?(${xF.matchAnyPattern($l.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)?${$l.REGEX_PARTS.rightBoundary}`,$l.REGEX_PARTS.flags),RF=1,AF=2,PF=3,Sg=class extends OF.AbstractParserWithWordBoundaryChecking{innerPattern(){return MF}patternLeftBoundary(){return $l.REGEX_PARTS.leftBoundary}innerExtract(t,e){let r=e[AF].toLowerCase(),i=$l.WEEKDAY_DICTIONARY[r],s=e[RF],a=e[PF],o=s||a;o=o||"",o=o.toLowerCase();let l=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"?l="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"?l="next":(o=="\u044D\u0442\u043E\u0442"||o=="\u044D\u0442\u0443"||o=="\u044D\u0442\u043E\u0439")&&(l="this");let u=CF.toDayJSWeekday(t.refDate,i,l);return t.createParsingComponents().assign("weekday",i).imply("day",u.date()).imply("month",u.month()+1).imply("year",u.year())}};Dg.default=Sg});var Tk=x(Hl=>{"use strict";var NF=Hl&&Hl.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Hl,"__esModule",{value:!0});var ql=dn(),bk=nt(),IF=NF(Ue()),FF=re(),LF=Ke(),UF=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*(${LF.matchAnyPattern(ql.TIME_UNIT_DICTIONARY)})(?=\\s*)${ql.REGEX_PARTS.rightBoundary}`,ql.REGEX_PARTS.flags),YF=1,jF=2,Eg=class extends FF.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return ql.REGEX_PARTS.leftBoundary}innerPattern(){return UF}innerExtract(t,e){let r=e[YF].toLowerCase(),i=e[jF].toLowerCase(),s=ql.TIME_UNIT_DICTIONARY[i];if(r=="\u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439"||r=="\u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C"){let l={};return l[s]=1,bk.ParsingComponents.createRelativeFromReference(t.reference,l)}if(r=="\u0432 \u043F\u0440\u043E\u0448\u043B\u043E\u043C"||r=="\u043D\u0430 \u043F\u0440\u043E\u0448\u043B\u043E\u0439"){let l={};return l[s]=-1,bk.ParsingComponents.createRelativeFromReference(t.reference,l)}let a=t.createParsingComponents(),o=IF.default(t.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}};Hl.default=Eg});var _k=x(Og=>{"use strict";Object.defineProperty(Og,"__esModule",{value:!0});var Gl=dn(),WF=nt(),$F=re(),qF=Hn(),HF=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*(${Gl.TIME_UNITS_PATTERN})${Gl.REGEX_PARTS.rightBoundary}`,Gl.REGEX_PARTS.flags),xg=class extends $F.AbstractParserWithWordBoundaryChecking{patternLeftBoundary(){return Gl.REGEX_PARTS.leftBoundary}innerPattern(){return HF}innerExtract(t,e){let r=e[1].toLowerCase(),i=Gl.parseTimeUnits(e[2]);switch(r){case"\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435":case"\u043F\u0440\u043E\u0448\u043B\u044B\u0435":case"-":i=qF.reverseTimeUnits(i);break}return WF.ParsingComponents.createRelativeFromReference(t.reference,i)}};Og.default=xg});var kk=x(St=>{"use strict";var Dn=St&&St.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(St,"__esModule",{value:!0});St.createConfiguration=St.createCasualConfiguration=St.parseDate=St.parse=St.strict=St.casual=void 0;var GF=Dn(tk()),BF=Dn(ak()),VF=Dn(uk()),zF=Dn(dk()),KF=Dn(fk()),QF=Dn(pk()),XF=Dn(mk()),ZF=ai(),JF=Dn(hk()),eL=Dn(gk()),tL=Dn(yk()),nL=Dn(Tk()),vk=br(),rL=Dn(ws()),iL=Dn(_k());St.casual=new vk.Chrono(wk());St.strict=new vk.Chrono(Cg(!0));function sL(n,t,e){return St.casual.parse(n,t,e)}St.parse=sL;function aL(n,t,e){return St.casual.parseDate(n,t,e)}St.parseDate=aL;function wk(){let n=Cg(!1);return n.parsers.unshift(new JF.default),n.parsers.unshift(new eL.default),n.parsers.unshift(new VF.default),n.parsers.unshift(new nL.default),n.parsers.unshift(new iL.default),n}St.createCasualConfiguration=wk;function Cg(n=!0){return ZF.includeCommonConfiguration({parsers:[new rL.default(!0),new GF.default,new BF.default,new tL.default,new zF.default(n),new KF.default],refiners:[new XF.default,new QF.default]},n)}St.createConfiguration=Cg});var ht=x(Re=>{"use strict";var oL=Re&&Re.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e),Object.defineProperty(n,r,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),lL=Re&&Re.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),ji=Re&&Re.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)e!=="default"&&Object.prototype.hasOwnProperty.call(n,e)&&oL(t,n,e);return lL(t,n),t};Object.defineProperty(Re,"__esModule",{value:!0});Re.parseDate=Re.parse=Re.casual=Re.strict=Re.ru=Re.zh=Re.nl=Re.pt=Re.ja=Re.fr=Re.de=Re.Meridiem=Re.Chrono=Re.en=void 0;var Mg=ji(Vp());Re.en=Mg;var uL=br();Object.defineProperty(Re,"Chrono",{enumerable:!0,get:function(){return uL.Chrono}});var cL;(function(n){n[n.AM=0]="AM",n[n.PM=1]="PM"})(cL=Re.Meridiem||(Re.Meridiem={}));var dL=ji(A_());Re.de=dL;var fL=ji(ov());Re.fr=fL;var pL=ji(gv());Re.ja=pL;var mL=ji(Av());Re.pt=mL;var hL=ji(gw());Re.nl=hL;var gL=ji(Qw());Re.zh=gL;var yL=ji(kk());Re.ru=yL;Re.strict=Mg.strict;Re.casual=Mg.casual;function bL(n,t,e){return Re.casual.parse(n,t,e)}Re.parse=bL;function TL(n,t,e){return Re.casual.parseDate(n,t,e)}Re.parseDate=TL});var nn,Rg=ee(()=>{"use strict";nn=class{constructor(t,e){this.start=t,this.end=e,e.isBefore(t)&&(this.start=e,this.end=t),this.start=this.start.startOf("day"),this.end=this.end.startOf("day")}static buildRelative(t){let e=t==="week"?"isoWeek":t;return new nn(window.moment().startOf(e).startOf("day"),window.moment().endOf(e).startOf("day"))}static buildInvalid(){return new nn(window.moment.invalid(),window.moment.invalid())}isValid(){return this.start.isValid()&&this.end.isValid()}moveToPrevious(t){let e=window.moment.duration(1,t);this.start.subtract(e),this.end.subtract(e),(t==="month"||t==="quarter")&&(this.end=this.end.endOf(t).startOf("day"))}moveToNext(t){let e=window.moment.duration(1,t);this.start.add(e),this.end.add(e),(t==="month"||t==="quarter")&&(this.end=this.end.endOf(t).startOf("day"))}}});var Ac,En,Ag=ee(()=>{"use strict";Ac=qo(ht());Rg();En=class{static parseDate(t,e=!1){return window.moment(Ac.parseDate(t,void 0,{forwardDate:e})).startOf("day")}static parseDateRange(t,e=!1){let r=[En.parseRelativeDateRange,En.parseNumberedDateRange,En.parseAbsoluteDateRange];for(let i of r){let s=i(t,e);if(s.isValid())return s}return nn.buildInvalid()}static parseAbsoluteDateRange(t,e){let r=Ac.parse(t,void 0,{forwardDate:e});if(r.length===0)return nn.buildInvalid();let i=r[0].start,s=r[1]&&r[1].start?r[1].start:i,a=window.moment(i.date()),o=window.moment(s.date());return new nn(a,o)}static parseRelativeDateRange(t,e){let r=/(last|this|next) (week|month|quarter|year)/,i=t.match(r);if(i&&i.length===3){let s=i[1],a=i[2],o=nn.buildRelative(a);switch(s){case"last":o.moveToPrevious(a);break;case"next":o.moveToNext(a);break}return o}return nn.buildInvalid()}static parseNumberedDateRange(t,e){let r=[[/^\s*[0-9]{4}\s*$/,"YYYY","year"],[/^\s*[0-9]{4}-Q[1-4]\s*$/,"YYYY-Q","quarter"],[/^\s*[0-9]{4}-[0-9]{2}\s*$/,"YYYY-MM","month"],[/^\s*[0-9]{4}-W[0-9]{2}\s*$/,"YYYY-WW","isoWeek"]];for(let[i,s,a]of r){let o=t.match(i);if(o){let l=o[0].trim();return new nn(window.moment(l,s).startOf(a),window.moment(l,s).endOf(a))}}return nn.buildInvalid()}}});function Pc(n){for(let[t,e]of Object.entries(_L))n=n.replace(RegExp(`\\b${t}\\s`,"i"),e);return n}var _L,Pg=ee(()=>{"use strict";_L={td:"today",tm:"tomorrow",yd:"yesterday",tw:"this week",nw:"next week",weekend:"sat",we:"sat"}});function Qn(n,t){return n!==null&&t===null?-1:n===null&&t!==null?1:n!==null&&t!==null?n.isValid()&&!t.isValid()?1:!n.isValid()&&t.isValid()?-1:n.isAfter(t)?1:n.isBefore(t)?-1:0:0}function vL(n,t,e=void 0){if(!t)return`<i>no ${n} date</i>`;let r=Ng.parseDate(t,e,{forwardDate:e!=null});return r!==null?window.moment(r).format("YYYY-MM-DD"):`<i>invalid ${n} date</i>`}function Sk(n,t,e){return vL(n,t,e?new Date:void 0)}function Os(n,t){let e=null,r=Ng.parseDate(n,new Date,{forwardDate:t});return r!==null&&(e=window.moment(r)),e}var Ng,Cs=ee(()=>{"use strict";Ng=qo(ht())});var Xn,Nc=ee(()=>{"use strict";Cs();Xn=class{constructor({startDate:t=null,scheduledDate:e=null,dueDate:r=null}){this.startDate=t!=null?t:null,this.scheduledDate=e!=null?e:null,this.dueDate=r!=null?r:null,this.referenceDate=this.getReferenceDate()}getReferenceDate(){return this.dueDate?window.moment(this.dueDate):this.scheduledDate?window.moment(this.scheduledDate):this.startDate?window.moment(this.startDate):null}isIdenticalTo(t){return!(Qn(this.startDate,t.startDate)!==0||Qn(this.scheduledDate,t.scheduledDate)!==0||Qn(this.dueDate,t.dueDate)!==0)}next(t,e=!1){if(this.referenceDate===null)return new Xn({startDate:null,scheduledDate:null,dueDate:null});let r=this.startDate!==null,i=this.dueDate!==null,a=e&&(r||i),o=this.nextOccurrenceDate(this.startDate,t),l=a?null:this.nextOccurrenceDate(this.scheduledDate,t),u=this.nextOccurrenceDate(this.dueDate,t);return new Xn({startDate:o,scheduledDate:l,dueDate:u})}nextOccurrenceDate(t,e){if(t===null)return null;let r=window.moment.duration(t.diff(this.referenceDate)),i=window.moment(e);return i.add(Math.round(r.asDays()),"days"),i}}});var Ic,ft,Ms=ee(()=>{Ic=["MO","TU","WE","TH","FR","SA","SU"],ft=function(){function n(t,e){if(e===0)throw new Error("Can't create weekday with n == 0");this.weekday=t,this.n=e}return n.fromStr=function(t){return new n(Ic.indexOf(t))},n.prototype.nth=function(t){return this.n===t?this:new n(this.weekday,t)},n.prototype.equals=function(t){return this.weekday===t.weekday&&this.n===t.n},n.prototype.toString=function(){var t=Ic[this.weekday];return this.n&&(t=(this.n>0?"+":"")+String(this.n)+t),t},n.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},n}()});function Rs(n,t,e){e===void 0&&(e=" ");var r=String(n);return t=t>>0,r.length>t?String(r):(t=t-r.length,t>e.length&&(e+=Ne(e,t/e.length)),e.slice(0,t)+String(r))}var Je,xn,Ig,At,Zn,Ne,Dk,Ek,Wt,Fc,On,st,Ie,rn=ee(()=>{Ms();Je=function(n){return n!=null},xn=function(n){return typeof n=="number"},Ig=function(n){return typeof n=="string"&&Ic.includes(n)},At=Array.isArray,Zn=function(n,t){t===void 0&&(t=n),arguments.length===1&&(t=n,n=0);for(var e=[],r=n;r<t;r++)e.push(r);return e},Ne=function(n,t){var e=0,r=[];if(At(n))for(;e<t;e++)r[e]=[].concat(n);else for(;e<t;e++)r[e]=n;return r},Dk=function(n){return At(n)?n:[n]};Ek=function(n,t,e){var r=n.split(t);return e?r.slice(0,e).concat([r.slice(e).join(t)]):r},Wt=function(n,t){var e=n%t;return e*t<0?e+t:e},Fc=function(n,t){return{div:Math.floor(n/t),mod:Wt(n,t)}},On=function(n){return!Je(n)||n.length===0},st=function(n){return!On(n)},Ie=function(n,t){return st(n)&&n.indexOf(t)!==-1}});var Hr,wL,Ck,Lc,Mk,kL,Ia,Fg,As,xk,SL,Bl,Uc,DL,mi,Lg,Yc,jc,Ug,hi,Fa,Vl,Ok,Rk,$t=ee(()=>{rn();Hr=function(n,t,e,r,i,s){return r===void 0&&(r=0),i===void 0&&(i=0),s===void 0&&(s=0),new Date(Date.UTC(n,t-1,e,r,i,s))},wL=[31,28,31,30,31,30,31,31,30,31,30,31],Ck=1e3*60*60*24,Lc=9999,Mk=Hr(1970,1,1),kL=[6,0,1,2,3,4,5],Ia=function(n){return n%4===0&&n%100!==0||n%400===0},Fg=function(n){return n instanceof Date},As=function(n){return Fg(n)&&!isNaN(n.getTime())},xk=function(n){return n.getTimezoneOffset()*60*1e3},SL=function(n,t){var e=n.getTime()-xk(n),r=t.getTime()-xk(t),i=e-r;return Math.round(i/Ck)},Bl=function(n){return SL(n,Mk)},Uc=function(n){return new Date(Mk.getTime()+n*Ck)},DL=function(n){var t=n.getUTCMonth();return t===1&&Ia(n.getUTCFullYear())?29:wL[t]},mi=function(n){return kL[n.getUTCDay()]},Lg=function(n,t){var e=Hr(n,t+1,1);return[mi(e),DL(e)]},Yc=function(n,t){return t=t||n,new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))},jc=function(n){var t=new Date(n.getTime());return t},Ug=function(n){for(var t=[],e=0;e<n.length;e++)t.push(jc(n[e]));return t},hi=function(n){n.sort(function(t,e){return t.getTime()-e.getTime()})},Fa=function(n,t){t===void 0&&(t=!0);var e=new Date(n);return[Rs(e.getUTCFullYear().toString(),4,"0"),Rs(e.getUTCMonth()+1,2,"0"),Rs(e.getUTCDate(),2,"0"),"T",Rs(e.getUTCHours(),2,"0"),Rs(e.getUTCMinutes(),2,"0"),Rs(e.getUTCSeconds(),2,"0"),t?"Z":""].join("")},Vl=function(n){var t=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,e=t.exec(n);if(!e)throw new Error("Invalid UNTIL value: ".concat(n));return new Date(Date.UTC(parseInt(e[1],10),parseInt(e[2],10)-1,parseInt(e[3],10),parseInt(e[5],10)||0,parseInt(e[6],10)||0,parseInt(e[7],10)||0))},Ok=function(n,t){var e=n.toLocaleString("sv-SE",{timeZone:t});return e.replace(" ","T")+"Z"},Rk=function(n,t){var e=Intl.DateTimeFormat().resolvedOptions().timeZone,r=new Date(Ok(n,e)),i=new Date(Ok(n,t!=null?t:"UTC")),s=i.getTime()-r.getTime();return new Date(n.getTime()-s)}});var EL,gi,Wc=ee(()=>{EL=function(){function n(t,e){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=t,this.args=e,t==="between"?(this.maxDate=e.inc?e.before:new Date(e.before.getTime()-1),this.minDate=e.inc?e.after:new Date(e.after.getTime()+1)):t==="before"?this.maxDate=e.inc?e.dt:new Date(e.dt.getTime()-1):t==="after"&&(this.minDate=e.inc?e.dt:new Date(e.dt.getTime()+1))}return n.prototype.accept=function(t){++this.total;var e=this.minDate&&t<this.minDate,r=this.maxDate&&t>this.maxDate;if(this.method==="between"){if(e)return!0;if(r)return!1}else if(this.method==="before"){if(r)return!1}else if(this.method==="after")return e?!0:(this.add(t),!1);return this.add(t)},n.prototype.add=function(t){return this._result.push(t),!0},n.prototype.getValue=function(){var t=this._result;switch(this.method){case"all":case"between":return t;case"before":case"after":default:return t.length?t[t.length-1]:null}},n.prototype.clone=function(){return new n(this.method,this.args)},n}(),gi=EL});function La(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Yg(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function Q(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return n.concat(s||Array.prototype.slice.call(t))}var Yg,Pt,yi=ee(()=>{Yg=function(n,t){return Yg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},Yg(n,t)};Pt=function(){return Pt=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},Pt.apply(this,arguments)}});var xL,jg,Ak=ee(()=>{yi();Wc();xL=function(n){La(t,n);function t(e,r,i){var s=n.call(this,e,r)||this;return s.iterator=i,s}return t.prototype.add=function(e){return this.iterator(e,this._result.length)?(this._result.push(e),!0):!1},t}(gi),jg=xL});var OL,Ps,$c=ee(()=>{OL={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}},Ps=OL});var Pk,CL,ML,RL,Gr,Nk=ee(()=>{$c();Jn();rn();Pk=function(n,t){return n.indexOf(t)!==-1},CL=function(n){return n.toString()},ML=function(n,t,e){return"".concat(t," ").concat(e,", ").concat(n)},RL=function(){function n(t,e,r,i){if(e===void 0&&(e=CL),r===void 0&&(r=Ps),i===void 0&&(i=ML),this.text=[],this.language=r||Ps,this.gettext=e,this.dateFormatter=i,this.rrule=t,this.options=t.options,this.origOptions=t.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(Je(this.origOptions.byweekday)){var o=At(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],l=String(o);this.byweekday={allWeeks:o.filter(function(c){return!c.n}),someWeeks:o.filter(function(c){return Boolean(c.n)}),isWeekdays:l.indexOf("MO")!==-1&&l.indexOf("TU")!==-1&&l.indexOf("WE")!==-1&&l.indexOf("TH")!==-1&&l.indexOf("FR")!==-1&&l.indexOf("SA")===-1&&l.indexOf("SU")===-1,isEveryDay:l.indexOf("MO")!==-1&&l.indexOf("TU")!==-1&&l.indexOf("WE")!==-1&&l.indexOf("TH")!==-1&&l.indexOf("FR")!==-1&&l.indexOf("SA")!==-1&&l.indexOf("SU")!==-1};var u=function(c,d){return c.weekday-d.weekday};this.byweekday.allWeeks.sort(u),this.byweekday.someWeeks.sort(u),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return n.isFullyConvertible=function(t){var e=!0;if(!(t.options.freq in n.IMPLEMENTED)||t.origOptions.until&&t.origOptions.count)return!1;for(var r in t.origOptions){if(Pk(["dtstart","wkst","freq"],r))return!0;if(!Pk(n.IMPLEMENTED[t.options.freq],r))return!1}return e},n.prototype.isFullyConvertible=function(){return n.isFullyConvertible(this.rrule)},n.prototype.toString=function(){var t=this.gettext;if(!(this.options.freq in n.IMPLEMENTED))return t("RRule error: Unable to fully convert this rrule to text");if(this.text=[t("every")],this[ae.FREQUENCIES[this.options.freq]](),this.options.until){this.add(t("until"));var e=this.options.until;this.add(this.dateFormatter(e.getUTCFullYear(),this.language.monthNames[e.getUTCMonth()],e.getUTCDate()))}else this.options.count&&this.add(t("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?t("times"):t("time"));return this.isFullyConvertible()||this.add(t("(~ approximate)")),this.text.join("")},n.prototype.HOURLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("hours"):t("hour"))},n.prototype.MINUTELY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("minutes"):t("minute"))},n.prototype.DAILY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(this.plural(this.options.interval)?t("days"):t("day")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},n.prototype.WEEKLY=function(){var t=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?t("weeks"):t("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?t("weekdays"):t("weekday")):this.add(t("on")).add(t("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?t("days"):t("day")):(this.options.interval===1&&this.add(t("week")),this.origOptions.bymonth&&(this.add(t("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday())},n.prototype.MONTHLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(t("months")),this.plural(this.options.interval)&&this.add(t("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("months"):t("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(t("on")).add(t("weekdays")):this.byweekday&&this._byweekday()},n.prototype.YEARLY=function(){var t=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(t("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?t("years"):t("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(t("on the")).add(this.list(this.options.byyearday,this.nth,t("and"))).add(t("day")),this.options.byweekno&&this.add(t("in")).add(this.plural(this.options.byweekno.length)?t("weeks"):t("week")).add(this.list(this.options.byweekno,void 0,t("and")))},n.prototype._bymonthday=function(){var t=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,t("or"))).add(t("the")).add(this.list(this.bymonthday,this.nth,t("or"))):this.add(t("on the")).add(this.list(this.bymonthday,this.nth,t("and")))},n.prototype._byweekday=function(){var t=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(t("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(t("and")),this.add(t("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,t("and"))))},n.prototype._byhour=function(){var t=this.gettext;this.add(t("at")).add(this.list(this.origOptions.byhour,void 0,t("and")))},n.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},n.prototype.nth=function(t){t=parseInt(t.toString(),10);var e,r=this.gettext;if(t===-1)return r("last");var i=Math.abs(t);switch(i){case 1:case 21:case 31:e=i+r("st");break;case 2:case 22:e=i+r("nd");break;case 3:case 23:e=i+r("rd");break;default:e=i+r("th")}return t<0?e+" "+r("last"):e},n.prototype.monthtext=function(t){return this.language.monthNames[t-1]},n.prototype.weekdaytext=function(t){var e=xn(t)?(t+1)%7:t.getJsWeekday();return(t.n?this.nth(t.n)+" ":"")+this.language.dayNames[e]},n.prototype.plural=function(t){return t%100!==1},n.prototype.add=function(t){return this.text.push(" "),this.text.push(t),this},n.prototype.list=function(t,e,r,i){var s=this;i===void 0&&(i=","),At(t)||(t=[t]);var a=function(l,u,c){for(var d="",f=0;f<l.length;f++)f!==0&&(f===l.length-1?d+=" "+c+" ":d+=u+" "),d+=l[f];return d};e=e||function(l){return l.toString()};var o=function(l){return e&&e.call(s,l)};return r?a(t.map(o),i,r):t.map(o).join(i+" ")},n}(),Gr=RL});function zl(n,t){t===void 0&&(t=Ps);var e={},r=new AL(t.tokens);if(!r.start(n))return null;return i(),e;function i(){r.expect("every");var f=r.acceptNumber();if(f&&(e.interval=parseInt(f[0],10)),r.isDone())throw new Error("Unexpected end");switch(r.symbol){case"day(s)":e.freq=ae.DAILY,r.nextSymbol()&&(a(),d());break;case"weekday(s)":e.freq=ae.WEEKLY,e.byweekday=[ae.MO,ae.TU,ae.WE,ae.TH,ae.FR],r.nextSymbol(),d();break;case"week(s)":e.freq=ae.WEEKLY,r.nextSymbol()&&(s(),d());break;case"hour(s)":e.freq=ae.HOURLY,r.nextSymbol()&&(s(),d());break;case"minute(s)":e.freq=ae.MINUTELY,r.nextSymbol()&&(s(),d());break;case"month(s)":e.freq=ae.MONTHLY,r.nextSymbol()&&(s(),d());break;case"year(s)":e.freq=ae.YEARLY,r.nextSymbol()&&(s(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":e.freq=ae.WEEKLY;var p=r.symbol.substr(0,2).toUpperCase();if(e.byweekday=[ae[p]],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var b=l();if(!b)throw new Error("Unexpected symbol "+r.symbol+", expected weekday");e.byweekday.push(ae[b]),r.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(e.freq=ae.YEARLY,e.bymonth=[o()],!r.nextSymbol())return;for(;r.accept("comma");){if(r.isDone())throw new Error("Unexpected end");var T=o();if(!T)throw new Error("Unexpected symbol "+r.symbol+", expected month");e.bymonth.push(T),r.nextSymbol()}s(),d();break;default:throw new Error("Unknown symbol")}}function s(){var f=r.accept("on"),p=r.accept("the");if(!!(f||p))do{var b=u(),T=l(),_=o();if(b)T?(r.nextSymbol(),e.byweekday||(e.byweekday=[]),e.byweekday.push(ae[T].nth(b))):(e.bymonthday||(e.bymonthday=[]),e.bymonthday.push(b),r.accept("day(s)"));else if(T)r.nextSymbol(),e.byweekday||(e.byweekday=[]),e.byweekday.push(ae[T]);else if(r.symbol==="weekday(s)")r.nextSymbol(),e.byweekday||(e.byweekday=[ae.MO,ae.TU,ae.WE,ae.TH,ae.FR]);else if(r.symbol==="week(s)"){r.nextSymbol();var O=r.acceptNumber();if(!O)throw new Error("Unexpected symbol "+r.symbol+", expected week number");for(e.byweekno=[parseInt(O[0],10)];r.accept("comma");){if(O=r.acceptNumber(),!O)throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");e.byweekno.push(parseInt(O[0],10))}}else if(_)r.nextSymbol(),e.bymonth||(e.bymonth=[]),e.bymonth.push(_);else return}while(r.accept("comma")||r.accept("the")||r.accept("on"))}function a(){var f=r.accept("at");if(!!f)do{var p=r.acceptNumber();if(!p)throw new Error("Unexpected symbol "+r.symbol+", expected hour");for(e.byhour=[parseInt(p[0],10)];r.accept("comma");){if(p=r.acceptNumber(),!p)throw new Error("Unexpected symbol "+r.symbol+"; expected hour");e.byhour.push(parseInt(p[0],10))}}while(r.accept("comma")||r.accept("at"))}function o(){switch(r.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 l(){switch(r.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return r.symbol.substr(0,2).toUpperCase();default:return!1}}function u(){switch(r.symbol){case"last":return r.nextSymbol(),-1;case"first":return r.nextSymbol(),1;case"second":return r.nextSymbol(),r.accept("last")?-2:2;case"third":return r.nextSymbol(),r.accept("last")?-3:3;case"nth":var f=parseInt(r.value[1],10);if(f<-366||f>366)throw new Error("Nth out of range: "+f);return r.nextSymbol(),r.accept("last")?-f:f;default:return!1}}function c(){r.accept("on"),r.accept("the");var f=u();if(!!f)for(e.bymonthday=[f],r.nextSymbol();r.accept("comma");){if(f=u(),!f)throw new Error("Unexpected symbol "+r.symbol+"; expected monthday");e.bymonthday.push(f),r.nextSymbol()}}function d(){if(r.symbol==="until"){var f=Date.parse(r.text);if(!f)throw new Error("Cannot parse until date:"+r.text);e.until=new Date(f)}else r.accept("for")&&(e.count=parseInt(r.value[0],10),r.expect("number"))}}var AL,Ik=ee(()=>{$c();Jn();AL=function(){function n(t){this.done=!0,this.rules=t}return n.prototype.start=function(t){return this.text=t,this.done=!1,this.nextSymbol()},n.prototype.isDone=function(){return this.done&&this.symbol===null},n.prototype.nextSymbol=function(){var t,e;this.symbol=null,this.value=null;do{if(this.done)return!1;var r=void 0;t=null;for(var i in this.rules){r=this.rules[i];var s=r.exec(this.text);s&&(t===null||s[0].length>t[0].length)&&(t=s,e=i)}if(t!=null&&(this.text=this.text.substr(t[0].length),this.text===""&&(this.done=!0)),t==null){this.done=!0,this.symbol=null,this.value=null;return}}while(e==="SKIP");return this.symbol=e,this.value=t,!0},n.prototype.accept=function(t){if(this.symbol===t){if(this.value){var e=this.value;return this.nextSymbol(),e}return this.nextSymbol(),!0}return!1},n.prototype.acceptNumber=function(){return this.accept("number")},n.prototype.expect=function(t){if(this.accept(t))return!0;throw new Error("expected "+t+" but found "+this.symbol)},n}()});function Kl(n){return n<Ae.HOURLY}var Ae,bi=ee(()=>{(function(n){n[n.YEARLY=0]="YEARLY",n[n.MONTHLY=1]="MONTHLY",n[n.WEEKLY=2]="WEEKLY",n[n.DAILY=3]="DAILY",n[n.HOURLY=4]="HOURLY",n[n.MINUTELY=5]="MINUTELY",n[n.SECONDLY=6]="SECONDLY"})(Ae||(Ae={}))});var Fk,Ua,Lk,Uk,Yk=ee(()=>{Nk();Ik();Jn();bi();$c();Fk=function(n,t){return t===void 0&&(t=Ps),new ae(zl(n,t)||void 0)},Ua=["count","until","interval","byweekday","bymonthday","bymonth"];Gr.IMPLEMENTED=[];Gr.IMPLEMENTED[Ae.HOURLY]=Ua;Gr.IMPLEMENTED[Ae.MINUTELY]=Ua;Gr.IMPLEMENTED[Ae.DAILY]=["byhour"].concat(Ua);Gr.IMPLEMENTED[Ae.WEEKLY]=Ua;Gr.IMPLEMENTED[Ae.MONTHLY]=Ua;Gr.IMPLEMENTED[Ae.YEARLY]=["byweekno","byyearday"].concat(Ua);Lk=function(n,t,e,r){return new Gr(n,t,e,r).toString()},Uk=Gr.isFullyConvertible});var Ya,jk,qc=ee(()=>{yi();bi();rn();$t();Ya=function(){function n(t,e,r,i){this.hour=t,this.minute=e,this.second=r,this.millisecond=i||0}return n.prototype.getHours=function(){return this.hour},n.prototype.getMinutes=function(){return this.minute},n.prototype.getSeconds=function(){return this.second},n.prototype.getMilliseconds=function(){return this.millisecond},n.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},n}(),jk=function(n){La(t,n);function t(e,r,i,s,a,o,l){var u=n.call(this,s,a,o,l)||this;return u.year=e,u.month=r,u.day=i,u}return t.fromDate=function(e){return new this(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.valueOf()%1e3)},t.prototype.getWeekday=function(){return mi(new Date(this.getTime()))},t.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},t.prototype.getDay=function(){return this.day},t.prototype.getMonth=function(){return this.month},t.prototype.getYear=function(){return this.year},t.prototype.addYears=function(e){this.year+=e},t.prototype.addMonths=function(e){if(this.month+=e,this.month>12){var r=Math.floor(this.month/12),i=Wt(this.month,12);this.month=i,this.year+=r,this.month===0&&(this.month=12,--this.year)}},t.prototype.addWeekly=function(e,r){r>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-r))+e*7:this.day+=-(this.getWeekday()-r)+e*7,this.fixDay()},t.prototype.addDaily=function(e){this.day+=e,this.fixDay()},t.prototype.addHours=function(e,r,i){for(r&&(this.hour+=Math.floor((23-this.hour)/e)*e);;){this.hour+=e;var s=Fc(this.hour,24),a=s.div,o=s.mod;if(a&&(this.hour=o,this.addDaily(a)),On(i)||Ie(i,this.hour))break}},t.prototype.addMinutes=function(e,r,i,s){for(r&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/e)*e);;){this.minute+=e;var a=Fc(this.minute,60),o=a.div,l=a.mod;if(o&&(this.minute=l,this.addHours(o,!1,i)),(On(i)||Ie(i,this.hour))&&(On(s)||Ie(s,this.minute)))break}},t.prototype.addSeconds=function(e,r,i,s,a){for(r&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/e)*e);;){this.second+=e;var o=Fc(this.second,60),l=o.div,u=o.mod;if(l&&(this.second=u,this.addMinutes(l,!1,i,s)),(On(i)||Ie(i,this.hour))&&(On(s)||Ie(s,this.minute))&&(On(a)||Ie(a,this.second)))break}},t.prototype.fixDay=function(){if(!(this.day<=28)){var e=Lg(this.year,this.month-1)[1];if(!(this.day<=e))for(;this.day>e;){if(this.day-=e,++this.month,this.month===13&&(this.month=1,++this.year,this.year>Lc))return;e=Lg(this.year,this.month-1)[1]}}},t.prototype.add=function(e,r){var i=e.freq,s=e.interval,a=e.wkst,o=e.byhour,l=e.byminute,u=e.bysecond;switch(i){case Ae.YEARLY:return this.addYears(s);case Ae.MONTHLY:return this.addMonths(s);case Ae.WEEKLY:return this.addWeekly(s,a);case Ae.DAILY:return this.addDaily(s);case Ae.HOURLY:return this.addHours(s,r,o);case Ae.MINUTELY:return this.addMinutes(s,r,o,l);case Ae.SECONDLY:return this.addSeconds(s,r,o,l,u)}},t}(Ya)});function Wg(n){for(var t=[],e=Object.keys(n),r=0,i=e;r<i.length;r++){var s=i[r];Ie(qk,s)||t.push(s),Fg(n[s])&&!As(n[s])&&t.push(s)}if(t.length)throw new Error("Invalid options: "+t.join(", "));return Pt({},n)}function Wk(n){var t=Pt(Pt({},Ql),Wg(n));if(Je(t.byeaster)&&(t.freq=ae.YEARLY),!(Je(t.freq)&&ae.FREQUENCIES[t.freq]))throw new Error("Invalid frequency: ".concat(t.freq," ").concat(n.freq));if(t.dtstart||(t.dtstart=new Date(new Date().setMilliseconds(0))),Je(t.wkst)?xn(t.wkst)||(t.wkst=t.wkst.weekday):t.wkst=ae.MO.weekday,Je(t.bysetpos)){xn(t.bysetpos)&&(t.bysetpos=[t.bysetpos]);for(var e=0;e<t.bysetpos.length;e++){var r=t.bysetpos[e];if(r===0||!(r>=-366&&r<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(Boolean(t.byweekno)||st(t.byweekno)||st(t.byyearday)||Boolean(t.bymonthday)||st(t.bymonthday)||Je(t.byweekday)||Je(t.byeaster)))switch(t.freq){case ae.YEARLY:t.bymonth||(t.bymonth=t.dtstart.getUTCMonth()+1),t.bymonthday=t.dtstart.getUTCDate();break;case ae.MONTHLY:t.bymonthday=t.dtstart.getUTCDate();break;case ae.WEEKLY:t.byweekday=[mi(t.dtstart)];break}if(Je(t.bymonth)&&!At(t.bymonth)&&(t.bymonth=[t.bymonth]),Je(t.byyearday)&&!At(t.byyearday)&&xn(t.byyearday)&&(t.byyearday=[t.byyearday]),!Je(t.bymonthday))t.bymonthday=[],t.bynmonthday=[];else if(At(t.bymonthday)){for(var i=[],s=[],e=0;e<t.bymonthday.length;e++){var r=t.bymonthday[e];r>0?i.push(r):r<0&&s.push(r)}t.bymonthday=i,t.bynmonthday=s}else t.bymonthday<0?(t.bynmonthday=[t.bymonthday],t.bymonthday=[]):(t.bynmonthday=[],t.bymonthday=[t.bymonthday]);if(Je(t.byweekno)&&!At(t.byweekno)&&(t.byweekno=[t.byweekno]),!Je(t.byweekday))t.bynweekday=null;else if(xn(t.byweekday))t.byweekday=[t.byweekday],t.bynweekday=null;else if(Ig(t.byweekday))t.byweekday=[ft.fromStr(t.byweekday).weekday],t.bynweekday=null;else if(t.byweekday instanceof ft)!t.byweekday.n||t.freq>ae.MONTHLY?(t.byweekday=[t.byweekday.weekday],t.bynweekday=null):(t.bynweekday=[[t.byweekday.weekday,t.byweekday.n]],t.byweekday=null);else{for(var a=[],o=[],e=0;e<t.byweekday.length;e++){var l=t.byweekday[e];if(xn(l)){a.push(l);continue}else if(Ig(l)){a.push(ft.fromStr(l).weekday);continue}!l.n||t.freq>ae.MONTHLY?a.push(l.weekday):o.push([l.weekday,l.n])}t.byweekday=st(a)?a:null,t.bynweekday=st(o)?o:null}return Je(t.byhour)?xn(t.byhour)&&(t.byhour=[t.byhour]):t.byhour=t.freq<ae.HOURLY?[t.dtstart.getUTCHours()]:null,Je(t.byminute)?xn(t.byminute)&&(t.byminute=[t.byminute]):t.byminute=t.freq<ae.MINUTELY?[t.dtstart.getUTCMinutes()]:null,Je(t.bysecond)?xn(t.bysecond)&&(t.bysecond=[t.bysecond]):t.bysecond=t.freq<ae.SECONDLY?[t.dtstart.getUTCSeconds()]:null,{parsedOptions:t}}function $k(n){var t=n.dtstart.getTime()%1e3;if(!Kl(n.freq))return[];var e=[];return n.byhour.forEach(function(r){n.byminute.forEach(function(i){n.bysecond.forEach(function(s){e.push(new Ya(r,i,s,t))})})}),e}var $g=ee(()=>{yi();bi();rn();Jn();$t();Ms();qc()});function Zl(n){var t=n.split(` `).map(PL).filter(function(e){return e!==null});return Pt(Pt({},t[0]),t[1])}function Xl(n){var t={},e=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(n);if(!e)return t;var r=e[1],i=e[2];return r&&(t.tzid=r),t.dtstart=Vl(i),t}function PL(n){if(n=n.replace(/^\s+|\s+$/,""),!n.length)return null;var t=/^([A-Z]+?)[:;]/.exec(n.toUpperCase());if(!t)return Hk(n);var e=t[1];switch(e.toUpperCase()){case"RRULE":case"EXRULE":return Hk(n);case"DTSTART":return Xl(n);default:throw new Error("Unsupported RFC prop ".concat(e," in ").concat(n))}}function Hk(n){var t=n.replace(/^RRULE:/i,""),e=Xl(t),r=n.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return r.forEach(function(i){var s=i.split("="),a=s[0],o=s[1];switch(a.toUpperCase()){case"FREQ":e.freq=Ae[o.toUpperCase()];break;case"WKST":e.wkst=er[o.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var l=NL(o),u=a.toLowerCase();e[u]=l;break;case"BYWEEKDAY":case"BYDAY":e.byweekday=IL(o);break;case"DTSTART":case"TZID":var c=Xl(n);e.tzid=c.tzid,e.dtstart=c.dtstart;break;case"UNTIL":e.until=Vl(o);break;case"BYEASTER":e.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+a+"'")}}),e}function NL(n){if(n.indexOf(",")!==-1){var t=n.split(",");return t.map(Gk)}return Gk(n)}function Gk(n){return/^[+-]?\d+$/.test(n)?Number(n):n}function IL(n){var t=n.split(",");return t.map(function(e){if(e.length===2)return er[e];var r=e.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!r||r.length<3)throw new SyntaxError("Invalid weekday string: ".concat(e));var i=Number(r[1]),s=r[2],a=er[s].weekday;return new ft(a,i)})}var qg=ee(()=>{yi();bi();Ms();$t();Jn()});var Ns,Hc=ee(()=>{$t();Ns=function(){function n(t,e){if(isNaN(t.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=t,this.tzid=e}return Object.defineProperty(n.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),n.prototype.toString=function(){var t=Fa(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(t):";TZID=".concat(this.tzid,":").concat(t)},n.prototype.getTime=function(){return this.date.getTime()},n.prototype.rezonedDate=function(){return this.isUTC?this.date:Rk(this.date,this.tzid)},n}()});function Jl(n){for(var t=[],e="",r=Object.keys(n),i=Object.keys(Ql),s=0;s<r.length;s++)if(r[s]!=="tzid"&&!!Ie(i,r[s])){var a=r[s].toUpperCase(),o=n[r[s]],l="";if(!(!Je(o)||At(o)&&!o.length)){switch(a){case"FREQ":l=ae.FREQUENCIES[n.freq];break;case"WKST":xn(o)?l=new ft(o).toString():l=o.toString();break;case"BYWEEKDAY":a="BYDAY",l=Dk(o).map(function(p){return p instanceof ft?p:At(p)?new ft(p[0],p[1]):new ft(p)}).toString();break;case"DTSTART":e=FL(o,n.tzid);break;case"UNTIL":l=Fa(o,!n.tzid);break;default:if(At(o)){for(var u=[],c=0;c<o.length;c++)u[c]=String(o[c]);l=u.toString()}else l=String(o)}l&&t.push([a,l])}}var d=t.map(function(p){var b=p[0],T=p[1];return"".concat(b,"=").concat(T.toString())}).join(";"),f="";return d!==""&&(f="RRULE:".concat(d)),[e,f].filter(function(p){return!!p}).join(` -`)}function FL(n,t){return n?"DTSTART"+new Ns(new Date(n),t).toString():""}var Hg=ee(()=>{Jn();nn();Ms();$t();Hc()});function LL(n,t){return Array.isArray(n)?!Array.isArray(t)||n.length!==t.length?!1:n.every(function(e,r){return e.getTime()===t[r].getTime()}):n instanceof Date?t instanceof Date&&n.getTime()===t.getTime():n===t}var Bk,Vk=ee(()=>{Wc();$t();nn();Bk=function(){function n(){this.all=!1,this.before=[],this.after=[],this.between=[]}return n.prototype._cacheAdd=function(t,e,r){e&&(e=e instanceof Date?jc(e):Ug(e)),t==="all"?this.all=e:(r._value=e,this[t].push(r))},n.prototype._cacheGet=function(t,e){var r=!1,i=e?Object.keys(e):[],s=function(c){for(var d=0;d<i.length;d++){var f=i[d];if(!LL(e[f],c[f]))return!0}return!1},a=this[t];if(t==="all")r=this.all;else if(At(a))for(var o=0;o<a.length;o++){var l=a[o];if(!(i.length&&s(l))){r=l._value;break}}if(!r&&this.all){for(var u=new gi(t,e),o=0;o<this.all.length&&u.accept(this.all[o]);o++);r=u.getValue(),this._cacheAdd(t,r,e)}return At(r)?Ug(r):r instanceof Date?jc(r):r},n}()});var zk,Kk,UL,YL,Wi,qt,Qk,Xk,jL,WL,$i,Ht,Zk,Jk,eS,tS,Gg,nS=ee(()=>{yi();nn();zk=Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q([],Ne(1,31),!0),Ne(2,28),!0),Ne(3,31),!0),Ne(4,30),!0),Ne(5,31),!0),Ne(6,30),!0),Ne(7,31),!0),Ne(8,31),!0),Ne(9,30),!0),Ne(10,31),!0),Ne(11,30),!0),Ne(12,31),!0),Ne(1,7),!0),Kk=Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q([],Ne(1,31),!0),Ne(2,29),!0),Ne(3,31),!0),Ne(4,30),!0),Ne(5,31),!0),Ne(6,30),!0),Ne(7,31),!0),Ne(8,31),!0),Ne(9,30),!0),Ne(10,31),!0),Ne(11,30),!0),Ne(12,31),!0),Ne(1,7),!0),UL=Zn(1,29),YL=Zn(1,30),Wi=Zn(1,31),qt=Zn(1,32),Qk=Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q([],qt,!0),YL,!0),qt,!0),Wi,!0),qt,!0),Wi,!0),qt,!0),qt,!0),Wi,!0),qt,!0),Wi,!0),qt,!0),qt.slice(0,7),!0),Xk=Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q([],qt,!0),UL,!0),qt,!0),Wi,!0),qt,!0),Wi,!0),qt,!0),qt,!0),Wi,!0),qt,!0),Wi,!0),qt,!0),qt.slice(0,7),!0),jL=Zn(-28,0),WL=Zn(-29,0),$i=Zn(-30,0),Ht=Zn(-31,0),Zk=Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q([],Ht,!0),WL,!0),Ht,!0),$i,!0),Ht,!0),$i,!0),Ht,!0),Ht,!0),$i,!0),Ht,!0),$i,!0),Ht,!0),Ht.slice(0,7),!0),Jk=Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q([],Ht,!0),jL,!0),Ht,!0),$i,!0),Ht,!0),$i,!0),Ht,!0),Ht,!0),$i,!0),Ht,!0),$i,!0),Ht,!0),Ht.slice(0,7),!0),eS=[0,31,60,91,121,152,182,213,244,274,305,335,366],tS=[0,31,59,90,120,151,181,212,243,273,304,334,365],Gg=function(){for(var n=[],t=0;t<55;t++)n=n.concat(Zn(7));return n}()});function rS(n,t){var e=Hr(n,1,1),r=Ia(n)?366:365,i=Ia(n+1)?366:365,s=Bl(e),a=mi(e),o=Pt(Pt({yearlen:r,nextyearlen:i,yearordinal:s,yearweekday:a},$L(n)),{wnomask:null});if(On(t.byweekno))return o;o.wnomask=Ne(0,r+7);var l,u,c=l=Wt(7-a+t.wkst,7);c>=4?(c=0,u=o.yearlen+Wt(a-t.wkst,7)):u=r-c;for(var d=Math.floor(u/7),f=Wt(u,7),p=Math.floor(d+f/4),b=0;b<t.byweekno.length;b++){var T=t.byweekno[b];if(T<0&&(T+=p+1),T>0&&T<=p){var _=void 0;T>1?(_=c+(T-1)*7,c!==l&&(_-=7-l)):_=c;for(var O=0;O<7&&(o.wnomask[_]=1,_++,o.wdaymask[_]!==t.wkst);O++);}}if(Ie(t.byweekno,1)){var _=c+p*7;if(c!==l&&(_-=7-l),_<r)for(var b=0;b<7&&(o.wnomask[_]=1,_+=1,o.wdaymask[_]!==t.wkst);b++);}if(c){var E=void 0;if(Ie(t.byweekno,-1))E=-1;else{var A=mi(Hr(n-1,1,1)),Y=Wt(7-A.valueOf()+t.wkst,7),q=Ia(n-1)?366:365,se=void 0;Y>=4?(Y=0,se=q+Wt(A-t.wkst,7)):se=r-c,E=Math.floor(52+Wt(se,7)/4)}if(Ie(t.byweekno,E))for(var _=0;_<c;_++)o.wnomask[_]=1}return o}function $L(n){var t=Ia(n)?366:365,e=Hr(n,1,1),r=mi(e);return t===365?{mmask:zk,mdaymask:Xk,nmdaymask:Jk,wdaymask:Gg.slice(r),mrange:tS}:{mmask:Kk,mdaymask:Qk,nmdaymask:Zk,wdaymask:Gg.slice(r),mrange:eS}}var iS=ee(()=>{yi();$t();nn();nS()});function sS(n,t,e,r,i,s){var a={lastyear:n,lastmonth:t,nwdaymask:[]},o=[];if(s.freq===ae.YEARLY)if(On(s.bymonth))o=[[0,e]];else for(var l=0;l<s.bymonth.length;l++)t=s.bymonth[l],o.push(r.slice(t-1,t+1));else s.freq===ae.MONTHLY&&(o=[r.slice(t-1,t+1)]);if(On(o))return a;a.nwdaymask=Ne(0,e);for(var l=0;l<o.length;l++)for(var u=o[l],c=u[0],d=u[1]-1,f=0;f<s.bynweekday.length;f++){var p=void 0,b=s.bynweekday[f],T=b[0],_=b[1];_<0?(p=d+(_+1)*7,p-=Wt(i[p]-T,7)):(p=c+(_-1)*7,p+=Wt(7-i[p]+T,7)),c<=p&&p<=d&&(a.nwdaymask[p]=1)}return a}var aS=ee(()=>{Jn();nn()});function oS(n,t){t===void 0&&(t=0);var e=n%19,r=Math.floor(n/100),i=n%100,s=Math.floor(r/4),a=r%4,o=Math.floor((r+8)/25),l=Math.floor((r-o+1)/3),u=Math.floor(19*e+r-s-l+15)%30,c=Math.floor(i/4),d=i%4,f=Math.floor(32+2*a+2*c-u-d)%7,p=Math.floor((e+11*u+22*f)/451),b=Math.floor((u+f-7*p+114)/31),T=(u+f-7*p+114)%31+1,_=Date.UTC(n,b-1,T+t),O=Date.UTC(n,0,1);return[Math.ceil((_-O)/(1e3*60*60*24))]}var lS=ee(()=>{});var qL,uS,cS=ee(()=>{nn();bi();iS();aS();lS();qc();$t();qL=function(){function n(t){this.options=t}return n.prototype.rebuild=function(t,e){var r=this.options;if(t!==this.lastyear&&(this.yearinfo=rS(t,r)),st(r.bynweekday)&&(e!==this.lastmonth||t!==this.lastyear)){var i=this.yearinfo,s=i.yearlen,a=i.mrange,o=i.wdaymask;this.monthinfo=sS(t,e,s,a,o,r)}Je(r.byeaster)&&(this.eastermask=oS(t,r.byeaster))},Object.defineProperty(n.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),n.prototype.ydayset=function(){return[Zn(this.yearlen),0,this.yearlen]},n.prototype.mdayset=function(t,e){for(var r=this.mrange[e-1],i=this.mrange[e],s=Ne(null,this.yearlen),a=r;a<i;a++)s[a]=a;return[s,r,i]},n.prototype.wdayset=function(t,e,r){for(var i=Ne(null,this.yearlen+7),s=Bl(Hr(t,e,r))-this.yearordinal,a=s,o=0;o<7&&(i[s]=s,++s,this.wdaymask[s]!==this.options.wkst);o++);return[i,a,s]},n.prototype.ddayset=function(t,e,r){var i=Ne(null,this.yearlen),s=Bl(Hr(t,e,r))-this.yearordinal;return i[s]=s,[i,s,s+1]},n.prototype.htimeset=function(t,e,r,i){var s=this,a=[];return this.options.byminute.forEach(function(o){a=a.concat(s.mtimeset(t,o,r,i))}),hi(a),a},n.prototype.mtimeset=function(t,e,r,i){var s=this.options.bysecond.map(function(a){return new Ya(t,e,a,i)});return hi(s),s},n.prototype.stimeset=function(t,e,r,i){return[new Ya(t,e,r,i)]},n.prototype.getdayset=function(t){switch(t){case Ae.YEARLY:return this.ydayset.bind(this);case Ae.MONTHLY:return this.mdayset.bind(this);case Ae.WEEKLY:return this.wdayset.bind(this);case Ae.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},n.prototype.gettimeset=function(t){switch(t){case Ae.HOURLY:return this.htimeset.bind(this);case Ae.MINUTELY:return this.mtimeset.bind(this);case Ae.SECONDLY:return this.stimeset.bind(this)}},n}(),uS=qL});function dS(n,t,e,r,i,s){for(var a=[],o=0;o<n.length;o++){var l=void 0,u=void 0,c=n[o];c<0?(l=Math.floor(c/t.length),u=Wt(c,t.length)):(l=Math.floor((c-1)/t.length),u=Wt(c-1,t.length));for(var d=[],f=e;f<r;f++){var p=s[f];!Je(p)||d.push(p)}var b=void 0;l<0?b=d.slice(l)[0]:b=d[l];var T=t[u],_=Uc(i.yearordinal+b),O=Yc(_,T);Ie(a,O)||a.push(O)}return hi(a),a}var fS=ee(()=>{$t();nn()});function Gc(n,t){var e=t.dtstart,r=t.freq,i=t.interval,s=t.until,a=t.bysetpos,o=t.count;if(o===0||i===0)return Ti(n);var l=jk.fromDate(e),u=new uS(t);u.rebuild(l.year,l.month);for(var c=BL(u,l,t);;){var d=u.getdayset(r)(l.year,l.month,l.day),f=d[0],p=d[1],b=d[2],T=GL(f,p,b,u,t);if(st(a))for(var _=dS(a,c,p,b,u,f),O=0;O<_.length;O++){var E=_[O];if(s&&E>s)return Ti(n);if(E>=e){var A=pS(E,t);if(!n.accept(A)||o&&(--o,!o))return Ti(n)}}else for(var O=p;O<b;O++){var Y=f[O];if(!!Je(Y))for(var q=Uc(u.yearordinal+Y),se=0;se<c.length;se++){var H=c[se],E=Yc(q,H);if(s&&E>s)return Ti(n);if(E>=e){var A=pS(E,t);if(!n.accept(A)||o&&(--o,!o))return Ti(n)}}}if(t.interval===0||(l.add(t,T),l.year>Lc))return Ti(n);Kl(r)||(c=u.gettimeset(r)(l.hour,l.minute,l.second,0)),u.rebuild(l.year,l.month)}}function HL(n,t,e){var r=e.bymonth,i=e.byweekno,s=e.byweekday,a=e.byeaster,o=e.bymonthday,l=e.bynmonthday,u=e.byyearday;return st(r)&&!Ie(r,n.mmask[t])||st(i)&&!n.wnomask[t]||st(s)&&!Ie(s,n.wdaymask[t])||st(n.nwdaymask)&&!n.nwdaymask[t]||a!==null&&!Ie(n.eastermask,t)||(st(o)||st(l))&&!Ie(o,n.mdaymask[t])&&!Ie(l,n.nmdaymask[t])||st(u)&&(t<n.yearlen&&!Ie(u,t+1)&&!Ie(u,-n.yearlen+t)||t>=n.yearlen&&!Ie(u,t+1-n.yearlen)&&!Ie(u,-n.nextyearlen+t-n.yearlen))}function pS(n,t){return new Ns(n,t.tzid).rezonedDate()}function Ti(n){return n.getValue()}function GL(n,t,e,r,i){for(var s=!1,a=t;a<e;a++){var o=n[a];s=HL(r,o,i),s&&(n[o]=null)}return s}function BL(n,t,e){var r=e.freq,i=e.byhour,s=e.byminute,a=e.bysecond;return Kl(r)?$k(e):r>=ae.HOURLY&&st(i)&&!Ie(i,t.hour)||r>=ae.MINUTELY&&st(s)&&!Ie(s,t.minute)||r>=ae.SECONDLY&&st(a)&&!Ie(a,t.second)?[]:n.gettimeset(r)(t.hour,t.minute,t.second,t.millisecond)}var Bg=ee(()=>{bi();$t();cS();Jn();$g();nn();Hc();fS();qc()});var er,Ql,qk,ae,Jn=ee(()=>{$t();Wc();Ak();Yk();bi();$g();qg();Hg();Vk();Ms();Bg();er={MO:new ft(0),TU:new ft(1),WE:new ft(2),TH:new ft(3),FR:new ft(4),SA:new ft(5),SU:new ft(6)},Ql={freq:Ae.YEARLY,dtstart:null,interval:1,wkst:er.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},qk=Object.keys(Ql),ae=function(){function n(t,e){t===void 0&&(t={}),e===void 0&&(e=!1),this._cache=e?null:new Bk,this.origOptions=Wg(t);var r=Wk(t).parsedOptions;this.options=r}return n.parseText=function(t,e){return zl(t,e)},n.fromText=function(t,e){return Fk(t,e)},n.fromString=function(t){return new n(n.parseString(t)||void 0)},n.prototype._iter=function(t){return Gc(t,this.options)},n.prototype._cacheGet=function(t,e){return this._cache?this._cache._cacheGet(t,e):!1},n.prototype._cacheAdd=function(t,e,r){if(!!this._cache)return this._cache._cacheAdd(t,e,r)},n.prototype.all=function(t){if(t)return this._iter(new jg("all",{},t));var e=this._cacheGet("all");return e===!1&&(e=this._iter(new gi("all",{})),this._cacheAdd("all",e)),e},n.prototype.between=function(t,e,r,i){if(r===void 0&&(r=!1),!As(t)||!As(e))throw new Error("Invalid date passed in to RRule.between");var s={before:e,after:t,inc:r};if(i)return this._iter(new jg("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new gi("between",s)),this._cacheAdd("between",a,s)),a},n.prototype.before=function(t,e){if(e===void 0&&(e=!1),!As(t))throw new Error("Invalid date passed in to RRule.before");var r={dt:t,inc:e},i=this._cacheGet("before",r);return i===!1&&(i=this._iter(new gi("before",r)),this._cacheAdd("before",i,r)),i},n.prototype.after=function(t,e){if(e===void 0&&(e=!1),!As(t))throw new Error("Invalid date passed in to RRule.after");var r={dt:t,inc:e},i=this._cacheGet("after",r);return i===!1&&(i=this._iter(new gi("after",r)),this._cacheAdd("after",i,r)),i},n.prototype.count=function(){return this.all().length},n.prototype.toString=function(){return Jl(this.origOptions)},n.prototype.toText=function(t,e,r){return Lk(this,t,e,r)},n.prototype.isFullyConvertibleToText=function(){return Uk(this)},n.prototype.clone=function(){return new n(this.origOptions)},n.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],n.YEARLY=Ae.YEARLY,n.MONTHLY=Ae.MONTHLY,n.WEEKLY=Ae.WEEKLY,n.DAILY=Ae.DAILY,n.HOURLY=Ae.HOURLY,n.MINUTELY=Ae.MINUTELY,n.SECONDLY=Ae.SECONDLY,n.MO=er.MO,n.TU=er.TU,n.WE=er.WE,n.TH=er.TH,n.FR=er.FR,n.SA=er.SA,n.SU=er.SU,n.parseString=Zl,n.optionsToString=Jl,n}()});function mS(n,t,e,r,i,s){var a={},o=n.accept;function l(f,p){e.forEach(function(b){b.between(f,p,!0).forEach(function(T){a[Number(T)]=!0})})}i.forEach(function(f){var p=new Ns(f,s).rezonedDate();a[Number(p)]=!0}),n.accept=function(f){var p=Number(f);return isNaN(p)?o.call(this,f):!a[p]&&(l(new Date(p-1),new Date(p+1)),!a[p])?(a[p]=!0,o.call(this,f)):!0},n.method==="between"&&(l(n.args.after,n.args.before),n.accept=function(f){var p=Number(f);return a[p]?!0:(a[p]=!0,o.call(this,f))});for(var u=0;u<r.length;u++){var c=new Ns(r[u],s).rezonedDate();if(!n.accept(new Date(c.getTime())))break}t.forEach(function(f){Gc(n,f.options)});var d=n._result;switch(hi(d),n.method){case"all":case"between":return d;case"before":return d.length&&d[d.length-1]||null;case"after":default:return d.length&&d[0]||null}}var hS=ee(()=>{Hc();Bg();$t()});function VL(n,t){var e=[],r=[],i=[],s=[],a=Xl(n),o=a.dtstart,l=a.tzid,u=ZL(n,t.unfold);return u.forEach(function(c){var d;if(!!c){var f=XL(c),p=f.name,b=f.parms,T=f.value;switch(p.toUpperCase()){case"RRULE":if(b.length)throw new Error("unsupported RRULE parm: ".concat(b.join(",")));e.push(Zl(c));break;case"RDATE":var _=(d=/RDATE(?:;TZID=([^:=]+))?/i.exec(c))!==null&&d!==void 0?d:[],O=_[1];O&&!l&&(l=O),r=r.concat(yS(T,b));break;case"EXRULE":if(b.length)throw new Error("unsupported EXRULE parm: ".concat(b.join(",")));i.push(Zl(T));break;case"EXDATE":s=s.concat(yS(T,b));break;case"DTSTART":break;default:throw new Error("unsupported property: "+p)}}}),{dtstart:o,tzid:l,rrulevals:e,rdatevals:r,exrulevals:i,exdatevals:s}}function zL(n,t){var e=VL(n,t),r=e.rrulevals,i=e.rdatevals,s=e.exrulevals,a=e.exdatevals,o=e.dtstart,l=e.tzid,u=t.cache===!1;if(t.compatible&&(t.forceset=!0,t.unfold=!0),t.forceset||r.length>1||i.length||s.length||a.length){var c=new Kg(u);return c.dtstart(o),c.tzid(l||void 0),r.forEach(function(f){c.rrule(new ae(Vg(f,o,l),u))}),i.forEach(function(f){c.rdate(f)}),s.forEach(function(f){c.exrule(new ae(Vg(f,o,l),u))}),a.forEach(function(f){c.exdate(f)}),t.compatible&&t.dtstart&&c.rdate(o),c}var d=r[0]||{};return new ae(Vg(d,d.dtstart||t.dtstart||o,d.tzid||t.tzid||l),u)}function Bc(n,t){return t===void 0&&(t={}),zL(n,KL(t))}function Vg(n,t,e){return Pt(Pt({},n),{dtstart:t,tzid:e})}function KL(n){var t=[],e=Object.keys(n),r=Object.keys(gS);if(e.forEach(function(i){Ie(r,i)||t.push(i)}),t.length)throw new Error("Invalid options: "+t.join(", "));return Pt(Pt({},gS),n)}function QL(n){if(n.indexOf(":")===-1)return{name:"RRULE",value:n};var t=Ek(n,":",1),e=t[0],r=t[1];return{name:e,value:r}}function XL(n){var t=QL(n),e=t.name,r=t.value,i=e.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:r}}function ZL(n,t){if(t===void 0&&(t=!1),n=n&&n.trim(),!n)throw new Error("Invalid empty string");if(!t)return n.split(/\s/);for(var e=n.split(` -`),r=0;r<e.length;){var i=e[r]=e[r].replace(/\s+$/g,"");i?r>0&&i[0]===" "?(e[r-1]+=i.slice(1),e.splice(r,1)):r+=1:e.splice(r,1)}return e}function JL(n){n.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error("unsupported RDATE/EXDATE parm: "+t)})}function yS(n,t){return JL(t),n.split(",").map(function(e){return Vl(e)})}var gS,zg=ee(()=>{yi();Jn();Qg();$t();nn();qg();gS={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null}});function bS(n){var t=this;return function(e){if(e!==void 0&&(t["_".concat(n)]=e),t["_".concat(n)]!==void 0)return t["_".concat(n)];for(var r=0;r<t._rrule.length;r++){var i=t._rrule[r].origOptions[n];if(i)return i}}}function TS(n,t){if(!(n instanceof ae))throw new TypeError(String(n)+" is not RRule instance");Ie(t.map(String),String(n))||t.push(n)}function _S(n,t){if(!(n instanceof Date))throw new TypeError(String(n)+" is not Date instance");Ie(t.map(Number),Number(n))||(t.push(n),hi(t))}function vS(n,t,e){var r=!e||e.toUpperCase()==="UTC",i=r?"".concat(n,":"):"".concat(n,";TZID=").concat(e,":"),s=t.map(function(a){return Fa(a.valueOf(),r)}).join(",");return"".concat(i).concat(s)}var Kg,Qg=ee(()=>{yi();Jn();$t();nn();hS();zg();Hg();Kg=function(n){La(t,n);function t(e){e===void 0&&(e=!1);var r=n.call(this,{},e)||this;return r.dtstart=bS.apply(r,["dtstart"]),r.tzid=bS.apply(r,["tzid"]),r._rrule=[],r._rdate=[],r._exrule=[],r._exdate=[],r}return t.prototype._iter=function(e){return mS(e,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(e){TS(e,this._rrule)},t.prototype.exrule=function(e){TS(e,this._exrule)},t.prototype.rdate=function(e){_S(e,this._rdate)},t.prototype.exdate=function(e){_S(e,this._exdate)},t.prototype.rrules=function(){return this._rrule.map(function(e){return Bc(e.toString())})},t.prototype.exrules=function(){return this._exrule.map(function(e){return Bc(e.toString())})},t.prototype.rdates=function(){return this._rdate.map(function(e){return new Date(e.getTime())})},t.prototype.exdates=function(){return this._exdate.map(function(e){return new Date(e.getTime())})},t.prototype.valueOf=function(){var e=[];return!this._rrule.length&&this._dtstart&&(e=e.concat(Jl({dtstart:this._dtstart}))),this._rrule.forEach(function(r){e=e.concat(r.toString().split(` +`)}function FL(n,t){return n?"DTSTART"+new Ns(new Date(n),t).toString():""}var Hg=ee(()=>{Jn();rn();Ms();$t();Hc()});function LL(n,t){return Array.isArray(n)?!Array.isArray(t)||n.length!==t.length?!1:n.every(function(e,r){return e.getTime()===t[r].getTime()}):n instanceof Date?t instanceof Date&&n.getTime()===t.getTime():n===t}var Bk,Vk=ee(()=>{Wc();$t();rn();Bk=function(){function n(){this.all=!1,this.before=[],this.after=[],this.between=[]}return n.prototype._cacheAdd=function(t,e,r){e&&(e=e instanceof Date?jc(e):Ug(e)),t==="all"?this.all=e:(r._value=e,this[t].push(r))},n.prototype._cacheGet=function(t,e){var r=!1,i=e?Object.keys(e):[],s=function(c){for(var d=0;d<i.length;d++){var f=i[d];if(!LL(e[f],c[f]))return!0}return!1},a=this[t];if(t==="all")r=this.all;else if(At(a))for(var o=0;o<a.length;o++){var l=a[o];if(!(i.length&&s(l))){r=l._value;break}}if(!r&&this.all){for(var u=new gi(t,e),o=0;o<this.all.length&&u.accept(this.all[o]);o++);r=u.getValue(),this._cacheAdd(t,r,e)}return At(r)?Ug(r):r instanceof Date?jc(r):r},n}()});var zk,Kk,UL,YL,Wi,qt,Qk,Xk,jL,WL,$i,Ht,Zk,Jk,eS,tS,Gg,nS=ee(()=>{yi();rn();zk=Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q([],Ne(1,31),!0),Ne(2,28),!0),Ne(3,31),!0),Ne(4,30),!0),Ne(5,31),!0),Ne(6,30),!0),Ne(7,31),!0),Ne(8,31),!0),Ne(9,30),!0),Ne(10,31),!0),Ne(11,30),!0),Ne(12,31),!0),Ne(1,7),!0),Kk=Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q([],Ne(1,31),!0),Ne(2,29),!0),Ne(3,31),!0),Ne(4,30),!0),Ne(5,31),!0),Ne(6,30),!0),Ne(7,31),!0),Ne(8,31),!0),Ne(9,30),!0),Ne(10,31),!0),Ne(11,30),!0),Ne(12,31),!0),Ne(1,7),!0),UL=Zn(1,29),YL=Zn(1,30),Wi=Zn(1,31),qt=Zn(1,32),Qk=Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q([],qt,!0),YL,!0),qt,!0),Wi,!0),qt,!0),Wi,!0),qt,!0),qt,!0),Wi,!0),qt,!0),Wi,!0),qt,!0),qt.slice(0,7),!0),Xk=Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q([],qt,!0),UL,!0),qt,!0),Wi,!0),qt,!0),Wi,!0),qt,!0),qt,!0),Wi,!0),qt,!0),Wi,!0),qt,!0),qt.slice(0,7),!0),jL=Zn(-28,0),WL=Zn(-29,0),$i=Zn(-30,0),Ht=Zn(-31,0),Zk=Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q([],Ht,!0),WL,!0),Ht,!0),$i,!0),Ht,!0),$i,!0),Ht,!0),Ht,!0),$i,!0),Ht,!0),$i,!0),Ht,!0),Ht.slice(0,7),!0),Jk=Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q([],Ht,!0),jL,!0),Ht,!0),$i,!0),Ht,!0),$i,!0),Ht,!0),Ht,!0),$i,!0),Ht,!0),$i,!0),Ht,!0),Ht.slice(0,7),!0),eS=[0,31,60,91,121,152,182,213,244,274,305,335,366],tS=[0,31,59,90,120,151,181,212,243,273,304,334,365],Gg=function(){for(var n=[],t=0;t<55;t++)n=n.concat(Zn(7));return n}()});function rS(n,t){var e=Hr(n,1,1),r=Ia(n)?366:365,i=Ia(n+1)?366:365,s=Bl(e),a=mi(e),o=Pt(Pt({yearlen:r,nextyearlen:i,yearordinal:s,yearweekday:a},$L(n)),{wnomask:null});if(On(t.byweekno))return o;o.wnomask=Ne(0,r+7);var l,u,c=l=Wt(7-a+t.wkst,7);c>=4?(c=0,u=o.yearlen+Wt(a-t.wkst,7)):u=r-c;for(var d=Math.floor(u/7),f=Wt(u,7),p=Math.floor(d+f/4),b=0;b<t.byweekno.length;b++){var T=t.byweekno[b];if(T<0&&(T+=p+1),T>0&&T<=p){var _=void 0;T>1?(_=c+(T-1)*7,c!==l&&(_-=7-l)):_=c;for(var O=0;O<7&&(o.wnomask[_]=1,_++,o.wdaymask[_]!==t.wkst);O++);}}if(Ie(t.byweekno,1)){var _=c+p*7;if(c!==l&&(_-=7-l),_<r)for(var b=0;b<7&&(o.wnomask[_]=1,_+=1,o.wdaymask[_]!==t.wkst);b++);}if(c){var E=void 0;if(Ie(t.byweekno,-1))E=-1;else{var A=mi(Hr(n-1,1,1)),Y=Wt(7-A.valueOf()+t.wkst,7),q=Ia(n-1)?366:365,se=void 0;Y>=4?(Y=0,se=q+Wt(A-t.wkst,7)):se=r-c,E=Math.floor(52+Wt(se,7)/4)}if(Ie(t.byweekno,E))for(var _=0;_<c;_++)o.wnomask[_]=1}return o}function $L(n){var t=Ia(n)?366:365,e=Hr(n,1,1),r=mi(e);return t===365?{mmask:zk,mdaymask:Xk,nmdaymask:Jk,wdaymask:Gg.slice(r),mrange:tS}:{mmask:Kk,mdaymask:Qk,nmdaymask:Zk,wdaymask:Gg.slice(r),mrange:eS}}var iS=ee(()=>{yi();$t();rn();nS()});function sS(n,t,e,r,i,s){var a={lastyear:n,lastmonth:t,nwdaymask:[]},o=[];if(s.freq===ae.YEARLY)if(On(s.bymonth))o=[[0,e]];else for(var l=0;l<s.bymonth.length;l++)t=s.bymonth[l],o.push(r.slice(t-1,t+1));else s.freq===ae.MONTHLY&&(o=[r.slice(t-1,t+1)]);if(On(o))return a;a.nwdaymask=Ne(0,e);for(var l=0;l<o.length;l++)for(var u=o[l],c=u[0],d=u[1]-1,f=0;f<s.bynweekday.length;f++){var p=void 0,b=s.bynweekday[f],T=b[0],_=b[1];_<0?(p=d+(_+1)*7,p-=Wt(i[p]-T,7)):(p=c+(_-1)*7,p+=Wt(7-i[p]+T,7)),c<=p&&p<=d&&(a.nwdaymask[p]=1)}return a}var aS=ee(()=>{Jn();rn()});function oS(n,t){t===void 0&&(t=0);var e=n%19,r=Math.floor(n/100),i=n%100,s=Math.floor(r/4),a=r%4,o=Math.floor((r+8)/25),l=Math.floor((r-o+1)/3),u=Math.floor(19*e+r-s-l+15)%30,c=Math.floor(i/4),d=i%4,f=Math.floor(32+2*a+2*c-u-d)%7,p=Math.floor((e+11*u+22*f)/451),b=Math.floor((u+f-7*p+114)/31),T=(u+f-7*p+114)%31+1,_=Date.UTC(n,b-1,T+t),O=Date.UTC(n,0,1);return[Math.ceil((_-O)/(1e3*60*60*24))]}var lS=ee(()=>{});var qL,uS,cS=ee(()=>{rn();bi();iS();aS();lS();qc();$t();qL=function(){function n(t){this.options=t}return n.prototype.rebuild=function(t,e){var r=this.options;if(t!==this.lastyear&&(this.yearinfo=rS(t,r)),st(r.bynweekday)&&(e!==this.lastmonth||t!==this.lastyear)){var i=this.yearinfo,s=i.yearlen,a=i.mrange,o=i.wdaymask;this.monthinfo=sS(t,e,s,a,o,r)}Je(r.byeaster)&&(this.eastermask=oS(t,r.byeaster))},Object.defineProperty(n.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),n.prototype.ydayset=function(){return[Zn(this.yearlen),0,this.yearlen]},n.prototype.mdayset=function(t,e){for(var r=this.mrange[e-1],i=this.mrange[e],s=Ne(null,this.yearlen),a=r;a<i;a++)s[a]=a;return[s,r,i]},n.prototype.wdayset=function(t,e,r){for(var i=Ne(null,this.yearlen+7),s=Bl(Hr(t,e,r))-this.yearordinal,a=s,o=0;o<7&&(i[s]=s,++s,this.wdaymask[s]!==this.options.wkst);o++);return[i,a,s]},n.prototype.ddayset=function(t,e,r){var i=Ne(null,this.yearlen),s=Bl(Hr(t,e,r))-this.yearordinal;return i[s]=s,[i,s,s+1]},n.prototype.htimeset=function(t,e,r,i){var s=this,a=[];return this.options.byminute.forEach(function(o){a=a.concat(s.mtimeset(t,o,r,i))}),hi(a),a},n.prototype.mtimeset=function(t,e,r,i){var s=this.options.bysecond.map(function(a){return new Ya(t,e,a,i)});return hi(s),s},n.prototype.stimeset=function(t,e,r,i){return[new Ya(t,e,r,i)]},n.prototype.getdayset=function(t){switch(t){case Ae.YEARLY:return this.ydayset.bind(this);case Ae.MONTHLY:return this.mdayset.bind(this);case Ae.WEEKLY:return this.wdayset.bind(this);case Ae.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},n.prototype.gettimeset=function(t){switch(t){case Ae.HOURLY:return this.htimeset.bind(this);case Ae.MINUTELY:return this.mtimeset.bind(this);case Ae.SECONDLY:return this.stimeset.bind(this)}},n}(),uS=qL});function dS(n,t,e,r,i,s){for(var a=[],o=0;o<n.length;o++){var l=void 0,u=void 0,c=n[o];c<0?(l=Math.floor(c/t.length),u=Wt(c,t.length)):(l=Math.floor((c-1)/t.length),u=Wt(c-1,t.length));for(var d=[],f=e;f<r;f++){var p=s[f];!Je(p)||d.push(p)}var b=void 0;l<0?b=d.slice(l)[0]:b=d[l];var T=t[u],_=Uc(i.yearordinal+b),O=Yc(_,T);Ie(a,O)||a.push(O)}return hi(a),a}var fS=ee(()=>{$t();rn()});function Gc(n,t){var e=t.dtstart,r=t.freq,i=t.interval,s=t.until,a=t.bysetpos,o=t.count;if(o===0||i===0)return Ti(n);var l=jk.fromDate(e),u=new uS(t);u.rebuild(l.year,l.month);for(var c=BL(u,l,t);;){var d=u.getdayset(r)(l.year,l.month,l.day),f=d[0],p=d[1],b=d[2],T=GL(f,p,b,u,t);if(st(a))for(var _=dS(a,c,p,b,u,f),O=0;O<_.length;O++){var E=_[O];if(s&&E>s)return Ti(n);if(E>=e){var A=pS(E,t);if(!n.accept(A)||o&&(--o,!o))return Ti(n)}}else for(var O=p;O<b;O++){var Y=f[O];if(!!Je(Y))for(var q=Uc(u.yearordinal+Y),se=0;se<c.length;se++){var H=c[se],E=Yc(q,H);if(s&&E>s)return Ti(n);if(E>=e){var A=pS(E,t);if(!n.accept(A)||o&&(--o,!o))return Ti(n)}}}if(t.interval===0||(l.add(t,T),l.year>Lc))return Ti(n);Kl(r)||(c=u.gettimeset(r)(l.hour,l.minute,l.second,0)),u.rebuild(l.year,l.month)}}function HL(n,t,e){var r=e.bymonth,i=e.byweekno,s=e.byweekday,a=e.byeaster,o=e.bymonthday,l=e.bynmonthday,u=e.byyearday;return st(r)&&!Ie(r,n.mmask[t])||st(i)&&!n.wnomask[t]||st(s)&&!Ie(s,n.wdaymask[t])||st(n.nwdaymask)&&!n.nwdaymask[t]||a!==null&&!Ie(n.eastermask,t)||(st(o)||st(l))&&!Ie(o,n.mdaymask[t])&&!Ie(l,n.nmdaymask[t])||st(u)&&(t<n.yearlen&&!Ie(u,t+1)&&!Ie(u,-n.yearlen+t)||t>=n.yearlen&&!Ie(u,t+1-n.yearlen)&&!Ie(u,-n.nextyearlen+t-n.yearlen))}function pS(n,t){return new Ns(n,t.tzid).rezonedDate()}function Ti(n){return n.getValue()}function GL(n,t,e,r,i){for(var s=!1,a=t;a<e;a++){var o=n[a];s=HL(r,o,i),s&&(n[o]=null)}return s}function BL(n,t,e){var r=e.freq,i=e.byhour,s=e.byminute,a=e.bysecond;return Kl(r)?$k(e):r>=ae.HOURLY&&st(i)&&!Ie(i,t.hour)||r>=ae.MINUTELY&&st(s)&&!Ie(s,t.minute)||r>=ae.SECONDLY&&st(a)&&!Ie(a,t.second)?[]:n.gettimeset(r)(t.hour,t.minute,t.second,t.millisecond)}var Bg=ee(()=>{bi();$t();cS();Jn();$g();rn();Hc();fS();qc()});var er,Ql,qk,ae,Jn=ee(()=>{$t();Wc();Ak();Yk();bi();$g();qg();Hg();Vk();Ms();Bg();er={MO:new ft(0),TU:new ft(1),WE:new ft(2),TH:new ft(3),FR:new ft(4),SA:new ft(5),SU:new ft(6)},Ql={freq:Ae.YEARLY,dtstart:null,interval:1,wkst:er.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},qk=Object.keys(Ql),ae=function(){function n(t,e){t===void 0&&(t={}),e===void 0&&(e=!1),this._cache=e?null:new Bk,this.origOptions=Wg(t);var r=Wk(t).parsedOptions;this.options=r}return n.parseText=function(t,e){return zl(t,e)},n.fromText=function(t,e){return Fk(t,e)},n.fromString=function(t){return new n(n.parseString(t)||void 0)},n.prototype._iter=function(t){return Gc(t,this.options)},n.prototype._cacheGet=function(t,e){return this._cache?this._cache._cacheGet(t,e):!1},n.prototype._cacheAdd=function(t,e,r){if(!!this._cache)return this._cache._cacheAdd(t,e,r)},n.prototype.all=function(t){if(t)return this._iter(new jg("all",{},t));var e=this._cacheGet("all");return e===!1&&(e=this._iter(new gi("all",{})),this._cacheAdd("all",e)),e},n.prototype.between=function(t,e,r,i){if(r===void 0&&(r=!1),!As(t)||!As(e))throw new Error("Invalid date passed in to RRule.between");var s={before:e,after:t,inc:r};if(i)return this._iter(new jg("between",s,i));var a=this._cacheGet("between",s);return a===!1&&(a=this._iter(new gi("between",s)),this._cacheAdd("between",a,s)),a},n.prototype.before=function(t,e){if(e===void 0&&(e=!1),!As(t))throw new Error("Invalid date passed in to RRule.before");var r={dt:t,inc:e},i=this._cacheGet("before",r);return i===!1&&(i=this._iter(new gi("before",r)),this._cacheAdd("before",i,r)),i},n.prototype.after=function(t,e){if(e===void 0&&(e=!1),!As(t))throw new Error("Invalid date passed in to RRule.after");var r={dt:t,inc:e},i=this._cacheGet("after",r);return i===!1&&(i=this._iter(new gi("after",r)),this._cacheAdd("after",i,r)),i},n.prototype.count=function(){return this.all().length},n.prototype.toString=function(){return Jl(this.origOptions)},n.prototype.toText=function(t,e,r){return Lk(this,t,e,r)},n.prototype.isFullyConvertibleToText=function(){return Uk(this)},n.prototype.clone=function(){return new n(this.origOptions)},n.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],n.YEARLY=Ae.YEARLY,n.MONTHLY=Ae.MONTHLY,n.WEEKLY=Ae.WEEKLY,n.DAILY=Ae.DAILY,n.HOURLY=Ae.HOURLY,n.MINUTELY=Ae.MINUTELY,n.SECONDLY=Ae.SECONDLY,n.MO=er.MO,n.TU=er.TU,n.WE=er.WE,n.TH=er.TH,n.FR=er.FR,n.SA=er.SA,n.SU=er.SU,n.parseString=Zl,n.optionsToString=Jl,n}()});function mS(n,t,e,r,i,s){var a={},o=n.accept;function l(f,p){e.forEach(function(b){b.between(f,p,!0).forEach(function(T){a[Number(T)]=!0})})}i.forEach(function(f){var p=new Ns(f,s).rezonedDate();a[Number(p)]=!0}),n.accept=function(f){var p=Number(f);return isNaN(p)?o.call(this,f):!a[p]&&(l(new Date(p-1),new Date(p+1)),!a[p])?(a[p]=!0,o.call(this,f)):!0},n.method==="between"&&(l(n.args.after,n.args.before),n.accept=function(f){var p=Number(f);return a[p]?!0:(a[p]=!0,o.call(this,f))});for(var u=0;u<r.length;u++){var c=new Ns(r[u],s).rezonedDate();if(!n.accept(new Date(c.getTime())))break}t.forEach(function(f){Gc(n,f.options)});var d=n._result;switch(hi(d),n.method){case"all":case"between":return d;case"before":return d.length&&d[d.length-1]||null;case"after":default:return d.length&&d[0]||null}}var hS=ee(()=>{Hc();Bg();$t()});function VL(n,t){var e=[],r=[],i=[],s=[],a=Xl(n),o=a.dtstart,l=a.tzid,u=ZL(n,t.unfold);return u.forEach(function(c){var d;if(!!c){var f=XL(c),p=f.name,b=f.parms,T=f.value;switch(p.toUpperCase()){case"RRULE":if(b.length)throw new Error("unsupported RRULE parm: ".concat(b.join(",")));e.push(Zl(c));break;case"RDATE":var _=(d=/RDATE(?:;TZID=([^:=]+))?/i.exec(c))!==null&&d!==void 0?d:[],O=_[1];O&&!l&&(l=O),r=r.concat(yS(T,b));break;case"EXRULE":if(b.length)throw new Error("unsupported EXRULE parm: ".concat(b.join(",")));i.push(Zl(T));break;case"EXDATE":s=s.concat(yS(T,b));break;case"DTSTART":break;default:throw new Error("unsupported property: "+p)}}}),{dtstart:o,tzid:l,rrulevals:e,rdatevals:r,exrulevals:i,exdatevals:s}}function zL(n,t){var e=VL(n,t),r=e.rrulevals,i=e.rdatevals,s=e.exrulevals,a=e.exdatevals,o=e.dtstart,l=e.tzid,u=t.cache===!1;if(t.compatible&&(t.forceset=!0,t.unfold=!0),t.forceset||r.length>1||i.length||s.length||a.length){var c=new Kg(u);return c.dtstart(o),c.tzid(l||void 0),r.forEach(function(f){c.rrule(new ae(Vg(f,o,l),u))}),i.forEach(function(f){c.rdate(f)}),s.forEach(function(f){c.exrule(new ae(Vg(f,o,l),u))}),a.forEach(function(f){c.exdate(f)}),t.compatible&&t.dtstart&&c.rdate(o),c}var d=r[0]||{};return new ae(Vg(d,d.dtstart||t.dtstart||o,d.tzid||t.tzid||l),u)}function Bc(n,t){return t===void 0&&(t={}),zL(n,KL(t))}function Vg(n,t,e){return Pt(Pt({},n),{dtstart:t,tzid:e})}function KL(n){var t=[],e=Object.keys(n),r=Object.keys(gS);if(e.forEach(function(i){Ie(r,i)||t.push(i)}),t.length)throw new Error("Invalid options: "+t.join(", "));return Pt(Pt({},gS),n)}function QL(n){if(n.indexOf(":")===-1)return{name:"RRULE",value:n};var t=Ek(n,":",1),e=t[0],r=t[1];return{name:e,value:r}}function XL(n){var t=QL(n),e=t.name,r=t.value,i=e.split(";");if(!i)throw new Error("empty property name");return{name:i[0].toUpperCase(),parms:i.slice(1),value:r}}function ZL(n,t){if(t===void 0&&(t=!1),n=n&&n.trim(),!n)throw new Error("Invalid empty string");if(!t)return n.split(/\s/);for(var e=n.split(` +`),r=0;r<e.length;){var i=e[r]=e[r].replace(/\s+$/g,"");i?r>0&&i[0]===" "?(e[r-1]+=i.slice(1),e.splice(r,1)):r+=1:e.splice(r,1)}return e}function JL(n){n.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error("unsupported RDATE/EXDATE parm: "+t)})}function yS(n,t){return JL(t),n.split(",").map(function(e){return Vl(e)})}var gS,zg=ee(()=>{yi();Jn();Qg();$t();rn();qg();gS={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null}});function bS(n){var t=this;return function(e){if(e!==void 0&&(t["_".concat(n)]=e),t["_".concat(n)]!==void 0)return t["_".concat(n)];for(var r=0;r<t._rrule.length;r++){var i=t._rrule[r].origOptions[n];if(i)return i}}}function TS(n,t){if(!(n instanceof ae))throw new TypeError(String(n)+" is not RRule instance");Ie(t.map(String),String(n))||t.push(n)}function _S(n,t){if(!(n instanceof Date))throw new TypeError(String(n)+" is not Date instance");Ie(t.map(Number),Number(n))||(t.push(n),hi(t))}function vS(n,t,e){var r=!e||e.toUpperCase()==="UTC",i=r?"".concat(n,":"):"".concat(n,";TZID=").concat(e,":"),s=t.map(function(a){return Fa(a.valueOf(),r)}).join(",");return"".concat(i).concat(s)}var Kg,Qg=ee(()=>{yi();Jn();$t();rn();hS();zg();Hg();Kg=function(n){La(t,n);function t(e){e===void 0&&(e=!1);var r=n.call(this,{},e)||this;return r.dtstart=bS.apply(r,["dtstart"]),r.tzid=bS.apply(r,["tzid"]),r._rrule=[],r._rdate=[],r._exrule=[],r._exdate=[],r}return t.prototype._iter=function(e){return mS(e,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(e){TS(e,this._rrule)},t.prototype.exrule=function(e){TS(e,this._exrule)},t.prototype.rdate=function(e){_S(e,this._rdate)},t.prototype.exdate=function(e){_S(e,this._exdate)},t.prototype.rrules=function(){return this._rrule.map(function(e){return Bc(e.toString())})},t.prototype.exrules=function(){return this._exrule.map(function(e){return Bc(e.toString())})},t.prototype.rdates=function(){return this._rdate.map(function(e){return new Date(e.getTime())})},t.prototype.exdates=function(){return this._exdate.map(function(e){return new Date(e.getTime())})},t.prototype.valueOf=function(){var e=[];return!this._rrule.length&&this._dtstart&&(e=e.concat(Jl({dtstart:this._dtstart}))),this._rrule.forEach(function(r){e=e.concat(r.toString().split(` `))}),this._exrule.forEach(function(r){e=e.concat(r.toString().split(` `).map(function(i){return i.replace(/^RRULE:/,"EXRULE:")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&e.push(vS("RDATE",this._rdate,this.tzid())),this._exdate.length&&e.push(vS("EXDATE",this._exdate,this.tzid())),e},t.prototype.toString=function(){return this.valueOf().join(` `)},t.prototype.clone=function(){var e=new t(!!this._cache);return this._rrule.forEach(function(r){return e.rrule(r.clone())}),this._exrule.forEach(function(r){return e.exrule(r.clone())}),this._rdate.forEach(function(r){return e.rdate(new Date(r.getTime()))}),this._exdate.forEach(function(r){return e.exdate(new Date(r.getTime()))}),e},t}(ae)});var wS=ee(()=>{Jn();Qg();zg();bi();Ms();$t()});var Dt,Vc=ee(()=>{"use strict";wS();Dt=class{constructor({rrule:t,baseOnToday:e,occurrence:r}){this.rrule=t,this.baseOnToday=e,this.occurrence=r}static fromText({recurrenceRuleText:t,occurrence:e}){try{let r=t.match(/^([a-zA-Z0-9, !]+?)( when done)?$/i);if(r==null)return null;let i=r[1].trim(),s=r[2]!==void 0,a=ae.parseText(i);if(a!==null){let o=e.referenceDate;!s&&o!==null?a.dtstart=window.moment(o).startOf("day").utc(!0).toDate():a.dtstart=window.moment().startOf("day").utc(!0).toDate();let l=new ae(a);return new Dt({rrule:l,baseOnToday:s,occurrence:e})}}catch(r){r instanceof Error&&console.log(r.message)}return null}toText(){let t=this.rrule.toText();return this.baseOnToday&&(t+=" when done"),t}next(t=window.moment(),e=!1){let r=this.nextReferenceDate(t);return r===null?null:this.occurrence.next(r,e)}identicalTo(t){return this.baseOnToday!==t.baseOnToday||!this.occurrence.isIdenticalTo(t.occurrence)?!1:this.toText()===t.toText()}nextReferenceDate(t){return this.baseOnToday?this.nextReferenceDateFromToday(t.clone()).toDate():this.nextReferenceDateFromOriginalReferenceDate().toDate()}nextReferenceDateFromToday(t){let e=new ae(de(U({},this.rrule.origOptions),{dtstart:t.startOf("day").utc(!0).toDate()}));return this.nextAfter(t.endOf("day"),e)}nextReferenceDateFromOriginalReferenceDate(){var e;let t=window.moment((e=this.occurrence.referenceDate)!=null?e:void 0).endOf("day");return this.nextAfter(t,this.rrule)}nextAfter(t,e){t.utc(!0);let r=window.moment.utc(e.after(t.toDate())),i=this.toText(),s=i.match(/every( \d+)? month(s)?(.*)?/);s!==null&&(i.includes(" on ")||(r=Dt.nextAfterMonths(t,r,e,s[1])));let a=i.match(/every( \d+)? year(s)?(.*)?/);return a!==null&&(r=Dt.nextAfterYears(t,r,e,a[1])),Dt.addTimezone(r)}static nextAfterMonths(t,e,r,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));Dt.isSkippingTooManyMonths(t,e,s);)e=Dt.fromOneDayEarlier(t,r);return e}static isSkippingTooManyMonths(t,e,r){let i=e.month()-t.month();return i+=(e.year()-t.year())*12,i>r}static nextAfterYears(t,e,r,i){let s=1;for(i!==void 0&&(s=Number.parseInt(i.trim(),10));Dt.isSkippingTooManyYears(t,e,s);)e=Dt.fromOneDayEarlier(t,r);return e}static isSkippingTooManyYears(t,e,r){return e.year()-t.year()>r}static fromOneDayEarlier(t,e){t.subtract(1,"days").endOf("day");let r=e.origOptions;return r.dtstart=t.startOf("day").toDate(),e=new ae(r),window.moment.utc(e.after(t.toDate()))}static addTimezone(t){return window.moment.utc(t).set({hour:12,minute:0,second:0,millisecond:0}).local(!0).startOf("day")}}});function kS(n,t,e){let r=new Map([["cancelled date","cancelledDate"],["created date","createdDate"],["depends on","dependsOn"],["done date","doneDate"],["due date","dueDate"],["id","id"],["on completion","onCompletion"],["priority","priority"],["recurrence rule","recurrenceRule"],["scheduled date","scheduledDate"],["start date","startDate"]]);for(let[i,s]of r.entries())if(t.startsWith(i))return n.setVisibility(s,e),!0;return t.startsWith("tags")?(n.setTagsVisibility(e),!0):!1}var eu,zc,Br,Is=ee(()=>{"use strict";eu=(p=>(p.Description="description",p.Id="id",p.DependsOn="dependsOn",p.Priority="priority",p.RecurrenceRule="recurrenceRule",p.OnCompletion="onCompletion",p.CreatedDate="createdDate",p.StartDate="startDate",p.ScheduledDate="scheduledDate",p.DueDate="dueDate",p.CancelledDate="cancelledDate",p.DoneDate="doneDate",p.BlockLink="blockLink",p))(eu||{}),zc=Object.values(eu),Br=class{constructor(){this.visible={};this.tagsVisible=!0;zc.forEach(t=>{this.visible[t]=!0})}isShown(t){return this.visible[t]}areTagsShown(){return this.tagsVisible}hide(t){this.visible[t]=!1}setVisibility(t,e){this.visible[t]=e}setTagsVisibility(t){this.tagsVisible=t}get shownComponents(){return zc.filter(t=>this.visible[t])}get hiddenComponents(){return zc.filter(t=>!this.visible[t])}get toggleableComponents(){return zc.filter(t=>t!=="description"&&t!=="blockLink")}toggleVisibilityExceptDescriptionAndBlockLink(){this.toggleableComponents.forEach(t=>{this.visible[t]=!this.visible[t]}),this.setTagsVisibility(!this.areTagsShown())}}});var Gt,gt,Cn=ee(()=>{"use strict";Gt=(a=>(a.TODO="TODO",a.DONE="DONE",a.IN_PROGRESS="IN_PROGRESS",a.CANCELLED="CANCELLED",a.NON_TASK="NON_TASK",a.EMPTY="EMPTY",a))(Gt||{}),gt=class{constructor(t,e,r,i,s="TODO"){this.symbol=t,this.name=e,this.nextStatusSymbol=r,this.availableAsCommand=i,this.type=s}}});function SS(n){let t=n.trim().toLowerCase();return t==="delete"?"delete":t==="keep"?"keep":""}function e2(n,t){return n.filter(e=>e!==t)}function t2(n,t){let e=n.status,r=t.status,i=r.type===e.type;return r.type!=="DONE"||i}function DS(n,t){let e=t.length;if(n.onCompletion===""||n.onCompletion==="keep"||e===0)return t;let r=t[e-1];if(t2(n,r))return t;let s=n.onCompletion;return s==="delete"?e2(t,r):(console.log(`OnCompletion action ${s} not yet implemented.`),t)}var Kc=ee(()=>{"use strict";Cn()});var ja=ee(()=>{"use strict"});function Wa(n){return qa(n,"(\\d{4}-\\d{2}-\\d{2})")}function qa(n,t){let e=n+"\uFE0F?";return t!==""&&(e+=" *"+t),e+="$",new RegExp(e,"u")}function Qc(n,t,e){return e?n?" "+t:` ${t} ${e}`:""}function $a(n,t,e){return e?n?" "+t:` ${t} ${e.format(fe.dateFormat)}`:""}function ES(){let n=[];return Object.values(tu.prioritySymbols).forEach(t=>{t.length>0&&n.push(t)}),Object.values(tu).forEach(t=>{typeof t=="string"&&n.push(t)}),n}var Fs,Xg,tu,Ls,nu=ee(()=>{"use strict";Is();Kc();Nc();Vc();Nt();ja();ii();Fs=/[a-zA-Z0-9-_]+/,Xg=new RegExp(Fs.source+"( *, *"+Fs.source+" *)*");tu={prioritySymbols:{Highest:"\u{1F53A}",High:"\u23EB",Medium:"\u{1F53C}",Low:"\u{1F53D}",Lowest:"\u23EC",None:""},startDateSymbol:"\u{1F6EB}",createdDateSymbol:"\u2795",scheduledDateSymbol:"\u23F3",dueDateSymbol:"\u{1F4C5}",doneDateSymbol:"\u2705",cancelledDateSymbol:"\u274C",recurrenceSymbol:"\u{1F501}",onCompletionSymbol:"\u{1F3C1}",dependsOnSymbol:"\u26D4",idSymbol:"\u{1F194}",TaskFormatRegularExpressions:{priorityRegex:qa("([\u{1F53A}\u23EB\u{1F53C}\u{1F53D}\u23EC])",""),startDateRegex:Wa("\u{1F6EB}"),createdDateRegex:Wa("\u2795"),scheduledDateRegex:Wa("[\u23F3\u231B]"),dueDateRegex:Wa("[\u{1F4C5}\u{1F4C6}\u{1F5D3}]"),doneDateRegex:Wa("\u2705"),cancelledDateRegex:Wa("\u274C"),recurrenceRegex:qa("\u{1F501}","([a-zA-Z0-9, !]+)"),onCompletionRegex:qa("\u{1F3C1}","([a-zA-Z]+)"),dependsOnRegex:qa("\u26D4","("+Xg.source+")"),idRegex:qa("\u{1F194}","("+Fs.source+")")}};Ls=class{constructor(t){this.symbols=t}serialize(t){let e=new Br,r="",i=!1;for(let s of e.shownComponents)r+=this.componentToString(t,i,s);return r}componentToString(t,e,r){var T;let{prioritySymbols:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,doneDateSymbol:l,cancelledDateSymbol:u,recurrenceSymbol:c,onCompletionSymbol:d,dueDateSymbol:f,dependsOnSymbol:p,idSymbol:b}=this.symbols;switch(r){case"description":return t.description;case"priority":{let _="";return t.priority==="0"?_=" "+i.Highest:t.priority==="1"?_=" "+i.High:t.priority==="2"?_=" "+i.Medium:t.priority==="4"?_=" "+i.Low:t.priority==="5"&&(_=" "+i.Lowest),_}case"startDate":return $a(e,s,t.startDate);case"createdDate":return $a(e,a,t.createdDate);case"scheduledDate":return t.scheduledDateIsInferred?"":$a(e,o,t.scheduledDate);case"doneDate":return $a(e,l,t.doneDate);case"cancelledDate":return $a(e,u,t.cancelledDate);case"dueDate":return $a(e,f,t.dueDate);case"recurrenceRule":return t.recurrence?Qc(e,c,t.recurrence.toText()):"";case"onCompletion":return t.onCompletion===""?"":Qc(e,d,t.onCompletion);case"dependsOn":return t.dependsOn.length===0?"":Qc(e,p,t.dependsOn.join(","));case"id":return Qc(e,b,t.id);case"blockLink":return(T=t.blockLink)!=null?T:"";default:throw new Error(`Don't know how to render task component of type '${r}'`)}}parsePriority(t){let{prioritySymbols:e}=this.symbols;switch(t){case e.Lowest:return"5";case e.Low:return"4";case e.Medium:return"2";case e.High:return"1";case e.Highest:return"0";default:return"3"}}deserialize(t){let{TaskFormatRegularExpressions:e}=this.symbols,r,i="3",s=null,a=null,o=null,l=null,u=null,c=null,d="",f=null,p="",b="",T=[],_="",O=20,E=0;do{r=!1;let A=t.match(e.priorityRegex);A!==null&&(i=this.parsePriority(A[1]),t=t.replace(e.priorityRegex,"").trim(),r=!0);let Y=t.match(e.doneDateRegex);Y!==null&&(l=window.moment(Y[1],fe.dateFormat),t=t.replace(e.doneDateRegex,"").trim(),r=!0);let q=t.match(e.cancelledDateRegex);q!==null&&(u=window.moment(q[1],fe.dateFormat),t=t.replace(e.cancelledDateRegex,"").trim(),r=!0);let se=t.match(e.dueDateRegex);se!==null&&(o=window.moment(se[1],fe.dateFormat),t=t.replace(e.dueDateRegex,"").trim(),r=!0);let H=t.match(e.scheduledDateRegex);H!==null&&(a=window.moment(H[1],fe.dateFormat),t=t.replace(e.scheduledDateRegex,"").trim(),r=!0);let Z=t.match(e.startDateRegex);Z!==null&&(s=window.moment(Z[1],fe.dateFormat),t=t.replace(e.startDateRegex,"").trim(),r=!0);let ye=t.match(e.createdDateRegex);ye!==null&&(c=window.moment(ye[1],fe.dateFormat),t=t.replace(e.createdDateRegex,"").trim(),r=!0);let we=t.match(e.recurrenceRegex);we!==null&&(d=we[1].trim(),t=t.replace(e.recurrenceRegex,"").trim(),r=!0);let V=t.match(e.onCompletionRegex);if(V!=null){t=t.replace(e.onCompletionRegex,"").trim();let $=V[1];p=SS($),r=!0}let K=t.match(fe.hashTagsFromEnd);if(K!=null){t=t.replace(fe.hashTagsFromEnd,"").trim(),r=!0;let $=K[0].trim();_=_.length>0?[$,_].join(" "):$}let C=t.match(e.idRegex);C!=null&&(t=t.replace(e.idRegex,"").trim(),b=C[1].trim(),r=!0);let J=t.match(e.dependsOnRegex);J!=null&&(t=t.replace(e.dependsOnRegex,"").trim(),T=J[1].replace(/ /g,"").split(",").filter($=>$!==""),r=!0),E++}while(r&&E<=O);return d.length>0&&(f=Dt.fromText({recurrenceRuleText:d,occurrence:new Xn({startDate:s,scheduledDate:a,dueDate:o})})),_.length>0&&(t+=" "+_),{description:t,priority:i,startDate:s,createdDate:c,scheduledDate:a,dueDate:o,doneDate:l,cancelledDate:u,recurrence:f,onCompletion:p,id:b,dependsOn:T,tags:pe.extractHashtags(t)}}}});function ru(n){let t="",e=!0;for(;e;)t=Math.random().toString(36).substring(2,6+2),n.includes(t)||(e=!1);return t}function Zc(n,t){return n.id!==""?n:new pe(de(U({},n),{id:ru(t)}))}function xS(n,t){let e=n;if(!n.dependsOn.includes(t.id)){let r=[...n.dependsOn,t.id];e=new pe(de(U({},n),{dependsOn:r}))}return e}function OS(n,t){let e=n;if(n.dependsOn.includes(t.id)){let r=n.dependsOn.filter(i=>i!==t.id);e=new pe(de(U({},n),{dependsOn:r}))}return e}var Jc=ee(()=>{"use strict";Nt()});function qi(n){return n.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")}var iu=ee(()=>{"use strict"});var Hi,Fe,Mn=ee(()=>{"use strict";iu();Hi=class{constructor(){this._globalFilter="";this._removeGlobalFilter=!1}static getInstance(){return Hi.instance||(Hi.instance=new Hi),Hi.instance}get(){return this._globalFilter}set(t){this._globalFilter=t}reset(){this.set(Hi.empty)}isEmpty(){return this.get()===Hi.empty}equals(t){return this.get()===t}includedIn(t){let e=this.get();return t.includes(e)}prependTo(t){return this.get()+" "+t}removeAsWordFromDependingOnSettings(t){return this.getRemoveGlobalFilter()?this.removeAsWordFrom(t):t}getRemoveGlobalFilter(){return this._removeGlobalFilter}setRemoveGlobalFilter(t){this._removeGlobalFilter=t}removeAsWordFrom(t){if(this.isEmpty())return t;let e=RegExp("(^|\\s)"+qi(this.get())+"($|\\s)","ug");return t.search(e)>-1&&(t=t.replace(e,"$1$2").replace(" "," ").trim()),t}removeAsSubstringFrom(t){let e=this.get();return t.replace(e,"").trim()}},Fe=Hi;Fe.empty=""});function Us(n){return Fe.getInstance().removeAsWordFrom(n.description)}function i2(n,t){if(n==="")return t;let e=(0,MS.prepareSimpleSearch)(n),r=-4;return t.map(a=>{let o=e(Us(a));return o&&o.score>r?{item:a,match:o}:null}).filter(Boolean).sort((a,o)=>o.match.score-a.match.score).map(a=>a.item)}function ed(n,t,e,r,i){let s=i2(n,t);return s=s.filter(a=>!(a.isDone||a.description.includes("<%")&&a.description.includes("%>")||a.description===(e==null?void 0:e.description)&&a.taskLocation.path===(e==null?void 0:e.taskLocation.path)&&a.originalMarkdown===(e==null?void 0:e.originalMarkdown)||(r==null?void 0:r.includes(a))||(i==null?void 0:i.includes(a)))),e&&s.sort((a,o)=>{let l=a.taskLocation.path===e.taskLocation.path,u=o.taskLocation.path===e.taskLocation.path;return l&&u?Math.abs(a.taskLocation.lineNumber-e.taskLocation.lineNumber)-Math.abs(o.taskLocation.lineNumber-e.taskLocation.lineNumber):l?-1:u?1:0}),s.slice(0,r2)}var MS,r2,Zg=ee(()=>{"use strict";MS=require("obsidian");Mn();r2=20});function RS(n){return globalThis.SHOW_DEPENDENCY_SUGGESTIONS&&n}function ey(n,t,e){let r=[n.startDateSymbol,n.scheduledDateSymbol,n.dueDateSymbol].join("|");return(i,s,a,o,l,u)=>{let c=[],{postfix:d,insertSkip:f}=a2(e,i,s),p={line:i,cursorPos:s,settings:a,dataviewMode:e,postfix:d,insertSkip:f};return c=c.concat(f2(r,t,p)),c=c.concat(p2(n.recurrenceSymbol,p)),RS(l)&&(c=c.concat(h2(n.idSymbol,o,p)),c=c.concat(g2(n.dependsOnSymbol,o,p,u))),c=c.concat(m2(n.onCompletionSymbol,t,p)),c=c.concat(o2(n,l,p)),c.length>0&&!c.some(b=>b.suggestionType==="match")&&(e||c.unshift({suggestionType:"empty",displayText:"\u23CE",appendText:` -`})),c=c.slice(0,a.autoSuggestMaxItems),c}}function a2(n,t,e){let r=b2(t.substring(0,e),[["(",")"],["[","]"]])=="("?")":"]",i=n?r+" ":" ",s=n&&t.length>e&&t.charAt(e)===r?1:0;return{postfix:i,insertSkip:s}}function o2(n,t,e){let r=[],i=e.line;Ys(r,i,n.dueDateSymbol,"due date"),Ys(r,i,n.startDateSymbol,"start date"),Ys(r,i,n.scheduledDateSymbol,"scheduled date"),l2(r,n,e),Ys(r,i,n.recurrenceSymbol,"recurring (repeat)"),u2(r,n,e),RS(t)&&(Ys(r,i,n.idSymbol,"id"),Ys(r,i,n.dependsOnSymbol,"depends on id")),Ys(r,i,n.onCompletionSymbol,"on completion");let s=c2(r,e);return s.length===0&&e.settings.autoSuggestMinMatch===0?r:s}function Ys(n,t,e,r){t.includes(e)||n.push({displayText:`${e} ${r}`,appendText:`${e} `})}function l2(n,t,e){if(!(i=>Object.values(t.prioritySymbols).some(s=>s.length>0&&i.includes(s)))(e.line)){let i=t.prioritySymbols,s=["High","Medium","Low","Highest","Lowest"];for(let a of s){let o=i[a];n.push({displayText:e.dataviewMode?`${o} priority`:`${o} ${a.toLowerCase()} priority`,appendText:`${o}${e.postfix}`,insertSkip:e.dataviewMode?e.insertSkip:void 0})}}}function u2(n,t,e){if(!e.line.includes(t.createdDateSymbol)){let i=En.parseDate("today",!0).format(fe.dateFormat);n.push({textToMatch:`${t.createdDateSymbol} created`,displayText:`${t.createdDateSymbol} created today (${i})`,appendText:`${t.createdDateSymbol} ${i}`+e.postfix,insertSkip:e.dataviewMode?e.insertSkip:void 0})}}function c2(n,t){let e=Ha(/([a-zA-Z'_-]*)/g,t),r=[];if(e&&e.length>0){let i=e[0];if(i.length>=Math.max(1,t.settings.autoSuggestMinMatch)){let s=n.filter(a=>{var l;return((l=a.textToMatch)!=null?l:a.displayText).toLowerCase().includes(i.toLowerCase())});for(let a of s){let o=t.dataviewMode&&(a.displayText.includes("priority")||a.displayText.includes("created"))?i.length+t.insertSkip:i.length;r.push({suggestionType:"match",displayText:a.displayText,appendText:a.appendText,insertAt:e.index,insertSkip:o})}}}return r}function AS(n,t){let e=`${t}`,r=`${n} ${t}`;return{displayText:e,appendText:r}}function d2(n,t){let r=`${En.parseDate(t,!0).format(fe.dateFormat)}`,i=`${t} (${r})`,s=`${n} ${r}`;return{displayText:i,appendText:s}}function f2(n,t,e){let r=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],i=[],s=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),a=Ha(s,e);if(a&&a.length>=2){let o=a[2];if(o.length<e.settings.autoSuggestMinMatch)return[];let l=o&&o.length>1?En.parseDate(Pc(o),!0):null;if(l!=null&&l.isValid()){let c=l.format(fe.dateFormat);td(e,a,[c],AS,i)}let u=ty(r,o,t,!0);td(e,a,u,d2,i)}return i}function p2(n,t){var a;let e=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],r=[],i=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),s=Ha(i,t);if(s&&s.length>=2){let o=s[1],l=s[2];if(l.length<t.settings.autoSuggestMinMatch)return[];if(l.length>0){let f=(a=Dt.fromText({recurrenceRuleText:l,occurrence:new Xn({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:a.toText();if(f){let p=`${o} ${f}`+t.postfix;if(r.push({suggestionType:"match",displayText:`\u2705 ${f}`,appendText:p,insertAt:s.index,insertSkip:ny(s[0],t)}),s[0]==p)return[]}}let u=t.settings.autoSuggestMaxItems/2,c=ty(e,l,u,!1);c.length===0&&l.trim().length===0&&(c=e.slice(0,u)),td(t,s,c,(f,p)=>{let b=`${p}`,T=`${f} ${p}`;return{displayText:b,appendText:T}},r)}return r}function m2(n,t,e){let r=["delete","keep"],i=[],s=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),a=Ha(s,e);if(a&&a.length>=2){let o=a[2];if(o.length<e.settings.autoSuggestMinMatch)return[];let l=ty(r,o,t,!0);td(e,a,l,AS,i)}return i}function h2(n,t,e){let r=[],i=new RegExp(`(${n})\\s*(${Fs.source})?`,"ug"),s=Ha(i,e);if(s&&s[0].trim().length<=n.length){let a=ru(t.map(o=>o.id));r.push({suggestionType:"match",displayText:"generate unique id",appendText:`${n} ${a}`+e.postfix,insertAt:s.index,insertSkip:ny(s[0],e)})}return r}function g2(n,t,e,r){let i=[],s=e.dataviewMode?qi("()[]"):ES(),a=new RegExp(`(${n})([0-9a-zA-Z-_ ^,]*,)*([^,${s}]*)`,"ug"),o=Ha(a,e);if(o&&o.length>=1){let l=o[2]||"",u=o[3],c=[];if(l){let d=l.split(",").map(f=>f.trim());c=t.filter(f=>f.id&&d.includes(f.id))}if(u.length>=e.settings.autoSuggestMinMatch){let d=ed(u.trim(),t,r,[],c);for(let f of d)i.push({suggestionType:"match",displayText:`${f.descriptionWithoutTags} - From: ${f.filename}.md`,appendText:`${n}${l}`,insertAt:o.index,insertSkip:n.length+l.length+u.length,taskItDependsOn:f})}}return i}function ty(n,t,e,r){let s=n.filter(a=>t&&t.length>=1&&a.toLowerCase().includes(t.toLowerCase())).slice(0,e);return r&&s.length===0&&(s=n.slice(0,e)),s}function td(n,t,e,r,i){let s=t[1];for(let a of e){let{displayText:o,appendText:l}=r(s,a);i.push({suggestionType:"match",displayText:o,appendText:l+n.postfix,insertAt:t.index,insertSkip:ny(t[0],n)})}}function Ha(n,t){let e=t.line.matchAll(n),r=t.cursorPos;for(let i of e)if((i==null?void 0:i.index)&&i.index<r&&r<=i.index+i[0].length)return i}function y2(n,t){if(t.length===0)return!1;let e=Object.fromEntries(t.map(([i,s])=>[i,0])),r=Object.fromEntries(t.map(([i,s])=>[s,i]));for(let i of n)i in e?e[i]++:i in r&&(e[r[i]]=Math.max(0,e[r[i]]-1));return Object.values(e).some(i=>i>0)}function b2(n,t){if(t.length===0)return null;let e=Object.fromEntries(t.map(([s,a])=>[s,0])),r=Object.fromEntries(t.map(([s,a])=>[a,s])),i=[];for(let s=0;s<n.length;s++){let a=n[s];if(a in e)e[a]++,i.push({bracket:a,idx:s});else if(a in r){if(e[r[a]]>=1){for(let o=i.length-1;o>=0;o--)if(i[o].bracket==r[a]){i.splice(o,1);break}}e[r[a]]=Math.max(0,e[r[a]]-1)}}return i.length>0?i[i.length-1].bracket:null}function PS(n,t){return(e,r,i,s,a)=>y2(e.slice(0,r),t)?n(e,r,i,s,a):[]}function NS(n,t,e){let r=Fe.getInstance().includedIn(n),i=T2(e,t,r);return typeof i=="boolean"?i:r&&_2(n,t.ch)}function T2(n,t,e){var r,i;return(i=(r=n==null?void 0:n.editorComponent)==null?void 0:r.showTasksPluginAutoSuggest)==null?void 0:i.call(r,t,n,e)}function _2(n,t){if(n.length===0)return!1;let e=pe.extractTaskComponents(n);if(!e||e.status.type==="NON_TASK")return!1;let r=e.indentation+e.listMarker+" ["+e.status.symbol+"] ";return t>=r.length}function ny(n,t){return t.dataviewMode?n.length+t.insertSkip:n.length}var Jg,s2,ry=ee(()=>{"use strict";Ag();Pg();Nc();Vc();nu();Nt();Jc();Mn();ii();Zg();iu();Cn();Jg=5,s2=!0;globalThis.SHOW_DEPENDENCY_SUGGESTIONS=s2});var Rn,su=ee(()=>{"use strict";ja();Rn=class{static priorityNameUsingNone(t){let e="ERROR";switch(t){case"1":e="High";break;case"0":e="Highest";break;case"2":e="Medium";break;case"3":e="None";break;case"4":e="Low";break;case"5":e="Lowest";break}return e}static priorityNameUsingNormal(t){return Rn.priorityNameUsingNone(t).replace("None","Normal")}static priorityValue(t){switch(t.toLowerCase()){case"lowest":return"5";case"low":return"4";case"medium":return"2";case"high":return"1";case"highest":return"0";default:return"3"}}}});function Sr(n){let t=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,n,/ */,/[)\]]/,/(?: *,)?/,/$/].map(e=>e instanceof RegExp?e.source:e).join("");return new RegExp(t,n.flags)}var iy,nd,sy=ee(()=>{"use strict";Is();su();nu();iy={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",cancelledDateSymbol:"cancelled::",recurrenceSymbol:"repeat::",onCompletionSymbol:"onCompletion::",idSymbol:"id::",dependsOnSymbol:"dependsOn::",TaskFormatRegularExpressions:{priorityRegex:Sr(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:Sr(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:Sr(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:Sr(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:Sr(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:Sr(/completion:: *(\d{4}-\d{2}-\d{2})/),cancelledDateRegex:Sr(/cancelled:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:Sr(/repeat:: *([a-zA-Z0-9, !]+)/),onCompletionRegex:Sr(/onCompletion:: *([a-zA-Z]+)/),dependsOnRegex:Sr(new RegExp("dependsOn:: *("+Xg.source+")")),idRegex:Sr(new RegExp("id:: *("+Fs.source+")"))}},nd=class extends Ls{constructor(){super(iy)}parsePriority(t){return Rn.priorityValue(t)}componentToString(t,e,r){let i=super.componentToString(t,e,r),s=["blockLink","description"];return i!==""&&!s.includes(r)?` [${i.trim()}]`:i}}});var tr,ge,Dr=ee(()=>{"use strict";Cn();tr=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}get typeGroupText(){let t=this.type,e;switch(t){case"IN_PROGRESS":e="1";break;case"TODO":e="2";break;case"DONE":e="3";break;case"CANCELLED":e="4";break;case"NON_TASK":e="5";break;case"EMPTY":e="6";break}return`%%${e}%%${t}`}constructor(t){this.configuration=t}static getTypeForUnknownSymbol(t){switch(t){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(t){return Gt[t]||"TODO"}static createUnknownStatus(t){return new tr(new gt(t,"Unknown","x",!1,"TODO"))}static createFromImportedValue(t){let e=t[0],r=tr.getTypeFromStatusTypeString(t[3]);return new tr(new gt(e,t[1],t[2],!1,r))}isCompleted(){return this.type==="DONE"}isCancelled(){return this.type==="CANCELLED"}identicalTo(t){let e=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let r of e)if(this[r]!==t[r])return!1;return!0}previewText(){let t="";return tr.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(t=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${t}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},ge=tr;ge.DONE=new tr(new gt("x","Done"," ",!0,"DONE")),ge.EMPTY=new tr(new gt("","EMPTY","",!0,"EMPTY")),ge.TODO=new tr(new gt(" ","Todo","x",!0,"TODO")),ge.CANCELLED=new tr(new gt("-","Cancelled"," ",!0,"CANCELLED")),ge.IN_PROGRESS=new tr(new gt("/","In Progress","x",!0,"IN_PROGRESS")),ge.NON_TASK=new tr(new gt("Q","Non-Task","A",!0,"NON_TASK"))});var IS=ee(()=>{"use strict";nu()});var rd,FS=ee(()=>{"use strict";rd=class{constructor(t=!1,e=!1,r=!1){this.ignoreSortInstructions=t,this.showTaskHiddenData=e,this.recordTimings=r}}});var et,Ga=ee(()=>{"use strict";Dr();et=class{constructor(){this.coreStatuses=[ge.TODO.configuration,ge.DONE.configuration],this.customStatuses=[ge.IN_PROGRESS.configuration,ge.CANCELLED.configuration]}static addStatus(t,e){t.push(e)}static replaceStatus(t,e,r){let i=this.findStatusIndex(e,t);return i<=-1?!1:(t.splice(i,1,r),!0)}static findStatusIndex(t,e){let r=new ge(t);return e.findIndex(i=>new ge(i).previewText()==r.previewText())}static deleteStatus(t,e){let r=this.findStatusIndex(e,t);return r<=-1?!1:(t.splice(r,1),!0)}static deleteAllCustomStatuses(t){t.customStatuses.splice(0)}static resetAllCustomStatuses(t){et.deleteAllCustomStatuses(t),new et().customStatuses.forEach(r=>{et.addStatus(t.customStatuses,r)})}static bulkAddStatusCollection(t,e){let r=[];return e.forEach(i=>{t.customStatuses.find(a=>a.symbol==i[0]&&a.name==i[1]&&a.nextStatusSymbol==i[2])?r.push(`The status ${i[1]} (${i[0]}) is already added.`):et.addStatus(t.customStatuses,ge.createFromImportedValue(i))}),r}static allStatuses(t){return t.coreStatuses.concat(t.customStatuses)}static applyToStatusRegistry(t,e){e.clearStatuses(),et.allStatuses(t).forEach(r=>{e.add(r)})}}});var US,LS=ee(()=>{US=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}]});var _i,YS=ee(()=>{"use strict";LS();_i=class{constructor(t,e,r,i,s,a){this.internalName=t;this.index=e;this.description=r;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let t=[];return US.forEach(e=>{t=[...t,new _i(e.internalName,e.index,e.description,e.displayName,e.enabledByDefault,e.stable)]}),t}static get settingsFlags(){let t={};return _i.values.forEach(e=>{t[e.internalName]=e.enabledByDefault}),t}static fromString(t){for(let e of _i.values)if(t===e.internalName)return e;throw new RangeError(`Illegal argument passed to fromString(): ${t} does not correspond to any available Feature ${this.prototype.constructor.name}`)}}});function ay(n,t){for(let e in n)t[e]===void 0&&(t[e]=n[e])}function au(){return Er[le().taskFormat]}var Er,oy,vi,le,at,js,jS,rn=ee(()=>{"use strict";ry();nu();sy();Cn();Dr();IS();sy();gs();FS();Ga();YS();Er={tasksPluginEmoji:{getDisplayName:()=>N.t("settings.format.displayName.tasksEmojiFormat"),taskSerializer:new Ls(tu),buildSuggestions:ey(tu,Jg,!1)},dataview:{getDisplayName:()=>N.t("settings.format.displayName.dataview"),taskSerializer:new nd,buildSuggestions:PS(ey(iy,Jg,!0),[["(",")"],["[","]"]])}},oy={globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,setCancelledDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:20,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsScheduledDateFormat:"",filenameAsDateFolders:[],recurrenceOnNextLine:!1,removeScheduledDateOnRecurrence:!1,statusSettings:new et,features:_i.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new rd,loggingOptions:{minLevels:{"":"info",tasks:"info","tasks.Cache":"info","tasks.Events":"info","tasks.File":"info","tasks.Query":"info","tasks.Task":"info"}}},vi=U({},oy);le=()=>(ay(_i.settingsFlags,vi.features),ay(oy.loggingOptions.minLevels,vi.loggingOptions.minLevels),ay(oy.debugSettings,vi.debugSettings),vi.statusSettings.customStatuses.forEach((n,t,e)=>{var i,s;let r=ge.getTypeFromStatusTypeString(n.type);e[t]=new gt((i=n.symbol)!=null?i:" ",n.name,(s=n.nextStatusSymbol)!=null?s:"x",n.availableAsCommand,r)}),U({},vi)),at=n=>(vi=U(U({},vi),n),le()),js=(n,t)=>(vi.generalSettings[n]=t,le()),jS=n=>{var t;return(t=vi.features[n])!=null?t:!1}});function id(n){let e={"<":"<",">":">","&":"&",'"':"""}[n];return e!==void 0?e:n}function WS(n){let t=[...n],e="";return t.forEach(r=>{e+=id(r)}),e}var $S=ee(()=>{"use strict"});var Be,wi=ee(()=>{"use strict";$S();Dr();Cn();Be=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}set(t){this.clearStatuses(),t.forEach(e=>{this.add(e)})}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:t})=>t!==ge.EMPTY.symbol)}static getInstance(){return Be.instance||(Be.instance=new Be),Be.instance}add(t){this.hasSymbol(t.symbol)||(t instanceof ge?this._registeredStatuses.push(t):this._registeredStatuses.push(new ge(t)))}bySymbol(t){return this.hasSymbol(t)?this.getSymbol(t):ge.EMPTY}bySymbolOrCreate(t){return this.hasSymbol(t)?this.getSymbol(t):ge.createUnknownStatus(t)}byName(t){return this._registeredStatuses.filter(({name:e})=>e===t).length>0?this._registeredStatuses.filter(({name:e})=>e===t)[0]:ge.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(t){if(t.nextStatusSymbol!==""){let e=this.bySymbol(t.nextStatusSymbol);if(e!==null)return e}return ge.EMPTY}getNextStatusOrCreate(t){let e=this.getNextStatus(t);return e.type!=="EMPTY"?e:ge.createUnknownStatus(t.nextStatusSymbol)}getNextRecurrenceStatusOrCreate(t){let e=this.getNextStatusOrCreate(t),r=this.getNextRecurrenceStatusOfType(e,"TODO");if(r)return r;let i=this.getNextRecurrenceStatusOfType(e,"IN_PROGRESS");return i||this.bySymbolOrCreate(" ")}getNextRecurrenceStatusOfType(t,e){if(t.type===e)return t;let r=t;for(let i=0;i<this.registeredStatuses.length-1;i++)if(r=this.getNextStatusOrCreate(r),r.type===e)return r}findUnknownStatuses(t){let e=t.filter(s=>!this.hasSymbol(s.symbol)),r=new Be,i=[];return e.forEach(s=>{if(r.hasSymbol(s.symbol))return;let a=Be.copyStatusWithNewName(s,`Unknown (${s.symbol})`);i.push(a),r.add(a)}),i.sort((s,a)=>s.symbol.localeCompare(a.symbol,void 0,{numeric:!0}))}static copyStatusWithNewName(t,e){let r=new gt(t.symbol,e,t.nextStatusSymbol,t.availableAsCommand,t.type);return new ge(r)}getSymbol(t){return this._registeredStatuses.filter(({symbol:e})=>e===t)[0]}hasSymbol(t){return this._registeredStatuses.find(e=>e.symbol===t)!==void 0}addDefaultStatusTypes(){[ge.TODO,ge.IN_PROGRESS,ge.DONE,ge.CANCELLED].forEach(e=>{this.add(e)})}mermaidDiagram(t=!1){let e=this.registeredStatuses,r="mermaid",i=[],s=[];return e.forEach((a,o)=>{let l=this.getMermaidNodeLabel(a,t);i.push(`${o+1}${l}`);let u=this.getNextStatus(a);if(this.addEdgeIfNotToInternal(e,u,s,o,!1),a.type==="DONE"){let c=this.getNextRecurrenceStatusOrCreate(a);c.symbol!==u.symbol&&this.addEdgeIfNotToInternal(e,c,s,o,!0)}}),` +`})),c=c.slice(0,a.autoSuggestMaxItems),c}}function a2(n,t,e){let r=b2(t.substring(0,e),[["(",")"],["[","]"]])=="("?")":"]",i=n?r+" ":" ",s=n&&t.length>e&&t.charAt(e)===r?1:0;return{postfix:i,insertSkip:s}}function o2(n,t,e){let r=[],i=e.line;Ys(r,i,n.dueDateSymbol,"due date"),Ys(r,i,n.startDateSymbol,"start date"),Ys(r,i,n.scheduledDateSymbol,"scheduled date"),l2(r,n,e),Ys(r,i,n.recurrenceSymbol,"recurring (repeat)"),u2(r,n,e),RS(t)&&(Ys(r,i,n.idSymbol,"id"),Ys(r,i,n.dependsOnSymbol,"depends on id")),Ys(r,i,n.onCompletionSymbol,"on completion");let s=c2(r,e);return s.length===0&&e.settings.autoSuggestMinMatch===0?r:s}function Ys(n,t,e,r){t.includes(e)||n.push({displayText:`${e} ${r}`,appendText:`${e} `})}function l2(n,t,e){if(!(i=>Object.values(t.prioritySymbols).some(s=>s.length>0&&i.includes(s)))(e.line)){let i=t.prioritySymbols,s=["High","Medium","Low","Highest","Lowest"];for(let a of s){let o=i[a];n.push({displayText:e.dataviewMode?`${o} priority`:`${o} ${a.toLowerCase()} priority`,appendText:`${o}${e.postfix}`,insertSkip:e.dataviewMode?e.insertSkip:void 0})}}}function u2(n,t,e){if(!e.line.includes(t.createdDateSymbol)){let i=En.parseDate("today",!0).format(fe.dateFormat);n.push({textToMatch:`${t.createdDateSymbol} created`,displayText:`${t.createdDateSymbol} created today (${i})`,appendText:`${t.createdDateSymbol} ${i}`+e.postfix,insertSkip:e.dataviewMode?e.insertSkip:void 0})}}function c2(n,t){let e=Ha(/([a-zA-Z'_-]*)/g,t),r=[];if(e&&e.length>0){let i=e[0];if(i.length>=Math.max(1,t.settings.autoSuggestMinMatch)){let s=n.filter(a=>{var l;return((l=a.textToMatch)!=null?l:a.displayText).toLowerCase().includes(i.toLowerCase())});for(let a of s){let o=t.dataviewMode&&(a.displayText.includes("priority")||a.displayText.includes("created"))?i.length+t.insertSkip:i.length;r.push({suggestionType:"match",displayText:a.displayText,appendText:a.appendText,insertAt:e.index,insertSkip:o})}}}return r}function AS(n,t){let e=`${t}`,r=`${n} ${t}`;return{displayText:e,appendText:r}}function d2(n,t){let r=`${En.parseDate(t,!0).format(fe.dateFormat)}`,i=`${t} (${r})`,s=`${n} ${r}`;return{displayText:i,appendText:s}}function f2(n,t,e){let r=["today","tomorrow","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","next week","next month","next year"],i=[],s=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),a=Ha(s,e);if(a&&a.length>=2){let o=a[2];if(o.length<e.settings.autoSuggestMinMatch)return[];let l=o&&o.length>1?En.parseDate(Pc(o),!0):null;if(l!=null&&l.isValid()){let c=l.format(fe.dateFormat);td(e,a,[c],AS,i)}let u=ty(r,o,t,!0);td(e,a,u,d2,i)}return i}function p2(n,t){var a;let e=["every","every day","every week","every month","every month on the","every year","every week on Sunday","every week on Monday","every week on Tuesday","every week on Wednesday","every week on Thursday","every week on Friday","every week on Saturday"],r=[],i=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),s=Ha(i,t);if(s&&s.length>=2){let o=s[1],l=s[2];if(l.length<t.settings.autoSuggestMinMatch)return[];if(l.length>0){let f=(a=Dt.fromText({recurrenceRuleText:l,occurrence:new Xn({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:a.toText();if(f){let p=`${o} ${f}`+t.postfix;if(r.push({suggestionType:"match",displayText:`\u2705 ${f}`,appendText:p,insertAt:s.index,insertSkip:ny(s[0],t)}),s[0]==p)return[]}}let u=t.settings.autoSuggestMaxItems/2,c=ty(e,l,u,!1);c.length===0&&l.trim().length===0&&(c=e.slice(0,u)),td(t,s,c,(f,p)=>{let b=`${p}`,T=`${f} ${p}`;return{displayText:b,appendText:T}},r)}return r}function m2(n,t,e){let r=["delete","keep"],i=[],s=new RegExp(`(${n})\\s*([0-9a-zA-Z ]*)`,"ug"),a=Ha(s,e);if(a&&a.length>=2){let o=a[2];if(o.length<e.settings.autoSuggestMinMatch)return[];let l=ty(r,o,t,!0);td(e,a,l,AS,i)}return i}function h2(n,t,e){let r=[],i=new RegExp(`(${n})\\s*(${Fs.source})?`,"ug"),s=Ha(i,e);if(s&&s[0].trim().length<=n.length){let a=ru(t.map(o=>o.id));r.push({suggestionType:"match",displayText:"generate unique id",appendText:`${n} ${a}`+e.postfix,insertAt:s.index,insertSkip:ny(s[0],e)})}return r}function g2(n,t,e,r){let i=[],s=e.dataviewMode?qi("()[]"):ES(),a=new RegExp(`(${n})([0-9a-zA-Z-_ ^,]*,)*([^,${s}]*)`,"ug"),o=Ha(a,e);if(o&&o.length>=1){let l=o[2]||"",u=o[3],c=[];if(l){let d=l.split(",").map(f=>f.trim());c=t.filter(f=>f.id&&d.includes(f.id))}if(u.length>=e.settings.autoSuggestMinMatch){let d=ed(u.trim(),t,r,[],c);for(let f of d)i.push({suggestionType:"match",displayText:`${f.descriptionWithoutTags} - From: ${f.filename}.md`,appendText:`${n}${l}`,insertAt:o.index,insertSkip:n.length+l.length+u.length,taskItDependsOn:f})}}return i}function ty(n,t,e,r){let s=n.filter(a=>t&&t.length>=1&&a.toLowerCase().includes(t.toLowerCase())).slice(0,e);return r&&s.length===0&&(s=n.slice(0,e)),s}function td(n,t,e,r,i){let s=t[1];for(let a of e){let{displayText:o,appendText:l}=r(s,a);i.push({suggestionType:"match",displayText:o,appendText:l+n.postfix,insertAt:t.index,insertSkip:ny(t[0],n)})}}function Ha(n,t){let e=t.line.matchAll(n),r=t.cursorPos;for(let i of e)if((i==null?void 0:i.index)&&i.index<r&&r<=i.index+i[0].length)return i}function y2(n,t){if(t.length===0)return!1;let e=Object.fromEntries(t.map(([i,s])=>[i,0])),r=Object.fromEntries(t.map(([i,s])=>[s,i]));for(let i of n)i in e?e[i]++:i in r&&(e[r[i]]=Math.max(0,e[r[i]]-1));return Object.values(e).some(i=>i>0)}function b2(n,t){if(t.length===0)return null;let e=Object.fromEntries(t.map(([s,a])=>[s,0])),r=Object.fromEntries(t.map(([s,a])=>[a,s])),i=[];for(let s=0;s<n.length;s++){let a=n[s];if(a in e)e[a]++,i.push({bracket:a,idx:s});else if(a in r){if(e[r[a]]>=1){for(let o=i.length-1;o>=0;o--)if(i[o].bracket==r[a]){i.splice(o,1);break}}e[r[a]]=Math.max(0,e[r[a]]-1)}}return i.length>0?i[i.length-1].bracket:null}function PS(n,t){return(e,r,i,s,a)=>y2(e.slice(0,r),t)?n(e,r,i,s,a):[]}function NS(n,t,e){let r=Fe.getInstance().includedIn(n),i=T2(e,t,r);return typeof i=="boolean"?i:r&&_2(n,t.ch)}function T2(n,t,e){var r,i;return(i=(r=n==null?void 0:n.editorComponent)==null?void 0:r.showTasksPluginAutoSuggest)==null?void 0:i.call(r,t,n,e)}function _2(n,t){if(n.length===0)return!1;let e=pe.extractTaskComponents(n);if(!e||e.status.type==="NON_TASK")return!1;let r=e.indentation+e.listMarker+" ["+e.status.symbol+"] ";return t>=r.length}function ny(n,t){return t.dataviewMode?n.length+t.insertSkip:n.length}var Jg,s2,ry=ee(()=>{"use strict";Ag();Pg();Nc();Vc();nu();Nt();Jc();Mn();ii();Zg();iu();Cn();Jg=5,s2=!0;globalThis.SHOW_DEPENDENCY_SUGGESTIONS=s2});var Rn,su=ee(()=>{"use strict";ja();Rn=class{static priorityNameUsingNone(t){let e="ERROR";switch(t){case"1":e="High";break;case"0":e="Highest";break;case"2":e="Medium";break;case"3":e="None";break;case"4":e="Low";break;case"5":e="Lowest";break}return e}static priorityNameUsingNormal(t){return Rn.priorityNameUsingNone(t).replace("None","Normal")}static priorityValue(t){switch(t.toLowerCase()){case"lowest":return"5";case"low":return"4";case"medium":return"2";case"high":return"1";case"highest":return"0";default:return"3"}}}});function Sr(n){let t=["(?:",/(?=[^\]]+\])\[/,"|",/(?=[^)]+\))\(/,")",/ */,n,/ */,/[)\]]/,/(?: *,)?/,/$/].map(e=>e instanceof RegExp?e.source:e).join("");return new RegExp(t,n.flags)}var iy,nd,sy=ee(()=>{"use strict";Is();su();nu();iy={prioritySymbols:{Highest:"priority:: highest",High:"priority:: high",Medium:"priority:: medium",Low:"priority:: low",Lowest:"priority:: lowest",None:""},startDateSymbol:"start::",createdDateSymbol:"created::",scheduledDateSymbol:"scheduled::",dueDateSymbol:"due::",doneDateSymbol:"completion::",cancelledDateSymbol:"cancelled::",recurrenceSymbol:"repeat::",onCompletionSymbol:"onCompletion::",idSymbol:"id::",dependsOnSymbol:"dependsOn::",TaskFormatRegularExpressions:{priorityRegex:Sr(/priority:: *(highest|high|medium|low|lowest)/),startDateRegex:Sr(/start:: *(\d{4}-\d{2}-\d{2})/),createdDateRegex:Sr(/created:: *(\d{4}-\d{2}-\d{2})/),scheduledDateRegex:Sr(/scheduled:: *(\d{4}-\d{2}-\d{2})/),dueDateRegex:Sr(/due:: *(\d{4}-\d{2}-\d{2})/),doneDateRegex:Sr(/completion:: *(\d{4}-\d{2}-\d{2})/),cancelledDateRegex:Sr(/cancelled:: *(\d{4}-\d{2}-\d{2})/),recurrenceRegex:Sr(/repeat:: *([a-zA-Z0-9, !]+)/),onCompletionRegex:Sr(/onCompletion:: *([a-zA-Z]+)/),dependsOnRegex:Sr(new RegExp("dependsOn:: *("+Xg.source+")")),idRegex:Sr(new RegExp("id:: *("+Fs.source+")"))}},nd=class extends Ls{constructor(){super(iy)}parsePriority(t){return Rn.priorityValue(t)}componentToString(t,e,r){let i=super.componentToString(t,e,r),s=["blockLink","description"];return i!==""&&!s.includes(r)?` [${i.trim()}]`:i}}});var tr,ge,Dr=ee(()=>{"use strict";Cn();tr=class{get symbol(){return this.configuration.symbol}get name(){return this.configuration.name}get nextStatusSymbol(){return this.configuration.nextStatusSymbol}get nextSymbol(){return this.configuration.nextStatusSymbol}get availableAsCommand(){return this.configuration.availableAsCommand}get type(){return this.configuration.type}get typeGroupText(){let t=this.type,e;switch(t){case"IN_PROGRESS":e="1";break;case"TODO":e="2";break;case"DONE":e="3";break;case"CANCELLED":e="4";break;case"NON_TASK":e="5";break;case"EMPTY":e="6";break}return`%%${e}%%${t}`}constructor(t){this.configuration=t}static getTypeForUnknownSymbol(t){switch(t){case"x":case"X":return"DONE";case"/":return"IN_PROGRESS";case"-":return"CANCELLED";case"":return"EMPTY";case" ":default:return"TODO"}}static getTypeFromStatusTypeString(t){return Gt[t]||"TODO"}static createUnknownStatus(t){return new tr(new gt(t,"Unknown","x",!1,"TODO"))}static createFromImportedValue(t){let e=t[0],r=tr.getTypeFromStatusTypeString(t[3]);return new tr(new gt(e,t[1],t[2],!1,r))}isCompleted(){return this.type==="DONE"}isCancelled(){return this.type==="CANCELLED"}identicalTo(t){let e=["symbol","name","nextStatusSymbol","availableAsCommand","type"];for(let r of e)if(this[r]!==t[r])return!1;return!0}previewText(){let t="";return tr.tasksPluginCanCreateCommandsForStatuses()&&this.availableAsCommand&&(t=" Available as a command."),`- [${this.symbol}] => [${this.nextStatusSymbol}], name: '${this.name}', type: '${this.configuration.type}'.${t}`}static tasksPluginCanCreateCommandsForStatuses(){return!1}},ge=tr;ge.DONE=new tr(new gt("x","Done"," ",!0,"DONE")),ge.EMPTY=new tr(new gt("","EMPTY","",!0,"EMPTY")),ge.TODO=new tr(new gt(" ","Todo","x",!0,"TODO")),ge.CANCELLED=new tr(new gt("-","Cancelled"," ",!0,"CANCELLED")),ge.IN_PROGRESS=new tr(new gt("/","In Progress","x",!0,"IN_PROGRESS")),ge.NON_TASK=new tr(new gt("Q","Non-Task","A",!0,"NON_TASK"))});var IS=ee(()=>{"use strict";nu()});var rd,FS=ee(()=>{"use strict";rd=class{constructor(t=!1,e=!1,r=!1){this.ignoreSortInstructions=t,this.showTaskHiddenData=e,this.recordTimings=r}}});var et,Ga=ee(()=>{"use strict";Dr();et=class{constructor(){this.coreStatuses=[ge.TODO.configuration,ge.DONE.configuration],this.customStatuses=[ge.IN_PROGRESS.configuration,ge.CANCELLED.configuration]}static addStatus(t,e){t.push(e)}static replaceStatus(t,e,r){let i=this.findStatusIndex(e,t);return i<=-1?!1:(t.splice(i,1,r),!0)}static findStatusIndex(t,e){let r=new ge(t);return e.findIndex(i=>new ge(i).previewText()==r.previewText())}static deleteStatus(t,e){let r=this.findStatusIndex(e,t);return r<=-1?!1:(t.splice(r,1),!0)}static deleteAllCustomStatuses(t){t.customStatuses.splice(0)}static resetAllCustomStatuses(t){et.deleteAllCustomStatuses(t),new et().customStatuses.forEach(r=>{et.addStatus(t.customStatuses,r)})}static bulkAddStatusCollection(t,e){let r=[];return e.forEach(i=>{t.customStatuses.find(a=>a.symbol==i[0]&&a.name==i[1]&&a.nextStatusSymbol==i[2])?r.push(`The status ${i[1]} (${i[0]}) is already added.`):et.addStatus(t.customStatuses,ge.createFromImportedValue(i))}),r}static allStatuses(t){return t.coreStatuses.concat(t.customStatuses)}static applyToStatusRegistry(t,e){e.clearStatuses(),et.allStatuses(t).forEach(r=>{e.add(r)})}}});var US,LS=ee(()=>{US=[{index:9999,internalName:"INTERNAL_TESTING_ENABLED_BY_DEFAULT",displayName:"Test Item. Used to validate the Feature Framework.",description:"Description",enabledByDefault:!0,stable:!1}]});var _i,YS=ee(()=>{"use strict";LS();_i=class{constructor(t,e,r,i,s,a){this.internalName=t;this.index=e;this.description=r;this.displayName=i;this.enabledByDefault=s;this.stable=a}static get values(){let t=[];return US.forEach(e=>{t=[...t,new _i(e.internalName,e.index,e.description,e.displayName,e.enabledByDefault,e.stable)]}),t}static get settingsFlags(){let t={};return _i.values.forEach(e=>{t[e.internalName]=e.enabledByDefault}),t}static fromString(t){for(let e of _i.values)if(t===e.internalName)return e;throw new RangeError(`Illegal argument passed to fromString(): ${t} does not correspond to any available Feature ${this.prototype.constructor.name}`)}}});function ay(n,t){for(let e in n)t[e]===void 0&&(t[e]=n[e])}function au(){return Er[oe().taskFormat]}var Er,oy,vi,oe,at,js,jS,Bt=ee(()=>{"use strict";ry();nu();sy();Cn();Dr();IS();sy();gs();FS();Ga();YS();Er={tasksPluginEmoji:{getDisplayName:()=>N.t("settings.format.displayName.tasksEmojiFormat"),taskSerializer:new Ls(tu),buildSuggestions:ey(tu,Jg,!1)},dataview:{getDisplayName:()=>N.t("settings.format.displayName.dataview"),taskSerializer:new nd,buildSuggestions:PS(ey(iy,Jg,!0),[["(",")"],["[","]"]])}},oy={includes:{},globalQuery:"",globalFilter:"",removeGlobalFilter:!1,taskFormat:"tasksPluginEmoji",setCreatedDate:!1,setDoneDate:!0,setCancelledDate:!0,autoSuggestInEditor:!0,autoSuggestMinMatch:0,autoSuggestMaxItems:20,provideAccessKeys:!0,useFilenameAsScheduledDate:!1,filenameAsScheduledDateFormat:"",filenameAsDateFolders:[],recurrenceOnNextLine:!1,removeScheduledDateOnRecurrence:!1,statusSettings:new et,features:_i.settingsFlags,generalSettings:{},headingOpened:{},debugSettings:new rd,loggingOptions:{minLevels:{"":"info",tasks:"info","tasks.Cache":"info","tasks.Events":"info","tasks.File":"info","tasks.Query":"info","tasks.Task":"info"}}},vi=U({},oy);oe=()=>(ay(_i.settingsFlags,vi.features),ay(oy.loggingOptions.minLevels,vi.loggingOptions.minLevels),ay(oy.debugSettings,vi.debugSettings),vi.statusSettings.customStatuses.forEach((n,t,e)=>{var i,s;let r=ge.getTypeFromStatusTypeString(n.type);e[t]=new gt((i=n.symbol)!=null?i:" ",n.name,(s=n.nextStatusSymbol)!=null?s:"x",n.availableAsCommand,r)}),U({},vi)),at=n=>(vi=U(U({},vi),n),oe()),js=(n,t)=>(vi.generalSettings[n]=t,oe()),jS=n=>{var t;return(t=vi.features[n])!=null?t:!1}});function id(n){let e={"<":"<",">":">","&":"&",'"':"""}[n];return e!==void 0?e:n}function WS(n){let t=[...n],e="";return t.forEach(r=>{e+=id(r)}),e}var $S=ee(()=>{"use strict"});var Be,wi=ee(()=>{"use strict";$S();Dr();Cn();Be=class{constructor(){this._registeredStatuses=[];this.addDefaultStatusTypes()}set(t){this.clearStatuses(),t.forEach(e=>{this.add(e)})}get registeredStatuses(){return this._registeredStatuses.filter(({symbol:t})=>t!==ge.EMPTY.symbol)}static getInstance(){return Be.instance||(Be.instance=new Be),Be.instance}add(t){this.hasSymbol(t.symbol)||(t instanceof ge?this._registeredStatuses.push(t):this._registeredStatuses.push(new ge(t)))}bySymbol(t){return this.hasSymbol(t)?this.getSymbol(t):ge.EMPTY}bySymbolOrCreate(t){return this.hasSymbol(t)?this.getSymbol(t):ge.createUnknownStatus(t)}byName(t){return this._registeredStatuses.filter(({name:e})=>e===t).length>0?this._registeredStatuses.filter(({name:e})=>e===t)[0]:ge.EMPTY}resetToDefaultStatuses(){this.clearStatuses(),this.addDefaultStatusTypes()}clearStatuses(){this._registeredStatuses=[]}getNextStatus(t){if(t.nextStatusSymbol!==""){let e=this.bySymbol(t.nextStatusSymbol);if(e!==null)return e}return ge.EMPTY}getNextStatusOrCreate(t){let e=this.getNextStatus(t);return e.type!=="EMPTY"?e:ge.createUnknownStatus(t.nextStatusSymbol)}getNextRecurrenceStatusOrCreate(t){let e=this.getNextStatusOrCreate(t),r=this.getNextRecurrenceStatusOfType(e,"TODO");if(r)return r;let i=this.getNextRecurrenceStatusOfType(e,"IN_PROGRESS");return i||this.bySymbolOrCreate(" ")}getNextRecurrenceStatusOfType(t,e){if(t.type===e)return t;let r=t;for(let i=0;i<this.registeredStatuses.length-1;i++)if(r=this.getNextStatusOrCreate(r),r.type===e)return r}findUnknownStatuses(t){let e=t.filter(s=>!this.hasSymbol(s.symbol)),r=new Be,i=[];return e.forEach(s=>{if(r.hasSymbol(s.symbol))return;let a=Be.copyStatusWithNewName(s,`Unknown (${s.symbol})`);i.push(a),r.add(a)}),i.sort((s,a)=>s.symbol.localeCompare(a.symbol,void 0,{numeric:!0}))}static copyStatusWithNewName(t,e){let r=new gt(t.symbol,e,t.nextStatusSymbol,t.availableAsCommand,t.type);return new ge(r)}getSymbol(t){return this._registeredStatuses.filter(({symbol:e})=>e===t)[0]}hasSymbol(t){return this._registeredStatuses.find(e=>e.symbol===t)!==void 0}addDefaultStatusTypes(){[ge.TODO,ge.IN_PROGRESS,ge.DONE,ge.CANCELLED].forEach(e=>{this.add(e)})}mermaidDiagram(t=!1){let e=this.registeredStatuses,r="mermaid",i=[],s=[];return e.forEach((a,o)=>{let l=this.getMermaidNodeLabel(a,t);i.push(`${o+1}${l}`);let u=this.getNextStatus(a);if(this.addEdgeIfNotToInternal(e,u,s,o,!1),a.type==="DONE"){let c=this.getNextRecurrenceStatusOrCreate(a);c.symbol!==u.symbol&&this.addEdgeIfNotToInternal(e,c,s,o,!0)}}),` \`\`\`${r} flowchart LR @@ -200,8 +200,8 @@ ${s.join(` linkStyle default stroke:gray \`\`\` -`}addEdgeIfNotToInternal(t,e,r,i,s){let a=t.findIndex(u=>u.symbol===e.symbol),o=a!==-1,l=e.type!=="EMPTY";if(o&&l){let u;s?u='-. "\u{1F501}" .-> ':u=" --> ";let c=`${i+1}${u}${a+1}`;r.push(c)}}getMermaidNodeLabel(t,e){let r=WS(t.name),i=t.type;if(e){let s=id(t.symbol),a=id(t.nextStatusSymbol),o=`[${s}] -> [${a}]`,l=`'${r}'`,u=`(${i})`;return`["${l}<br>${o}<br>${u}"]:::${i}`}else return`["${r}"]:::${i}`}}});var Vr,qS=ee(()=>{"use strict";Vr=class{constructor(t,e){this.name=t,this.sortOrder=e}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}}});var HS,It,sd=ee(()=>{"use strict";HS=require("obsidian");qS();ii();It=class{constructor(t){this._date=null;this._date=t}get moment(){return this._date}formatAsDate(t=""){return this.format(fe.dateFormat,t)}formatAsDateAndTime(t=""){return this.format(fe.dateTimeFormat,t)}format(t,e=""){return this._date?this._date.format(t):e}toISOString(t){return this._date?this._date.toISOString(t):""}get category(){let t=window.moment(),e=this.moment;return e?e.isBefore(t,"day")?new Vr("Overdue",1):e.isSame(t,"day")?new Vr("Today",2):e.isValid()?new Vr("Future",3):new Vr("Invalid date",0):new Vr("Undated",4)}get fromNow(){let t=this.moment;if(!t)return new Vr("",0);let e=this.fromNowOrder(t);return new Vr(t.fromNow(),e)}fromNowOrder(t){if(!t.isValid())return 0;let e=window.moment(),r=t.isSameOrBefore(e,"day"),i=this.fromNowStartDateOfGroup(t,r,e);return Number((r?1:3)+i.format("YYYYMMDD"))}fromNowStartDateOfGroup(t,e,r){let i=t.fromNow(!0).split(" "),s,a=Number(i[0]);isNaN(a)?s=1:s=a;let o=i[1];return e?r.subtract(s,o):r.add(s,o)}postpone(t="days",e=1){if(!this._date)throw new HS.Notice("Cannot postpone a null date");let r=window.moment().startOf("day");return this._date.isSameOrAfter(r,"day")?this._date.clone().add(e,t):r.add(e,t)}}});var VS=x((GS,BS)=>{(function(n){var t=Object.hasOwnProperty,e=Array.isArray?Array.isArray:function(y){return Object.prototype.toString.call(y)==="[object Array]"},r=10,i=typeof process=="object"&&typeof process.nextTick=="function",s=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",l=o?setImmediate:setTimeout,u=s?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(m){var y=Object.getOwnPropertyNames(m);return y.push.apply(y,Object.getOwnPropertySymbols(m)),y}:Object.keys;function c(){this._events={},this._conf&&d.call(this,this._conf)}function d(m){m&&(this._conf=m,m.delimiter&&(this.delimiter=m.delimiter),m.maxListeners!==n&&(this._maxListeners=m.maxListeners),m.wildcard&&(this.wildcard=m.wildcard),m.newListener&&(this._newListener=m.newListener),m.removeListener&&(this._removeListener=m.removeListener),m.verboseMemoryLeak&&(this.verboseMemoryLeak=m.verboseMemoryLeak),m.ignoreErrors&&(this.ignoreErrors=m.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function f(m,y){var v="(node) warning: possible EventEmitter memory leak detected. "+m+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(v+=" Event name: "+y+"."),typeof process!="undefined"&&process.emitWarning){var w=new Error(v);w.name="MaxListenersExceededWarning",w.emitter=this,w.count=m,process.emitWarning(w)}else console.error(v),console.trace&&console.trace()}var p=function(m,y,v){var w=arguments.length;switch(w){case 0:return[];case 1:return[m];case 2:return[m,y];case 3:return[m,y,v];default:for(var S=new Array(w);w--;)S[w]=arguments[w];return S}};function b(m,y){for(var v={},w,S=m.length,M=y?y.length:0,I=0;I<S;I++)w=m[I],v[w]=I<M?y[I]:n;return v}function T(m,y,v){this._emitter=m,this._target=y,this._listeners={},this._listenersCount=0;var w,S;if((v.on||v.off)&&(w=v.on,S=v.off),y.addEventListener?(w=y.addEventListener,S=y.removeEventListener):y.addListener?(w=y.addListener,S=y.removeListener):y.on&&(w=y.on,S=y.off),!w&&!S)throw Error("target does not implement any known event API");if(typeof w!="function")throw TypeError("on method must be a function");if(typeof S!="function")throw TypeError("off method must be a function");this._on=w,this._off=S;var M=m._observers;M?M.push(this):m._observers=[this]}Object.assign(T.prototype,{subscribe:function(m,y,v){var w=this,S=this._target,M=this._emitter,I=this._listeners,j=function(){var D=p.apply(null,arguments),P={data:D,name:y,original:m};if(v){var W=v.call(S,P);W!==!1&&M.emit.apply(M,[P.name].concat(D));return}M.emit.apply(M,[y].concat(D))};if(I[m])throw Error("Event '"+m+"' is already listening");this._listenersCount++,M._newListener&&M._removeListener&&!w._onNewListener?(this._onNewListener=function(D){D===y&&I[m]===null&&(I[m]=j,w._on.call(S,m,j))},M.on("newListener",this._onNewListener),this._onRemoveListener=function(D){D===y&&!M.hasListeners(D)&&I[m]&&(I[m]=null,w._off.call(S,m,j))},I[m]=null,M.on("removeListener",this._onRemoveListener)):(I[m]=j,w._on.call(S,m,j))},unsubscribe:function(m){var y=this,v=this._listeners,w=this._emitter,S,M,I=this._off,j=this._target,D;if(m&&typeof m!="string")throw TypeError("event must be a string");function P(){y._onNewListener&&(w.off("newListener",y._onNewListener),w.off("removeListener",y._onRemoveListener),y._onNewListener=null,y._onRemoveListener=null);var W=se.call(w,y);w._observers.splice(W,1)}if(m){if(S=v[m],!S)return;I.call(j,m,S),delete v[m],--this._listenersCount||P()}else{for(M=u(v),D=M.length;D-- >0;)m=M[D],I.call(j,m,v[m]);this._listeners={},this._listenersCount=0,P()}}});function _(m,y,v,w){var S=Object.assign({},y);if(!m)return S;if(typeof m!="object")throw TypeError("options must be an object");var M=Object.keys(m),I=M.length,j,D,P;function W(be){throw Error('Invalid "'+j+'" option value'+(be?". Reason: "+be:""))}for(var ce=0;ce<I;ce++){if(j=M[ce],!w&&!t.call(y,j))throw Error('Unknown "'+j+'" option');D=m[j],D!==n&&(P=v[j],S[j]=P?P(D,W):D)}return S}function O(m,y){return(typeof m!="function"||!m.hasOwnProperty("prototype"))&&y("value must be a constructor"),m}function E(m){var y="value must be type of "+m.join("|"),v=m.length,w=m[0],S=m[1];return v===1?function(M,I){if(typeof M===w)return M;I(y)}:v===2?function(M,I){var j=typeof M;if(j===w||j===S)return M;I(y)}:function(M,I){for(var j=typeof M,D=v;D-- >0;)if(j===m[D])return M;I(y)}}var A=E(["function"]),Y=E(["object","function"]);function q(m,y,v){var w,S,M=0,I,j=new m(function(D,P,W){v=_(v,{timeout:0,overload:!1},{timeout:function(He,Le){return He*=1,(typeof He!="number"||He<0||!Number.isFinite(He))&&Le("timeout must be a positive number"),He}}),w=!v.overload&&typeof m.prototype.cancel=="function"&&typeof W=="function";function ce(){S&&(S=null),M&&(clearTimeout(M),M=0)}var be=function(He){ce(),D(He)},Oe=function(He){ce(),P(He)};w?y(be,Oe,W):(S=[function(He){Oe(He||Error("canceled"))}],y(be,Oe,function(He){if(I)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof He!="function")throw TypeError("onCancel callback must be a function");S.push(He)}),I=!0),v.timeout>0&&(M=setTimeout(function(){var He=Error("timeout");He.code="ETIMEDOUT",M=0,j.cancel(He),P(He)},v.timeout))});return w||(j.cancel=function(D){if(!!S){for(var P=S.length,W=1;W<P;W++)S[W](D);S[0](D),S=null}}),j}function se(m){var y=this._observers;if(!y)return-1;for(var v=y.length,w=0;w<v;w++)if(y[w]._target===m)return w;return-1}function H(m,y,v,w,S){if(!v)return null;if(w===0){var M=typeof y;if(M==="string"){var I,j,D=0,P=0,W=this.delimiter,ce=W.length;if((j=y.indexOf(W))!==-1){I=new Array(5);do I[D++]=y.slice(P,j),P=j+ce;while((j=y.indexOf(W,P))!==-1);I[D++]=y.slice(P),y=I,S=D}else y=[y],S=1}else M==="object"?S=y.length:(y=[y],S=1)}var be=null,Oe,He,Le,Yt,pr,vn=y[w],te=y[w+1],jt,it;if(w===S)v._listeners&&(typeof v._listeners=="function"?(m&&m.push(v._listeners),be=[v]):(m&&m.push.apply(m,v._listeners),be=[v]));else if(vn==="*"){for(jt=u(v),j=jt.length;j-- >0;)Oe=jt[j],Oe!=="_listeners"&&(it=H(m,y,v[Oe],w+1,S),it&&(be?be.push.apply(be,it):be=it));return be}else if(vn==="**"){for(pr=w+1===S||w+2===S&&te==="*",pr&&v._listeners&&(be=H(m,y,v,S,S)),jt=u(v),j=jt.length;j-- >0;)Oe=jt[j],Oe!=="_listeners"&&(Oe==="*"||Oe==="**"?(v[Oe]._listeners&&!pr&&(it=H(m,y,v[Oe],S,S),it&&(be?be.push.apply(be,it):be=it)),it=H(m,y,v[Oe],w,S)):Oe===te?it=H(m,y,v[Oe],w+2,S):it=H(m,y,v[Oe],w,S),it&&(be?be.push.apply(be,it):be=it));return be}else v[vn]&&(be=H(m,y,v[vn],w+1,S));if(He=v["*"],He&&H(m,y,He,w+1,S),Le=v["**"],Le)if(w<S)for(Le._listeners&&H(m,y,Le,S,S),jt=u(Le),j=jt.length;j-- >0;)Oe=jt[j],Oe!=="_listeners"&&(Oe===te?H(m,y,Le[Oe],w+2,S):Oe===vn?H(m,y,Le[Oe],w+1,S):(Yt={},Yt[Oe]=Le[Oe],H(m,y,{"**":Yt},w+1,S)));else Le._listeners?H(m,y,Le,S,S):Le["*"]&&Le["*"]._listeners&&H(m,y,Le["*"],S,S);return be}function Z(m,y,v){var w=0,S=0,M,I=this.delimiter,j=I.length,D;if(typeof m=="string")if((M=m.indexOf(I))!==-1){D=new Array(5);do D[w++]=m.slice(S,M),S=M+j;while((M=m.indexOf(I,S))!==-1);D[w++]=m.slice(S)}else D=[m],w=1;else D=m,w=m.length;if(w>1){for(M=0;M+1<w;M++)if(D[M]==="**"&&D[M+1]==="**")return}var P=this.listenerTree,W;for(M=0;M<w;M++)if(W=D[M],P=P[W]||(P[W]={}),M===w-1)return P._listeners?(typeof P._listeners=="function"&&(P._listeners=[P._listeners]),v?P._listeners.unshift(y):P._listeners.push(y),!P._listeners.warned&&this._maxListeners>0&&P._listeners.length>this._maxListeners&&(P._listeners.warned=!0,f.call(this,P._listeners.length,W))):P._listeners=y,!0;return!0}function ye(m,y,v,w){for(var S=u(m),M=S.length,I,j,D,P=m._listeners,W;M-- >0;)j=S[M],I=m[j],j==="_listeners"?D=v:D=v?v.concat(j):[j],W=w||typeof j=="symbol",P&&y.push(W?D:D.join(this.delimiter)),typeof I=="object"&&ye.call(this,I,y,D,W);return y}function we(m){for(var y=u(m),v=y.length,w,S,M;v-- >0;)S=y[v],w=m[S],w&&(M=!0,S!=="_listeners"&&!we(w)&&delete m[S]);return M}function V(m,y,v){this.emitter=m,this.event=y,this.listener=v}V.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function K(m,y,v){if(v===!0)S=!0;else if(v===!1)w=!0;else{if(!v||typeof v!="object")throw TypeError("options should be an object or true");var w=v.async,S=v.promisify,M=v.nextTick,I=v.objectify}if(w||M||S){var j=y,D=y._origin||y;if(M&&!i)throw Error("process.nextTick is not supported");S===n&&(S=y.constructor.name==="AsyncFunction"),y=function(){var P=arguments,W=this,ce=this.event;return S?M?Promise.resolve():new Promise(function(be){l(be)}).then(function(){return W.event=ce,j.apply(W,P)}):(M?process.nextTick:l)(function(){W.event=ce,j.apply(W,P)})},y._async=!0,y._origin=D}return[y,I?new V(this,m,y):this]}function C(m){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,d.call(this,m)}C.EventEmitter2=C,C.prototype.listenTo=function(m,y,v){if(typeof m!="object")throw TypeError("target musts be an object");var w=this;v=_(v,{on:n,off:n,reducers:n},{on:A,off:A,reducers:Y});function S(M){if(typeof M!="object")throw TypeError("events must be an object");var I=v.reducers,j=se.call(w,m),D;j===-1?D=new T(w,m,v):D=w._observers[j];for(var P=u(M),W=P.length,ce,be=typeof I=="function",Oe=0;Oe<W;Oe++)ce=P[Oe],D.subscribe(ce,M[ce]||ce,be?I:I&&I[ce])}return e(y)?S(b(y)):S(typeof y=="string"?b(y.split(/\s+/)):y),this},C.prototype.stopListeningTo=function(m,y){var v=this._observers;if(!v)return!1;var w=v.length,S,M=!1;if(m&&typeof m!="object")throw TypeError("target should be an object");for(;w-- >0;)S=v[w],(!m||S._target===m)&&(S.unsubscribe(y),M=!0);return M},C.prototype.delimiter=".",C.prototype.setMaxListeners=function(m){m!==n&&(this._maxListeners=m,this._conf||(this._conf={}),this._conf.maxListeners=m)},C.prototype.getMaxListeners=function(){return this._maxListeners},C.prototype.event="",C.prototype.once=function(m,y,v){return this._once(m,y,!1,v)},C.prototype.prependOnceListener=function(m,y,v){return this._once(m,y,!0,v)},C.prototype._once=function(m,y,v,w){return this._many(m,1,y,v,w)},C.prototype.many=function(m,y,v,w){return this._many(m,y,v,!1,w)},C.prototype.prependMany=function(m,y,v,w){return this._many(m,y,v,!0,w)},C.prototype._many=function(m,y,v,w,S){var M=this;if(typeof v!="function")throw new Error("many only accepts instances of Function");function I(){return--y===0&&M.off(m,I),v.apply(this,arguments)}return I._origin=v,this._on(m,I,w,S)},C.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var m=arguments[0],y,v=this.wildcard,w,S,M,I,j;if(m==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(v&&(y=m,m!=="newListener"&&m!=="removeListener"&&typeof m=="object")){if(S=m.length,s){for(M=0;M<S;M++)if(typeof m[M]=="symbol"){j=!0;break}}j||(m=m.join(this.delimiter))}var D=arguments.length,P;if(this._all&&this._all.length)for(P=this._all.slice(),M=0,S=P.length;M<S;M++)switch(this.event=m,D){case 1:P[M].call(this,m);break;case 2:P[M].call(this,m,arguments[1]);break;case 3:P[M].call(this,m,arguments[1],arguments[2]);break;default:P[M].apply(this,arguments)}if(v)P=[],H.call(this,P,y,this.listenerTree,0,S);else if(P=this._events[m],typeof P=="function"){switch(this.event=m,D){case 1:P.call(this);break;case 2:P.call(this,arguments[1]);break;case 3:P.call(this,arguments[1],arguments[2]);break;default:for(w=new Array(D-1),I=1;I<D;I++)w[I-1]=arguments[I];P.apply(this,w)}return!0}else P&&(P=P.slice());if(P&&P.length){if(D>3)for(w=new Array(D-1),I=1;I<D;I++)w[I-1]=arguments[I];for(M=0,S=P.length;M<S;M++)switch(this.event=m,D){case 1:P[M].call(this);break;case 2:P[M].call(this,arguments[1]);break;case 3:P[M].call(this,arguments[1],arguments[2]);break;default:P[M].apply(this,w)}return!0}else if(!this.ignoreErrors&&!this._all&&m==="error")throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},C.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var m=arguments[0],y=this.wildcard,v,w,S,M,I,j;if(m==="newListener"&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(y&&(v=m,m!=="newListener"&&m!=="removeListener"&&typeof m=="object")){if(M=m.length,s){for(I=0;I<M;I++)if(typeof m[I]=="symbol"){w=!0;break}}w||(m=m.join(this.delimiter))}var D=[],P=arguments.length,W;if(this._all)for(I=0,M=this._all.length;I<M;I++)switch(this.event=m,P){case 1:D.push(this._all[I].call(this,m));break;case 2:D.push(this._all[I].call(this,m,arguments[1]));break;case 3:D.push(this._all[I].call(this,m,arguments[1],arguments[2]));break;default:D.push(this._all[I].apply(this,arguments))}if(y?(W=[],H.call(this,W,v,this.listenerTree,0)):W=this._events[m],typeof W=="function")switch(this.event=m,P){case 1:D.push(W.call(this));break;case 2:D.push(W.call(this,arguments[1]));break;case 3:D.push(W.call(this,arguments[1],arguments[2]));break;default:for(S=new Array(P-1),j=1;j<P;j++)S[j-1]=arguments[j];D.push(W.apply(this,S))}else if(W&&W.length){if(W=W.slice(),P>3)for(S=new Array(P-1),j=1;j<P;j++)S[j-1]=arguments[j];for(I=0,M=W.length;I<M;I++)switch(this.event=m,P){case 1:D.push(W[I].call(this));break;case 2:D.push(W[I].call(this,arguments[1]));break;case 3:D.push(W[I].call(this,arguments[1],arguments[2]));break;default:D.push(W[I].apply(this,S))}}else if(!this.ignoreErrors&&!this._all&&m==="error")return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(D)},C.prototype.on=function(m,y,v){return this._on(m,y,!1,v)},C.prototype.prependListener=function(m,y,v){return this._on(m,y,!0,v)},C.prototype.onAny=function(m){return this._onAny(m,!1)},C.prototype.prependAny=function(m){return this._onAny(m,!0)},C.prototype.addListener=C.prototype.on,C.prototype._onAny=function(m,y){if(typeof m!="function")throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),y?this._all.unshift(m):this._all.push(m),this},C.prototype._on=function(m,y,v,w){if(typeof m=="function")return this._onAny(m,y),this;if(typeof y!="function")throw new Error("on only accepts instances of Function");this._events||c.call(this);var S=this,M;return w!==n&&(M=K.call(this,m,y,w),y=M[0],S=M[1]),this._newListener&&this.emit("newListener",m,y),this.wildcard?(Z.call(this,m,y,v),S):(this._events[m]?(typeof this._events[m]=="function"&&(this._events[m]=[this._events[m]]),v?this._events[m].unshift(y):this._events[m].push(y),!this._events[m].warned&&this._maxListeners>0&&this._events[m].length>this._maxListeners&&(this._events[m].warned=!0,f.call(this,this._events[m].length,m))):this._events[m]=y,S)},C.prototype.off=function(m,y){if(typeof y!="function")throw new Error("removeListener only takes instances of Function");var v,w=[];if(this.wildcard){var S=typeof m=="string"?m.split(this.delimiter):m.slice();if(w=H.call(this,null,S,this.listenerTree,0),!w)return this}else{if(!this._events[m])return this;v=this._events[m],w.push({_listeners:v})}for(var M=0;M<w.length;M++){var I=w[M];if(v=I._listeners,e(v)){for(var j=-1,D=0,P=v.length;D<P;D++)if(v[D]===y||v[D].listener&&v[D].listener===y||v[D]._origin&&v[D]._origin===y){j=D;break}if(j<0)continue;return this.wildcard?I._listeners.splice(j,1):this._events[m].splice(j,1),v.length===0&&(this.wildcard?delete I._listeners:delete this._events[m]),this._removeListener&&this.emit("removeListener",m,y),this}else(v===y||v.listener&&v.listener===y||v._origin&&v._origin===y)&&(this.wildcard?delete I._listeners:delete this._events[m],this._removeListener&&this.emit("removeListener",m,y))}return this.listenerTree&&we(this.listenerTree),this},C.prototype.offAny=function(m){var y=0,v=0,w;if(m&&this._all&&this._all.length>0){for(w=this._all,y=0,v=w.length;y<v;y++)if(m===w[y])return w.splice(y,1),this._removeListener&&this.emit("removeListenerAny",m),this}else{if(w=this._all,this._removeListener)for(y=0,v=w.length;y<v;y++)this.emit("removeListenerAny",w[y]);this._all=[]}return this},C.prototype.removeListener=C.prototype.off,C.prototype.removeAllListeners=function(m){if(m===n)return!this._events||c.call(this),this;if(this.wildcard){var y=H.call(this,null,m,this.listenerTree,0),v,w;if(!y)return this;for(w=0;w<y.length;w++)v=y[w],v._listeners=null;this.listenerTree&&we(this.listenerTree)}else this._events&&(this._events[m]=null);return this},C.prototype.listeners=function(m){var y=this._events,v,w,S,M,I;if(m===n){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!y)return[];for(v=u(y),M=v.length,S=[];M-- >0;)w=y[v[M]],typeof w=="function"?S.push(w):S.push.apply(S,w);return S}else{if(this.wildcard){if(I=this.listenerTree,!I)return[];var j=[],D=typeof m=="string"?m.split(this.delimiter):m.slice();return H.call(this,j,D,I,0),j}return y?(w=y[m],w?typeof w=="function"?[w]:w:[]):[]}},C.prototype.eventNames=function(m){var y=this._events;return this.wildcard?ye.call(this,this.listenerTree,[],null,m):y?u(y):[]},C.prototype.listenerCount=function(m){return this.listeners(m).length},C.prototype.hasListeners=function(m){if(this.wildcard){var y=[],v=typeof m=="string"?m.split(this.delimiter):m.slice();return H.call(this,y,v,this.listenerTree,0),y.length>0}var w=this._events,S=this._all;return!!(S&&S.length||w&&(m===n?u(w).length:w[m]))},C.prototype.listenersAny=function(){return this._all?this._all:[]},C.prototype.waitFor=function(m,y){var v=this,w=typeof y;return w==="number"?y={timeout:y}:w==="function"&&(y={filter:y}),y=_(y,{timeout:0,filter:n,handleError:!1,Promise,overload:!1},{filter:A,Promise:O}),q(y.Promise,function(S,M,I){function j(){var D=y.filter;if(!(D&&!D.apply(v,arguments)))if(v.off(m,j),y.handleError){var P=arguments[0];P?M(P):S(p.apply(null,arguments).slice(1))}else S(p.apply(null,arguments))}I(function(){v.off(m,j)}),v._on(m,j,!1)},{timeout:y.timeout,overload:y.overload})};function J(m,y,v){v=_(v,{Promise,timeout:0,overload:!1},{Promise:O});var w=v.Promise;return q(w,function(S,M,I){var j;if(typeof m.addEventListener=="function"){j=function(){S(p.apply(null,arguments))},I(function(){m.removeEventListener(y,j)}),m.addEventListener(y,j,{once:!0});return}var D=function(){P&&m.removeListener("error",P),S(p.apply(null,arguments))},P;y!=="error"&&(P=function(W){m.removeListener(y,D),M(W)},m.once("error",P)),I(function(){P&&m.removeListener("error",P),m.removeListener(y,D)}),m.once(y,D)},{timeout:v.timeout,overload:v.overload})}var $=C.prototype;if(Object.defineProperties(C,{defaultMaxListeners:{get:function(){return $._maxListeners},set:function(m){if(typeof m!="number"||m<0||Number.isNaN(m))throw TypeError("n must be a non-negative number");$._maxListeners=m},enumerable:!0},once:{value:J,writable:!0,configurable:!0}}),Object.defineProperties($,{_maxListeners:{value:r,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return C});else if(typeof GS=="object")BS.exports=C;else{var oe=new Function("","return this")();oe.EventEmitter2=C}})()});function cy(n,t){let e=sn.getLogger("tasks");switch(n){case"trace":e.trace(t);break;case"debug":e.debug(t);break;case"info":e.info(t);break;case"warn":e.warn(t);break;case"error":e.error(t);break;default:break}}var w2,zS,ly,sn,uy,Ws=ee(()=>{"use strict";w2=require("obsidian"),zS=qo(VS()),ly=class extends zS.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=e=>e.reduce((r,i)=>r+i,0)/e.length}configure(e){return this.options=Object.assign({},this.options,e),this}getLogger(e){let r="none",i="";for(let s in this.options.minLevels)e.startsWith(s)&&s.length>=i.length&&(r=this.options.minLevels[s],i=s);return new uy(this,e,r)}onLogEntry(e){return this.on("log",e),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(e=>{let r=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${e.level}][${e.module}]`;switch(e.traceId&&(r+=`[${e.traceId}]`),r+=` ${e.message}`,e.objects===void 0&&(e.objects=""),e.level){case"trace":console.trace(r,e.objects);break;case"debug":console.debug(r,e.objects);break;case"info":console.info(r,e.objects);break;case"warn":console.warn(r,e.objects);break;case"error":console.error(r,e.objects);break;default:console.log(`{${e.level}} ${r}`,e.objects)}}),this.consoleLoggerRegistered=!0,this)}},sn=new ly,uy=class{constructor(t,e,r){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=t,this.module=e,this.minLevel=this.levelToInt(r)}levelToInt(t){return t.toLowerCase()in this.levels?this.levels[t.toLowerCase()]:99}log(t,e,r){if(this.levelToInt(t)<this.minLevel)return;let s={level:t,module:this.module,message:e,objects:r,traceId:void 0};this.logManager.emit("log",s)}trace(t,e){this.log("trace",t,e)}debug(t,e){this.log("debug",t,e)}info(t,e){this.log("info",t,e)}warn(t,e){this.log("warn",t,e)}error(t,e){this.log("error",t,e)}logWithId(t,e,r,i){if(this.levelToInt(t)<this.minLevel)return;let a={level:t,module:this.module,message:r,objects:i,traceId:e};this.logManager.emit("log",a)}traceWithId(t,e,r){this.logWithId("trace",t,e,r)}debugWithId(t,e,r){this.logWithId("debug",t,e,r)}infoWithId(t,e,r){this.logWithId("info",t,e,r)}warnWithId(t,e,r){this.logWithId("warn",t,e,r)}errorWithId(t,e,r){this.logWithId("error",t,e,r)}}});function ad(n,t,e){n.debug(`${t}: task line number: ${e.taskLocation.lineNumber}. file path: "${e.path}"`),n.debug(`${t} original: ${e.originalMarkdown}`)}function od(n,t,e){e.map((r,i)=>{n.debug(`${t} ==> ${i+1} : ${r.toFileLineString()}`)})}var dy=ee(()=>{"use strict"});var Ft,Gi=ee(()=>{"use strict";rn();Nt();Ft=class{static fromPath(t){let{useFilenameAsScheduledDate:e,filenameAsDateFolders:r}=le();return!e||!this.matchesAnyFolder(r,t)?null:this.extractDateFromPath(t)}static matchesAnyFolder(t,e){return t.length===0?!0:t.some(r=>e.startsWith(r+"/"))}static extractDateFromPath(t){let e=Math.max(0,t.lastIndexOf("/")+1),r=t.lastIndexOf("."),i=t.substring(e,r),{filenameAsScheduledDateFormat:s}=le();if(s!==""){let o=window.moment(i,s,!0);if(o.isValid())return o}let a=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(a||(a=/(\d{4})(\d{2})(\d{2})/.exec(i)),a){let o=window.moment([parseInt(a[1]),parseInt(a[2])-1,parseInt(a[3])]);if(o.isValid())return o}return null}static canApplyFallback({startDate:t,scheduledDate:e,dueDate:r}){return t===null&&r===null&&e===null}static updateTaskPath(t,e,r){let i=t.scheduledDate,s=t.scheduledDateIsInferred;return r===null?s&&(s=!1,i=null):s?i=r:this.canApplyFallback(t)&&(i=r,s=!0),new pe(de(U({},t),{taskLocation:e,scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(t,e){let r=t.scheduledDateIsInferred?t.scheduledDate:null;return e.map(i=>(r!==null&&!r.isSame(i.scheduledDate,"day")&&(i=new pe(de(U({},i),{scheduledDateIsInferred:!1}))),i))}}});var xr,ki,KS=ee(()=>{"use strict";xr=class{static calculate(t){var r,i,s;let e=0;if((r=t.dueDate)!=null&&r.isValid()){let a=window.moment().startOf("day"),o=Math.round(a.diff(t.dueDate)/xr.milliSecondsPerDay),l;o>=7?l=1:o>=-14?l=(o+14)*.8/21+.2:l=.2,e+=l*xr.dueCoefficient}switch((i=t.scheduledDate)!=null&&i.isValid()&&window.moment().isSameOrAfter(t.scheduledDate)&&(e+=1*xr.scheduledCoefficient),(s=t.startDate)!=null&&s.isValid()&&window.moment().isBefore(t.startDate)&&(e+=1*xr.startedCoefficient),t.priority){case"0":e+=1.5*xr.priorityCoefficient;break;case"1":e+=1*xr.priorityCoefficient;break;case"2":e+=.65*xr.priorityCoefficient;break;case"3":e+=.325*xr.priorityCoefficient;break;case"5":e-=.3*xr.priorityCoefficient;break}return e}},ki=xr;ki.dueCoefficient=12,ki.scheduledCoefficient=5,ki.startedCoefficient=-3,ki.priorityCoefficient=6,ki.milliSecondsPerDay=1e3*60*60*24});var QS={};wb(QS,{Task:()=>pe,isBlocked:()=>k2});function k2(n,t){if(n.dependsOn.length===0||n.isDone)return!1;for(let e of n.dependsOn)if(!!t.find(i=>i.id===e&&!i.isDone))return!0;return!1}var pe,Nt=ee(()=>{"use strict";rn();Mn();wi();Cs();sd();Cn();su();Ws();dy();Gi();ld();KS();ii();Kc();pe=class extends nr{constructor({status:e,description:r,taskLocation:i,indentation:s,listMarker:a,priority:o,createdDate:l,startDate:u,scheduledDate:c,dueDate:d,doneDate:f,cancelledDate:p,recurrence:b,onCompletion:T,dependsOn:_,id:O,blockLink:E,tags:A,originalMarkdown:Y,scheduledDateIsInferred:q,parent:se=null}){super({originalMarkdown:Y,indentation:s,listMarker:a,statusCharacter:e.symbol,description:r,taskLocation:i,parent:se});this._urgency=null;this.status=e,this.tags=A,this.priority=o,this.createdDate=l,this.startDate=u,this.scheduledDate=c,this.dueDate=d,this.doneDate=f,this.cancelledDate=p,this.recurrence=b,this.onCompletion=T,this.dependsOn=_,this.id=O,this.blockLink=E,this.scheduledDateIsInferred=q}static fromLine({line:e,taskLocation:r,fallbackDate:i}){let s=pe.extractTaskComponents(e);return s===null||!Fe.getInstance().includedIn(s.body)?null:pe.parseTaskSignifiers(e,r,i)}static parseTaskSignifiers(e,r,i){let s=pe.extractTaskComponents(e);if(s===null)return null;let{taskSerializer:a}=au(),o=a.deserialize(s.body),l=!1;return Ft.canApplyFallback(o)&&i!==null&&(o.scheduledDate=i,l=!0),o.tags=o.tags.map(u=>u.trim()),o.tags=o.tags.filter(u=>!Fe.getInstance().equals(u)),new pe(de(U(U({},s),o),{taskLocation:r,originalMarkdown:e,scheduledDateIsInferred:l}))}static extractTaskComponents(e){let r=e.match(fe.taskRegex);if(r===null)return null;let i=r[1],s=r[2],a=r[3],o=Be.getInstance().bySymbolOrCreate(a),l=r[4].trim(),u=l.match(fe.blockLinkRegex),c=u!==null?u[0]:"";return c!==""&&(l=l.replace(fe.blockLinkRegex,"").trim()),{indentation:i,listMarker:s,status:o,body:l,blockLink:c}}toString(){return au().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=sn.getLogger("tasks.Task"),r="toggle()";ad(e,r,this);let i=Be.getInstance().getNextStatusOrCreate(this.status),s=this.handleNewStatus(i);return od(e,r,s),s}handleNewStatus(e,r=window.moment()){if(e.identicalTo(this.status))return[this];let{setDoneDate:i}=le(),s=this.newDate(e,"DONE",this.doneDate,i,r),{setCancelledDate:a}=le(),o=this.newDate(e,"CANCELLED",this.cancelledDate,a,r),l=new pe(de(U({},this),{status:e,doneDate:s,cancelledDate:o})),u=!e.isCompleted(),c=this.status.isCompleted(),d=this.recurrence===null;if(u||c||d)return[l];let{removeScheduledDateOnRecurrence:p}=le(),b=this.recurrence.next(r,p);return b===null?[l]:[this.createNextOccurrence(e,b),l]}newDate(e,r,i,s,a){let o=null;return e.type===r&&(this.status.type!==r?s&&(o=a):o=i),o}createNextOccurrence(e,r){let{setCreatedDate:i}=le(),s=null;i&&(s=window.moment());let a=null,o=null,u=Be.getInstance().getNextRecurrenceStatusOrCreate(e);return new pe(de(U(U({},this),r),{status:u,blockLink:"",id:"",dependsOn:[],createdDate:s,cancelledDate:a,doneDate:o}))}toggleWithRecurrenceInUsersOrder(){let e=this.toggle();return this.putRecurrenceInUsersOrder(e)}handleNewStatusWithRecurrenceInUsersOrder(e,r=window.moment()){sn.getLogger("tasks.Task").debug(`changed task ${this.taskLocation.path} ${this.taskLocation.lineNumber} ${this.originalMarkdown} status to '${e.symbol}'`);let s=this.handleNewStatus(e,r);return this.putRecurrenceInUsersOrder(s)}putRecurrenceInUsersOrder(e){let r=DS(this,e),{recurrenceOnNextLine:i}=le();return i?r.reverse():r}get isTask(){return!0}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}isBlocked(e){if(this.dependsOn.length===0||this.isDone)return!1;for(let r of this.dependsOn)if(!!e.find(s=>s.id===r&&!s.isDone))return!0;return!1}isBlocking(e){return this.id===""||this.isDone?!1:e.some(r=>r.isDone?!1:r.dependsOn.includes(this.id))}get priorityNumber(){return Number.parseInt(this.priority)}get priorityNameGroupText(){let e=Rn.priorityNameUsingNormal(this.priority);return`%%${this.priority}%%${e} priority`}get descriptionWithoutTags(){return this.description.replace(fe.hashTags,"").trim()}get priorityName(){return Rn.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=ki.calculate(this)),this._urgency}get cancelled(){return new It(this.cancelledDate)}get created(){return new It(this.createdDate)}get done(){return new It(this.doneDate)}get due(){return new It(this.dueDate)}get scheduled(){return new It(this.scheduledDate)}get start(){return new It(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let e=this.happensDates,r=Array.from(e).sort(Qn);for(let i of r)if(i!=null&&i.isValid())return new It(i);return new It(null)}get isRecurring(){return this.recurrence!==null}get recurrenceRule(){return this.recurrence?this.recurrence.toText():""}get heading(){return this.precedingHeader}get hasHeading(){return this.precedingHeader!==null}getLinkText({isFilenameUnique:e}){let r;return e?r=this.filename:r="/"+this.path,r===null?null:(this.precedingHeader!==null&&this.precedingHeader!==r&&(r=r+" > "+this.precedingHeader),r)}identicalTo(e){var i,s;if(!super.identicalTo(e))return!1;let r=["priority","blockLink","scheduledDateIsInferred","id","dependsOn","onCompletion"];for(let a of r)if(((i=this[a])==null?void 0:i.toString())!==((s=e[a])==null?void 0:s.toString()))return!1;if(!this.status.identicalTo(e.status)||this.tags.length!==e.tags.length||!this.tags.every(function(a,o){return a===e.tags[o]}))return!1;r=pe.allDateFields();for(let a of r){let o=this[a],l=e[a];if(Qn(o,l)!==0)return!1}return this.recurrenceIdenticalTo(e)?this.file.rawFrontmatterIdenticalTo(e.file):!1}recurrenceIdenticalTo(e){let r=this.recurrence,i=e.recurrence;return!(r===null&&i!==null||r!==null&&i===null||r&&i&&!r.identicalTo(i))}static allDateFields(){return["createdDate","startDate","scheduledDate","dueDate","doneDate","cancelledDate"]}static extractHashtags(e){var r,i;return(i=(r=e.match(fe.hashTags))==null?void 0:r.map(s=>s.trim()))!=null?i:[]}}});var nr,ld=ee(()=>{"use strict";ii();nr=class{constructor({originalMarkdown:t,indentation:e,listMarker:r,statusCharacter:i,description:s,parent:a,taskLocation:o}){this.children=[];this.indentation=e,this.listMarker=r,this.statusCharacter=i,this.description=s,this.originalMarkdown=t,this.parent=a,a!==null&&a.children.push(this),this.taskLocation=o}static fromListItemLine(t,e,r){var a;let i=RegExp(fe.nonTaskRegex).exec(t);if(!i)return null;let s=i[2];return s===void 0?null:new nr({originalMarkdown:t,indentation:i[1],listMarker:s,statusCharacter:(a=i[4])!=null?a:null,description:i[5].trim(),taskLocation:r,parent:e})}get root(){return this.parent===null?this:this.parent.root}get isRoot(){return this.parent===null}findClosestParentTask(){let t=this.parent;for(;t!==null;){let{Task:e}=(Nt(),Sb(QS));if(t instanceof e)return t;t=t.parent}return null}get isTask(){return!1}identicalTo(t){var r,i;if(this.constructor.name!==t.constructor.name)return!1;let e=["description","statusCharacter","indentation","listMarker"];for(let s of e)if(((r=this[s])==null?void 0:r.toString())!==((i=t[s])==null?void 0:i.toString()))return!1;return this.taskLocation.identicalTo(t.taskLocation)?nr.listsAreIdentical(this.children,t.children):!1}static listsAreIdentical(t,e){return t.length!==e.length?!1:t.every((r,i)=>r.identicalTo(e[i]))}get path(){return this.taskLocation.path}get file(){return this.taskLocation.tasksFile}get filename(){let t=this.path.match(/([^/]+)\.md$/);return t!==null?t[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}checkOrUncheck(){if(this.statusCharacter===null)return this;let t=this.statusCharacter===" "?"x":" ",e=this.originalMarkdown.replace(RegExp(fe.checkboxRegex),`[${t}]`);return new nr(de(U({},this),{originalMarkdown:e,statusCharacter:t,parent:null}))}toFileLineString(){let t=this.statusCharacter?`[${this.statusCharacter}] `:"";return`${this.indentation}${this.listMarker} ${t}${this.description}`}}});var cE=x($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});var lE=Symbol("MustacheDataPath");function oE({target:n,propertyName:t}){return[...n[lE]||[],t]}function uE(n,t){return typeof n!="object"?n:new Proxy(n,{get(e,r){let i=e[r];if(i===void 0&&!(r in e)){let s=oE({target:e,propertyName:r});if(t!=null&&t.handleError)return t.handleError(s),i;throw Error(`Missing Mustache data property: ${s.join(" > ")}`)}return i&&typeof i=="object"?(i[lE]=oE({target:e,propertyName:r}),uE(i,t)):i}})}$y.default=uE});var Zr=x(Ar=>{"use strict";Ar.__esModule=!0;Ar.Tokens=Ar.StructuralCharacters=Ar.Operators=void 0;var eY;(function(n){n.AND="AND",n.OR="OR",n.XOR="XOR",n.NOT="NOT"})(eY=Ar.Operators||(Ar.Operators={}));var tY;(function(n){n.OPEN_PARENTHESIS="(",n.CLOSE_PARENTHESIS=")"})(tY=Ar.StructuralCharacters||(Ar.StructuralCharacters={}));var nY;(function(n){n.IDENTIFIER="IDENTIFIER",n.OPERATOR="OPERATOR",n.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",n.EOF="EOF",n.COMMENT="COMMENT"})(nY=Ar.Tokens||(Ar.Tokens={}))});var Vy=x(fo=>{"use strict";fo.__esModule=!0;fo.VALID_TOKENS=fo.OPERATOR_PRECEDENCE=void 0;var rt=Zr();fo.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};fo.VALID_TOKENS={identifierOnly:[{name:rt.Tokens.IDENTIFIER},{name:rt.Tokens.STRUCTURAL_CHARACTER,value:rt.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:rt.Tokens.IDENTIFIER},{name:rt.Tokens.STRUCTURAL_CHARACTER,value:rt.StructuralCharacters.OPEN_PARENTHESIS},{name:rt.Tokens.OPERATOR,value:rt.Operators.NOT}],binaryOperator:[{name:rt.Tokens.OPERATOR,value:rt.Operators.AND},{name:rt.Tokens.OPERATOR,value:rt.Operators.OR},{name:rt.Tokens.OPERATOR,value:rt.Operators.XOR}],binaryOperatorOrClose:[{name:rt.Tokens.OPERATOR,value:rt.Operators.AND},{name:rt.Tokens.OPERATOR,value:rt.Operators.OR},{name:rt.Tokens.OPERATOR,value:rt.Operators.XOR},{name:rt.Tokens.STRUCTURAL_CHARACTER,value:rt.StructuralCharacters.CLOSE_PARENTHESIS}]}});var zy=x(zt=>{"use strict";zt.__esModule=!0;zt.ESCAPE_CHARACTER=zt.EOL=zt.COMMENT_DELIMITER=zt.QUOTED_IDENTIFIER_DELIMITER=zt.SEPARATORS=zt.OPERATORS=zt.STRUCTURAL_CHARACTERS=void 0;var po=Zr();zt.STRUCTURAL_CHARACTERS={"(":po.StructuralCharacters.OPEN_PARENTHESIS,")":po.StructuralCharacters.CLOSE_PARENTHESIS};zt.OPERATORS={AND:po.Operators.AND,OR:po.Operators.OR,XOR:po.Operators.XOR,NOT:po.Operators.NOT};zt.SEPARATORS=new Set([32,9,10,13].map(function(n){return String.fromCodePoint(n)}));zt.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);zt.COMMENT_DELIMITER=String.fromCodePoint(35);zt.EOL=String.fromCodePoint(10);zt.ESCAPE_CHARACTER=String.fromCodePoint(92)});var gE=x(cr=>{"use strict";var Ky=cr&&cr.__assign||function(){return Ky=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Ky.apply(this,arguments)};cr.__esModule=!0;cr.getQuotedIdentifier=cr.getComment=cr.createResult=void 0;var hE=Zr(),ta=zy(),rY=function(n,t,e){return{token:Ky({name:n},t!==null?{value:t}:{}),remainingString:e}};cr.createResult=rY;var iY=function(n){for(var t=n.length,e=0;e<n.length;e+=1){var r=n[e];if(r===ta.EOL){t=e;break}}return(0,cr.createResult)(hE.Tokens.COMMENT,n.slice(0,t),n.slice(t+1))};cr.getComment=iY;var sY=function(n){for(var t=!1,e="",r=null,i=0;i<n.length;i+=1){var s=n[i];if(r===null)s===ta.QUOTED_IDENTIFIER_DELIMITER?t?(e=e.slice(0,-1)+ta.QUOTED_IDENTIFIER_DELIMITER,t=!1):r=i:(s===ta.ESCAPE_CHARACTER?t=!0:t=!1,e=e+=s);else{if(!ta.SEPARATORS.has(s)&&!ta.STRUCTURAL_CHARACTERS[s])throw new Error("Unexpected character: ".concat(s," Expected ) character or separator"));break}}if(r===null)throw new Error("Unexpected end of expression: expected ".concat(ta.QUOTED_IDENTIFIER_DELIMITER," character"));return(0,cr.createResult)(hE.Tokens.IDENTIFIER,e,n.slice(r+1))};cr.getQuotedIdentifier=sY});var yE=x(Ud=>{"use strict";Ud.__esModule=!0;Ud.lex=void 0;var mo=Zr(),In=zy(),ho=gE(),aY=function(n){for(var t=null,e=null,r=null,i=0;i<n.length;i+=1){var s=n[i];if(t===null){if(!In.SEPARATORS.has(s)){var a=In.STRUCTURAL_CHARACTERS[s];if(a){var o=n[i+1];if(a===mo.StructuralCharacters.CLOSE_PARENTHESIS&&o&&!In.SEPARATORS.has(o)&&o!==mo.StructuralCharacters.CLOSE_PARENTHESIS)throw new Error("Unexpected character: ".concat(o,". A closing parenthesis should be followed by another closing parenthesis or whitespace"));return(0,ho.createResult)(mo.Tokens.STRUCTURAL_CHARACTER,In.STRUCTURAL_CHARACTERS[s],n.slice(i+1))}if(s===In.QUOTED_IDENTIFIER_DELIMITER)return(0,ho.getQuotedIdentifier)(n.slice(i+1));if(s===In.COMMENT_DELIMITER)return(0,ho.getComment)(n.slice(i+1));t=i}}else if(In.SEPARATORS.has(s)||In.STRUCTURAL_CHARACTERS[s]){e=i,r=s;break}else if(s===In.QUOTED_IDENTIFIER_DELIMITER||s===In.COMMENT_DELIMITER)throw new Error("Unexpected character: ".concat(s))}if(t!==null){e=e!=null?e:n.length;var l=n.slice(t,e),u=n.slice(e);if(In.OPERATORS[l]){if(r&&!In.SEPARATORS.has(r))throw new Error("Unexpected character: ".concat(r,". Operators should be separated using whitespace"));return(0,ho.createResult)(mo.Tokens.OPERATOR,In.OPERATORS[l],u)}else return(0,ho.createResult)(mo.Tokens.IDENTIFIER,l,u)}return(0,ho.createResult)(mo.Tokens.EOF,null,"")};Ud.lex=aY});var TE=x(Fn=>{"use strict";var bE=Fn&&Fn.__spreadArray||function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return n.concat(s||Array.prototype.slice.call(t))};Fn.__esModule=!0;Fn.validateToken=Fn.previousOperatorTakesPrecedent=Fn.getValue=Fn.newTokenGenerator=void 0;var oY=yE(),go=Zr(),Yd=Vy(),lY=function(n){var t=n;return function(e,r){for(r===void 0&&(r=!1);;){var i=(0,oY.lex)(t),s=i.token,a=i.remainingString;if(t=a,s.name!==go.Tokens.COMMENT)return(0,Fn.validateToken)(s,e,r),s}}};Fn.newTokenGenerator=lY;var uY=function(n,t){var e=n(Yd.VALID_TOKENS.identifierOrNot),r=e.value===go.Operators.NOT;r&&(e=n(Yd.VALID_TOKENS.identifierOnly));var i=e.name===go.Tokens.STRUCTURAL_CHARACTER?t(n,!0):[e];return r?bE(bE([],i,!0),[{name:go.Tokens.OPERATOR,value:go.Operators.NOT}],!1):i};Fn.getValue=uY;var cY=function(n,t){return Yd.OPERATOR_PRECEDENCE[n]<=Yd.OPERATOR_PRECEDENCE[t]};Fn.previousOperatorTakesPrecedent=cY;var dY=function(n,t,e){if(e===void 0&&(e=!1),n.name===go.Tokens.EOF){if(e)return;throw new Error("Unexpected end of expression")}for(var r=0,i=t;r<i.length;r++){var s=i[r];if(s.name===n.name&&(!s.value||s.value===n.value))return}throw new TypeError("Invalid token")};Fn.validateToken=dY});var Xy=x(yo=>{"use strict";var Jr=yo&&yo.__spreadArray||function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return n.concat(s||Array.prototype.slice.call(t))};yo.__esModule=!0;yo.parse=void 0;var _E=Zr(),vE=Vy(),jd=TE(),fY=function(n){if(typeof n!="string")throw new Error("Expected string but received ".concat(typeof n));var t=(0,jd.newTokenGenerator)(n);return Qy(t)};yo.parse=fY;var Qy=function(n,t){t===void 0&&(t=!1);for(var e=Jr([],(0,jd.getValue)(n,Qy),!0),r=[];;){var i=t?vE.VALID_TOKENS.binaryOperatorOrClose:vE.VALID_TOKENS.binaryOperator,s=n(i,!t);if(s.name===_E.Tokens.EOF||s.name===_E.Tokens.STRUCTURAL_CHARACTER)return Jr(Jr([],e,!0),Jr([],r,!0).reverse(),!0);for(;r.length;){var a=r[r.length-1]||null;if(a&&(0,jd.previousOperatorTakesPrecedent)(a.value,s.value))e=Jr(Jr([],e,!0),[a],!1),r=r.slice(0,-1);else break}r=Jr(Jr([],r,!0),[s],!1),e=Jr(Jr([],e,!0),(0,jd.getValue)(n,Qy),!0)}}});var Zy=x(Kt=>{"use strict";Kt.__esModule=!0;Kt.throwInvalidExpression=Kt.isOperator=Kt.isIdentifier=Kt.notUtil=Kt.xorUtil=Kt.orUtil=Kt.andUtil=void 0;var wE=Zr(),pY=function(n,t){return n&&t};Kt.andUtil=pY;var mY=function(n,t){return n||t};Kt.orUtil=mY;var hY=function(n,t){return n!==t};Kt.xorUtil=hY;var gY=function(n){return!n};Kt.notUtil=gY;var yY=function(n){var t=n.name,e=n.value;return t===wE.Tokens.IDENTIFIER&&typeof e=="string"};Kt.isIdentifier=yY;var bY=function(n){var t=n.name,e=n.value;return t===wE.Tokens.OPERATOR&&typeof e=="string"};Kt.isOperator=bY;var TY=function(n){throw new TypeError("Invalid postfix expression: ".concat(n))};Kt.throwInvalidExpression=TY});var kE=x(Wd=>{"use strict";var ku;Wd.__esModule=!0;Wd.OPERATOR_MAP=void 0;var Jy=Zr(),eb=Zy();Wd.OPERATOR_MAP=(ku={},ku[Jy.Operators.AND]=eb.andUtil,ku[Jy.Operators.OR]=eb.orUtil,ku[Jy.Operators.XOR]=eb.xorUtil,ku)});var DE=x(dr=>{"use strict";var bo=dr&&dr.__spreadArray||function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return n.concat(s||Array.prototype.slice.call(t))};dr.__esModule=!0;dr.evaluateExpression=dr.evaluate=dr.getEvaluator=void 0;var _Y=Xy(),SE=Zr(),vY=kE(),na=Zy(),wY=function(n){var t=(0,_Y.parse)(n);return function(e){return(0,dr.evaluate)(t,e)}};dr.getEvaluator=wY;var kY=function(n,t){if(!Array.isArray(n))throw new Error("".concat(n," should be an array. evaluate takes in a parsed expression. Use in combination with parse or use getEvaluator"));var e=n.reduce(function(r,i,s){if(!(i&&((0,na.isIdentifier)(i)||(0,na.isOperator)(i))))throw new Error("Invalid token: ".concat(i,". Found in parsed expression at index ").concat(s));if(i.name===SE.Tokens.IDENTIFIER)return bo(bo([],r,!0),[Boolean(t[i.value])],!1);var a=r[r.length-2],o=r[r.length-1];if(i.value===SE.Operators.NOT)return o===void 0&&(0,na.throwInvalidExpression)("missing identifier"),bo(bo([],r.slice(0,-1),!0),[(0,na.notUtil)(o)],!1);(o===void 0||a===void 0)&&(0,na.throwInvalidExpression)("missing identifier");var l=vY.OPERATOR_MAP[i.value];return l||(0,na.throwInvalidExpression)("unknown operator"),bo(bo([],r.slice(0,-2),!0),[l(a,o)],!1)},[]);return e.length!==1&&(0,na.throwInvalidExpression)("too many identifiers after evaluation"),e[0]};dr.evaluate=kY;var SY=function(n,t){return(0,dr.getEvaluator)(n)(t)};dr.evaluateExpression=SY});var xE=x(ei=>{"use strict";var tb=ei&&ei.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e);var i=Object.getOwnPropertyDescriptor(t,e);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(n,r,i)}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]});ei.__esModule=!0;ei.parse=ei.evaluate=ei.getEvaluator=void 0;var EE=DE();tb(ei,EE,"getEvaluator");tb(ei,EE,"evaluate");var DY=Xy();tb(ei,DY,"parse")});var GY={};wb(GY,{default:()=>Of});module.exports=Sb(GY);var Ox=require("obsidian");gs();var XS=require("obsidian"),Va=require("obsidian");var _j=new Error("timeout while waiting for mutex to become available"),vj=new Error("mutex already locked"),eO=new Error("request for lock canceled"),tO=function(n,t,e,r){function i(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function o(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?s(c.value):i(c.value).then(o,l)}u((r=r.apply(n,t||[])).next())})},Wf=class{constructor(t,e=eO){this._value=t,this._cancelError=e,this._weightedQueues=[],this._weightedWaiters=[]}acquire(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise((e,r)=>{this._weightedQueues[t-1]||(this._weightedQueues[t-1]=[]),this._weightedQueues[t-1].push({resolve:e,reject:r}),this._dispatch()})}runExclusive(t,e=1){return tO(this,void 0,void 0,function*(){let[r,i]=yield this.acquire(e);try{return yield t(r)}finally{i()}})}waitForUnlock(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise(e=>{this._weightedWaiters[t-1]||(this._weightedWaiters[t-1]=[]),this._weightedWaiters[t-1].push(e),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(t){this._value=t,this._dispatch()}release(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);this._value+=t,this._dispatch()}cancel(){this._weightedQueues.forEach(t=>t.forEach(e=>e.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var t;for(let e=this._value;e>0;e--){let r=(t=this._weightedQueues[e-1])===null||t===void 0?void 0:t.shift();if(!r)continue;let i=this._value,s=e;this._value-=e,e=this._value+1,r.resolve([i,this._newReleaser(s)])}this._drainUnlockWaiters()}_newReleaser(t){let e=!1;return()=>{e||(e=!0,this.release(t))}}_drainUnlockWaiters(){for(let t=this._value;t>0;t--)!this._weightedWaiters[t-1]||(this._weightedWaiters[t-1].forEach(e=>e()),this._weightedWaiters[t-1]=[])}},nO=function(n,t,e,r){function i(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function o(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?s(c.value):i(c.value).then(o,l)}u((r=r.apply(n,t||[])).next())})},Yu=class{constructor(t){this._semaphore=new Wf(1,t)}acquire(){return nO(this,void 0,void 0,function*(){let[,t]=yield this._semaphore.acquire();return t})}runExclusive(t){return this._semaphore.runExclusive(()=>t())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var ju=require("obsidian"),mt=class{constructor(t,e={}){this._frontmatter={tags:[]};this._tags=[];var i,s;this._path=t,this._cachedMetadata=e;let r=e.frontmatter;if(r!==void 0&&(this._frontmatter=JSON.parse(JSON.stringify(r)),this._frontmatter.tags=(i=(0,ju.parseFrontMatterTags)(r))!=null?i:[]),Object.keys(e).length!==0){let a=(s=(0,ju.getAllTags)(this.cachedMetadata))!=null?s:[];this._tags=[...new Set(a)]}}get path(){return this._path}get tags(){return this._tags}get cachedMetadata(){return this._cachedMetadata}get frontmatter(){return this._frontmatter}rawFrontmatterIdenticalTo(t){let e=this.cachedMetadata.frontmatter,r=t.cachedMetadata.frontmatter;return e===r?!0:!e||!r?!1:JSON.stringify(e)===JSON.stringify(r)}get pathWithoutExtension(){return this.withoutExtension(this.path)}withoutExtension(t){return t.replace(/\.md$/,"")}get root(){let t=this.path.replace(/\\/g,"/");t.charAt(0)==="/"&&(t=t.substring(1));let e=t.indexOf("/");return e==-1?"/":t.substring(0,e+1)}get folder(){let t=this.path,e=this.filename,r=t.substring(0,t.lastIndexOf(e));return r===""?"/":r}get filename(){let t=this.path.match(/([^/]+)$/);return t!==null?t[1]:""}get filenameWithoutExtension(){return this.withoutExtension(this.filename)}hasProperty(t){let e=this.findKeyInFrontmatter(t);if(e===void 0)return!1;let r=this.frontmatter[e];return!(r===null||r===void 0)}property(t){let e=this.findKeyInFrontmatter(t);if(e===void 0)return null;let r=this.frontmatter[e];return r===void 0?null:Array.isArray(r)?r.filter(i=>i!==null):r}findKeyInFrontmatter(t){let e=t.toLowerCase();return Object.keys(this.frontmatter).find(r=>r.toLowerCase()===e)}identicalTo(t){return this.path!==t.path?!1:this.rawFrontmatterIdenticalTo(t)}};ld();Nt();Gi();rn();var Ba=class{constructor(t){this.fetch=t;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};Ws();Nt();Gi();ld();var Lt=class{constructor(t,e,r,i,s){this._tasksFile=t,this._lineNumber=e,this._sectionStart=r,this._sectionIndex=i,this._precedingHeader=s}static fromUnknownPosition(t){return new Lt(t,0,0,0,null)}fromRenamedFile(t){return new Lt(t,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get tasksFile(){return this._tasksFile}get path(){return this._tasksFile.path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}get hasKnownPath(){return this.path!==""}allFieldsExceptTasksFileForTesting(){let r=U({},this),{_tasksFile:t}=r;return pa(r,["_tasksFile"])}identicalTo(t){let e=["lineNumber","sectionStart","sectionIndex","precedingHeader"];for(let r of e)if(this[r]!==t[r])return!1;return this._tasksFile.identicalTo(t._tasksFile)}};var ud=class{constructor(t,e,r,i,s,a){this.line2ListItem=new Map;this.tasks=[];this.filePath=t,this.fileContent=e,this.listItems=r,this.logger=i,this.fileCache=s,this.errorReporter=a,this.fileLines=this.fileContent.split(` -`),this.dateFromFileName=new Ba(()=>Ft.fromPath(this.filePath))}parseFileContent(){if(this.listItems===void 0)return this.tasks;let t=new mt(this.filePath,this.fileCache),e=this.fileLines.length,r=null,i=0;for(let s of this.listItems){let a=s.position.start.line;if(a>=e)return this.logger.debug(`${this.filePath} Obsidian gave us a line number ${a} past the end of the file. ${e}.`),this.tasks;if((r===null||r.position.end.line<a)&&(r=$s.getSection(a,this.fileCache.sections),i=0),r===null)continue;let o=this.fileLines[a];if(o===void 0){this.logger.debug(`${this.filePath}: line ${a} - ignoring 'undefined' line.`);continue}let l=new Lt(t,a,r.position.start.line,i,$s.getPrecedingHeader(a,this.fileCache.headings));i=this.parseLine(s,o,l,a,i)}return this.tasks}parseLine(t,e,r,i,s){var o;if(t.task===void 0)return this.createListItem(t,e,i,r),s;let a;try{if(a=pe.fromLine({line:e,taskLocation:r,fallbackDate:this.dateFromFileName.value}),a!==null){let l=(o=this.line2ListItem.get(t.parent))!=null?o:null;l!==null&&(a=new pe(de(U({},a),{parent:l}))),this.line2ListItem.set(i,a),a!==null&&(s++,this.tasks.push(a))}else this.createListItem(t,e,i,r)}catch(l){this.errorReporter(l,this.filePath,t,e)}return s}createListItem(t,e,r,i){var o;let s=(o=this.line2ListItem.get(t.parent))!=null?o:null,a=nr.fromListItemLine(e,s,i);if(a===null){this.logger.warn("Unexpected failure to create a list item from line: "+e+" in file: "+this.filePath);return}this.line2ListItem.set(r,a)}};var $s=class{constructor({metadataCache:t,vault:e,workspace:r,events:i}){this.logger=sn.getLogger("tasks.Cache");this.notifySubscribersDebounced=(0,XS.debounce)(()=>this.notifySubscribersNotDebounced(),100,!0);this.logger.debug("Creating Cache object"),this.metadataCache=t,this.metadataCacheEventReferences=[],this.vault=e,this.workspace=r,this.vaultEventReferences=[],this.events=i,this.eventsEventReferences=[],this.tasksMutex=new Yu,this.state="Cold",this.logger.debug("Cache.constructor(): state = Cold"),this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.workspace.onLayoutReady(()=>{this.subscribeToVault(),this.loadVault()}),this.subscribeToEvents()}unload(){this.logger.info("Unloading Cache");for(let t of this.metadataCacheEventReferences)this.metadataCache.offref(t);for(let t of this.vaultEventReferences)this.vault.offref(t);for(let t of this.eventsEventReferences)this.events.off(t)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.logger.debug("Cache.notifySubscribers()"),this.notifySubscribersDebounced()}notifySubscribersNotDebounced(){this.logger.debug("Cache.notifySubscribersNotDebounced()"),this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){this.logger.debug("Cache.subscribeToCache()");let t=this.metadataCache.on("resolved",()=>F(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(t);let e=this.metadataCache.on("changed",r=>{this.tasksMutex.runExclusive(()=>{this.indexFile(r)})});this.metadataCacheEventReferences.push(e)}subscribeToVault(){this.logger.debug("Cache.subscribeToVault()");let{useFilenameAsScheduledDate:t}=le(),e=this.vault.on("create",s=>{s instanceof Va.TFile&&(this.logger.debug(`Cache.subscribeToVault.createdEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.indexFile(s)}))});this.vaultEventReferences.push(e);let r=this.vault.on("delete",s=>{s instanceof Va.TFile&&(this.logger.debug(`Cache.subscribeToVault.deletedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()}))});this.vaultEventReferences.push(r);let i=this.vault.on("rename",(s,a)=>{s instanceof Va.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{let o=this.metadataCache.getFileCache(s),l=new mt(s.path,o!=null?o:void 0),u=new Ba(()=>Ft.fromPath(s.path));this.tasks=this.tasks.map(c=>{if(c.path!==a)return c;let d=c.taskLocation.fromRenamedFile(l);return t?Ft.updateTaskPath(c,d,u.value):new pe(de(U({},c),{taskLocation:d}))}),this.notifySubscribers()}))});this.vaultEventReferences.push(i)}subscribeToEvents(){this.logger.debug("Cache.subscribeToEvents()");let t=this.events.onRequestCacheUpdate(e=>{e({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(t)}loadVault(){return this.logger.debug("Cache.loadVault()"),this.tasksMutex.runExclusive(()=>F(this,null,function*(){this.state="Initializing",this.logger.debug("Cache.loadVault(): state = Initializing"),yield Promise.all(this.vault.getMarkdownFiles().map(t=>this.indexFile(t))),this.state="Warm",this.logger.debug("Cache.loadVault(): state = Warm"),this.notifySubscribers()}))}indexFile(t){return F(this,null,function*(){let e=this.metadataCache.getFileCache(t);if(e==null)return;if(!t.path.endsWith(".md")){this.logger.debug("indexFile: skipping non-markdown file: "+t.path);return}this.logger.debug("Cache.indexFile: "+t.path);let r=this.tasks.filter(a=>a.path===t.path),i=e.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(t);s=this.getTasksFromFileContent(a,i,e,t.path,this.reportTaskParsingErrorToUser,this.logger)}nr.listsAreIdentical(r,s)||(this.tasks=this.tasks.filter(a=>a.path!==t.path),this.tasks.push(...s),this.logger.debug("Cache.indexFile: "+t.path+`: read ${s.length} task(s)`),this.notifySubscribers())})}getTasksFromFileContent(t,e,r,i,s,a){return new ud(i,t,e,a,r,s).parseFileContent()}reportTaskParsingErrorToUser(t,e,r,i){let s=`There was an error reading one of the tasks in this vault. +`}addEdgeIfNotToInternal(t,e,r,i,s){let a=t.findIndex(u=>u.symbol===e.symbol),o=a!==-1,l=e.type!=="EMPTY";if(o&&l){let u;s?u='-. "\u{1F501}" .-> ':u=" --> ";let c=`${i+1}${u}${a+1}`;r.push(c)}}getMermaidNodeLabel(t,e){let r=WS(t.name),i=t.type;if(e){let s=id(t.symbol),a=id(t.nextStatusSymbol),o=`[${s}] -> [${a}]`,l=`'${r}'`,u=`(${i})`;return`["${l}<br>${o}<br>${u}"]:::${i}`}else return`["${r}"]:::${i}`}}});var Vr,qS=ee(()=>{"use strict";Vr=class{constructor(t,e){this.name=t,this.sortOrder=e}get groupText(){return this.name!==""?`%%${this.sortOrder}%% ${this.name}`:""}}});var HS,It,sd=ee(()=>{"use strict";HS=require("obsidian");qS();ii();It=class{constructor(t){this._date=null;this._date=t}get moment(){return this._date}formatAsDate(t=""){return this.format(fe.dateFormat,t)}formatAsDateAndTime(t=""){return this.format(fe.dateTimeFormat,t)}format(t,e=""){return this._date?this._date.format(t):e}toISOString(t){return this._date?this._date.toISOString(t):""}get category(){let t=window.moment(),e=this.moment;return e?e.isBefore(t,"day")?new Vr("Overdue",1):e.isSame(t,"day")?new Vr("Today",2):e.isValid()?new Vr("Future",3):new Vr("Invalid date",0):new Vr("Undated",4)}get fromNow(){let t=this.moment;if(!t)return new Vr("",0);let e=this.fromNowOrder(t);return new Vr(t.fromNow(),e)}fromNowOrder(t){if(!t.isValid())return 0;let e=window.moment(),r=t.isSameOrBefore(e,"day"),i=this.fromNowStartDateOfGroup(t,r,e);return Number((r?1:3)+i.format("YYYYMMDD"))}fromNowStartDateOfGroup(t,e,r){let i=t.fromNow(!0).split(" "),s,a=Number(i[0]);isNaN(a)?s=1:s=a;let o=i[1];return e?r.subtract(s,o):r.add(s,o)}postpone(t="days",e=1){if(!this._date)throw new HS.Notice("Cannot postpone a null date");let r=window.moment().startOf("day");return this._date.isSameOrAfter(r,"day")?this._date.clone().add(e,t):r.add(e,t)}}});var VS=x((GS,BS)=>{(function(n){var t=Object.hasOwnProperty,e=Array.isArray?Array.isArray:function(y){return Object.prototype.toString.call(y)==="[object Array]"},r=10,i=typeof process=="object"&&typeof process.nextTick=="function",s=typeof Symbol=="function",a=typeof Reflect=="object",o=typeof setImmediate=="function",l=o?setImmediate:setTimeout,u=s?a&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(m){var y=Object.getOwnPropertyNames(m);return y.push.apply(y,Object.getOwnPropertySymbols(m)),y}:Object.keys;function c(){this._events={},this._conf&&d.call(this,this._conf)}function d(m){m&&(this._conf=m,m.delimiter&&(this.delimiter=m.delimiter),m.maxListeners!==n&&(this._maxListeners=m.maxListeners),m.wildcard&&(this.wildcard=m.wildcard),m.newListener&&(this._newListener=m.newListener),m.removeListener&&(this._removeListener=m.removeListener),m.verboseMemoryLeak&&(this.verboseMemoryLeak=m.verboseMemoryLeak),m.ignoreErrors&&(this.ignoreErrors=m.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function f(m,y){var v="(node) warning: possible EventEmitter memory leak detected. "+m+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(v+=" Event name: "+y+"."),typeof process!="undefined"&&process.emitWarning){var w=new Error(v);w.name="MaxListenersExceededWarning",w.emitter=this,w.count=m,process.emitWarning(w)}else console.error(v),console.trace&&console.trace()}var p=function(m,y,v){var w=arguments.length;switch(w){case 0:return[];case 1:return[m];case 2:return[m,y];case 3:return[m,y,v];default:for(var S=new Array(w);w--;)S[w]=arguments[w];return S}};function b(m,y){for(var v={},w,S=m.length,M=y?y.length:0,I=0;I<S;I++)w=m[I],v[w]=I<M?y[I]:n;return v}function T(m,y,v){this._emitter=m,this._target=y,this._listeners={},this._listenersCount=0;var w,S;if((v.on||v.off)&&(w=v.on,S=v.off),y.addEventListener?(w=y.addEventListener,S=y.removeEventListener):y.addListener?(w=y.addListener,S=y.removeListener):y.on&&(w=y.on,S=y.off),!w&&!S)throw Error("target does not implement any known event API");if(typeof w!="function")throw TypeError("on method must be a function");if(typeof S!="function")throw TypeError("off method must be a function");this._on=w,this._off=S;var M=m._observers;M?M.push(this):m._observers=[this]}Object.assign(T.prototype,{subscribe:function(m,y,v){var w=this,S=this._target,M=this._emitter,I=this._listeners,j=function(){var D=p.apply(null,arguments),P={data:D,name:y,original:m};if(v){var W=v.call(S,P);W!==!1&&M.emit.apply(M,[P.name].concat(D));return}M.emit.apply(M,[y].concat(D))};if(I[m])throw Error("Event '"+m+"' is already listening");this._listenersCount++,M._newListener&&M._removeListener&&!w._onNewListener?(this._onNewListener=function(D){D===y&&I[m]===null&&(I[m]=j,w._on.call(S,m,j))},M.on("newListener",this._onNewListener),this._onRemoveListener=function(D){D===y&&!M.hasListeners(D)&&I[m]&&(I[m]=null,w._off.call(S,m,j))},I[m]=null,M.on("removeListener",this._onRemoveListener)):(I[m]=j,w._on.call(S,m,j))},unsubscribe:function(m){var y=this,v=this._listeners,w=this._emitter,S,M,I=this._off,j=this._target,D;if(m&&typeof m!="string")throw TypeError("event must be a string");function P(){y._onNewListener&&(w.off("newListener",y._onNewListener),w.off("removeListener",y._onRemoveListener),y._onNewListener=null,y._onRemoveListener=null);var W=se.call(w,y);w._observers.splice(W,1)}if(m){if(S=v[m],!S)return;I.call(j,m,S),delete v[m],--this._listenersCount||P()}else{for(M=u(v),D=M.length;D-- >0;)m=M[D],I.call(j,m,v[m]);this._listeners={},this._listenersCount=0,P()}}});function _(m,y,v,w){var S=Object.assign({},y);if(!m)return S;if(typeof m!="object")throw TypeError("options must be an object");var M=Object.keys(m),I=M.length,j,D,P;function W(be){throw Error('Invalid "'+j+'" option value'+(be?". Reason: "+be:""))}for(var ce=0;ce<I;ce++){if(j=M[ce],!w&&!t.call(y,j))throw Error('Unknown "'+j+'" option');D=m[j],D!==n&&(P=v[j],S[j]=P?P(D,W):D)}return S}function O(m,y){return(typeof m!="function"||!m.hasOwnProperty("prototype"))&&y("value must be a constructor"),m}function E(m){var y="value must be type of "+m.join("|"),v=m.length,w=m[0],S=m[1];return v===1?function(M,I){if(typeof M===w)return M;I(y)}:v===2?function(M,I){var j=typeof M;if(j===w||j===S)return M;I(y)}:function(M,I){for(var j=typeof M,D=v;D-- >0;)if(j===m[D])return M;I(y)}}var A=E(["function"]),Y=E(["object","function"]);function q(m,y,v){var w,S,M=0,I,j=new m(function(D,P,W){v=_(v,{timeout:0,overload:!1},{timeout:function(He,Le){return He*=1,(typeof He!="number"||He<0||!Number.isFinite(He))&&Le("timeout must be a positive number"),He}}),w=!v.overload&&typeof m.prototype.cancel=="function"&&typeof W=="function";function ce(){S&&(S=null),M&&(clearTimeout(M),M=0)}var be=function(He){ce(),D(He)},Oe=function(He){ce(),P(He)};w?y(be,Oe,W):(S=[function(He){Oe(He||Error("canceled"))}],y(be,Oe,function(He){if(I)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof He!="function")throw TypeError("onCancel callback must be a function");S.push(He)}),I=!0),v.timeout>0&&(M=setTimeout(function(){var He=Error("timeout");He.code="ETIMEDOUT",M=0,j.cancel(He),P(He)},v.timeout))});return w||(j.cancel=function(D){if(!!S){for(var P=S.length,W=1;W<P;W++)S[W](D);S[0](D),S=null}}),j}function se(m){var y=this._observers;if(!y)return-1;for(var v=y.length,w=0;w<v;w++)if(y[w]._target===m)return w;return-1}function H(m,y,v,w,S){if(!v)return null;if(w===0){var M=typeof y;if(M==="string"){var I,j,D=0,P=0,W=this.delimiter,ce=W.length;if((j=y.indexOf(W))!==-1){I=new Array(5);do I[D++]=y.slice(P,j),P=j+ce;while((j=y.indexOf(W,P))!==-1);I[D++]=y.slice(P),y=I,S=D}else y=[y],S=1}else M==="object"?S=y.length:(y=[y],S=1)}var be=null,Oe,He,Le,Yt,pr,vn=y[w],te=y[w+1],jt,it;if(w===S)v._listeners&&(typeof v._listeners=="function"?(m&&m.push(v._listeners),be=[v]):(m&&m.push.apply(m,v._listeners),be=[v]));else if(vn==="*"){for(jt=u(v),j=jt.length;j-- >0;)Oe=jt[j],Oe!=="_listeners"&&(it=H(m,y,v[Oe],w+1,S),it&&(be?be.push.apply(be,it):be=it));return be}else if(vn==="**"){for(pr=w+1===S||w+2===S&&te==="*",pr&&v._listeners&&(be=H(m,y,v,S,S)),jt=u(v),j=jt.length;j-- >0;)Oe=jt[j],Oe!=="_listeners"&&(Oe==="*"||Oe==="**"?(v[Oe]._listeners&&!pr&&(it=H(m,y,v[Oe],S,S),it&&(be?be.push.apply(be,it):be=it)),it=H(m,y,v[Oe],w,S)):Oe===te?it=H(m,y,v[Oe],w+2,S):it=H(m,y,v[Oe],w,S),it&&(be?be.push.apply(be,it):be=it));return be}else v[vn]&&(be=H(m,y,v[vn],w+1,S));if(He=v["*"],He&&H(m,y,He,w+1,S),Le=v["**"],Le)if(w<S)for(Le._listeners&&H(m,y,Le,S,S),jt=u(Le),j=jt.length;j-- >0;)Oe=jt[j],Oe!=="_listeners"&&(Oe===te?H(m,y,Le[Oe],w+2,S):Oe===vn?H(m,y,Le[Oe],w+1,S):(Yt={},Yt[Oe]=Le[Oe],H(m,y,{"**":Yt},w+1,S)));else Le._listeners?H(m,y,Le,S,S):Le["*"]&&Le["*"]._listeners&&H(m,y,Le["*"],S,S);return be}function Z(m,y,v){var w=0,S=0,M,I=this.delimiter,j=I.length,D;if(typeof m=="string")if((M=m.indexOf(I))!==-1){D=new Array(5);do D[w++]=m.slice(S,M),S=M+j;while((M=m.indexOf(I,S))!==-1);D[w++]=m.slice(S)}else D=[m],w=1;else D=m,w=m.length;if(w>1){for(M=0;M+1<w;M++)if(D[M]==="**"&&D[M+1]==="**")return}var P=this.listenerTree,W;for(M=0;M<w;M++)if(W=D[M],P=P[W]||(P[W]={}),M===w-1)return P._listeners?(typeof P._listeners=="function"&&(P._listeners=[P._listeners]),v?P._listeners.unshift(y):P._listeners.push(y),!P._listeners.warned&&this._maxListeners>0&&P._listeners.length>this._maxListeners&&(P._listeners.warned=!0,f.call(this,P._listeners.length,W))):P._listeners=y,!0;return!0}function ye(m,y,v,w){for(var S=u(m),M=S.length,I,j,D,P=m._listeners,W;M-- >0;)j=S[M],I=m[j],j==="_listeners"?D=v:D=v?v.concat(j):[j],W=w||typeof j=="symbol",P&&y.push(W?D:D.join(this.delimiter)),typeof I=="object"&&ye.call(this,I,y,D,W);return y}function we(m){for(var y=u(m),v=y.length,w,S,M;v-- >0;)S=y[v],w=m[S],w&&(M=!0,S!=="_listeners"&&!we(w)&&delete m[S]);return M}function V(m,y,v){this.emitter=m,this.event=y,this.listener=v}V.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function K(m,y,v){if(v===!0)S=!0;else if(v===!1)w=!0;else{if(!v||typeof v!="object")throw TypeError("options should be an object or true");var w=v.async,S=v.promisify,M=v.nextTick,I=v.objectify}if(w||M||S){var j=y,D=y._origin||y;if(M&&!i)throw Error("process.nextTick is not supported");S===n&&(S=y.constructor.name==="AsyncFunction"),y=function(){var P=arguments,W=this,ce=this.event;return S?M?Promise.resolve():new Promise(function(be){l(be)}).then(function(){return W.event=ce,j.apply(W,P)}):(M?process.nextTick:l)(function(){W.event=ce,j.apply(W,P)})},y._async=!0,y._origin=D}return[y,I?new V(this,m,y):this]}function C(m){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,d.call(this,m)}C.EventEmitter2=C,C.prototype.listenTo=function(m,y,v){if(typeof m!="object")throw TypeError("target musts be an object");var w=this;v=_(v,{on:n,off:n,reducers:n},{on:A,off:A,reducers:Y});function S(M){if(typeof M!="object")throw TypeError("events must be an object");var I=v.reducers,j=se.call(w,m),D;j===-1?D=new T(w,m,v):D=w._observers[j];for(var P=u(M),W=P.length,ce,be=typeof I=="function",Oe=0;Oe<W;Oe++)ce=P[Oe],D.subscribe(ce,M[ce]||ce,be?I:I&&I[ce])}return e(y)?S(b(y)):S(typeof y=="string"?b(y.split(/\s+/)):y),this},C.prototype.stopListeningTo=function(m,y){var v=this._observers;if(!v)return!1;var w=v.length,S,M=!1;if(m&&typeof m!="object")throw TypeError("target should be an object");for(;w-- >0;)S=v[w],(!m||S._target===m)&&(S.unsubscribe(y),M=!0);return M},C.prototype.delimiter=".",C.prototype.setMaxListeners=function(m){m!==n&&(this._maxListeners=m,this._conf||(this._conf={}),this._conf.maxListeners=m)},C.prototype.getMaxListeners=function(){return this._maxListeners},C.prototype.event="",C.prototype.once=function(m,y,v){return this._once(m,y,!1,v)},C.prototype.prependOnceListener=function(m,y,v){return this._once(m,y,!0,v)},C.prototype._once=function(m,y,v,w){return this._many(m,1,y,v,w)},C.prototype.many=function(m,y,v,w){return this._many(m,y,v,!1,w)},C.prototype.prependMany=function(m,y,v,w){return this._many(m,y,v,!0,w)},C.prototype._many=function(m,y,v,w,S){var M=this;if(typeof v!="function")throw new Error("many only accepts instances of Function");function I(){return--y===0&&M.off(m,I),v.apply(this,arguments)}return I._origin=v,this._on(m,I,w,S)},C.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var m=arguments[0],y,v=this.wildcard,w,S,M,I,j;if(m==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(v&&(y=m,m!=="newListener"&&m!=="removeListener"&&typeof m=="object")){if(S=m.length,s){for(M=0;M<S;M++)if(typeof m[M]=="symbol"){j=!0;break}}j||(m=m.join(this.delimiter))}var D=arguments.length,P;if(this._all&&this._all.length)for(P=this._all.slice(),M=0,S=P.length;M<S;M++)switch(this.event=m,D){case 1:P[M].call(this,m);break;case 2:P[M].call(this,m,arguments[1]);break;case 3:P[M].call(this,m,arguments[1],arguments[2]);break;default:P[M].apply(this,arguments)}if(v)P=[],H.call(this,P,y,this.listenerTree,0,S);else if(P=this._events[m],typeof P=="function"){switch(this.event=m,D){case 1:P.call(this);break;case 2:P.call(this,arguments[1]);break;case 3:P.call(this,arguments[1],arguments[2]);break;default:for(w=new Array(D-1),I=1;I<D;I++)w[I-1]=arguments[I];P.apply(this,w)}return!0}else P&&(P=P.slice());if(P&&P.length){if(D>3)for(w=new Array(D-1),I=1;I<D;I++)w[I-1]=arguments[I];for(M=0,S=P.length;M<S;M++)switch(this.event=m,D){case 1:P[M].call(this);break;case 2:P[M].call(this,arguments[1]);break;case 3:P[M].call(this,arguments[1],arguments[2]);break;default:P[M].apply(this,w)}return!0}else if(!this.ignoreErrors&&!this._all&&m==="error")throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},C.prototype.emitAsync=function(){if(!this._events&&!this._all)return!1;this._events||c.call(this);var m=arguments[0],y=this.wildcard,v,w,S,M,I,j;if(m==="newListener"&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);if(y&&(v=m,m!=="newListener"&&m!=="removeListener"&&typeof m=="object")){if(M=m.length,s){for(I=0;I<M;I++)if(typeof m[I]=="symbol"){w=!0;break}}w||(m=m.join(this.delimiter))}var D=[],P=arguments.length,W;if(this._all)for(I=0,M=this._all.length;I<M;I++)switch(this.event=m,P){case 1:D.push(this._all[I].call(this,m));break;case 2:D.push(this._all[I].call(this,m,arguments[1]));break;case 3:D.push(this._all[I].call(this,m,arguments[1],arguments[2]));break;default:D.push(this._all[I].apply(this,arguments))}if(y?(W=[],H.call(this,W,v,this.listenerTree,0)):W=this._events[m],typeof W=="function")switch(this.event=m,P){case 1:D.push(W.call(this));break;case 2:D.push(W.call(this,arguments[1]));break;case 3:D.push(W.call(this,arguments[1],arguments[2]));break;default:for(S=new Array(P-1),j=1;j<P;j++)S[j-1]=arguments[j];D.push(W.apply(this,S))}else if(W&&W.length){if(W=W.slice(),P>3)for(S=new Array(P-1),j=1;j<P;j++)S[j-1]=arguments[j];for(I=0,M=W.length;I<M;I++)switch(this.event=m,P){case 1:D.push(W[I].call(this));break;case 2:D.push(W[I].call(this,arguments[1]));break;case 3:D.push(W[I].call(this,arguments[1],arguments[2]));break;default:D.push(W[I].apply(this,S))}}else if(!this.ignoreErrors&&!this._all&&m==="error")return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(D)},C.prototype.on=function(m,y,v){return this._on(m,y,!1,v)},C.prototype.prependListener=function(m,y,v){return this._on(m,y,!0,v)},C.prototype.onAny=function(m){return this._onAny(m,!1)},C.prototype.prependAny=function(m){return this._onAny(m,!0)},C.prototype.addListener=C.prototype.on,C.prototype._onAny=function(m,y){if(typeof m!="function")throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),y?this._all.unshift(m):this._all.push(m),this},C.prototype._on=function(m,y,v,w){if(typeof m=="function")return this._onAny(m,y),this;if(typeof y!="function")throw new Error("on only accepts instances of Function");this._events||c.call(this);var S=this,M;return w!==n&&(M=K.call(this,m,y,w),y=M[0],S=M[1]),this._newListener&&this.emit("newListener",m,y),this.wildcard?(Z.call(this,m,y,v),S):(this._events[m]?(typeof this._events[m]=="function"&&(this._events[m]=[this._events[m]]),v?this._events[m].unshift(y):this._events[m].push(y),!this._events[m].warned&&this._maxListeners>0&&this._events[m].length>this._maxListeners&&(this._events[m].warned=!0,f.call(this,this._events[m].length,m))):this._events[m]=y,S)},C.prototype.off=function(m,y){if(typeof y!="function")throw new Error("removeListener only takes instances of Function");var v,w=[];if(this.wildcard){var S=typeof m=="string"?m.split(this.delimiter):m.slice();if(w=H.call(this,null,S,this.listenerTree,0),!w)return this}else{if(!this._events[m])return this;v=this._events[m],w.push({_listeners:v})}for(var M=0;M<w.length;M++){var I=w[M];if(v=I._listeners,e(v)){for(var j=-1,D=0,P=v.length;D<P;D++)if(v[D]===y||v[D].listener&&v[D].listener===y||v[D]._origin&&v[D]._origin===y){j=D;break}if(j<0)continue;return this.wildcard?I._listeners.splice(j,1):this._events[m].splice(j,1),v.length===0&&(this.wildcard?delete I._listeners:delete this._events[m]),this._removeListener&&this.emit("removeListener",m,y),this}else(v===y||v.listener&&v.listener===y||v._origin&&v._origin===y)&&(this.wildcard?delete I._listeners:delete this._events[m],this._removeListener&&this.emit("removeListener",m,y))}return this.listenerTree&&we(this.listenerTree),this},C.prototype.offAny=function(m){var y=0,v=0,w;if(m&&this._all&&this._all.length>0){for(w=this._all,y=0,v=w.length;y<v;y++)if(m===w[y])return w.splice(y,1),this._removeListener&&this.emit("removeListenerAny",m),this}else{if(w=this._all,this._removeListener)for(y=0,v=w.length;y<v;y++)this.emit("removeListenerAny",w[y]);this._all=[]}return this},C.prototype.removeListener=C.prototype.off,C.prototype.removeAllListeners=function(m){if(m===n)return!this._events||c.call(this),this;if(this.wildcard){var y=H.call(this,null,m,this.listenerTree,0),v,w;if(!y)return this;for(w=0;w<y.length;w++)v=y[w],v._listeners=null;this.listenerTree&&we(this.listenerTree)}else this._events&&(this._events[m]=null);return this},C.prototype.listeners=function(m){var y=this._events,v,w,S,M,I;if(m===n){if(this.wildcard)throw Error("event name required for wildcard emitter");if(!y)return[];for(v=u(y),M=v.length,S=[];M-- >0;)w=y[v[M]],typeof w=="function"?S.push(w):S.push.apply(S,w);return S}else{if(this.wildcard){if(I=this.listenerTree,!I)return[];var j=[],D=typeof m=="string"?m.split(this.delimiter):m.slice();return H.call(this,j,D,I,0),j}return y?(w=y[m],w?typeof w=="function"?[w]:w:[]):[]}},C.prototype.eventNames=function(m){var y=this._events;return this.wildcard?ye.call(this,this.listenerTree,[],null,m):y?u(y):[]},C.prototype.listenerCount=function(m){return this.listeners(m).length},C.prototype.hasListeners=function(m){if(this.wildcard){var y=[],v=typeof m=="string"?m.split(this.delimiter):m.slice();return H.call(this,y,v,this.listenerTree,0),y.length>0}var w=this._events,S=this._all;return!!(S&&S.length||w&&(m===n?u(w).length:w[m]))},C.prototype.listenersAny=function(){return this._all?this._all:[]},C.prototype.waitFor=function(m,y){var v=this,w=typeof y;return w==="number"?y={timeout:y}:w==="function"&&(y={filter:y}),y=_(y,{timeout:0,filter:n,handleError:!1,Promise,overload:!1},{filter:A,Promise:O}),q(y.Promise,function(S,M,I){function j(){var D=y.filter;if(!(D&&!D.apply(v,arguments)))if(v.off(m,j),y.handleError){var P=arguments[0];P?M(P):S(p.apply(null,arguments).slice(1))}else S(p.apply(null,arguments))}I(function(){v.off(m,j)}),v._on(m,j,!1)},{timeout:y.timeout,overload:y.overload})};function J(m,y,v){v=_(v,{Promise,timeout:0,overload:!1},{Promise:O});var w=v.Promise;return q(w,function(S,M,I){var j;if(typeof m.addEventListener=="function"){j=function(){S(p.apply(null,arguments))},I(function(){m.removeEventListener(y,j)}),m.addEventListener(y,j,{once:!0});return}var D=function(){P&&m.removeListener("error",P),S(p.apply(null,arguments))},P;y!=="error"&&(P=function(W){m.removeListener(y,D),M(W)},m.once("error",P)),I(function(){P&&m.removeListener("error",P),m.removeListener(y,D)}),m.once(y,D)},{timeout:v.timeout,overload:v.overload})}var $=C.prototype;if(Object.defineProperties(C,{defaultMaxListeners:{get:function(){return $._maxListeners},set:function(m){if(typeof m!="number"||m<0||Number.isNaN(m))throw TypeError("n must be a non-negative number");$._maxListeners=m},enumerable:!0},once:{value:J,writable:!0,configurable:!0}}),Object.defineProperties($,{_maxListeners:{value:r,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof define=="function"&&define.amd)define(function(){return C});else if(typeof GS=="object")BS.exports=C;else{var le=new Function("","return this")();le.EventEmitter2=C}})()});function cy(n,t){let e=sn.getLogger("tasks");switch(n){case"trace":e.trace(t);break;case"debug":e.debug(t);break;case"info":e.info(t);break;case"warn":e.warn(t);break;case"error":e.error(t);break;default:break}}var w2,zS,ly,sn,uy,Ws=ee(()=>{"use strict";w2=require("obsidian"),zS=qo(VS()),ly=class extends zS.EventEmitter2{constructor(){super(...arguments);this.options={minLevels:{"":"info",tasks:"info"}};this.consoleLoggerRegistered=!1;this.arrAvg=e=>e.reduce((r,i)=>r+i,0)/e.length}configure(e){return this.options=Object.assign({},this.options,e),this}getLogger(e){let r="none",i="";for(let s in this.options.minLevels)e.startsWith(s)&&s.length>=i.length&&(r=this.options.minLevels[s],i=s);return new uy(this,e,r)}onLogEntry(e){return this.on("log",e),this}registerConsoleLogger(){return this.consoleLoggerRegistered?this:(this.onLogEntry(e=>{let r=`[${window.moment().format("YYYY-MM-DD-HH:mm:ss.SSS")}][${e.level}][${e.module}]`;switch(e.traceId&&(r+=`[${e.traceId}]`),r+=` ${e.message}`,e.objects===void 0&&(e.objects=""),e.level){case"trace":console.trace(r,e.objects);break;case"debug":console.debug(r,e.objects);break;case"info":console.info(r,e.objects);break;case"warn":console.warn(r,e.objects);break;case"error":console.error(r,e.objects);break;default:console.log(`{${e.level}} ${r}`,e.objects)}}),this.consoleLoggerRegistered=!0,this)}},sn=new ly,uy=class{constructor(t,e,r){this.levels={trace:1,debug:2,info:3,warn:4,error:5};this.logManager=t,this.module=e,this.minLevel=this.levelToInt(r)}levelToInt(t){return t.toLowerCase()in this.levels?this.levels[t.toLowerCase()]:99}log(t,e,r){if(this.levelToInt(t)<this.minLevel)return;let s={level:t,module:this.module,message:e,objects:r,traceId:void 0};this.logManager.emit("log",s)}trace(t,e){this.log("trace",t,e)}debug(t,e){this.log("debug",t,e)}info(t,e){this.log("info",t,e)}warn(t,e){this.log("warn",t,e)}error(t,e){this.log("error",t,e)}logWithId(t,e,r,i){if(this.levelToInt(t)<this.minLevel)return;let a={level:t,module:this.module,message:r,objects:i,traceId:e};this.logManager.emit("log",a)}traceWithId(t,e,r){this.logWithId("trace",t,e,r)}debugWithId(t,e,r){this.logWithId("debug",t,e,r)}infoWithId(t,e,r){this.logWithId("info",t,e,r)}warnWithId(t,e,r){this.logWithId("warn",t,e,r)}errorWithId(t,e,r){this.logWithId("error",t,e,r)}}});function ad(n,t,e){n.debug(`${t}: task line number: ${e.taskLocation.lineNumber}. file path: "${e.path}"`),n.debug(`${t} original: ${e.originalMarkdown}`)}function od(n,t,e){e.map((r,i)=>{n.debug(`${t} ==> ${i+1} : ${r.toFileLineString()}`)})}var dy=ee(()=>{"use strict"});var Ft,Gi=ee(()=>{"use strict";Bt();Nt();Ft=class{static fromPath(t){let{useFilenameAsScheduledDate:e,filenameAsDateFolders:r}=oe();return!e||!this.matchesAnyFolder(r,t)?null:this.extractDateFromPath(t)}static matchesAnyFolder(t,e){return t.length===0?!0:t.some(r=>e.startsWith(r+"/"))}static extractDateFromPath(t){let e=Math.max(0,t.lastIndexOf("/")+1),r=t.lastIndexOf("."),i=t.substring(e,r),{filenameAsScheduledDateFormat:s}=oe();if(s!==""){let o=window.moment(i,s,!0);if(o.isValid())return o}let a=/(\d{4})-(\d{2})-(\d{2})/.exec(i);if(a||(a=/(\d{4})(\d{2})(\d{2})/.exec(i)),a){let o=window.moment([parseInt(a[1]),parseInt(a[2])-1,parseInt(a[3])]);if(o.isValid())return o}return null}static canApplyFallback({startDate:t,scheduledDate:e,dueDate:r}){return t===null&&r===null&&e===null}static updateTaskPath(t,e,r){let i=t.scheduledDate,s=t.scheduledDateIsInferred;return r===null?s&&(s=!1,i=null):s?i=r:this.canApplyFallback(t)&&(i=r,s=!0),new pe(de(U({},t),{taskLocation:e,scheduledDate:i,scheduledDateIsInferred:s}))}static removeInferredStatusIfNeeded(t,e){let r=t.scheduledDateIsInferred?t.scheduledDate:null;return e.map(i=>(r!==null&&!r.isSame(i.scheduledDate,"day")&&(i=new pe(de(U({},i),{scheduledDateIsInferred:!1}))),i))}}});var xr,ki,KS=ee(()=>{"use strict";xr=class{static calculate(t){var r,i,s;let e=0;if((r=t.dueDate)!=null&&r.isValid()){let a=window.moment().startOf("day"),o=Math.round(a.diff(t.dueDate)/xr.milliSecondsPerDay),l;o>=7?l=1:o>=-14?l=(o+14)*.8/21+.2:l=.2,e+=l*xr.dueCoefficient}switch((i=t.scheduledDate)!=null&&i.isValid()&&window.moment().isSameOrAfter(t.scheduledDate)&&(e+=1*xr.scheduledCoefficient),(s=t.startDate)!=null&&s.isValid()&&window.moment().isBefore(t.startDate)&&(e+=1*xr.startedCoefficient),t.priority){case"0":e+=1.5*xr.priorityCoefficient;break;case"1":e+=1*xr.priorityCoefficient;break;case"2":e+=.65*xr.priorityCoefficient;break;case"3":e+=.325*xr.priorityCoefficient;break;case"5":e-=.3*xr.priorityCoefficient;break}return e}},ki=xr;ki.dueCoefficient=12,ki.scheduledCoefficient=5,ki.startedCoefficient=-3,ki.priorityCoefficient=6,ki.milliSecondsPerDay=1e3*60*60*24});var QS={};wb(QS,{Task:()=>pe,isBlocked:()=>k2});function k2(n,t){if(n.dependsOn.length===0||n.isDone)return!1;for(let e of n.dependsOn)if(!!t.find(i=>i.id===e&&!i.isDone))return!0;return!1}var pe,Nt=ee(()=>{"use strict";Bt();Mn();wi();Cs();sd();Cn();su();Ws();dy();Gi();ld();KS();ii();Kc();pe=class extends nr{constructor({status:e,description:r,taskLocation:i,indentation:s,listMarker:a,priority:o,createdDate:l,startDate:u,scheduledDate:c,dueDate:d,doneDate:f,cancelledDate:p,recurrence:b,onCompletion:T,dependsOn:_,id:O,blockLink:E,tags:A,originalMarkdown:Y,scheduledDateIsInferred:q,parent:se=null}){super({originalMarkdown:Y,indentation:s,listMarker:a,statusCharacter:e.symbol,description:r,taskLocation:i,parent:se});this._urgency=null;this.status=e,this.tags=A,this.priority=o,this.createdDate=l,this.startDate=u,this.scheduledDate=c,this.dueDate=d,this.doneDate=f,this.cancelledDate=p,this.recurrence=b,this.onCompletion=T,this.dependsOn=_,this.id=O,this.blockLink=E,this.scheduledDateIsInferred=q}static fromLine({line:e,taskLocation:r,fallbackDate:i}){let s=pe.extractTaskComponents(e);return s===null||!Fe.getInstance().includedIn(s.body)?null:pe.parseTaskSignifiers(e,r,i)}static parseTaskSignifiers(e,r,i){let s=pe.extractTaskComponents(e);if(s===null)return null;let{taskSerializer:a}=au(),o=a.deserialize(s.body),l=!1;return Ft.canApplyFallback(o)&&i!==null&&(o.scheduledDate=i,l=!0),o.tags=o.tags.map(u=>u.trim()),o.tags=o.tags.filter(u=>!Fe.getInstance().equals(u)),new pe(de(U(U({},s),o),{taskLocation:r,originalMarkdown:e,scheduledDateIsInferred:l}))}static extractTaskComponents(e){let r=e.match(fe.taskRegex);if(r===null)return null;let i=r[1],s=r[2],a=r[3],o=Be.getInstance().bySymbolOrCreate(a),l=r[4].trim(),u=l.match(fe.blockLinkRegex),c=u!==null?u[0]:"";return c!==""&&(l=l.replace(fe.blockLinkRegex,"").trim()),{indentation:i,listMarker:s,status:o,body:l,blockLink:c}}toString(){return au().taskSerializer.serialize(this)}toFileLineString(){return`${this.indentation}${this.listMarker} [${this.status.symbol}] ${this.toString()}`}toggle(){let e=sn.getLogger("tasks.Task"),r="toggle()";ad(e,r,this);let i=Be.getInstance().getNextStatusOrCreate(this.status),s=this.handleNewStatus(i);return od(e,r,s),s}handleNewStatus(e,r=window.moment()){if(e.identicalTo(this.status))return[this];let{setDoneDate:i}=oe(),s=this.newDate(e,"DONE",this.doneDate,i,r),{setCancelledDate:a}=oe(),o=this.newDate(e,"CANCELLED",this.cancelledDate,a,r),l=new pe(de(U({},this),{status:e,doneDate:s,cancelledDate:o})),u=!e.isCompleted(),c=this.status.isCompleted(),d=this.recurrence===null;if(u||c||d)return[l];let{removeScheduledDateOnRecurrence:p}=oe(),b=this.recurrence.next(r,p);return b===null?[l]:[this.createNextOccurrence(e,b),l]}newDate(e,r,i,s,a){let o=null;return e.type===r&&(this.status.type!==r?s&&(o=a):o=i),o}createNextOccurrence(e,r){let{setCreatedDate:i}=oe(),s=null;i&&(s=window.moment());let a=null,o=null,u=Be.getInstance().getNextRecurrenceStatusOrCreate(e);return new pe(de(U(U({},this),r),{status:u,blockLink:"",id:"",dependsOn:[],createdDate:s,cancelledDate:a,doneDate:o}))}toggleWithRecurrenceInUsersOrder(){let e=this.toggle();return this.putRecurrenceInUsersOrder(e)}handleNewStatusWithRecurrenceInUsersOrder(e,r=window.moment()){sn.getLogger("tasks.Task").debug(`changed task ${this.taskLocation.path} ${this.taskLocation.lineNumber} ${this.originalMarkdown} status to '${e.symbol}'`);let s=this.handleNewStatus(e,r);return this.putRecurrenceInUsersOrder(s)}putRecurrenceInUsersOrder(e){let r=DS(this,e),{recurrenceOnNextLine:i}=oe();return i?r.reverse():r}get isTask(){return!0}get isDone(){return this.status.type==="DONE"||this.status.type==="CANCELLED"||this.status.type==="NON_TASK"}isBlocked(e){if(this.dependsOn.length===0||this.isDone)return!1;for(let r of this.dependsOn)if(!!e.find(s=>s.id===r&&!s.isDone))return!0;return!1}isBlocking(e){return this.id===""||this.isDone?!1:e.some(r=>r.isDone?!1:r.dependsOn.includes(this.id))}get priorityNumber(){return Number.parseInt(this.priority)}get priorityNameGroupText(){let e=Rn.priorityNameUsingNormal(this.priority);return`%%${this.priority}%%${e} priority`}get descriptionWithoutTags(){return this.description.replace(fe.hashTags,"").trim()}get priorityName(){return Rn.priorityNameUsingNormal(this.priority)}get urgency(){return this._urgency===null&&(this._urgency=ki.calculate(this)),this._urgency}get cancelled(){return new It(this.cancelledDate)}get created(){return new It(this.createdDate)}get done(){return new It(this.doneDate)}get due(){return new It(this.dueDate)}get scheduled(){return new It(this.scheduledDate)}get start(){return new It(this.startDate)}get happensDates(){return Array.of(this.startDate,this.scheduledDate,this.dueDate)}get happens(){let e=this.happensDates,r=Array.from(e).sort(Qn);for(let i of r)if(i!=null&&i.isValid())return new It(i);return new It(null)}get isRecurring(){return this.recurrence!==null}get recurrenceRule(){return this.recurrence?this.recurrence.toText():""}get heading(){return this.precedingHeader}get hasHeading(){return this.precedingHeader!==null}getLinkText({isFilenameUnique:e}){let r;return e?r=this.filename:r="/"+this.path,r===null?null:(this.precedingHeader!==null&&this.precedingHeader!==r&&(r=r+" > "+this.precedingHeader),r)}identicalTo(e){var i,s;if(!super.identicalTo(e))return!1;let r=["priority","blockLink","scheduledDateIsInferred","id","dependsOn","onCompletion"];for(let a of r)if(((i=this[a])==null?void 0:i.toString())!==((s=e[a])==null?void 0:s.toString()))return!1;if(!this.status.identicalTo(e.status)||this.tags.length!==e.tags.length||!this.tags.every(function(a,o){return a===e.tags[o]}))return!1;r=pe.allDateFields();for(let a of r){let o=this[a],l=e[a];if(Qn(o,l)!==0)return!1}return this.recurrenceIdenticalTo(e)?this.file.rawFrontmatterIdenticalTo(e.file):!1}recurrenceIdenticalTo(e){let r=this.recurrence,i=e.recurrence;return!(r===null&&i!==null||r!==null&&i===null||r&&i&&!r.identicalTo(i))}static allDateFields(){return["createdDate","startDate","scheduledDate","dueDate","doneDate","cancelledDate"]}static extractHashtags(e){var r,i;return(i=(r=e.match(fe.hashTags))==null?void 0:r.map(s=>s.trim()))!=null?i:[]}}});var nr,ld=ee(()=>{"use strict";ii();nr=class{constructor({originalMarkdown:t,indentation:e,listMarker:r,statusCharacter:i,description:s,parent:a,taskLocation:o}){this.children=[];this.indentation=e,this.listMarker=r,this.statusCharacter=i,this.description=s,this.originalMarkdown=t,this.parent=a,a!==null&&a.children.push(this),this.taskLocation=o}static fromListItemLine(t,e,r){var a;let i=RegExp(fe.nonTaskRegex).exec(t);if(!i)return null;let s=i[2];return s===void 0?null:new nr({originalMarkdown:t,indentation:i[1],listMarker:s,statusCharacter:(a=i[4])!=null?a:null,description:i[5].trim(),taskLocation:r,parent:e})}get root(){return this.parent===null?this:this.parent.root}get isRoot(){return this.parent===null}findClosestParentTask(){let t=this.parent;for(;t!==null;){let{Task:e}=(Nt(),Sb(QS));if(t instanceof e)return t;t=t.parent}return null}get isTask(){return!1}identicalTo(t){var r,i;if(this.constructor.name!==t.constructor.name)return!1;let e=["description","statusCharacter","indentation","listMarker"];for(let s of e)if(((r=this[s])==null?void 0:r.toString())!==((i=t[s])==null?void 0:i.toString()))return!1;return this.taskLocation.identicalTo(t.taskLocation)?nr.listsAreIdentical(this.children,t.children):!1}static listsAreIdentical(t,e){return t.length!==e.length?!1:t.every((r,i)=>r.identicalTo(e[i]))}get path(){return this.taskLocation.path}get file(){return this.taskLocation.tasksFile}get filename(){let t=this.path.match(/([^/]+)\.md$/);return t!==null?t[1]:null}get lineNumber(){return this.taskLocation.lineNumber}get sectionStart(){return this.taskLocation.sectionStart}get sectionIndex(){return this.taskLocation.sectionIndex}get precedingHeader(){return this.taskLocation.precedingHeader}checkOrUncheck(){if(this.statusCharacter===null)return this;let t=this.statusCharacter===" "?"x":" ",e=this.originalMarkdown.replace(RegExp(fe.checkboxRegex),`[${t}]`);return new nr(de(U({},this),{originalMarkdown:e,statusCharacter:t,parent:null}))}toFileLineString(){let t=this.statusCharacter?`[${this.statusCharacter}] `:"";return`${this.indentation}${this.listMarker} ${t}${this.description}`}}});var cE=x($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});var lE=Symbol("MustacheDataPath");function oE({target:n,propertyName:t}){return[...n[lE]||[],t]}function uE(n,t){return typeof n!="object"?n:new Proxy(n,{get(e,r){let i=e[r];if(i===void 0&&!(r in e)){let s=oE({target:e,propertyName:r});if(t!=null&&t.handleError)return t.handleError(s),i;throw Error(`Missing Mustache data property: ${s.join(" > ")}`)}return i&&typeof i=="object"?(i[lE]=oE({target:e,propertyName:r}),uE(i,t)):i}})}$y.default=uE});var Zr=x(Ar=>{"use strict";Ar.__esModule=!0;Ar.Tokens=Ar.StructuralCharacters=Ar.Operators=void 0;var eY;(function(n){n.AND="AND",n.OR="OR",n.XOR="XOR",n.NOT="NOT"})(eY=Ar.Operators||(Ar.Operators={}));var tY;(function(n){n.OPEN_PARENTHESIS="(",n.CLOSE_PARENTHESIS=")"})(tY=Ar.StructuralCharacters||(Ar.StructuralCharacters={}));var nY;(function(n){n.IDENTIFIER="IDENTIFIER",n.OPERATOR="OPERATOR",n.STRUCTURAL_CHARACTER="STRUCTURAL_CHARACTER",n.EOF="EOF",n.COMMENT="COMMENT"})(nY=Ar.Tokens||(Ar.Tokens={}))});var Vy=x(fo=>{"use strict";fo.__esModule=!0;fo.VALID_TOKENS=fo.OPERATOR_PRECEDENCE=void 0;var rt=Zr();fo.OPERATOR_PRECEDENCE={NOT:0,XOR:1,AND:2,OR:3};fo.VALID_TOKENS={identifierOnly:[{name:rt.Tokens.IDENTIFIER},{name:rt.Tokens.STRUCTURAL_CHARACTER,value:rt.StructuralCharacters.OPEN_PARENTHESIS}],identifierOrNot:[{name:rt.Tokens.IDENTIFIER},{name:rt.Tokens.STRUCTURAL_CHARACTER,value:rt.StructuralCharacters.OPEN_PARENTHESIS},{name:rt.Tokens.OPERATOR,value:rt.Operators.NOT}],binaryOperator:[{name:rt.Tokens.OPERATOR,value:rt.Operators.AND},{name:rt.Tokens.OPERATOR,value:rt.Operators.OR},{name:rt.Tokens.OPERATOR,value:rt.Operators.XOR}],binaryOperatorOrClose:[{name:rt.Tokens.OPERATOR,value:rt.Operators.AND},{name:rt.Tokens.OPERATOR,value:rt.Operators.OR},{name:rt.Tokens.OPERATOR,value:rt.Operators.XOR},{name:rt.Tokens.STRUCTURAL_CHARACTER,value:rt.StructuralCharacters.CLOSE_PARENTHESIS}]}});var zy=x(Kt=>{"use strict";Kt.__esModule=!0;Kt.ESCAPE_CHARACTER=Kt.EOL=Kt.COMMENT_DELIMITER=Kt.QUOTED_IDENTIFIER_DELIMITER=Kt.SEPARATORS=Kt.OPERATORS=Kt.STRUCTURAL_CHARACTERS=void 0;var po=Zr();Kt.STRUCTURAL_CHARACTERS={"(":po.StructuralCharacters.OPEN_PARENTHESIS,")":po.StructuralCharacters.CLOSE_PARENTHESIS};Kt.OPERATORS={AND:po.Operators.AND,OR:po.Operators.OR,XOR:po.Operators.XOR,NOT:po.Operators.NOT};Kt.SEPARATORS=new Set([32,9,10,13].map(function(n){return String.fromCodePoint(n)}));Kt.QUOTED_IDENTIFIER_DELIMITER=String.fromCodePoint(34);Kt.COMMENT_DELIMITER=String.fromCodePoint(35);Kt.EOL=String.fromCodePoint(10);Kt.ESCAPE_CHARACTER=String.fromCodePoint(92)});var gE=x(cr=>{"use strict";var Ky=cr&&cr.__assign||function(){return Ky=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Ky.apply(this,arguments)};cr.__esModule=!0;cr.getQuotedIdentifier=cr.getComment=cr.createResult=void 0;var hE=Zr(),ta=zy(),rY=function(n,t,e){return{token:Ky({name:n},t!==null?{value:t}:{}),remainingString:e}};cr.createResult=rY;var iY=function(n){for(var t=n.length,e=0;e<n.length;e+=1){var r=n[e];if(r===ta.EOL){t=e;break}}return(0,cr.createResult)(hE.Tokens.COMMENT,n.slice(0,t),n.slice(t+1))};cr.getComment=iY;var sY=function(n){for(var t=!1,e="",r=null,i=0;i<n.length;i+=1){var s=n[i];if(r===null)s===ta.QUOTED_IDENTIFIER_DELIMITER?t?(e=e.slice(0,-1)+ta.QUOTED_IDENTIFIER_DELIMITER,t=!1):r=i:(s===ta.ESCAPE_CHARACTER?t=!0:t=!1,e=e+=s);else{if(!ta.SEPARATORS.has(s)&&!ta.STRUCTURAL_CHARACTERS[s])throw new Error("Unexpected character: ".concat(s," Expected ) character or separator"));break}}if(r===null)throw new Error("Unexpected end of expression: expected ".concat(ta.QUOTED_IDENTIFIER_DELIMITER," character"));return(0,cr.createResult)(hE.Tokens.IDENTIFIER,e,n.slice(r+1))};cr.getQuotedIdentifier=sY});var yE=x(Ud=>{"use strict";Ud.__esModule=!0;Ud.lex=void 0;var mo=Zr(),In=zy(),ho=gE(),aY=function(n){for(var t=null,e=null,r=null,i=0;i<n.length;i+=1){var s=n[i];if(t===null){if(!In.SEPARATORS.has(s)){var a=In.STRUCTURAL_CHARACTERS[s];if(a){var o=n[i+1];if(a===mo.StructuralCharacters.CLOSE_PARENTHESIS&&o&&!In.SEPARATORS.has(o)&&o!==mo.StructuralCharacters.CLOSE_PARENTHESIS)throw new Error("Unexpected character: ".concat(o,". A closing parenthesis should be followed by another closing parenthesis or whitespace"));return(0,ho.createResult)(mo.Tokens.STRUCTURAL_CHARACTER,In.STRUCTURAL_CHARACTERS[s],n.slice(i+1))}if(s===In.QUOTED_IDENTIFIER_DELIMITER)return(0,ho.getQuotedIdentifier)(n.slice(i+1));if(s===In.COMMENT_DELIMITER)return(0,ho.getComment)(n.slice(i+1));t=i}}else if(In.SEPARATORS.has(s)||In.STRUCTURAL_CHARACTERS[s]){e=i,r=s;break}else if(s===In.QUOTED_IDENTIFIER_DELIMITER||s===In.COMMENT_DELIMITER)throw new Error("Unexpected character: ".concat(s))}if(t!==null){e=e!=null?e:n.length;var l=n.slice(t,e),u=n.slice(e);if(In.OPERATORS[l]){if(r&&!In.SEPARATORS.has(r))throw new Error("Unexpected character: ".concat(r,". Operators should be separated using whitespace"));return(0,ho.createResult)(mo.Tokens.OPERATOR,In.OPERATORS[l],u)}else return(0,ho.createResult)(mo.Tokens.IDENTIFIER,l,u)}return(0,ho.createResult)(mo.Tokens.EOF,null,"")};Ud.lex=aY});var TE=x(Fn=>{"use strict";var bE=Fn&&Fn.__spreadArray||function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return n.concat(s||Array.prototype.slice.call(t))};Fn.__esModule=!0;Fn.validateToken=Fn.previousOperatorTakesPrecedent=Fn.getValue=Fn.newTokenGenerator=void 0;var oY=yE(),go=Zr(),Yd=Vy(),lY=function(n){var t=n;return function(e,r){for(r===void 0&&(r=!1);;){var i=(0,oY.lex)(t),s=i.token,a=i.remainingString;if(t=a,s.name!==go.Tokens.COMMENT)return(0,Fn.validateToken)(s,e,r),s}}};Fn.newTokenGenerator=lY;var uY=function(n,t){var e=n(Yd.VALID_TOKENS.identifierOrNot),r=e.value===go.Operators.NOT;r&&(e=n(Yd.VALID_TOKENS.identifierOnly));var i=e.name===go.Tokens.STRUCTURAL_CHARACTER?t(n,!0):[e];return r?bE(bE([],i,!0),[{name:go.Tokens.OPERATOR,value:go.Operators.NOT}],!1):i};Fn.getValue=uY;var cY=function(n,t){return Yd.OPERATOR_PRECEDENCE[n]<=Yd.OPERATOR_PRECEDENCE[t]};Fn.previousOperatorTakesPrecedent=cY;var dY=function(n,t,e){if(e===void 0&&(e=!1),n.name===go.Tokens.EOF){if(e)return;throw new Error("Unexpected end of expression")}for(var r=0,i=t;r<i.length;r++){var s=i[r];if(s.name===n.name&&(!s.value||s.value===n.value))return}throw new TypeError("Invalid token")};Fn.validateToken=dY});var Xy=x(yo=>{"use strict";var Jr=yo&&yo.__spreadArray||function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return n.concat(s||Array.prototype.slice.call(t))};yo.__esModule=!0;yo.parse=void 0;var _E=Zr(),vE=Vy(),jd=TE(),fY=function(n){if(typeof n!="string")throw new Error("Expected string but received ".concat(typeof n));var t=(0,jd.newTokenGenerator)(n);return Qy(t)};yo.parse=fY;var Qy=function(n,t){t===void 0&&(t=!1);for(var e=Jr([],(0,jd.getValue)(n,Qy),!0),r=[];;){var i=t?vE.VALID_TOKENS.binaryOperatorOrClose:vE.VALID_TOKENS.binaryOperator,s=n(i,!t);if(s.name===_E.Tokens.EOF||s.name===_E.Tokens.STRUCTURAL_CHARACTER)return Jr(Jr([],e,!0),Jr([],r,!0).reverse(),!0);for(;r.length;){var a=r[r.length-1]||null;if(a&&(0,jd.previousOperatorTakesPrecedent)(a.value,s.value))e=Jr(Jr([],e,!0),[a],!1),r=r.slice(0,-1);else break}r=Jr(Jr([],r,!0),[s],!1),e=Jr(Jr([],e,!0),(0,jd.getValue)(n,Qy),!0)}}});var Zy=x(Qt=>{"use strict";Qt.__esModule=!0;Qt.throwInvalidExpression=Qt.isOperator=Qt.isIdentifier=Qt.notUtil=Qt.xorUtil=Qt.orUtil=Qt.andUtil=void 0;var wE=Zr(),pY=function(n,t){return n&&t};Qt.andUtil=pY;var mY=function(n,t){return n||t};Qt.orUtil=mY;var hY=function(n,t){return n!==t};Qt.xorUtil=hY;var gY=function(n){return!n};Qt.notUtil=gY;var yY=function(n){var t=n.name,e=n.value;return t===wE.Tokens.IDENTIFIER&&typeof e=="string"};Qt.isIdentifier=yY;var bY=function(n){var t=n.name,e=n.value;return t===wE.Tokens.OPERATOR&&typeof e=="string"};Qt.isOperator=bY;var TY=function(n){throw new TypeError("Invalid postfix expression: ".concat(n))};Qt.throwInvalidExpression=TY});var kE=x(Wd=>{"use strict";var ku;Wd.__esModule=!0;Wd.OPERATOR_MAP=void 0;var Jy=Zr(),eb=Zy();Wd.OPERATOR_MAP=(ku={},ku[Jy.Operators.AND]=eb.andUtil,ku[Jy.Operators.OR]=eb.orUtil,ku[Jy.Operators.XOR]=eb.xorUtil,ku)});var DE=x(dr=>{"use strict";var bo=dr&&dr.__spreadArray||function(n,t,e){if(e||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return n.concat(s||Array.prototype.slice.call(t))};dr.__esModule=!0;dr.evaluateExpression=dr.evaluate=dr.getEvaluator=void 0;var _Y=Xy(),SE=Zr(),vY=kE(),na=Zy(),wY=function(n){var t=(0,_Y.parse)(n);return function(e){return(0,dr.evaluate)(t,e)}};dr.getEvaluator=wY;var kY=function(n,t){if(!Array.isArray(n))throw new Error("".concat(n," should be an array. evaluate takes in a parsed expression. Use in combination with parse or use getEvaluator"));var e=n.reduce(function(r,i,s){if(!(i&&((0,na.isIdentifier)(i)||(0,na.isOperator)(i))))throw new Error("Invalid token: ".concat(i,". Found in parsed expression at index ").concat(s));if(i.name===SE.Tokens.IDENTIFIER)return bo(bo([],r,!0),[Boolean(t[i.value])],!1);var a=r[r.length-2],o=r[r.length-1];if(i.value===SE.Operators.NOT)return o===void 0&&(0,na.throwInvalidExpression)("missing identifier"),bo(bo([],r.slice(0,-1),!0),[(0,na.notUtil)(o)],!1);(o===void 0||a===void 0)&&(0,na.throwInvalidExpression)("missing identifier");var l=vY.OPERATOR_MAP[i.value];return l||(0,na.throwInvalidExpression)("unknown operator"),bo(bo([],r.slice(0,-2),!0),[l(a,o)],!1)},[]);return e.length!==1&&(0,na.throwInvalidExpression)("too many identifiers after evaluation"),e[0]};dr.evaluate=kY;var SY=function(n,t){return(0,dr.getEvaluator)(n)(t)};dr.evaluateExpression=SY});var xE=x(ei=>{"use strict";var tb=ei&&ei.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e);var i=Object.getOwnPropertyDescriptor(t,e);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(n,r,i)}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]});ei.__esModule=!0;ei.parse=ei.evaluate=ei.getEvaluator=void 0;var EE=DE();tb(ei,EE,"getEvaluator");tb(ei,EE,"evaluate");var DY=Xy();tb(ei,DY,"parse")});var GY={};wb(GY,{default:()=>Of});module.exports=Sb(GY);var Ox=require("obsidian");gs();var XS=require("obsidian"),Va=require("obsidian");var _j=new Error("timeout while waiting for mutex to become available"),vj=new Error("mutex already locked"),eO=new Error("request for lock canceled"),tO=function(n,t,e,r){function i(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function o(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?s(c.value):i(c.value).then(o,l)}u((r=r.apply(n,t||[])).next())})},Wf=class{constructor(t,e=eO){this._value=t,this._cancelError=e,this._weightedQueues=[],this._weightedWaiters=[]}acquire(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise((e,r)=>{this._weightedQueues[t-1]||(this._weightedQueues[t-1]=[]),this._weightedQueues[t-1].push({resolve:e,reject:r}),this._dispatch()})}runExclusive(t,e=1){return tO(this,void 0,void 0,function*(){let[r,i]=yield this.acquire(e);try{return yield t(r)}finally{i()}})}waitForUnlock(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise(e=>{this._weightedWaiters[t-1]||(this._weightedWaiters[t-1]=[]),this._weightedWaiters[t-1].push(e),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(t){this._value=t,this._dispatch()}release(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);this._value+=t,this._dispatch()}cancel(){this._weightedQueues.forEach(t=>t.forEach(e=>e.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var t;for(let e=this._value;e>0;e--){let r=(t=this._weightedQueues[e-1])===null||t===void 0?void 0:t.shift();if(!r)continue;let i=this._value,s=e;this._value-=e,e=this._value+1,r.resolve([i,this._newReleaser(s)])}this._drainUnlockWaiters()}_newReleaser(t){let e=!1;return()=>{e||(e=!0,this.release(t))}}_drainUnlockWaiters(){for(let t=this._value;t>0;t--)!this._weightedWaiters[t-1]||(this._weightedWaiters[t-1].forEach(e=>e()),this._weightedWaiters[t-1]=[])}},nO=function(n,t,e,r){function i(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function o(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?s(c.value):i(c.value).then(o,l)}u((r=r.apply(n,t||[])).next())})},Yu=class{constructor(t){this._semaphore=new Wf(1,t)}acquire(){return nO(this,void 0,void 0,function*(){let[,t]=yield this._semaphore.acquire();return t})}runExclusive(t){return this._semaphore.runExclusive(()=>t())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};var ju=require("obsidian"),mt=class{constructor(t,e={}){this._frontmatter={tags:[]};this._tags=[];var i,s;this._path=t,this._cachedMetadata=e;let r=e.frontmatter;if(r!==void 0&&(this._frontmatter=JSON.parse(JSON.stringify(r)),this._frontmatter.tags=(i=(0,ju.parseFrontMatterTags)(r))!=null?i:[]),Object.keys(e).length!==0){let a=(s=(0,ju.getAllTags)(this.cachedMetadata))!=null?s:[];this._tags=[...new Set(a)]}}get path(){return this._path}get tags(){return this._tags}get cachedMetadata(){return this._cachedMetadata}get frontmatter(){return this._frontmatter}rawFrontmatterIdenticalTo(t){let e=this.cachedMetadata.frontmatter,r=t.cachedMetadata.frontmatter;return e===r?!0:!e||!r?!1:JSON.stringify(e)===JSON.stringify(r)}get pathWithoutExtension(){return this.withoutExtension(this.path)}withoutExtension(t){return t.replace(/\.md$/,"")}get root(){let t=this.path.replace(/\\/g,"/");t.charAt(0)==="/"&&(t=t.substring(1));let e=t.indexOf("/");return e==-1?"/":t.substring(0,e+1)}get folder(){let t=this.path,e=this.filename,r=t.substring(0,t.lastIndexOf(e));return r===""?"/":r}get filename(){let t=this.path.match(/([^/]+)$/);return t!==null?t[1]:""}get filenameWithoutExtension(){return this.withoutExtension(this.filename)}hasProperty(t){let e=this.findKeyInFrontmatter(t);if(e===void 0)return!1;let r=this.frontmatter[e];return!(r===null||r===void 0)}property(t){let e=this.findKeyInFrontmatter(t);if(e===void 0)return null;let r=this.frontmatter[e];return r===void 0?null:Array.isArray(r)?r.filter(i=>i!==null):r}findKeyInFrontmatter(t){let e=t.toLowerCase();return Object.keys(this.frontmatter).find(r=>r.toLowerCase()===e)}identicalTo(t){return this.path!==t.path?!1:this.rawFrontmatterIdenticalTo(t)}};ld();Nt();Gi();Bt();var Ba=class{constructor(t){this.fetch=t;this._value=void 0}get value(){return this._value===void 0&&(this._value=this.fetch()),this._value}};Ws();Nt();Gi();ld();var Lt=class{constructor(t,e,r,i,s){this._tasksFile=t,this._lineNumber=e,this._sectionStart=r,this._sectionIndex=i,this._precedingHeader=s}static fromUnknownPosition(t){return new Lt(t,0,0,0,null)}fromRenamedFile(t){return new Lt(t,this.lineNumber,this.sectionStart,this.sectionIndex,this.precedingHeader)}get tasksFile(){return this._tasksFile}get path(){return this._tasksFile.path}get lineNumber(){return this._lineNumber}get sectionStart(){return this._sectionStart}get sectionIndex(){return this._sectionIndex}get precedingHeader(){return this._precedingHeader}get hasKnownPath(){return this.path!==""}allFieldsExceptTasksFileForTesting(){let r=U({},this),{_tasksFile:t}=r;return pa(r,["_tasksFile"])}identicalTo(t){let e=["lineNumber","sectionStart","sectionIndex","precedingHeader"];for(let r of e)if(this[r]!==t[r])return!1;return this._tasksFile.identicalTo(t._tasksFile)}};var ud=class{constructor(t,e,r,i,s,a){this.line2ListItem=new Map;this.tasks=[];this.filePath=t,this.fileContent=e,this.listItems=r,this.logger=i,this.fileCache=s,this.errorReporter=a,this.fileLines=this.fileContent.split(` +`),this.dateFromFileName=new Ba(()=>Ft.fromPath(this.filePath))}parseFileContent(){if(this.listItems===void 0)return this.tasks;let t=new mt(this.filePath,this.fileCache),e=this.fileLines.length,r=null,i=0;for(let s of this.listItems){let a=s.position.start.line;if(a>=e)return this.logger.debug(`${this.filePath} Obsidian gave us a line number ${a} past the end of the file. ${e}.`),this.tasks;if((r===null||r.position.end.line<a)&&(r=$s.getSection(a,this.fileCache.sections),i=0),r===null)continue;let o=this.fileLines[a];if(o===void 0){this.logger.debug(`${this.filePath}: line ${a} - ignoring 'undefined' line.`);continue}let l=new Lt(t,a,r.position.start.line,i,$s.getPrecedingHeader(a,this.fileCache.headings));i=this.parseLine(s,o,l,a,i)}return this.tasks}parseLine(t,e,r,i,s){var o;if(t.task===void 0)return this.createListItem(t,e,i,r),s;let a;try{if(a=pe.fromLine({line:e,taskLocation:r,fallbackDate:this.dateFromFileName.value}),a!==null){let l=(o=this.line2ListItem.get(t.parent))!=null?o:null;l!==null&&(a=new pe(de(U({},a),{parent:l}))),this.line2ListItem.set(i,a),a!==null&&(s++,this.tasks.push(a))}else this.createListItem(t,e,i,r)}catch(l){this.errorReporter(l,this.filePath,t,e)}return s}createListItem(t,e,r,i){var o;let s=(o=this.line2ListItem.get(t.parent))!=null?o:null,a=nr.fromListItemLine(e,s,i);if(a===null){this.logger.warn("Unexpected failure to create a list item from line: "+e+" in file: "+this.filePath);return}this.line2ListItem.set(r,a)}};var $s=class{constructor({metadataCache:t,vault:e,workspace:r,events:i}){this.logger=sn.getLogger("tasks.Cache");this.notifySubscribersDebounced=(0,XS.debounce)(()=>this.notifySubscribersNotDebounced(),100,!0);this.logger.debug("Creating Cache object"),this.metadataCache=t,this.metadataCacheEventReferences=[],this.vault=e,this.workspace=r,this.vaultEventReferences=[],this.events=i,this.eventsEventReferences=[],this.tasksMutex=new Yu,this.state="Cold",this.logger.debug("Cache.constructor(): state = Cold"),this.tasks=[],this.loadedAfterFirstResolve=!1,this.subscribeToCache(),this.workspace.onLayoutReady(()=>{this.subscribeToVault(),this.loadVault()}),this.subscribeToEvents()}unload(){this.logger.info("Unloading Cache");for(let t of this.metadataCacheEventReferences)this.metadataCache.offref(t);for(let t of this.vaultEventReferences)this.vault.offref(t);for(let t of this.eventsEventReferences)this.events.off(t)}getTasks(){return this.tasks}getState(){return this.state}notifySubscribers(){this.logger.debug("Cache.notifySubscribers()"),this.notifySubscribersDebounced()}notifySubscribersNotDebounced(){this.logger.debug("Cache.notifySubscribersNotDebounced()"),this.events.triggerCacheUpdate({tasks:this.tasks,state:this.state})}subscribeToCache(){this.logger.debug("Cache.subscribeToCache()");let t=this.metadataCache.on("resolved",()=>F(this,null,function*(){this.loadedAfterFirstResolve||(this.loadedAfterFirstResolve=!0,this.loadVault())}));this.metadataCacheEventReferences.push(t);let e=this.metadataCache.on("changed",r=>{this.tasksMutex.runExclusive(()=>{this.indexFile(r)})});this.metadataCacheEventReferences.push(e)}subscribeToVault(){this.logger.debug("Cache.subscribeToVault()");let{useFilenameAsScheduledDate:t}=oe(),e=this.vault.on("create",s=>{s instanceof Va.TFile&&(this.logger.debug(`Cache.subscribeToVault.createdEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.indexFile(s)}))});this.vaultEventReferences.push(e);let r=this.vault.on("delete",s=>{s instanceof Va.TFile&&(this.logger.debug(`Cache.subscribeToVault.deletedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{this.tasks=this.tasks.filter(a=>a.path!==s.path),this.notifySubscribers()}))});this.vaultEventReferences.push(r);let i=this.vault.on("rename",(s,a)=>{s instanceof Va.TFile&&(this.logger.debug(`Cache.subscribeToVault.renamedEventReference() ${s.path}`),this.tasksMutex.runExclusive(()=>{let o=this.metadataCache.getFileCache(s),l=new mt(s.path,o!=null?o:void 0),u=new Ba(()=>Ft.fromPath(s.path));this.tasks=this.tasks.map(c=>{if(c.path!==a)return c;let d=c.taskLocation.fromRenamedFile(l);return t?Ft.updateTaskPath(c,d,u.value):new pe(de(U({},c),{taskLocation:d}))}),this.notifySubscribers()}))});this.vaultEventReferences.push(i)}subscribeToEvents(){this.logger.debug("Cache.subscribeToEvents()");let t=this.events.onRequestCacheUpdate(e=>{e({tasks:this.tasks,state:this.state})});this.eventsEventReferences.push(t)}loadVault(){return this.logger.debug("Cache.loadVault()"),this.tasksMutex.runExclusive(()=>F(this,null,function*(){this.state="Initializing",this.logger.debug("Cache.loadVault(): state = Initializing"),yield Promise.all(this.vault.getMarkdownFiles().map(t=>this.indexFile(t))),this.state="Warm",this.logger.debug("Cache.loadVault(): state = Warm"),this.notifySubscribers()}))}indexFile(t){return F(this,null,function*(){let e=this.metadataCache.getFileCache(t);if(e==null)return;if(!t.path.endsWith(".md")){this.logger.debug("indexFile: skipping non-markdown file: "+t.path);return}this.logger.debug("Cache.indexFile: "+t.path);let r=this.tasks.filter(a=>a.path===t.path),i=e.listItems,s=[];if(i!==void 0){let a=yield this.vault.cachedRead(t);s=this.getTasksFromFileContent(a,i,e,t.path,this.reportTaskParsingErrorToUser,this.logger)}nr.listsAreIdentical(r,s)||(this.tasks=this.tasks.filter(a=>a.path!==t.path),this.tasks.push(...s),this.logger.debug("Cache.indexFile: "+t.path+`: read ${s.length} task(s)`),this.notifySubscribers())})}getTasksFromFileContent(t,e,r,i,s,a){return new ud(i,t,e,a,r,s).parseFileContent()}reportTaskParsingErrorToUser(t,e,r,i){let s=`There was an error reading one of the tasks in this vault. The following task has been ignored, to prevent Tasks queries getting stuck with 'Loading Tasks ...' Error: ${t} File: ${e} @@ -219,7 +219,7 @@ Include: The error popup will only be shown when Tasks is starting up, but if the error persists, it will be shown in the console every time this file is edited during the Obsidian session. -`;this.logger.error(s),t instanceof Error&&this.logger.error(t.stack?t.stack:"Cannot determine stack"),this.state==="Initializing"&&new Va.Notice(s,1e4)}static getSection(t,e){if(e===void 0)return null;for(let r of e)if(r.position.start.line<=t&&r.position.end.line>=t)return r;return null}static getPrecedingHeader(t,e){if(e===void 0)return null;let r=null;for(let i of e){if(i.position.start.line>t)return r;r=i.heading}return r}};var Fy=require("obsidian");var tE=require("obsidian");function tt(){}function hy(n){return n()}function ZS(){return Object.create(null)}function Bt(n){n.forEach(hy)}function fd(n){return typeof n=="function"}function zr(n,t){return n!=n?t==t:n!==t||n&&typeof n=="object"||typeof n=="function"}function JS(n){return Object.keys(n).length===0}var eD=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,lu=class{constructor(t){this.options=t,this._listeners="WeakMap"in eD?new WeakMap:void 0}observe(t,e){return this._listeners.set(t,e),this._getObserver().observe(t,this.options),()=>{this._listeners.delete(t),this._observer.unobserve(t)}}_getObserver(){var t;return(t=this._observer)!==null&&t!==void 0?t:this._observer=new ResizeObserver(e=>{var r;for(let i of e)lu.entries.set(i.target,i),(r=this._listeners.get(i.target))===null||r===void 0||r(i)})}};lu.entries="WeakMap"in eD?new WeakMap:void 0;var tD=!1;function S2(){tD=!0}function D2(){tD=!1}function z(n,t){n.appendChild(t)}function De(n,t,e){n.insertBefore(t,e||null)}function ve(n){n.parentNode&&n.parentNode.removeChild(n)}function Gs(n,t){for(let e=0;e<n.length;e+=1)n[e]&&n[e].d(t)}function ue(n){return document.createElement(n)}function E2(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function Ve(n){return document.createTextNode(n)}function Ee(){return Ve(" ")}function pd(){return Ve("")}function je(n,t,e,r){return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}function nD(n){return function(t){return t.preventDefault(),n.call(this,t)}}function B(n,t,e){e==null?n.removeAttribute(t):n.getAttribute(t)!==e&&n.setAttribute(t,e)}function rD(n){let t;return{p(...e){t=e,t.forEach(r=>n.push(r))},r(){t.forEach(e=>n.splice(n.indexOf(e),1))}}}function x2(n){return Array.from(n.childNodes)}function ir(n,t){t=""+t,n.data!==t&&(n.data=t)}function fn(n,t){n.value=t==null?"":t}function gy(n,t,e){for(let r=0;r<n.options.length;r+=1){let i=n.options[r];if(i.__value===t){i.selected=!0;return}}(!e||t!==void 0)&&(n.selectedIndex=-1)}function iD(n){let t=n.querySelector(":checked");return t&&t.__value}var cd;function O2(){if(cd===void 0){cd=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(n){cd=!0}}return cd}function sD(n,t){getComputedStyle(n).position==="static"&&(n.style.position="relative");let r=ue("iframe");r.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),r.setAttribute("aria-hidden","true"),r.tabIndex=-1;let i=O2(),s;return i?(r.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=je(window,"message",a=>{a.source===r.contentWindow&&t()})):(r.src="about:blank",r.onload=()=>{s=je(r.contentWindow,"resize",t),t()}),z(n,r),()=>{(i||s&&r.contentWindow)&&s(),ve(r)}}function Si(n,t,e){n.classList[e?"add":"remove"](t)}var Xa=class{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,r=null){this.e||(this.is_svg?this.e=E2(e.nodeName):this.e=ue(e.nodeType===11?"TEMPLATE":e.nodeName),this.t=e.tagName!=="TEMPLATE"?e:e.content,this.c(t)),this.i(r)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)De(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(ve)}};var uu;function ou(n){uu=n}function C2(){if(!uu)throw new Error("Function called outside component initialization");return uu}function yy(n){C2().$$.on_mount.push(n)}var Ka=[];var ot=[],Qa=[],py=[],M2=Promise.resolve(),my=!1;function R2(){my||(my=!0,M2.then(aD))}function Hs(n){Qa.push(n)}function an(n){py.push(n)}var fy=new Set,za=0;function aD(){if(za!==0)return;let n=uu;do{try{for(;za<Ka.length;){let t=Ka[za];za++,ou(t),A2(t.$$)}}catch(t){throw Ka.length=0,za=0,t}for(ou(null),Ka.length=0,za=0;ot.length;)ot.pop()();for(let t=0;t<Qa.length;t+=1){let e=Qa[t];fy.has(e)||(fy.add(e),e())}Qa.length=0}while(Ka.length);for(;py.length;)py.pop()();my=!1,fy.clear(),ou(n)}function A2(n){if(n.fragment!==null){n.update(),Bt(n.before_update);let t=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,t),n.after_update.forEach(Hs)}}function P2(n){let t=[],e=[];Qa.forEach(r=>n.indexOf(r)===-1?t.push(r):e.push(r)),e.forEach(r=>r()),Qa=t}var dd=new Set,qs;function oD(){qs={r:0,c:[],p:qs}}function lD(){qs.r||Bt(qs.c),qs=qs.p}function pn(n,t){n&&n.i&&(dd.delete(n),n.i(t))}function An(n,t,e,r){if(n&&n.o){if(dd.has(n))return;dd.add(n),qs.c.push(()=>{dd.delete(n),r&&(e&&n.d(1),r())}),n.o(t)}else r&&r()}var N2=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],NB=new Set([...N2]);function on(n,t,e){let r=n.$$.props[t];r!==void 0&&(n.$$.bound[r]=e,e(n.$$.ctx[r]))}function Or(n){n&&n.c()}function sr(n,t,e,r){let{fragment:i,after_update:s}=n.$$;i&&i.m(t,e),r||Hs(()=>{let a=n.$$.on_mount.map(hy).filter(fd);n.$$.on_destroy?n.$$.on_destroy.push(...a):Bt(a),n.$$.on_mount=[]}),s.forEach(Hs)}function Pn(n,t){let e=n.$$;e.fragment!==null&&(P2(e.after_update),Bt(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function I2(n,t){n.$$.dirty[0]===-1&&(Ka.push(n),R2(),n.$$.dirty.fill(0)),n.$$.dirty[t/31|0]|=1<<t%31}function Kr(n,t,e,r,i,s,a,o=[-1]){let l=uu;ou(n);let u=n.$$={fragment:null,ctx:[],props:s,update:tt,not_equal:i,bound:ZS(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:ZS(),dirty:o,skip_bound:!1,root:t.target||l.$$.root};a&&a(u.root);let c=!1;if(u.ctx=e?e(n,t.props||{},(d,f,...p)=>{let b=p.length?p[0]:f;return u.ctx&&i(u.ctx[d],u.ctx[d]=b)&&(!u.skip_bound&&u.bound[d]&&u.bound[d](b),c&&I2(n,d)),f}):[],u.update(),c=!0,Bt(u.before_update),u.fragment=r?r(u.ctx):!1,t.target){if(t.hydrate){S2();let d=x2(t.target);u.fragment&&u.fragment.l(d),d.forEach(ve)}else u.fragment&&u.fragment.c();t.intro&&pn(n.$$.fragment),sr(n,t.target,t.anchor,t.customElement),D2(),aD()}ou(l)}var F2;typeof HTMLElement=="function"&&(F2=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:n}=this.$$;this.$$.on_disconnect=n.map(hy).filter(fd);for(let t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(n,t,e){this[n]=e}disconnectedCallback(){Bt(this.$$.on_disconnect)}$destroy(){Pn(this,1),this.$destroy=tt}$on(n,t){if(!fd(t))return tt;let e=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return e.push(t),()=>{let r=e.indexOf(t);r!==-1&&e.splice(r,1)}}$set(n){this.$$set&&!JS(n)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}});var rr=class{$destroy(){Pn(this,1),this.$destroy=tt}$on(t,e){if(!fd(e))return tt;let r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(e),()=>{let i=r.indexOf(e);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!JS(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}};function uD(n,t,e,r){function i(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function o(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?s(c.value):i(c.value).then(o,l)}u((r=r.apply(n,t||[])).next())})}rn();Pg();Cs();function Za(n){return n.charAt(0).toUpperCase()+n.slice(1)}function Ut(n,t){if(t===null)return Za(n);let e=n.toLowerCase().indexOf(t.toLowerCase());if(e===-1)return`${Za(n)} (<span class="accesskey">${t.toLowerCase()}</span>)`;let r=n.substring(0,e);return r+='<span class="accesskey">',e===0?r+=n.substring(e,e+1).toUpperCase():r+=n.substring(e,e+1),r+="</span>",r+=n.substring(e+1),r=Za(r),r}function L2(n){let t,e,r,i;return{c(){t=ue("code"),e=Ve(n[4]),r=Ee(),i=new Xa(!1),i.a=null,B(t,"class","tasks-modal-parsed-date")},m(s,a){De(s,t,a),z(t,e),z(t,r),i.m(n[2],t)},p(s,a){a&16&&ir(e,s[4]),a&4&&i.p(s[2])},d(s){s&&ve(t)}}}function U2(n){let t,e,r,i,s;return{c(){t=ue("div"),e=Ve(n[4]),r=ue("input"),B(r,"class","tasks-modal-date-editor-picker"),B(r,"type","date"),B(r,"id","date-editor-picker"),B(r,"tabindex","-1"),B(t,"class","tasks-modal-parsed-date")},m(a,o){De(a,t,o),z(t,e),z(t,r),fn(r,n[6]),i||(s=[je(r,"input",n[10]),je(r,"input",n[7])],i=!0)},p(a,o){o&16&&ir(e,a[4]),o&64&&fn(r,a[6])},d(a){a&&ve(t),i=!1,Bt(s)}}}function Y2(n){let t,e=Ut(n[3],n[5])+"",r,i,s,a,o,l;function u(f,p){return f[1]?U2:L2}let c=u(n,-1),d=c(n);return{c(){t=ue("label"),r=Ee(),i=ue("input"),s=Ee(),d.c(),a=pd(),B(t,"for",n[3]),B(i,"id",n[3]),B(i,"type","text"),B(i,"class","tasks-modal-date-input"),B(i,"placeholder",j2),B(i,"accesskey",n[5]),Si(i,"tasks-modal-error",!n[1])},m(f,p){De(f,t,p),t.innerHTML=e,De(f,r,p),De(f,i,p),fn(i,n[0]),De(f,s,p),d.m(f,p),De(f,a,p),o||(l=je(i,"input",n[9]),o=!0)},p(f,[p]){p&40&&e!==(e=Ut(f[3],f[5])+"")&&(t.innerHTML=e),p&8&&B(t,"for",f[3]),p&8&&B(i,"id",f[3]),p&32&&B(i,"accesskey",f[5]),p&1&&i.value!==f[0]&&fn(i,f[0]),p&2&&Si(i,"tasks-modal-error",!f[1]),c===(c=u(f,p))&&d?d.p(f,p):(d.d(1),d=c(f),d&&(d.c(),d.m(a.parentNode,a)))},i:tt,o:tt,d(f){f&&ve(t),f&&ve(r),f&&ve(i),f&&ve(s),d.d(f),f&&ve(a),o=!1,l()}}}var j2="Try 'Mon' or 'tm' then space";function W2(n,t,e){let{id:r}=t,{dateSymbol:i}=t,{date:s}=t,{isDateValid:a}=t,{forwardOnly:o}=t,{accesskey:l}=t,{parsedDate:u=""}=t,c="";function d(b){b.target!==null&&e(0,s=c)}function f(){s=this.value,e(0,s),e(3,r),e(8,o),e(2,u),e(1,a)}function p(){c=this.value,e(6,c),e(0,s),e(3,r),e(8,o),e(2,u),e(1,a)}return n.$$set=b=>{"id"in b&&e(3,r=b.id),"dateSymbol"in b&&e(4,i=b.dateSymbol),"date"in b&&e(0,s=b.date),"isDateValid"in b&&e(1,a=b.isDateValid),"forwardOnly"in b&&e(8,o=b.forwardOnly),"accesskey"in b&&e(5,l=b.accesskey),"parsedDate"in b&&e(2,u=b.parsedDate)},n.$$.update=()=>{if(n.$$.dirty&271){e:e(0,s=Pc(s)),e(2,u=Sk(r,s,o)),e(1,a=!u.includes("invalid")),a&&e(6,c=u)}},[s,a,u,r,i,l,c,d,o,f,p]}var by=class extends rr{constructor(t){super(),Kr(this,t,W2,Y2,zr,{id:3,dateSymbol:4,date:0,isDateValid:1,forwardOnly:8,accesskey:5,parsedDate:2})}},Bs=by;var Vs=Math.min,mn=Math.max,du=Math.round;var Cr=n=>({x:n,y:n}),$2={left:"right",right:"left",bottom:"top",top:"bottom"},q2={start:"end",end:"start"};function Ty(n,t,e){return mn(n,Vs(t,e))}function Ja(n,t){return typeof n=="function"?n(t):n}function Di(n){return n.split("-")[0]}function eo(n){return n.split("-")[1]}function _y(n){return n==="x"?"y":"x"}function vy(n){return n==="y"?"height":"width"}function Bi(n){return["top","bottom"].includes(Di(n))?"y":"x"}function wy(n){return _y(Bi(n))}function cD(n,t,e){e===void 0&&(e=!1);let r=eo(n),i=wy(n),s=vy(i),a=i==="x"?r===(e?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=cu(a)),[a,cu(a)]}function dD(n){let t=cu(n);return[md(n),t,md(t)]}function md(n){return n.replace(/start|end/g,t=>q2[t])}function H2(n,t,e){let r=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(n){case"top":case"bottom":return e?t?i:r:t?r:i;case"left":case"right":return t?s:a;default:return[]}}function fD(n,t,e,r){let i=eo(n),s=H2(Di(n),e==="start",r);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(md)))),s}function cu(n){return n.replace(/left|right|bottom|top/g,t=>$2[t])}function G2(n){return U({top:0,right:0,bottom:0,left:0},n)}function pD(n){return typeof n!="number"?G2(n):{top:n,right:n,bottom:n,left:n}}function zs(n){let{x:t,y:e,width:r,height:i}=n;return{width:r,height:i,top:e,left:t,right:t+r,bottom:e+i,x:t,y:e}}function mD(n,t,e){let{reference:r,floating:i}=n,s=Bi(t),a=wy(t),o=vy(a),l=Di(t),u=s==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[o]/2-i[o]/2,p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(eo(t)){case"start":p[a]-=f*(e&&u?-1:1);break;case"end":p[a]+=f*(e&&u?-1:1);break}return p}var hD=(n,t,e)=>F(void 0,null,function*(){let{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=e,o=s.filter(Boolean),l=yield a.isRTL==null?void 0:a.isRTL(t),u=yield a.getElementRects({reference:n,floating:t,strategy:i}),{x:c,y:d}=mD(u,r,l),f=r,p={},b=0;for(let T=0;T<o.length;T++){let{name:_,fn:O}=o[T],{x:E,y:A,data:Y,reset:q}=yield O({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:u,platform:a,elements:{reference:n,floating:t}});c=E!=null?E:c,d=A!=null?A:d,p=de(U({},p),{[_]:U(U({},p[_]),Y)}),q&&b<=50&&(b++,typeof q=="object"&&(q.placement&&(f=q.placement),q.rects&&(u=q.rects===!0?yield a.getElementRects({reference:n,floating:t,strategy:i}):q.rects),{x:c,y:d}=mD(u,f,l)),T=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}});function hd(n,t){return F(this,null,function*(){var e;t===void 0&&(t={});let{x:r,y:i,platform:s,rects:a,elements:o,strategy:l}=n,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Ja(t,n),b=pD(p),_=o[f?d==="floating"?"reference":"floating":d],O=zs(yield s.getClippingRect({element:(e=yield s.isElement==null?void 0:s.isElement(_))==null||e?_:_.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:u,rootBoundary:c,strategy:l})),E=d==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,A=yield s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating),Y=(yield s.isElement==null?void 0:s.isElement(A))?(yield s.getScale==null?void 0:s.getScale(A))||{x:1,y:1}:{x:1,y:1},q=zs(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:E,offsetParent:A,strategy:l}):E);return{top:(O.top-q.top+b.top)/Y.y,bottom:(q.bottom-O.bottom+b.bottom)/Y.y,left:(O.left-q.left+b.left)/Y.x,right:(q.right-O.right+b.right)/Y.x}})}var gD=function(n){return n===void 0&&(n={}),{name:"flip",options:n,fn(e){return F(this,null,function*(){var r,i;let{placement:s,middlewareData:a,rects:o,initialPlacement:l,platform:u,elements:c}=e,$=Ja(n,e),{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:_=!0}=$,O=pa($,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let E=Di(s),A=Bi(l),Y=Di(l)===l,q=yield u.isRTL==null?void 0:u.isRTL(c.floating),se=p||(Y||!_?[cu(l)]:dD(l)),H=T!=="none";!p&&H&&se.push(...fD(l,_,T,q));let Z=[l,...se],ye=yield hd(e,O),we=[],V=((i=a.flip)==null?void 0:i.overflows)||[];if(d&&we.push(ye[E]),f){let oe=cD(s,o,q);we.push(ye[oe[0]],ye[oe[1]])}if(V=[...V,{placement:s,overflows:we}],!we.every(oe=>oe<=0)){var K,C;let oe=(((K=a.flip)==null?void 0:K.index)||0)+1,m=Z[oe];if(m)return{data:{index:oe,overflows:V},reset:{placement:m}};let y=(C=V.filter(v=>v.overflows[0]<=0).sort((v,w)=>v.overflows[1]-w.overflows[1])[0])==null?void 0:C.placement;if(!y)switch(b){case"bestFit":{var J;let v=(J=V.filter(w=>{if(H){let S=Bi(w.placement);return S===A||S==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(S=>S>0).reduce((S,M)=>S+M,0)]).sort((w,S)=>w[1]-S[1])[0])==null?void 0:J[0];v&&(y=v);break}case"initialPlacement":y=l;break}if(s!==y)return{reset:{placement:y}}}return{}})}}};function B2(n,t){return F(this,null,function*(){let{placement:e,platform:r,elements:i}=n,s=yield r.isRTL==null?void 0:r.isRTL(i.floating),a=Di(e),o=eo(e),l=Bi(e)==="y",u=["left","top"].includes(a)?-1:1,c=s&&l?-1:1,d=Ja(t,n),{mainAxis:f,crossAxis:p,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof b=="number"&&(p=o==="end"?b*-1:b),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}})}var yD=function(n){return n===void 0&&(n=0),{name:"offset",options:n,fn(e){return F(this,null,function*(){var r,i;let{x:s,y:a,placement:o,middlewareData:l}=e,u=yield B2(e,n);return o===((r=l.offset)==null?void 0:r.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:s+u.x,y:a+u.y,data:de(U({},u),{placement:o})}})}}},bD=function(n){return n===void 0&&(n={}),{name:"shift",options:n,fn(e){return F(this,null,function*(){let{x:r,y:i,placement:s}=e,O=Ja(n,e),{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:E=>{let{x:A,y:Y}=E;return{x:A,y:Y}}}}=O,u=pa(O,["mainAxis","crossAxis","limiter"]),c={x:r,y:i},d=yield hd(e,u),f=Bi(Di(s)),p=_y(f),b=c[p],T=c[f];if(a){let E=p==="y"?"top":"left",A=p==="y"?"bottom":"right",Y=b+d[E],q=b-d[A];b=Ty(Y,b,q)}if(o){let E=f==="y"?"top":"left",A=f==="y"?"bottom":"right",Y=T+d[E],q=T-d[A];T=Ty(Y,T,q)}let _=l.fn(de(U({},e),{[p]:b,[f]:T}));return de(U({},_),{data:{x:_.x-r,y:_.y-i,enabled:{[p]:a,[f]:o}}})})}}};var TD=function(n){return n===void 0&&(n={}),{name:"size",options:n,fn(e){return F(this,null,function*(){var r,i;let{placement:s,rects:a,platform:o,elements:l}=e,V=Ja(n,e),{apply:u=()=>{}}=V,c=pa(V,["apply"]),d=yield hd(e,c),f=Di(s),p=eo(s),b=Bi(s)==="y",{width:T,height:_}=a.floating,O,E;f==="top"||f==="bottom"?(O=f,E=p===((yield o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(E=f,O=p==="end"?"top":"bottom");let A=_-d.top-d.bottom,Y=T-d.left-d.right,q=Vs(_-d[O],A),se=Vs(T-d[E],Y),H=!e.middlewareData.shift,Z=q,ye=se;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(ye=Y),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(Z=A),H&&!p){let K=mn(d.left,0),C=mn(d.right,0),J=mn(d.top,0),$=mn(d.bottom,0);b?ye=T-2*(K!==0||C!==0?K+C:mn(d.left,d.right)):Z=_-2*(J!==0||$!==0?J+$:mn(d.top,d.bottom))}yield u(de(U({},e),{availableWidth:ye,availableHeight:Z}));let we=yield o.getDimensions(l.floating);return T!==we.width||_!==we.height?{reset:{rects:!0}}:{}})}}};function yd(){return typeof window!="undefined"}function Ks(n){return vD(n)?(n.nodeName||"").toLowerCase():"#document"}function hn(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(n){var t;return(t=(vD(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function vD(n){return yd()?n instanceof Node||n instanceof hn(n).Node:!1}function ar(n){return yd()?n instanceof Element||n instanceof hn(n).Element:!1}function Mr(n){return yd()?n instanceof HTMLElement||n instanceof hn(n).HTMLElement:!1}function _D(n){return!yd()||typeof ShadowRoot=="undefined"?!1:n instanceof ShadowRoot||n instanceof hn(n).ShadowRoot}function to(n){let{overflow:t,overflowX:e,overflowY:r,display:i}=or(n);return/auto|scroll|overlay|hidden|clip/.test(t+r+e)&&!["inline","contents"].includes(i)}function wD(n){return["table","td","th"].includes(Ks(n))}function fu(n){return[":popover-open",":modal"].some(t=>{try{return n.matches(t)}catch(e){return!1}})}function bd(n){let t=Td(),e=ar(n)?or(n):n;return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(e.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(e.contain||"").includes(r))}function kD(n){let t=Ei(n);for(;Mr(t)&&!Qs(t);){if(bd(t))return t;if(fu(t))return null;t=Ei(t)}return null}function Td(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Qs(n){return["html","body","#document"].includes(Ks(n))}function or(n){return hn(n).getComputedStyle(n)}function pu(n){return ar(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Ei(n){if(Ks(n)==="html")return n;let t=n.assignedSlot||n.parentNode||_D(n)&&n.host||Qr(n);return _D(t)?t.host:t}function SD(n){let t=Ei(n);return Qs(t)?n.ownerDocument?n.ownerDocument.body:n.body:Mr(t)&&to(t)?t:SD(t)}function gd(n,t,e){var r;t===void 0&&(t=[]),e===void 0&&(e=!0);let i=SD(n),s=i===((r=n.ownerDocument)==null?void 0:r.body),a=hn(i);if(s){let o=_d(a);return t.concat(a,a.visualViewport||[],to(i)?i:[],o&&e?gd(o):[])}return t.concat(i,gd(i,[],e))}function _d(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function xD(n){let t=or(n),e=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Mr(n),s=i?n.offsetWidth:e,a=i?n.offsetHeight:r,o=du(e)!==s||du(r)!==a;return o&&(e=s,r=a),{width:e,height:r,$:o}}function OD(n){return ar(n)?n:n.contextElement}function no(n){let t=OD(n);if(!Mr(t))return Cr(1);let e=t.getBoundingClientRect(),{width:r,height:i,$:s}=xD(t),a=(s?du(e.width):e.width)/r,o=(s?du(e.height):e.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}var V2=Cr(0);function CD(n){let t=hn(n);return!Td()||!t.visualViewport?V2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function z2(n,t,e){return t===void 0&&(t=!1),!e||t&&e!==hn(n)?!1:t}function mu(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=!1);let i=n.getBoundingClientRect(),s=OD(n),a=Cr(1);t&&(r?ar(r)&&(a=no(r)):a=no(n));let o=z2(s,e,r)?CD(s):Cr(0),l=(i.left+o.x)/a.x,u=(i.top+o.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(s){let f=hn(s),p=r&&ar(r)?hn(r):r,b=f,T=_d(b);for(;T&&r&&p!==b;){let _=no(T),O=T.getBoundingClientRect(),E=or(T),A=O.left+(T.clientLeft+parseFloat(E.paddingLeft))*_.x,Y=O.top+(T.clientTop+parseFloat(E.paddingTop))*_.y;l*=_.x,u*=_.y,c*=_.x,d*=_.y,l+=A,u+=Y,b=hn(T),T=_d(b)}}return zs({width:c,height:d,x:l,y:u})}function Sy(n,t){let e=pu(n).scrollLeft;return t?t.left+e:mu(Qr(n)).left+e}function MD(n,t,e){e===void 0&&(e=!1);let r=n.getBoundingClientRect(),i=r.left+t.scrollLeft-(e?0:Sy(n,r)),s=r.top+t.scrollTop;return{x:i,y:s}}function K2(n){let{elements:t,rect:e,offsetParent:r,strategy:i}=n,s=i==="fixed",a=Qr(r),o=t?fu(t.floating):!1;if(r===a||o&&s)return e;let l={scrollLeft:0,scrollTop:0},u=Cr(1),c=Cr(0),d=Mr(r);if((d||!d&&!s)&&((Ks(r)!=="body"||to(a))&&(l=pu(r)),Mr(r))){let p=mu(r);u=no(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let f=a&&!d&&!s?MD(a,l,!0):Cr(0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:e.y*u.y-l.scrollTop*u.y+c.y+f.y}}function Q2(n){return Array.from(n.getClientRects())}function X2(n){let t=Qr(n),e=pu(n),r=n.ownerDocument.body,i=mn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=mn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-e.scrollLeft+Sy(n),o=-e.scrollTop;return or(r).direction==="rtl"&&(a+=mn(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:o}}function Z2(n,t){let e=hn(n),r=Qr(n),i=e.visualViewport,s=r.clientWidth,a=r.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;let u=Td();(!u||u&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}return{width:s,height:a,x:o,y:l}}function J2(n,t){let e=mu(n,!0,t==="fixed"),r=e.top+n.clientTop,i=e.left+n.clientLeft,s=Mr(n)?no(n):Cr(1),a=n.clientWidth*s.x,o=n.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:a,height:o,x:l,y:u}}function DD(n,t,e){let r;if(t==="viewport")r=Z2(n,e);else if(t==="document")r=X2(Qr(n));else if(ar(t))r=J2(t,e);else{let i=CD(n);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return zs(r)}function RD(n,t){let e=Ei(n);return e===t||!ar(e)||Qs(e)?!1:or(e).position==="fixed"||RD(e,t)}function eU(n,t){let e=t.get(n);if(e)return e;let r=gd(n,[],!1).filter(o=>ar(o)&&Ks(o)!=="body"),i=null,s=or(n).position==="fixed",a=s?Ei(n):n;for(;ar(a)&&!Qs(a);){let o=or(a),l=bd(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||to(a)&&!l&&RD(n,a))?r=r.filter(c=>c!==a):i=o,a=Ei(a)}return t.set(n,r),r}function tU(n){let{element:t,boundary:e,rootBoundary:r,strategy:i}=n,a=[...e==="clippingAncestors"?fu(t)?[]:eU(t,this._c):[].concat(e),r],o=a[0],l=a.reduce((u,c)=>{let d=DD(t,c,i);return u.top=mn(d.top,u.top),u.right=Vs(d.right,u.right),u.bottom=Vs(d.bottom,u.bottom),u.left=mn(d.left,u.left),u},DD(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function nU(n){let{width:t,height:e}=xD(n);return{width:t,height:e}}function rU(n,t,e){let r=Mr(t),i=Qr(t),s=e==="fixed",a=mu(n,!0,s,t),o={scrollLeft:0,scrollTop:0},l=Cr(0);if(r||!r&&!s)if((Ks(t)!=="body"||to(i))&&(o=pu(t)),r){let f=mu(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else i&&(l.x=Sy(i));let u=i&&!r&&!s?MD(i,o):Cr(0),c=a.left+o.scrollLeft-l.x-u.x,d=a.top+o.scrollTop-l.y-u.y;return{x:c,y:d,width:a.width,height:a.height}}function ky(n){return or(n).position==="static"}function ED(n,t){if(!Mr(n)||or(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return Qr(n)===e&&(e=e.ownerDocument.body),e}function AD(n,t){let e=hn(n);if(fu(n))return e;if(!Mr(n)){let i=Ei(n);for(;i&&!Qs(i);){if(ar(i)&&!ky(i))return i;i=Ei(i)}return e}let r=ED(n,t);for(;r&&wD(r)&&ky(r);)r=ED(r,t);return r&&Qs(r)&&ky(r)&&!bd(r)?e:r||kD(n)||e}var iU=function(n){return F(this,null,function*(){let t=this.getOffsetParent||AD,e=this.getDimensions,r=yield e(n.floating);return{reference:rU(n.reference,yield t(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function sU(n){return or(n).direction==="rtl"}var aU={convertOffsetParentRelativeRectToViewportRelativeRect:K2,getDocumentElement:Qr,getClippingRect:tU,getOffsetParent:AD,getElementRects:iU,getClientRects:Q2,getDimensions:nU,getScale:no,isElement:ar,isRTL:sU};var Dy=yD;var Ey=bD,PD=gD,ND=TD;var xy=(n,t,e)=>{let r=new Map,i=U({platform:aU},e),s=de(U({},i.platform),{_c:r});return hD(n,t,de(U({},i),{platform:s}))};Zg();function ID(n,t,e){let r=n.slice();return r[5]=t[e],r}function FD(n,t,e){let r=n.slice();r[40]=t[e],r[43]=e;let i=r[17](r[40].taskLocation.path);return r[41]=i,r}function LD(n){let t,e,r,i=n[10],s=[];for(let a=0;a<i.length;a+=1)s[a]=YD(FD(n,i,a));return{c(){t=ue("ul");for(let a=0;a<s.length;a+=1)s[a].c();B(t,"class","task-dependency-dropdown")},m(a,o){De(a,t,o);for(let l=0;l<s.length;l+=1)s[l]&&s[l].m(t,null);n[31](t),e||(r=je(t,"mouseleave",n[32]),e=!0)},p(a,o){if(o[0]&928832){i=a[10];let l;for(l=0;l<i.length;l+=1){let u=FD(a,i,l);s[l]?s[l].p(u,o):(s[l]=YD(u),s[l].c(),s[l].m(t,null))}for(;l<s.length;l+=1)s[l].d(1);s.length=i.length}},d(a){a&&ve(t),Gs(s,a),n[31](null),e=!1,r()}}}function UD(n){let t,e=n[41]+"",r,i,s;function a(...o){return n[28](n[41],...o)}return{c(){t=ue("div"),r=Ve(e),B(t,"class","dependency-path")},m(o,l){De(o,t,l),z(t,r),i||(s=je(t,"mouseenter",a),i=!0)},p(o,l){n=o,l[0]&1024&&e!==(e=n[41]+"")&&ir(r,e)},d(o){o&&ve(t),i=!1,s()}}}function YD(n){let t,e,r,i=n[40].status.symbol+"",s,a,o=Us(n[40])+"",l,u,c,d,f,p;function b(...E){return n[27](n[40],...E)}let T=n[41]&&UD(n);function _(){return n[29](n[40])}function O(){return n[30](n[43])}return{c(){t=ue("li"),e=ue("div"),r=Ve("["),s=Ve(i),a=Ve("] "),l=Ve(o),c=Ee(),T&&T.c(),d=Ee(),B(e,"class",u=n[41]?"dependency-name-shared":"dependency-name"),Si(t,"selected",n[6]!==null&&n[43]===n[11])},m(E,A){De(E,t,A),z(t,e),z(e,r),z(e,s),z(e,a),z(e,l),z(t,c),T&&T.m(t,null),z(t,d),f||(p=[je(e,"mouseenter",b),je(t,"mousedown",_),je(t,"mouseenter",O)],f=!0)},p(E,A){n=E,A[0]&1024&&i!==(i=n[40].status.symbol+"")&&ir(s,i),A[0]&1024&&o!==(o=Us(n[40])+"")&&ir(l,o),A[0]&1024&&u!==(u=n[41]?"dependency-name-shared":"dependency-name")&&B(e,"class",u),n[41]?T?T.p(n,A):(T=UD(n),T.c(),T.m(t,d)):T&&(T.d(1),T=null),A[0]&2112&&Si(t,"selected",n[6]!==null&&n[43]===n[11])},d(E){E&&ve(t),T&&T.d(),f=!1,Bt(p)}}}function jD(n){let t,e=n[0][n[1]],r=[];for(let i=0;i<e.length;i+=1)r[i]=WD(ID(n,e,i));return{c(){t=ue("div");for(let i=0;i<r.length;i+=1)r[i].c();B(t,"class","task-dependencies-container results-dependency")},m(i,s){De(i,t,s);for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(t,null)},p(i,s){if(s[0]&802819){e=i[0][i[1]];let a;for(a=0;a<e.length;a+=1){let o=ID(i,e,a);r[a]?r[a].p(o,s):(r[a]=WD(o),r[a].c(),r[a].m(t,null))}for(;a<r.length;a+=1)r[a].d(1);r.length=e.length}},d(i){i&&ve(t),Gs(r,i)}}}function WD(n){let t,e,r,i=n[5].status.symbol+"",s,a,o=Us(n[5])+"",l,u,c,d,f,p;function b(){return n[33](n[5])}function T(..._){return n[34](n[5],..._)}return{c(){t=ue("div"),e=ue("span"),r=Ve("["),s=Ve(i),a=Ve("] "),l=Ve(o),u=Ee(),c=ue("button"),c.innerHTML='<svg style="display: block; margin: auto;" xmlns="http://www.w3.org/2000/svg" width="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg>',d=Ee(),B(e,"class","task-dependency-name"),B(c,"type","button"),B(c,"class","task-dependency-delete"),B(t,"class","task-dependency")},m(_,O){De(_,t,O),z(t,e),z(e,r),z(e,s),z(e,a),z(e,l),z(t,u),z(t,c),z(t,d),f||(p=[je(c,"click",b),je(t,"mouseenter",T)],f=!0)},p(_,O){n=_,O[0]&3&&i!==(i=n[5].status.symbol+"")&&ir(s,i),O[0]&3&&o!==(o=Us(n[5])+"")&&ir(l,o)},d(_){_&&ve(t),f=!1,Bt(p)}}}function oU(n){let t,e=Ut(n[2],n[3])+"",r,i,s,a,o,l,u,c,d,f=n[10]&&n[10].length!==0&&LD(n),p=n[0][n[1]].length!==0&&jD(n);return{c(){t=ue("label"),r=Ee(),i=ue("span"),s=ue("input"),o=Ee(),f&&f.c(),l=Ee(),p&&p.c(),u=pd(),B(t,"for",n[1]),B(s,"accesskey",n[3]),B(s,"id",n[1]),B(s,"class","tasks-modal-dependency-input"),B(s,"type","text"),B(s,"placeholder",n[4]),Hs(()=>n[26].call(i))},m(b,T){De(b,t,T),t.innerHTML=e,De(b,r,T),De(b,i,T),z(i,s),n[22](s),fn(s,n[6]),a=sD(i,n[26].bind(i)),De(b,o,T),f&&f.m(b,T),De(b,l,T),p&&p.m(b,T),De(b,u,T),c||(d=[je(s,"input",n[23]),je(s,"keydown",n[24]),je(s,"focus",n[16]),je(s,"blur",n[25])],c=!0)},p(b,T){T[0]&12&&e!==(e=Ut(b[2],b[3])+"")&&(t.innerHTML=e),T[0]&2&&B(t,"for",b[1]),T[0]&8&&B(s,"accesskey",b[3]),T[0]&2&&B(s,"id",b[1]),T[0]&16&&B(s,"placeholder",b[4]),T[0]&64&&s.value!==b[6]&&fn(s,b[6]),b[10]&&b[10].length!==0?f?f.p(b,T):(f=LD(b),f.c(),f.m(l.parentNode,l)):f&&(f.d(1),f=null),b[0][b[1]].length!==0?p?p.p(b,T):(p=jD(b),p.c(),p.m(u.parentNode,u)):p&&(p.d(1),p=null)},i:tt,o:tt,d(b){b&&ve(t),b&&ve(r),b&&ve(i),n[22](null),a(),b&&ve(o),f&&f.d(b),b&&ve(l),p&&p.d(b),b&&ve(u),c=!1,Bt(d)}}}function lU(n,t,e){let{task:r}=t,{editableTask:i}=t,{allTasks:s}=t,{_onDescriptionKeyDown:a}=t,{type:o}=t,{labelText:l}=t,{accesskey:u}=t,{placeholder:c="Type to search..."}=t,d="",f=null,p=0,b,T=!1,_=!1,O,E;function A(D){e(0,i[o]=[...i[o],D],i),e(6,d=""),e(7,T=!1)}function Y(D){e(0,i[o]=i[o].filter(P=>P!==D),i)}function q(D){var P;if(f!==null){switch(D.key){case"ArrowUp":D.preventDefault(),!!p&&p>0?e(11,p-=1):e(11,p=f.length-1);break;case"ArrowDown":D.preventDefault(),!!p&&p<f.length-1?e(11,p+=1):e(11,p=0);break;case"Enter":if(D.isComposing)return;p!==null?(D.preventDefault(),A(f[p]),e(11,p=null),e(7,T=!1)):a(D);break;default:e(11,p=0);break}p&&((P=E==null?void 0:E.getElementsByTagName("li")[p])===null||P===void 0||P.scrollIntoView({block:"nearest"}))}}function se(D){return!D&&!_?[]:(_=!1,ed(D,s,r,i.blockedBy,i.blocking))}function H(){e(7,T=!0),_=!0}function Z(D,P){!D||!P||xy(D,P,{middleware:[Dy(6),Ey(),PD(),ND({apply(){P&&Object.assign(P.style,{width:`${b}px`})}})]}).then(({x:W,y:ce})=>{P.style.left=`${W}px`,P.style.top=`${ce}px`})}function ye(D){return D===r.taskLocation.path?"":D}function we(D){return Us(D)}function V(D,P){let W=D.createDiv();W.addClasses(["tooltip","pop-up"]),W.innerText=P,xy(D,W,{placement:"top",middleware:[Dy(-18),Ey()]}).then(({x:ce,y:be})=>{W.style.left=`${ce}px`,W.style.top=`${be}px`}),D.addEventListener("mouseleave",()=>W.remove())}function K(D){ot[D?"unshift":"push"](()=>{O=D,e(8,O)})}function C(){d=this.value,e(6,d)}let J=D=>q(D),$=()=>e(7,T=!1);function oe(){b=this.clientWidth,e(12,b)}let m=(D,P)=>V(P.currentTarget,we(D)),y=(D,P)=>V(P.currentTarget,D),v=D=>A(D),w=D=>e(11,p=D);function S(D){ot[D?"unshift":"push"](()=>{E=D,e(9,E)})}let M=()=>e(11,p=null),I=D=>Y(D),j=(D,P)=>V(P.currentTarget,we(D));return n.$$set=D=>{"task"in D&&e(5,r=D.task),"editableTask"in D&&e(0,i=D.editableTask),"allTasks"in D&&e(20,s=D.allTasks),"_onDescriptionKeyDown"in D&&e(21,a=D._onDescriptionKeyDown),"type"in D&&e(1,o=D.type),"labelText"in D&&e(2,l=D.labelText),"accesskey"in D&&e(3,u=D.accesskey),"placeholder"in D&&e(4,c=D.placeholder)},n.$$.update=()=>{if(n.$$.dirty[0]&768){e:Z(O,E)}if(n.$$.dirty[0]&192){e:e(10,f=T?se(d):null)}},[i,o,l,u,c,r,d,T,O,E,f,p,b,A,Y,q,H,ye,we,V,s,a,K,C,J,$,oe,m,y,v,w,S,M,I,j]}var Oy=class extends rr{constructor(t){super(),Kr(this,t,lU,oU,zr,{task:5,editableTask:0,allTasks:20,_onDescriptionKeyDown:21,type:1,labelText:2,accesskey:3,placeholder:4},null,[-1,-1])}},Cy=Oy;Mn();Cs();su();var gu=require("obsidian");Mn();Ws();dy();var hu,My,Ry,uU=["md"];function kd(){return sn.getLogger("tasks.File")}var $D=({metadataCache:n,vault:t,workspace:e})=>{hu=n,My=t,Ry=e},Nn=e=>F(void 0,[e],function*({originalTask:n,newTasks:t}){if(My===void 0||hu===void 0||Ry===void 0){vd("Tasks: cannot use File before initializing it.");return}Array.isArray(t)||(t=[t]);let r=kd(),i="replaceTaskWithTasks()";ad(r,i,n),od(r,i,t),yield HD({originalTask:n,newTasks:t,vault:My,metadataCache:hu,workspace:Ry,previousTries:0})});function vd(n){console.error(n),new gu.Notice(n,15e3)}function qD(n){console.warn(n),new gu.Notice(n,1e4)}function cU(n){kd().debug(n)}var Vi=class extends Error{},wd=class extends Error{},HD=a=>F(void 0,[a],function*({originalTask:n,newTasks:t,vault:e,metadataCache:r,workspace:i,previousTries:s}){let o=kd();o.debug(`tryRepetitive after ${s} previous tries`);let l=()=>F(void 0,null,function*(){if(s>10){let c=`Tasks: Could not find the correct task line to update. +`;this.logger.error(s),t instanceof Error&&this.logger.error(t.stack?t.stack:"Cannot determine stack"),this.state==="Initializing"&&new Va.Notice(s,1e4)}static getSection(t,e){if(e===void 0)return null;for(let r of e)if(r.position.start.line<=t&&r.position.end.line>=t)return r;return null}static getPrecedingHeader(t,e){if(e===void 0)return null;let r=null;for(let i of e){if(i.position.start.line>t)return r;r=i.heading}return r}};var Fy=require("obsidian");var tE=require("obsidian");function tt(){}function hy(n){return n()}function ZS(){return Object.create(null)}function Vt(n){n.forEach(hy)}function fd(n){return typeof n=="function"}function zr(n,t){return n!=n?t==t:n!==t||n&&typeof n=="object"||typeof n=="function"}function JS(n){return Object.keys(n).length===0}var eD=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global,lu=class{constructor(t){this.options=t,this._listeners="WeakMap"in eD?new WeakMap:void 0}observe(t,e){return this._listeners.set(t,e),this._getObserver().observe(t,this.options),()=>{this._listeners.delete(t),this._observer.unobserve(t)}}_getObserver(){var t;return(t=this._observer)!==null&&t!==void 0?t:this._observer=new ResizeObserver(e=>{var r;for(let i of e)lu.entries.set(i.target,i),(r=this._listeners.get(i.target))===null||r===void 0||r(i)})}};lu.entries="WeakMap"in eD?new WeakMap:void 0;var tD=!1;function S2(){tD=!0}function D2(){tD=!1}function z(n,t){n.appendChild(t)}function De(n,t,e){n.insertBefore(t,e||null)}function ve(n){n.parentNode&&n.parentNode.removeChild(n)}function Gs(n,t){for(let e=0;e<n.length;e+=1)n[e]&&n[e].d(t)}function ue(n){return document.createElement(n)}function E2(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function Ve(n){return document.createTextNode(n)}function Ee(){return Ve(" ")}function pd(){return Ve("")}function je(n,t,e,r){return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}function nD(n){return function(t){return t.preventDefault(),n.call(this,t)}}function B(n,t,e){e==null?n.removeAttribute(t):n.getAttribute(t)!==e&&n.setAttribute(t,e)}function rD(n){let t;return{p(...e){t=e,t.forEach(r=>n.push(r))},r(){t.forEach(e=>n.splice(n.indexOf(e),1))}}}function x2(n){return Array.from(n.childNodes)}function ir(n,t){t=""+t,n.data!==t&&(n.data=t)}function fn(n,t){n.value=t==null?"":t}function gy(n,t,e){for(let r=0;r<n.options.length;r+=1){let i=n.options[r];if(i.__value===t){i.selected=!0;return}}(!e||t!==void 0)&&(n.selectedIndex=-1)}function iD(n){let t=n.querySelector(":checked");return t&&t.__value}var cd;function O2(){if(cd===void 0){cd=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(n){cd=!0}}return cd}function sD(n,t){getComputedStyle(n).position==="static"&&(n.style.position="relative");let r=ue("iframe");r.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),r.setAttribute("aria-hidden","true"),r.tabIndex=-1;let i=O2(),s;return i?(r.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=je(window,"message",a=>{a.source===r.contentWindow&&t()})):(r.src="about:blank",r.onload=()=>{s=je(r.contentWindow,"resize",t),t()}),z(n,r),()=>{(i||s&&r.contentWindow)&&s(),ve(r)}}function Si(n,t,e){n.classList[e?"add":"remove"](t)}var Xa=class{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,e,r=null){this.e||(this.is_svg?this.e=E2(e.nodeName):this.e=ue(e.nodeType===11?"TEMPLATE":e.nodeName),this.t=e.tagName!=="TEMPLATE"?e:e.content,this.c(t)),this.i(r)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(t){for(let e=0;e<this.n.length;e+=1)De(this.t,this.n[e],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(ve)}};var uu;function ou(n){uu=n}function C2(){if(!uu)throw new Error("Function called outside component initialization");return uu}function yy(n){C2().$$.on_mount.push(n)}var Ka=[];var ot=[],Qa=[],py=[],M2=Promise.resolve(),my=!1;function R2(){my||(my=!0,M2.then(aD))}function Hs(n){Qa.push(n)}function an(n){py.push(n)}var fy=new Set,za=0;function aD(){if(za!==0)return;let n=uu;do{try{for(;za<Ka.length;){let t=Ka[za];za++,ou(t),A2(t.$$)}}catch(t){throw Ka.length=0,za=0,t}for(ou(null),Ka.length=0,za=0;ot.length;)ot.pop()();for(let t=0;t<Qa.length;t+=1){let e=Qa[t];fy.has(e)||(fy.add(e),e())}Qa.length=0}while(Ka.length);for(;py.length;)py.pop()();my=!1,fy.clear(),ou(n)}function A2(n){if(n.fragment!==null){n.update(),Vt(n.before_update);let t=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,t),n.after_update.forEach(Hs)}}function P2(n){let t=[],e=[];Qa.forEach(r=>n.indexOf(r)===-1?t.push(r):e.push(r)),e.forEach(r=>r()),Qa=t}var dd=new Set,qs;function oD(){qs={r:0,c:[],p:qs}}function lD(){qs.r||Vt(qs.c),qs=qs.p}function pn(n,t){n&&n.i&&(dd.delete(n),n.i(t))}function An(n,t,e,r){if(n&&n.o){if(dd.has(n))return;dd.add(n),qs.c.push(()=>{dd.delete(n),r&&(e&&n.d(1),r())}),n.o(t)}else r&&r()}var N2=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],NB=new Set([...N2]);function on(n,t,e){let r=n.$$.props[t];r!==void 0&&(n.$$.bound[r]=e,e(n.$$.ctx[r]))}function Or(n){n&&n.c()}function sr(n,t,e,r){let{fragment:i,after_update:s}=n.$$;i&&i.m(t,e),r||Hs(()=>{let a=n.$$.on_mount.map(hy).filter(fd);n.$$.on_destroy?n.$$.on_destroy.push(...a):Vt(a),n.$$.on_mount=[]}),s.forEach(Hs)}function Pn(n,t){let e=n.$$;e.fragment!==null&&(P2(e.after_update),Vt(e.on_destroy),e.fragment&&e.fragment.d(t),e.on_destroy=e.fragment=null,e.ctx=[])}function I2(n,t){n.$$.dirty[0]===-1&&(Ka.push(n),R2(),n.$$.dirty.fill(0)),n.$$.dirty[t/31|0]|=1<<t%31}function Kr(n,t,e,r,i,s,a,o=[-1]){let l=uu;ou(n);let u=n.$$={fragment:null,ctx:[],props:s,update:tt,not_equal:i,bound:ZS(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:ZS(),dirty:o,skip_bound:!1,root:t.target||l.$$.root};a&&a(u.root);let c=!1;if(u.ctx=e?e(n,t.props||{},(d,f,...p)=>{let b=p.length?p[0]:f;return u.ctx&&i(u.ctx[d],u.ctx[d]=b)&&(!u.skip_bound&&u.bound[d]&&u.bound[d](b),c&&I2(n,d)),f}):[],u.update(),c=!0,Vt(u.before_update),u.fragment=r?r(u.ctx):!1,t.target){if(t.hydrate){S2();let d=x2(t.target);u.fragment&&u.fragment.l(d),d.forEach(ve)}else u.fragment&&u.fragment.c();t.intro&&pn(n.$$.fragment),sr(n,t.target,t.anchor,t.customElement),D2(),aD()}ou(l)}var F2;typeof HTMLElement=="function"&&(F2=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:n}=this.$$;this.$$.on_disconnect=n.map(hy).filter(fd);for(let t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(n,t,e){this[n]=e}disconnectedCallback(){Vt(this.$$.on_disconnect)}$destroy(){Pn(this,1),this.$destroy=tt}$on(n,t){if(!fd(t))return tt;let e=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return e.push(t),()=>{let r=e.indexOf(t);r!==-1&&e.splice(r,1)}}$set(n){this.$$set&&!JS(n)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}});var rr=class{$destroy(){Pn(this,1),this.$destroy=tt}$on(t,e){if(!fd(e))return tt;let r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(e),()=>{let i=r.indexOf(e);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!JS(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}};function uD(n,t,e,r){function i(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function o(c){try{u(r.next(c))}catch(d){a(d)}}function l(c){try{u(r.throw(c))}catch(d){a(d)}}function u(c){c.done?s(c.value):i(c.value).then(o,l)}u((r=r.apply(n,t||[])).next())})}Bt();Pg();Cs();function Za(n){return n.charAt(0).toUpperCase()+n.slice(1)}function Ut(n,t){if(t===null)return Za(n);let e=n.toLowerCase().indexOf(t.toLowerCase());if(e===-1)return`${Za(n)} (<span class="accesskey">${t.toLowerCase()}</span>)`;let r=n.substring(0,e);return r+='<span class="accesskey">',e===0?r+=n.substring(e,e+1).toUpperCase():r+=n.substring(e,e+1),r+="</span>",r+=n.substring(e+1),r=Za(r),r}function L2(n){let t,e,r,i;return{c(){t=ue("code"),e=Ve(n[4]),r=Ee(),i=new Xa(!1),i.a=null,B(t,"class","tasks-modal-parsed-date")},m(s,a){De(s,t,a),z(t,e),z(t,r),i.m(n[2],t)},p(s,a){a&16&&ir(e,s[4]),a&4&&i.p(s[2])},d(s){s&&ve(t)}}}function U2(n){let t,e,r,i,s;return{c(){t=ue("div"),e=Ve(n[4]),r=ue("input"),B(r,"class","tasks-modal-date-editor-picker"),B(r,"type","date"),B(r,"id","date-editor-picker"),B(r,"tabindex","-1"),B(t,"class","tasks-modal-parsed-date")},m(a,o){De(a,t,o),z(t,e),z(t,r),fn(r,n[6]),i||(s=[je(r,"input",n[10]),je(r,"input",n[7])],i=!0)},p(a,o){o&16&&ir(e,a[4]),o&64&&fn(r,a[6])},d(a){a&&ve(t),i=!1,Vt(s)}}}function Y2(n){let t,e=Ut(n[3],n[5])+"",r,i,s,a,o,l;function u(f,p){return f[1]?U2:L2}let c=u(n,-1),d=c(n);return{c(){t=ue("label"),r=Ee(),i=ue("input"),s=Ee(),d.c(),a=pd(),B(t,"for",n[3]),B(i,"id",n[3]),B(i,"type","text"),B(i,"class","tasks-modal-date-input"),B(i,"placeholder",j2),B(i,"accesskey",n[5]),Si(i,"tasks-modal-error",!n[1])},m(f,p){De(f,t,p),t.innerHTML=e,De(f,r,p),De(f,i,p),fn(i,n[0]),De(f,s,p),d.m(f,p),De(f,a,p),o||(l=je(i,"input",n[9]),o=!0)},p(f,[p]){p&40&&e!==(e=Ut(f[3],f[5])+"")&&(t.innerHTML=e),p&8&&B(t,"for",f[3]),p&8&&B(i,"id",f[3]),p&32&&B(i,"accesskey",f[5]),p&1&&i.value!==f[0]&&fn(i,f[0]),p&2&&Si(i,"tasks-modal-error",!f[1]),c===(c=u(f,p))&&d?d.p(f,p):(d.d(1),d=c(f),d&&(d.c(),d.m(a.parentNode,a)))},i:tt,o:tt,d(f){f&&ve(t),f&&ve(r),f&&ve(i),f&&ve(s),d.d(f),f&&ve(a),o=!1,l()}}}var j2="Try 'Mon' or 'tm' then space";function W2(n,t,e){let{id:r}=t,{dateSymbol:i}=t,{date:s}=t,{isDateValid:a}=t,{forwardOnly:o}=t,{accesskey:l}=t,{parsedDate:u=""}=t,c="";function d(b){b.target!==null&&e(0,s=c)}function f(){s=this.value,e(0,s),e(3,r),e(8,o),e(2,u),e(1,a)}function p(){c=this.value,e(6,c),e(0,s),e(3,r),e(8,o),e(2,u),e(1,a)}return n.$$set=b=>{"id"in b&&e(3,r=b.id),"dateSymbol"in b&&e(4,i=b.dateSymbol),"date"in b&&e(0,s=b.date),"isDateValid"in b&&e(1,a=b.isDateValid),"forwardOnly"in b&&e(8,o=b.forwardOnly),"accesskey"in b&&e(5,l=b.accesskey),"parsedDate"in b&&e(2,u=b.parsedDate)},n.$$.update=()=>{if(n.$$.dirty&271){e:e(0,s=Pc(s)),e(2,u=Sk(r,s,o)),e(1,a=!u.includes("invalid")),a&&e(6,c=u)}},[s,a,u,r,i,l,c,d,o,f,p]}var by=class extends rr{constructor(t){super(),Kr(this,t,W2,Y2,zr,{id:3,dateSymbol:4,date:0,isDateValid:1,forwardOnly:8,accesskey:5,parsedDate:2})}},Bs=by;var Vs=Math.min,mn=Math.max,du=Math.round;var Cr=n=>({x:n,y:n}),$2={left:"right",right:"left",bottom:"top",top:"bottom"},q2={start:"end",end:"start"};function Ty(n,t,e){return mn(n,Vs(t,e))}function Ja(n,t){return typeof n=="function"?n(t):n}function Di(n){return n.split("-")[0]}function eo(n){return n.split("-")[1]}function _y(n){return n==="x"?"y":"x"}function vy(n){return n==="y"?"height":"width"}function Bi(n){return["top","bottom"].includes(Di(n))?"y":"x"}function wy(n){return _y(Bi(n))}function cD(n,t,e){e===void 0&&(e=!1);let r=eo(n),i=wy(n),s=vy(i),a=i==="x"?r===(e?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=cu(a)),[a,cu(a)]}function dD(n){let t=cu(n);return[md(n),t,md(t)]}function md(n){return n.replace(/start|end/g,t=>q2[t])}function H2(n,t,e){let r=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(n){case"top":case"bottom":return e?t?i:r:t?r:i;case"left":case"right":return t?s:a;default:return[]}}function fD(n,t,e,r){let i=eo(n),s=H2(Di(n),e==="start",r);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(md)))),s}function cu(n){return n.replace(/left|right|bottom|top/g,t=>$2[t])}function G2(n){return U({top:0,right:0,bottom:0,left:0},n)}function pD(n){return typeof n!="number"?G2(n):{top:n,right:n,bottom:n,left:n}}function zs(n){let{x:t,y:e,width:r,height:i}=n;return{width:r,height:i,top:e,left:t,right:t+r,bottom:e+i,x:t,y:e}}function mD(n,t,e){let{reference:r,floating:i}=n,s=Bi(t),a=wy(t),o=vy(a),l=Di(t),u=s==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[o]/2-i[o]/2,p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(eo(t)){case"start":p[a]-=f*(e&&u?-1:1);break;case"end":p[a]+=f*(e&&u?-1:1);break}return p}var hD=(n,t,e)=>F(void 0,null,function*(){let{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=e,o=s.filter(Boolean),l=yield a.isRTL==null?void 0:a.isRTL(t),u=yield a.getElementRects({reference:n,floating:t,strategy:i}),{x:c,y:d}=mD(u,r,l),f=r,p={},b=0;for(let T=0;T<o.length;T++){let{name:_,fn:O}=o[T],{x:E,y:A,data:Y,reset:q}=yield O({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:u,platform:a,elements:{reference:n,floating:t}});c=E!=null?E:c,d=A!=null?A:d,p=de(U({},p),{[_]:U(U({},p[_]),Y)}),q&&b<=50&&(b++,typeof q=="object"&&(q.placement&&(f=q.placement),q.rects&&(u=q.rects===!0?yield a.getElementRects({reference:n,floating:t,strategy:i}):q.rects),{x:c,y:d}=mD(u,f,l)),T=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}});function hd(n,t){return F(this,null,function*(){var e;t===void 0&&(t={});let{x:r,y:i,platform:s,rects:a,elements:o,strategy:l}=n,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Ja(t,n),b=pD(p),_=o[f?d==="floating"?"reference":"floating":d],O=zs(yield s.getClippingRect({element:(e=yield s.isElement==null?void 0:s.isElement(_))==null||e?_:_.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:u,rootBoundary:c,strategy:l})),E=d==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,A=yield s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating),Y=(yield s.isElement==null?void 0:s.isElement(A))?(yield s.getScale==null?void 0:s.getScale(A))||{x:1,y:1}:{x:1,y:1},q=zs(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:E,offsetParent:A,strategy:l}):E);return{top:(O.top-q.top+b.top)/Y.y,bottom:(q.bottom-O.bottom+b.bottom)/Y.y,left:(O.left-q.left+b.left)/Y.x,right:(q.right-O.right+b.right)/Y.x}})}var gD=function(n){return n===void 0&&(n={}),{name:"flip",options:n,fn(e){return F(this,null,function*(){var r,i;let{placement:s,middlewareData:a,rects:o,initialPlacement:l,platform:u,elements:c}=e,$=Ja(n,e),{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:_=!0}=$,O=pa($,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let E=Di(s),A=Bi(l),Y=Di(l)===l,q=yield u.isRTL==null?void 0:u.isRTL(c.floating),se=p||(Y||!_?[cu(l)]:dD(l)),H=T!=="none";!p&&H&&se.push(...fD(l,_,T,q));let Z=[l,...se],ye=yield hd(e,O),we=[],V=((i=a.flip)==null?void 0:i.overflows)||[];if(d&&we.push(ye[E]),f){let le=cD(s,o,q);we.push(ye[le[0]],ye[le[1]])}if(V=[...V,{placement:s,overflows:we}],!we.every(le=>le<=0)){var K,C;let le=(((K=a.flip)==null?void 0:K.index)||0)+1,m=Z[le];if(m)return{data:{index:le,overflows:V},reset:{placement:m}};let y=(C=V.filter(v=>v.overflows[0]<=0).sort((v,w)=>v.overflows[1]-w.overflows[1])[0])==null?void 0:C.placement;if(!y)switch(b){case"bestFit":{var J;let v=(J=V.filter(w=>{if(H){let S=Bi(w.placement);return S===A||S==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(S=>S>0).reduce((S,M)=>S+M,0)]).sort((w,S)=>w[1]-S[1])[0])==null?void 0:J[0];v&&(y=v);break}case"initialPlacement":y=l;break}if(s!==y)return{reset:{placement:y}}}return{}})}}};function B2(n,t){return F(this,null,function*(){let{placement:e,platform:r,elements:i}=n,s=yield r.isRTL==null?void 0:r.isRTL(i.floating),a=Di(e),o=eo(e),l=Bi(e)==="y",u=["left","top"].includes(a)?-1:1,c=s&&l?-1:1,d=Ja(t,n),{mainAxis:f,crossAxis:p,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof b=="number"&&(p=o==="end"?b*-1:b),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}})}var yD=function(n){return n===void 0&&(n=0),{name:"offset",options:n,fn(e){return F(this,null,function*(){var r,i;let{x:s,y:a,placement:o,middlewareData:l}=e,u=yield B2(e,n);return o===((r=l.offset)==null?void 0:r.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:s+u.x,y:a+u.y,data:de(U({},u),{placement:o})}})}}},bD=function(n){return n===void 0&&(n={}),{name:"shift",options:n,fn(e){return F(this,null,function*(){let{x:r,y:i,placement:s}=e,O=Ja(n,e),{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:E=>{let{x:A,y:Y}=E;return{x:A,y:Y}}}}=O,u=pa(O,["mainAxis","crossAxis","limiter"]),c={x:r,y:i},d=yield hd(e,u),f=Bi(Di(s)),p=_y(f),b=c[p],T=c[f];if(a){let E=p==="y"?"top":"left",A=p==="y"?"bottom":"right",Y=b+d[E],q=b-d[A];b=Ty(Y,b,q)}if(o){let E=f==="y"?"top":"left",A=f==="y"?"bottom":"right",Y=T+d[E],q=T-d[A];T=Ty(Y,T,q)}let _=l.fn(de(U({},e),{[p]:b,[f]:T}));return de(U({},_),{data:{x:_.x-r,y:_.y-i,enabled:{[p]:a,[f]:o}}})})}}};var TD=function(n){return n===void 0&&(n={}),{name:"size",options:n,fn(e){return F(this,null,function*(){var r,i;let{placement:s,rects:a,platform:o,elements:l}=e,V=Ja(n,e),{apply:u=()=>{}}=V,c=pa(V,["apply"]),d=yield hd(e,c),f=Di(s),p=eo(s),b=Bi(s)==="y",{width:T,height:_}=a.floating,O,E;f==="top"||f==="bottom"?(O=f,E=p===((yield o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(E=f,O=p==="end"?"top":"bottom");let A=_-d.top-d.bottom,Y=T-d.left-d.right,q=Vs(_-d[O],A),se=Vs(T-d[E],Y),H=!e.middlewareData.shift,Z=q,ye=se;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(ye=Y),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(Z=A),H&&!p){let K=mn(d.left,0),C=mn(d.right,0),J=mn(d.top,0),$=mn(d.bottom,0);b?ye=T-2*(K!==0||C!==0?K+C:mn(d.left,d.right)):Z=_-2*(J!==0||$!==0?J+$:mn(d.top,d.bottom))}yield u(de(U({},e),{availableWidth:ye,availableHeight:Z}));let we=yield o.getDimensions(l.floating);return T!==we.width||_!==we.height?{reset:{rects:!0}}:{}})}}};function yd(){return typeof window!="undefined"}function Ks(n){return vD(n)?(n.nodeName||"").toLowerCase():"#document"}function hn(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(n){var t;return(t=(vD(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function vD(n){return yd()?n instanceof Node||n instanceof hn(n).Node:!1}function ar(n){return yd()?n instanceof Element||n instanceof hn(n).Element:!1}function Mr(n){return yd()?n instanceof HTMLElement||n instanceof hn(n).HTMLElement:!1}function _D(n){return!yd()||typeof ShadowRoot=="undefined"?!1:n instanceof ShadowRoot||n instanceof hn(n).ShadowRoot}function to(n){let{overflow:t,overflowX:e,overflowY:r,display:i}=or(n);return/auto|scroll|overlay|hidden|clip/.test(t+r+e)&&!["inline","contents"].includes(i)}function wD(n){return["table","td","th"].includes(Ks(n))}function fu(n){return[":popover-open",":modal"].some(t=>{try{return n.matches(t)}catch(e){return!1}})}function bd(n){let t=Td(),e=ar(n)?or(n):n;return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(e.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(e.contain||"").includes(r))}function kD(n){let t=Ei(n);for(;Mr(t)&&!Qs(t);){if(bd(t))return t;if(fu(t))return null;t=Ei(t)}return null}function Td(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Qs(n){return["html","body","#document"].includes(Ks(n))}function or(n){return hn(n).getComputedStyle(n)}function pu(n){return ar(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Ei(n){if(Ks(n)==="html")return n;let t=n.assignedSlot||n.parentNode||_D(n)&&n.host||Qr(n);return _D(t)?t.host:t}function SD(n){let t=Ei(n);return Qs(t)?n.ownerDocument?n.ownerDocument.body:n.body:Mr(t)&&to(t)?t:SD(t)}function gd(n,t,e){var r;t===void 0&&(t=[]),e===void 0&&(e=!0);let i=SD(n),s=i===((r=n.ownerDocument)==null?void 0:r.body),a=hn(i);if(s){let o=_d(a);return t.concat(a,a.visualViewport||[],to(i)?i:[],o&&e?gd(o):[])}return t.concat(i,gd(i,[],e))}function _d(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function xD(n){let t=or(n),e=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Mr(n),s=i?n.offsetWidth:e,a=i?n.offsetHeight:r,o=du(e)!==s||du(r)!==a;return o&&(e=s,r=a),{width:e,height:r,$:o}}function OD(n){return ar(n)?n:n.contextElement}function no(n){let t=OD(n);if(!Mr(t))return Cr(1);let e=t.getBoundingClientRect(),{width:r,height:i,$:s}=xD(t),a=(s?du(e.width):e.width)/r,o=(s?du(e.height):e.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}var V2=Cr(0);function CD(n){let t=hn(n);return!Td()||!t.visualViewport?V2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function z2(n,t,e){return t===void 0&&(t=!1),!e||t&&e!==hn(n)?!1:t}function mu(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=!1);let i=n.getBoundingClientRect(),s=OD(n),a=Cr(1);t&&(r?ar(r)&&(a=no(r)):a=no(n));let o=z2(s,e,r)?CD(s):Cr(0),l=(i.left+o.x)/a.x,u=(i.top+o.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(s){let f=hn(s),p=r&&ar(r)?hn(r):r,b=f,T=_d(b);for(;T&&r&&p!==b;){let _=no(T),O=T.getBoundingClientRect(),E=or(T),A=O.left+(T.clientLeft+parseFloat(E.paddingLeft))*_.x,Y=O.top+(T.clientTop+parseFloat(E.paddingTop))*_.y;l*=_.x,u*=_.y,c*=_.x,d*=_.y,l+=A,u+=Y,b=hn(T),T=_d(b)}}return zs({width:c,height:d,x:l,y:u})}function Sy(n,t){let e=pu(n).scrollLeft;return t?t.left+e:mu(Qr(n)).left+e}function MD(n,t,e){e===void 0&&(e=!1);let r=n.getBoundingClientRect(),i=r.left+t.scrollLeft-(e?0:Sy(n,r)),s=r.top+t.scrollTop;return{x:i,y:s}}function K2(n){let{elements:t,rect:e,offsetParent:r,strategy:i}=n,s=i==="fixed",a=Qr(r),o=t?fu(t.floating):!1;if(r===a||o&&s)return e;let l={scrollLeft:0,scrollTop:0},u=Cr(1),c=Cr(0),d=Mr(r);if((d||!d&&!s)&&((Ks(r)!=="body"||to(a))&&(l=pu(r)),Mr(r))){let p=mu(r);u=no(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let f=a&&!d&&!s?MD(a,l,!0):Cr(0);return{width:e.width*u.x,height:e.height*u.y,x:e.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:e.y*u.y-l.scrollTop*u.y+c.y+f.y}}function Q2(n){return Array.from(n.getClientRects())}function X2(n){let t=Qr(n),e=pu(n),r=n.ownerDocument.body,i=mn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=mn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-e.scrollLeft+Sy(n),o=-e.scrollTop;return or(r).direction==="rtl"&&(a+=mn(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:o}}function Z2(n,t){let e=hn(n),r=Qr(n),i=e.visualViewport,s=r.clientWidth,a=r.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;let u=Td();(!u||u&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}return{width:s,height:a,x:o,y:l}}function J2(n,t){let e=mu(n,!0,t==="fixed"),r=e.top+n.clientTop,i=e.left+n.clientLeft,s=Mr(n)?no(n):Cr(1),a=n.clientWidth*s.x,o=n.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:a,height:o,x:l,y:u}}function DD(n,t,e){let r;if(t==="viewport")r=Z2(n,e);else if(t==="document")r=X2(Qr(n));else if(ar(t))r=J2(t,e);else{let i=CD(n);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return zs(r)}function RD(n,t){let e=Ei(n);return e===t||!ar(e)||Qs(e)?!1:or(e).position==="fixed"||RD(e,t)}function eU(n,t){let e=t.get(n);if(e)return e;let r=gd(n,[],!1).filter(o=>ar(o)&&Ks(o)!=="body"),i=null,s=or(n).position==="fixed",a=s?Ei(n):n;for(;ar(a)&&!Qs(a);){let o=or(a),l=bd(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||to(a)&&!l&&RD(n,a))?r=r.filter(c=>c!==a):i=o,a=Ei(a)}return t.set(n,r),r}function tU(n){let{element:t,boundary:e,rootBoundary:r,strategy:i}=n,a=[...e==="clippingAncestors"?fu(t)?[]:eU(t,this._c):[].concat(e),r],o=a[0],l=a.reduce((u,c)=>{let d=DD(t,c,i);return u.top=mn(d.top,u.top),u.right=Vs(d.right,u.right),u.bottom=Vs(d.bottom,u.bottom),u.left=mn(d.left,u.left),u},DD(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function nU(n){let{width:t,height:e}=xD(n);return{width:t,height:e}}function rU(n,t,e){let r=Mr(t),i=Qr(t),s=e==="fixed",a=mu(n,!0,s,t),o={scrollLeft:0,scrollTop:0},l=Cr(0);if(r||!r&&!s)if((Ks(t)!=="body"||to(i))&&(o=pu(t)),r){let f=mu(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else i&&(l.x=Sy(i));let u=i&&!r&&!s?MD(i,o):Cr(0),c=a.left+o.scrollLeft-l.x-u.x,d=a.top+o.scrollTop-l.y-u.y;return{x:c,y:d,width:a.width,height:a.height}}function ky(n){return or(n).position==="static"}function ED(n,t){if(!Mr(n)||or(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return Qr(n)===e&&(e=e.ownerDocument.body),e}function AD(n,t){let e=hn(n);if(fu(n))return e;if(!Mr(n)){let i=Ei(n);for(;i&&!Qs(i);){if(ar(i)&&!ky(i))return i;i=Ei(i)}return e}let r=ED(n,t);for(;r&&wD(r)&&ky(r);)r=ED(r,t);return r&&Qs(r)&&ky(r)&&!bd(r)?e:r||kD(n)||e}var iU=function(n){return F(this,null,function*(){let t=this.getOffsetParent||AD,e=this.getDimensions,r=yield e(n.floating);return{reference:rU(n.reference,yield t(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function sU(n){return or(n).direction==="rtl"}var aU={convertOffsetParentRelativeRectToViewportRelativeRect:K2,getDocumentElement:Qr,getClippingRect:tU,getOffsetParent:AD,getElementRects:iU,getClientRects:Q2,getDimensions:nU,getScale:no,isElement:ar,isRTL:sU};var Dy=yD;var Ey=bD,PD=gD,ND=TD;var xy=(n,t,e)=>{let r=new Map,i=U({platform:aU},e),s=de(U({},i.platform),{_c:r});return hD(n,t,de(U({},i),{platform:s}))};Zg();function ID(n,t,e){let r=n.slice();return r[5]=t[e],r}function FD(n,t,e){let r=n.slice();r[40]=t[e],r[43]=e;let i=r[17](r[40].taskLocation.path);return r[41]=i,r}function LD(n){let t,e,r,i=n[10],s=[];for(let a=0;a<i.length;a+=1)s[a]=YD(FD(n,i,a));return{c(){t=ue("ul");for(let a=0;a<s.length;a+=1)s[a].c();B(t,"class","task-dependency-dropdown")},m(a,o){De(a,t,o);for(let l=0;l<s.length;l+=1)s[l]&&s[l].m(t,null);n[31](t),e||(r=je(t,"mouseleave",n[32]),e=!0)},p(a,o){if(o[0]&928832){i=a[10];let l;for(l=0;l<i.length;l+=1){let u=FD(a,i,l);s[l]?s[l].p(u,o):(s[l]=YD(u),s[l].c(),s[l].m(t,null))}for(;l<s.length;l+=1)s[l].d(1);s.length=i.length}},d(a){a&&ve(t),Gs(s,a),n[31](null),e=!1,r()}}}function UD(n){let t,e=n[41]+"",r,i,s;function a(...o){return n[28](n[41],...o)}return{c(){t=ue("div"),r=Ve(e),B(t,"class","dependency-path")},m(o,l){De(o,t,l),z(t,r),i||(s=je(t,"mouseenter",a),i=!0)},p(o,l){n=o,l[0]&1024&&e!==(e=n[41]+"")&&ir(r,e)},d(o){o&&ve(t),i=!1,s()}}}function YD(n){let t,e,r,i=n[40].status.symbol+"",s,a,o=Us(n[40])+"",l,u,c,d,f,p;function b(...E){return n[27](n[40],...E)}let T=n[41]&&UD(n);function _(){return n[29](n[40])}function O(){return n[30](n[43])}return{c(){t=ue("li"),e=ue("div"),r=Ve("["),s=Ve(i),a=Ve("] "),l=Ve(o),c=Ee(),T&&T.c(),d=Ee(),B(e,"class",u=n[41]?"dependency-name-shared":"dependency-name"),Si(t,"selected",n[6]!==null&&n[43]===n[11])},m(E,A){De(E,t,A),z(t,e),z(e,r),z(e,s),z(e,a),z(e,l),z(t,c),T&&T.m(t,null),z(t,d),f||(p=[je(e,"mouseenter",b),je(t,"mousedown",_),je(t,"mouseenter",O)],f=!0)},p(E,A){n=E,A[0]&1024&&i!==(i=n[40].status.symbol+"")&&ir(s,i),A[0]&1024&&o!==(o=Us(n[40])+"")&&ir(l,o),A[0]&1024&&u!==(u=n[41]?"dependency-name-shared":"dependency-name")&&B(e,"class",u),n[41]?T?T.p(n,A):(T=UD(n),T.c(),T.m(t,d)):T&&(T.d(1),T=null),A[0]&2112&&Si(t,"selected",n[6]!==null&&n[43]===n[11])},d(E){E&&ve(t),T&&T.d(),f=!1,Vt(p)}}}function jD(n){let t,e=n[0][n[1]],r=[];for(let i=0;i<e.length;i+=1)r[i]=WD(ID(n,e,i));return{c(){t=ue("div");for(let i=0;i<r.length;i+=1)r[i].c();B(t,"class","task-dependencies-container results-dependency")},m(i,s){De(i,t,s);for(let a=0;a<r.length;a+=1)r[a]&&r[a].m(t,null)},p(i,s){if(s[0]&802819){e=i[0][i[1]];let a;for(a=0;a<e.length;a+=1){let o=ID(i,e,a);r[a]?r[a].p(o,s):(r[a]=WD(o),r[a].c(),r[a].m(t,null))}for(;a<r.length;a+=1)r[a].d(1);r.length=e.length}},d(i){i&&ve(t),Gs(r,i)}}}function WD(n){let t,e,r,i=n[5].status.symbol+"",s,a,o=Us(n[5])+"",l,u,c,d,f,p;function b(){return n[33](n[5])}function T(..._){return n[34](n[5],..._)}return{c(){t=ue("div"),e=ue("span"),r=Ve("["),s=Ve(i),a=Ve("] "),l=Ve(o),u=Ee(),c=ue("button"),c.innerHTML='<svg style="display: block; margin: auto;" xmlns="http://www.w3.org/2000/svg" width="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg>',d=Ee(),B(e,"class","task-dependency-name"),B(c,"type","button"),B(c,"class","task-dependency-delete"),B(t,"class","task-dependency")},m(_,O){De(_,t,O),z(t,e),z(e,r),z(e,s),z(e,a),z(e,l),z(t,u),z(t,c),z(t,d),f||(p=[je(c,"click",b),je(t,"mouseenter",T)],f=!0)},p(_,O){n=_,O[0]&3&&i!==(i=n[5].status.symbol+"")&&ir(s,i),O[0]&3&&o!==(o=Us(n[5])+"")&&ir(l,o)},d(_){_&&ve(t),f=!1,Vt(p)}}}function oU(n){let t,e=Ut(n[2],n[3])+"",r,i,s,a,o,l,u,c,d,f=n[10]&&n[10].length!==0&&LD(n),p=n[0][n[1]].length!==0&&jD(n);return{c(){t=ue("label"),r=Ee(),i=ue("span"),s=ue("input"),o=Ee(),f&&f.c(),l=Ee(),p&&p.c(),u=pd(),B(t,"for",n[1]),B(s,"accesskey",n[3]),B(s,"id",n[1]),B(s,"class","tasks-modal-dependency-input"),B(s,"type","text"),B(s,"placeholder",n[4]),Hs(()=>n[26].call(i))},m(b,T){De(b,t,T),t.innerHTML=e,De(b,r,T),De(b,i,T),z(i,s),n[22](s),fn(s,n[6]),a=sD(i,n[26].bind(i)),De(b,o,T),f&&f.m(b,T),De(b,l,T),p&&p.m(b,T),De(b,u,T),c||(d=[je(s,"input",n[23]),je(s,"keydown",n[24]),je(s,"focus",n[16]),je(s,"blur",n[25])],c=!0)},p(b,T){T[0]&12&&e!==(e=Ut(b[2],b[3])+"")&&(t.innerHTML=e),T[0]&2&&B(t,"for",b[1]),T[0]&8&&B(s,"accesskey",b[3]),T[0]&2&&B(s,"id",b[1]),T[0]&16&&B(s,"placeholder",b[4]),T[0]&64&&s.value!==b[6]&&fn(s,b[6]),b[10]&&b[10].length!==0?f?f.p(b,T):(f=LD(b),f.c(),f.m(l.parentNode,l)):f&&(f.d(1),f=null),b[0][b[1]].length!==0?p?p.p(b,T):(p=jD(b),p.c(),p.m(u.parentNode,u)):p&&(p.d(1),p=null)},i:tt,o:tt,d(b){b&&ve(t),b&&ve(r),b&&ve(i),n[22](null),a(),b&&ve(o),f&&f.d(b),b&&ve(l),p&&p.d(b),b&&ve(u),c=!1,Vt(d)}}}function lU(n,t,e){let{task:r}=t,{editableTask:i}=t,{allTasks:s}=t,{_onDescriptionKeyDown:a}=t,{type:o}=t,{labelText:l}=t,{accesskey:u}=t,{placeholder:c="Type to search..."}=t,d="",f=null,p=0,b,T=!1,_=!1,O,E;function A(D){e(0,i[o]=[...i[o],D],i),e(6,d=""),e(7,T=!1)}function Y(D){e(0,i[o]=i[o].filter(P=>P!==D),i)}function q(D){var P;if(f!==null){switch(D.key){case"ArrowUp":D.preventDefault(),!!p&&p>0?e(11,p-=1):e(11,p=f.length-1);break;case"ArrowDown":D.preventDefault(),!!p&&p<f.length-1?e(11,p+=1):e(11,p=0);break;case"Enter":if(D.isComposing)return;p!==null?(D.preventDefault(),A(f[p]),e(11,p=null),e(7,T=!1)):a(D);break;default:e(11,p=0);break}p&&((P=E==null?void 0:E.getElementsByTagName("li")[p])===null||P===void 0||P.scrollIntoView({block:"nearest"}))}}function se(D){return!D&&!_?[]:(_=!1,ed(D,s,r,i.blockedBy,i.blocking))}function H(){e(7,T=!0),_=!0}function Z(D,P){!D||!P||xy(D,P,{middleware:[Dy(6),Ey(),PD(),ND({apply(){P&&Object.assign(P.style,{width:`${b}px`})}})]}).then(({x:W,y:ce})=>{P.style.left=`${W}px`,P.style.top=`${ce}px`})}function ye(D){return D===r.taskLocation.path?"":D}function we(D){return Us(D)}function V(D,P){let W=D.createDiv();W.addClasses(["tooltip","pop-up"]),W.innerText=P,xy(D,W,{placement:"top",middleware:[Dy(-18),Ey()]}).then(({x:ce,y:be})=>{W.style.left=`${ce}px`,W.style.top=`${be}px`}),D.addEventListener("mouseleave",()=>W.remove())}function K(D){ot[D?"unshift":"push"](()=>{O=D,e(8,O)})}function C(){d=this.value,e(6,d)}let J=D=>q(D),$=()=>e(7,T=!1);function le(){b=this.clientWidth,e(12,b)}let m=(D,P)=>V(P.currentTarget,we(D)),y=(D,P)=>V(P.currentTarget,D),v=D=>A(D),w=D=>e(11,p=D);function S(D){ot[D?"unshift":"push"](()=>{E=D,e(9,E)})}let M=()=>e(11,p=null),I=D=>Y(D),j=(D,P)=>V(P.currentTarget,we(D));return n.$$set=D=>{"task"in D&&e(5,r=D.task),"editableTask"in D&&e(0,i=D.editableTask),"allTasks"in D&&e(20,s=D.allTasks),"_onDescriptionKeyDown"in D&&e(21,a=D._onDescriptionKeyDown),"type"in D&&e(1,o=D.type),"labelText"in D&&e(2,l=D.labelText),"accesskey"in D&&e(3,u=D.accesskey),"placeholder"in D&&e(4,c=D.placeholder)},n.$$.update=()=>{if(n.$$.dirty[0]&768){e:Z(O,E)}if(n.$$.dirty[0]&192){e:e(10,f=T?se(d):null)}},[i,o,l,u,c,r,d,T,O,E,f,p,b,A,Y,q,H,ye,we,V,s,a,K,C,J,$,le,m,y,v,w,S,M,I,j]}var Oy=class extends rr{constructor(t){super(),Kr(this,t,lU,oU,zr,{task:5,editableTask:0,allTasks:20,_onDescriptionKeyDown:21,type:1,labelText:2,accesskey:3,placeholder:4},null,[-1,-1])}},Cy=Oy;Mn();Cs();su();var gu=require("obsidian");Mn();Ws();dy();var hu,My,Ry,uU=["md"];function kd(){return sn.getLogger("tasks.File")}var $D=({metadataCache:n,vault:t,workspace:e})=>{hu=n,My=t,Ry=e},Nn=e=>F(void 0,[e],function*({originalTask:n,newTasks:t}){if(My===void 0||hu===void 0||Ry===void 0){vd("Tasks: cannot use File before initializing it.");return}Array.isArray(t)||(t=[t]);let r=kd(),i="replaceTaskWithTasks()";ad(r,i,n),od(r,i,t),yield HD({originalTask:n,newTasks:t,vault:My,metadataCache:hu,workspace:Ry,previousTries:0})});function vd(n){console.error(n),new gu.Notice(n,15e3)}function qD(n){console.warn(n),new gu.Notice(n,1e4)}function cU(n){kd().debug(n)}var Vi=class extends Error{},wd=class extends Error{},HD=a=>F(void 0,[a],function*({originalTask:n,newTasks:t,vault:e,metadataCache:r,workspace:i,previousTries:s}){let o=kd();o.debug(`tryRepetitive after ${s} previous tries`);let l=()=>F(void 0,null,function*(){if(s>10){let c=`Tasks: Could not find the correct task line to update. The task line not updated is: ${n.originalMarkdown} @@ -240,10 +240,10 @@ Recommendations: Expected task: ${n.originalMarkdown} Found task: -${l}`);return}break}s++}}return i}Nc();ja();Vc();Nt();Jc();Cn();var ro=class{constructor(t){this.addGlobalFilterOnSave=t.addGlobalFilterOnSave,this.originalBlocking=t.originalBlocking,this.description=t.description,this.status=t.status,this.priority=t.priority,this.onCompletion=t.onCompletion,this.recurrenceRule=t.recurrenceRule,this.createdDate=t.createdDate,this.startDate=t.startDate,this.scheduledDate=t.scheduledDate,this.dueDate=t.dueDate,this.doneDate=t.doneDate,this.cancelledDate=t.cancelledDate,this.forwardOnly=t.forwardOnly,this.blockedBy=t.blockedBy,this.blocking=t.blocking}static fromTask(t,e){let r=Fe.getInstance().removeAsWordFrom(t.description),i=r!=t.description||!Fe.getInstance().includedIn(t.description),s="none";t.priority==="5"?s="lowest":t.priority==="4"?s="low":t.priority==="2"?s="medium":t.priority==="1"?s="high":t.priority==="0"&&(s="highest");let a=[];for(let l of t.dependsOn){let u=e.find(c=>c.id===l);!u||a.push(u)}let o=e.filter(l=>l.dependsOn.includes(t.id));return new ro({addGlobalFilterOnSave:i,originalBlocking:o,description:r,status:t.status,priority:s,recurrenceRule:t.recurrence?t.recurrence.toText():"",onCompletion:t.onCompletion,createdDate:t.created.formatAsDate(),startDate:t.start.formatAsDate(),scheduledDate:t.scheduled.formatAsDate(),dueDate:t.due.formatAsDate(),doneDate:t.done.formatAsDate(),cancelledDate:t.cancelled.formatAsDate(),forwardOnly:!0,blockedBy:a,blocking:o})}applyEdits(t,e){return F(this,null,function*(){let r=this.description.trim();this.addGlobalFilterOnSave&&(r=Fe.getInstance().prependTo(r));let i=Os(this.startDate,this.forwardOnly),s=Os(this.scheduledDate,this.forwardOnly),a=Os(this.dueDate,this.forwardOnly),o=Os(this.cancelledDate,this.forwardOnly),l=Os(this.createdDate,this.forwardOnly),u=Os(this.doneDate,this.forwardOnly),c=null;this.recurrenceRule&&(c=Dt.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new Xn({startDate:i,scheduledDate:s,dueDate:a})}));let d=this.onCompletion,f=[];for(let E of this.blockedBy){let A=yield hU(E,e);f.push(A)}let p=t.id,b=[],T=[];(this.blocking.toString()!==this.originalBlocking.toString()||this.blocking.length!==0)&&(t.id===""&&(p=ru(e.filter(E=>E.id!=="").map(E=>E.id))),b=this.originalBlocking.filter(E=>!this.blocking.includes(E)),T=this.blocking.filter(E=>!this.originalBlocking.includes(E)));let _=new pe(de(U({},t),{description:r,status:t.status,priority:Rn.priorityValue(this.priority),onCompletion:d,recurrence:c,startDate:i,scheduledDate:s,dueDate:a,doneDate:u,createdDate:l,cancelledDate:o,dependsOn:f.map(E=>E.id),id:p}));for(let E of b){let A=OS(E,_);yield Nn({originalTask:E,newTasks:A})}for(let E of T){let A=xS(E,_);yield Nn({originalTask:E,newTasks:A})}let O=this.inferTodaysDate(this.status.type,u,o);return _.handleNewStatusWithRecurrenceInUsersOrder(this.status,O)})}inferTodaysDate(t,e,r){return t==="DONE"&&e!==null?e:t==="CANCELLED"&&r!==null?r:window.moment()}parseAndValidateRecurrence(){var e;if(!this.recurrenceRule)return{parsedRecurrence:"<i>not recurring</>",isRecurrenceValid:!0};let t=(e=Dt.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new Xn({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:e.toText();return t?this.startDate||this.scheduledDate||this.dueDate?{parsedRecurrence:t,isRecurrenceValid:!0}:{parsedRecurrence:"<i>due, scheduled or start date required</i>",isRecurrenceValid:!1}:{parsedRecurrence:"<i>invalid recurrence rule</i>",isRecurrenceValid:!1}}};function hU(n,t){return F(this,null,function*(){if(n.id!=="")return n;let e=t.filter(i=>i.id!==""),r=Zc(n,e.map(i=>i.id));return yield Nn({originalTask:n,newTasks:r}),r})}rn();function gU(n){let t,e=Ut("Recurs",n[2])+"",r,i,s,a,o,l,u,c,d;return{c(){t=ue("label"),r=Ee(),i=ue("input"),s=Ee(),a=ue("code"),o=Ve(n[4]),l=Ee(),u=new Xa(!1),B(t,"for","recurrence"),B(i,"id","recurrence"),B(i,"type","text"),B(i,"class","tasks-modal-date-input"),B(i,"placeholder","Try 'every day when done'"),B(i,"accesskey",n[2]),Si(i,"tasks-modal-error",!n[1]),u.a=null,B(a,"class","tasks-modal-parsed-date")},m(f,p){De(f,t,p),t.innerHTML=e,De(f,r,p),De(f,i,p),fn(i,n[0].recurrenceRule),De(f,s,p),De(f,a,p),z(a,o),z(a,l),u.m(n[3],a),c||(d=je(i,"input",n[5]),c=!0)},p(f,[p]){p&4&&e!==(e=Ut("Recurs",f[2])+"")&&(t.innerHTML=e),p&4&&B(i,"accesskey",f[2]),p&1&&i.value!==f[0].recurrenceRule&&fn(i,f[0].recurrenceRule),p&2&&Si(i,"tasks-modal-error",!f[1]),p&8&&u.p(f[3])},i:tt,o:tt,d(f){f&&ve(t),f&&ve(r),f&&ve(i),f&&ve(s),f&&ve(a),c=!1,d()}}}function yU(n,t,e){let{editableTask:r}=t,{isRecurrenceValid:i}=t,{accesskey:s}=t,a,{recurrenceSymbol:o}=Er.tasksPluginEmoji.taskSerializer.symbols;function l(){r.recurrenceRule=this.value,e(0,r)}return n.$$set=u=>{"editableTask"in u&&e(0,r=u.editableTask),"isRecurrenceValid"in u&&e(1,i=u.isRecurrenceValid),"accesskey"in u&&e(2,s=u.accesskey)},n.$$.update=()=>{if(n.$$.dirty&1){e:e(3,{parsedRecurrence:a,isRecurrenceValid:i}=r.parseAndValidateRecurrence(),a,(e(1,i),e(0,r)))}},[r,i,s,a,o,l]}var Py=class extends rr{constructor(t){super(),Kr(this,t,yU,gU,zr,{editableTask:0,isRecurrenceValid:1,accesskey:2})}},VD=Py;function zD(n,t,e){let r=n.slice();return r[7]=t[e],r}function KD(n){let t,e=n[7].name+"",r,i,s=n[7].symbol+"",a,o,l;return{c(){t=ue("option"),r=Ve(e),i=Ve(" ["),a=Ve(s),o=Ve("]"),t.__value=l=n[7].symbol,t.value=t.__value},m(u,c){De(u,t,c),z(t,r),z(t,i),z(t,a),z(t,o)},p(u,c){c&1&&e!==(e=u[7].name+"")&&ir(r,e),c&1&&s!==(s=u[7].symbol+"")&&ir(a,s),c&1&&l!==(l=u[7].symbol)&&(t.__value=l,t.value=t.__value)},d(u){u&&ve(t)}}}function bU(n){let t,e=Ut("Status",n[1])+"",r,i,s,a,o=n[0],l=[];for(let u=0;u<o.length;u+=1)l[u]=KD(zD(n,o,u));return{c(){t=ue("label"),r=Ee(),i=ue("select");for(let u=0;u<l.length;u+=1)l[u].c();B(t,"for","status"),B(i,"id","status-type"),B(i,"class","status-editor-status-selector"),B(i,"accesskey",n[1]),n[2]===void 0&&Hs(()=>n[6].call(i))},m(u,c){De(u,t,c),t.innerHTML=e,De(u,r,c),De(u,i,c);for(let d=0;d<l.length;d+=1)l[d]&&l[d].m(i,null);gy(i,n[2],!0),s||(a=[je(i,"change",n[6]),je(i,"change",n[3])],s=!0)},p(u,[c]){if(c&2&&e!==(e=Ut("Status",u[1])+"")&&(t.innerHTML=e),c&1){o=u[0];let d;for(d=0;d<o.length;d+=1){let f=zD(u,o,d);l[d]?l[d].p(f,c):(l[d]=KD(f),l[d].c(),l[d].m(i,null))}for(;d<l.length;d+=1)l[d].d(1);l.length=o.length}c&2&&B(i,"accesskey",u[1]),c&5&&gy(i,u[2])},i:tt,o:tt,d(u){u&&ve(t),u&&ve(r),u&&ve(i),Gs(l,u),s=!1,Bt(a)}}}function QD(n,t,e){let r=n==="";return t&&r?e.formatAsDate():!t&&!r?"":n}function TU(n,t,e){let{task:r}=t,{editableTask:i}=t,{statusOptions:s}=t,{accesskey:a}=t,o=r.status.symbol,l=()=>{let c=s.find(f=>f.symbol===o);if(c)e(4,i.status=c,i);else{console.log(`Error in EditTask: cannot find status with symbol ${o}`);return}let d=r.handleNewStatus(c).pop();d&&(e(4,i.doneDate=QD(i.doneDate,c.isCompleted(),d.done),i),e(4,i.cancelledDate=QD(i.cancelledDate,c.isCancelled(),d.cancelled),i))};function u(){o=iD(this),e(2,o),e(0,s)}return n.$$set=c=>{"task"in c&&e(5,r=c.task),"editableTask"in c&&e(4,i=c.editableTask),"statusOptions"in c&&e(0,s=c.statusOptions),"accesskey"in c&&e(1,a=c.accesskey)},[s,a,o,l,i,r,u]}var Ny=class extends rr{constructor(t){super(),Kr(this,t,TU,bU,zr,{task:5,editableTask:4,statusOptions:0,accesskey:1})}},XD=Ny;function ZD(n,t,e){let r=n.slice();return r[49]=t[e].value,r[50]=t[e].label,r[51]=t[e].symbol,r[52]=t[e].accessKey,r[53]=t[e].accessKeyIndex,r}function _U(n){let t,e=n[50]+"",r;return{c(){t=ue("span"),r=Ve(e)},m(i,s){De(i,t,s),z(t,r)},p:tt,d(i){i&&ve(t)}}}function vU(n){let t,e=n[50].substring(0,n[53])+"",r,i,s=n[50].substring(n[53],n[53]+1)+"",a,o,l=n[50].substring(n[53]+1)+"",u;return{c(){t=ue("span"),r=Ve(e),i=ue("span"),a=Ve(s),o=ue("span"),u=Ve(l),B(i,"class","accesskey")},m(c,d){De(c,t,d),z(t,r),De(c,i,d),z(i,a),De(c,o,d),z(o,u)},p:tt,d(c){c&&ve(t),c&&ve(i),c&&ve(o)}}}function wU(n){let t,e=n[51]+"",r;return{c(){t=ue("span"),r=Ve(e)},m(i,s){De(i,t,s),z(t,r)},p:tt,d(i){i&&ve(t)}}}function JD(n){let t,e,r,i,s,a,o,l,u=n[51]&&n[51].charCodeAt(0)>=256,c,d,f,p,b;function T(A,Y){return A[11]?vU:_U}let _=T(n,[-1,-1]),O=_(n),E=u&&wU(n);return f=rD(n[32][0]),{c(){t=ue("div"),e=ue("input"),a=Ee(),o=ue("label"),O.c(),l=Ee(),E&&E.c(),d=Ee(),B(e,"type","radio"),B(e,"id",r="priority-"+n[49]),e.__value=i=n[49],e.value=e.__value,B(e,"accesskey",s=n[15](n[52])),B(o,"for",c="priority-"+n[49]),B(t,"class","task-modal-priority-option-container"),f.p(e)},m(A,Y){De(A,t,Y),z(t,e),e.checked=e.__value===n[3].priority,z(t,a),z(t,o),O.m(o,null),z(o,l),E&&E.m(o,null),z(t,d),p||(b=je(e,"change",n[31]),p=!0)},p(A,Y){Y[0]&32768&&s!==(s=A[15](A[52]))&&B(e,"accesskey",s),Y[0]&8&&(e.checked=e.__value===A[3].priority),_===(_=T(A,Y))&&O?O.p(A,Y):(O.d(1),O=_(A),O&&(O.c(),O.m(o,l))),u&&E.p(A,Y)},d(A){A&&ve(t),O.d(),E&&E.d(),f.r(),p=!1,b()}}}function kU(n){let t;return{c(){t=ue("div"),t.innerHTML="<i>Blocking and blocked by fields are disabled when vault tasks is empty</i>"},m(e,r){De(e,t,r)},p:tt,i:tt,o:tt,d(e){e&&ve(t)}}}function SU(n){let t,e,r,i;return t=new Cy({props:{type:"blockedBy",labelText:"Before this",task:n[0],editableTask:n[3],allTasks:n[2],_onDescriptionKeyDown:n[24],accesskey:n[15]("b"),placeholder:"Search for tasks that the task being edited depends on..."}}),r=new Cy({props:{type:"blocking",labelText:"After this",task:n[0],editableTask:n[3],allTasks:n[2],_onDescriptionKeyDown:n[24],accesskey:n[15]("e"),placeholder:"Search for tasks that depend on this task being done..."}}),{c(){Or(t.$$.fragment),e=Ee(),Or(r.$$.fragment)},m(s,a){sr(t,s,a),De(s,e,a),sr(r,s,a),i=!0},p(s,a){let o={};a[0]&1&&(o.task=s[0]),a[0]&8&&(o.editableTask=s[3]),a[0]&4&&(o.allTasks=s[2]),a[0]&32768&&(o.accesskey=s[15]("b")),t.$set(o);let l={};a[0]&1&&(l.task=s[0]),a[0]&8&&(l.editableTask=s[3]),a[0]&4&&(l.allTasks=s[2]),a[0]&32768&&(l.accesskey=s[15]("e")),r.$set(l)},i(s){i||(pn(t.$$.fragment,s),pn(r.$$.fragment,s),i=!0)},o(s){An(t.$$.fragment,s),An(r.$$.fragment,s),i=!1},d(s){Pn(t,s),s&&ve(e),Pn(r,s)}}}function DU(n){let t,e,r,i=Ut("Description",n[15]("t"))+"",s,a,o,l,u,c,d,f,p,b,T,_,O,E,A,Y,q,se,H,Z,ye,we,V,K,C,J,$,oe,m,y,v=Ut("Only future dates:",n[15]("f"))+"",w,S,M,I,j,D,P,W,ce,be,Oe,He,Le,Yt,pr,vn,te,jt,it,us,mr,Mo,oa,la,Yn,Ri,Ro,Ao,Ai,Fr,Au,ua,Po,cs,jn,Xe,ca,Lr=n[22],xt=[];for(let L=0;L<Lr.length;L+=1)xt[L]=JD(ZD(n,Lr,L));function da(L){n[33](L)}let fa={editableTask:n[3],accesskey:n[15]("r")};n[10]!==void 0&&(fa.isRecurrenceValid=n[10]),E=new VD({props:fa}),ot.push(()=>on(E,"isRecurrenceValid",da));function hr(L){n[34](L)}function Cf(L){n[35](L)}let No={id:"due",dateSymbol:n[18],forwardOnly:n[3].forwardOnly,accesskey:n[15]("d")};n[3].dueDate!==void 0&&(No.date=n[3].dueDate),n[7]!==void 0&&(No.isDateValid=n[7]),q=new Bs({props:No}),ot.push(()=>on(q,"date",hr)),ot.push(()=>on(q,"isDateValid",Cf));function h(L){n[36](L)}function g(L){n[37](L)}let k={id:"scheduled",dateSymbol:n[17],forwardOnly:n[3].forwardOnly,accesskey:n[15]("s")};n[3].scheduledDate!==void 0&&(k.date=n[3].scheduledDate),n[8]!==void 0&&(k.isDateValid=n[8]),ye=new Bs({props:k}),ot.push(()=>on(ye,"date",h)),ot.push(()=>on(ye,"isDateValid",g));function R(L){n[38](L)}function G(L){n[39](L)}let X={id:"start",dateSymbol:n[16],forwardOnly:n[3].forwardOnly,accesskey:n[15]("a")};n[3].startDate!==void 0&&(X.date=n[3].startDate),n[9]!==void 0&&(X.isDateValid=n[9]),C=new Bs({props:X}),ot.push(()=>on(C,"date",R)),ot.push(()=>on(C,"isDateValid",G));let _e=[SU,kU],ne=[];function Ce(L,he){return L[2].length>0&&L[14]?0:1}W=Ce(n,[-1,-1]),ce=ne[W]=_e[W](n);function ie(L){n[41](L)}let me={task:n[0],statusOptions:n[1],accesskey:n[15]("u")};n[3]!==void 0&&(me.editableTask=n[3]),Yt=new XD({props:me}),ot.push(()=>on(Yt,"editableTask",ie));function ze(L){n[42](L)}function Wn(L){n[43](L)}let Ot={id:"created",dateSymbol:n[20],forwardOnly:n[3].forwardOnly,accesskey:n[15]("c")};n[3].createdDate!==void 0&&(Ot.date=n[3].createdDate),n[5]!==void 0&&(Ot.isDateValid=n[5]),te=new Bs({props:Ot}),ot.push(()=>on(te,"date",ze)),ot.push(()=>on(te,"isDateValid",Wn));function ds(L){n[44](L)}function Pi(L){n[45](L)}let Io={id:"done",dateSymbol:n[21],forwardOnly:n[3].forwardOnly,accesskey:n[15]("x")};n[3].doneDate!==void 0&&(Io.date=n[3].doneDate),n[6]!==void 0&&(Io.isDateValid=n[6]),mr=new Bs({props:Io}),ot.push(()=>on(mr,"date",ds)),ot.push(()=>on(mr,"isDateValid",Pi));function Fo(L){n[46](L)}function Mf(L){n[47](L)}let Lo={id:"cancelled",dateSymbol:n[19],forwardOnly:n[3].forwardOnly,accesskey:n[15]("-")};return n[3].cancelledDate!==void 0&&(Lo.date=n[3].cancelledDate),n[4]!==void 0&&(Lo.isDateValid=n[4]),Yn=new Bs({props:Lo}),ot.push(()=>on(Yn,"date",Fo)),ot.push(()=>on(Yn,"isDateValid",Mf)),{c(){t=ue("form"),e=ue("section"),r=ue("label"),s=Ee(),a=ue("textarea"),l=Ee(),u=ue("section"),c=ue("label"),d=Ve("Priority"),p=Ee();for(let L=0;L<xt.length;L+=1)xt[L].c();b=Ee(),T=ue("hr"),_=Ee(),O=ue("section"),Or(E.$$.fragment),Y=Ee(),Or(q.$$.fragment),Z=Ee(),Or(ye.$$.fragment),K=Ee(),Or(C.$$.fragment),oe=Ee(),m=ue("div"),y=ue("label"),w=Ee(),S=ue("input"),I=Ee(),j=ue("hr"),D=Ee(),P=ue("section"),ce.c(),be=Ee(),Oe=ue("hr"),He=Ee(),Le=ue("section"),Or(Yt.$$.fragment),vn=Ee(),Or(te.$$.fragment),us=Ee(),Or(mr.$$.fragment),la=Ee(),Or(Yn.$$.fragment),Ao=Ee(),Ai=ue("section"),Fr=ue("button"),Au=Ve("Apply"),Po=Ee(),cs=ue("button"),cs.textContent="Cancel",B(r,"for","description"),B(a,"id","description"),B(a,"class","tasks-modal-description"),B(a,"placeholder","Take out the trash"),B(a,"accesskey",o=n[15]("t")),B(e,"class","tasks-modal-description-section"),B(c,"for",f="priority-"+n[3].priority),B(u,"class","tasks-modal-priority-section"),B(y,"for","forwardOnly"),B(S,"id","forwardOnly"),B(S,"type","checkbox"),B(S,"class","task-list-item-checkbox tasks-modal-checkbox"),B(S,"accesskey",M=n[15]("f")),B(m,"class","future-dates-only"),B(O,"class","tasks-modal-dates-section"),B(P,"class","tasks-modal-dependencies-section"),B(Le,"class","tasks-modal-dates-section"),Fr.disabled=ua=!n[13],B(Fr,"type","submit"),B(Fr,"class","mod-cta"),B(cs,"type","button"),B(Ai,"class","tasks-modal-button-section"),B(t,"class","tasks-modal")},m(L,he){De(L,t,he),z(t,e),z(e,r),r.innerHTML=i,z(e,s),z(e,a),fn(a,n[3].description),n[30](a),z(t,l),z(t,u),z(u,c),z(c,d),z(u,p);for(let gr=0;gr<xt.length;gr+=1)xt[gr]&&xt[gr].m(u,null);z(t,b),z(t,T),z(t,_),z(t,O),sr(E,O,null),z(O,Y),sr(q,O,null),z(O,Z),sr(ye,O,null),z(O,K),sr(C,O,null),z(O,oe),z(O,m),z(m,y),y.innerHTML=v,z(m,w),z(m,S),S.checked=n[3].forwardOnly,z(t,I),z(t,j),z(t,D),z(t,P),ne[W].m(P,null),z(t,be),z(t,Oe),z(t,He),z(t,Le),sr(Yt,Le,null),z(Le,vn),sr(te,Le,null),z(Le,us),sr(mr,Le,null),z(Le,la),sr(Yn,Le,null),z(t,Ao),z(t,Ai),z(Ai,Fr),z(Fr,Au),z(Ai,Po),z(Ai,cs),jn=!0,Xe||(ca=[je(a,"input",n[29]),je(a,"keydown",n[24]),je(a,"paste",n[25]),je(a,"drop",n[25]),je(S,"change",n[40]),je(cs,"click",n[23]),je(t,"submit",nD(n[26]))],Xe=!0)},p(L,he){if((!jn||he[0]&32768)&&i!==(i=Ut("Description",L[15]("t"))+"")&&(r.innerHTML=i),(!jn||he[0]&32768&&o!==(o=L[15]("t")))&&B(a,"accesskey",o),he[0]&8&&fn(a,L[3].description),(!jn||he[0]&8&&f!==(f="priority-"+L[3].priority))&&B(c,"for",f),he[0]&4229128){Lr=L[22];let $n;for($n=0;$n<Lr.length;$n+=1){let Tb=ZD(L,Lr,$n);xt[$n]?xt[$n].p(Tb,he):(xt[$n]=JD(Tb),xt[$n].c(),xt[$n].m(u,null))}for(;$n<xt.length;$n+=1)xt[$n].d(1);xt.length=Lr.length}let gr={};he[0]&8&&(gr.editableTask=L[3]),he[0]&32768&&(gr.accesskey=L[15]("r")),!A&&he[0]&1024&&(A=!0,gr.isRecurrenceValid=L[10],an(()=>A=!1)),E.$set(gr);let fs={};he[0]&8&&(fs.forwardOnly=L[3].forwardOnly),he[0]&32768&&(fs.accesskey=L[15]("d")),!se&&he[0]&8&&(se=!0,fs.date=L[3].dueDate,an(()=>se=!1)),!H&&he[0]&128&&(H=!0,fs.isDateValid=L[7],an(()=>H=!1)),q.$set(fs);let ps={};he[0]&8&&(ps.forwardOnly=L[3].forwardOnly),he[0]&32768&&(ps.accesskey=L[15]("s")),!we&&he[0]&8&&(we=!0,ps.date=L[3].scheduledDate,an(()=>we=!1)),!V&&he[0]&256&&(V=!0,ps.isDateValid=L[8],an(()=>V=!1)),ye.$set(ps);let ms={};he[0]&8&&(ms.forwardOnly=L[3].forwardOnly),he[0]&32768&&(ms.accesskey=L[15]("a")),!J&&he[0]&8&&(J=!0,ms.date=L[3].startDate,an(()=>J=!1)),!$&&he[0]&512&&($=!0,ms.isDateValid=L[9],an(()=>$=!1)),C.$set(ms),(!jn||he[0]&32768)&&v!==(v=Ut("Only future dates:",L[15]("f"))+"")&&(y.innerHTML=v),(!jn||he[0]&32768&&M!==(M=L[15]("f")))&&B(S,"accesskey",M),he[0]&8&&(S.checked=L[3].forwardOnly);let Rf=W;W=Ce(L,he),W===Rf?ne[W].p(L,he):(oD(),An(ne[Rf],1,1,()=>{ne[Rf]=null}),lD(),ce=ne[W],ce?ce.p(L,he):(ce=ne[W]=_e[W](L),ce.c()),pn(ce,1),ce.m(P,null));let Uo={};he[0]&1&&(Uo.task=L[0]),he[0]&2&&(Uo.statusOptions=L[1]),he[0]&32768&&(Uo.accesskey=L[15]("u")),!pr&&he[0]&8&&(pr=!0,Uo.editableTask=L[3],an(()=>pr=!1)),Yt.$set(Uo);let Yo={};he[0]&8&&(Yo.forwardOnly=L[3].forwardOnly),he[0]&32768&&(Yo.accesskey=L[15]("c")),!jt&&he[0]&8&&(jt=!0,Yo.date=L[3].createdDate,an(()=>jt=!1)),!it&&he[0]&32&&(it=!0,Yo.isDateValid=L[5],an(()=>it=!1)),te.$set(Yo);let jo={};he[0]&8&&(jo.forwardOnly=L[3].forwardOnly),he[0]&32768&&(jo.accesskey=L[15]("x")),!Mo&&he[0]&8&&(Mo=!0,jo.date=L[3].doneDate,an(()=>Mo=!1)),!oa&&he[0]&64&&(oa=!0,jo.isDateValid=L[6],an(()=>oa=!1)),mr.$set(jo);let Wo={};he[0]&8&&(Wo.forwardOnly=L[3].forwardOnly),he[0]&32768&&(Wo.accesskey=L[15]("-")),!Ri&&he[0]&8&&(Ri=!0,Wo.date=L[3].cancelledDate,an(()=>Ri=!1)),!Ro&&he[0]&16&&(Ro=!0,Wo.isDateValid=L[4],an(()=>Ro=!1)),Yn.$set(Wo),(!jn||he[0]&8192&&ua!==(ua=!L[13]))&&(Fr.disabled=ua)},i(L){jn||(pn(E.$$.fragment,L),pn(q.$$.fragment,L),pn(ye.$$.fragment,L),pn(C.$$.fragment,L),pn(ce),pn(Yt.$$.fragment,L),pn(te.$$.fragment,L),pn(mr.$$.fragment,L),pn(Yn.$$.fragment,L),jn=!0)},o(L){An(E.$$.fragment,L),An(q.$$.fragment,L),An(ye.$$.fragment,L),An(C.$$.fragment,L),An(ce),An(Yt.$$.fragment,L),An(te.$$.fragment,L),An(mr.$$.fragment,L),An(Yn.$$.fragment,L),jn=!1},d(L){L&&ve(t),n[30](null),Gs(xt,L),Pn(E),Pn(q),Pn(ye),Pn(C),ne[W].d(),Pn(Yt),Pn(te),Pn(mr),Pn(Yn),Xe=!1,Bt(ca)}}}function EU(n,t,e){let r,{task:i}=t,{onSubmit:s}=t,{statusOptions:a}=t,{allTasks:o}=t,{prioritySymbols:l,startDateSymbol:u,scheduledDateSymbol:c,dueDateSymbol:d,cancelledDateSymbol:f,createdDateSymbol:p,doneDateSymbol:b}=Er.tasksPluginEmoji.taskSerializer.symbols,T,_=ro.fromTask(i,o),O=!0,E=!0,A=!0,Y=!0,q=!0,se=!0,H=!0,Z=!0,ye=!0,we=!0,V=!1,K=[{value:"lowest",label:"Lowest",symbol:l.Lowest,accessKey:"o",accessKeyIndex:1},{value:"low",label:"Low",symbol:l.Low,accessKey:"l",accessKeyIndex:0},{value:"none",label:"Normal",symbol:l.None,accessKey:"n",accessKeyIndex:0},{value:"medium",label:"Medium",symbol:l.Medium,accessKey:"m",accessKeyIndex:0},{value:"high",label:"High",symbol:l.High,accessKey:"h",accessKeyIndex:0},{value:"highest",label:"Highest",symbol:l.Highest,accessKey:"i",accessKeyIndex:1}];yy(()=>{let{provideAccessKeys:te}=le();e(11,ye=te),e(14,V=!0),setTimeout(()=>{T.focus()},10)});let C=()=>{s([])},J=te=>{te.key==="Enter"&&!te.isComposing&&(te.preventDefault(),we&&oe())},$=()=>{setTimeout(()=>{e(3,_.description=_.description.replace(/[\r\n]+/g," "),_)},0)},oe=()=>uD(void 0,void 0,void 0,function*(){let te=yield _.applyEdits(i,o);s(te)}),m=[[]];function y(){_.description=this.value,e(3,_)}function v(te){ot[te?"unshift":"push"](()=>{T=te,e(12,T)})}function w(){_.priority=this.__value,e(3,_)}function S(te){Z=te,e(10,Z)}function M(te){n.$$.not_equal(_.dueDate,te)&&(_.dueDate=te,e(3,_))}function I(te){q=te,e(7,q)}function j(te){n.$$.not_equal(_.scheduledDate,te)&&(_.scheduledDate=te,e(3,_))}function D(te){se=te,e(8,se)}function P(te){n.$$.not_equal(_.startDate,te)&&(_.startDate=te,e(3,_))}function W(te){H=te,e(9,H)}function ce(){_.forwardOnly=this.checked,e(3,_)}function be(te){_=te,e(3,_)}function Oe(te){n.$$.not_equal(_.createdDate,te)&&(_.createdDate=te,e(3,_))}function He(te){A=te,e(5,A)}function Le(te){n.$$.not_equal(_.doneDate,te)&&(_.doneDate=te,e(3,_))}function Yt(te){Y=te,e(6,Y)}function pr(te){n.$$.not_equal(_.cancelledDate,te)&&(_.cancelledDate=te,e(3,_))}function vn(te){E=te,e(4,E)}return n.$$set=te=>{"task"in te&&e(0,i=te.task),"onSubmit"in te&&e(27,s=te.onSubmit),"statusOptions"in te&&e(1,a=te.statusOptions),"allTasks"in te&&e(2,o=te.allTasks)},n.$$.update=()=>{if(n.$$.dirty[0]&2048){e:e(15,r=te=>ye?te:null)}if(n.$$.dirty[0]&8){e:e(28,O=_.description.trim()!=="")}if(n.$$.dirty[0]&268437488){e:e(13,we=q&&Z&&se&&H&&O&&E&&A&&Y)}},[i,a,o,_,E,A,Y,q,se,H,Z,ye,T,we,V,r,u,c,d,f,p,b,K,C,J,$,oe,s,O,y,v,w,m,S,M,I,j,D,P,W,ce,be,Oe,He,Le,Yt,pr,vn]}var Iy=class extends rr{constructor(t){super(),Kr(this,t,EU,DU,zr,{task:0,onSubmit:27,statusOptions:1,allTasks:2},null,[-1,-1])}},eE=Iy;wi();Dr();var zi=class extends tE.Modal{constructor({app:e,task:r,onSubmit:i,allTasks:s}){super(e);this.task=r,this.allTasks=s,this.onSubmit=a=>{a.length&&i(a),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task"),this.modalEl.style.paddingBottom="0";let{contentEl:e}=this;this.contentEl.style.paddingBottom="0";let r=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new eE({target:e,props:{task:this.task,statusOptions:r,onSubmit:this.onSubmit,allTasks:this.allTasks}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let e=Be.getInstance().registeredStatuses;return Be.getInstance().bySymbol(this.task.status.symbol)===ge.EMPTY&&e.push(this.task.status),e}onClose(){let{contentEl:e}=this;e.empty()}};Gi();Dr();Kc();Nt();Gi();wi();rn();Mn();ja();ii();function xU(){let{setCreatedDate:n}=le();return n?window.moment():null}function OU(n){let{setCreatedDate:t}=le();if(!t||n.createdDate!==null)return!1;let e=n.description==="",r=!Fe.getInstance().isEmpty(),i=!Fe.getInstance().includedIn(n.description);return e||r&&i}var Sd=({line:n,path:t})=>{var f,p;let e=pe.parseTaskSignifiers(n,Lt.fromUnknownPosition(new mt(t)),Ft.fromPath(t)),r=xU();if(e!==null)return OU(e)?new pe(de(U({},e),{createdDate:r})):e;let i=n.match(fe.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",n),new pe({status:ge.TODO,description:"",taskLocation:Lt.fromUnknownPosition(new mt(t)),indentation:"",listMarker:"-",priority:"3",createdDate:r,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,onCompletion:"",dependsOn:[],id:"",blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(f=i[2])!=null?f:"-",o=(p=i[4])!=null?p:" ",l=Be.getInstance().bySymbolOrCreate(o),u=i[5],c=n.match(fe.blockLinkRegex),d=c!==null?c[0]:"";return d!==""&&(u=u.replace(fe.blockLinkRegex,"")),new pe({status:l,description:u,taskLocation:Lt.fromUnknownPosition(new mt(t)),indentation:s,listMarker:a,blockLink:d,priority:"3",createdDate:r,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,onCompletion:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1,id:"",dependsOn:[]})};var nE=(n,t,e,r,i)=>{var f;if(n)return e instanceof Fy.MarkdownView;if(!(e instanceof Fy.MarkdownView))return;let s=(f=e.file)==null?void 0:f.path;if(s===void 0)return;let o=t.getCursor().line,l=t.getLine(o),u=Sd({line:l,path:s}),c=p=>{let b=Ft.removeInferredStatusIfNeeded(u,p).map(T=>T.toFileLineString()).join(` +${l}`);return}break}s++}}return i}Nc();ja();Vc();Nt();Jc();Cn();var ro=class{constructor(t){this.addGlobalFilterOnSave=t.addGlobalFilterOnSave,this.originalBlocking=t.originalBlocking,this.description=t.description,this.status=t.status,this.priority=t.priority,this.onCompletion=t.onCompletion,this.recurrenceRule=t.recurrenceRule,this.createdDate=t.createdDate,this.startDate=t.startDate,this.scheduledDate=t.scheduledDate,this.dueDate=t.dueDate,this.doneDate=t.doneDate,this.cancelledDate=t.cancelledDate,this.forwardOnly=t.forwardOnly,this.blockedBy=t.blockedBy,this.blocking=t.blocking}static fromTask(t,e){let r=Fe.getInstance().removeAsWordFrom(t.description),i=r!=t.description||!Fe.getInstance().includedIn(t.description),s="none";t.priority==="5"?s="lowest":t.priority==="4"?s="low":t.priority==="2"?s="medium":t.priority==="1"?s="high":t.priority==="0"&&(s="highest");let a=[];for(let l of t.dependsOn){let u=e.find(c=>c.id===l);!u||a.push(u)}let o=e.filter(l=>l.dependsOn.includes(t.id));return new ro({addGlobalFilterOnSave:i,originalBlocking:o,description:r,status:t.status,priority:s,recurrenceRule:t.recurrence?t.recurrence.toText():"",onCompletion:t.onCompletion,createdDate:t.created.formatAsDate(),startDate:t.start.formatAsDate(),scheduledDate:t.scheduled.formatAsDate(),dueDate:t.due.formatAsDate(),doneDate:t.done.formatAsDate(),cancelledDate:t.cancelled.formatAsDate(),forwardOnly:!0,blockedBy:a,blocking:o})}applyEdits(t,e){return F(this,null,function*(){let r=this.description.trim();this.addGlobalFilterOnSave&&(r=Fe.getInstance().prependTo(r));let i=Os(this.startDate,this.forwardOnly),s=Os(this.scheduledDate,this.forwardOnly),a=Os(this.dueDate,this.forwardOnly),o=Os(this.cancelledDate,this.forwardOnly),l=Os(this.createdDate,this.forwardOnly),u=Os(this.doneDate,this.forwardOnly),c=null;this.recurrenceRule&&(c=Dt.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new Xn({startDate:i,scheduledDate:s,dueDate:a})}));let d=this.onCompletion,f=[];for(let E of this.blockedBy){let A=yield hU(E,e);f.push(A)}let p=t.id,b=[],T=[];(this.blocking.toString()!==this.originalBlocking.toString()||this.blocking.length!==0)&&(t.id===""&&(p=ru(e.filter(E=>E.id!=="").map(E=>E.id))),b=this.originalBlocking.filter(E=>!this.blocking.includes(E)),T=this.blocking.filter(E=>!this.originalBlocking.includes(E)));let _=new pe(de(U({},t),{description:r,status:t.status,priority:Rn.priorityValue(this.priority),onCompletion:d,recurrence:c,startDate:i,scheduledDate:s,dueDate:a,doneDate:u,createdDate:l,cancelledDate:o,dependsOn:f.map(E=>E.id),id:p}));for(let E of b){let A=OS(E,_);yield Nn({originalTask:E,newTasks:A})}for(let E of T){let A=xS(E,_);yield Nn({originalTask:E,newTasks:A})}let O=this.inferTodaysDate(this.status.type,u,o);return _.handleNewStatusWithRecurrenceInUsersOrder(this.status,O)})}inferTodaysDate(t,e,r){return t==="DONE"&&e!==null?e:t==="CANCELLED"&&r!==null?r:window.moment()}parseAndValidateRecurrence(){var e;if(!this.recurrenceRule)return{parsedRecurrence:"<i>not recurring</>",isRecurrenceValid:!0};let t=(e=Dt.fromText({recurrenceRuleText:this.recurrenceRule,occurrence:new Xn({startDate:null,scheduledDate:null,dueDate:null})}))==null?void 0:e.toText();return t?this.startDate||this.scheduledDate||this.dueDate?{parsedRecurrence:t,isRecurrenceValid:!0}:{parsedRecurrence:"<i>due, scheduled or start date required</i>",isRecurrenceValid:!1}:{parsedRecurrence:"<i>invalid recurrence rule</i>",isRecurrenceValid:!1}}};function hU(n,t){return F(this,null,function*(){if(n.id!=="")return n;let e=t.filter(i=>i.id!==""),r=Zc(n,e.map(i=>i.id));return yield Nn({originalTask:n,newTasks:r}),r})}Bt();function gU(n){let t,e=Ut("Recurs",n[2])+"",r,i,s,a,o,l,u,c,d;return{c(){t=ue("label"),r=Ee(),i=ue("input"),s=Ee(),a=ue("code"),o=Ve(n[4]),l=Ee(),u=new Xa(!1),B(t,"for","recurrence"),B(i,"id","recurrence"),B(i,"type","text"),B(i,"class","tasks-modal-date-input"),B(i,"placeholder","Try 'every day when done'"),B(i,"accesskey",n[2]),Si(i,"tasks-modal-error",!n[1]),u.a=null,B(a,"class","tasks-modal-parsed-date")},m(f,p){De(f,t,p),t.innerHTML=e,De(f,r,p),De(f,i,p),fn(i,n[0].recurrenceRule),De(f,s,p),De(f,a,p),z(a,o),z(a,l),u.m(n[3],a),c||(d=je(i,"input",n[5]),c=!0)},p(f,[p]){p&4&&e!==(e=Ut("Recurs",f[2])+"")&&(t.innerHTML=e),p&4&&B(i,"accesskey",f[2]),p&1&&i.value!==f[0].recurrenceRule&&fn(i,f[0].recurrenceRule),p&2&&Si(i,"tasks-modal-error",!f[1]),p&8&&u.p(f[3])},i:tt,o:tt,d(f){f&&ve(t),f&&ve(r),f&&ve(i),f&&ve(s),f&&ve(a),c=!1,d()}}}function yU(n,t,e){let{editableTask:r}=t,{isRecurrenceValid:i}=t,{accesskey:s}=t,a,{recurrenceSymbol:o}=Er.tasksPluginEmoji.taskSerializer.symbols;function l(){r.recurrenceRule=this.value,e(0,r)}return n.$$set=u=>{"editableTask"in u&&e(0,r=u.editableTask),"isRecurrenceValid"in u&&e(1,i=u.isRecurrenceValid),"accesskey"in u&&e(2,s=u.accesskey)},n.$$.update=()=>{if(n.$$.dirty&1){e:e(3,{parsedRecurrence:a,isRecurrenceValid:i}=r.parseAndValidateRecurrence(),a,(e(1,i),e(0,r)))}},[r,i,s,a,o,l]}var Py=class extends rr{constructor(t){super(),Kr(this,t,yU,gU,zr,{editableTask:0,isRecurrenceValid:1,accesskey:2})}},VD=Py;function zD(n,t,e){let r=n.slice();return r[7]=t[e],r}function KD(n){let t,e=n[7].name+"",r,i,s=n[7].symbol+"",a,o,l;return{c(){t=ue("option"),r=Ve(e),i=Ve(" ["),a=Ve(s),o=Ve("]"),t.__value=l=n[7].symbol,t.value=t.__value},m(u,c){De(u,t,c),z(t,r),z(t,i),z(t,a),z(t,o)},p(u,c){c&1&&e!==(e=u[7].name+"")&&ir(r,e),c&1&&s!==(s=u[7].symbol+"")&&ir(a,s),c&1&&l!==(l=u[7].symbol)&&(t.__value=l,t.value=t.__value)},d(u){u&&ve(t)}}}function bU(n){let t,e=Ut("Status",n[1])+"",r,i,s,a,o=n[0],l=[];for(let u=0;u<o.length;u+=1)l[u]=KD(zD(n,o,u));return{c(){t=ue("label"),r=Ee(),i=ue("select");for(let u=0;u<l.length;u+=1)l[u].c();B(t,"for","status"),B(i,"id","status-type"),B(i,"class","status-editor-status-selector"),B(i,"accesskey",n[1]),n[2]===void 0&&Hs(()=>n[6].call(i))},m(u,c){De(u,t,c),t.innerHTML=e,De(u,r,c),De(u,i,c);for(let d=0;d<l.length;d+=1)l[d]&&l[d].m(i,null);gy(i,n[2],!0),s||(a=[je(i,"change",n[6]),je(i,"change",n[3])],s=!0)},p(u,[c]){if(c&2&&e!==(e=Ut("Status",u[1])+"")&&(t.innerHTML=e),c&1){o=u[0];let d;for(d=0;d<o.length;d+=1){let f=zD(u,o,d);l[d]?l[d].p(f,c):(l[d]=KD(f),l[d].c(),l[d].m(i,null))}for(;d<l.length;d+=1)l[d].d(1);l.length=o.length}c&2&&B(i,"accesskey",u[1]),c&5&&gy(i,u[2])},i:tt,o:tt,d(u){u&&ve(t),u&&ve(r),u&&ve(i),Gs(l,u),s=!1,Vt(a)}}}function QD(n,t,e){let r=n==="";return t&&r?e.formatAsDate():!t&&!r?"":n}function TU(n,t,e){let{task:r}=t,{editableTask:i}=t,{statusOptions:s}=t,{accesskey:a}=t,o=r.status.symbol,l=()=>{let c=s.find(f=>f.symbol===o);if(c)e(4,i.status=c,i);else{console.log(`Error in EditTask: cannot find status with symbol ${o}`);return}let d=r.handleNewStatus(c).pop();d&&(e(4,i.doneDate=QD(i.doneDate,c.isCompleted(),d.done),i),e(4,i.cancelledDate=QD(i.cancelledDate,c.isCancelled(),d.cancelled),i))};function u(){o=iD(this),e(2,o),e(0,s)}return n.$$set=c=>{"task"in c&&e(5,r=c.task),"editableTask"in c&&e(4,i=c.editableTask),"statusOptions"in c&&e(0,s=c.statusOptions),"accesskey"in c&&e(1,a=c.accesskey)},[s,a,o,l,i,r,u]}var Ny=class extends rr{constructor(t){super(),Kr(this,t,TU,bU,zr,{task:5,editableTask:4,statusOptions:0,accesskey:1})}},XD=Ny;function ZD(n,t,e){let r=n.slice();return r[49]=t[e].value,r[50]=t[e].label,r[51]=t[e].symbol,r[52]=t[e].accessKey,r[53]=t[e].accessKeyIndex,r}function _U(n){let t,e=n[50]+"",r;return{c(){t=ue("span"),r=Ve(e)},m(i,s){De(i,t,s),z(t,r)},p:tt,d(i){i&&ve(t)}}}function vU(n){let t,e=n[50].substring(0,n[53])+"",r,i,s=n[50].substring(n[53],n[53]+1)+"",a,o,l=n[50].substring(n[53]+1)+"",u;return{c(){t=ue("span"),r=Ve(e),i=ue("span"),a=Ve(s),o=ue("span"),u=Ve(l),B(i,"class","accesskey")},m(c,d){De(c,t,d),z(t,r),De(c,i,d),z(i,a),De(c,o,d),z(o,u)},p:tt,d(c){c&&ve(t),c&&ve(i),c&&ve(o)}}}function wU(n){let t,e=n[51]+"",r;return{c(){t=ue("span"),r=Ve(e)},m(i,s){De(i,t,s),z(t,r)},p:tt,d(i){i&&ve(t)}}}function JD(n){let t,e,r,i,s,a,o,l,u=n[51]&&n[51].charCodeAt(0)>=256,c,d,f,p,b;function T(A,Y){return A[11]?vU:_U}let _=T(n,[-1,-1]),O=_(n),E=u&&wU(n);return f=rD(n[32][0]),{c(){t=ue("div"),e=ue("input"),a=Ee(),o=ue("label"),O.c(),l=Ee(),E&&E.c(),d=Ee(),B(e,"type","radio"),B(e,"id",r="priority-"+n[49]),e.__value=i=n[49],e.value=e.__value,B(e,"accesskey",s=n[15](n[52])),B(o,"for",c="priority-"+n[49]),B(t,"class","task-modal-priority-option-container"),f.p(e)},m(A,Y){De(A,t,Y),z(t,e),e.checked=e.__value===n[3].priority,z(t,a),z(t,o),O.m(o,null),z(o,l),E&&E.m(o,null),z(t,d),p||(b=je(e,"change",n[31]),p=!0)},p(A,Y){Y[0]&32768&&s!==(s=A[15](A[52]))&&B(e,"accesskey",s),Y[0]&8&&(e.checked=e.__value===A[3].priority),_===(_=T(A,Y))&&O?O.p(A,Y):(O.d(1),O=_(A),O&&(O.c(),O.m(o,l))),u&&E.p(A,Y)},d(A){A&&ve(t),O.d(),E&&E.d(),f.r(),p=!1,b()}}}function kU(n){let t;return{c(){t=ue("div"),t.innerHTML="<i>Blocking and blocked by fields are disabled when vault tasks is empty</i>"},m(e,r){De(e,t,r)},p:tt,i:tt,o:tt,d(e){e&&ve(t)}}}function SU(n){let t,e,r,i;return t=new Cy({props:{type:"blockedBy",labelText:"Before this",task:n[0],editableTask:n[3],allTasks:n[2],_onDescriptionKeyDown:n[24],accesskey:n[15]("b"),placeholder:"Search for tasks that the task being edited depends on..."}}),r=new Cy({props:{type:"blocking",labelText:"After this",task:n[0],editableTask:n[3],allTasks:n[2],_onDescriptionKeyDown:n[24],accesskey:n[15]("e"),placeholder:"Search for tasks that depend on this task being done..."}}),{c(){Or(t.$$.fragment),e=Ee(),Or(r.$$.fragment)},m(s,a){sr(t,s,a),De(s,e,a),sr(r,s,a),i=!0},p(s,a){let o={};a[0]&1&&(o.task=s[0]),a[0]&8&&(o.editableTask=s[3]),a[0]&4&&(o.allTasks=s[2]),a[0]&32768&&(o.accesskey=s[15]("b")),t.$set(o);let l={};a[0]&1&&(l.task=s[0]),a[0]&8&&(l.editableTask=s[3]),a[0]&4&&(l.allTasks=s[2]),a[0]&32768&&(l.accesskey=s[15]("e")),r.$set(l)},i(s){i||(pn(t.$$.fragment,s),pn(r.$$.fragment,s),i=!0)},o(s){An(t.$$.fragment,s),An(r.$$.fragment,s),i=!1},d(s){Pn(t,s),s&&ve(e),Pn(r,s)}}}function DU(n){let t,e,r,i=Ut("Description",n[15]("t"))+"",s,a,o,l,u,c,d,f,p,b,T,_,O,E,A,Y,q,se,H,Z,ye,we,V,K,C,J,$,le,m,y,v=Ut("Only future dates:",n[15]("f"))+"",w,S,M,I,j,D,P,W,ce,be,Oe,He,Le,Yt,pr,vn,te,jt,it,us,mr,Mo,oa,la,Yn,Ri,Ro,Ao,Ai,Fr,Au,ua,Po,cs,jn,Xe,ca,Lr=n[22],xt=[];for(let L=0;L<Lr.length;L+=1)xt[L]=JD(ZD(n,Lr,L));function da(L){n[33](L)}let fa={editableTask:n[3],accesskey:n[15]("r")};n[10]!==void 0&&(fa.isRecurrenceValid=n[10]),E=new VD({props:fa}),ot.push(()=>on(E,"isRecurrenceValid",da));function hr(L){n[34](L)}function Cf(L){n[35](L)}let No={id:"due",dateSymbol:n[18],forwardOnly:n[3].forwardOnly,accesskey:n[15]("d")};n[3].dueDate!==void 0&&(No.date=n[3].dueDate),n[7]!==void 0&&(No.isDateValid=n[7]),q=new Bs({props:No}),ot.push(()=>on(q,"date",hr)),ot.push(()=>on(q,"isDateValid",Cf));function h(L){n[36](L)}function g(L){n[37](L)}let k={id:"scheduled",dateSymbol:n[17],forwardOnly:n[3].forwardOnly,accesskey:n[15]("s")};n[3].scheduledDate!==void 0&&(k.date=n[3].scheduledDate),n[8]!==void 0&&(k.isDateValid=n[8]),ye=new Bs({props:k}),ot.push(()=>on(ye,"date",h)),ot.push(()=>on(ye,"isDateValid",g));function R(L){n[38](L)}function G(L){n[39](L)}let X={id:"start",dateSymbol:n[16],forwardOnly:n[3].forwardOnly,accesskey:n[15]("a")};n[3].startDate!==void 0&&(X.date=n[3].startDate),n[9]!==void 0&&(X.isDateValid=n[9]),C=new Bs({props:X}),ot.push(()=>on(C,"date",R)),ot.push(()=>on(C,"isDateValid",G));let _e=[SU,kU],ne=[];function Ce(L,he){return L[2].length>0&&L[14]?0:1}W=Ce(n,[-1,-1]),ce=ne[W]=_e[W](n);function ie(L){n[41](L)}let me={task:n[0],statusOptions:n[1],accesskey:n[15]("u")};n[3]!==void 0&&(me.editableTask=n[3]),Yt=new XD({props:me}),ot.push(()=>on(Yt,"editableTask",ie));function ze(L){n[42](L)}function Wn(L){n[43](L)}let Ot={id:"created",dateSymbol:n[20],forwardOnly:n[3].forwardOnly,accesskey:n[15]("c")};n[3].createdDate!==void 0&&(Ot.date=n[3].createdDate),n[5]!==void 0&&(Ot.isDateValid=n[5]),te=new Bs({props:Ot}),ot.push(()=>on(te,"date",ze)),ot.push(()=>on(te,"isDateValid",Wn));function ds(L){n[44](L)}function Pi(L){n[45](L)}let Io={id:"done",dateSymbol:n[21],forwardOnly:n[3].forwardOnly,accesskey:n[15]("x")};n[3].doneDate!==void 0&&(Io.date=n[3].doneDate),n[6]!==void 0&&(Io.isDateValid=n[6]),mr=new Bs({props:Io}),ot.push(()=>on(mr,"date",ds)),ot.push(()=>on(mr,"isDateValid",Pi));function Fo(L){n[46](L)}function Mf(L){n[47](L)}let Lo={id:"cancelled",dateSymbol:n[19],forwardOnly:n[3].forwardOnly,accesskey:n[15]("-")};return n[3].cancelledDate!==void 0&&(Lo.date=n[3].cancelledDate),n[4]!==void 0&&(Lo.isDateValid=n[4]),Yn=new Bs({props:Lo}),ot.push(()=>on(Yn,"date",Fo)),ot.push(()=>on(Yn,"isDateValid",Mf)),{c(){t=ue("form"),e=ue("section"),r=ue("label"),s=Ee(),a=ue("textarea"),l=Ee(),u=ue("section"),c=ue("label"),d=Ve("Priority"),p=Ee();for(let L=0;L<xt.length;L+=1)xt[L].c();b=Ee(),T=ue("hr"),_=Ee(),O=ue("section"),Or(E.$$.fragment),Y=Ee(),Or(q.$$.fragment),Z=Ee(),Or(ye.$$.fragment),K=Ee(),Or(C.$$.fragment),le=Ee(),m=ue("div"),y=ue("label"),w=Ee(),S=ue("input"),I=Ee(),j=ue("hr"),D=Ee(),P=ue("section"),ce.c(),be=Ee(),Oe=ue("hr"),He=Ee(),Le=ue("section"),Or(Yt.$$.fragment),vn=Ee(),Or(te.$$.fragment),us=Ee(),Or(mr.$$.fragment),la=Ee(),Or(Yn.$$.fragment),Ao=Ee(),Ai=ue("section"),Fr=ue("button"),Au=Ve("Apply"),Po=Ee(),cs=ue("button"),cs.textContent="Cancel",B(r,"for","description"),B(a,"id","description"),B(a,"class","tasks-modal-description"),B(a,"placeholder","Take out the trash"),B(a,"accesskey",o=n[15]("t")),B(e,"class","tasks-modal-description-section"),B(c,"for",f="priority-"+n[3].priority),B(u,"class","tasks-modal-priority-section"),B(y,"for","forwardOnly"),B(S,"id","forwardOnly"),B(S,"type","checkbox"),B(S,"class","task-list-item-checkbox tasks-modal-checkbox"),B(S,"accesskey",M=n[15]("f")),B(m,"class","future-dates-only"),B(O,"class","tasks-modal-dates-section"),B(P,"class","tasks-modal-dependencies-section"),B(Le,"class","tasks-modal-dates-section"),Fr.disabled=ua=!n[13],B(Fr,"type","submit"),B(Fr,"class","mod-cta"),B(cs,"type","button"),B(Ai,"class","tasks-modal-button-section"),B(t,"class","tasks-modal")},m(L,he){De(L,t,he),z(t,e),z(e,r),r.innerHTML=i,z(e,s),z(e,a),fn(a,n[3].description),n[30](a),z(t,l),z(t,u),z(u,c),z(c,d),z(u,p);for(let gr=0;gr<xt.length;gr+=1)xt[gr]&&xt[gr].m(u,null);z(t,b),z(t,T),z(t,_),z(t,O),sr(E,O,null),z(O,Y),sr(q,O,null),z(O,Z),sr(ye,O,null),z(O,K),sr(C,O,null),z(O,le),z(O,m),z(m,y),y.innerHTML=v,z(m,w),z(m,S),S.checked=n[3].forwardOnly,z(t,I),z(t,j),z(t,D),z(t,P),ne[W].m(P,null),z(t,be),z(t,Oe),z(t,He),z(t,Le),sr(Yt,Le,null),z(Le,vn),sr(te,Le,null),z(Le,us),sr(mr,Le,null),z(Le,la),sr(Yn,Le,null),z(t,Ao),z(t,Ai),z(Ai,Fr),z(Fr,Au),z(Ai,Po),z(Ai,cs),jn=!0,Xe||(ca=[je(a,"input",n[29]),je(a,"keydown",n[24]),je(a,"paste",n[25]),je(a,"drop",n[25]),je(S,"change",n[40]),je(cs,"click",n[23]),je(t,"submit",nD(n[26]))],Xe=!0)},p(L,he){if((!jn||he[0]&32768)&&i!==(i=Ut("Description",L[15]("t"))+"")&&(r.innerHTML=i),(!jn||he[0]&32768&&o!==(o=L[15]("t")))&&B(a,"accesskey",o),he[0]&8&&fn(a,L[3].description),(!jn||he[0]&8&&f!==(f="priority-"+L[3].priority))&&B(c,"for",f),he[0]&4229128){Lr=L[22];let $n;for($n=0;$n<Lr.length;$n+=1){let Tb=ZD(L,Lr,$n);xt[$n]?xt[$n].p(Tb,he):(xt[$n]=JD(Tb),xt[$n].c(),xt[$n].m(u,null))}for(;$n<xt.length;$n+=1)xt[$n].d(1);xt.length=Lr.length}let gr={};he[0]&8&&(gr.editableTask=L[3]),he[0]&32768&&(gr.accesskey=L[15]("r")),!A&&he[0]&1024&&(A=!0,gr.isRecurrenceValid=L[10],an(()=>A=!1)),E.$set(gr);let fs={};he[0]&8&&(fs.forwardOnly=L[3].forwardOnly),he[0]&32768&&(fs.accesskey=L[15]("d")),!se&&he[0]&8&&(se=!0,fs.date=L[3].dueDate,an(()=>se=!1)),!H&&he[0]&128&&(H=!0,fs.isDateValid=L[7],an(()=>H=!1)),q.$set(fs);let ps={};he[0]&8&&(ps.forwardOnly=L[3].forwardOnly),he[0]&32768&&(ps.accesskey=L[15]("s")),!we&&he[0]&8&&(we=!0,ps.date=L[3].scheduledDate,an(()=>we=!1)),!V&&he[0]&256&&(V=!0,ps.isDateValid=L[8],an(()=>V=!1)),ye.$set(ps);let ms={};he[0]&8&&(ms.forwardOnly=L[3].forwardOnly),he[0]&32768&&(ms.accesskey=L[15]("a")),!J&&he[0]&8&&(J=!0,ms.date=L[3].startDate,an(()=>J=!1)),!$&&he[0]&512&&($=!0,ms.isDateValid=L[9],an(()=>$=!1)),C.$set(ms),(!jn||he[0]&32768)&&v!==(v=Ut("Only future dates:",L[15]("f"))+"")&&(y.innerHTML=v),(!jn||he[0]&32768&&M!==(M=L[15]("f")))&&B(S,"accesskey",M),he[0]&8&&(S.checked=L[3].forwardOnly);let Rf=W;W=Ce(L,he),W===Rf?ne[W].p(L,he):(oD(),An(ne[Rf],1,1,()=>{ne[Rf]=null}),lD(),ce=ne[W],ce?ce.p(L,he):(ce=ne[W]=_e[W](L),ce.c()),pn(ce,1),ce.m(P,null));let Uo={};he[0]&1&&(Uo.task=L[0]),he[0]&2&&(Uo.statusOptions=L[1]),he[0]&32768&&(Uo.accesskey=L[15]("u")),!pr&&he[0]&8&&(pr=!0,Uo.editableTask=L[3],an(()=>pr=!1)),Yt.$set(Uo);let Yo={};he[0]&8&&(Yo.forwardOnly=L[3].forwardOnly),he[0]&32768&&(Yo.accesskey=L[15]("c")),!jt&&he[0]&8&&(jt=!0,Yo.date=L[3].createdDate,an(()=>jt=!1)),!it&&he[0]&32&&(it=!0,Yo.isDateValid=L[5],an(()=>it=!1)),te.$set(Yo);let jo={};he[0]&8&&(jo.forwardOnly=L[3].forwardOnly),he[0]&32768&&(jo.accesskey=L[15]("x")),!Mo&&he[0]&8&&(Mo=!0,jo.date=L[3].doneDate,an(()=>Mo=!1)),!oa&&he[0]&64&&(oa=!0,jo.isDateValid=L[6],an(()=>oa=!1)),mr.$set(jo);let Wo={};he[0]&8&&(Wo.forwardOnly=L[3].forwardOnly),he[0]&32768&&(Wo.accesskey=L[15]("-")),!Ri&&he[0]&8&&(Ri=!0,Wo.date=L[3].cancelledDate,an(()=>Ri=!1)),!Ro&&he[0]&16&&(Ro=!0,Wo.isDateValid=L[4],an(()=>Ro=!1)),Yn.$set(Wo),(!jn||he[0]&8192&&ua!==(ua=!L[13]))&&(Fr.disabled=ua)},i(L){jn||(pn(E.$$.fragment,L),pn(q.$$.fragment,L),pn(ye.$$.fragment,L),pn(C.$$.fragment,L),pn(ce),pn(Yt.$$.fragment,L),pn(te.$$.fragment,L),pn(mr.$$.fragment,L),pn(Yn.$$.fragment,L),jn=!0)},o(L){An(E.$$.fragment,L),An(q.$$.fragment,L),An(ye.$$.fragment,L),An(C.$$.fragment,L),An(ce),An(Yt.$$.fragment,L),An(te.$$.fragment,L),An(mr.$$.fragment,L),An(Yn.$$.fragment,L),jn=!1},d(L){L&&ve(t),n[30](null),Gs(xt,L),Pn(E),Pn(q),Pn(ye),Pn(C),ne[W].d(),Pn(Yt),Pn(te),Pn(mr),Pn(Yn),Xe=!1,Vt(ca)}}}function EU(n,t,e){let r,{task:i}=t,{onSubmit:s}=t,{statusOptions:a}=t,{allTasks:o}=t,{prioritySymbols:l,startDateSymbol:u,scheduledDateSymbol:c,dueDateSymbol:d,cancelledDateSymbol:f,createdDateSymbol:p,doneDateSymbol:b}=Er.tasksPluginEmoji.taskSerializer.symbols,T,_=ro.fromTask(i,o),O=!0,E=!0,A=!0,Y=!0,q=!0,se=!0,H=!0,Z=!0,ye=!0,we=!0,V=!1,K=[{value:"lowest",label:"Lowest",symbol:l.Lowest,accessKey:"o",accessKeyIndex:1},{value:"low",label:"Low",symbol:l.Low,accessKey:"l",accessKeyIndex:0},{value:"none",label:"Normal",symbol:l.None,accessKey:"n",accessKeyIndex:0},{value:"medium",label:"Medium",symbol:l.Medium,accessKey:"m",accessKeyIndex:0},{value:"high",label:"High",symbol:l.High,accessKey:"h",accessKeyIndex:0},{value:"highest",label:"Highest",symbol:l.Highest,accessKey:"i",accessKeyIndex:1}];yy(()=>{let{provideAccessKeys:te}=oe();e(11,ye=te),e(14,V=!0),setTimeout(()=>{T.focus()},10)});let C=()=>{s([])},J=te=>{te.key==="Enter"&&!te.isComposing&&(te.preventDefault(),we&&le())},$=()=>{setTimeout(()=>{e(3,_.description=_.description.replace(/[\r\n]+/g," "),_)},0)},le=()=>uD(void 0,void 0,void 0,function*(){let te=yield _.applyEdits(i,o);s(te)}),m=[[]];function y(){_.description=this.value,e(3,_)}function v(te){ot[te?"unshift":"push"](()=>{T=te,e(12,T)})}function w(){_.priority=this.__value,e(3,_)}function S(te){Z=te,e(10,Z)}function M(te){n.$$.not_equal(_.dueDate,te)&&(_.dueDate=te,e(3,_))}function I(te){q=te,e(7,q)}function j(te){n.$$.not_equal(_.scheduledDate,te)&&(_.scheduledDate=te,e(3,_))}function D(te){se=te,e(8,se)}function P(te){n.$$.not_equal(_.startDate,te)&&(_.startDate=te,e(3,_))}function W(te){H=te,e(9,H)}function ce(){_.forwardOnly=this.checked,e(3,_)}function be(te){_=te,e(3,_)}function Oe(te){n.$$.not_equal(_.createdDate,te)&&(_.createdDate=te,e(3,_))}function He(te){A=te,e(5,A)}function Le(te){n.$$.not_equal(_.doneDate,te)&&(_.doneDate=te,e(3,_))}function Yt(te){Y=te,e(6,Y)}function pr(te){n.$$.not_equal(_.cancelledDate,te)&&(_.cancelledDate=te,e(3,_))}function vn(te){E=te,e(4,E)}return n.$$set=te=>{"task"in te&&e(0,i=te.task),"onSubmit"in te&&e(27,s=te.onSubmit),"statusOptions"in te&&e(1,a=te.statusOptions),"allTasks"in te&&e(2,o=te.allTasks)},n.$$.update=()=>{if(n.$$.dirty[0]&2048){e:e(15,r=te=>ye?te:null)}if(n.$$.dirty[0]&8){e:e(28,O=_.description.trim()!=="")}if(n.$$.dirty[0]&268437488){e:e(13,we=q&&Z&&se&&H&&O&&E&&A&&Y)}},[i,a,o,_,E,A,Y,q,se,H,Z,ye,T,we,V,r,u,c,d,f,p,b,K,C,J,$,le,s,O,y,v,w,m,S,M,I,j,D,P,W,ce,be,Oe,He,Le,Yt,pr,vn]}var Iy=class extends rr{constructor(t){super(),Kr(this,t,EU,DU,zr,{task:0,onSubmit:27,statusOptions:1,allTasks:2},null,[-1,-1])}},eE=Iy;wi();Dr();var zi=class extends tE.Modal{constructor({app:e,task:r,onSubmit:i,allTasks:s}){super(e);this.task=r,this.allTasks=s,this.onSubmit=a=>{a.length&&i(a),this.close()}}onOpen(){this.titleEl.setText("Create or edit Task"),this.modalEl.style.paddingBottom="0";let{contentEl:e}=this;this.contentEl.style.paddingBottom="0";let r=this.getKnownStatusesAndCurrentTaskStatusIfNotKnown();new eE({target:e,props:{task:this.task,statusOptions:r,onSubmit:this.onSubmit,allTasks:this.allTasks}})}getKnownStatusesAndCurrentTaskStatusIfNotKnown(){let e=Be.getInstance().registeredStatuses;return Be.getInstance().bySymbol(this.task.status.symbol)===ge.EMPTY&&e.push(this.task.status),e}onClose(){let{contentEl:e}=this;e.empty()}};Gi();Dr();Kc();Nt();Gi();wi();Bt();Mn();ja();ii();function xU(){let{setCreatedDate:n}=oe();return n?window.moment():null}function OU(n){let{setCreatedDate:t}=oe();if(!t||n.createdDate!==null)return!1;let e=n.description==="",r=!Fe.getInstance().isEmpty(),i=!Fe.getInstance().includedIn(n.description);return e||r&&i}var Sd=({line:n,path:t})=>{var f,p;let e=pe.parseTaskSignifiers(n,Lt.fromUnknownPosition(new mt(t)),Ft.fromPath(t)),r=xU();if(e!==null)return OU(e)?new pe(de(U({},e),{createdDate:r})):e;let i=n.match(fe.nonTaskRegex);if(i===null)return console.error("Tasks: Cannot create task on line:",n),new pe({status:ge.TODO,description:"",taskLocation:Lt.fromUnknownPosition(new mt(t)),indentation:"",listMarker:"-",priority:"3",createdDate:r,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,onCompletion:"",dependsOn:[],id:"",blockLink:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1});let s=i[1],a=(f=i[2])!=null?f:"-",o=(p=i[4])!=null?p:" ",l=Be.getInstance().bySymbolOrCreate(o),u=i[5],c=n.match(fe.blockLinkRegex),d=c!==null?c[0]:"";return d!==""&&(u=u.replace(fe.blockLinkRegex,"")),new pe({status:l,description:u,taskLocation:Lt.fromUnknownPosition(new mt(t)),indentation:s,listMarker:a,blockLink:d,priority:"3",createdDate:r,startDate:null,scheduledDate:null,dueDate:null,doneDate:null,cancelledDate:null,recurrence:null,onCompletion:"",tags:[],originalMarkdown:"",scheduledDateIsInferred:!1,id:"",dependsOn:[]})};var nE=(n,t,e,r,i)=>{var f;if(n)return e instanceof Fy.MarkdownView;if(!(e instanceof Fy.MarkdownView))return;let s=(f=e.file)==null?void 0:f.path;if(s===void 0)return;let o=t.getCursor().line,l=t.getLine(o),u=Sd({line:l,path:s}),c=p=>{let b=Ft.removeInferredStatusIfNeeded(u,p).map(T=>T.toFileLineString()).join(` `);t.setLine(o,b)};new zi({app:r,task:u,onSubmit:c,allTasks:i}).open()};var Ly=require("obsidian");wi();Nt();ii();var rE=(n,t,e)=>{var c;if(n)return e instanceof Ly.MarkdownView;if(!(e instanceof Ly.MarkdownView))return;let r=(c=e.file)==null?void 0:c.path;if(r===void 0)return;let i=t.getCursor(),s=i.line,a=t.getLine(s),o=Uy(a,r),l=o.text.length>0,u=s>=t.lineCount()-1;if(l||u)t.setLine(s,o.text);else{let d={line:s,ch:0},f={line:s+1,ch:0};t.replaceRange("",d,f)}t.setCursor(CU(i,o))},Uy=(n,t)=>{let e=pe.fromLine({line:n,taskLocation:Lt.fromUnknownPosition(new mt(t)),fallbackDate:null});if(e!==null){let r=e.toggleWithRecurrenceInUsersOrder().map(s=>s.toFileLineString()),i=r.length>0?r.length-1:0;return{text:r.join(` `),moveTo:{line:i}}}else{let r=n.match(fe.taskRegex);if(r!==null){let i=r[3],a=Be.getInstance().bySymbol(i).nextStatusSymbol;return{text:n.replace(fe.taskRegex,`$1- [${a}] $4`)}}else if(fe.listItemRegex.test(n)){let i=n.replace(fe.listItemRegex,"$1$2 [ ]");return{text:i,moveTo:{ch:i.length}}}else{let i=n.replace(fe.indentationRegex,"$1- ");return{text:i,moveTo:{ch:i.length}}}}},CU=(n,t)=>{var s;let e={line:0,ch:n.ch},r=U(U({},e),(s=t.moveTo)!=null?s:{}),i=t.text.split(` -`)[r.line].length;return{line:n.line+r.line,ch:Math.min(r.ch,i)}};var sb=require("obsidian");rn();var Ki=class{constructor(){this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.hideTree=!0;this.shortMode=!1;this.explainQuery=!1}};function iE(n,t,e){let r=new Map([["backlink","hideBacklinks"],["edit button","hideEditButton"],["postpone button","hidePostponeButton"],["task count","hideTaskCount"],["tree","hideTree"],["urgency","hideUrgency"]]);for(let[i,s]of r.entries())if(t.startsWith(i))return n[s]=e,!0;return!1}Is();function Xs(n,t){let e=`Error: ${n}. +`)[r.line].length;return{line:n.line+r.line,ch:Math.min(r.ch,i)}};var sb=require("obsidian");Bt();var Ki=class{constructor(){this.hidePostponeButton=!1;this.hideTaskCount=!1;this.hideBacklinks=!1;this.hideEditButton=!1;this.hideUrgency=!0;this.hideTree=!0;this.shortMode=!1;this.explainQuery=!1}};function iE(n,t,e){let r=new Map([["backlink","hideBacklinks"],["edit button","hideEditButton"],["postpone button","hidePostponeButton"],["task count","hideTaskCount"],["tree","hideTree"],["urgency","hideUrgency"]]);for(let[i,s]of r.entries())if(t.startsWith(i))return n[s]=e,!0;return!1}Is();function Xs(n,t){let e=`Error: ${n}. The error message was: `,r="";return t instanceof Error?r+=t:r+="Unknown error",`${e}"${r}"`}Ws();var MU=Object.prototype.toString,so=Array.isArray||function(t){return MU.call(t)==="[object Array]"};function jy(n){return typeof n=="function"}function RU(n){return so(n)?"array":typeof n}function Yy(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function sE(n,t){return n!=null&&typeof n=="object"&&t in n}function AU(n,t){return n!=null&&typeof n!="object"&&n.hasOwnProperty&&n.hasOwnProperty(t)}var PU=RegExp.prototype.test;function NU(n,t){return PU.call(n,t)}var IU=/\S/;function FU(n){return!NU(IU,n)}var LU={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function UU(n){return String(n).replace(/[&<>"'`=\/]/g,function(e){return LU[e]})}var YU=/\s*/,jU=/\s+/,aE=/\s*=/,WU=/\s*\}/,$U=/#|\^|\/|>|\{|&|=|!/;function qU(n,t){if(!n)return[];var e=!1,r=[],i=[],s=[],a=!1,o=!1,l="",u=0;function c(){if(a&&!o)for(;s.length;)delete i[s.pop()];else s=[];a=!1,o=!1}var d,f,p;function b(Z){if(typeof Z=="string"&&(Z=Z.split(jU,2)),!so(Z)||Z.length!==2)throw new Error("Invalid tags: "+Z);d=new RegExp(Yy(Z[0])+"\\s*"),f=new RegExp("\\s*"+Yy(Z[1])),p=new RegExp("\\s*"+Yy("}"+Z[1]))}b(t||lr.tags);for(var T=new bu(n),_,O,E,A,Y,q;!T.eos();){if(_=T.pos,E=T.scanUntil(d),E)for(var se=0,H=E.length;se<H;++se)A=E.charAt(se),FU(A)?(s.push(i.length),l+=A):(o=!0,e=!0,l+=" "),i.push(["text",A,_,_+1]),_+=1,A===` `&&(c(),l="",u=0,e=!1);if(!T.scan(d))break;if(a=!0,O=T.scan($U)||"name",T.scan(YU),O==="="?(E=T.scanUntil(aE),T.scan(aE),T.scanUntil(f)):O==="{"?(E=T.scanUntil(p),T.scan(WU),T.scanUntil(f),O="&"):E=T.scanUntil(f),!T.scan(f))throw new Error("Unclosed tag at "+T.pos);if(O==">"?Y=[O,E,_,T.pos,l,u,e]:Y=[O,E,_,T.pos],u++,i.push(Y),O==="#"||O==="^")r.push(Y);else if(O==="/"){if(q=r.pop(),!q)throw new Error('Unopened section "'+E+'" at '+_);if(q[1]!==E)throw new Error('Unclosed section "'+q[1]+'" at '+_)}else O==="name"||O==="{"||O==="&"?o=!0:O==="="&&b(E)}if(c(),q=r.pop(),q)throw new Error('Unclosed section "'+q[1]+'" at '+T.pos);return GU(HU(i))}function HU(n){for(var t=[],e,r,i=0,s=n.length;i<s;++i)e=n[i],e&&(e[0]==="text"&&r&&r[0]==="text"?(r[1]+=e[1],r[3]=e[3]):(t.push(e),r=e));return t}function GU(n){for(var t=[],e=t,r=[],i,s,a=0,o=n.length;a<o;++a)switch(i=n[a],i[0]){case"#":case"^":e.push(i),r.push(i),e=i[4]=[];break;case"/":s=r.pop(),s[5]=i[2],e=r.length>0?r[r.length-1][4]:t;break;default:e.push(i)}return t}function bu(n){this.string=n,this.tail=n,this.pos=0}bu.prototype.eos=function(){return this.tail===""};bu.prototype.scan=function(t){var e=this.tail.match(t);if(!e||e.index!==0)return"";var r=e[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r};bu.prototype.scanUntil=function(t){var e=this.tail.search(t),r;switch(e){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,e),this.tail=this.tail.substring(e)}return this.pos+=r.length,r};function io(n,t){this.view=n,this.cache={".":this.view},this.parent=t}io.prototype.push=function(t){return new io(t,this)};io.prototype.lookup=function(t){var e=this.cache,r;if(e.hasOwnProperty(t))r=e[t];else{for(var i=this,s,a,o,l=!1;i;){if(t.indexOf(".")>0)for(s=i.view,a=t.split("."),o=0;s!=null&&o<a.length;)o===a.length-1&&(l=sE(s,a[o])||AU(s,a[o])),s=s[a[o++]];else s=i.view[t],l=sE(i.view,t);if(l){r=s;break}i=i.parent}e[t]=r}return jy(r)&&(r=r.call(this.view)),r};function ln(){this.templateCache={_cache:{},set:function(t,e){this._cache[t]=e},get:function(t){return this._cache[t]},clear:function(){this._cache={}}}}ln.prototype.clearCache=function(){typeof this.templateCache!="undefined"&&this.templateCache.clear()};ln.prototype.parse=function(t,e){var r=this.templateCache,i=t+":"+(e||lr.tags).join(":"),s=typeof r!="undefined",a=s?r.get(i):void 0;return a==null&&(a=qU(t,e),s&&r.set(i,a)),a};ln.prototype.render=function(t,e,r,i){var s=this.getConfigTags(i),a=this.parse(t,s),o=e instanceof io?e:new io(e,void 0);return this.renderTokens(a,o,r,t,i)};ln.prototype.renderTokens=function(t,e,r,i,s){for(var a="",o,l,u,c=0,d=t.length;c<d;++c)u=void 0,o=t[c],l=o[0],l==="#"?u=this.renderSection(o,e,r,i,s):l==="^"?u=this.renderInverted(o,e,r,i,s):l===">"?u=this.renderPartial(o,e,r,s):l==="&"?u=this.unescapedValue(o,e):l==="name"?u=this.escapedValue(o,e,s):l==="text"&&(u=this.rawValue(o)),u!==void 0&&(a+=u);return a};ln.prototype.renderSection=function(t,e,r,i,s){var a=this,o="",l=e.lookup(t[1]);function u(f){return a.render(f,e,r,s)}if(!!l){if(so(l))for(var c=0,d=l.length;c<d;++c)o+=this.renderTokens(t[4],e.push(l[c]),r,i,s);else if(typeof l=="object"||typeof l=="string"||typeof l=="number")o+=this.renderTokens(t[4],e.push(l),r,i,s);else if(jy(l)){if(typeof i!="string")throw new Error("Cannot use higher-order sections without the original template");l=l.call(e.view,i.slice(t[3],t[5]),u),l!=null&&(o+=l)}else o+=this.renderTokens(t[4],e,r,i,s);return o}};ln.prototype.renderInverted=function(t,e,r,i,s){var a=e.lookup(t[1]);if(!a||so(a)&&a.length===0)return this.renderTokens(t[4],e,r,i,s)};ln.prototype.indentPartial=function(t,e,r){for(var i=e.replace(/[^ \t]/g,""),s=t.split(` @@ -256,7 +256,7 @@ The error message was: The problem is in: ${n}`,Error(r)}}var BU=new RegExp(["\\{\\{","(.*?)","\\}\\}"].join(""),"g");function VU(n,t){return n.replace(BU,(e,r)=>{let i=zU(t),s=_u(i,r);if(s.isValid()){let a=vu(s.queryComponent,i);if(a===null)throw Error(`Invalid placeholder result 'null'. Check for missing file property in this expression: - {{${r}}}`);if(a!==void 0)return a}return e})}function zU(n){return Object.entries(n)}function pE(n){return Hy(n,[])}function Hy(n,t){return{query:{file:n,allTasks:t,searchCache:{}}}}rn();var ao=class{constructor(t=""){this.indentation=t}explainQuery(t){if(t.error!==void 0)return this.explainError(t);let e=[];return e.push(this.explainIgnoreGlobalQuery(t)),e.push(this.explainFilters(t)),e.push(this.explainGroups(t)),e.push(this.explainSorters(t)),e.push(this.explainLayout(t)),e.push(this.explainQueryLimits(t)),e.push(this.explainDebugSettings()),e.filter(r=>r!=="").join(` + {{${r}}}`);if(a!==void 0)return a}return e})}function zU(n){return Object.entries(n)}Bt();function pE(n){return Hy(n,[])}function Hy(n,t){return{query:{file:n,allTasks:t,searchCache:{}},includes:U({},oe().includes)}}Bt();var ao=class{constructor(t=""){this.indentation=t}explainQuery(t){if(t.error!==void 0)return this.explainError(t);let e=[];return e.push(this.explainIgnoreGlobalQuery(t)),e.push(this.explainFilters(t)),e.push(this.explainGroups(t)),e.push(this.explainSorters(t)),e.push(this.explainLayout(t)),e.push(this.explainQueryLimits(t)),e.push(this.explainDebugSettings()),e.filter(r=>r!=="").join(` `)}explainError(t){let e="";return e+=`Query has an error: `,e+=t.error+` `,e}explainIgnoreGlobalQuery(t){return t.ignoreGlobalQuery?this.indent(`ignore global query @@ -265,7 +265,7 @@ The problem is in: `)}explainGroups(t){return this.explainStatements(t.grouping.map(e=>e.statement))}explainSorters(t){return this.explainStatements(t.sorting.map(e=>e.statement))}explainLayout(t){return this.explainStatements(t.layoutStatements)}explainQueryLimits(t){function e(i){let s=`At most ${i} task`;return i!==1&&(s+="s"),s}let r=[];if(t.limit!==void 0){let i=e(t.limit)+`. `;r.push(this.indent(i))}if(t.taskGroupLimit!==void 0){let i=e(t.taskGroupLimit)+` per group (if any "group by" options are supplied). `;r.push(this.indent(i))}return r.join(` -`)}explainDebugSettings(){let t="",{debugSettings:e}=le();return e.ignoreSortInstructions&&(t+=this.indent(`NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting. +`)}explainDebugSettings(){let t="",{debugSettings:e}=oe();return e.ignoreSortInstructions&&(t+=this.indent(`NOTE: All sort instructions, including default sort order, are disabled, due to 'ignoreSortInstructions' setting. `)),t}explainStatements(t){return t.length===0?"":t.map(e=>e.explainStatement(this.indentation)).join(` `)+` @@ -301,14 +301,14 @@ ${t}${o}`)}let r=this._rawInstruction.trim(),i=r.split(` `).join(` `+t),s=`${t}${i}`;return this._rawInstruction.includes(` `)&&(s+=` -`+t),e(r,this._anyContinuationLinesRemoved),e(this._anyContinuationLinesRemoved,this._anyPlaceholdersExpanded),s}allLinesIdentical(){return this._rawInstruction===this._anyContinuationLinesRemoved&&this._rawInstruction===this._anyPlaceholdersExpanded}};var Rr=class{constructor(t,e,r,i){this._statement=new gn(t,t),this.property=e,this.comparator=Rr.maybeReverse(i,r)}setStatement(t){this._statement=t}get statement(){return this._statement}get instruction(){return this._statement.anyPlaceholdersExpanded}static maybeReverse(t,e){return t?Rr.makeReversedComparator(e):e}static makeReversedComparator(t){return(e,r,i)=>t(e,r,i)*-1}};iu();var Xi=class{constructor(t,e,r,i){this._statement=new gn(t,t),this.property=e,this.grouper=r,this.reverse=i}setStatement(t){this._statement=t}get statement(){return this._statement}get instruction(){return this._statement.anyPlaceholdersExpanded}};var We=class{canCreateFilterForLine(t){return We.lineMatchesFilter(this.filterRegExp(),t)}static lineMatchesFilter(t,e){return t?t.test(e):!1}static getMatch(t,e){return t?e.match(t):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return qi(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(t){if(!this.supportsSorting())return null;let e=We.getMatch(this.sorterRegExp(),t);if(e===null)return null;let r=!!e[1];return this.createSorter(r)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}sorterInstruction(t){let e=`sort by ${this.fieldNameSingular()}`;return t&&(e+=" reverse"),e}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(t){return new Rr(this.sorterInstruction(t),this.fieldNameSingular(),this.comparator(),t)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(t){if(!this.supportsGrouping())return null;let e=We.getMatch(this.grouperRegExp(),t);if(e===null)return null;let r=!!e[1];return this.createGrouper(r)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouperInstruction(t){let e=`group by ${this.fieldNameSingular()}`;return t&&(e+=" reverse"),e}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(t){return new Xi(this.grouperInstruction(t),this.fieldNameSingular(),this.grouper(),t)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var Vt=class{constructor(t,e,r){this._statement=new gn(t,t),this.explanation=r,this.filterFunction=e}get statement(){return this._statement}setStatement(t){this._statement=t}get instruction(){return this._statement.anyPlaceholdersExpanded}explainFilterIndented(t){let e=this._statement.explainStatement(t);return this.onlyNeedsOneLineExplanation()?`${e} +`+t),e(r,this._anyContinuationLinesRemoved),e(this._anyContinuationLinesRemoved,this._anyPlaceholdersExpanded),s}allLinesIdentical(){return this._rawInstruction===this._anyContinuationLinesRemoved&&this._rawInstruction===this._anyPlaceholdersExpanded}};var Rr=class{constructor(t,e,r,i){this._statement=new gn(t,t),this.property=e,this.comparator=Rr.maybeReverse(i,r)}setStatement(t){this._statement=t}get statement(){return this._statement}get instruction(){return this._statement.anyPlaceholdersExpanded}static maybeReverse(t,e){return t?Rr.makeReversedComparator(e):e}static makeReversedComparator(t){return(e,r,i)=>t(e,r,i)*-1}};iu();var Xi=class{constructor(t,e,r,i){this._statement=new gn(t,t),this.property=e,this.grouper=r,this.reverse=i}setStatement(t){this._statement=t}get statement(){return this._statement}get instruction(){return this._statement.anyPlaceholdersExpanded}};var We=class{canCreateFilterForLine(t){return We.lineMatchesFilter(this.filterRegExp(),t)}static lineMatchesFilter(t,e){return t?t.test(e):!1}static getMatch(t,e){return t?e.match(t):null}fieldNameSingular(){return this.fieldName()}fieldNameSingularEscaped(){return qi(this.fieldNameSingular())}supportsSorting(){return!1}createSorterFromLine(t){if(!this.supportsSorting())return null;let e=We.getMatch(this.sorterRegExp(),t);if(e===null)return null;let r=!!e[1];return this.createSorter(r)}sorterRegExp(){if(!this.supportsSorting())throw Error(`sorterRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)?`,"i")}sorterInstruction(t){let e=`sort by ${this.fieldNameSingular()}`;return t&&(e+=" reverse"),e}comparator(){throw Error(`comparator() unimplemented for ${this.fieldNameSingular()}`)}createSorter(t){return new Rr(this.sorterInstruction(t),this.fieldNameSingular(),this.comparator(),t)}createNormalSorter(){return this.createSorter(!1)}createReverseSorter(){return this.createSorter(!0)}supportsGrouping(){return!1}createGrouperFromLine(t){if(!this.supportsGrouping())return null;let e=We.getMatch(this.grouperRegExp(),t);if(e===null)return null;let r=!!e[1];return this.createGrouper(r)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)?$`,"i")}grouperInstruction(t){let e=`group by ${this.fieldNameSingular()}`;return t&&(e+=" reverse"),e}grouper(){throw Error(`grouper() unimplemented for ${this.fieldNameSingular()}`)}createGrouper(t){return new Xi(this.grouperInstruction(t),this.fieldNameSingular(),this.grouper(),t)}createNormalGrouper(){return this.createGrouper(!1)}createReverseGrouper(){return this.createGrouper(!0)}};var zt=class{constructor(t,e,r){this._statement=new gn(t,t),this.explanation=r,this.filterFunction=e}get statement(){return this._statement}setStatement(t){this._statement=t}get instruction(){return this._statement.anyPlaceholdersExpanded}explainFilterIndented(t){let e=this._statement.explainStatement(t);return this.onlyNeedsOneLineExplanation()?`${e} `:`${e} => ${this.explanation.asString(t+" ")} `}simulateExplainFilter(){return this.onlyNeedsOneLineExplanation()?this.explanation:new qe(this.instruction+" =>",[this.explanation])}onlyNeedsOneLineExplanation(){return this.explanation.asString("")===this.instruction}};var ke=class{constructor(t){this.object=t}get instruction(){return this.object.instruction}get filter(){return this.object.queryComponent}isValid(){return this.object.isValid()}get error(){return this.object.error}get filterFunction(){if(this.filter)return this.filter.filterFunction}static fromFilter(t){return new ke(Xr.fromObject(t.instruction,t))}static fromError(t,e){return new ke(Xr.fromError(t,e))}};var Ze=class extends We{createFilterOrErrorMessage(t){let e=We.getMatch(this.filterRegExp(),t);if(e===null)return ke.fromError(t,`do not understand query filter (${this.fieldName()})`);let r=e[1].toLowerCase(),i=e[2],s=null;if(r.includes("include"))s=new lo(i);else if(r.includes("regex")){try{s=Qi.validateAndConstruct(i)}catch(l){let u=Xs("Parsing regular expression",l)+` ${Qi.helpMessage()}`;return ke.fromError(t,u)}if(s===null)return ke.fromError(t,`Invalid instruction: '${t}' -${Qi.helpMessage()}`)}if(s===null)return ke.fromError(t,`do not understand query filter (${this.fieldName()})`);let a=r.match(/not/)!==null,o=new Vt(t,this.getFilter(s,a),s.explanation(t));return ke.fromFilter(o)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`,"i")}getFilter(t,e){return r=>{let i=t.matches(this.value(r));return e?!i:i}}comparator(){return(t,e)=>this.value(t).localeCompare(this.value(e),void 0,{numeric:!0})}grouper(){return t=>[this.value(t)]}static escapeMarkdownCharacters(t){return t.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var Zs=class extends Ze{fieldName(){return"description"}value(t){return Fe.getInstance().removeAsSubstringFrom(t.description)}supportsSorting(){return!0}comparator(){return(t,e)=>{let r=Zs.cleanDescription(t.description),i=Zs.cleanDescription(e.description);return r.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(t){t=Fe.getInstance().removeAsSubstringFrom(t);let e=/^\[\[?([^\]]*)]]?/,r=t.match(e);if(r!==null){let i=r[1];t=i.substring(i.indexOf("|")+1)+t.replace(e,"")}return t=this.replaceFormatting(t,/^\*\*([^*]+)\*\*/),t=this.replaceFormatting(t,/^\*([^*]+)\*/),t=this.replaceFormatting(t,/^==([^=]+)==/),t=this.replaceFormatting(t,/^__([^_]+)__/),t=this.replaceFormatting(t,/^_([^_]+)_/),t}static replaceFormatting(t,e){let r=t.match(e);return r!==null&&(t=r[1]+t.replace(e,"")),t}};Rg();Ag();Cs();var Dd=class{findUnexpandedDateText(t){let e=["<%","YYYY-MM-DD"];for(let r of e)if(t.includes(r))return this.unexpandedDateTextMessage(r);return null}unexpandedDateTextMessage(t){return`Instruction contains unexpanded template text: "${t}" - and cannot be interpreted. +${Qi.helpMessage()}`)}if(s===null)return ke.fromError(t,`do not understand query filter (${this.fieldName()})`);let a=r.match(/not/)!==null,o=new zt(t,this.getFilter(s,a),s.explanation(t));return ke.fromFilter(o)}fieldPattern(){return this.fieldNameSingularEscaped()}filterOperatorPattern(){return"includes|does not include|regex matches|regex does not match"}filterRegExp(){return new RegExp(`^(?:${this.fieldPattern()}) (${this.filterOperatorPattern()}) (.*)`,"i")}getFilter(t,e){return r=>{let i=t.matches(this.value(r));return e?!i:i}}comparator(){return(t,e)=>this.value(t).localeCompare(this.value(e),void 0,{numeric:!0})}grouper(){return t=>[this.value(t)]}static escapeMarkdownCharacters(t){return t.replace(/\\/g,"\\\\").replace(/_/g,"\\_")}};var Zs=class extends Ze{fieldName(){return"description"}value(t){return Fe.getInstance().removeAsSubstringFrom(t.description)}supportsSorting(){return!0}comparator(){return(t,e)=>{let r=Zs.cleanDescription(t.description),i=Zs.cleanDescription(e.description);return r.localeCompare(i,void 0,{numeric:!0})}}static cleanDescription(t){t=Fe.getInstance().removeAsSubstringFrom(t);let e=/^\[\[?([^\]]*)]]?/,r=t.match(e);if(r!==null){let i=r[1];t=i.substring(i.indexOf("|")+1)+t.replace(e,"")}return t=this.replaceFormatting(t,/^\*\*([^*]+)\*\*/),t=this.replaceFormatting(t,/^\*([^*]+)\*/),t=this.replaceFormatting(t,/^==([^=]+)==/),t=this.replaceFormatting(t,/^__([^_]+)__/),t=this.replaceFormatting(t,/^_([^_]+)_/),t}static replaceFormatting(t,e){let r=t.match(e);return r!==null&&(t=r[1]+t.replace(e,"")),t}};Rg();Ag();Cs();var Dd=class{findUnexpandedDateText(t){let e=["<%","YYYY-MM-DD"];for(let r of e)if(t.includes(r))return this.unexpandedDateTextMessage(r);return null}unexpandedDateTextMessage(t){return`Instruction contains unexpanded template text: "${t}" - and cannot be interpreted. Possible causes: - The query is an a template file, and is not intended to be searched. @@ -319,7 +319,7 @@ Possible causes: instead of in to a template file. See: https://publish.obsidian.md/tasks/Advanced/Daily+Agenda#Instruction+contains+unexpanded+template+text -`}};var Ed=class{constructor(t,e){this._instruction=t,this._filter=e}canCreateFilterForLine(t){return t.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(t){return this.canCreateFilterForLine(t)?ke.fromFilter(new Vt(t,this._filter,new qe(t))):ke.fromError(t,`do not understand filter: ${t}`)}};var yn=class{constructor(){this._filters=[]}add(t,e){this._filters.push(new Ed(t,e))}canCreateFilterForLine(t){return this._filters.some(e=>e.canCreateFilterForLine(t))}createFilterOrErrorMessage(t){for(let e of this._filters){let r=e.createFilterOrErrorMessage(t);if(r.isValid())return r}return ke.fromError(t,`do not understand filter: ${t}`)}};var Et=class extends We{constructor(e=null){super();e!==null?this.filterInstructions=e:(this.filterInstructions=new yn,this.filterInstructions.add(`has ${this.fieldName()} date`,r=>this.date(r)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,r=>this.date(r)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,r=>{let i=this.date(r);return i!==null&&!i.isValid()}))}canCreateFilterForLine(e){return this.filterInstructions.canCreateFilterForLine(e)?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){var f;let r=this.checkForUnexpandedTemplateText(e);if(r)return ke.fromError(e,r);let i=this.filterInstructions.createFilterOrErrorMessage(e);if(i.isValid())return i;let s=We.getMatch(this.filterRegExp(),e);if(s===null)return ke.fromError(e,"do not understand query filter ("+this.fieldName()+" date)");let a=s[1],o=(f=s[2])==null?void 0:f.toLowerCase(),l=s[3],u=En.parseDateRange(l);if(!u.isValid()){let p=En.parseDate(a);p.isValid()&&(u=new tn(p,p))}if(!u.isValid())return ke.fromError(e,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,u),d=Et.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),u);return ke.fromFilter(new Vt(e,c,d))}buildFilterFunction(e,r){let i;switch(e){case"before":i=s=>s?s.isBefore(r.start):this.filterResultIfFieldMissing();break;case"after":i=s=>s?s.isAfter(r.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":i=s=>s?s.isSameOrBefore(r.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":i=s=>s?s.isSameOrAfter(r.start):this.filterResultIfFieldMissing();break;default:i=s=>s?s.isSameOrAfter(r.start)&&s.isSameOrBefore(r.end):this.filterResultIfFieldMissing()}return this.getFilter(i)}getFilter(e){return r=>e(this.date(r))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`,"i")}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(e,r,i,s){let a=r,o="YYYY-MM-DD (dddd Do MMMM YYYY)",l;switch(r){case"before":case"on or after":l=s.start.format(o);break;case"after":case"on or before":l=s.end.format(o);break;case"in or before":a="on or before",l=s.end.format(o);break;case"in or after":a="on or after",l=s.start.format(o);break;default:if(!s.start.isSame(s.end)){let c=`${e} date is between:`,d=[new qe(`${s.start.format(o)} and`),new qe(`${s.end.format(o)} inclusive`)];return i&&d.push(new qe(`OR no ${e} date`)),new qe(c,d)}a="on",l=s.start.format(o);break}let u=`${e} date is ${a} ${l}`;return i&&(u+=` OR no ${e} date`),new qe(u)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(e,r)=>Qn(this.date(e),this.date(r))}supportsGrouping(){return!0}grouper(){return e=>{let r=this.date(e);return r===null?["No "+this.fieldName()+" date"]:r.isValid()?[r.format("YYYY-MM-DD dddd")]:["%%0%% Invalid "+this.fieldName()+" date"]}}checkForUnexpandedTemplateText(e){return new Dd().findUnexpandedDateText(e)}};var xd=class extends Et{fieldName(){return"created"}date(t){return t.createdDate}filterResultIfFieldMissing(){return!1}};var Od=class extends Et{fieldName(){return"done"}date(t){return t.doneDate}filterResultIfFieldMissing(){return!1}};var uo=class extends Et{fieldName(){return"due"}date(t){return t.dueDate}filterResultIfFieldMissing(){return!1}};var ur=class extends We{constructor(){super(...arguments);this._filters=new yn}canCreateFilterForLine(e){return this._filters.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){return this._filters.createFilterOrErrorMessage(e)}filterRegExp(){return null}};var Cd=class extends ur{constructor(){super(),this._filters.add("exclude sub-items",t=>{if(t.indentation==="")return!0;let e=t.indentation.lastIndexOf(">");return e===-1?!1:/^ ?$/.test(t.indentation.slice(e+1))})}fieldName(){return"exclude"}};function Md(n,t){return[["task",n],["query",t?t.query:null]]}function mE(n,t,e){let r=Md(n,e||null),i=_u(r,t);return i.error?i.error:qy(i.queryComponent,r,t)}var wu=class{constructor(t){this.line=t,this.functionOrError=_u(Md(null,null),t)}isValid(){return this.functionOrError.isValid()}get parseError(){return this.functionOrError.error}evaluate(t,e){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return vu(this.functionOrError.queryComponent,Md(t,e||null))}evaluateOrCatch(t,e){return this.isValid()?qy(this.functionOrError.queryComponent,Md(t,e),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};Cs();function Gy(n){if(n===null)return"null";let t=typeof n;return t==="object"?n.constructor.name:t}var Rd=class extends We{createFilterOrErrorMessage(t){let e=We.getMatch(this.filterRegExp(),t);if(e===null)return ke.fromError(t,"Unable to parse line");let r=e[1],i=new wu(r);return i.isValid()?ke.fromFilter(new Vt(t,QU(i),new qe(t))):ke.fromError(t,i.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`,"i")}supportsSorting(){return!0}sorterRegExp(){return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}createSorterFromLine(t){let e=We.getMatch(this.sorterRegExp(),t);if(e===null)return null;let r=!!e[1],i=e[2],s=new wu(i);if(!s.isValid())throw new Error(s.parseError);let a=(o,l,u)=>{try{let c=u.queryContext(),d=this.validateTaskSortKey(s.evaluate(o,c)),f=this.validateTaskSortKey(s.evaluate(l,c));return this.compareTaskSortKeys(d,f)}catch(c){throw c instanceof Error&&(c.message+=`: while evaluating instruction '${t}'`),c}};return new Rr(t,this.fieldNameSingular(),a,r)}validateTaskSortKey(t){function e(r){throw new Error(`"${r}" is not a valid sort key`)}return t===void 0&&e("undefined"),Number.isNaN(t)&&e("NaN (Not a Number)"),Array.isArray(t)&&e("array"),t}compareTaskSortKeys(t,e){let r=Gy(t),i=Gy(e),s=this.compareTaskSortKeysIfOptionalMoment(t,e,r,i);if(s!==void 0)return s;let a=this.compareTaskSortKeysIfEitherIsNull(t,e);if(a!==void 0)return a;if(r!==i)throw new Error(`Unable to compare two different sort key types '${r}' and '${i}' order`);if(r==="string")return t.localeCompare(e,void 0,{numeric:!0});if(r==="TasksDate")return Qn(t.moment,e.moment);if(r==="boolean")return Number(e)-Number(t);let o=Number(t)-Number(e);if(isNaN(o))throw new Error(`Unable to determine sort order for sort key types '${r}' and '${i}'`);return o}compareTaskSortKeysIfOptionalMoment(t,e,r,i){let s=r==="Moment",a=i==="Moment";if(s&&a||s&&e===null||a&&t===null)return Qn(t,e)}compareTaskSortKeysIfEitherIsNull(t,e){if(t===null&&e===null)return 0;if(t===null&&e!==null)return-1;if(t!==null&&e===null)return 1}supportsGrouping(){return!0}createGrouperFromLine(t){let e=We.getMatch(this.grouperRegExp(),t);if(e===null)return null;let r=!!e[1],i=e[2];return new Xi(t,"function",ZU(i),r)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function QU(n){return(t,e)=>{let r=e.queryContext();return XU(n,t,r)}}function XU(n,t,e){let r=n.evaluate(t,e);if(typeof r=="boolean")return r;throw Error(`filtering function must return true or false. This returned "${r}".`)}function ZU(n){return(t,e)=>{let r=e.queryContext();return JU(t,n,r)}}function JU(n,t,e){try{let r=mE(n,t,e);return Array.isArray(r)?r.map(s=>s.toString()):r===null?[]:typeof r=="number"&&!Number.isInteger(r)?[r.toFixed(5)]:[r.toString()]}catch(r){let i=`Error: Failed calculating expression "${t}". The error message was: `;return r instanceof Error?[i+r.message]:[i+"Unknown error"]}}var Ad=class extends Ze{fieldName(){return"heading"}value(t){return t.precedingHeader?t.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return t=>t.precedingHeader===null||t.precedingHeader.length===0?["(No heading)"]:[t.precedingHeader]}};var co=class extends Ze{fieldName(){return"path"}value(t){return t.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return t=>[Ze.escapeMarkdownCharacters(t.path.replace(".md",""))]}};ja();var By=class extends We{createFilterOrErrorMessage(t){var r;let e=We.getMatch(this.filterRegExp(),t);if(e!==null){let i=e[5],s=null;switch(i.toLowerCase()){case"lowest":s="5";break;case"low":s="4";break;case"none":s="3";break;case"medium":s="2";break;case"high":s="1";break;case"highest":s="0";break}if(s===null)return ke.fromError(t,"do not understand priority");let a=t,o;switch((r=e[3])==null?void 0:r.toLowerCase()){case"above":o=l=>l.priority.localeCompare(s)<0;break;case"below":o=l=>l.priority.localeCompare(s)>0;break;case"not":o=l=>l.priority!==s;break;default:o=l=>l.priority===s,a=`${this.fieldName()} is ${i}`}return ke.fromFilter(new Vt(t,o,new qe(a)))}else return ke.fromError(t,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return By.priorityRegexp}supportsSorting(){return!0}comparator(){return(t,e)=>t.priority.localeCompare(e.priority)}supportsGrouping(){return!0}grouper(){return t=>[t.priorityNameGroupText]}},Js=By;Js.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/i;var Pd=class extends Et{fieldName(){return"scheduled"}date(t){return t.scheduledDate}filterResultIfFieldMissing(){return!1}};var Nd=class extends Et{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(t){return t.startDate}filterResultIfFieldMissing(){return!0}};var Id=class extends Et{constructor(){let t=new yn;t.add("has happens date",e=>this.dates(e).some(r=>r!==null)),t.add("no happens date",e=>!this.dates(e).some(r=>r!==null)),super(t)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(t){return this.earliestDate(t)}dates(t){return t.happensDates}earliestDate(t){return t.happens.moment}filterResultIfFieldMissing(){return!1}getFilter(t){return e=>this.dates(e).some(r=>t(r))}};var Fd=class extends ur{constructor(){super(),this._filters.add("is recurring",t=>t.recurrence!==null),this._filters.add("is not recurring",t=>t.recurrence===null)}fieldName(){return"recurring"}supportsSorting(){return!0}comparator(){return(t,e)=>t.recurrence!==null&&e.recurrence===null?-1:t.recurrence===null&&e.recurrence!==null?1:0}supportsGrouping(){return!0}grouper(){return t=>t.recurrence!==null?["Recurring"]:["Not Recurring"]}};var Zi=class extends ur{constructor(){super(),this._filters.add("done",t=>t.isDone),this._filters.add("not done",t=>!t.isDone)}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(t,e)=>{let r=Zi.oldStatusName(t),i=Zi.oldStatusName(e);return r<i?1:r>i?-1:0}}static oldStatusName(t){return t.isDone?"Done":"Todo"}supportsGrouping(){return!0}grouper(){return t=>[Zi.oldStatusName(t)]}};var Ld=class extends Ze{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(t){return this.values(t).join(", ")}getFilter(t,e){return r=>{let i=t.matchesAnyOf(this.values(r));return e?!i:i}}createGrouper(t){return new Xi(this.grouperInstruction(t),this.fieldNamePlural(),this.grouper(),t)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`,"i")}grouperInstruction(t){let e=`group by ${this.fieldNamePlural()}`;return t&&(e+=" reverse"),e}};var ea=class extends Ld{constructor(){super();this.filterInstructions=new yn,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,e=>this.values(e).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,e=>this.values(e).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,e=>this.values(e).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,e=>this.values(e).length===0)}createFilterOrErrorMessage(e){let r=this.filterInstructions.createFilterOrErrorMessage(e);return r.isValid()?r:super.createFilterOrErrorMessage(e)}canCreateFilterForLine(e){return this.filterInstructions.canCreateFilterForLine(e)?!0:super.canCreateFilterForLine(e)}fieldNameSingular(){return"tag"}values(e){return e.tags}supportsSorting(){return!0}createSorterFromLine(e){let r=e.match(this.sorterRegExp());if(r===null)return null;let i=!!r[1],s=isNaN(+r[2])?1:+r[2],a=ea.makeCompareByTagComparator(s);return new Rr(e,this.fieldNameSingular(),a,i)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/i}comparator(){return ea.makeCompareByTagComparator(1)}static makeCompareByTagComparator(e){return(r,i)=>{if(r.tags.length===0&&i.tags.length===0)return 0;if(r.tags.length===0)return 1;if(i.tags.length===0)return-1;let s=e-1;if(r.tags.length<e&&i.tags.length>=e)return 1;if(i.tags.length<e&&r.tags.length>=e)return-1;if(r.tags.length<e&&i.tags.length<e)return 0;let a=r.tags[s],o=i.tags[s];return a.localeCompare(o,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>e.tags.length==0?["(No tags)"]:e.tags}};var OE=qo(xE());iu();function Ji(n){return new RegExp("["+qi(n)+"]").source}var nb=[["(",")"],["[","]"],["{","}"],['"','"']],xi=class{constructor(t,e,r){this.openFilterChars=t,this.closeFilterChars=e,this.openAndCloseFilterChars=r,this.openFilter=Ji(this.openFilterChars),this.closeFilter=Ji(this.closeFilterChars)}static allSupportedDelimiters(){let t="",e="",r="";for(let[i,s]of nb)t+=i,e+=s,r+=xi.openAndClosing(i,s);return new xi(t,e,r)}static fromInstructionLine(t){let e=t.trim(),i=/^[A-Z ]*\s*(.*)/.exec(e);if(i){let a=i[1],o=a[0],l=a.slice(-1);for(let[u,c]of nb)if(o===u&&l===c){let d=this.openAndClosing(u,c);return new xi(u,c,d)}}let s="All filters in a Boolean instruction must be inside one of these pairs of delimiter characters: "+nb.map(([a,o])=>a+"..."+o).join(" or ")+". Combinations of those delimiters are no longer supported.";throw new Error(s)}static openAndClosing(t,e){let r=t;return e!=t&&(r+=e),r}};var es=class{static preprocessExpression(t,e){let r=es.splitLine(t,e);return es.getFiltersAndSimplifiedLine(r,e)}static splitLine(t,e){let r=new RegExp("("+e.closeFilter+"\\s*(?:AND|OR|AND +NOT|OR +NOT|XOR)\\s*"+e.openFilter+")"),i=t.split(r),s=new RegExp("(NOT\\s*"+e.openFilter+")"),a=i.flatMap(u=>u.split(s)).filter(u=>u!==""),o=new RegExp("(^"+Ji(e.openFilterChars+" ")+"*)"),l=new RegExp("("+Ji(e.closeFilterChars+" ")+"*$)");return a.flatMap(u=>u.split(o)).flatMap(u=>u.split(l)).filter(u=>u!=="")}static getFiltersAndSimplifiedLine(t,e){let r="",i=1,s={};t.forEach(u=>{if(!es.isAFilter(u,e))r+=`${u}`;else{let c=`f${i}`;s[c]=u,r+=c,i++}});let a=new RegExp(`(${e.closeFilter})([A-Z])`,"g");r=r.replace(a,"$1 $2");let o=new RegExp(`([A-Z])(${e.openFilter})`,"g");r=r.replace(o,"$1 $2");let l=e.openFilterChars;if(l!='"'&&l!="("){let u=new RegExp(Ji(l),"g");r=r.replace(u,"(");let c=e.closeFilterChars,d=new RegExp(Ji(c),"g");r=r.replace(d,")")}return{simplifiedLine:r,filters:s}}static isAFilter(t,e){let r=new RegExp("^"+Ji(" "+e.openAndCloseFilterChars)+"+$"),i=new RegExp("^ *"+e.closeFilter+" *(AND|OR|XOR) *"+e.openFilter+" *$"),s=new RegExp("^(AND|OR|XOR|NOT) *"+e.openFilter+"$"),a=new RegExp("^"+e.closeFilter+" *(AND|OR|XOR)$");return![r,i,s,a,/^(AND|OR|XOR|NOT)$/].some(l=>RegExp(l).exec(t))}};var $d=class extends We{constructor(){super();this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={};let e=xi.allSupportedDelimiters();this.basicBooleanRegexp=new RegExp("(.*(AND|OR|XOR|NOT)\\s*"+e.openFilter+".*|"+e.openFilter+".+"+e.closeFilter+")","g")}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(e){return this.parseLine(e)}fieldName(){return"boolean query"}parseLine(e){if(e.length===0)return ke.fromError(e,"empty line");let r;try{r=xi.fromInstructionLine(e)}catch(o){let l=o instanceof Error?o.message:"unknown error type";return ke.fromError(e,this.helpMessageFromSimpleError(e,l))}let i=es.preprocessExpression(e,r),s=i.simplifiedLine,a=i.filters;try{let o=(0,OE.parse)(s);for(let c of o)if(c.name==="IDENTIFIER"&&c.value){let d=c.value.trim(),f=a[d];if(c.value=f,!(f in this.subFields)){let p=Su(f);if(p===null)return this.helpMessage(e,`couldn't parse sub-expression '${f}'`,i);if(p.error)return this.helpMessage(e,`couldn't parse sub-expression '${f}': ${p.error}`,i);p.filter&&(this.subFields[f]=p.filter)}}else if(c.name==="OPERATOR"){if(c.value==null)return this.helpMessage(e,"empty operator in boolean query",i);if(!this.supportedOperators.includes(c.value))return this.helpMessage(e,`unknown boolean operator '${c.value}'`,i)}let l=(c,d)=>this.filterTaskWithParsedQuery(c,o,d),u=this.constructExplanation(o);return ke.fromFilter(new Vt(e,l,u))}catch(o){let l=o instanceof Error?o.message:"unknown error type";return this.helpMessage(e,`malformed boolean query -- ${l} (check the documentation for guidelines)`,i)}}filterTaskWithParsedQuery(e,r,i){let s=l=>l==="true",a=l=>l?"true":"false",o=[];for(let l of r)if(l.name==="IDENTIFIER"){if(l.value==null)throw Error("null token value");let c=this.subFields[l.value.trim()].filterFunction(e,i);o.push(a(c))}else if(l.name==="OPERATOR")if(l.value==="NOT"){let u=s(o.pop());o.push(a(!u))}else if(l.value==="OR"){let u=s(o.pop()),c=s(o.pop());o.push(a(u||c))}else if(l.value==="AND"){let u=s(o.pop()),c=s(o.pop());o.push(a(u&&c))}else if(l.value==="XOR"){let u=s(o.pop()),c=s(o.pop());o.push(a(u&&!c||!u&&c))}else throw Error("Unsupported operator: "+l.value);else throw Error("Unsupported token type: "+l);return s(o[0])}constructExplanation(e){let r=[];for(let i of e)if(i.name==="IDENTIFIER")this.explainExpression(i,r);else if(i.name==="OPERATOR")this.explainOperator(i,r);else throw Error("Unsupported token type: "+i.name);return r[0]}explainExpression(e,r){if(e.value==null)throw Error("null token value");let i=this.subFields[e.value.trim()],s=this.simulateExplainFilter(i);r.push(s)}simulateExplainFilter(e){return e.simulateExplainFilter()}explainOperator(e,r){if(e.value==="NOT"){let i=r.pop();r.push(qe.booleanNot([i]))}else if(e.value==="OR"){let i=r.pop(),s=r.pop();r.push(qe.booleanOr([s,i]))}else if(e.value==="AND"){let i=r.pop(),s=r.pop();r.push(qe.booleanAnd([s,i]))}else if(e.value==="XOR"){let i=r.pop(),s=r.pop();r.push(qe.booleanXor([s,i]))}else throw Error("Unsupported operator: "+e.value)}helpMessage(e,r,i){let s=i.filters,a=this.stringifySubExpressionsForErrorMessage(s),l=`${this.helpMessageFromSimpleError(e,r)} +`}};var Ed=class{constructor(t,e){this._instruction=t,this._filter=e}canCreateFilterForLine(t){return t.toLocaleLowerCase()===this._instruction.toLocaleLowerCase()}createFilterOrErrorMessage(t){return this.canCreateFilterForLine(t)?ke.fromFilter(new zt(t,this._filter,new qe(t))):ke.fromError(t,`do not understand filter: ${t}`)}};var yn=class{constructor(){this._filters=[]}add(t,e){this._filters.push(new Ed(t,e))}canCreateFilterForLine(t){return this._filters.some(e=>e.canCreateFilterForLine(t))}createFilterOrErrorMessage(t){for(let e of this._filters){let r=e.createFilterOrErrorMessage(t);if(r.isValid())return r}return ke.fromError(t,`do not understand filter: ${t}`)}};var Et=class extends We{constructor(e=null){super();e!==null?this.filterInstructions=e:(this.filterInstructions=new yn,this.filterInstructions.add(`has ${this.fieldName()} date`,r=>this.date(r)!==null),this.filterInstructions.add(`no ${this.fieldName()} date`,r=>this.date(r)===null),this.filterInstructions.add(`${this.fieldName()} date is invalid`,r=>{let i=this.date(r);return i!==null&&!i.isValid()}))}canCreateFilterForLine(e){return this.filterInstructions.canCreateFilterForLine(e)?!0:super.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){var f;let r=this.checkForUnexpandedTemplateText(e);if(r)return ke.fromError(e,r);let i=this.filterInstructions.createFilterOrErrorMessage(e);if(i.isValid())return i;let s=We.getMatch(this.filterRegExp(),e);if(s===null)return ke.fromError(e,"do not understand query filter ("+this.fieldName()+" date)");let a=s[1],o=(f=s[2])==null?void 0:f.toLowerCase(),l=s[3],u=En.parseDateRange(l);if(!u.isValid()){let p=En.parseDate(a);p.isValid()&&(u=new nn(p,p))}if(!u.isValid())return ke.fromError(e,"do not understand "+this.fieldName()+" date");let c=this.buildFilterFunction(o,u),d=Et.buildExplanation(this.fieldNameForExplanation(),o,this.filterResultIfFieldMissing(),u);return ke.fromFilter(new zt(e,c,d))}buildFilterFunction(e,r){let i;switch(e){case"before":i=s=>s?s.isBefore(r.start):this.filterResultIfFieldMissing();break;case"after":i=s=>s?s.isAfter(r.end):this.filterResultIfFieldMissing();break;case"on or before":case"in or before":i=s=>s?s.isSameOrBefore(r.end):this.filterResultIfFieldMissing();break;case"on or after":case"in or after":i=s=>s?s.isSameOrAfter(r.start):this.filterResultIfFieldMissing();break;default:i=s=>s?s.isSameOrAfter(r.start)&&s.isSameOrBefore(r.end):this.filterResultIfFieldMissing()}return this.getFilter(i)}getFilter(e){return r=>e(this.date(r))}filterRegExp(){return new RegExp(`^${this.fieldNameForFilterInstruction()} (((?:on|in) or before|before|(?:on|in) or after|after|on|in)? ?(.*))`,"i")}fieldNameForFilterInstruction(){return this.fieldName()}static buildExplanation(e,r,i,s){let a=r,o="YYYY-MM-DD (dddd Do MMMM YYYY)",l;switch(r){case"before":case"on or after":l=s.start.format(o);break;case"after":case"on or before":l=s.end.format(o);break;case"in or before":a="on or before",l=s.end.format(o);break;case"in or after":a="on or after",l=s.start.format(o);break;default:if(!s.start.isSame(s.end)){let c=`${e} date is between:`,d=[new qe(`${s.start.format(o)} and`),new qe(`${s.end.format(o)} inclusive`)];return i&&d.push(new qe(`OR no ${e} date`)),new qe(c,d)}a="on",l=s.start.format(o);break}let u=`${e} date is ${a} ${l}`;return i&&(u+=` OR no ${e} date`),new qe(u)}fieldNameForExplanation(){return this.fieldName()}supportsSorting(){return!0}comparator(){return(e,r)=>Qn(this.date(e),this.date(r))}supportsGrouping(){return!0}grouper(){return e=>{let r=this.date(e);return r===null?["No "+this.fieldName()+" date"]:r.isValid()?[r.format("YYYY-MM-DD dddd")]:["%%0%% Invalid "+this.fieldName()+" date"]}}checkForUnexpandedTemplateText(e){return new Dd().findUnexpandedDateText(e)}};var xd=class extends Et{fieldName(){return"created"}date(t){return t.createdDate}filterResultIfFieldMissing(){return!1}};var Od=class extends Et{fieldName(){return"done"}date(t){return t.doneDate}filterResultIfFieldMissing(){return!1}};var uo=class extends Et{fieldName(){return"due"}date(t){return t.dueDate}filterResultIfFieldMissing(){return!1}};var ur=class extends We{constructor(){super(...arguments);this._filters=new yn}canCreateFilterForLine(e){return this._filters.canCreateFilterForLine(e)}createFilterOrErrorMessage(e){return this._filters.createFilterOrErrorMessage(e)}filterRegExp(){return null}};var Cd=class extends ur{constructor(){super(),this._filters.add("exclude sub-items",t=>{if(t.indentation==="")return!0;let e=t.indentation.lastIndexOf(">");return e===-1?!1:/^ ?$/.test(t.indentation.slice(e+1))})}fieldName(){return"exclude"}};function Md(n,t){return[["task",n],["query",t?t.query:null]]}function mE(n,t,e){let r=Md(n,e||null),i=_u(r,t);return i.error?i.error:qy(i.queryComponent,r,t)}var wu=class{constructor(t){this.line=t,this.functionOrError=_u(Md(null,null),t)}isValid(){return this.functionOrError.isValid()}get parseError(){return this.functionOrError.error}evaluate(t,e){if(!this.isValid())throw Error(`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`);return vu(this.functionOrError.queryComponent,Md(t,e||null))}evaluateOrCatch(t,e){return this.isValid()?qy(this.functionOrError.queryComponent,Md(t,e),this.line):`Error: Cannot evaluate an expression which is not valid: "${this.line}" gave error: "${this.parseError}"`}};Cs();function Gy(n){if(n===null)return"null";let t=typeof n;return t==="object"?n.constructor.name:t}var Rd=class extends We{createFilterOrErrorMessage(t){let e=We.getMatch(this.filterRegExp(),t);if(e===null)return ke.fromError(t,"Unable to parse line");let r=e[1],i=new wu(r);return i.isValid()?ke.fromFilter(new zt(t,QU(i),new qe(t))):ke.fromError(t,i.parseError)}fieldName(){return"function"}filterRegExp(){return new RegExp(`^filter by ${this.fieldNameSingularEscaped()} (.*)`,"i")}supportsSorting(){return!0}sorterRegExp(){return new RegExp(`^sort by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}createSorterFromLine(t){let e=We.getMatch(this.sorterRegExp(),t);if(e===null)return null;let r=!!e[1],i=e[2],s=new wu(i);if(!s.isValid())throw new Error(s.parseError);let a=(o,l,u)=>{try{let c=u.queryContext(),d=this.validateTaskSortKey(s.evaluate(o,c)),f=this.validateTaskSortKey(s.evaluate(l,c));return this.compareTaskSortKeys(d,f)}catch(c){throw c instanceof Error&&(c.message+=`: while evaluating instruction '${t}'`),c}};return new Rr(t,this.fieldNameSingular(),a,r)}validateTaskSortKey(t){function e(r){throw new Error(`"${r}" is not a valid sort key`)}return t===void 0&&e("undefined"),Number.isNaN(t)&&e("NaN (Not a Number)"),Array.isArray(t)&&e("array"),t}compareTaskSortKeys(t,e){let r=Gy(t),i=Gy(e),s=this.compareTaskSortKeysIfOptionalMoment(t,e,r,i);if(s!==void 0)return s;let a=this.compareTaskSortKeysIfEitherIsNull(t,e);if(a!==void 0)return a;if(r!==i)throw new Error(`Unable to compare two different sort key types '${r}' and '${i}' order`);if(r==="string")return t.localeCompare(e,void 0,{numeric:!0});if(r==="TasksDate")return Qn(t.moment,e.moment);if(r==="boolean")return Number(e)-Number(t);let o=Number(t)-Number(e);if(isNaN(o))throw new Error(`Unable to determine sort order for sort key types '${r}' and '${i}'`);return o}compareTaskSortKeysIfOptionalMoment(t,e,r,i){let s=r==="Moment",a=i==="Moment";if(s&&a||s&&e===null||a&&t===null)return Qn(t,e)}compareTaskSortKeysIfEitherIsNull(t,e){if(t===null&&e===null)return 0;if(t===null&&e!==null)return-1;if(t!==null&&e===null)return 1}supportsGrouping(){return!0}createGrouperFromLine(t){let e=We.getMatch(this.grouperRegExp(),t);if(e===null)return null;let r=!!e[1],i=e[2];return new Xi(t,"function",ZU(i),r)}grouperRegExp(){return new RegExp(`^group by ${this.fieldNameSingularEscaped()}( reverse)? (.*)`,"i")}grouper(){throw Error("grouper() function not valid for FunctionField. Use createGrouperFromLine() instead.")}};function QU(n){return(t,e)=>{let r=e.queryContext();return XU(n,t,r)}}function XU(n,t,e){let r=n.evaluate(t,e);if(typeof r=="boolean")return r;throw Error(`filtering function must return true or false. This returned "${r}".`)}function ZU(n){return(t,e)=>{let r=e.queryContext();return JU(t,n,r)}}function JU(n,t,e){try{let r=mE(n,t,e);return Array.isArray(r)?r.map(s=>s.toString()):r===null?[]:typeof r=="number"&&!Number.isInteger(r)?[r.toFixed(5)]:[r.toString()]}catch(r){let i=`Error: Failed calculating expression "${t}". The error message was: `;return r instanceof Error?[i+r.message]:[i+"Unknown error"]}}var Ad=class extends Ze{fieldName(){return"heading"}value(t){return t.precedingHeader?t.precedingHeader:""}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return t=>t.precedingHeader===null||t.precedingHeader.length===0?["(No heading)"]:[t.precedingHeader]}};var co=class extends Ze{fieldName(){return"path"}value(t){return t.path}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return t=>[Ze.escapeMarkdownCharacters(t.path.replace(".md",""))]}};ja();var By=class extends We{createFilterOrErrorMessage(t){var r;let e=We.getMatch(this.filterRegExp(),t);if(e!==null){let i=e[5],s=null;switch(i.toLowerCase()){case"lowest":s="5";break;case"low":s="4";break;case"none":s="3";break;case"medium":s="2";break;case"high":s="1";break;case"highest":s="0";break}if(s===null)return ke.fromError(t,"do not understand priority");let a=t,o;switch((r=e[3])==null?void 0:r.toLowerCase()){case"above":o=l=>l.priority.localeCompare(s)<0;break;case"below":o=l=>l.priority.localeCompare(s)>0;break;case"not":o=l=>l.priority!==s;break;default:o=l=>l.priority===s,a=`${this.fieldName()} is ${i}`}return ke.fromFilter(new zt(t,o,new qe(a)))}else return ke.fromError(t,"do not understand query filter (priority)")}fieldName(){return"priority"}filterRegExp(){return By.priorityRegexp}supportsSorting(){return!0}comparator(){return(t,e)=>t.priority.localeCompare(e.priority)}supportsGrouping(){return!0}grouper(){return t=>[t.priorityNameGroupText]}},Js=By;Js.priorityRegexp=/^priority(\s+is)?(\s+(above|below|not))?(\s+(lowest|low|none|medium|high|highest))$/i;var Pd=class extends Et{fieldName(){return"scheduled"}date(t){return t.scheduledDate}filterResultIfFieldMissing(){return!1}};var Nd=class extends Et{fieldName(){return"start"}fieldNameForFilterInstruction(){return"starts"}date(t){return t.startDate}filterResultIfFieldMissing(){return!0}};var Id=class extends Et{constructor(){let t=new yn;t.add("has happens date",e=>this.dates(e).some(r=>r!==null)),t.add("no happens date",e=>!this.dates(e).some(r=>r!==null)),super(t)}fieldName(){return"happens"}fieldNameForExplanation(){return"due, start or scheduled"}date(t){return this.earliestDate(t)}dates(t){return t.happensDates}earliestDate(t){return t.happens.moment}filterResultIfFieldMissing(){return!1}getFilter(t){return e=>this.dates(e).some(r=>t(r))}};var Fd=class extends ur{constructor(){super(),this._filters.add("is recurring",t=>t.recurrence!==null),this._filters.add("is not recurring",t=>t.recurrence===null)}fieldName(){return"recurring"}supportsSorting(){return!0}comparator(){return(t,e)=>t.recurrence!==null&&e.recurrence===null?-1:t.recurrence===null&&e.recurrence!==null?1:0}supportsGrouping(){return!0}grouper(){return t=>t.recurrence!==null?["Recurring"]:["Not Recurring"]}};var Zi=class extends ur{constructor(){super(),this._filters.add("done",t=>t.isDone),this._filters.add("not done",t=>!t.isDone)}fieldName(){return"status"}supportsSorting(){return!0}comparator(){return(t,e)=>{let r=Zi.oldStatusName(t),i=Zi.oldStatusName(e);return r<i?1:r>i?-1:0}}static oldStatusName(t){return t.isDone?"Done":"Todo"}supportsGrouping(){return!0}grouper(){return t=>[Zi.oldStatusName(t)]}};var Ld=class extends Ze{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(t){return this.values(t).join(", ")}getFilter(t,e){return r=>{let i=t.matchesAnyOf(this.values(r));return e?!i:i}}createGrouper(t){return new Xi(this.grouperInstruction(t),this.fieldNamePlural(),this.grouper(),t)}grouperRegExp(){if(!this.supportsGrouping())throw Error(`grouperRegExp() unimplemented for ${this.fieldNameSingular()}`);return new RegExp(`^group by ${this.fieldNamePlural()}( reverse)?$`,"i")}grouperInstruction(t){let e=`group by ${this.fieldNamePlural()}`;return t&&(e+=" reverse"),e}};var ea=class extends Ld{constructor(){super();this.filterInstructions=new yn,this.filterInstructions.add(`has ${this.fieldNameSingular()}`,e=>this.values(e).length>0),this.filterInstructions.add(`has ${this.fieldNamePlural()}`,e=>this.values(e).length>0),this.filterInstructions.add(`no ${this.fieldNameSingular()}`,e=>this.values(e).length===0),this.filterInstructions.add(`no ${this.fieldNamePlural()}`,e=>this.values(e).length===0)}createFilterOrErrorMessage(e){let r=this.filterInstructions.createFilterOrErrorMessage(e);return r.isValid()?r:super.createFilterOrErrorMessage(e)}canCreateFilterForLine(e){return this.filterInstructions.canCreateFilterForLine(e)?!0:super.canCreateFilterForLine(e)}fieldNameSingular(){return"tag"}values(e){return e.tags}supportsSorting(){return!0}createSorterFromLine(e){let r=e.match(this.sorterRegExp());if(r===null)return null;let i=!!r[1],s=isNaN(+r[2])?1:+r[2],a=ea.makeCompareByTagComparator(s);return new Rr(e,this.fieldNameSingular(),a,i)}sorterRegExp(){return/^sort by tag( reverse)?[\s]*(\d+)?/i}comparator(){return ea.makeCompareByTagComparator(1)}static makeCompareByTagComparator(e){return(r,i)=>{if(r.tags.length===0&&i.tags.length===0)return 0;if(r.tags.length===0)return 1;if(i.tags.length===0)return-1;let s=e-1;if(r.tags.length<e&&i.tags.length>=e)return 1;if(i.tags.length<e&&r.tags.length>=e)return-1;if(r.tags.length<e&&i.tags.length<e)return 0;let a=r.tags[s],o=i.tags[s];return a.localeCompare(o,void 0,{numeric:!0})}}supportsGrouping(){return!0}grouper(){return e=>e.tags.length==0?["(No tags)"]:e.tags}};var OE=qo(xE());iu();function Ji(n){return new RegExp("["+qi(n)+"]").source}var nb=[["(",")"],["[","]"],["{","}"],['"','"']],xi=class{constructor(t,e,r){this.openFilterChars=t,this.closeFilterChars=e,this.openAndCloseFilterChars=r,this.openFilter=Ji(this.openFilterChars),this.closeFilter=Ji(this.closeFilterChars)}static allSupportedDelimiters(){let t="",e="",r="";for(let[i,s]of nb)t+=i,e+=s,r+=xi.openAndClosing(i,s);return new xi(t,e,r)}static fromInstructionLine(t){let e=t.trim(),i=/^[A-Z ]*\s*(.*)/.exec(e);if(i){let a=i[1],o=a[0],l=a.slice(-1);for(let[u,c]of nb)if(o===u&&l===c){let d=this.openAndClosing(u,c);return new xi(u,c,d)}}let s="All filters in a Boolean instruction must be inside one of these pairs of delimiter characters: "+nb.map(([a,o])=>a+"..."+o).join(" or ")+". Combinations of those delimiters are no longer supported.";throw new Error(s)}static openAndClosing(t,e){let r=t;return e!=t&&(r+=e),r}};var es=class{static preprocessExpression(t,e){let r=es.splitLine(t,e);return es.getFiltersAndSimplifiedLine(r,e)}static splitLine(t,e){let r=new RegExp("("+e.closeFilter+"\\s*(?:AND|OR|AND +NOT|OR +NOT|XOR)\\s*"+e.openFilter+")"),i=t.split(r),s=new RegExp("(NOT\\s*"+e.openFilter+")"),a=i.flatMap(u=>u.split(s)).filter(u=>u!==""),o=new RegExp("(^"+Ji(e.openFilterChars+" ")+"*)"),l=new RegExp("("+Ji(e.closeFilterChars+" ")+"*$)");return a.flatMap(u=>u.split(o)).flatMap(u=>u.split(l)).filter(u=>u!=="")}static getFiltersAndSimplifiedLine(t,e){let r="",i=1,s={};t.forEach(u=>{if(!es.isAFilter(u,e))r+=`${u}`;else{let c=`f${i}`;s[c]=u,r+=c,i++}});let a=new RegExp(`(${e.closeFilter})([A-Z])`,"g");r=r.replace(a,"$1 $2");let o=new RegExp(`([A-Z])(${e.openFilter})`,"g");r=r.replace(o,"$1 $2");let l=e.openFilterChars;if(l!='"'&&l!="("){let u=new RegExp(Ji(l),"g");r=r.replace(u,"(");let c=e.closeFilterChars,d=new RegExp(Ji(c),"g");r=r.replace(d,")")}return{simplifiedLine:r,filters:s}}static isAFilter(t,e){let r=new RegExp("^"+Ji(" "+e.openAndCloseFilterChars)+"+$"),i=new RegExp("^ *"+e.closeFilter+" *(AND|OR|XOR) *"+e.openFilter+" *$"),s=new RegExp("^(AND|OR|XOR|NOT) *"+e.openFilter+"$"),a=new RegExp("^"+e.closeFilter+" *(AND|OR|XOR)$");return![r,i,s,a,/^(AND|OR|XOR|NOT)$/].some(l=>RegExp(l).exec(t))}};var $d=class extends We{constructor(){super();this.supportedOperators=["AND","OR","XOR","NOT"];this.subFields={};let e=xi.allSupportedDelimiters();this.basicBooleanRegexp=new RegExp("(.*(AND|OR|XOR|NOT)\\s*"+e.openFilter+".*|"+e.openFilter+".+"+e.closeFilter+")","g")}filterRegExp(){return this.basicBooleanRegexp}createFilterOrErrorMessage(e){return this.parseLine(e)}fieldName(){return"boolean query"}parseLine(e){if(e.length===0)return ke.fromError(e,"empty line");let r;try{r=xi.fromInstructionLine(e)}catch(o){let l=o instanceof Error?o.message:"unknown error type";return ke.fromError(e,this.helpMessageFromSimpleError(e,l))}let i=es.preprocessExpression(e,r),s=i.simplifiedLine,a=i.filters;try{let o=(0,OE.parse)(s);for(let c of o)if(c.name==="IDENTIFIER"&&c.value){let d=c.value.trim(),f=a[d];if(c.value=f,!(f in this.subFields)){let p=Su(f);if(p===null)return this.helpMessage(e,`couldn't parse sub-expression '${f}'`,i);if(p.error)return this.helpMessage(e,`couldn't parse sub-expression '${f}': ${p.error}`,i);p.filter&&(this.subFields[f]=p.filter)}}else if(c.name==="OPERATOR"){if(c.value==null)return this.helpMessage(e,"empty operator in boolean query",i);if(!this.supportedOperators.includes(c.value))return this.helpMessage(e,`unknown boolean operator '${c.value}'`,i)}let l=(c,d)=>this.filterTaskWithParsedQuery(c,o,d),u=this.constructExplanation(o);return ke.fromFilter(new zt(e,l,u))}catch(o){let l=o instanceof Error?o.message:"unknown error type";return this.helpMessage(e,`malformed boolean query -- ${l} (check the documentation for guidelines)`,i)}}filterTaskWithParsedQuery(e,r,i){let s=l=>l==="true",a=l=>l?"true":"false",o=[];for(let l of r)if(l.name==="IDENTIFIER"){if(l.value==null)throw Error("null token value");let c=this.subFields[l.value.trim()].filterFunction(e,i);o.push(a(c))}else if(l.name==="OPERATOR")if(l.value==="NOT"){let u=s(o.pop());o.push(a(!u))}else if(l.value==="OR"){let u=s(o.pop()),c=s(o.pop());o.push(a(u||c))}else if(l.value==="AND"){let u=s(o.pop()),c=s(o.pop());o.push(a(u&&c))}else if(l.value==="XOR"){let u=s(o.pop()),c=s(o.pop());o.push(a(u&&!c||!u&&c))}else throw Error("Unsupported operator: "+l.value);else throw Error("Unsupported token type: "+l);return s(o[0])}constructExplanation(e){let r=[];for(let i of e)if(i.name==="IDENTIFIER")this.explainExpression(i,r);else if(i.name==="OPERATOR")this.explainOperator(i,r);else throw Error("Unsupported token type: "+i.name);return r[0]}explainExpression(e,r){if(e.value==null)throw Error("null token value");let i=this.subFields[e.value.trim()],s=this.simulateExplainFilter(i);r.push(s)}simulateExplainFilter(e){return e.simulateExplainFilter()}explainOperator(e,r){if(e.value==="NOT"){let i=r.pop();r.push(qe.booleanNot([i]))}else if(e.value==="OR"){let i=r.pop(),s=r.pop();r.push(qe.booleanOr([s,i]))}else if(e.value==="AND"){let i=r.pop(),s=r.pop();r.push(qe.booleanAnd([s,i]))}else if(e.value==="XOR"){let i=r.pop(),s=r.pop();r.push(qe.booleanXor([s,i]))}else throw Error("Unsupported operator: "+e.value)}helpMessage(e,r,i){let s=i.filters,a=this.stringifySubExpressionsForErrorMessage(s),l=`${this.helpMessageFromSimpleError(e,r)} The instruction was converted to the following simplified line: ${i.simplifiedLine} @@ -339,7 +339,7 @@ For help, see: ${e} The error message is: - ${r}`}};var qd=class extends Ze{fieldName(){return"filename"}value(t){let e=t.filename;return e===null?"":e+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return t=>{let e=t.filename;return e===null?["Unknown Location"]:["[["+e+"]]"]}}};var To=class extends We{canCreateFilterForLine(t){return!1}createFilterOrErrorMessage(t){return ke.fromError(t,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(t,e)=>e.urgency-t.urgency}supportsGrouping(){return!0}grouper(){return t=>[`${t.urgency.toFixed(2)}`]}createGrouper(t){return super.createGrouper(!t)}grouperInstruction(t){return super.grouperInstruction(!t)}};var Hd=class extends Ze{constructor(){super()}fieldName(){return"status.name"}value(t){return t.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};Cn();var ti=class extends We{canCreateFilterForLine(t){let e=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`,"i");return We.lineMatchesFilter(e,t)}createFilterOrErrorMessage(t){let e=We.getMatch(this.filterRegExp(),t);if(e===null)return this.helpMessage(t);let r=e[1].toLowerCase(),i=e[2],s=Gt[i.toUpperCase()];if(!s)return this.helpMessage(t);let a;switch(r){case"is":a=o=>o.status.type===s;break;case"is not":a=o=>o.status.type!==s;break;default:return this.helpMessage(t)}return ke.fromFilter(new Vt(t,a,new qe(t)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`,"i")}helpMessage(t){let e=Object.values(Gt).filter(i=>i!=="EMPTY").join(" "),r=`Invalid ${this.fieldNameSingular()} instruction: '${t}'. + ${r}`}};var qd=class extends Ze{fieldName(){return"filename"}value(t){let e=t.filename;return e===null?"":e+".md"}supportsSorting(){return!0}supportsGrouping(){return!0}grouper(){return t=>{let e=t.filename;return e===null?["Unknown Location"]:["[["+e+"]]"]}}};var To=class extends We{canCreateFilterForLine(t){return!1}createFilterOrErrorMessage(t){return ke.fromError(t,"Filtering by urgency is not yet supported")}fieldName(){return"urgency"}filterRegExp(){throw Error(`filterRegExp() unimplemented for ${this.fieldName()}`)}supportsSorting(){return!0}comparator(){return(t,e)=>e.urgency-t.urgency}supportsGrouping(){return!0}grouper(){return t=>[`${t.urgency.toFixed(2)}`]}createGrouper(t){return super.createGrouper(!t)}grouperInstruction(t){return super.grouperInstruction(!t)}};var Hd=class extends Ze{constructor(){super()}fieldName(){return"status.name"}value(t){return t.status.name}supportsSorting(){return!0}supportsGrouping(){return!0}};Cn();var ti=class extends We{canCreateFilterForLine(t){let e=new RegExp(`^(?:${this.fieldNameSingularEscaped()})`,"i");return We.lineMatchesFilter(e,t)}createFilterOrErrorMessage(t){let e=We.getMatch(this.filterRegExp(),t);if(e===null)return this.helpMessage(t);let r=e[1].toLowerCase(),i=e[2],s=Gt[i.toUpperCase()];if(!s)return this.helpMessage(t);let a;switch(r){case"is":a=o=>o.status.type===s;break;case"is not":a=o=>o.status.type!==s;break;default:return this.helpMessage(t)}return ke.fromFilter(new zt(t,a,new qe(t)))}filterRegExp(){return new RegExp(`^(?:${this.fieldNameSingularEscaped()}) (is|is not) ([^ ]+)$`,"i")}helpMessage(t){let e=Object.values(Gt).filter(i=>i!=="EMPTY").join(" "),r=`Invalid ${this.fieldNameSingular()} instruction: '${t}'. Allowed options: 'is' and 'is not' (without quotes). Allowed values: ${e} Note: values are case-insensitive, @@ -370,12 +370,12 @@ ${t.source}`,this.tasksFile)}explainQuery(){return new ao().explainQuery(this)}g Problem line: "${t.rawInstruction}"`:`${e} Problem statement: ${t.explainStatement(" ")} -`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(t){this.debug(`[search] Executing query: ${this.formatQueryForLogging()}`);let e=new ts(this.tasksFile,t),r;try{this.filters.forEach(l=>{r=l.statement,t=t.filter(u=>l.filterFunction(u,e))}),r=void 0;let{debugSettings:i}=le(),s=i.ignoreSortInstructions?t:vo.by(this.sorting,t,e),a=s.slice(0,this.limit),o=new _o(this.grouping,a,e);return this._taskGroupLimit!==void 0&&o.applyTaskLimit(this._taskGroupLimit),new ra(o,s.length)}catch(i){let a=Xs("Search failed",i);return r&&(a=Ln.generateErrorMessage(r,a)),ra.fromError(a)}}parseHideOptions(t){let e=t.anyPlaceholdersExpanded,r=e.match(this.hideOptionsRegexp);if(r===null)return;let i=r[1].toLowerCase()==="hide",s=r[2].toLowerCase();if(iE(this._queryLayoutOptions,s,i)){this.saveLayoutStatement(t);return}if(kS(this._taskLayoutOptions,s,!i)){this.saveLayoutStatement(t);return}this.setError("do not understand hide/show option",new gn(e,e))}saveLayoutStatement(t){this.layoutStatements.push(t)}parseFilter(t,e){var i;let r=Su(t);return r!=null?(r.filter?(r.filter.setStatement(e),this._filters.push(r.filter)):this.setError((i=r.error)!=null?i:"Unknown error",e),!0):!1}parseLimit(t){let e=t.match(this.limitRegexp);if(e===null){this.setError("do not understand query limit",new gn(t,t));return}let r=Number.parseInt(e[3],10);e[1]!==void 0?this._taskGroupLimit=r:this._limit=r}parseSortBy(t,e){let r=CE(t);return r?(r.setStatement(e),this._sorting.push(r),!0):!1}parseGroupBy(t,e){let r=ME(t);return r?(r.setStatement(e),this._grouping.push(r),!0):!1}generateQueryId(t){return IE+=1,IE.toString().padStart(t,"0")}debug(t,e){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${t}`,e)}};var ib=[{name:"TQ_explain",type:"checkbox",display:"explain",handler:"instruction",trueValue:"explain",falseValue:""},{name:"TQ_short_mode",type:"checkbox",display:"short mode",handler:"instruction",trueValue:"short mode",falseValue:"full mode"},{name:"TQ_show_tree",type:"checkbox",display:"tree",handler:"showAndHide"},{name:"TQ_show_tags",type:"checkbox",display:"tags",handler:"showAndHide"},{name:"TQ_show_id",type:"checkbox",display:"id",handler:"showAndHide"},{name:"TQ_show_depends_on",type:"checkbox",display:"depends on",handler:"showAndHide"},{name:"TQ_show_priority",type:"checkbox",display:"priority",handler:"showAndHide"},{name:"TQ_show_recurrence_rule",type:"checkbox",display:"recurrence rule",handler:"showAndHide"},{name:"TQ_show_on_completion",type:"checkbox",display:"on completion",handler:"showAndHide"},{name:"TQ_show_created_date",type:"checkbox",display:"created date",handler:"showAndHide"},{name:"TQ_show_start_date",type:"checkbox",display:"start date",handler:"showAndHide"},{name:"TQ_show_scheduled_date",type:"checkbox",display:"scheduled date",handler:"showAndHide"},{name:"TQ_show_due_date",type:"checkbox",display:"due date",handler:"showAndHide"},{name:"TQ_show_cancelled_date",type:"checkbox",display:"cancelled date",handler:"showAndHide"},{name:"TQ_show_done_date",type:"checkbox",display:"done date",handler:"showAndHide"},{name:"TQ_show_urgency",type:"checkbox",display:"urgency",handler:"showAndHide"},{name:"TQ_show_backlink",type:"checkbox",display:"backlink",handler:"showAndHide"},{name:"TQ_show_edit_button",type:"checkbox",display:"edit button",handler:"showAndHide"},{name:"TQ_show_postpone_button",type:"checkbox",display:"postpone button",handler:"showAndHide"},{name:"TQ_show_task_count",type:"checkbox",display:"task count",handler:"showAndHide"},{name:"TQ_extra_instructions",type:"text",handler:"addValue"}],Oi=class{source(t){return t?ib.map(r=>this.generateInstruction(t,r)).filter(r=>r!=="").join(` -`):""}generateInstruction(t,e){let r=t.hasProperty(e.name),i=t.property(e.name);switch(e.handler){case"instruction":return r&&(i?e.trueValue:e.falseValue)||"";case"showAndHide":return r&&(i?"show "+e.display:"hide "+e.display)||"";case"addValue":return r&&i||"";default:throw new Error("Unknown handler type: "+e.handler+".")}}query(t){return new Ln(this.source(t),t)}allPropertyNames(){return ib.map(t=>t.name)}allPropertyNamesSorted(){return this.allPropertyNames().sort((t,e)=>t.localeCompare(e))}propertyType(t){var e,r;return(r=(e=ib.find(i=>i.name===t))==null?void 0:e.type)!=null?r:void 0}metaBindPluginWidgets(){return"\nshort mode: `INPUT[toggle:TQ_short_mode]`\ntree: `INPUT[toggle:TQ_show_tree]`\ntags: `INPUT[toggle:TQ_show_tags]`\nid: `INPUT[toggle:TQ_show_id]` depends on: `INPUT[toggle:TQ_show_depends_on]`\npriority: `INPUT[toggle:TQ_show_priority]`\nrecurrence rule: `INPUT[toggle:TQ_show_recurrence_rule]` on completion: `INPUT[toggle:TQ_show_on_completion]`\nstart date: `INPUT[toggle:TQ_show_start_date]` scheduled date: `INPUT[toggle:TQ_show_scheduled_date]` due date: `INPUT[toggle:TQ_show_due_date]`\ncreated date: `INPUT[toggle:TQ_show_created_date]` cancelled date: `INPUT[toggle:TQ_show_cancelled_date]` done date: `INPUT[toggle:TQ_show_done_date]`\nurgency: `INPUT[toggle:TQ_show_urgency]`\nbacklink: `INPUT[toggle:TQ_show_backlink]`\nedit button: `INPUT[toggle:TQ_show_edit_button]` postpone button: `INPUT[toggle:TQ_show_postpone_button]`\ntask count: `INPUT[toggle:TQ_show_task_count]`\nextra instructions: `INPUT[textArea:TQ_extra_instructions]`\nexplain: `INPUT[toggle:TQ_explain]`\n"}};function FE(n,t){return F(this,null,function*(){yield n.fileManager.processFrontMatter(t,e=>{let r=new Oi().allPropertyNamesSorted(),i=!1;r.forEach(s=>{s in e||(e[s]=null,i=!0)}),i?new sb.Notice("Properties updated successfully."):new sb.Notice("All supported properties are already present.")})})}var of=class{get app(){return this.plugin.app}constructor({plugin:t}){this.plugin=t,t.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(e,r,i)=>nE(e,r,i,this.app,this.plugin.getTasks())}),t.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:rE}),t.addCommand({id:"add-query-file-defaults-properties",name:"Add all Query File Defaults properties",icon:"settings",checkCallback:e=>{let r=this.app.workspace.getActiveFile();return!r||r.extension!=="md"?!1:(e||this.ensureQueryFileDefaultsFrontmatter(r).catch(console.error),!0)}})}ensureQueryFileDefaultsFrontmatter(t){return F(this,null,function*(){let{app:e}=this;yield FE(e,t)})}};var ns=class{constructor(t=ns.empty){this._source=t}static getInstance(){return ns.instance||(ns.instance=new ns),ns.instance}set(t){this._source=t}query(t=void 0){let e=new Ln(this._source,t);return e.removeIllegalGlobalQueryInstructions(),e}hasInstructions(){return this._source.trim()!==ns.empty}},fr=ns;fr.empty="";Ws();var lf=class{constructor({obsidianEvents:t}){this.logger=sn.getLogger("tasks.Events");this.obsidianEvents=t}onCacheUpdate(t){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",t)}triggerCacheUpdate(t){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",t)}onRequestCacheUpdate(t){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",t)}triggerRequestCacheUpdate(t){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",t)}off(t){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(t)}};var ox=require("obsidian");Mn();Is();Nt();var ax=require("obsidian");Mn();rn();Is();wi();Nt();ii();Dr();Ga();var ab=class{constructor(t){this.newStatus=t}apply(t){return this.isCheckedForTask(t)?[t]:t.handleNewStatusWithRecurrenceInUsersOrder(this.newStatus)}instructionDisplayName(){return`Change status to: [${this.newStatus.symbol}] ${this.newStatus.name}`}isCheckedForTask(t){return this.newStatus.symbol===t.status.symbol}};function LE(n){let t=[],e=new et().coreStatuses.map(r=>r.symbol);for(let r of[!0,!1])for(let i of n.registeredStatuses)e.includes(i.symbol)===r&&t.push(new ab(i));return t}var UE=require("obsidian");var ob="---",wo=class{apply(t){throw new Error("MenuDividerInstruction.apply(): Method not implemented.")}instructionDisplayName(){return ob}isCheckedForTask(t){return!1}};function ni(n,t){return F(this,null,function*(){yield Nn({originalTask:n,newTasks:t})})}var rs=class extends UE.Menu{constructor(e){super();this.taskSaver=e}addItemsForInstructions(e,r){for(let i of e)this.addItemForInstruction(r,i)}addItemForInstruction(e,r){r.instructionDisplayName()===ob?this.addSeparator():this.addItem(i=>this.getMenuItemCallback(e,i,r))}getMenuItemCallback(e,r,i){r.setTitle(i.instructionDisplayName()).setChecked(i.isCheckedForTask(e)).onClick(()=>F(this,null,function*(){let s=i.apply(e);(s.length!==1||!Object.is(s[0],e))&&(yield this.taskSaver(e,s))}))}};var uf=class extends rs{constructor(t,e,r=ni){super(r);let i=LE(t);this.addItemsForInstructions(i,e)}};var cf=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],is={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console!="undefined"&&console.warn(n)},getWeek:function(n){var t=new Date(n.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var e=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};var df={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var t=n%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},ff=df;var Qt=function(n,t){return t===void 0&&(t=2),("000"+n).slice(t*-1)},bn=function(n){return n===!0?1:0};function lb(n,t){var e;return function(){var r=this,i=arguments;clearTimeout(e),e=setTimeout(function(){return n.apply(r,i)},t)}}var pf=function(n){return n instanceof Array?n:[n]};function Xt(n,t,e){if(e===!0)return n.classList.add(t);n.classList.remove(t)}function $e(n,t,e){var r=window.document.createElement(n);return t=t||"",e=e||"",r.className=t,e!==void 0&&(r.textContent=e),r}function Du(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function ub(n,t){if(t(n))return n;if(n.parentNode)return ub(n.parentNode,t)}function Eu(n,t){var e=$e("div","numInputWrapper"),r=$e("input","numInput "+n),i=$e("span","arrowUp"),s=$e("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var a in t)r.setAttribute(a,t[a]);return e.appendChild(r),e.appendChild(i),e.appendChild(s),e}function Tn(n){try{if(typeof n.composedPath=="function"){var t=n.composedPath();return t[0]}return n.target}catch(e){return n.target}}var cb=function(){},xu=function(n,t,e){return e.months[t?"shorthand":"longhand"][n]},YE={D:cb,F:function(n,t,e){n.setMonth(e.months.longhand.indexOf(t))},G:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},H:function(n,t){n.setHours(parseFloat(t))},J:function(n,t){n.setDate(parseFloat(t))},K:function(n,t,e){n.setHours(n.getHours()%12+12*bn(new RegExp(e.amPM[1],"i").test(t)))},M:function(n,t,e){n.setMonth(e.months.shorthand.indexOf(t))},S:function(n,t){n.setSeconds(parseFloat(t))},U:function(n,t){return new Date(parseFloat(t)*1e3)},W:function(n,t,e){var r=parseInt(t),i=new Date(n.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+e.firstDayOfWeek),i},Y:function(n,t){n.setFullYear(parseFloat(t))},Z:function(n,t){return new Date(t)},d:function(n,t){n.setDate(parseFloat(t))},h:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},i:function(n,t){n.setMinutes(parseFloat(t))},j:function(n,t){n.setDate(parseFloat(t))},l:cb,m:function(n,t){n.setMonth(parseFloat(t)-1)},n:function(n,t){n.setMonth(parseFloat(t)-1)},s:function(n,t){n.setSeconds(parseFloat(t))},u:function(n,t){return new Date(parseFloat(t))},w:cb,y:function(n,t){n.setFullYear(2e3+parseFloat(t))}},Ci={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},ko={Z:function(n){return n.toISOString()},D:function(n,t,e){return t.weekdays.shorthand[ko.w(n,t,e)]},F:function(n,t,e){return xu(ko.n(n,t,e)-1,!1,t)},G:function(n,t,e){return Qt(ko.h(n,t,e))},H:function(n){return Qt(n.getHours())},J:function(n,t){return t.ordinal!==void 0?n.getDate()+t.ordinal(n.getDate()):n.getDate()},K:function(n,t){return t.amPM[bn(n.getHours()>11)]},M:function(n,t){return xu(n.getMonth(),!0,t)},S:function(n){return Qt(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,t,e){return e.getWeek(n)},Y:function(n){return Qt(n.getFullYear(),4)},d:function(n){return Qt(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return Qt(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,t){return t.weekdays.longhand[n.getDay()]},m:function(n){return Qt(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}};var db=function(n){var t=n.config,e=t===void 0?is:t,r=n.l10n,i=r===void 0?df:r,s=n.isMobile,a=s===void 0?!1:s;return function(o,l,u){var c=u||i;return e.formatDate!==void 0&&!a?e.formatDate(o,l,c):l.split("").map(function(d,f,p){return ko[d]&&p[f-1]!=="\\"?ko[d](o,c,e):d!=="\\"?d:""}).join("")}},mf=function(n){var t=n.config,e=t===void 0?is:t,r=n.l10n,i=r===void 0?df:r;return function(s,a,o,l){if(!(s!==0&&!s)){var u=l||i,c,d=s;if(s instanceof Date)c=new Date(s.getTime());else if(typeof s!="string"&&s.toFixed!==void 0)c=new Date(s);else if(typeof s=="string"){var f=a||(e||is).dateFormat,p=String(s).trim();if(p==="today")c=new Date,o=!0;else if(e&&e.parseDate)c=e.parseDate(s,f);else if(/Z$/.test(p)||/GMT$/.test(p))c=new Date(s);else{for(var b=void 0,T=[],_=0,O=0,E="";_<f.length;_++){var A=f[_],Y=A==="\\",q=f[_-1]==="\\"||Y;if(Ci[A]&&!q){E+=Ci[A];var se=new RegExp(E).exec(s);se&&(b=!0)&&T[A!=="Y"?"push":"unshift"]({fn:YE[A],val:se[++O]})}else Y||(E+=".")}c=!e||!e.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),T.forEach(function(H){var Z=H.fn,ye=H.val;return c=Z(c,ye,u)||c}),c=b?c:void 0}}if(!(c instanceof Date&&!isNaN(c.getTime()))){e.errorHandler(new Error("Invalid date provided: "+d));return}return o===!0&&c.setHours(0,0,0,0),c}}};function _n(n,t,e){return e===void 0&&(e=!0),e!==!1?new Date(n.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):n.getTime()-t.getTime()}var jE=function(n,t,e){return n>Math.min(t,e)&&n<Math.max(t,e)},hf=function(n,t,e){return n*3600+t*60+e},WE=function(n){var t=Math.floor(n/3600),e=(n-t*3600)/60;return[t,e,n-t*3600-e*60]},$E={DAY:864e5};function gf(n){var t=n.defaultHour,e=n.defaultMinute,r=n.defaultSeconds;if(n.minDate!==void 0){var i=n.minDate.getHours(),s=n.minDate.getMinutes(),a=n.minDate.getSeconds();t<i&&(t=i),t===i&&e<s&&(e=s),t===i&&e===s&&r<a&&(r=n.minDate.getSeconds())}if(n.maxDate!==void 0){var o=n.maxDate.getHours(),l=n.maxDate.getMinutes();t=Math.min(t,o),t===o&&(e=Math.min(l,e)),t===o&&e===l&&(r=n.maxDate.getSeconds())}return{hours:t,minutes:e,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var r=function(o){o&&Object.keys(o).forEach(function(l){return n[l]=o[l]})},i=0,s=t;i<s.length;i++){var a=s[i];r(a)}return n});var Zt=function(){return Zt=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Zt.apply(this,arguments)},qE=function(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;for(var r=Array(n),i=0,t=0;t<e;t++)for(var s=arguments[t],a=0,o=s.length;a<o;a++,i++)r[i]=s[a];return r},MY=300;function RY(n,t){var e={config:Zt(Zt({},is),pt.defaultConfig),l10n:ff};e.parseDate=mf({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=T,e._setHoursFromDate=f,e._positionCalendar=us,e.changeMonth=S,e.changeYear=W,e.clear=M,e.close=I,e.onMouseOver=Le,e._createElement=$e,e.createDay=se,e.destroy=j,e.isEnabled=ce,e.jumpToDate=E,e.updateValue=hr,e.open=pr,e.redraw=oa,e.set=Ro,e.setDate=Ai,e.toggle=jn;function r(){e.utils={getDaysInMonth:function(h,g){return h===void 0&&(h=e.currentMonth),g===void 0&&(g=e.currentYear),h===1&&(g%4===0&&g%100!==0||g%400===0)?29:e.l10n.daysInMonth[h]}}}function i(){e.element=e.input=n,e.isOpen=!1,te(),it(),ua(),Au(),r(),e.isMobile||q(),O(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&f(e.config.noCalendar?e.latestSelectedDateObj:void 0),hr(!1)),o();var h=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&h&&us(),Xe("onReady")}function s(){var h;return((h=e.calendarContainer)===null||h===void 0?void 0:h.getRootNode()).activeElement||document.activeElement}function a(h){return h.bind(e)}function o(){var h=e.config;h.weekNumbers===!1&&h.showMonths===1||h.noCalendar!==!0&&window.requestAnimationFrame(function(){if(e.calendarContainer!==void 0&&(e.calendarContainer.style.visibility="hidden",e.calendarContainer.style.display="block"),e.daysContainer!==void 0){var g=(e.days.offsetWidth+1)*h.showMonths;e.daysContainer.style.width=g+"px",e.calendarContainer.style.width=g+(e.weekWrapper!==void 0?e.weekWrapper.offsetWidth:0)+"px",e.calendarContainer.style.removeProperty("visibility"),e.calendarContainer.style.removeProperty("display")}})}function l(h){if(e.selectedDates.length===0){var g=e.config.minDate===void 0||_n(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),k=gf(e.config);g.setHours(k.hours,k.minutes,k.seconds,g.getMilliseconds()),e.selectedDates=[g],e.latestSelectedDateObj=g}h!==void 0&&h.type!=="blur"&&No(h);var R=e._input.value;d(),hr(),e._input.value!==R&&e._debouncedChange()}function u(h,g){return h%12+12*bn(g===e.l10n.amPM[1])}function c(h){switch(h%24){case 0:case 12:return 12;default:return h%12}}function d(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var h=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,g=(parseInt(e.minuteElement.value,10)||0)%60,k=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(h=u(h,e.amPM.textContent));var R=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&_n(e.latestSelectedDateObj,e.config.minDate,!0)===0,G=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&_n(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var X=hf(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),_e=hf(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),ne=hf(h,g,k);if(ne>_e&&ne<X){var Ce=WE(X);h=Ce[0],g=Ce[1],k=Ce[2]}}else{if(G){var ie=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;h=Math.min(h,ie.getHours()),h===ie.getHours()&&(g=Math.min(g,ie.getMinutes())),g===ie.getMinutes()&&(k=Math.min(k,ie.getSeconds()))}if(R){var me=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;h=Math.max(h,me.getHours()),h===me.getHours()&&g<me.getMinutes()&&(g=me.getMinutes()),g===me.getMinutes()&&(k=Math.max(k,me.getSeconds()))}}p(h,g,k)}}function f(h){var g=h||e.latestSelectedDateObj;g&&g instanceof Date&&p(g.getHours(),g.getMinutes(),g.getSeconds())}function p(h,g,k){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(h%24,g,k||0,0),!(!e.hourElement||!e.minuteElement||e.isMobile)&&(e.hourElement.value=Qt(e.config.time_24hr?h:(12+h)%12+12*bn(h%12===0)),e.minuteElement.value=Qt(g),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[bn(h>=12)]),e.secondElement!==void 0&&(e.secondElement.value=Qt(k)))}function b(h){var g=Tn(h),k=parseInt(g.value)+(h.delta||0);(k/1e3>1||h.key==="Enter"&&!/[^\d]/.test(k.toString()))&&W(k)}function T(h,g,k,R){if(g instanceof Array)return g.forEach(function(G){return T(h,G,k,R)});if(h instanceof Array)return h.forEach(function(G){return T(G,g,k,R)});h.addEventListener(g,k,R),e._handlers.push({remove:function(){return h.removeEventListener(g,k,R)}})}function _(){Xe("onChange")}function O(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(k){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+k+"]"),function(R){return T(R,"click",e[k])})}),e.isMobile){cs();return}var h=lb(Yt,50);if(e._debouncedChange=lb(_,MY),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&T(e.daysContainer,"mouseover",function(k){e.config.mode==="range"&&Le(Tn(k))}),T(e._input,"keydown",He),e.calendarContainer!==void 0&&T(e.calendarContainer,"keydown",He),!e.config.inline&&!e.config.static&&T(window,"resize",h),window.ontouchstart!==void 0?T(window.document,"touchstart",P):T(window.document,"mousedown",P),T(window.document,"focus",P,{capture:!0}),e.config.clickOpens===!0&&(T(e._input,"focus",e.open),T(e._input,"click",e.open)),e.daysContainer!==void 0&&(T(e.monthNav,"click",Cf),T(e.monthNav,["keyup","increment"],b),T(e.daysContainer,"click",Yn)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var g=function(k){return Tn(k).select()};T(e.timeContainer,["increment"],l),T(e.timeContainer,"blur",l,{capture:!0}),T(e.timeContainer,"click",A),T([e.hourElement,e.minuteElement],["focus","click"],g),e.secondElement!==void 0&&T(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&T(e.amPM,"click",function(k){l(k)})}e.config.allowInput&&T(e._input,"blur",Oe)}function E(h,g){var k=h!==void 0?e.parseDate(h):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate<e.now?e.config.maxDate:e.now),R=e.currentYear,G=e.currentMonth;try{k!==void 0&&(e.currentYear=k.getFullYear(),e.currentMonth=k.getMonth())}catch(X){X.message="Invalid date supplied: "+k,e.config.errorHandler(X)}g&&e.currentYear!==R&&(Xe("onYearChange"),C()),g&&(e.currentYear!==R||e.currentMonth!==G)&&Xe("onMonthChange"),e.redraw()}function A(h){var g=Tn(h);~g.className.indexOf("arrow")&&Y(h,g.classList.contains("arrowUp")?1:-1)}function Y(h,g,k){var R=h&&Tn(h),G=k||R&&R.parentNode&&R.parentNode.firstChild,X=ca("increment");X.delta=g,G&&G.dispatchEvent(X)}function q(){var h=window.document.createDocumentFragment();if(e.calendarContainer=$e("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(h.appendChild(oe()),e.innerContainer=$e("div","flatpickr-innerContainer"),e.config.weekNumbers){var g=w(),k=g.weekWrapper,R=g.weekNumbers;e.innerContainer.appendChild(k),e.weekNumbers=R,e.weekWrapper=k}e.rContainer=$e("div","flatpickr-rContainer"),e.rContainer.appendChild(y()),e.daysContainer||(e.daysContainer=$e("div","flatpickr-days"),e.daysContainer.tabIndex=-1),K(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),h.appendChild(e.innerContainer)}e.config.enableTime&&h.appendChild(m()),Xt(e.calendarContainer,"rangeMode",e.config.mode==="range"),Xt(e.calendarContainer,"animate",e.config.animate===!0),Xt(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(h);var G=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!G&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var X=$e("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(X,e.element),X.appendChild(e.element),e.altInput&&X.appendChild(e.altInput),X.appendChild(e.calendarContainer)}!e.config.static&&!e.config.inline&&(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}function se(h,g,k,R){var G=ce(g,!0),X=$e("span",h,g.getDate().toString());return X.dateObj=g,X.$i=R,X.setAttribute("aria-label",e.formatDate(g,e.config.ariaDateFormat)),h.indexOf("hidden")===-1&&_n(g,e.now)===0&&(e.todayDateElem=X,X.classList.add("today"),X.setAttribute("aria-current","date")),G?(X.tabIndex=-1,Lr(g)&&(X.classList.add("selected"),e.selectedDateElem=X,e.config.mode==="range"&&(Xt(X,"startRange",e.selectedDates[0]&&_n(g,e.selectedDates[0],!0)===0),Xt(X,"endRange",e.selectedDates[1]&&_n(g,e.selectedDates[1],!0)===0),h==="nextMonthDay"&&X.classList.add("inRange")))):X.classList.add("flatpickr-disabled"),e.config.mode==="range"&&xt(g)&&!Lr(g)&&X.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&h!=="prevMonthDay"&&R%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(g)+"</span>"),Xe("onDayCreate",X),X}function H(h){h.focus(),e.config.mode==="range"&&Le(h)}function Z(h){for(var g=h>0?0:e.config.showMonths-1,k=h>0?e.config.showMonths:-1,R=g;R!=k;R+=h)for(var G=e.daysContainer.children[R],X=h>0?0:G.children.length-1,_e=h>0?G.children.length:-1,ne=X;ne!=_e;ne+=h){var Ce=G.children[ne];if(Ce.className.indexOf("hidden")===-1&&ce(Ce.dateObj))return Ce}}function ye(h,g){for(var k=h.className.indexOf("Month")===-1?h.dateObj.getMonth():e.currentMonth,R=g>0?e.config.showMonths:-1,G=g>0?1:-1,X=k-e.currentMonth;X!=R;X+=G)for(var _e=e.daysContainer.children[X],ne=k-e.currentMonth===X?h.$i+g:g<0?_e.children.length-1:0,Ce=_e.children.length,ie=ne;ie>=0&&ie<Ce&&ie!=(g>0?Ce:-1);ie+=G){var me=_e.children[ie];if(me.className.indexOf("hidden")===-1&&ce(me.dateObj)&&Math.abs(h.$i-ie)>=Math.abs(g))return H(me)}e.changeMonth(G),we(Z(G),0)}function we(h,g){var k=s(),R=be(k||document.body),G=h!==void 0?h:R?k:e.selectedDateElem!==void 0&&be(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&be(e.todayDateElem)?e.todayDateElem:Z(g>0?1:-1);G===void 0?e._input.focus():R?ye(G,g):H(G)}function V(h,g){for(var k=(new Date(h,g,1).getDay()-e.l10n.firstDayOfWeek+7)%7,R=e.utils.getDaysInMonth((g-1+12)%12,h),G=e.utils.getDaysInMonth(g,h),X=window.document.createDocumentFragment(),_e=e.config.showMonths>1,ne=_e?"prevMonthDay hidden":"prevMonthDay",Ce=_e?"nextMonthDay hidden":"nextMonthDay",ie=R+1-k,me=0;ie<=R;ie++,me++)X.appendChild(se("flatpickr-day "+ne,new Date(h,g-1,ie),ie,me));for(ie=1;ie<=G;ie++,me++)X.appendChild(se("flatpickr-day",new Date(h,g,ie),ie,me));for(var ze=G+1;ze<=42-k&&(e.config.showMonths===1||me%7!==0);ze++,me++)X.appendChild(se("flatpickr-day "+Ce,new Date(h,g+1,ze%G),ze,me));var Wn=$e("div","dayContainer");return Wn.appendChild(X),Wn}function K(){if(e.daysContainer!==void 0){Du(e.daysContainer),e.weekNumbers&&Du(e.weekNumbers);for(var h=document.createDocumentFragment(),g=0;g<e.config.showMonths;g++){var k=new Date(e.currentYear,e.currentMonth,1);k.setMonth(e.currentMonth+g),h.appendChild(V(k.getFullYear(),k.getMonth()))}e.daysContainer.appendChild(h),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&Le()}}function C(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var h=function(R){return e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&R<e.config.minDate.getMonth()?!1:!(e.config.maxDate!==void 0&&e.currentYear===e.config.maxDate.getFullYear()&&R>e.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var g=0;g<12;g++)if(!!h(g)){var k=$e("option","flatpickr-monthDropdown-month");k.value=new Date(e.currentYear,g).getMonth().toString(),k.textContent=xu(g,e.config.shorthandCurrentMonth,e.l10n),k.tabIndex=-1,e.currentMonth===g&&(k.selected=!0),e.monthsDropdownContainer.appendChild(k)}}}function J(){var h=$e("div","flatpickr-month"),g=window.document.createDocumentFragment(),k;e.config.showMonths>1||e.config.monthSelectorType==="static"?k=$e("span","cur-month"):(e.monthsDropdownContainer=$e("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),T(e.monthsDropdownContainer,"change",function(_e){var ne=Tn(_e),Ce=parseInt(ne.value,10);e.changeMonth(Ce-e.currentMonth),Xe("onMonthChange")}),C(),k=e.monthsDropdownContainer);var R=Eu("cur-year",{tabindex:"-1"}),G=R.getElementsByTagName("input")[0];G.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&G.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&(G.setAttribute("max",e.config.maxDate.getFullYear().toString()),G.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var X=$e("div","flatpickr-current-month");return X.appendChild(k),X.appendChild(R),g.appendChild(X),h.appendChild(g),{container:h,yearElement:G,monthElement:k}}function $(){Du(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var h=e.config.showMonths;h--;){var g=J();e.yearElements.push(g.yearElement),e.monthElements.push(g.monthElement),e.monthNav.appendChild(g.container)}e.monthNav.appendChild(e.nextMonthNav)}function oe(){return e.monthNav=$e("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=$e("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=$e("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,$(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(h){e.__hidePrevMonthArrow!==h&&(Xt(e.prevMonthNav,"flatpickr-disabled",h),e.__hidePrevMonthArrow=h)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(h){e.__hideNextMonthArrow!==h&&(Xt(e.nextMonthNav,"flatpickr-disabled",h),e.__hideNextMonthArrow=h)}}),e.currentYearElement=e.yearElements[0],da(),e.monthNav}function m(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var h=gf(e.config);e.timeContainer=$e("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var g=$e("span","flatpickr-time-separator",":"),k=Eu("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=k.getElementsByTagName("input")[0];var R=Eu("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=R.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=Qt(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?h.hours:c(h.hours)),e.minuteElement.value=Qt(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():h.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(k),e.timeContainer.appendChild(g),e.timeContainer.appendChild(R),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var G=Eu("flatpickr-second");e.secondElement=G.getElementsByTagName("input")[0],e.secondElement.value=Qt(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():h.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild($e("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(G)}return e.config.time_24hr||(e.amPM=$e("span","flatpickr-am-pm",e.l10n.amPM[bn((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}function y(){e.weekdayContainer?Du(e.weekdayContainer):e.weekdayContainer=$e("div","flatpickr-weekdays");for(var h=e.config.showMonths;h--;){var g=$e("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(g)}return v(),e.weekdayContainer}function v(){if(!!e.weekdayContainer){var h=e.l10n.firstDayOfWeek,g=qE(e.l10n.weekdays.shorthand);h>0&&h<g.length&&(g=qE(g.splice(h,g.length),g.splice(0,h)));for(var k=e.config.showMonths;k--;)e.weekdayContainer.children[k].innerHTML=` +`}get ignoreGlobalQuery(){return this._ignoreGlobalQuery}applyQueryToTasks(t){this.debug(`[search] Executing query: ${this.formatQueryForLogging()}`);let e=new ts(this.tasksFile,t),r;try{this.filters.forEach(l=>{r=l.statement,t=t.filter(u=>l.filterFunction(u,e))}),r=void 0;let{debugSettings:i}=oe(),s=i.ignoreSortInstructions?t:vo.by(this.sorting,t,e),a=s.slice(0,this.limit),o=new _o(this.grouping,a,e);return this._taskGroupLimit!==void 0&&o.applyTaskLimit(this._taskGroupLimit),new ra(o,s.length)}catch(i){let a=Xs("Search failed",i);return r&&(a=Ln.generateErrorMessage(r,a)),ra.fromError(a)}}parseHideOptions(t){let e=t.anyPlaceholdersExpanded,r=e.match(this.hideOptionsRegexp);if(r===null)return;let i=r[1].toLowerCase()==="hide",s=r[2].toLowerCase();if(iE(this._queryLayoutOptions,s,i)){this.saveLayoutStatement(t);return}if(kS(this._taskLayoutOptions,s,!i)){this.saveLayoutStatement(t);return}this.setError("do not understand hide/show option",new gn(e,e))}saveLayoutStatement(t){this.layoutStatements.push(t)}parseFilter(t,e){var i;let r=Su(t);return r!=null?(r.filter?(r.filter.setStatement(e),this._filters.push(r.filter)):this.setError((i=r.error)!=null?i:"Unknown error",e),!0):!1}parseLimit(t){let e=t.match(this.limitRegexp);if(e===null){this.setError("do not understand query limit",new gn(t,t));return}let r=Number.parseInt(e[3],10);e[1]!==void 0?this._taskGroupLimit=r:this._limit=r}parseSortBy(t,e){let r=CE(t);return r?(r.setStatement(e),this._sorting.push(r),!0):!1}parseGroupBy(t,e){let r=ME(t);return r?(r.setStatement(e),this._grouping.push(r),!0):!1}generateQueryId(t){return IE+=1,IE.toString().padStart(t,"0")}debug(t,e){this.logger.debugWithId(this._queryId,`"${this.filePath}": ${t}`,e)}};var ib=[{name:"TQ_explain",type:"checkbox",display:"explain",handler:"instruction",trueValue:"explain",falseValue:""},{name:"TQ_short_mode",type:"checkbox",display:"short mode",handler:"instruction",trueValue:"short mode",falseValue:"full mode"},{name:"TQ_show_tree",type:"checkbox",display:"tree",handler:"showAndHide"},{name:"TQ_show_tags",type:"checkbox",display:"tags",handler:"showAndHide"},{name:"TQ_show_id",type:"checkbox",display:"id",handler:"showAndHide"},{name:"TQ_show_depends_on",type:"checkbox",display:"depends on",handler:"showAndHide"},{name:"TQ_show_priority",type:"checkbox",display:"priority",handler:"showAndHide"},{name:"TQ_show_recurrence_rule",type:"checkbox",display:"recurrence rule",handler:"showAndHide"},{name:"TQ_show_on_completion",type:"checkbox",display:"on completion",handler:"showAndHide"},{name:"TQ_show_created_date",type:"checkbox",display:"created date",handler:"showAndHide"},{name:"TQ_show_start_date",type:"checkbox",display:"start date",handler:"showAndHide"},{name:"TQ_show_scheduled_date",type:"checkbox",display:"scheduled date",handler:"showAndHide"},{name:"TQ_show_due_date",type:"checkbox",display:"due date",handler:"showAndHide"},{name:"TQ_show_cancelled_date",type:"checkbox",display:"cancelled date",handler:"showAndHide"},{name:"TQ_show_done_date",type:"checkbox",display:"done date",handler:"showAndHide"},{name:"TQ_show_urgency",type:"checkbox",display:"urgency",handler:"showAndHide"},{name:"TQ_show_backlink",type:"checkbox",display:"backlink",handler:"showAndHide"},{name:"TQ_show_edit_button",type:"checkbox",display:"edit button",handler:"showAndHide"},{name:"TQ_show_postpone_button",type:"checkbox",display:"postpone button",handler:"showAndHide"},{name:"TQ_show_task_count",type:"checkbox",display:"task count",handler:"showAndHide"},{name:"TQ_extra_instructions",type:"text",handler:"addValue"}],Oi=class{source(t){return t?ib.map(r=>this.generateInstruction(t,r)).filter(r=>r!=="").join(` +`):""}generateInstruction(t,e){let r=t.hasProperty(e.name),i=t.property(e.name);switch(e.handler){case"instruction":return r&&(i?e.trueValue:e.falseValue)||"";case"showAndHide":return r&&(i?"show "+e.display:"hide "+e.display)||"";case"addValue":return r&&i||"";default:throw new Error("Unknown handler type: "+e.handler+".")}}query(t){return new Ln(this.source(t),t)}allPropertyNames(){return ib.map(t=>t.name)}allPropertyNamesSorted(){return this.allPropertyNames().sort((t,e)=>t.localeCompare(e))}propertyType(t){var e,r;return(r=(e=ib.find(i=>i.name===t))==null?void 0:e.type)!=null?r:void 0}metaBindPluginWidgets(){return"\nshort mode: `INPUT[toggle:TQ_short_mode]`\ntree: `INPUT[toggle:TQ_show_tree]`\ntags: `INPUT[toggle:TQ_show_tags]`\nid: `INPUT[toggle:TQ_show_id]` depends on: `INPUT[toggle:TQ_show_depends_on]`\npriority: `INPUT[toggle:TQ_show_priority]`\nrecurrence rule: `INPUT[toggle:TQ_show_recurrence_rule]` on completion: `INPUT[toggle:TQ_show_on_completion]`\nstart date: `INPUT[toggle:TQ_show_start_date]` scheduled date: `INPUT[toggle:TQ_show_scheduled_date]` due date: `INPUT[toggle:TQ_show_due_date]`\ncreated date: `INPUT[toggle:TQ_show_created_date]` cancelled date: `INPUT[toggle:TQ_show_cancelled_date]` done date: `INPUT[toggle:TQ_show_done_date]`\nurgency: `INPUT[toggle:TQ_show_urgency]`\nbacklink: `INPUT[toggle:TQ_show_backlink]`\nedit button: `INPUT[toggle:TQ_show_edit_button]` postpone button: `INPUT[toggle:TQ_show_postpone_button]`\ntask count: `INPUT[toggle:TQ_show_task_count]`\nextra instructions: `INPUT[textArea:TQ_extra_instructions]`\nexplain: `INPUT[toggle:TQ_explain]`\n"}};function FE(n,t){return F(this,null,function*(){yield n.fileManager.processFrontMatter(t,e=>{let r=new Oi().allPropertyNamesSorted(),i=!1;r.forEach(s=>{s in e||(e[s]=null,i=!0)}),i?new sb.Notice("Properties updated successfully."):new sb.Notice("All supported properties are already present.")})})}var of=class{get app(){return this.plugin.app}constructor({plugin:t}){this.plugin=t,t.addCommand({id:"edit-task",name:"Create or edit task",icon:"pencil",editorCheckCallback:(e,r,i)=>nE(e,r,i,this.app,this.plugin.getTasks())}),t.addCommand({id:"toggle-done",name:"Toggle task done",icon:"check-in-circle",editorCheckCallback:rE}),t.addCommand({id:"add-query-file-defaults-properties",name:"Add all Query File Defaults properties",icon:"settings",checkCallback:e=>{let r=this.app.workspace.getActiveFile();return!r||r.extension!=="md"?!1:(e||this.ensureQueryFileDefaultsFrontmatter(r).catch(console.error),!0)}})}ensureQueryFileDefaultsFrontmatter(t){return F(this,null,function*(){let{app:e}=this;yield FE(e,t)})}};var ns=class{constructor(t=ns.empty){this._source=t}static getInstance(){return ns.instance||(ns.instance=new ns),ns.instance}set(t){this._source=t}query(t=void 0){let e=new Ln(this._source,t);return e.removeIllegalGlobalQueryInstructions(),e}hasInstructions(){return this._source.trim()!==ns.empty}},fr=ns;fr.empty="";Ws();var lf=class{constructor({obsidianEvents:t}){this.logger=sn.getLogger("tasks.Events");this.obsidianEvents=t}onCacheUpdate(t){return this.logger.debug("TasksEvents.onCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:cache-update",t)}triggerCacheUpdate(t){this.logger.debug("TasksEvents.triggerCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:cache-update",t)}onRequestCacheUpdate(t){return this.logger.debug("TasksEvents.onRequestCacheUpdate()"),this.obsidianEvents.on("obsidian-tasks-plugin:request-cache-update",t)}triggerRequestCacheUpdate(t){this.logger.debug("TasksEvents.triggerRequestCacheUpdate()"),this.obsidianEvents.trigger("obsidian-tasks-plugin:request-cache-update",t)}off(t){this.logger.debug("TasksEvents.off()"),this.obsidianEvents.offref(t)}};var ox=require("obsidian");Mn();Is();Nt();var ax=require("obsidian");Mn();Bt();Is();wi();Nt();ii();Dr();Ga();var ab=class{constructor(t){this.newStatus=t}apply(t){return this.isCheckedForTask(t)?[t]:t.handleNewStatusWithRecurrenceInUsersOrder(this.newStatus)}instructionDisplayName(){return`Change status to: [${this.newStatus.symbol}] ${this.newStatus.name}`}isCheckedForTask(t){return this.newStatus.symbol===t.status.symbol}};function LE(n){let t=[],e=new et().coreStatuses.map(r=>r.symbol);for(let r of[!0,!1])for(let i of n.registeredStatuses)e.includes(i.symbol)===r&&t.push(new ab(i));return t}var UE=require("obsidian");var ob="---",wo=class{apply(t){throw new Error("MenuDividerInstruction.apply(): Method not implemented.")}instructionDisplayName(){return ob}isCheckedForTask(t){return!1}};function ni(n,t){return F(this,null,function*(){yield Nn({originalTask:n,newTasks:t})})}var rs=class extends UE.Menu{constructor(e){super();this.taskSaver=e}addItemsForInstructions(e,r){for(let i of e)this.addItemForInstruction(r,i)}addItemForInstruction(e,r){r.instructionDisplayName()===ob?this.addSeparator():this.addItem(i=>this.getMenuItemCallback(e,i,r))}getMenuItemCallback(e,r,i){r.setTitle(i.instructionDisplayName()).setChecked(i.isCheckedForTask(e)).onClick(()=>F(this,null,function*(){let s=i.apply(e);(s.length!==1||!Object.is(s[0],e))&&(yield this.taskSaver(e,s))}))}};var uf=class extends rs{constructor(t,e,r=ni){super(r);let i=LE(t);this.addItemsForInstructions(i,e)}};var cf=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],is={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console!="undefined"&&console.warn(n)},getWeek:function(n){var t=new Date(n.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var e=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};var df={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var t=n%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},ff=df;var Xt=function(n,t){return t===void 0&&(t=2),("000"+n).slice(t*-1)},bn=function(n){return n===!0?1:0};function lb(n,t){var e;return function(){var r=this,i=arguments;clearTimeout(e),e=setTimeout(function(){return n.apply(r,i)},t)}}var pf=function(n){return n instanceof Array?n:[n]};function Zt(n,t,e){if(e===!0)return n.classList.add(t);n.classList.remove(t)}function $e(n,t,e){var r=window.document.createElement(n);return t=t||"",e=e||"",r.className=t,e!==void 0&&(r.textContent=e),r}function Du(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function ub(n,t){if(t(n))return n;if(n.parentNode)return ub(n.parentNode,t)}function Eu(n,t){var e=$e("div","numInputWrapper"),r=$e("input","numInput "+n),i=$e("span","arrowUp"),s=$e("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),t!==void 0)for(var a in t)r.setAttribute(a,t[a]);return e.appendChild(r),e.appendChild(i),e.appendChild(s),e}function Tn(n){try{if(typeof n.composedPath=="function"){var t=n.composedPath();return t[0]}return n.target}catch(e){return n.target}}var cb=function(){},xu=function(n,t,e){return e.months[t?"shorthand":"longhand"][n]},YE={D:cb,F:function(n,t,e){n.setMonth(e.months.longhand.indexOf(t))},G:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},H:function(n,t){n.setHours(parseFloat(t))},J:function(n,t){n.setDate(parseFloat(t))},K:function(n,t,e){n.setHours(n.getHours()%12+12*bn(new RegExp(e.amPM[1],"i").test(t)))},M:function(n,t,e){n.setMonth(e.months.shorthand.indexOf(t))},S:function(n,t){n.setSeconds(parseFloat(t))},U:function(n,t){return new Date(parseFloat(t)*1e3)},W:function(n,t,e){var r=parseInt(t),i=new Date(n.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+e.firstDayOfWeek),i},Y:function(n,t){n.setFullYear(parseFloat(t))},Z:function(n,t){return new Date(t)},d:function(n,t){n.setDate(parseFloat(t))},h:function(n,t){n.setHours((n.getHours()>=12?12:0)+parseFloat(t))},i:function(n,t){n.setMinutes(parseFloat(t))},j:function(n,t){n.setDate(parseFloat(t))},l:cb,m:function(n,t){n.setMonth(parseFloat(t)-1)},n:function(n,t){n.setMonth(parseFloat(t)-1)},s:function(n,t){n.setSeconds(parseFloat(t))},u:function(n,t){return new Date(parseFloat(t))},w:cb,y:function(n,t){n.setFullYear(2e3+parseFloat(t))}},Ci={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},ko={Z:function(n){return n.toISOString()},D:function(n,t,e){return t.weekdays.shorthand[ko.w(n,t,e)]},F:function(n,t,e){return xu(ko.n(n,t,e)-1,!1,t)},G:function(n,t,e){return Xt(ko.h(n,t,e))},H:function(n){return Xt(n.getHours())},J:function(n,t){return t.ordinal!==void 0?n.getDate()+t.ordinal(n.getDate()):n.getDate()},K:function(n,t){return t.amPM[bn(n.getHours()>11)]},M:function(n,t){return xu(n.getMonth(),!0,t)},S:function(n){return Xt(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,t,e){return e.getWeek(n)},Y:function(n){return Xt(n.getFullYear(),4)},d:function(n){return Xt(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return Xt(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,t){return t.weekdays.longhand[n.getDay()]},m:function(n){return Xt(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}};var db=function(n){var t=n.config,e=t===void 0?is:t,r=n.l10n,i=r===void 0?df:r,s=n.isMobile,a=s===void 0?!1:s;return function(o,l,u){var c=u||i;return e.formatDate!==void 0&&!a?e.formatDate(o,l,c):l.split("").map(function(d,f,p){return ko[d]&&p[f-1]!=="\\"?ko[d](o,c,e):d!=="\\"?d:""}).join("")}},mf=function(n){var t=n.config,e=t===void 0?is:t,r=n.l10n,i=r===void 0?df:r;return function(s,a,o,l){if(!(s!==0&&!s)){var u=l||i,c,d=s;if(s instanceof Date)c=new Date(s.getTime());else if(typeof s!="string"&&s.toFixed!==void 0)c=new Date(s);else if(typeof s=="string"){var f=a||(e||is).dateFormat,p=String(s).trim();if(p==="today")c=new Date,o=!0;else if(e&&e.parseDate)c=e.parseDate(s,f);else if(/Z$/.test(p)||/GMT$/.test(p))c=new Date(s);else{for(var b=void 0,T=[],_=0,O=0,E="";_<f.length;_++){var A=f[_],Y=A==="\\",q=f[_-1]==="\\"||Y;if(Ci[A]&&!q){E+=Ci[A];var se=new RegExp(E).exec(s);se&&(b=!0)&&T[A!=="Y"?"push":"unshift"]({fn:YE[A],val:se[++O]})}else Y||(E+=".")}c=!e||!e.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),T.forEach(function(H){var Z=H.fn,ye=H.val;return c=Z(c,ye,u)||c}),c=b?c:void 0}}if(!(c instanceof Date&&!isNaN(c.getTime()))){e.errorHandler(new Error("Invalid date provided: "+d));return}return o===!0&&c.setHours(0,0,0,0),c}}};function _n(n,t,e){return e===void 0&&(e=!0),e!==!1?new Date(n.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):n.getTime()-t.getTime()}var jE=function(n,t,e){return n>Math.min(t,e)&&n<Math.max(t,e)},hf=function(n,t,e){return n*3600+t*60+e},WE=function(n){var t=Math.floor(n/3600),e=(n-t*3600)/60;return[t,e,n-t*3600-e*60]},$E={DAY:864e5};function gf(n){var t=n.defaultHour,e=n.defaultMinute,r=n.defaultSeconds;if(n.minDate!==void 0){var i=n.minDate.getHours(),s=n.minDate.getMinutes(),a=n.minDate.getSeconds();t<i&&(t=i),t===i&&e<s&&(e=s),t===i&&e===s&&r<a&&(r=n.minDate.getSeconds())}if(n.maxDate!==void 0){var o=n.maxDate.getHours(),l=n.maxDate.getMinutes();t=Math.min(t,o),t===o&&(e=Math.min(l,e)),t===o&&e===l&&(r=n.maxDate.getSeconds())}return{hours:t,minutes:e,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var r=function(o){o&&Object.keys(o).forEach(function(l){return n[l]=o[l]})},i=0,s=t;i<s.length;i++){var a=s[i];r(a)}return n});var Jt=function(){return Jt=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++){t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Jt.apply(this,arguments)},qE=function(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;for(var r=Array(n),i=0,t=0;t<e;t++)for(var s=arguments[t],a=0,o=s.length;a<o;a++,i++)r[i]=s[a];return r},MY=300;function RY(n,t){var e={config:Jt(Jt({},is),pt.defaultConfig),l10n:ff};e.parseDate=mf({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=T,e._setHoursFromDate=f,e._positionCalendar=us,e.changeMonth=S,e.changeYear=W,e.clear=M,e.close=I,e.onMouseOver=Le,e._createElement=$e,e.createDay=se,e.destroy=j,e.isEnabled=ce,e.jumpToDate=E,e.updateValue=hr,e.open=pr,e.redraw=oa,e.set=Ro,e.setDate=Ai,e.toggle=jn;function r(){e.utils={getDaysInMonth:function(h,g){return h===void 0&&(h=e.currentMonth),g===void 0&&(g=e.currentYear),h===1&&(g%4===0&&g%100!==0||g%400===0)?29:e.l10n.daysInMonth[h]}}}function i(){e.element=e.input=n,e.isOpen=!1,te(),it(),ua(),Au(),r(),e.isMobile||q(),O(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&f(e.config.noCalendar?e.latestSelectedDateObj:void 0),hr(!1)),o();var h=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&h&&us(),Xe("onReady")}function s(){var h;return((h=e.calendarContainer)===null||h===void 0?void 0:h.getRootNode()).activeElement||document.activeElement}function a(h){return h.bind(e)}function o(){var h=e.config;h.weekNumbers===!1&&h.showMonths===1||h.noCalendar!==!0&&window.requestAnimationFrame(function(){if(e.calendarContainer!==void 0&&(e.calendarContainer.style.visibility="hidden",e.calendarContainer.style.display="block"),e.daysContainer!==void 0){var g=(e.days.offsetWidth+1)*h.showMonths;e.daysContainer.style.width=g+"px",e.calendarContainer.style.width=g+(e.weekWrapper!==void 0?e.weekWrapper.offsetWidth:0)+"px",e.calendarContainer.style.removeProperty("visibility"),e.calendarContainer.style.removeProperty("display")}})}function l(h){if(e.selectedDates.length===0){var g=e.config.minDate===void 0||_n(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),k=gf(e.config);g.setHours(k.hours,k.minutes,k.seconds,g.getMilliseconds()),e.selectedDates=[g],e.latestSelectedDateObj=g}h!==void 0&&h.type!=="blur"&&No(h);var R=e._input.value;d(),hr(),e._input.value!==R&&e._debouncedChange()}function u(h,g){return h%12+12*bn(g===e.l10n.amPM[1])}function c(h){switch(h%24){case 0:case 12:return 12;default:return h%12}}function d(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var h=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,g=(parseInt(e.minuteElement.value,10)||0)%60,k=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(h=u(h,e.amPM.textContent));var R=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&_n(e.latestSelectedDateObj,e.config.minDate,!0)===0,G=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&_n(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var X=hf(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),_e=hf(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),ne=hf(h,g,k);if(ne>_e&&ne<X){var Ce=WE(X);h=Ce[0],g=Ce[1],k=Ce[2]}}else{if(G){var ie=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;h=Math.min(h,ie.getHours()),h===ie.getHours()&&(g=Math.min(g,ie.getMinutes())),g===ie.getMinutes()&&(k=Math.min(k,ie.getSeconds()))}if(R){var me=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;h=Math.max(h,me.getHours()),h===me.getHours()&&g<me.getMinutes()&&(g=me.getMinutes()),g===me.getMinutes()&&(k=Math.max(k,me.getSeconds()))}}p(h,g,k)}}function f(h){var g=h||e.latestSelectedDateObj;g&&g instanceof Date&&p(g.getHours(),g.getMinutes(),g.getSeconds())}function p(h,g,k){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(h%24,g,k||0,0),!(!e.hourElement||!e.minuteElement||e.isMobile)&&(e.hourElement.value=Xt(e.config.time_24hr?h:(12+h)%12+12*bn(h%12===0)),e.minuteElement.value=Xt(g),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[bn(h>=12)]),e.secondElement!==void 0&&(e.secondElement.value=Xt(k)))}function b(h){var g=Tn(h),k=parseInt(g.value)+(h.delta||0);(k/1e3>1||h.key==="Enter"&&!/[^\d]/.test(k.toString()))&&W(k)}function T(h,g,k,R){if(g instanceof Array)return g.forEach(function(G){return T(h,G,k,R)});if(h instanceof Array)return h.forEach(function(G){return T(G,g,k,R)});h.addEventListener(g,k,R),e._handlers.push({remove:function(){return h.removeEventListener(g,k,R)}})}function _(){Xe("onChange")}function O(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(k){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+k+"]"),function(R){return T(R,"click",e[k])})}),e.isMobile){cs();return}var h=lb(Yt,50);if(e._debouncedChange=lb(_,MY),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&T(e.daysContainer,"mouseover",function(k){e.config.mode==="range"&&Le(Tn(k))}),T(e._input,"keydown",He),e.calendarContainer!==void 0&&T(e.calendarContainer,"keydown",He),!e.config.inline&&!e.config.static&&T(window,"resize",h),window.ontouchstart!==void 0?T(window.document,"touchstart",P):T(window.document,"mousedown",P),T(window.document,"focus",P,{capture:!0}),e.config.clickOpens===!0&&(T(e._input,"focus",e.open),T(e._input,"click",e.open)),e.daysContainer!==void 0&&(T(e.monthNav,"click",Cf),T(e.monthNav,["keyup","increment"],b),T(e.daysContainer,"click",Yn)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var g=function(k){return Tn(k).select()};T(e.timeContainer,["increment"],l),T(e.timeContainer,"blur",l,{capture:!0}),T(e.timeContainer,"click",A),T([e.hourElement,e.minuteElement],["focus","click"],g),e.secondElement!==void 0&&T(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&T(e.amPM,"click",function(k){l(k)})}e.config.allowInput&&T(e._input,"blur",Oe)}function E(h,g){var k=h!==void 0?e.parseDate(h):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate<e.now?e.config.maxDate:e.now),R=e.currentYear,G=e.currentMonth;try{k!==void 0&&(e.currentYear=k.getFullYear(),e.currentMonth=k.getMonth())}catch(X){X.message="Invalid date supplied: "+k,e.config.errorHandler(X)}g&&e.currentYear!==R&&(Xe("onYearChange"),C()),g&&(e.currentYear!==R||e.currentMonth!==G)&&Xe("onMonthChange"),e.redraw()}function A(h){var g=Tn(h);~g.className.indexOf("arrow")&&Y(h,g.classList.contains("arrowUp")?1:-1)}function Y(h,g,k){var R=h&&Tn(h),G=k||R&&R.parentNode&&R.parentNode.firstChild,X=ca("increment");X.delta=g,G&&G.dispatchEvent(X)}function q(){var h=window.document.createDocumentFragment();if(e.calendarContainer=$e("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(h.appendChild(le()),e.innerContainer=$e("div","flatpickr-innerContainer"),e.config.weekNumbers){var g=w(),k=g.weekWrapper,R=g.weekNumbers;e.innerContainer.appendChild(k),e.weekNumbers=R,e.weekWrapper=k}e.rContainer=$e("div","flatpickr-rContainer"),e.rContainer.appendChild(y()),e.daysContainer||(e.daysContainer=$e("div","flatpickr-days"),e.daysContainer.tabIndex=-1),K(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),h.appendChild(e.innerContainer)}e.config.enableTime&&h.appendChild(m()),Zt(e.calendarContainer,"rangeMode",e.config.mode==="range"),Zt(e.calendarContainer,"animate",e.config.animate===!0),Zt(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(h);var G=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!G&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var X=$e("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(X,e.element),X.appendChild(e.element),e.altInput&&X.appendChild(e.altInput),X.appendChild(e.calendarContainer)}!e.config.static&&!e.config.inline&&(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}function se(h,g,k,R){var G=ce(g,!0),X=$e("span",h,g.getDate().toString());return X.dateObj=g,X.$i=R,X.setAttribute("aria-label",e.formatDate(g,e.config.ariaDateFormat)),h.indexOf("hidden")===-1&&_n(g,e.now)===0&&(e.todayDateElem=X,X.classList.add("today"),X.setAttribute("aria-current","date")),G?(X.tabIndex=-1,Lr(g)&&(X.classList.add("selected"),e.selectedDateElem=X,e.config.mode==="range"&&(Zt(X,"startRange",e.selectedDates[0]&&_n(g,e.selectedDates[0],!0)===0),Zt(X,"endRange",e.selectedDates[1]&&_n(g,e.selectedDates[1],!0)===0),h==="nextMonthDay"&&X.classList.add("inRange")))):X.classList.add("flatpickr-disabled"),e.config.mode==="range"&&xt(g)&&!Lr(g)&&X.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&h!=="prevMonthDay"&&R%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(g)+"</span>"),Xe("onDayCreate",X),X}function H(h){h.focus(),e.config.mode==="range"&&Le(h)}function Z(h){for(var g=h>0?0:e.config.showMonths-1,k=h>0?e.config.showMonths:-1,R=g;R!=k;R+=h)for(var G=e.daysContainer.children[R],X=h>0?0:G.children.length-1,_e=h>0?G.children.length:-1,ne=X;ne!=_e;ne+=h){var Ce=G.children[ne];if(Ce.className.indexOf("hidden")===-1&&ce(Ce.dateObj))return Ce}}function ye(h,g){for(var k=h.className.indexOf("Month")===-1?h.dateObj.getMonth():e.currentMonth,R=g>0?e.config.showMonths:-1,G=g>0?1:-1,X=k-e.currentMonth;X!=R;X+=G)for(var _e=e.daysContainer.children[X],ne=k-e.currentMonth===X?h.$i+g:g<0?_e.children.length-1:0,Ce=_e.children.length,ie=ne;ie>=0&&ie<Ce&&ie!=(g>0?Ce:-1);ie+=G){var me=_e.children[ie];if(me.className.indexOf("hidden")===-1&&ce(me.dateObj)&&Math.abs(h.$i-ie)>=Math.abs(g))return H(me)}e.changeMonth(G),we(Z(G),0)}function we(h,g){var k=s(),R=be(k||document.body),G=h!==void 0?h:R?k:e.selectedDateElem!==void 0&&be(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&be(e.todayDateElem)?e.todayDateElem:Z(g>0?1:-1);G===void 0?e._input.focus():R?ye(G,g):H(G)}function V(h,g){for(var k=(new Date(h,g,1).getDay()-e.l10n.firstDayOfWeek+7)%7,R=e.utils.getDaysInMonth((g-1+12)%12,h),G=e.utils.getDaysInMonth(g,h),X=window.document.createDocumentFragment(),_e=e.config.showMonths>1,ne=_e?"prevMonthDay hidden":"prevMonthDay",Ce=_e?"nextMonthDay hidden":"nextMonthDay",ie=R+1-k,me=0;ie<=R;ie++,me++)X.appendChild(se("flatpickr-day "+ne,new Date(h,g-1,ie),ie,me));for(ie=1;ie<=G;ie++,me++)X.appendChild(se("flatpickr-day",new Date(h,g,ie),ie,me));for(var ze=G+1;ze<=42-k&&(e.config.showMonths===1||me%7!==0);ze++,me++)X.appendChild(se("flatpickr-day "+Ce,new Date(h,g+1,ze%G),ze,me));var Wn=$e("div","dayContainer");return Wn.appendChild(X),Wn}function K(){if(e.daysContainer!==void 0){Du(e.daysContainer),e.weekNumbers&&Du(e.weekNumbers);for(var h=document.createDocumentFragment(),g=0;g<e.config.showMonths;g++){var k=new Date(e.currentYear,e.currentMonth,1);k.setMonth(e.currentMonth+g),h.appendChild(V(k.getFullYear(),k.getMonth()))}e.daysContainer.appendChild(h),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&Le()}}function C(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var h=function(R){return e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&R<e.config.minDate.getMonth()?!1:!(e.config.maxDate!==void 0&&e.currentYear===e.config.maxDate.getFullYear()&&R>e.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var g=0;g<12;g++)if(!!h(g)){var k=$e("option","flatpickr-monthDropdown-month");k.value=new Date(e.currentYear,g).getMonth().toString(),k.textContent=xu(g,e.config.shorthandCurrentMonth,e.l10n),k.tabIndex=-1,e.currentMonth===g&&(k.selected=!0),e.monthsDropdownContainer.appendChild(k)}}}function J(){var h=$e("div","flatpickr-month"),g=window.document.createDocumentFragment(),k;e.config.showMonths>1||e.config.monthSelectorType==="static"?k=$e("span","cur-month"):(e.monthsDropdownContainer=$e("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),T(e.monthsDropdownContainer,"change",function(_e){var ne=Tn(_e),Ce=parseInt(ne.value,10);e.changeMonth(Ce-e.currentMonth),Xe("onMonthChange")}),C(),k=e.monthsDropdownContainer);var R=Eu("cur-year",{tabindex:"-1"}),G=R.getElementsByTagName("input")[0];G.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&G.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&(G.setAttribute("max",e.config.maxDate.getFullYear().toString()),G.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var X=$e("div","flatpickr-current-month");return X.appendChild(k),X.appendChild(R),g.appendChild(X),h.appendChild(g),{container:h,yearElement:G,monthElement:k}}function $(){Du(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var h=e.config.showMonths;h--;){var g=J();e.yearElements.push(g.yearElement),e.monthElements.push(g.monthElement),e.monthNav.appendChild(g.container)}e.monthNav.appendChild(e.nextMonthNav)}function le(){return e.monthNav=$e("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=$e("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=$e("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,$(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(h){e.__hidePrevMonthArrow!==h&&(Zt(e.prevMonthNav,"flatpickr-disabled",h),e.__hidePrevMonthArrow=h)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(h){e.__hideNextMonthArrow!==h&&(Zt(e.nextMonthNav,"flatpickr-disabled",h),e.__hideNextMonthArrow=h)}}),e.currentYearElement=e.yearElements[0],da(),e.monthNav}function m(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var h=gf(e.config);e.timeContainer=$e("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var g=$e("span","flatpickr-time-separator",":"),k=Eu("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=k.getElementsByTagName("input")[0];var R=Eu("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=R.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=Xt(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?h.hours:c(h.hours)),e.minuteElement.value=Xt(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():h.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(k),e.timeContainer.appendChild(g),e.timeContainer.appendChild(R),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var G=Eu("flatpickr-second");e.secondElement=G.getElementsByTagName("input")[0],e.secondElement.value=Xt(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():h.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild($e("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(G)}return e.config.time_24hr||(e.amPM=$e("span","flatpickr-am-pm",e.l10n.amPM[bn((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}function y(){e.weekdayContainer?Du(e.weekdayContainer):e.weekdayContainer=$e("div","flatpickr-weekdays");for(var h=e.config.showMonths;h--;){var g=$e("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(g)}return v(),e.weekdayContainer}function v(){if(!!e.weekdayContainer){var h=e.l10n.firstDayOfWeek,g=qE(e.l10n.weekdays.shorthand);h>0&&h<g.length&&(g=qE(g.splice(h,g.length),g.splice(0,h)));for(var k=e.config.showMonths;k--;)e.weekdayContainer.children[k].innerHTML=` <span class='flatpickr-weekday'> `+g.join("</span><span class='flatpickr-weekday'>")+` </span> - `}}function w(){e.calendarContainer.classList.add("hasWeeks");var h=$e("div","flatpickr-weekwrapper");h.appendChild($e("span","flatpickr-weekday",e.l10n.weekAbbreviation));var g=$e("div","flatpickr-weeks");return h.appendChild(g),{weekWrapper:h,weekNumbers:g}}function S(h,g){g===void 0&&(g=!0);var k=g?h:h-e.currentMonth;k<0&&e._hidePrevMonthArrow===!0||k>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=k,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,Xe("onYearChange"),C()),K(),Xe("onMonthChange"),da())}function M(h,g){if(h===void 0&&(h=!0),g===void 0&&(g=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,g===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var k=gf(e.config),R=k.hours,G=k.minutes,X=k.seconds;p(R,G,X)}e.redraw(),h&&Xe("onChange")}function I(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),Xe("onClose")}function j(){e.config!==void 0&&Xe("onDestroy");for(var h=e._handlers.length;h--;)e._handlers[h].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var g=e.calendarContainer.parentNode;if(g.lastChild&&g.removeChild(g.lastChild),g.parentNode){for(;g.firstChild;)g.parentNode.insertBefore(g.firstChild,g);g.parentNode.removeChild(g)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(k){try{delete e[k]}catch(R){}})}function D(h){return e.calendarContainer.contains(h)}function P(h){if(e.isOpen&&!e.config.inline){var g=Tn(h),k=D(g),R=g===e.input||g===e.altInput||e.element.contains(g)||h.path&&h.path.indexOf&&(~h.path.indexOf(e.input)||~h.path.indexOf(e.altInput)),G=!R&&!k&&!D(h.relatedTarget),X=!e.config.ignoredFocusElements.some(function(_e){return _e.contains(g)});G&&X&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&l(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function W(h){if(!(!h||e.config.minDate&&h<e.config.minDate.getFullYear()||e.config.maxDate&&h>e.config.maxDate.getFullYear())){var g=h,k=e.currentYear!==g;e.currentYear=g||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),k&&(e.redraw(),Xe("onYearChange"),C())}}function ce(h,g){var k;g===void 0&&(g=!0);var R=e.parseDate(h,void 0,g);if(e.config.minDate&&R&&_n(R,e.config.minDate,g!==void 0?g:!e.minDateHasTime)<0||e.config.maxDate&&R&&_n(R,e.config.maxDate,g!==void 0?g:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(R===void 0)return!1;for(var G=!!e.config.enable,X=(k=e.config.enable)!==null&&k!==void 0?k:e.config.disable,_e=0,ne=void 0;_e<X.length;_e++){if(ne=X[_e],typeof ne=="function"&&ne(R))return G;if(ne instanceof Date&&R!==void 0&&ne.getTime()===R.getTime())return G;if(typeof ne=="string"){var Ce=e.parseDate(ne,void 0,!0);return Ce&&Ce.getTime()===R.getTime()?G:!G}else if(typeof ne=="object"&&R!==void 0&&ne.from&&ne.to&&R.getTime()>=ne.from.getTime()&&R.getTime()<=ne.to.getTime())return G}return!G}function be(h){return e.daysContainer!==void 0?h.className.indexOf("hidden")===-1&&h.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(h):!1}function Oe(h){var g=h.target===e._input,k=e._input.value.trimEnd()!==fa();g&&k&&!(h.relatedTarget&&D(h.relatedTarget))&&e.setDate(e._input.value,!0,h.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function He(h){var g=Tn(h),k=e.config.wrap?n.contains(g):g===e._input,R=e.config.allowInput,G=e.isOpen&&(!R||!k),X=e.config.inline&&k&&!R;if(h.keyCode===13&&k){if(R)return e.setDate(e._input.value,!0,g===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),g.blur();e.open()}else if(D(g)||G||X){var _e=!!e.timeContainer&&e.timeContainer.contains(g);switch(h.keyCode){case 13:_e?(h.preventDefault(),l(),la()):Yn(h);break;case 27:h.preventDefault(),la();break;case 8:case 46:k&&!e.config.allowInput&&(h.preventDefault(),e.clear());break;case 37:case 39:if(!_e&&!k){h.preventDefault();var ne=s();if(e.daysContainer!==void 0&&(R===!1||ne&&be(ne))){var Ce=h.keyCode===39?1:-1;h.ctrlKey?(h.stopPropagation(),S(Ce),we(Z(1),0)):we(void 0,Ce)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:h.preventDefault();var ie=h.keyCode===40?1:-1;e.daysContainer&&g.$i!==void 0||g===e.input||g===e.altInput?h.ctrlKey?(h.stopPropagation(),W(e.currentYear-ie),we(Z(1),0)):_e||we(void 0,ie*7):g===e.currentYearElement?W(e.currentYear-ie):e.config.enableTime&&(!_e&&e.hourElement&&e.hourElement.focus(),l(h),e._debouncedChange());break;case 9:if(_e){var me=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(Ot){return Ot}),ze=me.indexOf(g);if(ze!==-1){var Wn=me[ze+(h.shiftKey?-1:1)];h.preventDefault(),(Wn||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(g)&&h.shiftKey&&(h.preventDefault(),e._input.focus());break;default:break}}if(e.amPM!==void 0&&g===e.amPM)switch(h.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],d(),hr();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],d(),hr();break}(k||D(g))&&Xe("onKeyDown",h)}function Le(h,g){if(g===void 0&&(g="flatpickr-day"),!(e.selectedDates.length!==1||h&&(!h.classList.contains(g)||h.classList.contains("flatpickr-disabled")))){for(var k=h?h.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),R=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),G=Math.min(k,e.selectedDates[0].getTime()),X=Math.max(k,e.selectedDates[0].getTime()),_e=!1,ne=0,Ce=0,ie=G;ie<X;ie+=$E.DAY)ce(new Date(ie),!0)||(_e=_e||ie>G&&ie<X,ie<R&&(!ne||ie>ne)?ne=ie:ie>R&&(!Ce||ie<Ce)&&(Ce=ie));var me=Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+g));me.forEach(function(ze){var Wn=ze.dateObj,Ot=Wn.getTime(),ds=ne>0&&Ot<ne||Ce>0&&Ot>Ce;if(ds){ze.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Pi){ze.classList.remove(Pi)});return}else if(_e&&!ds)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Pi){ze.classList.remove(Pi)}),h!==void 0&&(h.classList.add(k<=e.selectedDates[0].getTime()?"startRange":"endRange"),R<k&&Ot===R?ze.classList.add("startRange"):R>k&&Ot===R&&ze.classList.add("endRange"),Ot>=ne&&(Ce===0||Ot<=Ce)&&jE(Ot,R,k)&&ze.classList.add("inRange"))})}}function Yt(){e.isOpen&&!e.config.static&&!e.config.inline&&us()}function pr(h,g){if(g===void 0&&(g=e._positionElement),e.isMobile===!0){if(h){h.preventDefault();var k=Tn(h);k&&k.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),Xe("onOpen");return}else if(e._input.disabled||e.config.inline)return;var R=e.isOpen;e.isOpen=!0,R||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),Xe("onOpen"),us(g)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(h===void 0||!e.timeContainer.contains(h.relatedTarget))&&setTimeout(function(){return e.hourElement.select()},50)}function vn(h){return function(g){var k=e.config["_"+h+"Date"]=e.parseDate(g,e.config.dateFormat),R=e.config["_"+(h==="min"?"max":"min")+"Date"];k!==void 0&&(e[h==="min"?"minDateHasTime":"maxDateHasTime"]=k.getHours()>0||k.getMinutes()>0||k.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function(G){return ce(G)}),!e.selectedDates.length&&h==="min"&&f(k),hr()),e.daysContainer&&(oa(),k!==void 0?e.currentYearElement[h]=k.getFullYear().toString():e.currentYearElement.removeAttribute(h),e.currentYearElement.disabled=!!R&&k!==void 0&&R.getFullYear()===k.getFullYear())}}function te(){var h=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],g=Zt(Zt({},JSON.parse(JSON.stringify(n.dataset||{}))),t),k={};e.config.parseDate=g.parseDate,e.config.formatDate=g.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(me){e.config._enable=Fr(me)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(me){e.config._disable=Fr(me)}});var R=g.mode==="time";if(!g.dateFormat&&(g.enableTime||R)){var G=pt.defaultConfig.dateFormat||is.dateFormat;k.dateFormat=g.noCalendar||R?"H:i"+(g.enableSeconds?":S":""):G+" H:i"+(g.enableSeconds?":S":"")}if(g.altInput&&(g.enableTime||R)&&!g.altFormat){var X=pt.defaultConfig.altFormat||is.altFormat;k.altFormat=g.noCalendar||R?"h:i"+(g.enableSeconds?":S K":" K"):X+(" h:i"+(g.enableSeconds?":S":"")+" K")}Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:vn("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:vn("max")});var _e=function(me){return function(ze){e.config[me==="min"?"_minTime":"_maxTime"]=e.parseDate(ze,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:_e("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:_e("max")}),g.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,k,g);for(var ne=0;ne<h.length;ne++)e.config[h[ne]]=e.config[h[ne]]===!0||e.config[h[ne]]==="true";cf.filter(function(me){return e.config[me]!==void 0}).forEach(function(me){e.config[me]=pf(e.config[me]||[]).map(a)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var ne=0;ne<e.config.plugins.length;ne++){var Ce=e.config.plugins[ne](e)||{};for(var ie in Ce)cf.indexOf(ie)>-1?e.config[ie]=pf(Ce[ie]).map(a).concat(e.config[ie]):typeof g[ie]=="undefined"&&(e.config[ie]=Ce[ie])}g.altInputClass||(e.config.altInputClass=jt().className+" "+e.config.altInputClass),Xe("onParseConfig")}function jt(){return e.config.wrap?n.querySelector("[data-input]"):n}function it(){typeof e.config.locale!="object"&&typeof pt.l10ns[e.config.locale]=="undefined"&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=Zt(Zt({},pt.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?pt.l10ns[e.config.locale]:void 0),Ci.D="("+e.l10n.weekdays.shorthand.join("|")+")",Ci.l="("+e.l10n.weekdays.longhand.join("|")+")",Ci.M="("+e.l10n.months.shorthand.join("|")+")",Ci.F="("+e.l10n.months.longhand.join("|")+")",Ci.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")";var h=Zt(Zt({},t),JSON.parse(JSON.stringify(n.dataset||{})));h.time_24hr===void 0&&pt.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=db(e),e.parseDate=mf({config:e.config,l10n:e.l10n})}function us(h){if(typeof e.config.position=="function")return void e.config.position(e,h);if(e.calendarContainer!==void 0){Xe("onPreCalendarPosition");var g=h||e._positionElement,k=Array.prototype.reduce.call(e.calendarContainer.children,function(ps,ms){return ps+ms.offsetHeight},0),R=e.calendarContainer.offsetWidth,G=e.config.position.split(" "),X=G[0],_e=G.length>1?G[1]:null,ne=g.getBoundingClientRect(),Ce=window.innerHeight-ne.bottom,ie=X==="above"||X!=="below"&&Ce<k&&ne.top>k,me=window.pageYOffset+ne.top+(ie?-k-2:g.offsetHeight+2);if(Xt(e.calendarContainer,"arrowTop",!ie),Xt(e.calendarContainer,"arrowBottom",ie),!e.config.inline){var ze=window.pageXOffset+ne.left,Wn=!1,Ot=!1;_e==="center"?(ze-=(R-ne.width)/2,Wn=!0):_e==="right"&&(ze-=R-ne.width,Ot=!0),Xt(e.calendarContainer,"arrowLeft",!Wn&&!Ot),Xt(e.calendarContainer,"arrowCenter",Wn),Xt(e.calendarContainer,"arrowRight",Ot);var ds=window.document.body.offsetWidth-(window.pageXOffset+ne.right),Pi=ze+R>window.document.body.offsetWidth,Io=ds+R>window.document.body.offsetWidth;if(Xt(e.calendarContainer,"rightMost",Pi),!e.config.static)if(e.calendarContainer.style.top=me+"px",!Pi)e.calendarContainer.style.left=ze+"px",e.calendarContainer.style.right="auto";else if(!Io)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=ds+"px";else{var Fo=mr();if(Fo===void 0)return;var Mf=window.document.body.offsetWidth,Lo=Math.max(0,Mf/2-R/2),L=".flatpickr-calendar.centerMost:before",he=".flatpickr-calendar.centerMost:after",gr=Fo.cssRules.length,fs="{left:"+ne.left+"px;right:auto;}";Xt(e.calendarContainer,"rightMost",!1),Xt(e.calendarContainer,"centerMost",!0),Fo.insertRule(L+","+he+fs,gr),e.calendarContainer.style.left=Lo+"px",e.calendarContainer.style.right="auto"}}}}function mr(){for(var h=null,g=0;g<document.styleSheets.length;g++){var k=document.styleSheets[g];if(!!k.cssRules){try{k.cssRules}catch(R){continue}h=k;break}}return h!=null?h:Mo()}function Mo(){var h=document.createElement("style");return document.head.appendChild(h),h.sheet}function oa(){e.config.noCalendar||e.isMobile||(C(),da(),K())}function la(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function Yn(h){h.preventDefault(),h.stopPropagation();var g=function(me){return me.classList&&me.classList.contains("flatpickr-day")&&!me.classList.contains("flatpickr-disabled")&&!me.classList.contains("notAllowed")},k=ub(Tn(h),g);if(k!==void 0){var R=k,G=e.latestSelectedDateObj=new Date(R.dateObj.getTime()),X=(G.getMonth()<e.currentMonth||G.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=R,e.config.mode==="single")e.selectedDates=[G];else if(e.config.mode==="multiple"){var _e=Lr(G);_e?e.selectedDates.splice(parseInt(_e),1):e.selectedDates.push(G)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=G,e.selectedDates.push(G),_n(G,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(me,ze){return me.getTime()-ze.getTime()}));if(d(),X){var ne=e.currentYear!==G.getFullYear();e.currentYear=G.getFullYear(),e.currentMonth=G.getMonth(),ne&&(Xe("onYearChange"),C()),Xe("onMonthChange")}if(da(),K(),hr(),!X&&e.config.mode!=="range"&&e.config.showMonths===1?H(R):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){var Ce=e.config.mode==="single"&&!e.config.enableTime,ie=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(Ce||ie)&&la()}_()}}var Ri={locale:[it,v],showMonths:[$,o,y],minDate:[E],maxDate:[E],positionElement:[Po],clickOpens:[function(){e.config.clickOpens===!0?(T(e._input,"focus",e.open),T(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function Ro(h,g){if(h!==null&&typeof h=="object"){Object.assign(e.config,h);for(var k in h)Ri[k]!==void 0&&Ri[k].forEach(function(R){return R()})}else e.config[h]=g,Ri[h]!==void 0?Ri[h].forEach(function(R){return R()}):cf.indexOf(h)>-1&&(e.config[h]=pf(g));e.redraw(),hr(!0)}function Ao(h,g){var k=[];if(h instanceof Array)k=h.map(function(R){return e.parseDate(R,g)});else if(h instanceof Date||typeof h=="number")k=[e.parseDate(h,g)];else if(typeof h=="string")switch(e.config.mode){case"single":case"time":k=[e.parseDate(h,g)];break;case"multiple":k=h.split(e.config.conjunction).map(function(R){return e.parseDate(R,g)});break;case"range":k=h.split(e.l10n.rangeSeparator).map(function(R){return e.parseDate(R,g)});break;default:break}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(h)));e.selectedDates=e.config.allowInvalidPreload?k:k.filter(function(R){return R instanceof Date&&ce(R,!1)}),e.config.mode==="range"&&e.selectedDates.sort(function(R,G){return R.getTime()-G.getTime()})}function Ai(h,g,k){if(g===void 0&&(g=!1),k===void 0&&(k=e.config.dateFormat),h!==0&&!h||h instanceof Array&&h.length===0)return e.clear(g);Ao(h,k),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),E(void 0,g),f(),e.selectedDates.length===0&&e.clear(!1),hr(g),g&&Xe("onChange")}function Fr(h){return h.slice().map(function(g){return typeof g=="string"||typeof g=="number"||g instanceof Date?e.parseDate(g,void 0,!0):g&&typeof g=="object"&&g.from&&g.to?{from:e.parseDate(g.from,void 0),to:e.parseDate(g.to,void 0)}:g}).filter(function(g){return g})}function Au(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var h=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);h&&Ao(h,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function ua(){if(e.input=jt(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=$e(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),Po()}function Po(){e._positionElement=e.config.positionElement||e._input}function cs(){var h=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=$e("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=h,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=h==="datetime-local"?"Y-m-d\\TH:i:S":h==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch(g){}T(e.mobileInput,"change",function(g){e.setDate(Tn(g).value,!1,e.mobileFormatStr),Xe("onChange"),Xe("onClose")})}function jn(h){if(e.isOpen===!0)return e.close();e.open(h)}function Xe(h,g){if(e.config!==void 0){var k=e.config[h];if(k!==void 0&&k.length>0)for(var R=0;k[R]&&R<k.length;R++)k[R](e.selectedDates,e.input.value,e,g);h==="onChange"&&(e.input.dispatchEvent(ca("change")),e.input.dispatchEvent(ca("input")))}}function ca(h){var g=document.createEvent("Event");return g.initEvent(h,!0,!0),g}function Lr(h){for(var g=0;g<e.selectedDates.length;g++){var k=e.selectedDates[g];if(k instanceof Date&&_n(k,h)===0)return""+g}return!1}function xt(h){return e.config.mode!=="range"||e.selectedDates.length<2?!1:_n(h,e.selectedDates[0])>=0&&_n(h,e.selectedDates[1])<=0}function da(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(h,g){var k=new Date(e.currentYear,e.currentMonth,1);k.setMonth(e.currentMonth+g),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[g].textContent=xu(k.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=k.getMonth().toString(),h.value=k.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function fa(h){var g=h||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(k){return e.formatDate(k,g)}).filter(function(k,R,G){return e.config.mode!=="range"||e.config.enableTime||G.indexOf(k)===R}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function hr(h){h===void 0&&(h=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=fa(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=fa(e.config.altFormat)),h!==!1&&Xe("onValueUpdate")}function Cf(h){var g=Tn(h),k=e.prevMonthNav.contains(g),R=e.nextMonthNav.contains(g);k||R?S(k?-1:1):e.yearElements.indexOf(g)>=0?g.select():g.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):g.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function No(h){h.preventDefault();var g=h.type==="keydown",k=Tn(h),R=k;e.amPM!==void 0&&k===e.amPM&&(e.amPM.textContent=e.l10n.amPM[bn(e.amPM.textContent===e.l10n.amPM[0])]);var G=parseFloat(R.getAttribute("min")),X=parseFloat(R.getAttribute("max")),_e=parseFloat(R.getAttribute("step")),ne=parseInt(R.value,10),Ce=h.delta||(g?h.which===38?1:-1:0),ie=ne+_e*Ce;if(typeof R.value!="undefined"&&R.value.length===2){var me=R===e.hourElement,ze=R===e.minuteElement;ie<G?(ie=X+ie+bn(!me)+(bn(me)&&bn(!e.amPM)),ze&&Y(void 0,-1,e.hourElement)):ie>X&&(ie=R===e.hourElement?ie-X-bn(!e.amPM):G,ze&&Y(void 0,1,e.hourElement)),e.amPM&&me&&(_e===1?ie+ne===23:Math.abs(ie-ne)>_e)&&(e.amPM.textContent=e.l10n.amPM[bn(e.amPM.textContent===e.l10n.amPM[0])]),R.value=Qt(ie)}}return i(),e}function So(n,t){for(var e=Array.prototype.slice.call(n).filter(function(a){return a instanceof HTMLElement}),r=[],i=0;i<e.length;i++){var s=e[i];try{if(s.getAttribute("data-fp-omit")!==null)continue;s._flatpickr!==void 0&&(s._flatpickr.destroy(),s._flatpickr=void 0),s._flatpickr=RY(s,t||{}),r.push(s._flatpickr)}catch(a){console.error(a)}}return r.length===1?r[0]:r}typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return So(this,n)},HTMLElement.prototype.flatpickr=function(n){return So([this],n)});var pt=function(n,t){return typeof n=="string"?So(window.document.querySelectorAll(n),t):n instanceof Node?So([n],t):So(n,t)};pt.defaultConfig={};pt.l10ns={en:Zt({},ff),default:Zt({},ff)};pt.localize=function(n){pt.l10ns.default=Zt(Zt({},pt.l10ns.default),n)};pt.setDefaults=function(n){pt.defaultConfig=Zt(Zt({},pt.defaultConfig),n)};pt.parseDate=mf({});pt.formatDate=db({});pt.compareDates=_n;typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(n){return So(this,n)});Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))};typeof window!="undefined"&&(window.flatpickr=pt);var HE=pt;Nt();Nt();Gi();sd();function GE(n){for(let e of pe.allDateFields()){let r=n[e];if(r&&!r.isValid())return!1}let t=n.happensDates.some(e=>!!(e!=null&&e.isValid()));return!n.isDone&&t}function Do(n){return n.dueDate?"dueDate":n.scheduledDate?"scheduledDate":n.startDate?"startDate":null}function fb(n,t,e,r){let i=n[t];return zE(i,n,t,e,r)}function BE(n,t,e,r){let i=window.moment();return zE(i,n,t,e,r)}function VE(n,t,e,r){return KE(n,t,null)}function zE(n,t,e,r,i){let s=new It(n).postpone(r,i);return KE(t,e,s)}function KE(n,t,e){let r=Ft.removeInferredStatusIfNeeded(n,[new pe(de(U({},n),{[t]:e}))])[0];return{postponedDate:e,postponedTask:r}}function QE(n,t){if(n){let e=n==null?void 0:n.format("DD MMM YYYY");return`Task's ${t} changed to ${e}`}else return`Task's ${t} removed`}function XE(n,t,e){return`\u2139\uFE0F ${pb(n,t,e)} (right-click for more options)`}function pb(n,t,e){let r=Do(n),i=n[r];return Eo(r,i,t,e)}function ZE(n,t,e){let r=Do(n),i=window.moment().startOf("day");return Eo(r,i,t,e)}function JE(n,t,e){let r=Do(n);return mb(r,n)}function mb(n,t){return n==="scheduledDate"&&t.scheduledDateIsInferred?"Cannot remove inferred scheduled date":`Remove ${yf(n)}`}function AY(n){return Za(n.replace("Date",""))}function yf(n){return n.replace("Date"," date")}function Eo(n,t,e,r){let s=new It(t).postpone(r,e).format("ddd Do MMM"),a=e!=1?e:"a";if(t.isSameOrBefore(window.moment(),"day")){let l=AY(n);return(e>=0?`${l} in ${a} ${r}, on ${s}`:`${l} ${-a} ${r} ago, on ${s}`).replace(" 1 day ago"," yesterday").replace(" in 0 days"," today").replace("in a day","tomorrow")}let o=yf(n);return e>=0?`Postpone ${o} by ${a} ${r}, to ${s}`:`Backdate ${o} by ${-a} ${r}, to ${s}`}sd();var ss=class{constructor(t,e,r){this.newDate=e,this.dateFieldToEdit=t,this.displayName=r!=null?r:`Set Date: ${this.newDate.toDateString()}`}apply(t){return this.isCheckedForTask(t)?[t]:[new pe(de(U({},t),{[this.dateFieldToEdit]:window.moment(this.newDate)}))]}instructionDisplayName(){return this.displayName}isCheckedForTask(t){var e;return((e=t[this.dateFieldToEdit])==null?void 0:e.isSame(window.moment(this.newDate)))||!1}},Pr=class extends ss{constructor(t,e,r,i){var l;let s=(l=e[t])!=null?l:window.moment(),a=Eo(t,s,r,i),o=new It(window.moment(s)).postpone(i,r).toDate();super(t,o,a)}},Ou=class{constructor(t,e){this.dateFieldToEdit=t,this.displayName=mb(t,e)}apply(t){let e=this.dateFieldToEdit==="scheduledDate"&&t.scheduledDateIsInferred;return t[this.dateFieldToEdit]===null||e?[t]:[new pe(de(U({},t),{[this.dateFieldToEdit]:null}))]}instructionDisplayName(){return this.displayName}isCheckedForTask(t){return!1}};function ex(n,t){return nx(t,n,1)}function tx(n,t){return nx(t,n,-1)}function nx(n,t,e){let r=window.moment().startOf("day"),i=r.toDate(),s=new It(r.clone());return[new ss(t,i,Eo(t,r,0,"days")),new ss(t,s.postpone("day",e).toDate(),Eo(t,r,e,"day")),new wo,new Pr(t,n,e*2,"days"),new Pr(t,n,e*3,"days"),new Pr(t,n,e*4,"days"),new Pr(t,n,e*5,"days"),new Pr(t,n,e*6,"days"),new wo,new Pr(t,n,e,"week"),new Pr(t,n,e*2,"weeks"),new Pr(t,n,e*3,"weeks"),new Pr(t,n,e,"month"),new wo,new Ou(t,n)]}function ix(n,t,e,r){var a,o;let i=t[e];HE(n,{defaultDate:i?i.format("YYYY-MM-DD"):new Date,disableMobile:!0,enableTime:!1,dateFormat:"Y-m-d",locale:{firstDayOfWeek:(o=(a=new Intl.Locale(navigator.language).weekInfo)==null?void 0:a.firstDay)!=null?o:1},onClose:(l,u,c)=>F(this,null,function*(){if(l.length>0){let d=l[0],f=new ss(e,d).apply(t);yield r(t,f)}c.destroy()}),onReady:(l,u,c)=>{let d=document.createElement("div");d.style.display="flex",d.style.justifyContent="space-between",d.style.marginTop="10px",rx(d,c,t,r,"Clear",()=>new Ou(e,t).apply(t)),rx(d,c,t,r,"Today",()=>{let p=new Date;return new ss(e,p).apply(t)}),c.calendarContainer.appendChild(d)}}).open()}function rx(n,t,e,r,i,s){let a=document.createElement("button");a.type="button",a.textContent=i,a.classList.add("flatpickr-button"),a.addEventListener("click",()=>F(this,null,function*(){let o=s();yield r(e,o),t.destroy()})),n.appendChild(a)}function sx(n){return["startDate","scheduledDate","dueDate"].includes(n)}var bf=class extends rs{constructor(t,e,r=ni){super(r);let i=sx(t)?ex(t,e):tx(t,e);this.addItemsForInstructions(i,e)}};su();var Tf=class{constructor(){this.data=PY}addDataAttribute(t,e,r){this.data[r].addDataAttribute(t,e,r)}addClassName(t,e){let r=this.data[e].className;t.classList.add(r)}},hb=class{constructor(t,e,r){if(t==="")throw Error("Developer note: CSS class cannot be an empty string, please specify one.");this.className=t,this.attributeName=e,this.attributeValueCalculator=r}addDataAttribute(t,e,r){if(this.attributeName===hb.noAttributeName)return;let i=this.attributeValueCalculator(r,e);i!==""&&(t.dataset[this.attributeName]=i)}},Nr=hb;Nr.noAttributeName="",Nr.noAttributeValueCalculator=()=>"",Nr.dateAttributeCalculator=(t,e)=>{let i="far";function s(o){let u=window.moment().startOf("day").diff(o,"days");if(isNaN(u))return null;if(u===0)return"today";let c="";return u>0?c+="past-":u<0&&(c+="future-"),Math.abs(u)<=7?c+=Math.abs(u).toString()+"d":c+=i,c}let a=e[t];if(!Array.isArray(a)&&a instanceof window.moment){let o=s(a);if(o)return o}return""};function xo(n){return new Nr(n,Nr.noAttributeName,Nr.noAttributeValueCalculator)}function Oo(n,t){return new Nr(n,t,Nr.dateAttributeCalculator)}var PY={createdDate:Oo("task-created","taskCreated"),dueDate:Oo("task-due","taskDue"),startDate:Oo("task-start","taskStart"),scheduledDate:Oo("task-scheduled","taskScheduled"),doneDate:Oo("task-done","taskDone"),cancelledDate:Oo("task-cancelled","taskCancelled"),priority:new Nr("task-priority","taskPriority",(n,t)=>Rn.priorityNameUsingNormal(t.priority).toLocaleLowerCase()),description:xo("task-description"),recurrenceRule:xo("task-recurring"),onCompletion:xo("task-onCompletion"),dependsOn:xo("task-dependsOn"),id:xo("task-id"),blockLink:xo("task-block-link")};function lt(n,t){let e=document.createElement(n);return t.appendChild(e),e}var Mi=class{static obsidianMarkdownRenderer(t,e,r,i){return F(this,null,function*(){!i||(yield ax.MarkdownRenderer.renderMarkdown(t,e,r,i))})}constructor({textRenderer:t=Mi.obsidianMarkdownRenderer,obsidianComponent:e,parentUlElement:r,taskLayoutOptions:i,queryLayoutOptions:s}){this.textRenderer=t,this.obsidianComponent=e,this.parentUlElement=r,this.taskLayoutOptions=i,this.queryLayoutOptions=s}renderTaskLine(s){return F(this,arguments,function*({task:t,taskIndex:e,isTaskInQueryFile:r,isFilenameUnique:i}){let a=lt("li",this.parentUlElement);a.classList.add("task-list-item","plugin-tasks-list-item");let o=lt("span",a);o.classList.add("tasks-list-text"),yield this.taskToHtml(t,o,a,r);let l=lt("input",a);return l.classList.add("task-list-item-checkbox"),l.type="checkbox",t.status.symbol!==" "&&(l.checked=!0,a.classList.add("is-checked")),t.taskLocation.hasKnownPath&&(l.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),l.disabled=!0;let d=t.toggleWithRecurrenceInUsersOrder();Nn({originalTask:t,newTasks:d})}),l.addEventListener("contextmenu",c=>{new uf(Be.getInstance(),t).showAtPosition({x:c.clientX,y:c.clientY})}),l.setAttribute("title","Right-click for options")),a.prepend(l),a.setAttribute("data-task",t.status.symbol.trim()),a.setAttribute("data-line",e.toString()),a.setAttribute("data-task-status-name",t.status.name),a.setAttribute("data-task-status-type",t.status.type),l.setAttribute("data-line",e.toString()),this.queryLayoutOptions.shortMode&&this.addTooltip(t,o,i),a})}taskToHtml(t,e,r,i){return F(this,null,function*(){let s=new Tf,a=Er.tasksPluginEmoji.taskSerializer;for(let o of this.taskLayoutOptions.shownComponents){let l=a.componentToString(t,this.queryLayoutOptions.shortMode,o);if(l){let u=lt("span",e),c=lt("span",u);if(yield this.renderComponentText(c,l,o,t,i),this.addInternalClasses(o,c),s.addClassName(u,o),s.addDataAttribute(u,t,o),s.addDataAttribute(r,t,o),pe.allDateFields().includes(o)){let d=o;u.addEventListener("click",f=>{f.preventDefault(),f.stopPropagation(),ix(u,t,d,ni)}),u.addEventListener("contextmenu",f=>{f.preventDefault(),f.stopPropagation(),new bf(d,t,ni).showAtPosition({x:f.clientX,y:f.clientY})}),u.setAttribute("title",`Click to edit ${yf(d)}, Right-click for more options`)}}}for(let o of this.taskLayoutOptions.hiddenComponents)s.addDataAttribute(r,t,o);r.dataset.taskPriority===void 0&&s.addDataAttribute(r,t,"priority")})}renderComponentText(t,e,r,i,s){return F(this,null,function*(){if(r==="description")return yield this.renderDescription(i,t,s);t.innerHTML=e})}renderDescription(t,e,r){return F(this,null,function*(){let i=this.adjustRelativeLinksInDescription(t,r);i=Fe.getInstance().removeAsWordFromDependingOnSettings(i);let{debugSettings:s}=le();s.showTaskHiddenData&&(i+=`<br>\u{1F41B} <b>${t.lineNumber}</b> . ${t.sectionStart} . ${t.sectionIndex} . '<code>${t.originalMarkdown}</code>'<br>'<code>${t.path}</code>' > '<code>${t.precedingHeader}</code>'<br>`),yield this.textRenderer(i,e,t.path,this.obsidianComponent);let a=e.querySelector("blockquote"),o=a!=null?a:e,l=o.querySelector("p");if(l!==null){for(;l.firstChild;)o.insertBefore(l.firstChild,l);l.remove()}e.querySelectorAll("p").forEach(u=>{u.hasChildNodes()||u.remove()}),e.querySelectorAll(".footnotes").forEach(u=>{u.remove()})})}adjustRelativeLinksInDescription(t,e){if(e)return t.description;let r=t.file.cachedMetadata.links;if(!r)return t.description;let i=r.filter(a=>a.position.start.line===t.taskLocation.lineNumber&&t.description.includes(a.original)&&a.link.startsWith("#")),s=t.description;if(i.length!==0)for(let a of i){let o=`[[${t.path}${a.link}|${a.displayText}]]`;s=s.replace(a.original,o)}return s}addInternalClasses(t,e){function r(i){let s=/["&\x00\r\n]/g,a=i.replace(s,"-");return a=a.replace(/^[-_]+/,""),a.length>0?a:null}if(t==="description"){let i=e.getElementsByClassName("tag");for(let s=0;s<i.length;s++){let a=i[s].textContent;if(a){let o=r(a),l=i[s];o&&(l.dataset.tagName=o)}}}}addTooltip(t,e,r){let{recurrenceSymbol:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,dueDateSymbol:l,cancelledDateSymbol:u,doneDateSymbol:c}=Er.tasksPluginEmoji.taskSerializer.symbols;e.addEventListener("mouseenter",()=>{function d(T,_,O){_&&T.createDiv().setText(f({signifier:O,date:_}))}function f({signifier:T,date:_}){return`${T} ${_.format(fe.dateFormat)} (${_.from(window.moment().startOf("day"))})`}let p=e.createDiv();p.addClasses(["tooltip","pop-up"]),t.recurrence&&p.createDiv().setText(`${i} ${t.recurrence.toText()}`),d(p,t.createdDate,a),d(p,t.startDate,s),d(p,t.scheduledDate,o),d(p,t.dueDate,l),d(p,t.cancelledDate,u),d(p,t.doneDate,c);let b=t.getLinkText({isFilenameUnique:r});b&&p.createDiv().setText(`\u{1F517} ${b}`),e.addEventListener("mouseleave",()=>{p.remove()})})}renderListItem(t,e,r){return F(this,null,function*(){var o,l;let i=lt("li",t);if(e.statusCharacter){let u=lt("input",i);u.classList.add("task-list-item-checkbox"),u.type="checkbox",u.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),u.disabled=!0;let d=e.checkOrUncheck();Nn({originalTask:e,newTasks:d})}),e.statusCharacter!==" "&&(u.checked=!0,i.classList.add("is-checked")),i.classList.add("task-list-item"),i.setAttribute("data-task",e.statusCharacter.trim()),i.setAttribute("data-line",r.toString())}let s=lt("span",i);yield this.textRenderer(e.description,s,(l=(o=e.findClosestParentTask())==null?void 0:o.path)!=null?l:"",this.obsidianComponent);let a=s.querySelector("p");if(a!==null){for(;a.firstChild;)s.insertBefore(a.firstChild,a);a.remove()}return i})}};var _f=class{constructor({plugin:t}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);t.registerMarkdownPostProcessor((e,r)=>{t.app.workspace.onLayoutReady(()=>{this.markdownPostProcessor(e,r)})})}_markdownPostProcessor(t,e){return F(this,null,function*(){var d;let r=new ox.MarkdownRenderChild(t);e.addChild(r);let i=t.findAll(".task-list-item").filter(f=>{var T;let p=(T=f.textContent)==null?void 0:T.split(` + `}}function w(){e.calendarContainer.classList.add("hasWeeks");var h=$e("div","flatpickr-weekwrapper");h.appendChild($e("span","flatpickr-weekday",e.l10n.weekAbbreviation));var g=$e("div","flatpickr-weeks");return h.appendChild(g),{weekWrapper:h,weekNumbers:g}}function S(h,g){g===void 0&&(g=!0);var k=g?h:h-e.currentMonth;k<0&&e._hidePrevMonthArrow===!0||k>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=k,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,Xe("onYearChange"),C()),K(),Xe("onMonthChange"),da())}function M(h,g){if(h===void 0&&(h=!0),g===void 0&&(g=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,g===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var k=gf(e.config),R=k.hours,G=k.minutes,X=k.seconds;p(R,G,X)}e.redraw(),h&&Xe("onChange")}function I(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),Xe("onClose")}function j(){e.config!==void 0&&Xe("onDestroy");for(var h=e._handlers.length;h--;)e._handlers[h].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var g=e.calendarContainer.parentNode;if(g.lastChild&&g.removeChild(g.lastChild),g.parentNode){for(;g.firstChild;)g.parentNode.insertBefore(g.firstChild,g);g.parentNode.removeChild(g)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(k){try{delete e[k]}catch(R){}})}function D(h){return e.calendarContainer.contains(h)}function P(h){if(e.isOpen&&!e.config.inline){var g=Tn(h),k=D(g),R=g===e.input||g===e.altInput||e.element.contains(g)||h.path&&h.path.indexOf&&(~h.path.indexOf(e.input)||~h.path.indexOf(e.altInput)),G=!R&&!k&&!D(h.relatedTarget),X=!e.config.ignoredFocusElements.some(function(_e){return _e.contains(g)});G&&X&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&l(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function W(h){if(!(!h||e.config.minDate&&h<e.config.minDate.getFullYear()||e.config.maxDate&&h>e.config.maxDate.getFullYear())){var g=h,k=e.currentYear!==g;e.currentYear=g||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),k&&(e.redraw(),Xe("onYearChange"),C())}}function ce(h,g){var k;g===void 0&&(g=!0);var R=e.parseDate(h,void 0,g);if(e.config.minDate&&R&&_n(R,e.config.minDate,g!==void 0?g:!e.minDateHasTime)<0||e.config.maxDate&&R&&_n(R,e.config.maxDate,g!==void 0?g:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(R===void 0)return!1;for(var G=!!e.config.enable,X=(k=e.config.enable)!==null&&k!==void 0?k:e.config.disable,_e=0,ne=void 0;_e<X.length;_e++){if(ne=X[_e],typeof ne=="function"&&ne(R))return G;if(ne instanceof Date&&R!==void 0&&ne.getTime()===R.getTime())return G;if(typeof ne=="string"){var Ce=e.parseDate(ne,void 0,!0);return Ce&&Ce.getTime()===R.getTime()?G:!G}else if(typeof ne=="object"&&R!==void 0&&ne.from&&ne.to&&R.getTime()>=ne.from.getTime()&&R.getTime()<=ne.to.getTime())return G}return!G}function be(h){return e.daysContainer!==void 0?h.className.indexOf("hidden")===-1&&h.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(h):!1}function Oe(h){var g=h.target===e._input,k=e._input.value.trimEnd()!==fa();g&&k&&!(h.relatedTarget&&D(h.relatedTarget))&&e.setDate(e._input.value,!0,h.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function He(h){var g=Tn(h),k=e.config.wrap?n.contains(g):g===e._input,R=e.config.allowInput,G=e.isOpen&&(!R||!k),X=e.config.inline&&k&&!R;if(h.keyCode===13&&k){if(R)return e.setDate(e._input.value,!0,g===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),g.blur();e.open()}else if(D(g)||G||X){var _e=!!e.timeContainer&&e.timeContainer.contains(g);switch(h.keyCode){case 13:_e?(h.preventDefault(),l(),la()):Yn(h);break;case 27:h.preventDefault(),la();break;case 8:case 46:k&&!e.config.allowInput&&(h.preventDefault(),e.clear());break;case 37:case 39:if(!_e&&!k){h.preventDefault();var ne=s();if(e.daysContainer!==void 0&&(R===!1||ne&&be(ne))){var Ce=h.keyCode===39?1:-1;h.ctrlKey?(h.stopPropagation(),S(Ce),we(Z(1),0)):we(void 0,Ce)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:h.preventDefault();var ie=h.keyCode===40?1:-1;e.daysContainer&&g.$i!==void 0||g===e.input||g===e.altInput?h.ctrlKey?(h.stopPropagation(),W(e.currentYear-ie),we(Z(1),0)):_e||we(void 0,ie*7):g===e.currentYearElement?W(e.currentYear-ie):e.config.enableTime&&(!_e&&e.hourElement&&e.hourElement.focus(),l(h),e._debouncedChange());break;case 9:if(_e){var me=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(Ot){return Ot}),ze=me.indexOf(g);if(ze!==-1){var Wn=me[ze+(h.shiftKey?-1:1)];h.preventDefault(),(Wn||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(g)&&h.shiftKey&&(h.preventDefault(),e._input.focus());break;default:break}}if(e.amPM!==void 0&&g===e.amPM)switch(h.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],d(),hr();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],d(),hr();break}(k||D(g))&&Xe("onKeyDown",h)}function Le(h,g){if(g===void 0&&(g="flatpickr-day"),!(e.selectedDates.length!==1||h&&(!h.classList.contains(g)||h.classList.contains("flatpickr-disabled")))){for(var k=h?h.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),R=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),G=Math.min(k,e.selectedDates[0].getTime()),X=Math.max(k,e.selectedDates[0].getTime()),_e=!1,ne=0,Ce=0,ie=G;ie<X;ie+=$E.DAY)ce(new Date(ie),!0)||(_e=_e||ie>G&&ie<X,ie<R&&(!ne||ie>ne)?ne=ie:ie>R&&(!Ce||ie<Ce)&&(Ce=ie));var me=Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+g));me.forEach(function(ze){var Wn=ze.dateObj,Ot=Wn.getTime(),ds=ne>0&&Ot<ne||Ce>0&&Ot>Ce;if(ds){ze.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Pi){ze.classList.remove(Pi)});return}else if(_e&&!ds)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Pi){ze.classList.remove(Pi)}),h!==void 0&&(h.classList.add(k<=e.selectedDates[0].getTime()?"startRange":"endRange"),R<k&&Ot===R?ze.classList.add("startRange"):R>k&&Ot===R&&ze.classList.add("endRange"),Ot>=ne&&(Ce===0||Ot<=Ce)&&jE(Ot,R,k)&&ze.classList.add("inRange"))})}}function Yt(){e.isOpen&&!e.config.static&&!e.config.inline&&us()}function pr(h,g){if(g===void 0&&(g=e._positionElement),e.isMobile===!0){if(h){h.preventDefault();var k=Tn(h);k&&k.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),Xe("onOpen");return}else if(e._input.disabled||e.config.inline)return;var R=e.isOpen;e.isOpen=!0,R||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),Xe("onOpen"),us(g)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(h===void 0||!e.timeContainer.contains(h.relatedTarget))&&setTimeout(function(){return e.hourElement.select()},50)}function vn(h){return function(g){var k=e.config["_"+h+"Date"]=e.parseDate(g,e.config.dateFormat),R=e.config["_"+(h==="min"?"max":"min")+"Date"];k!==void 0&&(e[h==="min"?"minDateHasTime":"maxDateHasTime"]=k.getHours()>0||k.getMinutes()>0||k.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function(G){return ce(G)}),!e.selectedDates.length&&h==="min"&&f(k),hr()),e.daysContainer&&(oa(),k!==void 0?e.currentYearElement[h]=k.getFullYear().toString():e.currentYearElement.removeAttribute(h),e.currentYearElement.disabled=!!R&&k!==void 0&&R.getFullYear()===k.getFullYear())}}function te(){var h=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],g=Jt(Jt({},JSON.parse(JSON.stringify(n.dataset||{}))),t),k={};e.config.parseDate=g.parseDate,e.config.formatDate=g.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(me){e.config._enable=Fr(me)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(me){e.config._disable=Fr(me)}});var R=g.mode==="time";if(!g.dateFormat&&(g.enableTime||R)){var G=pt.defaultConfig.dateFormat||is.dateFormat;k.dateFormat=g.noCalendar||R?"H:i"+(g.enableSeconds?":S":""):G+" H:i"+(g.enableSeconds?":S":"")}if(g.altInput&&(g.enableTime||R)&&!g.altFormat){var X=pt.defaultConfig.altFormat||is.altFormat;k.altFormat=g.noCalendar||R?"h:i"+(g.enableSeconds?":S K":" K"):X+(" h:i"+(g.enableSeconds?":S":"")+" K")}Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:vn("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:vn("max")});var _e=function(me){return function(ze){e.config[me==="min"?"_minTime":"_maxTime"]=e.parseDate(ze,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:_e("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:_e("max")}),g.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,k,g);for(var ne=0;ne<h.length;ne++)e.config[h[ne]]=e.config[h[ne]]===!0||e.config[h[ne]]==="true";cf.filter(function(me){return e.config[me]!==void 0}).forEach(function(me){e.config[me]=pf(e.config[me]||[]).map(a)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var ne=0;ne<e.config.plugins.length;ne++){var Ce=e.config.plugins[ne](e)||{};for(var ie in Ce)cf.indexOf(ie)>-1?e.config[ie]=pf(Ce[ie]).map(a).concat(e.config[ie]):typeof g[ie]=="undefined"&&(e.config[ie]=Ce[ie])}g.altInputClass||(e.config.altInputClass=jt().className+" "+e.config.altInputClass),Xe("onParseConfig")}function jt(){return e.config.wrap?n.querySelector("[data-input]"):n}function it(){typeof e.config.locale!="object"&&typeof pt.l10ns[e.config.locale]=="undefined"&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=Jt(Jt({},pt.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?pt.l10ns[e.config.locale]:void 0),Ci.D="("+e.l10n.weekdays.shorthand.join("|")+")",Ci.l="("+e.l10n.weekdays.longhand.join("|")+")",Ci.M="("+e.l10n.months.shorthand.join("|")+")",Ci.F="("+e.l10n.months.longhand.join("|")+")",Ci.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")";var h=Jt(Jt({},t),JSON.parse(JSON.stringify(n.dataset||{})));h.time_24hr===void 0&&pt.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=db(e),e.parseDate=mf({config:e.config,l10n:e.l10n})}function us(h){if(typeof e.config.position=="function")return void e.config.position(e,h);if(e.calendarContainer!==void 0){Xe("onPreCalendarPosition");var g=h||e._positionElement,k=Array.prototype.reduce.call(e.calendarContainer.children,function(ps,ms){return ps+ms.offsetHeight},0),R=e.calendarContainer.offsetWidth,G=e.config.position.split(" "),X=G[0],_e=G.length>1?G[1]:null,ne=g.getBoundingClientRect(),Ce=window.innerHeight-ne.bottom,ie=X==="above"||X!=="below"&&Ce<k&&ne.top>k,me=window.pageYOffset+ne.top+(ie?-k-2:g.offsetHeight+2);if(Zt(e.calendarContainer,"arrowTop",!ie),Zt(e.calendarContainer,"arrowBottom",ie),!e.config.inline){var ze=window.pageXOffset+ne.left,Wn=!1,Ot=!1;_e==="center"?(ze-=(R-ne.width)/2,Wn=!0):_e==="right"&&(ze-=R-ne.width,Ot=!0),Zt(e.calendarContainer,"arrowLeft",!Wn&&!Ot),Zt(e.calendarContainer,"arrowCenter",Wn),Zt(e.calendarContainer,"arrowRight",Ot);var ds=window.document.body.offsetWidth-(window.pageXOffset+ne.right),Pi=ze+R>window.document.body.offsetWidth,Io=ds+R>window.document.body.offsetWidth;if(Zt(e.calendarContainer,"rightMost",Pi),!e.config.static)if(e.calendarContainer.style.top=me+"px",!Pi)e.calendarContainer.style.left=ze+"px",e.calendarContainer.style.right="auto";else if(!Io)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=ds+"px";else{var Fo=mr();if(Fo===void 0)return;var Mf=window.document.body.offsetWidth,Lo=Math.max(0,Mf/2-R/2),L=".flatpickr-calendar.centerMost:before",he=".flatpickr-calendar.centerMost:after",gr=Fo.cssRules.length,fs="{left:"+ne.left+"px;right:auto;}";Zt(e.calendarContainer,"rightMost",!1),Zt(e.calendarContainer,"centerMost",!0),Fo.insertRule(L+","+he+fs,gr),e.calendarContainer.style.left=Lo+"px",e.calendarContainer.style.right="auto"}}}}function mr(){for(var h=null,g=0;g<document.styleSheets.length;g++){var k=document.styleSheets[g];if(!!k.cssRules){try{k.cssRules}catch(R){continue}h=k;break}}return h!=null?h:Mo()}function Mo(){var h=document.createElement("style");return document.head.appendChild(h),h.sheet}function oa(){e.config.noCalendar||e.isMobile||(C(),da(),K())}function la(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function Yn(h){h.preventDefault(),h.stopPropagation();var g=function(me){return me.classList&&me.classList.contains("flatpickr-day")&&!me.classList.contains("flatpickr-disabled")&&!me.classList.contains("notAllowed")},k=ub(Tn(h),g);if(k!==void 0){var R=k,G=e.latestSelectedDateObj=new Date(R.dateObj.getTime()),X=(G.getMonth()<e.currentMonth||G.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=R,e.config.mode==="single")e.selectedDates=[G];else if(e.config.mode==="multiple"){var _e=Lr(G);_e?e.selectedDates.splice(parseInt(_e),1):e.selectedDates.push(G)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=G,e.selectedDates.push(G),_n(G,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(me,ze){return me.getTime()-ze.getTime()}));if(d(),X){var ne=e.currentYear!==G.getFullYear();e.currentYear=G.getFullYear(),e.currentMonth=G.getMonth(),ne&&(Xe("onYearChange"),C()),Xe("onMonthChange")}if(da(),K(),hr(),!X&&e.config.mode!=="range"&&e.config.showMonths===1?H(R):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){var Ce=e.config.mode==="single"&&!e.config.enableTime,ie=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(Ce||ie)&&la()}_()}}var Ri={locale:[it,v],showMonths:[$,o,y],minDate:[E],maxDate:[E],positionElement:[Po],clickOpens:[function(){e.config.clickOpens===!0?(T(e._input,"focus",e.open),T(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function Ro(h,g){if(h!==null&&typeof h=="object"){Object.assign(e.config,h);for(var k in h)Ri[k]!==void 0&&Ri[k].forEach(function(R){return R()})}else e.config[h]=g,Ri[h]!==void 0?Ri[h].forEach(function(R){return R()}):cf.indexOf(h)>-1&&(e.config[h]=pf(g));e.redraw(),hr(!0)}function Ao(h,g){var k=[];if(h instanceof Array)k=h.map(function(R){return e.parseDate(R,g)});else if(h instanceof Date||typeof h=="number")k=[e.parseDate(h,g)];else if(typeof h=="string")switch(e.config.mode){case"single":case"time":k=[e.parseDate(h,g)];break;case"multiple":k=h.split(e.config.conjunction).map(function(R){return e.parseDate(R,g)});break;case"range":k=h.split(e.l10n.rangeSeparator).map(function(R){return e.parseDate(R,g)});break;default:break}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(h)));e.selectedDates=e.config.allowInvalidPreload?k:k.filter(function(R){return R instanceof Date&&ce(R,!1)}),e.config.mode==="range"&&e.selectedDates.sort(function(R,G){return R.getTime()-G.getTime()})}function Ai(h,g,k){if(g===void 0&&(g=!1),k===void 0&&(k=e.config.dateFormat),h!==0&&!h||h instanceof Array&&h.length===0)return e.clear(g);Ao(h,k),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),E(void 0,g),f(),e.selectedDates.length===0&&e.clear(!1),hr(g),g&&Xe("onChange")}function Fr(h){return h.slice().map(function(g){return typeof g=="string"||typeof g=="number"||g instanceof Date?e.parseDate(g,void 0,!0):g&&typeof g=="object"&&g.from&&g.to?{from:e.parseDate(g.from,void 0),to:e.parseDate(g.to,void 0)}:g}).filter(function(g){return g})}function Au(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var h=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);h&&Ao(h,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function ua(){if(e.input=jt(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=$e(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),Po()}function Po(){e._positionElement=e.config.positionElement||e._input}function cs(){var h=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=$e("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=h,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=h==="datetime-local"?"Y-m-d\\TH:i:S":h==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch(g){}T(e.mobileInput,"change",function(g){e.setDate(Tn(g).value,!1,e.mobileFormatStr),Xe("onChange"),Xe("onClose")})}function jn(h){if(e.isOpen===!0)return e.close();e.open(h)}function Xe(h,g){if(e.config!==void 0){var k=e.config[h];if(k!==void 0&&k.length>0)for(var R=0;k[R]&&R<k.length;R++)k[R](e.selectedDates,e.input.value,e,g);h==="onChange"&&(e.input.dispatchEvent(ca("change")),e.input.dispatchEvent(ca("input")))}}function ca(h){var g=document.createEvent("Event");return g.initEvent(h,!0,!0),g}function Lr(h){for(var g=0;g<e.selectedDates.length;g++){var k=e.selectedDates[g];if(k instanceof Date&&_n(k,h)===0)return""+g}return!1}function xt(h){return e.config.mode!=="range"||e.selectedDates.length<2?!1:_n(h,e.selectedDates[0])>=0&&_n(h,e.selectedDates[1])<=0}function da(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(h,g){var k=new Date(e.currentYear,e.currentMonth,1);k.setMonth(e.currentMonth+g),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[g].textContent=xu(k.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=k.getMonth().toString(),h.value=k.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function fa(h){var g=h||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(k){return e.formatDate(k,g)}).filter(function(k,R,G){return e.config.mode!=="range"||e.config.enableTime||G.indexOf(k)===R}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function hr(h){h===void 0&&(h=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=fa(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=fa(e.config.altFormat)),h!==!1&&Xe("onValueUpdate")}function Cf(h){var g=Tn(h),k=e.prevMonthNav.contains(g),R=e.nextMonthNav.contains(g);k||R?S(k?-1:1):e.yearElements.indexOf(g)>=0?g.select():g.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):g.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function No(h){h.preventDefault();var g=h.type==="keydown",k=Tn(h),R=k;e.amPM!==void 0&&k===e.amPM&&(e.amPM.textContent=e.l10n.amPM[bn(e.amPM.textContent===e.l10n.amPM[0])]);var G=parseFloat(R.getAttribute("min")),X=parseFloat(R.getAttribute("max")),_e=parseFloat(R.getAttribute("step")),ne=parseInt(R.value,10),Ce=h.delta||(g?h.which===38?1:-1:0),ie=ne+_e*Ce;if(typeof R.value!="undefined"&&R.value.length===2){var me=R===e.hourElement,ze=R===e.minuteElement;ie<G?(ie=X+ie+bn(!me)+(bn(me)&&bn(!e.amPM)),ze&&Y(void 0,-1,e.hourElement)):ie>X&&(ie=R===e.hourElement?ie-X-bn(!e.amPM):G,ze&&Y(void 0,1,e.hourElement)),e.amPM&&me&&(_e===1?ie+ne===23:Math.abs(ie-ne)>_e)&&(e.amPM.textContent=e.l10n.amPM[bn(e.amPM.textContent===e.l10n.amPM[0])]),R.value=Xt(ie)}}return i(),e}function So(n,t){for(var e=Array.prototype.slice.call(n).filter(function(a){return a instanceof HTMLElement}),r=[],i=0;i<e.length;i++){var s=e[i];try{if(s.getAttribute("data-fp-omit")!==null)continue;s._flatpickr!==void 0&&(s._flatpickr.destroy(),s._flatpickr=void 0),s._flatpickr=RY(s,t||{}),r.push(s._flatpickr)}catch(a){console.error(a)}}return r.length===1?r[0]:r}typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return So(this,n)},HTMLElement.prototype.flatpickr=function(n){return So([this],n)});var pt=function(n,t){return typeof n=="string"?So(window.document.querySelectorAll(n),t):n instanceof Node?So([n],t):So(n,t)};pt.defaultConfig={};pt.l10ns={en:Jt({},ff),default:Jt({},ff)};pt.localize=function(n){pt.l10ns.default=Jt(Jt({},pt.l10ns.default),n)};pt.setDefaults=function(n){pt.defaultConfig=Jt(Jt({},pt.defaultConfig),n)};pt.parseDate=mf({});pt.formatDate=db({});pt.compareDates=_n;typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(n){return So(this,n)});Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))};typeof window!="undefined"&&(window.flatpickr=pt);var HE=pt;Nt();Nt();Gi();sd();function GE(n){for(let e of pe.allDateFields()){let r=n[e];if(r&&!r.isValid())return!1}let t=n.happensDates.some(e=>!!(e!=null&&e.isValid()));return!n.isDone&&t}function Do(n){return n.dueDate?"dueDate":n.scheduledDate?"scheduledDate":n.startDate?"startDate":null}function fb(n,t,e,r){let i=n[t];return zE(i,n,t,e,r)}function BE(n,t,e,r){let i=window.moment();return zE(i,n,t,e,r)}function VE(n,t,e,r){return KE(n,t,null)}function zE(n,t,e,r,i){let s=new It(n).postpone(r,i);return KE(t,e,s)}function KE(n,t,e){let r=Ft.removeInferredStatusIfNeeded(n,[new pe(de(U({},n),{[t]:e}))])[0];return{postponedDate:e,postponedTask:r}}function QE(n,t){if(n){let e=n==null?void 0:n.format("DD MMM YYYY");return`Task's ${t} changed to ${e}`}else return`Task's ${t} removed`}function XE(n,t,e){return`\u2139\uFE0F ${pb(n,t,e)} (right-click for more options)`}function pb(n,t,e){let r=Do(n),i=n[r];return Eo(r,i,t,e)}function ZE(n,t,e){let r=Do(n),i=window.moment().startOf("day");return Eo(r,i,t,e)}function JE(n,t,e){let r=Do(n);return mb(r,n)}function mb(n,t){return n==="scheduledDate"&&t.scheduledDateIsInferred?"Cannot remove inferred scheduled date":`Remove ${yf(n)}`}function AY(n){return Za(n.replace("Date",""))}function yf(n){return n.replace("Date"," date")}function Eo(n,t,e,r){let s=new It(t).postpone(r,e).format("ddd Do MMM"),a=e!=1?e:"a";if(t.isSameOrBefore(window.moment(),"day")){let l=AY(n);return(e>=0?`${l} in ${a} ${r}, on ${s}`:`${l} ${-a} ${r} ago, on ${s}`).replace(" 1 day ago"," yesterday").replace(" in 0 days"," today").replace("in a day","tomorrow")}let o=yf(n);return e>=0?`Postpone ${o} by ${a} ${r}, to ${s}`:`Backdate ${o} by ${-a} ${r}, to ${s}`}sd();var ss=class{constructor(t,e,r){this.newDate=e,this.dateFieldToEdit=t,this.displayName=r!=null?r:`Set Date: ${this.newDate.toDateString()}`}apply(t){return this.isCheckedForTask(t)?[t]:[new pe(de(U({},t),{[this.dateFieldToEdit]:window.moment(this.newDate)}))]}instructionDisplayName(){return this.displayName}isCheckedForTask(t){var e;return((e=t[this.dateFieldToEdit])==null?void 0:e.isSame(window.moment(this.newDate)))||!1}},Pr=class extends ss{constructor(t,e,r,i){var l;let s=(l=e[t])!=null?l:window.moment(),a=Eo(t,s,r,i),o=new It(window.moment(s)).postpone(i,r).toDate();super(t,o,a)}},Ou=class{constructor(t,e){this.dateFieldToEdit=t,this.displayName=mb(t,e)}apply(t){let e=this.dateFieldToEdit==="scheduledDate"&&t.scheduledDateIsInferred;return t[this.dateFieldToEdit]===null||e?[t]:[new pe(de(U({},t),{[this.dateFieldToEdit]:null}))]}instructionDisplayName(){return this.displayName}isCheckedForTask(t){return!1}};function ex(n,t){return nx(t,n,1)}function tx(n,t){return nx(t,n,-1)}function nx(n,t,e){let r=window.moment().startOf("day"),i=r.toDate(),s=new It(r.clone());return[new ss(t,i,Eo(t,r,0,"days")),new ss(t,s.postpone("day",e).toDate(),Eo(t,r,e,"day")),new wo,new Pr(t,n,e*2,"days"),new Pr(t,n,e*3,"days"),new Pr(t,n,e*4,"days"),new Pr(t,n,e*5,"days"),new Pr(t,n,e*6,"days"),new wo,new Pr(t,n,e,"week"),new Pr(t,n,e*2,"weeks"),new Pr(t,n,e*3,"weeks"),new Pr(t,n,e,"month"),new wo,new Ou(t,n)]}function ix(n,t,e,r){var a,o;let i=t[e];HE(n,{defaultDate:i?i.format("YYYY-MM-DD"):new Date,disableMobile:!0,enableTime:!1,dateFormat:"Y-m-d",locale:{firstDayOfWeek:(o=(a=new Intl.Locale(navigator.language).weekInfo)==null?void 0:a.firstDay)!=null?o:1},onClose:(l,u,c)=>F(this,null,function*(){if(l.length>0){let d=l[0],f=new ss(e,d).apply(t);yield r(t,f)}c.destroy()}),onReady:(l,u,c)=>{let d=document.createElement("div");d.style.display="flex",d.style.justifyContent="space-between",d.style.marginTop="10px",rx(d,c,t,r,"Clear",()=>new Ou(e,t).apply(t)),rx(d,c,t,r,"Today",()=>{let p=new Date;return new ss(e,p).apply(t)}),c.calendarContainer.appendChild(d)}}).open()}function rx(n,t,e,r,i,s){let a=document.createElement("button");a.type="button",a.textContent=i,a.classList.add("flatpickr-button"),a.addEventListener("click",()=>F(this,null,function*(){let o=s();yield r(e,o),t.destroy()})),n.appendChild(a)}function sx(n){return["startDate","scheduledDate","dueDate"].includes(n)}var bf=class extends rs{constructor(t,e,r=ni){super(r);let i=sx(t)?ex(t,e):tx(t,e);this.addItemsForInstructions(i,e)}};su();var Tf=class{constructor(){this.data=PY}addDataAttribute(t,e,r){this.data[r].addDataAttribute(t,e,r)}addClassName(t,e){let r=this.data[e].className;t.classList.add(r)}},hb=class{constructor(t,e,r){if(t==="")throw Error("Developer note: CSS class cannot be an empty string, please specify one.");this.className=t,this.attributeName=e,this.attributeValueCalculator=r}addDataAttribute(t,e,r){if(this.attributeName===hb.noAttributeName)return;let i=this.attributeValueCalculator(r,e);i!==""&&(t.dataset[this.attributeName]=i)}},Nr=hb;Nr.noAttributeName="",Nr.noAttributeValueCalculator=()=>"",Nr.dateAttributeCalculator=(t,e)=>{let i="far";function s(o){let u=window.moment().startOf("day").diff(o,"days");if(isNaN(u))return null;if(u===0)return"today";let c="";return u>0?c+="past-":u<0&&(c+="future-"),Math.abs(u)<=7?c+=Math.abs(u).toString()+"d":c+=i,c}let a=e[t];if(!Array.isArray(a)&&a instanceof window.moment){let o=s(a);if(o)return o}return""};function xo(n){return new Nr(n,Nr.noAttributeName,Nr.noAttributeValueCalculator)}function Oo(n,t){return new Nr(n,t,Nr.dateAttributeCalculator)}var PY={createdDate:Oo("task-created","taskCreated"),dueDate:Oo("task-due","taskDue"),startDate:Oo("task-start","taskStart"),scheduledDate:Oo("task-scheduled","taskScheduled"),doneDate:Oo("task-done","taskDone"),cancelledDate:Oo("task-cancelled","taskCancelled"),priority:new Nr("task-priority","taskPriority",(n,t)=>Rn.priorityNameUsingNormal(t.priority).toLocaleLowerCase()),description:xo("task-description"),recurrenceRule:xo("task-recurring"),onCompletion:xo("task-onCompletion"),dependsOn:xo("task-dependsOn"),id:xo("task-id"),blockLink:xo("task-block-link")};function lt(n,t){let e=document.createElement(n);return t.appendChild(e),e}var Mi=class{static obsidianMarkdownRenderer(t,e,r,i){return F(this,null,function*(){!i||(yield ax.MarkdownRenderer.renderMarkdown(t,e,r,i))})}constructor({textRenderer:t=Mi.obsidianMarkdownRenderer,obsidianComponent:e,parentUlElement:r,taskLayoutOptions:i,queryLayoutOptions:s}){this.textRenderer=t,this.obsidianComponent=e,this.parentUlElement=r,this.taskLayoutOptions=i,this.queryLayoutOptions=s}renderTaskLine(s){return F(this,arguments,function*({task:t,taskIndex:e,isTaskInQueryFile:r,isFilenameUnique:i}){let a=lt("li",this.parentUlElement);a.classList.add("task-list-item","plugin-tasks-list-item");let o=lt("span",a);o.classList.add("tasks-list-text"),yield this.taskToHtml(t,o,a,r);let l=lt("input",a);return l.classList.add("task-list-item-checkbox"),l.type="checkbox",t.status.symbol!==" "&&(l.checked=!0,a.classList.add("is-checked")),t.taskLocation.hasKnownPath&&(l.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),l.disabled=!0;let d=t.toggleWithRecurrenceInUsersOrder();Nn({originalTask:t,newTasks:d})}),l.addEventListener("contextmenu",c=>{new uf(Be.getInstance(),t).showAtPosition({x:c.clientX,y:c.clientY})}),l.setAttribute("title","Right-click for options")),a.prepend(l),a.setAttribute("data-task",t.status.symbol.trim()),a.setAttribute("data-line",e.toString()),a.setAttribute("data-task-status-name",t.status.name),a.setAttribute("data-task-status-type",t.status.type),l.setAttribute("data-line",e.toString()),this.queryLayoutOptions.shortMode&&this.addTooltip(t,o,i),a})}taskToHtml(t,e,r,i){return F(this,null,function*(){let s=new Tf,a=Er.tasksPluginEmoji.taskSerializer;for(let o of this.taskLayoutOptions.shownComponents){let l=a.componentToString(t,this.queryLayoutOptions.shortMode,o);if(l){let u=lt("span",e),c=lt("span",u);if(yield this.renderComponentText(c,l,o,t,i),this.addInternalClasses(o,c),s.addClassName(u,o),s.addDataAttribute(u,t,o),s.addDataAttribute(r,t,o),pe.allDateFields().includes(o)){let d=o;u.addEventListener("click",f=>{f.preventDefault(),f.stopPropagation(),ix(u,t,d,ni)}),u.addEventListener("contextmenu",f=>{f.preventDefault(),f.stopPropagation(),new bf(d,t,ni).showAtPosition({x:f.clientX,y:f.clientY})}),u.setAttribute("title",`Click to edit ${yf(d)}, Right-click for more options`)}}}for(let o of this.taskLayoutOptions.hiddenComponents)s.addDataAttribute(r,t,o);r.dataset.taskPriority===void 0&&s.addDataAttribute(r,t,"priority")})}renderComponentText(t,e,r,i,s){return F(this,null,function*(){if(r==="description")return yield this.renderDescription(i,t,s);t.innerHTML=e})}renderDescription(t,e,r){return F(this,null,function*(){let i=this.adjustRelativeLinksInDescription(t,r);i=Fe.getInstance().removeAsWordFromDependingOnSettings(i);let{debugSettings:s}=oe();s.showTaskHiddenData&&(i+=`<br>\u{1F41B} <b>${t.lineNumber}</b> . ${t.sectionStart} . ${t.sectionIndex} . '<code>${t.originalMarkdown}</code>'<br>'<code>${t.path}</code>' > '<code>${t.precedingHeader}</code>'<br>`),yield this.textRenderer(i,e,t.path,this.obsidianComponent);let a=e.querySelector("blockquote"),o=a!=null?a:e,l=o.querySelector("p");if(l!==null){for(;l.firstChild;)o.insertBefore(l.firstChild,l);l.remove()}e.querySelectorAll("p").forEach(u=>{u.hasChildNodes()||u.remove()}),e.querySelectorAll(".footnotes").forEach(u=>{u.remove()})})}adjustRelativeLinksInDescription(t,e){if(e)return t.description;let r=t.file.cachedMetadata.links;if(!r)return t.description;let i=r.filter(a=>a.position.start.line===t.taskLocation.lineNumber&&t.description.includes(a.original)&&a.link.startsWith("#")),s=t.description;if(i.length!==0)for(let a of i){let o=`[[${t.path}${a.link}|${a.displayText}]]`;s=s.replace(a.original,o)}return s}addInternalClasses(t,e){function r(i){let s=/["&\x00\r\n]/g,a=i.replace(s,"-");return a=a.replace(/^[-_]+/,""),a.length>0?a:null}if(t==="description"){let i=e.getElementsByClassName("tag");for(let s=0;s<i.length;s++){let a=i[s].textContent;if(a){let o=r(a),l=i[s];o&&(l.dataset.tagName=o)}}}}addTooltip(t,e,r){let{recurrenceSymbol:i,startDateSymbol:s,createdDateSymbol:a,scheduledDateSymbol:o,dueDateSymbol:l,cancelledDateSymbol:u,doneDateSymbol:c}=Er.tasksPluginEmoji.taskSerializer.symbols;e.addEventListener("mouseenter",()=>{function d(T,_,O){_&&T.createDiv().setText(f({signifier:O,date:_}))}function f({signifier:T,date:_}){return`${T} ${_.format(fe.dateFormat)} (${_.from(window.moment().startOf("day"))})`}let p=e.createDiv();p.addClasses(["tooltip","pop-up"]),t.recurrence&&p.createDiv().setText(`${i} ${t.recurrence.toText()}`),d(p,t.createdDate,a),d(p,t.startDate,s),d(p,t.scheduledDate,o),d(p,t.dueDate,l),d(p,t.cancelledDate,u),d(p,t.doneDate,c);let b=t.getLinkText({isFilenameUnique:r});b&&p.createDiv().setText(`\u{1F517} ${b}`),e.addEventListener("mouseleave",()=>{p.remove()})})}renderListItem(t,e,r){return F(this,null,function*(){var o,l;let i=lt("li",t);if(e.statusCharacter){let u=lt("input",i);u.classList.add("task-list-item-checkbox"),u.type="checkbox",u.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),u.disabled=!0;let d=e.checkOrUncheck();Nn({originalTask:e,newTasks:d})}),e.statusCharacter!==" "&&(u.checked=!0,i.classList.add("is-checked")),i.classList.add("task-list-item"),i.setAttribute("data-task",e.statusCharacter.trim()),i.setAttribute("data-line",r.toString())}let s=lt("span",i);yield this.textRenderer(e.description,s,(l=(o=e.findClosestParentTask())==null?void 0:o.path)!=null?l:"",this.obsidianComponent);let a=s.querySelector("p");if(a!==null){for(;a.firstChild;)s.insertBefore(a.firstChild,a);a.remove()}return i})}};var _f=class{constructor({plugin:t}){this.markdownPostProcessor=this._markdownPostProcessor.bind(this);t.registerMarkdownPostProcessor((e,r)=>{t.app.workspace.onLayoutReady(()=>{this.markdownPostProcessor(e,r)})})}_markdownPostProcessor(t,e){return F(this,null,function*(){var d;let r=new ox.MarkdownRenderChild(t);e.addChild(r);let i=t.findAll(".task-list-item").filter(f=>{var T;let p=(T=f.textContent)==null?void 0:T.split(` `);if(p===void 0)return!1;let b=null;for(let _=0;_<p.length;_=_+1)if(p[_]!==""){b=p[_];break}return b===null?!1:Fe.getInstance().includedIn(b)});if(i.length===0)return;let s=e.sourcePath,a=e.getSectionInfo(t);if(a===null)return;let o=a.text.split(` `),l=0,u=[];for(let f=a.lineStart;f<=a.lineEnd;f++){let p=o[f];if(p===void 0)continue;let b=null,T=pe.fromLine({line:p,taskLocation:new Lt(new mt(s),f,a.lineStart,l,b),fallbackDate:null});T!==null&&(u.push(T),l++)}let c=new Mi({obsidianComponent:r,parentUlElement:t,taskLayoutOptions:new Br,queryLayoutOptions:new Ki});for(let f=0;f<i.length;f++){let p=u[f],b=i[f];if(p===void 0||b===void 0)continue;let T=(d=b.getAttr("data-line"))!=null?d:"0",_=Number.parseInt(T,10),O=yield c.renderTaskLine({task:p,taskIndex:_,isTaskInQueryFile:!0}),E=b.childNodes;for(let q=0;q<E.length;q=q+1){let se=E[q],H=se.nodeName.toLowerCase();H==="div"?O.prepend(se):(H==="ul"||H==="ol")&&O.append(se)}let A=b.querySelectorAll("[data-footnote-id]"),Y=O.querySelectorAll("[data-footnote-id]");if(A.length===Y.length)for(let q=0;q<A.length;q++)Y[q].replaceWith(A[q]);b.replaceWith(O)}})}};var lx=require("@codemirror/view"),ux=require("obsidian");Nt();var cx=()=>lx.ViewPlugin.fromClass(gb),gb=class{constructor(t){this.view=t,this.handleClickEvent=this.handleClickEvent.bind(this),this.view.dom.addEventListener("click",this.handleClickEvent)}destroy(){this.view.dom.removeEventListener("click",this.handleClickEvent)}handleClickEvent(t){let{target:e}=t;if(!e||!(e instanceof HTMLInputElement)||e.type!=="checkbox")return!1;let r=e.closest("ul.plugin-tasks-query-result, div.callout-content");if(r){if(r.matches("div.callout-content")){let p=`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(p),new ux.Notice(p,45e3)}return!1}let{state:i}=this.view,s=this.view.posAtDOM(e),a=i.doc.lineAt(s),o=pe.fromLine({line:a.text,taskLocation:Lt.fromUnknownPosition(new mt("")),fallbackDate:null});if(o===null)return!1;t.preventDefault();let l=o.toggleWithRecurrenceInUsersOrder(),u=l.map(p=>p.toFileLineString()).join(i.lineBreak),c=a.to;if(u===""){let p=a.number<i.doc.lines?i.doc.line(a.number+1):null;p&&(c=p.from)}let d=i.update({changes:{from:a.from,to:c,insert:u}});if(this.view.dispatch(d),l.length===1){let p=l[0].status.symbol!==" ";setTimeout(()=>{e.checked=p},1)}return!0}};var ia=require("obsidian"),fx=require("obsidian");function dx(n,t,e,r=void 0){let i="";t.isEmpty()||(i+=`Only tasks containing the global filter '${t.get()}'. @@ -384,7 +384,7 @@ If you wanted Tasks to do these things, please undo your change, then either cli ${s.explainQuery(d)}`}let o=new Ln(n,r),l=new Oi().query(r);if(!(o.ignoreGlobalQuery||l.ignoreGlobalQuery)&&e.hasInstructions()){let c=e.query(r);i+=a("Explanation of the global query",c)+` `}return l.source!==""&&(i+=a("Explanation of the Query File Defaults (from properties/frontmatter in the query's file)",l)+` -`),i+=a("Explanation of this Tasks code block query",o),i}function vf(n,t,e){let i=new Oi().query(e).append(new Ln(n,e));return i.ignoreGlobalQuery?i:t.query(e).append(i)}Gi();Mn();function Cu(n,t,e){t&&n.push(NY(e))}function NY(n){return`tasks-layout-hide-${n}`}var wf=class{constructor(t){t?this.queryLayoutOptions=t:this.queryLayoutOptions=new Ki}getHiddenClasses(){let t=[],e=[[this.queryLayoutOptions.hideUrgency,"urgency"],[this.queryLayoutOptions.hideBacklinks,"backlinks"],[this.queryLayoutOptions.hideEditButton,"edit-button"],[this.queryLayoutOptions.hidePostponeButton,"postpone-button"]];for(let[r,i]of e)Cu(t,r,i);return this.queryLayoutOptions.shortMode&&t.push("tasks-layout-short-mode"),t}};Is();var kf=class{constructor(t){t?this.taskLayoutOptions=t:this.taskLayoutOptions=new Br}generateHiddenClasses(){let t=[];return this.taskLayoutOptions.toggleableComponents.forEach(e=>{Cu(t,!this.taskLayoutOptions.isShown(e),e)}),Cu(t,!this.taskLayoutOptions.areTagsShown(),"tags"),t}};rn();var Mu=class{constructor(t){this.label=t,this.start()}start(){!this.recordTimings()||performance.mark(this.labelForStart())}finish(){!this.recordTimings()||(performance.mark(this.labelForEnd()),performance.measure(this.label,this.labelForStart(),this.labelForEnd()),this.printDuration())}printDuration(){let t=performance.getEntriesByName(this.label),e=t[t.length-1];e?console.log(this.label+":",e.duration.toFixed(2),"milliseconds"):console.log(`Measurement for ${this.label} not found`)}labelForStart(){return`${this.label} - start`}labelForEnd(){return`${this.label} - end`}recordTimings(){let{debugSettings:t}=le();return t.recordTimings}};Nt();var yb=require("obsidian");var as=class extends rs{constructor(t,e,r=ni){super(r);let i=(u,c,d,f,p,b)=>{var E;let T=!1,_=Do(e);if(_){let{postponedDate:A}=b(e,_,d,f);(E=e[_])!=null&&E.isSame(A,"day")&&(T=!0)}let O=p(e,f,d);c.setChecked(T).setTitle(O).onClick(()=>as.postponeOnClickCallback(u,e,f,d,b,r))},s=ZE,a=BE;this.addItem(u=>i(t,u,"days",0,s,a)),this.addItem(u=>i(t,u,"day",1,s,a)),this.addSeparator();let o=pb,l=fb;this.addItem(u=>i(t,u,"days",2,o,l)),this.addItem(u=>i(t,u,"days",3,o,l)),this.addItem(u=>i(t,u,"days",4,o,l)),this.addItem(u=>i(t,u,"days",5,o,l)),this.addItem(u=>i(t,u,"days",6,o,l)),this.addSeparator(),this.addItem(u=>i(t,u,"week",1,o,l)),this.addItem(u=>i(t,u,"weeks",2,o,l)),this.addItem(u=>i(t,u,"weeks",3,o,l)),this.addItem(u=>i(t,u,"month",1,o,l)),this.addSeparator(),this.addItem(u=>i(t,u,"days",2,JE,VE))}static postponeOnClickCallback(o,l,u,c){return F(this,arguments,function*(t,e,r,i,s=fb,a=ni){var b;let d=Do(e);if(d===null){let T="\u26A0\uFE0F Postponement requires a date: due, scheduled or start.";return new yb.Notice(T,1e4)}let{postponedDate:f,postponedTask:p}=s(e,d,i,r);(b=e[d])!=null&&b.isSame(f,"day")||(yield a(e,p),as.postponeSuccessCallback(t,d,f))})}static postponeSuccessCallback(t,e,r){t.style.pointerEvents="none";let i=QE(r,e);new yb.Notice(i,2e3)}};var Sf=class{constructor(t,e,r,i,s,a=Mi.obsidianMarkdownRenderer){switch(this.source=e,this._tasksFile=r,this.renderMarkdown=i,this.obsidianComponent=s,this.textRenderer=a,t){case"block-language-tasks":this.query=this.makeQueryFromSourceAndTasksFile(),this.queryType="tasks";break;default:this.query=this.makeQueryFromSourceAndTasksFile(),this.queryType="tasks";break}}makeQueryFromSourceAndTasksFile(){return vf(this.source,fr.getInstance(),this.tasksFile)}get tasksFile(){return this._tasksFile}setTasksFile(t){this._tasksFile=t,this.query=this.makeQueryFromSourceAndTasksFile()}get filePath(){var t,e;return(e=(t=this.tasksFile)==null?void 0:t.path)!=null?e:void 0}render(t,e,r,i){return F(this,null,function*(){t==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(e,t,r,i):this.query.error!==void 0?this.renderErrorMessage(r,this.query.error):this.renderLoadingMessage(r)})}renderQuerySearchResults(t,e,r,i){return F(this,null,function*(){let s=this.explainAndPerformSearch(e,t,r);if(s.searchErrorMessage!==void 0){this.renderErrorMessage(r,s.searchErrorMessage);return}yield this.renderSearchResults(s,r,i)})}explainAndPerformSearch(t,e,r){let i=new Mu(`Search: ${this.query.queryId} - ${this.filePath}`);i.start(),this.query.debug(`[render] Render called: plugin state: ${t}; searching ${e.length} tasks`),this.query.queryLayoutOptions.explainQuery&&this.createExplanation(r);let s=this.query.applyQueryToTasks(e);return i.finish(),s}renderSearchResults(t,e,r){return F(this,null,function*(){let i=new Mu(`Render: ${this.query.queryId} - ${this.filePath}`);i.start(),yield this.addAllTaskGroups(t.taskGroups,e,r);let s=t.totalTasksCount;this.addTaskCount(e,t),this.query.debug(`[render] ${s} tasks displayed`),i.finish()})}renderErrorMessage(t,e){t.createDiv().innerHTML=`<pre>Tasks query: ${e.replace(/\n/g,"<br>")}</pre>`}renderLoadingMessage(t){t.setText("Loading Tasks ...")}createExplanation(t){let e=dx(this.source,Fe.getInstance(),fr.getInstance(),this.tasksFile),r=lt("pre",t);r.classList.add("plugin-tasks-query-explanation"),r.setText(e),t.appendChild(r)}addAllTaskGroups(t,e,r){return F(this,null,function*(){for(let i of t.groups){yield this.addGroupHeadings(e,i.groupHeadings);let s=new Set;yield this.createTaskList(i.tasks,e,r,s)}})}createTaskList(t,e,r,i){return F(this,null,function*(){let s=lt("ul",e);s.classList.add("contains-task-list","plugin-tasks-query-result"),s.classList.add(...new kf(this.query.taskLayoutOptions).generateHiddenClasses()),s.classList.add(...new wf(this.query.queryLayoutOptions).getHiddenClasses());let a=this.getGroupingAttribute();a&&a.length>0&&(s.dataset.taskGroupBy=a);let o=new Mi({textRenderer:this.textRenderer,obsidianComponent:this.obsidianComponent,parentUlElement:s,taskLayoutOptions:this.query.taskLayoutOptions,queryLayoutOptions:this.query.queryLayoutOptions});for(let[l,u]of t.entries())this.query.queryLayoutOptions.hideTree?u instanceof pe&&(yield this.addTask(s,o,u,l,r)):yield this.addTaskOrListItemAndChildren(s,o,u,l,r,t,i);e.appendChild(s)})}willBeRenderedLater(t,e,r){let i=t.findClosestParentTask();return i?!!(!e.has(i)&&r.includes(i)):!1}alreadyRendered(t,e){return e.has(t)}addTaskOrListItemAndChildren(t,e,r,i,s,a,o){return F(this,null,function*(){if(this.alreadyRendered(r,o)||this.willBeRenderedLater(r,o,a))return;let l=yield this.addTaskOrListItem(t,e,r,i,s);o.add(r),r.children.length>0&&(yield this.createTaskList(r.children,l,s,o),r.children.forEach(u=>{o.add(u)}))})}addTaskOrListItem(t,e,r,i,s){return F(this,null,function*(){return r instanceof pe?yield this.addTask(t,e,r,i,s):yield this.addListItem(t,e,r,i)})}addListItem(t,e,r,i){return F(this,null,function*(){return yield e.renderListItem(t,r,i)})}addTask(t,e,r,i,s){return F(this,null,function*(){let a=this.isFilenameUnique({task:r},s.allMarkdownFiles),o=yield e.renderTaskLine({task:r,taskIndex:i,isTaskInQueryFile:this.filePath===r.path,isFilenameUnique:a});o.querySelectorAll("[data-footnote-id]").forEach(d=>d.remove());let u=lt("span",o);u.classList.add("task-extras"),this.query.queryLayoutOptions.hideUrgency||this.addUrgency(u,r);let c=this.query.queryLayoutOptions.shortMode;return this.query.queryLayoutOptions.hideBacklinks||this.addBacklinks(u,r,c,a,s),this.query.queryLayoutOptions.hideEditButton||this.addEditButton(u,r,s),!this.query.queryLayoutOptions.hidePostponeButton&&GE(r)&&this.addPostponeButton(u,r,c),t.appendChild(o),o})}addEditButton(t,e,r){let i=lt("a",t);i.classList.add("tasks-edit"),i.title="Edit task",i.href="#",i.addEventListener("click",s=>r.editTaskPencilClickHandler(s,e,r.allTasks))}addUrgency(t,e){let r=new Intl.NumberFormat().format(e.urgency),i=lt("span",t);i.textContent=r,i.classList.add("tasks-urgency")}addGroupHeadings(t,e){return F(this,null,function*(){for(let r of e)yield this.addGroupHeading(t,r)})}addGroupHeading(t,e){return F(this,null,function*(){let r="h6";e.nestingLevel===0?r="h4":e.nestingLevel===1&&(r="h5");let i=lt(r,t);i.classList.add("tasks-group-heading"),this.obsidianComponent!==null&&(yield this.renderMarkdown(e.displayName,i,this.tasksFile.path,this.obsidianComponent))})}addBacklinks(t,e,r,i,s){var u;let a=lt("span",t);a.classList.add("tasks-backlink"),r||a.append(" (");let o=lt("a",a);o.rel="noopener",o.target="_blank",o.classList.add("internal-link"),r&&o.classList.add("internal-link-short-mode");let l;r?l=" \u{1F517}":l=(u=e.getLinkText({isFilenameUnique:i}))!=null?u:"",o.text=l,o.addEventListener("click",c=>F(this,null,function*(){yield s.backlinksClickHandler(c,e)})),o.addEventListener("mousedown",c=>F(this,null,function*(){yield s.backlinksMousedownHandler(c,e)})),r||a.append(")")}addPostponeButton(t,e,r){let s="day",a=XE(e,1,s),o=lt("a",t);o.classList.add("tasks-postpone"),r&&o.classList.add("tasks-postpone-short-mode"),o.title=a,o.addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),as.postponeOnClickCallback(o,e,1,s)}),o.addEventListener("contextmenu",l=>F(this,null,function*(){l.preventDefault(),l.stopPropagation(),new as(o,e).showAtPosition({x:l.clientX,y:l.clientY})}))}addTaskCount(t,e){if(!this.query.queryLayoutOptions.hideTaskCount){let r=lt("div",t);r.classList.add("task-count"),r.textContent=e.totalTasksCountDisplayText()}}isFilenameUnique({task:t},e){let r=t.path.match(/([^/]*)\..+$/i);if(r===null)return;let i=r[1];return e.filter(a=>{if(a.basename===i)return!0}).length<2}getGroupingAttribute(){let t=[];for(let e of this.query.grouping)t.push(e.property);return t.join(",")}};var Df=class{constructor({plugin:t,events:e}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=t.app,this.plugin=t,this.events=e,t.registerMarkdownCodeBlockProcessor("tasks",(r,i,s)=>{t.app.workspace.onLayoutReady(()=>{this.addQueryRenderChild(r,i,s)})})}_addQueryRenderChild(t,e,r){return F(this,null,function*(){let i=this.app,s=r.sourcePath,a=i.vault.getAbstractFileByPath(s),o=null;a&&a instanceof ia.TFile&&(o=i.metadataCache.getFileCache(a));let l=new mt(s,o!=null?o:{}),u=new bb({app:i,plugin:this.plugin,events:this.events,container:e,source:t,tasksFile:l});r.addChild(u),u.load()})}},bb=class extends ia.MarkdownRenderChild{constructor({app:e,plugin:r,events:i,container:s,source:a,tasksFile:o}){super(s);this.queryResultsRenderer=new Sf(this.containerEl.className,a,o,ia.MarkdownRenderer.renderMarkdown,this),this.queryResultsRenderer.query.debug("[render] QueryRenderChild.constructor() entered"),this.app=e,this.plugin=r,this.events=i}onload(){this.queryResultsRenderer.query.debug("[render] QueryRenderChild.onload() entered"),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight(),this.registerEvent(this.app.metadataCache.on("changed",(e,r,i)=>{let s=e.path;s===this.queryResultsRenderer.filePath&&this.handleMetadataOrFilePathChange(s,i)})),this.registerEvent(this.app.vault.on("rename",(e,r)=>{let i=null;e&&e instanceof ia.TFile&&(i=this.app.metadataCache.getFileCache(e)),this.handleMetadataOrFilePathChange(e.path,i)}))}handleMetadataOrFilePathChange(e,r){let i=this.queryResultsRenderer.tasksFile,s=new mt(e,r!=null?r:{}),a=i.path!==s.path,o=!i.rawFrontmatterIdenticalTo(s);(a||o)&&(this.queryResultsRenderer.setTasksFile(s),this.events.triggerRequestCacheUpdate(this.render.bind(this)))}onunload(){this.queryResultsRenderer.query.debug("[render] QueryRenderChild.onunload() entered"),this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let e=new Date;e.setHours(24,0,0,0);let r=new Date,i=e.getTime()-r.getTime();this.queryReloadTimeout=setTimeout(()=>{this.queryResultsRenderer.query=vf(this.queryResultsRenderer.source,fr.getInstance(),this.queryResultsRenderer.tasksFile),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return F(this,arguments,function*({tasks:e,state:r}){var a;let s=lt("div",this.containerEl);yield this.queryResultsRenderer.render(r,e,s,{allTasks:this.plugin.getTasks(),allMarkdownFiles:this.app.vault.getMarkdownFiles(),backlinksClickHandler:FY(this.app),backlinksMousedownHandler:LY(this.app),editTaskPencilClickHandler:IY(this.app)}),(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}};function IY(n){return function(e,r,i){e.preventDefault();let s=o=>F(this,null,function*(){yield Nn({originalTask:r,newTasks:Ft.removeInferredStatusIfNeeded(r,o)})});new zi({app:n,task:r,onSubmit:s,allTasks:i}).open()}}function FY(n){return function(e,r){return F(this,null,function*(){let i=yield Ay(r,n.vault);if(i){let[s,a]=i,o=n.workspace.getLeaf(fx.Keymap.isModEvent(e));e.preventDefault(),yield o.openFile(a,{eState:{line:s}})}})}}function LY(n){return function(e,r){return F(this,null,function*(){if(e.button===1){let i=yield Ay(r,n.vault);if(i){let[s,a]=i,o=n.workspace.getLeaf("tab");e.preventDefault(),yield o.openFile(a,{eState:{line:s}})}}})}}rn();var xe=require("obsidian");Cn();wi();Dr();gs();Ga();var Ef=class{constructor(t){this._markdown="";this.columnNames=t,this.addTitleRow()}get markdown(){return this._markdown}addTitleRow(){let t="|",e="|";this.columnNames.forEach(r=>{t+=` ${r} |`,e+=" ----- |"}),this._markdown+=`${t} +`),i+=a("Explanation of this Tasks code block query",o),i}function vf(n,t,e){let i=new Oi().query(e).append(new Ln(n,e));return i.ignoreGlobalQuery?i:t.query(e).append(i)}Gi();Mn();function Cu(n,t,e){t&&n.push(NY(e))}function NY(n){return`tasks-layout-hide-${n}`}var wf=class{constructor(t){t?this.queryLayoutOptions=t:this.queryLayoutOptions=new Ki}getHiddenClasses(){let t=[],e=[[this.queryLayoutOptions.hideUrgency,"urgency"],[this.queryLayoutOptions.hideBacklinks,"backlinks"],[this.queryLayoutOptions.hideEditButton,"edit-button"],[this.queryLayoutOptions.hidePostponeButton,"postpone-button"]];for(let[r,i]of e)Cu(t,r,i);return this.queryLayoutOptions.shortMode&&t.push("tasks-layout-short-mode"),t}};Is();var kf=class{constructor(t){t?this.taskLayoutOptions=t:this.taskLayoutOptions=new Br}generateHiddenClasses(){let t=[];return this.taskLayoutOptions.toggleableComponents.forEach(e=>{Cu(t,!this.taskLayoutOptions.isShown(e),e)}),Cu(t,!this.taskLayoutOptions.areTagsShown(),"tags"),t}};Bt();var Mu=class{constructor(t){this.label=t,this.start()}start(){!this.recordTimings()||performance.mark(this.labelForStart())}finish(){!this.recordTimings()||(performance.mark(this.labelForEnd()),performance.measure(this.label,this.labelForStart(),this.labelForEnd()),this.printDuration())}printDuration(){let t=performance.getEntriesByName(this.label),e=t[t.length-1];e?console.log(this.label+":",e.duration.toFixed(2),"milliseconds"):console.log(`Measurement for ${this.label} not found`)}labelForStart(){return`${this.label} - start`}labelForEnd(){return`${this.label} - end`}recordTimings(){let{debugSettings:t}=oe();return t.recordTimings}};Nt();var yb=require("obsidian");var as=class extends rs{constructor(t,e,r=ni){super(r);let i=(u,c,d,f,p,b)=>{var E;let T=!1,_=Do(e);if(_){let{postponedDate:A}=b(e,_,d,f);(E=e[_])!=null&&E.isSame(A,"day")&&(T=!0)}let O=p(e,f,d);c.setChecked(T).setTitle(O).onClick(()=>as.postponeOnClickCallback(u,e,f,d,b,r))},s=ZE,a=BE;this.addItem(u=>i(t,u,"days",0,s,a)),this.addItem(u=>i(t,u,"day",1,s,a)),this.addSeparator();let o=pb,l=fb;this.addItem(u=>i(t,u,"days",2,o,l)),this.addItem(u=>i(t,u,"days",3,o,l)),this.addItem(u=>i(t,u,"days",4,o,l)),this.addItem(u=>i(t,u,"days",5,o,l)),this.addItem(u=>i(t,u,"days",6,o,l)),this.addSeparator(),this.addItem(u=>i(t,u,"week",1,o,l)),this.addItem(u=>i(t,u,"weeks",2,o,l)),this.addItem(u=>i(t,u,"weeks",3,o,l)),this.addItem(u=>i(t,u,"month",1,o,l)),this.addSeparator(),this.addItem(u=>i(t,u,"days",2,JE,VE))}static postponeOnClickCallback(o,l,u,c){return F(this,arguments,function*(t,e,r,i,s=fb,a=ni){var b;let d=Do(e);if(d===null){let T="\u26A0\uFE0F Postponement requires a date: due, scheduled or start.";return new yb.Notice(T,1e4)}let{postponedDate:f,postponedTask:p}=s(e,d,i,r);(b=e[d])!=null&&b.isSame(f,"day")||(yield a(e,p),as.postponeSuccessCallback(t,d,f))})}static postponeSuccessCallback(t,e,r){t.style.pointerEvents="none";let i=QE(r,e);new yb.Notice(i,2e3)}};var Sf=class{constructor(t,e,r,i,s,a=Mi.obsidianMarkdownRenderer){switch(this.source=e,this._tasksFile=r,this.renderMarkdown=i,this.obsidianComponent=s,this.textRenderer=a,t){case"block-language-tasks":this.query=this.makeQueryFromSourceAndTasksFile(),this.queryType="tasks";break;default:this.query=this.makeQueryFromSourceAndTasksFile(),this.queryType="tasks";break}}makeQueryFromSourceAndTasksFile(){return vf(this.source,fr.getInstance(),this.tasksFile)}get tasksFile(){return this._tasksFile}setTasksFile(t){this._tasksFile=t,this.query=this.makeQueryFromSourceAndTasksFile()}get filePath(){var t,e;return(e=(t=this.tasksFile)==null?void 0:t.path)!=null?e:void 0}render(t,e,r,i){return F(this,null,function*(){t==="Warm"&&this.query.error===void 0?yield this.renderQuerySearchResults(e,t,r,i):this.query.error!==void 0?this.renderErrorMessage(r,this.query.error):this.renderLoadingMessage(r)})}renderQuerySearchResults(t,e,r,i){return F(this,null,function*(){let s=this.explainAndPerformSearch(e,t,r);if(s.searchErrorMessage!==void 0){this.renderErrorMessage(r,s.searchErrorMessage);return}yield this.renderSearchResults(s,r,i)})}explainAndPerformSearch(t,e,r){let i=new Mu(`Search: ${this.query.queryId} - ${this.filePath}`);i.start(),this.query.debug(`[render] Render called: plugin state: ${t}; searching ${e.length} tasks`),this.query.queryLayoutOptions.explainQuery&&this.createExplanation(r);let s=this.query.applyQueryToTasks(e);return i.finish(),s}renderSearchResults(t,e,r){return F(this,null,function*(){let i=new Mu(`Render: ${this.query.queryId} - ${this.filePath}`);i.start(),yield this.addAllTaskGroups(t.taskGroups,e,r);let s=t.totalTasksCount;this.addTaskCount(e,t),this.query.debug(`[render] ${s} tasks displayed`),i.finish()})}renderErrorMessage(t,e){t.createDiv().innerHTML=`<pre>Tasks query: ${e.replace(/\n/g,"<br>")}</pre>`}renderLoadingMessage(t){t.setText("Loading Tasks ...")}createExplanation(t){let e=dx(this.source,Fe.getInstance(),fr.getInstance(),this.tasksFile),r=lt("pre",t);r.classList.add("plugin-tasks-query-explanation"),r.setText(e),t.appendChild(r)}addAllTaskGroups(t,e,r){return F(this,null,function*(){for(let i of t.groups){yield this.addGroupHeadings(e,i.groupHeadings);let s=new Set;yield this.createTaskList(i.tasks,e,r,s)}})}createTaskList(t,e,r,i){return F(this,null,function*(){let s=lt("ul",e);s.classList.add("contains-task-list","plugin-tasks-query-result"),s.classList.add(...new kf(this.query.taskLayoutOptions).generateHiddenClasses()),s.classList.add(...new wf(this.query.queryLayoutOptions).getHiddenClasses());let a=this.getGroupingAttribute();a&&a.length>0&&(s.dataset.taskGroupBy=a);let o=new Mi({textRenderer:this.textRenderer,obsidianComponent:this.obsidianComponent,parentUlElement:s,taskLayoutOptions:this.query.taskLayoutOptions,queryLayoutOptions:this.query.queryLayoutOptions});for(let[l,u]of t.entries())this.query.queryLayoutOptions.hideTree?u instanceof pe&&(yield this.addTask(s,o,u,l,r)):yield this.addTaskOrListItemAndChildren(s,o,u,l,r,t,i);e.appendChild(s)})}willBeRenderedLater(t,e,r){let i=t.findClosestParentTask();return i?!!(!e.has(i)&&r.includes(i)):!1}alreadyRendered(t,e){return e.has(t)}addTaskOrListItemAndChildren(t,e,r,i,s,a,o){return F(this,null,function*(){if(this.alreadyRendered(r,o)||this.willBeRenderedLater(r,o,a))return;let l=yield this.addTaskOrListItem(t,e,r,i,s);o.add(r),r.children.length>0&&(yield this.createTaskList(r.children,l,s,o),r.children.forEach(u=>{o.add(u)}))})}addTaskOrListItem(t,e,r,i,s){return F(this,null,function*(){return r instanceof pe?yield this.addTask(t,e,r,i,s):yield this.addListItem(t,e,r,i)})}addListItem(t,e,r,i){return F(this,null,function*(){return yield e.renderListItem(t,r,i)})}addTask(t,e,r,i,s){return F(this,null,function*(){let a=this.isFilenameUnique({task:r},s.allMarkdownFiles),o=yield e.renderTaskLine({task:r,taskIndex:i,isTaskInQueryFile:this.filePath===r.path,isFilenameUnique:a});o.querySelectorAll("[data-footnote-id]").forEach(d=>d.remove());let u=lt("span",o);u.classList.add("task-extras"),this.query.queryLayoutOptions.hideUrgency||this.addUrgency(u,r);let c=this.query.queryLayoutOptions.shortMode;return this.query.queryLayoutOptions.hideBacklinks||this.addBacklinks(u,r,c,a,s),this.query.queryLayoutOptions.hideEditButton||this.addEditButton(u,r,s),!this.query.queryLayoutOptions.hidePostponeButton&&GE(r)&&this.addPostponeButton(u,r,c),t.appendChild(o),o})}addEditButton(t,e,r){let i=lt("a",t);i.classList.add("tasks-edit"),i.title="Edit task",i.href="#",i.addEventListener("click",s=>r.editTaskPencilClickHandler(s,e,r.allTasks))}addUrgency(t,e){let r=new Intl.NumberFormat().format(e.urgency),i=lt("span",t);i.textContent=r,i.classList.add("tasks-urgency")}addGroupHeadings(t,e){return F(this,null,function*(){for(let r of e)yield this.addGroupHeading(t,r)})}addGroupHeading(t,e){return F(this,null,function*(){let r="h6";e.nestingLevel===0?r="h4":e.nestingLevel===1&&(r="h5");let i=lt(r,t);i.classList.add("tasks-group-heading"),this.obsidianComponent!==null&&(yield this.renderMarkdown(e.displayName,i,this.tasksFile.path,this.obsidianComponent))})}addBacklinks(t,e,r,i,s){var u;let a=lt("span",t);a.classList.add("tasks-backlink"),r||a.append(" (");let o=lt("a",a);o.rel="noopener",o.target="_blank",o.classList.add("internal-link"),r&&o.classList.add("internal-link-short-mode");let l;r?l=" \u{1F517}":l=(u=e.getLinkText({isFilenameUnique:i}))!=null?u:"",o.text=l,o.addEventListener("click",c=>F(this,null,function*(){yield s.backlinksClickHandler(c,e)})),o.addEventListener("mousedown",c=>F(this,null,function*(){yield s.backlinksMousedownHandler(c,e)})),r||a.append(")")}addPostponeButton(t,e,r){let s="day",a=XE(e,1,s),o=lt("a",t);o.classList.add("tasks-postpone"),r&&o.classList.add("tasks-postpone-short-mode"),o.title=a,o.addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),as.postponeOnClickCallback(o,e,1,s)}),o.addEventListener("contextmenu",l=>F(this,null,function*(){l.preventDefault(),l.stopPropagation(),new as(o,e).showAtPosition({x:l.clientX,y:l.clientY})}))}addTaskCount(t,e){if(!this.query.queryLayoutOptions.hideTaskCount){let r=lt("div",t);r.classList.add("task-count"),r.textContent=e.totalTasksCountDisplayText()}}isFilenameUnique({task:t},e){let r=t.path.match(/([^/]*)\..+$/i);if(r===null)return;let i=r[1];return e.filter(a=>{if(a.basename===i)return!0}).length<2}getGroupingAttribute(){let t=[];for(let e of this.query.grouping)t.push(e.property);return t.join(",")}};var Df=class{constructor({plugin:t,events:e}){this.addQueryRenderChild=this._addQueryRenderChild.bind(this);this.app=t.app,this.plugin=t,this.events=e,t.registerMarkdownCodeBlockProcessor("tasks",(r,i,s)=>{t.app.workspace.onLayoutReady(()=>{this.addQueryRenderChild(r,i,s)})})}_addQueryRenderChild(t,e,r){return F(this,null,function*(){let i=this.app,s=r.sourcePath,a=i.vault.getAbstractFileByPath(s),o=null;a&&a instanceof ia.TFile&&(o=i.metadataCache.getFileCache(a));let l=new mt(s,o!=null?o:{}),u=new bb({app:i,plugin:this.plugin,events:this.events,container:e,source:t,tasksFile:l});r.addChild(u),u.load()})}},bb=class extends ia.MarkdownRenderChild{constructor({app:e,plugin:r,events:i,container:s,source:a,tasksFile:o}){super(s);this.queryResultsRenderer=new Sf(this.containerEl.className,a,o,ia.MarkdownRenderer.renderMarkdown,this),this.queryResultsRenderer.query.debug("[render] QueryRenderChild.constructor() entered"),this.app=e,this.plugin=r,this.events=i}onload(){this.queryResultsRenderer.query.debug("[render] QueryRenderChild.onload() entered"),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.renderEventRef=this.events.onCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight(),this.registerEvent(this.app.metadataCache.on("changed",(e,r,i)=>{let s=e.path;s===this.queryResultsRenderer.filePath&&this.handleMetadataOrFilePathChange(s,i)})),this.registerEvent(this.app.vault.on("rename",(e,r)=>{if(r!==this.queryResultsRenderer.filePath)return;let i=null;e&&e instanceof ia.TFile&&(i=this.app.metadataCache.getFileCache(e)),this.handleMetadataOrFilePathChange(e.path,i)}))}handleMetadataOrFilePathChange(e,r){let i=this.queryResultsRenderer.tasksFile,s=new mt(e,r!=null?r:{}),a=i.path!==s.path,o=!i.rawFrontmatterIdenticalTo(s);(a||o)&&(this.queryResultsRenderer.setTasksFile(s),this.events.triggerRequestCacheUpdate(this.render.bind(this)))}onunload(){this.queryResultsRenderer.query.debug("[render] QueryRenderChild.onunload() entered"),this.renderEventRef!==void 0&&this.events.off(this.renderEventRef),this.queryReloadTimeout!==void 0&&clearTimeout(this.queryReloadTimeout)}reloadQueryAtMidnight(){let e=new Date;e.setHours(24,0,0,0);let r=new Date,i=e.getTime()-r.getTime();this.queryReloadTimeout=setTimeout(()=>{this.queryResultsRenderer.query=vf(this.queryResultsRenderer.source,fr.getInstance(),this.queryResultsRenderer.tasksFile),this.events.triggerRequestCacheUpdate(this.render.bind(this)),this.reloadQueryAtMidnight()},i+1e3)}render(i){return F(this,arguments,function*({tasks:e,state:r}){var a;let s=lt("div",this.containerEl);yield this.queryResultsRenderer.render(r,e,s,{allTasks:this.plugin.getTasks(),allMarkdownFiles:this.app.vault.getMarkdownFiles(),backlinksClickHandler:FY(this.app),backlinksMousedownHandler:LY(this.app),editTaskPencilClickHandler:IY(this.app)}),(a=this.containerEl.firstChild)==null||a.replaceWith(s)})}};function IY(n){return function(e,r,i){e.preventDefault();let s=o=>F(this,null,function*(){yield Nn({originalTask:r,newTasks:Ft.removeInferredStatusIfNeeded(r,o)})});new zi({app:n,task:r,onSubmit:s,allTasks:i}).open()}}function FY(n){return function(e,r){return F(this,null,function*(){let i=yield Ay(r,n.vault);if(i){let[s,a]=i,o=n.workspace.getLeaf(fx.Keymap.isModEvent(e));e.preventDefault(),yield o.openFile(a,{eState:{line:s}})}})}}function LY(n){return function(e,r){return F(this,null,function*(){if(e.button===1){let i=yield Ay(r,n.vault);if(i){let[s,a]=i,o=n.workspace.getLeaf("tab");e.preventDefault(),yield o.openFile(a,{eState:{line:s}})}}})}}Bt();var xe=require("obsidian");Cn();wi();Dr();gs();Ga();var Ef=class{constructor(t){this._markdown="";this.columnNames=t,this.addTitleRow()}get markdown(){return this._markdown}addTitleRow(){let t="|",e="|";this.columnNames.forEach(r=>{t+=` ${r} |`,e+=" ----- |"}),this._markdown+=`${t} `,this._markdown+=`${e} `}addRow(t){let e=this.makeRowText(t);this._markdown+=`${e} `}addRowIfNew(t){let e=this.makeRowText(t);this._markdown.includes(e)||(this._markdown+=`${e} @@ -417,10 +417,10 @@ ${s} <!-- ${N.t("reports.statusRegistry.loadedSettings.switchToLivePreview")} --> ${N.t("reports.statusRegistry.loadedSettings.settingsActuallyUsed")} -${a}`}gs();function gx(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function yx(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function bx(){return[[" ","To Do","x","TODO"],["/","In Progress","x","IN_PROGRESS"],["x","Done"," ","DONE"],["-","Cancelled"," ","CANCELLED"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["i","Infomation","x","TODO"],["S","Amount","x","TODO"],["*","Star","x","TODO"],["b","Bookmark","x","TODO"],["\u201C","Quote","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["I","Idea","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function Tx(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function _x(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function vx(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],["f","Fire","x","TODO"],["k","Key","x","TODO"],["w","Win","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function wx(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function kx(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}rn();rn();Mn();Ga();var Ir=require("obsidian");Cn();Cn();Dr();wi();var sa=class{validate(t){let e=[];return e.push(...this.validateSymbol(t)),e.push(...this.validateName(t)),e.push(...this.validateNextSymbol(t)),e}validateStatusCollectionEntry(t){let[e,r,i,s]=t,a=[];if(a.push(...this.validateType(s)),e===i&&s!=="NON_TASK"&&a.push(`Status symbol '${e}' toggles to itself`),a.length>0)return a;let o=ge.createFromImportedValue(t).configuration;return a.push(...this.validateSymbolTypeConventions(o)),a.push(...this.validate(o)),a}validateSymbol(t){return sa.validateOneSymbol(t.symbol,"Task Status Symbol")}validateNextSymbol(t){return sa.validateOneSymbol(t.nextStatusSymbol,"Task Next Status Symbol")}validateName(t){let e=[];return t.name.length===0&&e.push("Task Status Name cannot be empty."),e}validateType(t){let e=Gt[t],r=[];return e||r.push(`Status Type "${t}" is not a valid type`),e=="EMPTY"&&r.push('Status Type "EMPTY" is not permitted in user data'),r}validateSymbolTypeConventions(t){let e=[],r=t.symbol,i=new Be,s=r==="X"?"x":r,a=i.bySymbol(s);return a.type!=="EMPTY"&&(t.nextStatusSymbol!==a.nextStatusSymbol&&e.push(`Next Status Symbol for symbol '${r}': '${t.nextStatusSymbol}' is inconsistent with convention '${a.nextStatusSymbol}'`),t.type!==a.type&&e.push(`Status Type for symbol '${r}': '${t.type}' is inconsistent with convention '${a.type}'`)),e}static validateOneSymbol(t,e){let r=[];return t.length===0&&r.push(`${e} cannot be empty.`),t.length>1&&r.push(`${e} ("${t}") must be a single character.`),r}};Dr();gs();var aa=new sa,Un=class extends Ir.Modal{constructor(e,r,i){super(e.app);this.plugin=e;this.saved=!1;this.error=!1;this.statusSymbol=r.symbol,this.statusName=r.name,this.statusNextSymbol=r.nextStatusSymbol,this.statusAvailableAsCommand=r.availableAsCommand,this.type=r.type,this.isCoreStatus=i}statusConfiguration(){return new gt(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return F(this,null,function*(){let{contentEl:e}=this;e.empty();let r=e.createDiv(),i;new Ir.Setting(r).setName(N.t("modals.customStatusModal.editStatusSymbol.name")).setDesc(N.t("modals.customStatusModal.editStatusSymbol.description")).addText(u=>{i=u,u.setValue(this.statusSymbol).onChange(c=>{this.statusSymbol=c,Un.setValid(u,aa.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(u=>{Un.setValid(i,aa.validateSymbol(this.statusConfiguration()))});let s;new Ir.Setting(r).setName(N.t("modals.customStatusModal.editStatusName.name")).setDesc(N.t("modals.customStatusModal.editStatusName.description")).addText(u=>{s=u,u.setValue(this.statusName).onChange(c=>{this.statusName=c,Un.setValid(u,aa.validateName(this.statusConfiguration()))})}).then(u=>{Un.setValid(s,aa.validateName(this.statusConfiguration()))});let a;new Ir.Setting(r).setName(N.t("modals.customStatusModal.editNextStatusSymbol.name")).setDesc(N.t("modals.customStatusModal.editNextStatusSymbol.description")).addText(u=>{a=u,u.setValue(this.statusNextSymbol).onChange(c=>{this.statusNextSymbol=c,Un.setValid(u,aa.validateNextSymbol(this.statusConfiguration()))})}).then(u=>{Un.setValid(a,aa.validateNextSymbol(this.statusConfiguration()))}),new Ir.Setting(r).setName(N.t("modals.customStatusModal.editStatusType.name")).setDesc(N.t("modals.customStatusModal.editStatusType.description")).addDropdown(u=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(d=>{u.addOption(d,d)}),u.setValue(this.type).onChange(d=>{this.type=ge.getTypeFromStatusTypeString(d)})}),ge.tasksPluginCanCreateCommandsForStatuses()&&new Ir.Setting(r).setName(N.t("modals.customStatusModal.editAvailableAsCommand.name")).setDesc(N.t("modals.customStatusModal.editAvailableAsCommand.description")).addToggle(u=>{u.setValue(this.statusAvailableAsCommand).onChange(c=>F(this,null,function*(){this.statusAvailableAsCommand=c}))});let o=e.createDiv(),l=new Ir.Setting(o);l.addButton(u=>(u.setTooltip("Save").setIcon("checkmark").onClick(()=>F(this,null,function*(){let c=aa.validate(this.statusConfiguration());if(c.length>0){let d=c.join(` +${a}`}gs();function gx(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],['"',"Quote","x","TODO"],["0","Speech bubble 0","0","NON_TASK"],["1","Speech bubble 1","1","NON_TASK"],["2","Speech bubble 2","2","NON_TASK"],["3","Speech bubble 3","3","NON_TASK"],["4","Speech bubble 4","4","NON_TASK"],["5","Speech bubble 5","5","NON_TASK"],["6","Speech bubble 6","6","NON_TASK"],["7","Speech bubble 7","7","NON_TASK"],["8","Speech bubble 8","8","NON_TASK"],["9","Speech bubble 9","9","NON_TASK"]]}function yx(){return[[" ","incomplete","x","TODO"],["x","complete / done"," ","DONE"],["-","cancelled"," ","CANCELLED"],[">","deferred","x","TODO"],["/","in progress, or half-done","x","IN_PROGRESS"],["!","Important","x","TODO"],["?","question","x","TODO"],["R","review","x","TODO"],["+","Inbox / task that should be processed later","x","TODO"],["b","bookmark","x","TODO"],["B","brainstorm","x","TODO"],["D","deferred or scheduled","x","TODO"],["I","Info","x","TODO"],["i","idea","x","TODO"],["N","note","x","TODO"],["Q","quote","x","TODO"],["W","win / success / reward","x","TODO"],["P","pro","x","TODO"],["C","con","x","TODO"]]}function bx(){return[[" ","To Do","x","TODO"],["/","In Progress","x","IN_PROGRESS"],["x","Done"," ","DONE"],["-","Cancelled"," ","CANCELLED"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["i","Infomation","x","TODO"],["S","Amount","x","TODO"],["*","Star","x","TODO"],["b","Bookmark","x","TODO"],["\u201C","Quote","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["I","Idea","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function Tx(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],[">","Deferred","x","TODO"],["!","Important","x","TODO"],["?","Question","x","TODO"],["r","Review","x","TODO"]]}function _x(){return[[" ","Unchecked","x","TODO"],["x","Regular"," ","DONE"],["X","Checked"," ","DONE"],["-","Dropped"," ","CANCELLED"],[">","Forward","x","TODO"],["D","Date","x","TODO"],["?","Question","x","TODO"],["/","Half Done","x","IN_PROGRESS"],["+","Add","x","TODO"],["R","Research","x","TODO"],["!","Important","x","TODO"],["i","Idea","x","TODO"],["B","Brainstorm","x","TODO"],["P","Pro","x","TODO"],["C","Con","x","TODO"],["Q","Quote","x","TODO"],["N","Note","x","TODO"],["b","Bookmark","x","TODO"],["I","Information","x","TODO"],["p","Paraphrase","x","TODO"],["L","Location","x","TODO"],["E","Example","x","TODO"],["A","Answer","x","TODO"],["r","Reward","x","TODO"],["c","Choice","x","TODO"],["d","Doing","x","IN_PROGRESS"],["T","Time","x","TODO"],["@","Character / Person","x","TODO"],["t","Talk","x","TODO"],["O","Outline / Plot","x","TODO"],["~","Conflict","x","TODO"],["W","World","x","TODO"],["f","Clue / Find","x","TODO"],["F","Foreshadow","x","TODO"],["H","Favorite / Health","x","TODO"],["&","Symbolism","x","TODO"],["s","Secret","x","TODO"]]}function vx(){return[[" ","Unchecked","x","TODO"],["x","Checked"," ","DONE"],[">","Rescheduled","x","TODO"],["<","Scheduled","x","TODO"],["!","Important","x","TODO"],["-","Cancelled"," ","CANCELLED"],["/","In Progress","x","IN_PROGRESS"],["?","Question","x","TODO"],["*","Star","x","TODO"],["n","Note","x","TODO"],["l","Location","x","TODO"],["i","Information","x","TODO"],["I","Idea","x","TODO"],["S","Amount","x","TODO"],["p","Pro","x","TODO"],["c","Con","x","TODO"],["b","Bookmark","x","TODO"],["f","Fire","x","TODO"],["k","Key","x","TODO"],["w","Win","x","TODO"],["u","Up","x","TODO"],["d","Down","x","TODO"]]}function wx(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}function kx(){return[[" ","to-do","x","TODO"],["/","incomplete","x","IN_PROGRESS"],["x","done"," ","DONE"],["-","canceled"," ","CANCELLED"],[">","forwarded","x","TODO"],["<","scheduling","x","TODO"],["?","question","x","TODO"],["!","important","x","TODO"],["*","star","x","TODO"],['"',"quote","x","TODO"],["l","location","x","TODO"],["b","bookmark","x","TODO"],["i","information","x","TODO"],["S","savings","x","TODO"],["I","idea","x","TODO"],["p","pros","x","TODO"],["c","cons","x","TODO"],["f","fire","x","TODO"],["k","key","x","TODO"],["w","win","x","TODO"],["u","up","x","TODO"],["d","down","x","TODO"]]}Bt();Bt();Mn();Ga();var Ir=require("obsidian");Cn();Cn();Dr();wi();var sa=class{validate(t){let e=[];return e.push(...this.validateSymbol(t)),e.push(...this.validateName(t)),e.push(...this.validateNextSymbol(t)),e}validateStatusCollectionEntry(t){let[e,r,i,s]=t,a=[];if(a.push(...this.validateType(s)),e===i&&s!=="NON_TASK"&&a.push(`Status symbol '${e}' toggles to itself`),a.length>0)return a;let o=ge.createFromImportedValue(t).configuration;return a.push(...this.validateSymbolTypeConventions(o)),a.push(...this.validate(o)),a}validateSymbol(t){return sa.validateOneSymbol(t.symbol,"Task Status Symbol")}validateNextSymbol(t){return sa.validateOneSymbol(t.nextStatusSymbol,"Task Next Status Symbol")}validateName(t){let e=[];return t.name.length===0&&e.push("Task Status Name cannot be empty."),e}validateType(t){let e=Gt[t],r=[];return e||r.push(`Status Type "${t}" is not a valid type`),e=="EMPTY"&&r.push('Status Type "EMPTY" is not permitted in user data'),r}validateSymbolTypeConventions(t){let e=[],r=t.symbol,i=new Be,s=r==="X"?"x":r,a=i.bySymbol(s);return a.type!=="EMPTY"&&(t.nextStatusSymbol!==a.nextStatusSymbol&&e.push(`Next Status Symbol for symbol '${r}': '${t.nextStatusSymbol}' is inconsistent with convention '${a.nextStatusSymbol}'`),t.type!==a.type&&e.push(`Status Type for symbol '${r}': '${t.type}' is inconsistent with convention '${a.type}'`)),e}static validateOneSymbol(t,e){let r=[];return t.length===0&&r.push(`${e} cannot be empty.`),t.length>1&&r.push(`${e} ("${t}") must be a single character.`),r}};Dr();gs();var aa=new sa,Un=class extends Ir.Modal{constructor(e,r,i){super(e.app);this.plugin=e;this.saved=!1;this.error=!1;this.statusSymbol=r.symbol,this.statusName=r.name,this.statusNextSymbol=r.nextStatusSymbol,this.statusAvailableAsCommand=r.availableAsCommand,this.type=r.type,this.isCoreStatus=i}statusConfiguration(){return new gt(this.statusSymbol,this.statusName,this.statusNextSymbol,this.statusAvailableAsCommand,this.type)}display(){return F(this,null,function*(){let{contentEl:e}=this;e.empty();let r=e.createDiv(),i;new Ir.Setting(r).setName(N.t("modals.customStatusModal.editStatusSymbol.name")).setDesc(N.t("modals.customStatusModal.editStatusSymbol.description")).addText(u=>{i=u,u.setValue(this.statusSymbol).onChange(c=>{this.statusSymbol=c,Un.setValid(u,aa.validateSymbol(this.statusConfiguration()))})}).setDisabled(this.isCoreStatus).then(u=>{Un.setValid(i,aa.validateSymbol(this.statusConfiguration()))});let s;new Ir.Setting(r).setName(N.t("modals.customStatusModal.editStatusName.name")).setDesc(N.t("modals.customStatusModal.editStatusName.description")).addText(u=>{s=u,u.setValue(this.statusName).onChange(c=>{this.statusName=c,Un.setValid(u,aa.validateName(this.statusConfiguration()))})}).then(u=>{Un.setValid(s,aa.validateName(this.statusConfiguration()))});let a;new Ir.Setting(r).setName(N.t("modals.customStatusModal.editNextStatusSymbol.name")).setDesc(N.t("modals.customStatusModal.editNextStatusSymbol.description")).addText(u=>{a=u,u.setValue(this.statusNextSymbol).onChange(c=>{this.statusNextSymbol=c,Un.setValid(u,aa.validateNextSymbol(this.statusConfiguration()))})}).then(u=>{Un.setValid(a,aa.validateNextSymbol(this.statusConfiguration()))}),new Ir.Setting(r).setName(N.t("modals.customStatusModal.editStatusType.name")).setDesc(N.t("modals.customStatusModal.editStatusType.description")).addDropdown(u=>{["TODO","IN_PROGRESS","DONE","CANCELLED","NON_TASK"].forEach(d=>{u.addOption(d,d)}),u.setValue(this.type).onChange(d=>{this.type=ge.getTypeFromStatusTypeString(d)})}),ge.tasksPluginCanCreateCommandsForStatuses()&&new Ir.Setting(r).setName(N.t("modals.customStatusModal.editAvailableAsCommand.name")).setDesc(N.t("modals.customStatusModal.editAvailableAsCommand.description")).addToggle(u=>{u.setValue(this.statusAvailableAsCommand).onChange(c=>F(this,null,function*(){this.statusAvailableAsCommand=c}))});let o=e.createDiv(),l=new Ir.Setting(o);l.addButton(u=>(u.setTooltip("Save").setIcon("checkmark").onClick(()=>F(this,null,function*(){let c=aa.validate(this.statusConfiguration());if(c.length>0){let d=c.join(` `)+` -`+N.t("modals.customStatusModal.fixErrorsBeforeSaving");new Ir.Notice(d);return}this.saved=!0,this.close()})),u)),l.addExtraButton(u=>(u.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),u))})}onOpen(){this.display()}static setValidationError(e){e.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(e){e.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(e,r){r.length===0?Un.removeValidationError(e):Un.setValidationError(e)}};var Jt=class extends xe.PluginSettingTab{constructor({plugin:e}){super(e.app,e);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=e}saveSettings(e){return F(this,null,function*(){yield this.plugin.saveSettings(),e&&this.display()})}display(){let{containerEl:e}=this;e.empty(),this.containerEl.addClass("tasks-settings"),e.createEl("p",{cls:"tasks-setting-important",text:N.t("settings.changeRequiresRestart")}),new xe.Setting(e).setName(N.t("settings.format.name")).setDesc(Jt.createFragmentWithHTML(`<p>${N.t("settings.format.description.line1")}</p><p>${N.t("settings.format.description.line2")}</p>`+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Reference/Task+Formats/About+Task+Formats"))).addDropdown(c=>{for(let d of Object.keys(Er))c.addOption(d,Er[d].getDisplayName());c.setValue(le().taskFormat).onChange(d=>F(this,null,function*(){at({taskFormat:d}),yield this.plugin.saveSettings()}))}),new xe.Setting(e).setName(N.t("settings.globalFilter.heading")).setHeading();let r=null;new xe.Setting(e).setName(N.t("settings.globalFilter.filter.name")).setDesc(Jt.createFragmentWithHTML(`<p><b>${N.t("settings.globalFilter.filter.description.line1")}</b></p><p>${N.t("settings.globalFilter.filter.description.line2")}<p><p>${N.t("settings.globalFilter.filter.description.line3")}</br>${N.t("settings.globalFilter.filter.description.line4")}</p>`+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Global+Filter"))).addText(c=>{c.setPlaceholder(N.t("settings.globalFilter.filter.placeholder")).setValue(Fe.getInstance().get()).onChange(d=>F(this,null,function*(){at({globalFilter:d}),Fe.getInstance().set(d),yield this.plugin.saveSettings(),ri(r,d.length>0)}))}),r=new xe.Setting(e).setName(N.t("settings.globalFilter.removeFilter.name")).setDesc(N.t("settings.globalFilter.removeFilter.description")).addToggle(c=>{let d=le();c.setValue(d.removeGlobalFilter).onChange(f=>F(this,null,function*(){at({removeGlobalFilter:f}),Fe.getInstance().setRemoveGlobalFilter(f),yield this.plugin.saveSettings()}))}),ri(r,le().globalFilter.length>0),new xe.Setting(e).setName(N.t("settings.globalQuery.heading")).setHeading(),qY(new xe.Setting(e).setDesc(Jt.createFragmentWithHTML(`<p>${N.t("settings.globalQuery.query.description")}</p>`+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Queries/Global+Query"))).addTextArea(c=>{let d=le();c.inputEl.rows=4,c.setPlaceholder("# "+N.t("settings.globalQuery.query.placeholder")).setValue(d.globalQuery).onChange(f=>F(this,null,function*(){at({globalQuery:f}),fr.getInstance().set(f),yield this.plugin.saveSettings()}))})),new xe.Setting(e).setName(N.t("settings.statuses.heading")).setHeading();let{headingOpened:i}=le();[{text:N.t("settings.statuses.coreStatuses.heading"),level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"<p>"+N.t("settings.statuses.coreStatuses.description.line1")+"</p><p>"+N.t("settings.statuses.coreStatuses.description.line2")+"</p>"},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertTaskCoreStatusSettings",featureFlag:"",notice:null}]},{text:N.t("settings.statuses.customStatuses.heading"),level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"<p>"+N.t("settings.statuses.customStatuses.description.line1")+"</p><p>"+N.t("settings.statuses.customStatuses.description.line2")+"</p><p>"+N.t("settings.statuses.customStatuses.description.line3")+`</p><p></p><p><a href="https://publish.obsidian.md/tasks/Getting+Started/Statuses">${N.t("settings.statuses.customStatuses.description.line4")}</a></p>`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}].forEach(c=>{var p;let d=(p=i[c.text])!=null?p:!0,f=this.addOneSettingsBlock(e,c,i);f.open=d}),new xe.Setting(e).setName(N.t("settings.dates.heading")).setHeading(),new xe.Setting(e).setName(N.t("settings.dates.createdDate.name")).setDesc(Jt.createFragmentWithHTML(N.t("settings.dates.createdDate.description")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Dates#Created+date"))).addToggle(c=>{let d=le();c.setValue(d.setCreatedDate).onChange(f=>F(this,null,function*(){at({setCreatedDate:f}),yield this.plugin.saveSettings()}))}),new xe.Setting(e).setName(N.t("settings.dates.doneDate.name")).setDesc(Jt.createFragmentWithHTML(N.t("settings.dates.doneDate.description")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Dates#Done+date"))).addToggle(c=>{let d=le();c.setValue(d.setDoneDate).onChange(f=>F(this,null,function*(){at({setDoneDate:f}),yield this.plugin.saveSettings()}))}),new xe.Setting(e).setName(N.t("settings.dates.cancelledDate.name")).setDesc(Jt.createFragmentWithHTML(N.t("settings.dates.cancelledDate.description")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Dates#Cancelled+date"))).addToggle(c=>{let d=le();c.setValue(d.setCancelledDate).onChange(f=>F(this,null,function*(){at({setCancelledDate:f}),yield this.plugin.saveSettings()}))}),new xe.Setting(e).setName(N.t("settings.datesFromFileNames.heading")).setHeading();let a=null,o=null;new xe.Setting(e).setName(N.t("settings.datesFromFileNames.scheduledDate.toggle.name")).setDesc(Jt.createFragmentWithHTML(N.t("settings.datesFromFileNames.scheduledDate.toggle.description.line1")+"</br>"+N.t("settings.datesFromFileNames.scheduledDate.toggle.description.line2")+"</br>"+N.t("settings.datesFromFileNames.scheduledDate.toggle.description.line3")+"</br>"+N.t("settings.datesFromFileNames.scheduledDate.toggle.description.line4")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Use+Filename+as+Default+Date"))).addToggle(c=>{let d=le();c.setValue(d.useFilenameAsScheduledDate).onChange(f=>F(this,null,function*(){at({useFilenameAsScheduledDate:f}),ri(a,f),ri(o,f),yield this.plugin.saveSettings()}))}),a=new xe.Setting(e).setName(N.t("settings.datesFromFileNames.scheduledDate.extraFormat.name")).setDesc(Jt.createFragmentWithHTML(N.t("settings.datesFromFileNames.scheduledDate.extraFormat.description.line1")+`</br><p><a href="https://momentjs.com/docs/#/displaying/format/">${N.t("settings.datesFromFileNames.scheduledDate.extraFormat.description.line2")}</a></p>`)).addText(c=>{let d=le();c.setPlaceholder(N.t("settings.datesFromFileNames.scheduledDate.extraFormat.placeholder")).setValue(d.filenameAsScheduledDateFormat).onChange(f=>F(this,null,function*(){at({filenameAsScheduledDateFormat:f}),yield this.plugin.saveSettings()}))}),o=new xe.Setting(e).setName(N.t("settings.datesFromFileNames.scheduledDate.folders.name")).setDesc(N.t("settings.datesFromFileNames.scheduledDate.folders.description")).addText(c=>F(this,null,function*(){let d=le();yield this.plugin.saveSettings(),c.setValue(Jt.renderFolderArray(d.filenameAsDateFolders)).onChange(f=>F(this,null,function*(){let p=Jt.parseCommaSeparatedFolders(f);at({filenameAsDateFolders:p}),yield this.plugin.saveSettings()}))})),ri(a,le().useFilenameAsScheduledDate),ri(o,le().useFilenameAsScheduledDate),new xe.Setting(e).setName(N.t("settings.recurringTasks.heading")).setHeading(),new xe.Setting(e).setName(N.t("settings.recurringTasks.nextLine.name")).setDesc(Jt.createFragmentWithHTML(N.t("settings.recurringTasks.nextLine.description")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Recurring+Tasks"))).addToggle(c=>{let{recurrenceOnNextLine:d}=le();c.setValue(d).onChange(f=>F(this,null,function*(){at({recurrenceOnNextLine:f}),yield this.plugin.saveSettings()}))}),new xe.Setting(e).setName(N.t("settings.recurringTasks.removeScheduledDate.name")).setDesc(Jt.createFragmentWithHTML(N.t("settings.recurringTasks.removeScheduledDate.description.line1")+"</br>"+N.t("settings.recurringTasks.removeScheduledDate.description.line2")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Recurring+Tasks"))).addToggle(c=>{let{removeScheduledDateOnRecurrence:d}=le();c.setValue(d).onChange(f=>F(this,null,function*(){at({removeScheduledDateOnRecurrence:f}),yield this.plugin.saveSettings()}))}),new xe.Setting(e).setName(N.t("settings.autoSuggest.heading")).setHeading();let l=null,u=null;new xe.Setting(e).setName(N.t("settings.autoSuggest.toggle.name")).setDesc(Jt.createFragmentWithHTML(N.t("settings.autoSuggest.toggle.description")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Auto-Suggest"))).addToggle(c=>{let d=le();c.setValue(d.autoSuggestInEditor).onChange(f=>F(this,null,function*(){at({autoSuggestInEditor:f}),yield this.plugin.saveSettings(),ri(l,f),ri(u,f)}))}),l=new xe.Setting(e).setName(N.t("settings.autoSuggest.minLength.name")).setDesc(N.t("settings.autoSuggest.minLength.description")).addSlider(c=>{let d=le();c.setLimits(0,3,1).setValue(d.autoSuggestMinMatch).setDynamicTooltip().onChange(f=>F(this,null,function*(){at({autoSuggestMinMatch:f}),yield this.plugin.saveSettings()}))}),u=new xe.Setting(e).setName(N.t("settings.autoSuggest.maxSuggestions.name")).setDesc(N.t("settings.autoSuggest.maxSuggestions.description")).addSlider(c=>{let d=le();c.setLimits(3,20,1).setValue(d.autoSuggestMaxItems).setDynamicTooltip().onChange(f=>F(this,null,function*(){at({autoSuggestMaxItems:f}),yield this.plugin.saveSettings()}))}),ri(l,le().autoSuggestInEditor),ri(u,le().autoSuggestInEditor),new xe.Setting(e).setName(N.t("settings.dialogs.heading")).setHeading(),new xe.Setting(e).setName(N.t("settings.dialogs.accessKeys.name")).setDesc(Jt.createFragmentWithHTML(N.t("settings.dialogs.accessKeys.description")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Create+or+edit+Task#Keyboard+shortcuts"))).addToggle(c=>{let d=le();c.setValue(d.provideAccessKeys).onChange(f=>F(this,null,function*(){at({provideAccessKeys:f}),yield this.plugin.saveSettings()}))})}seeTheDocumentation(e){return`<p><a href="${e}">${N.t("settings.seeTheDocumentation")}</a>.</p>`}addOneSettingsBlock(e,r,i){let s=e.createEl("details",{cls:"tasks-nested-settings",attr:U({},r.open||i[r.text]?{open:!0}:{})});s.empty(),s.ontoggle=()=>{i[r.text]=s.open,at({headingOpened:i}),this.plugin.saveSettings()};let a=s.createEl("summary");if(new xe.Setting(a).setHeading().setName(r.text),a.createDiv("collapser").createDiv("handle"),r.notice!==null){let o=s.createEl("div",{cls:r.notice.class,text:r.notice.text});r.notice.html!==null&&o.insertAdjacentHTML("beforeend",r.notice.html)}return r.settings.forEach(o=>{if(!(o.featureFlag!==""&&!jS(o.featureFlag))&&(o.type==="checkbox"?new xe.Setting(s).setName(o.name).setDesc(o.description).addToggle(l=>{let u=le();u.generalSettings[o.settingName]||js(o.settingName,o.initialValue),l.setValue(u.generalSettings[o.settingName]).onChange(c=>F(this,null,function*(){js(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new xe.Setting(s).setName(o.name).setDesc(o.description).addText(l=>{let u=le();u.generalSettings[o.settingName]||js(o.settingName,o.initialValue);let c=d=>F(this,null,function*(){js(o.settingName,d),yield this.plugin.saveSettings()});l.setPlaceholder(o.placeholder.toString()).setValue(u.generalSettings[o.settingName].toString()).onChange((0,xe.debounce)(c,500,!0))}):o.type==="textarea"?new xe.Setting(s).setName(o.name).setDesc(o.description).addTextArea(l=>{let u=le();u.generalSettings[o.settingName]||js(o.settingName,o.initialValue);let c=d=>F(this,null,function*(){js(o.settingName,d),yield this.plugin.saveSettings()});l.setPlaceholder(o.placeholder.toString()).setValue(u.generalSettings[o.settingName].toString()).onChange((0,xe.debounce)(c,500,!0)),l.inputEl.rows=8,l.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](s,this),o.notice!==null)){let l=s.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&l.insertAdjacentHTML("beforeend",o.notice.html)}}),s}static parseCommaSeparatedFolders(e){return e.split(",").map(r=>r.trim()).map(r=>r.replace(/^\/|\/$/g,"")).filter(r=>r!=="")}static renderFolderArray(e){return e.join(",")}insertTaskCoreStatusSettings(e,r){let{statusSettings:i}=le();i.coreStatuses.forEach(a=>{Sx(e,a,i.coreStatuses,i,r,r.plugin,!0)}),new xe.Setting(e).addButton(a=>{let o=N.t("settings.statuses.coreStatuses.buttons.checkStatuses.name");a.setButtonText(o).setCta().onClick(()=>F(this,null,function*(){let u=window.moment().format("YYYY-MM-DD HH-mm-ss"),c=`Tasks Plugin - ${o} ${u}.md`,d=this.plugin.manifest.version,f=Be.getInstance(),p=hx(i,f,o,d),b=yield this.app.vault.create(c,p);yield this.app.workspace.getLeaf(!0).openFile(b)})),a.setTooltip(N.t("settings.statuses.coreStatuses.buttons.checkStatuses.tooltip"))}).infoEl.remove()}insertCustomTaskStatusSettings(e,r){let{statusSettings:i}=le();i.customStatuses.forEach(u=>{Sx(e,u,i.customStatuses,i,r,r.plugin,!1)}),e.createEl("div"),new xe.Setting(e).addButton(u=>{u.setButtonText(N.t("settings.statuses.customStatuses.buttons.addNewStatus.name")).setCta().onClick(()=>F(this,null,function*(){et.addStatus(i.customStatuses,new gt("","","",!1,"TODO")),yield Co(i,r)}))}).infoEl.remove();let a=[[N.t("settings.statuses.collections.anuppuccinTheme"),gx()],[N.t("settings.statuses.collections.auraTheme"),yx()],[N.t("settings.statuses.collections.borderTheme"),bx()],[N.t("settings.statuses.collections.ebullientworksTheme"),Tx()],[N.t("settings.statuses.collections.itsThemeAndSlrvbCheckboxes"),_x()],[N.t("settings.statuses.collections.minimalTheme"),wx()],[N.t("settings.statuses.collections.thingsTheme"),kx()],[N.t("settings.statuses.collections.lytModeTheme"),vx()]];for(let[u,c]of a)new xe.Setting(e).addButton(f=>{let p=N.t("settings.statuses.collections.buttons.addCollection.name",{themeName:u,numberOfStatuses:c.length});f.setButtonText(p).onClick(()=>F(this,null,function*(){yield $Y(c,i,r)}))}).infoEl.remove();new xe.Setting(e).addButton(u=>{u.setButtonText(N.t("settings.statuses.customStatuses.buttons.addAllUnknown.name")).setCta().onClick(()=>F(this,null,function*(){let d=this.plugin.getTasks().map(p=>p.status),f=Be.getInstance().findUnknownStatuses(d);f.length!==0&&(f.forEach(p=>{et.addStatus(i.customStatuses,p)}),yield Co(i,r))}))}).infoEl.remove(),new xe.Setting(e).addButton(u=>{u.setButtonText(N.t("settings.statuses.customStatuses.buttons.resetCustomStatuses.name")).setWarning().onClick(()=>F(this,null,function*(){et.resetAllCustomStatuses(i),yield Co(i,r)}))}).infoEl.remove()}},Ru=Jt;Ru.createFragmentWithHTML=e=>createFragment(r=>r.createDiv().innerHTML=e);function Sx(n,t,e,r,i,s,a){let o=n.createEl("pre");o.addClass("row-for-status"),o.textContent=new ge(t).previewText();let l=new xe.Setting(n);l.infoEl.replaceWith(o),a||l.addExtraButton(u=>{u.setIcon("cross").setTooltip("Delete").onClick(()=>F(this,null,function*(){et.deleteStatus(e,t)&&(yield Co(r,i))}))}),l.addExtraButton(u=>{u.setIcon("pencil").setTooltip("Edit").onClick(()=>F(this,null,function*(){let c=new Un(s,t,a);c.onClose=()=>F(this,null,function*(){c.saved&&et.replaceStatus(e,t,c.statusConfiguration())&&(yield Co(r,i))}),c.open()}))}),l.infoEl.remove()}function $Y(n,t,e){return F(this,null,function*(){et.bulkAddStatusCollection(t,n).forEach(i=>{new xe.Notice(i)}),yield Co(t,e)})}function Co(n,t){return F(this,null,function*(){at({statusSettings:n}),et.applyToStatusRegistry(n,Be.getInstance()),yield t.saveSettings(!0)})}function qY(n){let{settingEl:t,infoEl:e,controlEl:r}=n,i=r.querySelector("textarea");i!==null&&(t.style.display="block",e.style.marginRight="0px",i.style.minWidth="-webkit-fill-available")}function ri(n,t){n?n.setVisibility(t):console.warn("Setting has not be initialised. Can update visibility of setting UI - in setSettingVisibility")}wi();Ws();var ls=require("obsidian");Jc();rn();ry();function HY(n){console.error(n),new ls.Notice(n+` +`+N.t("modals.customStatusModal.fixErrorsBeforeSaving");new Ir.Notice(d);return}this.saved=!0,this.close()})),u)),l.addExtraButton(u=>(u.setIcon("cross").setTooltip("Cancel").onClick(()=>{this.saved=!1,this.close()}),u))})}onOpen(){this.display()}static setValidationError(e){e.inputEl.addClass("tasks-settings-is-invalid")}static removeValidationError(e){e.inputEl.removeClass("tasks-settings-is-invalid")}static setValid(e,r){r.length===0?Un.removeValidationError(e):Un.setValidationError(e)}};var en=class extends xe.PluginSettingTab{constructor({plugin:e}){super(e.app,e);this.customFunctions={insertTaskCoreStatusSettings:this.insertTaskCoreStatusSettings.bind(this),insertCustomTaskStatusSettings:this.insertCustomTaskStatusSettings.bind(this)};this.plugin=e}saveSettings(e){return F(this,null,function*(){yield this.plugin.saveSettings(),e&&this.display()})}display(){let{containerEl:e}=this;e.empty(),this.containerEl.addClass("tasks-settings"),e.createEl("p",{cls:"tasks-setting-important",text:N.t("settings.changeRequiresRestart")}),new xe.Setting(e).setName(N.t("settings.format.name")).setDesc(en.createFragmentWithHTML(`<p>${N.t("settings.format.description.line1")}</p><p>${N.t("settings.format.description.line2")}</p>`+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Reference/Task+Formats/About+Task+Formats"))).addDropdown(c=>{for(let d of Object.keys(Er))c.addOption(d,Er[d].getDisplayName());c.setValue(oe().taskFormat).onChange(d=>F(this,null,function*(){at({taskFormat:d}),yield this.plugin.saveSettings()}))}),new xe.Setting(e).setName(N.t("settings.globalFilter.heading")).setHeading();let r=null;new xe.Setting(e).setName(N.t("settings.globalFilter.filter.name")).setDesc(en.createFragmentWithHTML(`<p><b>${N.t("settings.globalFilter.filter.description.line1")}</b></p><p>${N.t("settings.globalFilter.filter.description.line2")}<p><p>${N.t("settings.globalFilter.filter.description.line3")}</br>${N.t("settings.globalFilter.filter.description.line4")}</p>`+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Global+Filter"))).addText(c=>{c.setPlaceholder(N.t("settings.globalFilter.filter.placeholder")).setValue(Fe.getInstance().get()).onChange(d=>F(this,null,function*(){at({globalFilter:d}),Fe.getInstance().set(d),yield this.plugin.saveSettings(),ri(r,d.length>0)}))}),r=new xe.Setting(e).setName(N.t("settings.globalFilter.removeFilter.name")).setDesc(N.t("settings.globalFilter.removeFilter.description")).addToggle(c=>{let d=oe();c.setValue(d.removeGlobalFilter).onChange(f=>F(this,null,function*(){at({removeGlobalFilter:f}),Fe.getInstance().setRemoveGlobalFilter(f),yield this.plugin.saveSettings()}))}),ri(r,oe().globalFilter.length>0),new xe.Setting(e).setName(N.t("settings.globalQuery.heading")).setHeading(),qY(new xe.Setting(e).setDesc(en.createFragmentWithHTML(`<p>${N.t("settings.globalQuery.query.description")}</p>`+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Queries/Global+Query"))).addTextArea(c=>{let d=oe();c.inputEl.rows=4,c.setPlaceholder("# "+N.t("settings.globalQuery.query.placeholder")).setValue(d.globalQuery).onChange(f=>F(this,null,function*(){at({globalQuery:f}),fr.getInstance().set(f),yield this.plugin.saveSettings()}))})),new xe.Setting(e).setName(N.t("settings.statuses.heading")).setHeading();let{headingOpened:i}=oe();[{text:N.t("settings.statuses.coreStatuses.heading"),level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"<p>"+N.t("settings.statuses.coreStatuses.description.line1")+"</p><p>"+N.t("settings.statuses.coreStatuses.description.line2")+"</p>"},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertTaskCoreStatusSettings",featureFlag:"",notice:null}]},{text:N.t("settings.statuses.customStatuses.heading"),level:"h3",class:"",open:!0,notice:{class:"setting-item-description",text:null,html:"<p>"+N.t("settings.statuses.customStatuses.description.line1")+"</p><p>"+N.t("settings.statuses.customStatuses.description.line2")+"</p><p>"+N.t("settings.statuses.customStatuses.description.line3")+`</p><p></p><p><a href="https://publish.obsidian.md/tasks/Getting+Started/Statuses">${N.t("settings.statuses.customStatuses.description.line4")}</a></p>`},settings:[{name:"",description:"",type:"function",initialValue:"",placeholder:"",settingName:"insertCustomTaskStatusSettings",featureFlag:"",notice:null}]}].forEach(c=>{var p;let d=(p=i[c.text])!=null?p:!0,f=this.addOneSettingsBlock(e,c,i);f.open=d}),new xe.Setting(e).setName(N.t("settings.dates.heading")).setHeading(),new xe.Setting(e).setName(N.t("settings.dates.createdDate.name")).setDesc(en.createFragmentWithHTML(N.t("settings.dates.createdDate.description")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Dates#Created+date"))).addToggle(c=>{let d=oe();c.setValue(d.setCreatedDate).onChange(f=>F(this,null,function*(){at({setCreatedDate:f}),yield this.plugin.saveSettings()}))}),new xe.Setting(e).setName(N.t("settings.dates.doneDate.name")).setDesc(en.createFragmentWithHTML(N.t("settings.dates.doneDate.description")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Dates#Done+date"))).addToggle(c=>{let d=oe();c.setValue(d.setDoneDate).onChange(f=>F(this,null,function*(){at({setDoneDate:f}),yield this.plugin.saveSettings()}))}),new xe.Setting(e).setName(N.t("settings.dates.cancelledDate.name")).setDesc(en.createFragmentWithHTML(N.t("settings.dates.cancelledDate.description")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Dates#Cancelled+date"))).addToggle(c=>{let d=oe();c.setValue(d.setCancelledDate).onChange(f=>F(this,null,function*(){at({setCancelledDate:f}),yield this.plugin.saveSettings()}))}),new xe.Setting(e).setName(N.t("settings.datesFromFileNames.heading")).setHeading();let a=null,o=null;new xe.Setting(e).setName(N.t("settings.datesFromFileNames.scheduledDate.toggle.name")).setDesc(en.createFragmentWithHTML(N.t("settings.datesFromFileNames.scheduledDate.toggle.description.line1")+"</br>"+N.t("settings.datesFromFileNames.scheduledDate.toggle.description.line2")+"</br>"+N.t("settings.datesFromFileNames.scheduledDate.toggle.description.line3")+"</br>"+N.t("settings.datesFromFileNames.scheduledDate.toggle.description.line4")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Use+Filename+as+Default+Date"))).addToggle(c=>{let d=oe();c.setValue(d.useFilenameAsScheduledDate).onChange(f=>F(this,null,function*(){at({useFilenameAsScheduledDate:f}),ri(a,f),ri(o,f),yield this.plugin.saveSettings()}))}),a=new xe.Setting(e).setName(N.t("settings.datesFromFileNames.scheduledDate.extraFormat.name")).setDesc(en.createFragmentWithHTML(N.t("settings.datesFromFileNames.scheduledDate.extraFormat.description.line1")+`</br><p><a href="https://momentjs.com/docs/#/displaying/format/">${N.t("settings.datesFromFileNames.scheduledDate.extraFormat.description.line2")}</a></p>`)).addText(c=>{let d=oe();c.setPlaceholder(N.t("settings.datesFromFileNames.scheduledDate.extraFormat.placeholder")).setValue(d.filenameAsScheduledDateFormat).onChange(f=>F(this,null,function*(){at({filenameAsScheduledDateFormat:f}),yield this.plugin.saveSettings()}))}),o=new xe.Setting(e).setName(N.t("settings.datesFromFileNames.scheduledDate.folders.name")).setDesc(N.t("settings.datesFromFileNames.scheduledDate.folders.description")).addText(c=>F(this,null,function*(){let d=oe();yield this.plugin.saveSettings(),c.setValue(en.renderFolderArray(d.filenameAsDateFolders)).onChange(f=>F(this,null,function*(){let p=en.parseCommaSeparatedFolders(f);at({filenameAsDateFolders:p}),yield this.plugin.saveSettings()}))})),ri(a,oe().useFilenameAsScheduledDate),ri(o,oe().useFilenameAsScheduledDate),new xe.Setting(e).setName(N.t("settings.recurringTasks.heading")).setHeading(),new xe.Setting(e).setName(N.t("settings.recurringTasks.nextLine.name")).setDesc(en.createFragmentWithHTML(N.t("settings.recurringTasks.nextLine.description")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Recurring+Tasks"))).addToggle(c=>{let{recurrenceOnNextLine:d}=oe();c.setValue(d).onChange(f=>F(this,null,function*(){at({recurrenceOnNextLine:f}),yield this.plugin.saveSettings()}))}),new xe.Setting(e).setName(N.t("settings.recurringTasks.removeScheduledDate.name")).setDesc(en.createFragmentWithHTML(N.t("settings.recurringTasks.removeScheduledDate.description.line1")+"</br>"+N.t("settings.recurringTasks.removeScheduledDate.description.line2")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Recurring+Tasks"))).addToggle(c=>{let{removeScheduledDateOnRecurrence:d}=oe();c.setValue(d).onChange(f=>F(this,null,function*(){at({removeScheduledDateOnRecurrence:f}),yield this.plugin.saveSettings()}))}),new xe.Setting(e).setName(N.t("settings.autoSuggest.heading")).setHeading();let l=null,u=null;new xe.Setting(e).setName(N.t("settings.autoSuggest.toggle.name")).setDesc(en.createFragmentWithHTML(N.t("settings.autoSuggest.toggle.description")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Auto-Suggest"))).addToggle(c=>{let d=oe();c.setValue(d.autoSuggestInEditor).onChange(f=>F(this,null,function*(){at({autoSuggestInEditor:f}),yield this.plugin.saveSettings(),ri(l,f),ri(u,f)}))}),l=new xe.Setting(e).setName(N.t("settings.autoSuggest.minLength.name")).setDesc(N.t("settings.autoSuggest.minLength.description")).addSlider(c=>{let d=oe();c.setLimits(0,3,1).setValue(d.autoSuggestMinMatch).setDynamicTooltip().onChange(f=>F(this,null,function*(){at({autoSuggestMinMatch:f}),yield this.plugin.saveSettings()}))}),u=new xe.Setting(e).setName(N.t("settings.autoSuggest.maxSuggestions.name")).setDesc(N.t("settings.autoSuggest.maxSuggestions.description")).addSlider(c=>{let d=oe();c.setLimits(3,20,1).setValue(d.autoSuggestMaxItems).setDynamicTooltip().onChange(f=>F(this,null,function*(){at({autoSuggestMaxItems:f}),yield this.plugin.saveSettings()}))}),ri(l,oe().autoSuggestInEditor),ri(u,oe().autoSuggestInEditor),new xe.Setting(e).setName(N.t("settings.dialogs.heading")).setHeading(),new xe.Setting(e).setName(N.t("settings.dialogs.accessKeys.name")).setDesc(en.createFragmentWithHTML(N.t("settings.dialogs.accessKeys.description")+"</br>"+this.seeTheDocumentation("https://publish.obsidian.md/tasks/Getting+Started/Create+or+edit+Task#Keyboard+shortcuts"))).addToggle(c=>{let d=oe();c.setValue(d.provideAccessKeys).onChange(f=>F(this,null,function*(){at({provideAccessKeys:f}),yield this.plugin.saveSettings()}))})}seeTheDocumentation(e){return`<p><a href="${e}">${N.t("settings.seeTheDocumentation")}</a>.</p>`}addOneSettingsBlock(e,r,i){let s=e.createEl("details",{cls:"tasks-nested-settings",attr:U({},r.open||i[r.text]?{open:!0}:{})});s.empty(),s.ontoggle=()=>{i[r.text]=s.open,at({headingOpened:i}),this.plugin.saveSettings()};let a=s.createEl("summary");if(new xe.Setting(a).setHeading().setName(r.text),a.createDiv("collapser").createDiv("handle"),r.notice!==null){let o=s.createEl("div",{cls:r.notice.class,text:r.notice.text});r.notice.html!==null&&o.insertAdjacentHTML("beforeend",r.notice.html)}return r.settings.forEach(o=>{if(!(o.featureFlag!==""&&!jS(o.featureFlag))&&(o.type==="checkbox"?new xe.Setting(s).setName(o.name).setDesc(o.description).addToggle(l=>{let u=oe();u.generalSettings[o.settingName]||js(o.settingName,o.initialValue),l.setValue(u.generalSettings[o.settingName]).onChange(c=>F(this,null,function*(){js(o.settingName,c),yield this.plugin.saveSettings()}))}):o.type==="text"?new xe.Setting(s).setName(o.name).setDesc(o.description).addText(l=>{let u=oe();u.generalSettings[o.settingName]||js(o.settingName,o.initialValue);let c=d=>F(this,null,function*(){js(o.settingName,d),yield this.plugin.saveSettings()});l.setPlaceholder(o.placeholder.toString()).setValue(u.generalSettings[o.settingName].toString()).onChange((0,xe.debounce)(c,500,!0))}):o.type==="textarea"?new xe.Setting(s).setName(o.name).setDesc(o.description).addTextArea(l=>{let u=oe();u.generalSettings[o.settingName]||js(o.settingName,o.initialValue);let c=d=>F(this,null,function*(){js(o.settingName,d),yield this.plugin.saveSettings()});l.setPlaceholder(o.placeholder.toString()).setValue(u.generalSettings[o.settingName].toString()).onChange((0,xe.debounce)(c,500,!0)),l.inputEl.rows=8,l.inputEl.cols=40}):o.type==="function"&&this.customFunctions[o.settingName](s,this),o.notice!==null)){let l=s.createEl("p",{cls:o.notice.class,text:o.notice.text});o.notice.html!==null&&l.insertAdjacentHTML("beforeend",o.notice.html)}}),s}static parseCommaSeparatedFolders(e){return e.split(",").map(r=>r.trim()).map(r=>r.replace(/^\/|\/$/g,"")).filter(r=>r!=="")}static renderFolderArray(e){return e.join(",")}insertTaskCoreStatusSettings(e,r){let{statusSettings:i}=oe();i.coreStatuses.forEach(a=>{Sx(e,a,i.coreStatuses,i,r,r.plugin,!0)}),new xe.Setting(e).addButton(a=>{let o=N.t("settings.statuses.coreStatuses.buttons.checkStatuses.name");a.setButtonText(o).setCta().onClick(()=>F(this,null,function*(){let u=window.moment().format("YYYY-MM-DD HH-mm-ss"),c=`Tasks Plugin - ${o} ${u}.md`,d=this.plugin.manifest.version,f=Be.getInstance(),p=hx(i,f,o,d),b=yield this.app.vault.create(c,p);yield this.app.workspace.getLeaf(!0).openFile(b)})),a.setTooltip(N.t("settings.statuses.coreStatuses.buttons.checkStatuses.tooltip"))}).infoEl.remove()}insertCustomTaskStatusSettings(e,r){let{statusSettings:i}=oe();i.customStatuses.forEach(u=>{Sx(e,u,i.customStatuses,i,r,r.plugin,!1)}),e.createEl("div"),new xe.Setting(e).addButton(u=>{u.setButtonText(N.t("settings.statuses.customStatuses.buttons.addNewStatus.name")).setCta().onClick(()=>F(this,null,function*(){et.addStatus(i.customStatuses,new gt("","","",!1,"TODO")),yield Co(i,r)}))}).infoEl.remove();let a=[[N.t("settings.statuses.collections.anuppuccinTheme"),gx()],[N.t("settings.statuses.collections.auraTheme"),yx()],[N.t("settings.statuses.collections.borderTheme"),bx()],[N.t("settings.statuses.collections.ebullientworksTheme"),Tx()],[N.t("settings.statuses.collections.itsThemeAndSlrvbCheckboxes"),_x()],[N.t("settings.statuses.collections.minimalTheme"),wx()],[N.t("settings.statuses.collections.thingsTheme"),kx()],[N.t("settings.statuses.collections.lytModeTheme"),vx()]];for(let[u,c]of a)new xe.Setting(e).addButton(f=>{let p=N.t("settings.statuses.collections.buttons.addCollection.name",{themeName:u,numberOfStatuses:c.length});f.setButtonText(p).onClick(()=>F(this,null,function*(){yield $Y(c,i,r)}))}).infoEl.remove();new xe.Setting(e).addButton(u=>{u.setButtonText(N.t("settings.statuses.customStatuses.buttons.addAllUnknown.name")).setCta().onClick(()=>F(this,null,function*(){let d=this.plugin.getTasks().map(p=>p.status),f=Be.getInstance().findUnknownStatuses(d);f.length!==0&&(f.forEach(p=>{et.addStatus(i.customStatuses,p)}),yield Co(i,r))}))}).infoEl.remove(),new xe.Setting(e).addButton(u=>{u.setButtonText(N.t("settings.statuses.customStatuses.buttons.resetCustomStatuses.name")).setWarning().onClick(()=>F(this,null,function*(){et.resetAllCustomStatuses(i),yield Co(i,r)}))}).infoEl.remove()}},Ru=en;Ru.createFragmentWithHTML=e=>createFragment(r=>r.createDiv().innerHTML=e);function Sx(n,t,e,r,i,s,a){let o=n.createEl("pre");o.addClass("row-for-status"),o.textContent=new ge(t).previewText();let l=new xe.Setting(n);l.infoEl.replaceWith(o),a||l.addExtraButton(u=>{u.setIcon("cross").setTooltip("Delete").onClick(()=>F(this,null,function*(){et.deleteStatus(e,t)&&(yield Co(r,i))}))}),l.addExtraButton(u=>{u.setIcon("pencil").setTooltip("Edit").onClick(()=>F(this,null,function*(){let c=new Un(s,t,a);c.onClose=()=>F(this,null,function*(){c.saved&&et.replaceStatus(e,t,c.statusConfiguration())&&(yield Co(r,i))}),c.open()}))}),l.infoEl.remove()}function $Y(n,t,e){return F(this,null,function*(){et.bulkAddStatusCollection(t,n).forEach(i=>{new xe.Notice(i)}),yield Co(t,e)})}function Co(n,t){return F(this,null,function*(){at({statusSettings:n}),et.applyToStatusRegistry(n,Be.getInstance()),yield t.saveSettings(!0)})}function qY(n){let{settingEl:t,infoEl:e,controlEl:r}=n,i=r.querySelector("textarea");i!==null&&(t.style.display="block",e.style.marginRight="0px",i.style.minWidth="-webkit-fill-available")}function ri(n,t){n?n.setVisibility(t):console.warn("Setting has not be initialised. Can update visibility of setting UI - in setSettingVisibility")}wi();Ws();var ls=require("obsidian");Jc();Bt();ry();function HY(n){console.error(n),new ls.Notice(n+` This message has been written to the console. `,1e4)}var xf=class extends ls.EditorSuggest{constructor(e,r,i){super(e);this.settings=r,this.plugin=i,e.scope.register([],"Tab",()=>{var a;let s=(a=this.context)==null?void 0:a.editor;return s?(s.exec("indentMore"),!1):!0})}onTrigger(e,r,i){if(!this.settings.autoSuggestInEditor)return null;let s=r.getLine(e.line);return NS(s,e,r)?{start:{line:e.line,ch:0},end:{line:e.line,ch:s.length},query:s}:null}getSuggestions(e){var c,d,f;let r=e.query,i=e.editor.getCursor(),s=this.plugin.getTasks(),a=s.find(p=>p.taskLocation.path==e.file.path&&p.taskLocation.lineNumber==i.line),o=this.getMarkdownFileInfo(e),l=this.canSaveEdits(o);return((f=(d=(c=au()).buildSuggestions)==null?void 0:d.call(c,r,i.ch,this.settings,s,l,a))!=null?f:[]).map(p=>de(U({},p),{context:e}))}getMarkdownFileInfo(e){return e.editor.cm.state.field(ls.editorInfoField)}canSaveEdits(e){return e instanceof ls.MarkdownView}renderSuggestion(e,r){r.setText(e.displayText)}selectSuggestion(e,r){return F(this,null,function*(){var u,c,d;let i=e.context.editor;if(e.suggestionType==="empty"){this.close();let f=new KeyboardEvent("keydown",{code:"Enter",key:"Enter"});(c=(u=i==null?void 0:i.cm)==null?void 0:u.contentDOM)==null||c.dispatchEvent(f);return}if(e.taskItDependsOn!=null){let f=Zc(e.taskItDependsOn,this.plugin.getTasks().map(p=>p.id));if(e.appendText+=` ${f.id}`,e.taskItDependsOn!==f)if(e.context.file.path==f.path){let p=e.taskItDependsOn.originalMarkdown,b={line:e.taskItDependsOn.lineNumber,ch:0},T={line:e.taskItDependsOn.lineNumber,ch:p.length},_=e.context.editor.getRange(b,T);if(_!==p){let O=`Error adding new ID, due to mismatched data in Tasks memory and the editor: @@ -430,7 +430,7 @@ task line in editor: '${_}' file: '${f.path}' `;HY(O);return}e.context.editor.replaceRange(f.toFileLineString(),b,T)}else Nn({originalTask:e.taskItDependsOn,newTasks:f})}let s=e.context.editor.getCursor(),a={line:s.line,ch:(d=e.insertAt)!=null?d:s.ch},o=e.insertSkip?{line:s.line,ch:a.ch+e.insertSkip}:void 0;e.context.editor.replaceRange(e.appendText,a,o),e.context.editor.setCursor({line:s.line,ch:a.ch+e.appendText.length});let l=this.getMarkdownFileInfo(e.context);this.canSaveEdits(l)&&(yield l.save())})}};Ga();var Dx=(n,t)=>{let e,r=new Promise((a,o)=>{e=a});return t(n,a=>{let o=a.map(l=>l.toFileLineString()).join(` -`);e(o)}).open(),r};var Ex=(n,t)=>{let e=Sd({line:"",path:""});return new zi({app:n,task:e,onSubmit:t,allTasks:[]})};var xx=n=>({createTaskLineModal:()=>Dx(n,Ex),executeToggleTaskDoneCommand:(t,e)=>Uy(t,e).text});Mn();var Of=class extends Ox.Plugin{get apiV1(){return xx(this.app)}onload(){return F(this,null,function*(){yield zb(),sn.registerConsoleLogger(),cy("info",N.t("main.loadingPlugin",{name:this.manifest.name,version:this.manifest.version})),yield this.loadSettings();let{loggingOptions:e}=le();sn.configure(e),this.addSettingTab(new Ru({plugin:this})),$D({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let r=new lf({obsidianEvents:this.app.workspace});this.cache=new $s({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace,events:r}),this.inlineRenderer=new _f({plugin:this}),this.queryRenderer=new Df({plugin:this,events:r}),this.setObsidianPropertiesTypes(),this.registerEditorExtension(cx()),this.registerEditorSuggest(new xf(this.app,le(),this)),new of({plugin:this})})}loadTaskStatuses(){return F(this,null,function*(){let{statusSettings:e}=le();et.applyToStatusRegistry(e,Be.getInstance())})}onunload(){var e;cy("info",N.t("main.unloadingPlugin",{name:this.manifest.name,version:this.manifest.version})),(e=this.cache)==null||e.unload()}loadSettings(){return F(this,null,function*(){let e=yield this.loadData();at(e),e=le(),Fe.getInstance().set(e.globalFilter),Fe.getInstance().setRemoveGlobalFilter(e.removeGlobalFilter),fr.getInstance().set(e.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return F(this,null,function*(){yield this.saveData(le())})}getTasks(){return this.cache===void 0?[]:this.cache.getTasks()}setObsidianPropertiesTypes(){var e;try{let r=this.app.metadataTypeManager,i=r.getAllProperties(),s=new Oi;for(let a of s.allPropertyNamesSorted()){let o=s.propertyType(a);((e=i[a])==null?void 0:e.type)!==o&&r.setType(a,o)}}catch(r){console.error("setObsidianPropertiesTypes error",r)}}}; +`);e(o)}).open(),r};var Ex=(n,t)=>{let e=Sd({line:"",path:""});return new zi({app:n,task:e,onSubmit:t,allTasks:[]})};var xx=n=>({createTaskLineModal:()=>Dx(n,Ex),executeToggleTaskDoneCommand:(t,e)=>Uy(t,e).text});Mn();var Of=class extends Ox.Plugin{get apiV1(){return xx(this.app)}onload(){return F(this,null,function*(){yield zb(),sn.registerConsoleLogger(),cy("info",N.t("main.loadingPlugin",{name:this.manifest.name,version:this.manifest.version})),yield this.loadSettings();let{loggingOptions:e}=oe();sn.configure(e),this.addSettingTab(new Ru({plugin:this})),$D({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace}),yield this.loadTaskStatuses();let r=new lf({obsidianEvents:this.app.workspace});this.cache=new $s({metadataCache:this.app.metadataCache,vault:this.app.vault,workspace:this.app.workspace,events:r}),this.inlineRenderer=new _f({plugin:this}),this.queryRenderer=new Df({plugin:this,events:r}),this.setObsidianPropertiesTypes(),this.registerEditorExtension(cx()),this.registerEditorSuggest(new xf(this.app,oe(),this)),new of({plugin:this})})}loadTaskStatuses(){return F(this,null,function*(){let{statusSettings:e}=oe();et.applyToStatusRegistry(e,Be.getInstance())})}onunload(){var e;cy("info",N.t("main.unloadingPlugin",{name:this.manifest.name,version:this.manifest.version})),(e=this.cache)==null||e.unload()}loadSettings(){return F(this,null,function*(){let e=yield this.loadData();at(e),e=oe(),Fe.getInstance().set(e.globalFilter),Fe.getInstance().setRemoveGlobalFilter(e.removeGlobalFilter),fr.getInstance().set(e.globalQuery),yield this.loadTaskStatuses()})}saveSettings(){return F(this,null,function*(){yield this.saveData(oe())})}getTasks(){return this.cache===void 0?[]:this.cache.getTasks()}setObsidianPropertiesTypes(){var e;try{let r=this.app.metadataTypeManager,i=r.getAllProperties(),s=new Oi;for(let a of s.allPropertyNamesSorted()){let o=s.propertyType(a);((e=i[a])==null?void 0:e.type)!==o&&r.setType(a,o)}}catch(r){console.error("setObsidianPropertiesTypes error",r)}}}; /*! * EventEmitter2 * https://github.com/hij1nx/EventEmitter2 diff --git a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json index 69ac35a..b79c602 100644 --- a/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +++ b/.obsidian/plugins/obsidian-tasks-plugin/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-tasks-plugin", "name": "Tasks", - "version": "7.19.0", + "version": "7.19.1", "minAppVersion": "1.4.0", "description": "Track tasks across your vault. Supports due dates, recurring tasks, done dates, sub-set of checklist items, and filtering.", "helpUrl": "https://publish.obsidian.md/tasks/", diff --git a/.obsidian/plugins/obsidian-tracker/main.js b/.obsidian/plugins/obsidian-tracker/main.js index d94e76e..9dd945d 100644 --- a/.obsidian/plugins/obsidian-tracker/main.js +++ b/.obsidian/plugins/obsidian-tracker/main.js @@ -1,4 +1,4 @@ -"use strict";var t=require("obsidian");function e(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function n(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function r(t){let r,a,l;function o(t,e,n=0,i=t.length){if(n<i){if(0!==r(e,e))return i;do{const r=n+i>>>1;a(t[r],e)<0?n=r+1:i=r}while(n<i)}return n}return 2!==t.length?(r=e,a=(n,r)=>e(t(n),r),l=(e,n)=>t(e)-n):(r=t===e||t===n?t:i,a=t,l=t),{left:o,center:function(t,e,n=0,r=t.length){const i=o(t,e,n,r-1);return i>n&&l(t[i-1],e)>-l(t[i],e)?i-1:i},right:function(t,e,n=0,i=t.length){if(n<i){if(0!==r(e,e))return i;do{const r=n+i>>>1;a(t[r],e)<=0?n=r+1:i=r}while(n<i)}return n}}}function i(){return 0}const a=r(e).right;r((function(t){return null===t?NaN:+t})).center;class l extends Map{constructor(t,e=s){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(o(this,t))}has(t){return super.has(o(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const r=e(n);t.has(r)&&(n=t.get(r),t.delete(r));return n}(this,t))}}function o({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function s(t){return null!==t&&"object"==typeof t?t.valueOf():t}function u(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}const f=Math.sqrt(50),c=Math.sqrt(10),h=Math.sqrt(2);function d(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),l=a>=f?10:a>=c?5:a>=h?2:1;let o,s,u;return i<0?(u=Math.pow(10,-i)/l,o=Math.round(t*u),s=Math.round(e*u),o/u<t&&++o,s/u>e&&--s,u=-u):(u=Math.pow(10,i)*l,o=Math.round(t/u),s=Math.round(e/u),o*u<t&&++o,s*u>e&&--s),s<o&&.5<=n&&n<2?d(t,e,2*n):[o,s,u]}function g(t,e,n){return d(t=+t,e=+e,n=+n)[2]}function p(t,e,n){n=+n;const r=(e=+e)<(t=+t),i=r?g(e,t,n):g(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function y(t,e){let n;for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);return n}function m(t,e){let n;for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);return n}function v(t,n,r=0,i=1/0,a){if(n=Math.floor(n),r=Math.floor(Math.max(0,r)),i=Math.floor(Math.min(t.length-1,i)),!(r<=n&&n<=i))return t;for(a=void 0===a?u:function(t=e){if(t===e)return u;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}(a);i>r;){if(i-r>600){const e=i-r+1,l=n-r+1,o=Math.log(e),s=.5*Math.exp(2*o/3),u=.5*Math.sqrt(o*s*(e-s)/e)*(l-e/2<0?-1:1);v(t,n,Math.max(r,Math.floor(n-l*s/e+u)),Math.min(i,Math.floor(n+(e-l)*s/e+u)),a)}const e=t[n];let l=r,o=i;for(x(t,r,n),a(t[i],e)>0&&x(t,r,i);l<o;){for(x(t,l,o),++l,--o;a(t[l],e)<0;)++l;for(;a(t[o],e)>0;)--o}0===a(t[r],e)?x(t,r,o):(++o,x(t,o,i)),o<=n&&(r=o+1),n<=o&&(i=o-1)}return t}function x(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function A(t,e){return function(t,e){if((n=(t=Float64Array.from(function*(t){for(let e of t)null!=e&&(e=+e)>=e&&(yield e)}(t))).length)&&!isNaN(e=+e)){if(e<=0||n<2)return m(t);if(e>=1)return y(t);var n,r=(n-1)*e,i=Math.floor(r),a=y(v(t,i).subarray(0,i+1));return a+(m(t.subarray(i+1))-a)*(r-i)}}(t,.5)}function w(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function b(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function D(t){return t}var k=1e-6;function C(t){return"translate("+t+",0)"}function M(t){return"translate(0,"+t+")"}function T(t){return e=>+t(e)}function _(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function E(){return!this.__axis}function F(t,e){var n=[],r=null,i=null,a=6,l=6,o=3,s="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=1===t||4===t?-1:1,f=4===t||2===t?"x":"y",c=1===t||3===t?C:M;function h(h){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,g=null==i?e.tickFormat?e.tickFormat.apply(e,n):D:i,p=Math.max(a,0)+o,y=e.range(),m=+y[0]+s,v=+y[y.length-1]+s,x=(e.bandwidth?_:T)(e.copy(),s),A=h.selection?h.selection():h,w=A.selectAll(".domain").data([null]),b=A.selectAll(".tick").data(d,e).order(),C=b.exit(),M=b.enter().append("g").attr("class","tick"),F=b.select("line"),S=b.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(M),F=F.merge(M.append("line").attr("stroke","currentColor").attr(f+"2",u*a)),S=S.merge(M.append("text").attr("fill","currentColor").attr(f,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==A&&(w=w.transition(h),b=b.transition(h),F=F.transition(h),S=S.transition(h),C=C.transition(h).attr("opacity",k).attr("transform",(function(t){return isFinite(t=x(t))?c(t+s):this.getAttribute("transform")})),M.attr("opacity",k).attr("transform",(function(t){var e=this.parentNode.__axis;return c((e&&isFinite(e=e(t))?e:x(t))+s)}))),C.remove(),w.attr("d",4===t||2===t?l?"M"+u*l+","+m+"H"+s+"V"+v+"H"+u*l:"M"+s+","+m+"V"+v:l?"M"+m+","+u*l+"V"+s+"H"+v+"V"+u*l:"M"+m+","+s+"H"+v),b.attr("opacity",1).attr("transform",(function(t){return c(x(t)+s)})),F.attr(f+"2",u*a),S.attr(f,u*p).text(g),A.filter(E).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),A.each((function(){this.__axis=x}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=l=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(l=+t,h):l},h.tickPadding=function(t){return arguments.length?(o=+t,h):o},h.offset=function(t){return arguments.length?(s=+t,h):s},h}function S(t){return F(3,t)}function B(t){return F(4,t)}var N={value:()=>{}};function L(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new I(r)}function I(t){this._=t}function O(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function V(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=N,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}I.prototype=L.prototype={constructor:I,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),l=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++l<o;)if(n=(t=a[l]).type)i[n]=V(i[n],t.name,e);else if(null==e)for(n in i)i[n]=V(i[n],t.name,null);return this}for(;++l<o;)if((n=(t=a[l]).type)&&(n=O(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new I(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var P="http://www.w3.org/1999/xhtml",$={svg:"http://www.w3.org/2000/svg",xhtml:P,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Y(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),$.hasOwnProperty(e)?{space:$[e],local:t}:t}function R(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===P&&e.documentElement.namespaceURI===P?e.createElement(t):e.createElementNS(n,t)}}function z(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function U(t){var e=Y(t);return(e.local?z:R)(e)}function H(){}function X(t){return null==t?H:function(){return this.querySelector(t)}}function W(){return[]}function j(t){return null==t?W:function(){return this.querySelectorAll(t)}}function q(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function G(t){return function(){return this.matches(t)}}function Q(t){return function(e){return e.matches(t)}}var Z=Array.prototype.find;function K(){return this.firstElementChild}var J=Array.prototype.filter;function tt(){return Array.from(this.children)}function et(t){return new Array(t.length)}function nt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function rt(t,e,n,r,i,a){for(var l,o=0,s=e.length,u=a.length;o<u;++o)(l=e[o])?(l.__data__=a[o],r[o]=l):n[o]=new nt(t,a[o]);for(;o<s;++o)(l=e[o])&&(i[o]=l)}function it(t,e,n,r,i,a,l){var o,s,u,f=new Map,c=e.length,h=a.length,d=new Array(c);for(o=0;o<c;++o)(s=e[o])&&(d[o]=u=l.call(s,s.__data__,o,e)+"",f.has(u)?i[o]=s:f.set(u,s));for(o=0;o<h;++o)u=l.call(t,a[o],o,a)+"",(s=f.get(u))?(r[o]=s,s.__data__=a[o],f.delete(u)):n[o]=new nt(t,a[o]);for(o=0;o<c;++o)(s=e[o])&&f.get(d[o])===s&&(i[o]=s)}function at(t){return t.__data__}function lt(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function ot(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function st(t){return function(){this.removeAttribute(t)}}function ut(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ft(t,e){return function(){this.setAttribute(t,e)}}function ct(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ht(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function dt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function gt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function pt(t){return function(){this.style.removeProperty(t)}}function yt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function mt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function vt(t,e){return t.style.getPropertyValue(e)||gt(t).getComputedStyle(t,null).getPropertyValue(e)}function xt(t){return function(){delete this[t]}}function At(t,e){return function(){this[t]=e}}function wt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function bt(t){return t.trim().split(/^|\s+/)}function Dt(t){return t.classList||new kt(t)}function kt(t){this._node=t,this._names=bt(t.getAttribute("class")||"")}function Ct(t,e){for(var n=Dt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Mt(t,e){for(var n=Dt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Tt(t){return function(){Ct(this,t)}}function _t(t){return function(){Mt(this,t)}}function Et(t,e){return function(){(e.apply(this,arguments)?Ct:Mt)(this,t)}}function Ft(){this.textContent=""}function St(t){return function(){this.textContent=t}}function Bt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Nt(){this.innerHTML=""}function Lt(t){return function(){this.innerHTML=t}}function It(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Ot(){this.nextSibling&&this.parentNode.appendChild(this)}function Vt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Pt(){return null}function $t(){var t=this.parentNode;t&&t.removeChild(this)}function Yt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Rt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function zt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Ut(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var l=0,o=i.length;l<o;++l)if((r=i[l]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function Ht(t,e,n){var r=gt(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Xt(t,e){return function(){return Ht(this,t,e)}}function Wt(t,e){return function(){return Ht(this,t,e.apply(this,arguments))}}nt.prototype={constructor:nt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},kt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var jt=[null];function qt(t,e){this._groups=t,this._parents=e}function Gt(){return new qt([[document.documentElement]],jt)}function Qt(t){return"string"==typeof t?new qt([[document.querySelector(t)]],[document.documentElement]):new qt([[t]],jt)}function Zt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Kt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Jt(){}qt.prototype=Gt.prototype={constructor:qt,select:function(t){"function"!=typeof t&&(t=X(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,l,o=e[i],s=o.length,u=r[i]=new Array(s),f=0;f<s;++f)(a=o[f])&&(l=t.call(a,a.__data__,f,o))&&("__data__"in a&&(l.__data__=a.__data__),u[f]=l);return new qt(r,this._parents)},selectAll:function(t){t="function"==typeof t?q(t):j(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var l,o=e[a],s=o.length,u=0;u<s;++u)(l=o[u])&&(r.push(t.call(l,l.__data__,u,o)),i.push(l));return new qt(r,i)},selectChild:function(t){return this.select(null==t?K:function(t){return function(){return Z.call(this.children,t)}}("function"==typeof t?t:Q(t)))},selectChildren:function(t){return this.selectAll(null==t?tt:function(t){return function(){return J.call(this.children,t)}}("function"==typeof t?t:Q(t)))},filter:function(t){"function"!=typeof t&&(t=G(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,l=e[i],o=l.length,s=r[i]=[],u=0;u<o;++u)(a=l[u])&&t.call(a,a.__data__,u,l)&&s.push(a);return new qt(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,at);var n=e?it:rt,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=i.length,l=new Array(a),o=new Array(a),s=new Array(a),u=0;u<a;++u){var f=r[u],c=i[u],h=c.length,d=lt(t.call(f,f&&f.__data__,u,r)),g=d.length,p=o[u]=new Array(g),y=l[u]=new Array(g);n(f,c,p,y,s[u]=new Array(h),d,e);for(var m,v,x=0,A=0;x<g;++x)if(m=p[x]){for(x>=A&&(A=x+1);!(v=y[A])&&++A<g;);m._next=v||null}}return(l=new qt(l,r))._enter=o,l._exit=s,l},enter:function(){return new qt(this._enter||this._groups.map(et),this._parents)},exit:function(){return new qt(this._exit||this._groups.map(et),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,l=Math.min(i,a),o=new Array(i),s=0;s<l;++s)for(var u,f=n[s],c=r[s],h=f.length,d=o[s]=new Array(h),g=0;g<h;++g)(u=f[g]||c[g])&&(d[g]=u);for(;s<i;++s)o[s]=n[s];return new qt(o,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,l=i[a];--a>=0;)(r=i[a])&&(l&&4^r.compareDocumentPosition(l)&&l.parentNode.insertBefore(r,l),l=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ot);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var l,o=n[a],s=o.length,u=i[a]=new Array(s),f=0;f<s;++f)(l=o[f])&&(u[f]=l);u.sort(e)}return new qt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var l=r[i];if(l)return l}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],l=0,o=a.length;l<o;++l)(i=a[l])&&t.call(i,i.__data__,l,a);return this},attr:function(t,e){var n=Y(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?ut:st:"function"==typeof e?n.local?dt:ht:n.local?ct:ft)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?pt:"function"==typeof e?mt:yt)(t,e,null==n?"":n)):vt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?xt:"function"==typeof e?wt:At)(t,e)):this.node()[t]},classed:function(t,e){var n=bt(t+"");if(arguments.length<2){for(var r=Dt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Et:e?Tt:_t)(n,e))},text:function(t){return arguments.length?this.each(null==t?Ft:("function"==typeof t?Bt:St)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Nt:("function"==typeof t?It:Lt)(t)):this.node().innerHTML},raise:function(){return this.each(Ot)},lower:function(){return this.each(Vt)},append:function(t){var e="function"==typeof t?t:U(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:U(t),r=null==e?Pt:"function"==typeof e?e:X(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each($t)},clone:function(t){return this.select(t?Rt:Yt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),l=a.length;if(!(arguments.length<2)){for(o=e?Ut:zt,r=0;r<l;++r)this.each(o(a[r],e,n));return this}var o=this.node().__on;if(o)for(var s,u=0,f=o.length;u<f;++u)for(r=0,s=o[u];r<l;++r)if((i=a[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,e){return this.each(("function"==typeof e?Wt:Xt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,l=i.length;a<l;++a)(r=i[a])&&(yield r)}};var te=.7,ee=1/te,ne="\\s*([+-]?\\d+)\\s*",re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ae=/^#([0-9a-f]{3,8})$/,le=new RegExp(`^rgb\\(${ne},${ne},${ne}\\)$`),oe=new RegExp(`^rgb\\(${ie},${ie},${ie}\\)$`),se=new RegExp(`^rgba\\(${ne},${ne},${ne},${re}\\)$`),ue=new RegExp(`^rgba\\(${ie},${ie},${ie},${re}\\)$`),fe=new RegExp(`^hsl\\(${re},${ie},${ie}\\)$`),ce=new RegExp(`^hsla\\(${re},${ie},${ie},${re}\\)$`),he={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function de(){return this.rgb().formatHex()}function ge(){return this.rgb().formatRgb()}function pe(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ae.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ye(e):3===n?new Ae(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?me(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?me(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=le.exec(t))?new Ae(e[1],e[2],e[3],1):(e=oe.exec(t))?new Ae(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=se.exec(t))?me(e[1],e[2],e[3],e[4]):(e=ue.exec(t))?me(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=fe.exec(t))?Me(e[1],e[2]/100,e[3]/100,1):(e=ce.exec(t))?Me(e[1],e[2]/100,e[3]/100,e[4]):he.hasOwnProperty(t)?ye(he[t]):"transparent"===t?new Ae(NaN,NaN,NaN,0):null}function ye(t){return new Ae(t>>16&255,t>>8&255,255&t,1)}function me(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ae(t,e,n,r)}function ve(t){return t instanceof Jt||(t=pe(t)),t?new Ae((t=t.rgb()).r,t.g,t.b,t.opacity):new Ae}function xe(t,e,n,r){return 1===arguments.length?ve(t):new Ae(t,e,n,null==r?1:r)}function Ae(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function we(){return`#${Ce(this.r)}${Ce(this.g)}${Ce(this.b)}`}function be(){const t=De(this.opacity);return`${1===t?"rgb(":"rgba("}${ke(this.r)}, ${ke(this.g)}, ${ke(this.b)}${1===t?")":`, ${t})`}`}function De(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ke(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ce(t){return((t=ke(t))<16?"0":"")+t.toString(16)}function Me(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new _e(t,e,n,r)}function Te(t){if(t instanceof _e)return new _e(t.h,t.s,t.l,t.opacity);if(t instanceof Jt||(t=pe(t)),!t)return new _e;if(t instanceof _e)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),l=NaN,o=a-i,s=(a+i)/2;return o?(l=e===a?(n-r)/o+6*(n<r):n===a?(r-e)/o+2:(e-n)/o+4,o/=s<.5?a+i:2-a-i,l*=60):o=s>0&&s<1?0:l,new _e(l,o,s,t.opacity)}function _e(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ee(t){return(t=(t||0)%360)<0?t+360:t}function Fe(t){return Math.max(0,Math.min(1,t||0))}function Se(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Zt(Jt,pe,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:de,formatHex:de,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Te(this).formatHsl()},formatRgb:ge,toString:ge}),Zt(Ae,xe,Kt(Jt,{brighter(t){return t=null==t?ee:Math.pow(ee,t),new Ae(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?te:Math.pow(te,t),new Ae(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ae(ke(this.r),ke(this.g),ke(this.b),De(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:we,formatHex:we,formatHex8:function(){return`#${Ce(this.r)}${Ce(this.g)}${Ce(this.b)}${Ce(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:be,toString:be})),Zt(_e,(function(t,e,n,r){return 1===arguments.length?Te(t):new _e(t,e,n,null==r?1:r)}),Kt(Jt,{brighter(t){return t=null==t?ee:Math.pow(ee,t),new _e(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?te:Math.pow(te,t),new _e(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ae(Se(t>=240?t-240:t+120,i,r),Se(t,i,r),Se(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new _e(Ee(this.h),Fe(this.s),Fe(this.l),De(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=De(this.opacity);return`${1===t?"hsl(":"hsla("}${Ee(this.h)}, ${100*Fe(this.s)}%, ${100*Fe(this.l)}%${1===t?")":`, ${t})`}`}}));const Be=Math.PI/180,Ne=180/Math.PI,Le=.96422,Ie=.82521,Oe=4/29,Ve=6/29,Pe=3*Ve*Ve,$e=Ve*Ve*Ve;function Ye(t){if(t instanceof ze)return new ze(t.l,t.a,t.b,t.opacity);if(t instanceof je)return qe(t);t instanceof Ae||(t=ve(t));var e,n,r=We(t.r),i=We(t.g),a=We(t.b),l=Ue((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=l:(e=Ue((.4360747*r+.3850649*i+.1430804*a)/Le),n=Ue((.0139322*r+.0971045*i+.7141733*a)/Ie)),new ze(116*l-16,500*(e-l),200*(l-n),t.opacity)}function Re(t,e,n,r){return 1===arguments.length?Ye(t):new ze(t,e,n,null==r?1:r)}function ze(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Ue(t){return t>$e?Math.pow(t,1/3):t/Pe+Oe}function He(t){return t>Ve?t*t*t:Pe*(t-Oe)}function Xe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function We(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function je(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function qe(t){if(isNaN(t.h))return new ze(t.l,0,0,t.opacity);var e=t.h*Be;return new ze(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Zt(ze,Re,Kt(Jt,{brighter(t){return new ze(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new ze(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ae(Xe(3.1338561*(e=Le*He(e))-1.6168667*(t=1*He(t))-.4906146*(n=Ie*He(n))),Xe(-.9787684*e+1.9161415*t+.033454*n),Xe(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Zt(je,(function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof je)return new je(t.h,t.c,t.l,t.opacity);if(t instanceof ze||(t=Ye(t)),0===t.a&&0===t.b)return new je(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Ne;return new je(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new je(t,e,n,null==r?1:r)}),Kt(Jt,{brighter(t){return new je(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new je(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return qe(this).rgb()}}));var Ge=t=>()=>t;function Qe(t){return 1==(t=+t)?Ze:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ge(isNaN(e)?n:e)}}function Ze(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ge(isNaN(t)?e:t)}var Ke=function t(e){var n=Qe(e);function r(t,e){var r=n((t=xe(t)).r,(e=xe(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),l=Ze(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=l(e),t+""}}return r.gamma=t,r}(1);var Je,tn=(Je=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],l=r>0?t[r-1]:2*i-a,o=r<e-1?t[r+2]:2*a-i;return function(t,e,n,r,i){var a=t*t,l=a*t;return((1-3*t+3*a-l)*e+(4-6*a+3*l)*n+(1+3*t+3*a-3*l)*r+l*i)/6}((n-r/e)*e,l,i,a,o)}},function(t){var e,n,r=t.length,i=new Array(r),a=new Array(r),l=new Array(r);for(e=0;e<r;++e)n=xe(t[e]),i[e]=n.r||0,a[e]=n.g||0,l[e]=n.b||0;return i=Je(i),a=Je(a),l=Je(l),n.opacity=1,function(t){return n.r=i(t),n.g=a(t),n.b=l(t),n+""}});function en(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function nn(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),l=new Array(r);for(n=0;n<i;++n)a[n]=fn(t[n],e[n]);for(;n<r;++n)l[n]=e[n];return function(t){for(n=0;n<i;++n)l[n]=a[n](t);return l}}function rn(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function an(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function ln(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=fn(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var on=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sn=new RegExp(on.source,"g");function un(t,e){var n,r,i,a=on.lastIndex=sn.lastIndex=0,l=-1,o=[],s=[];for(t+="",e+="";(n=on.exec(t))&&(r=sn.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),o[l]?o[l]+=i:o[++l]=i),(n=n[0])===(r=r[0])?o[l]?o[l]+=r:o[++l]=r:(o[++l]=null,s.push({i:l,x:an(n,r)})),a=sn.lastIndex;return a<e.length&&(i=e.slice(a),o[l]?o[l]+=i:o[++l]=i),o.length<2?s[0]?function(t){return function(e){return t(e)+""}}(s[0].x):function(t){return function(){return t}}(e):(e=s.length,function(t){for(var n,r=0;r<e;++r)o[(n=s[r]).i]=n.x(t);return o.join("")})}function fn(t,e){var n,r=typeof e;return null==e||"boolean"===r?Ge(e):("number"===r?an:"string"===r?(n=pe(e))?(e=n,Ke):un:e instanceof pe?Ke:e instanceof Date?rn:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?en:Array.isArray(e)?nn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?ln:an)(t,e)}function cn(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var hn,dn=180/Math.PI,gn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function pn(t,e,n,r,i,a){var l,o,s;return(l=Math.sqrt(t*t+e*e))&&(t/=l,e/=l),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,s/=o),t*r<e*n&&(t=-t,e=-e,s=-s,l=-l),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*dn,skewX:Math.atan(s)*dn,scaleX:l,scaleY:o}}function yn(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,l){var o=[],s=[];return a=t(a),l=t(l),function(t,r,i,a,l,o){if(t!==i||r!==a){var s=l.push("translate(",null,e,null,n);o.push({i:s-4,x:an(t,i)},{i:s-2,x:an(r,a)})}else(i||a)&&l.push("translate("+i+e+a+n)}(a.translateX,a.translateY,l.translateX,l.translateY,o,s),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:an(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,l.rotate,o,s),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:an(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,l.skewX,o,s),function(t,e,n,r,a,l){if(t!==n||e!==r){var o=a.push(i(a)+"scale(",null,",",null,")");l.push({i:o-4,x:an(t,n)},{i:o-2,x:an(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,l.scaleX,l.scaleY,o,s),a=l=null,function(t){for(var e,n=-1,r=s.length;++n<r;)o[(e=s[n]).i]=e.x(t);return o.join("")}}}var mn=yn((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?gn:pn(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),vn=yn((function(t){return null==t?gn:(hn||(hn=document.createElementNS("http://www.w3.org/2000/svg","g")),hn.setAttribute("transform",t),(t=hn.transform.baseVal.consolidate())?pn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):gn)}),", ",")",")");function xn(t,e){var n=Ze((t=Re(t)).l,(e=Re(e)).l),r=Ze(t.a,e.a),i=Ze(t.b,e.b),a=Ze(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}var An,wn,bn=0,Dn=0,kn=0,Cn=0,Mn=0,Tn=0,_n="object"==typeof performance&&performance.now?performance:Date,En="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Fn(){return Mn||(En(Sn),Mn=_n.now()+Tn)}function Sn(){Mn=0}function Bn(){this._call=this._time=this._next=null}function Nn(t,e,n){var r=new Bn;return r.restart(t,e,n),r}function Ln(){Mn=(Cn=_n.now())+Tn,bn=Dn=0;try{!function(){Fn(),++bn;for(var t,e=An;e;)(t=Mn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--bn}()}finally{bn=0,function(){var t,e,n=An,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:An=e);wn=t,On(r)}(),Mn=0}}function In(){var t=_n.now(),e=t-Cn;e>1e3&&(Tn-=e,Cn=t)}function On(t){bn||(Dn&&(Dn=clearTimeout(Dn)),t-Mn>24?(t<1/0&&(Dn=setTimeout(Ln,t-_n.now()-Tn)),kn&&(kn=clearInterval(kn))):(kn||(Cn=_n.now(),kn=setInterval(In,1e3)),bn=1,En(Ln)))}function Vn(t,e,n){var r=new Bn;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Bn.prototype=Nn.prototype={constructor:Bn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Fn():+n)+(null==e?0:+e),this._next||wn===this||(wn?wn._next=this:An=this,wn=this),this._call=t,this._time=n,On()},stop:function(){this._call&&(this._call=null,this._time=1/0,On())}};var Pn=L("start","end","cancel","interrupt"),$n=[];function Yn(t,e,n,r,i,a){var l=t.__transition;if(l){if(n in l)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=1,n.timer.restart(l,n.delay,n.time),n.delay<=t&&l(t-n.delay)}function l(a){var u,f,c,h;if(1!==n.state)return s();for(u in i)if((h=i[u]).name===n.name){if(3===h.state)return Vn(l);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[u]):+u<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[u])}if(Vn((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(a))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(c=n.tween.length),u=0,f=-1;u<c;++u)(h=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++f]=h);r.length=f+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,l=r.length;++a<l;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Nn(a,0,n.time)}(t,n,{name:e,index:r,group:i,on:Pn,tween:$n,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Rn(t,e){var n=Un(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function zn(t,e){var n=Un(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Un(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Hn(t,e){var n,r;return function(){var i=zn(this,t),a=i.tween;if(a!==n)for(var l=0,o=(r=n=a).length;l<o;++l)if(r[l].name===e){(r=r.slice()).splice(l,1);break}i.tween=r}}function Xn(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=zn(this,t),l=a.tween;if(l!==r){i=(r=l).slice();for(var o={name:e,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===e){i[s]=o;break}s===u&&i.push(o)}a.tween=i}}function Wn(t,e,n){var r=t._id;return t.each((function(){var t=zn(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Un(t,r).value[e]}}function jn(t,e){var n;return("number"==typeof e?an:e instanceof pe?Ke:(n=pe(e))?(e=n,Ke):un)(t,e)}function qn(t){return function(){this.removeAttribute(t)}}function Gn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Qn(t,e,n){var r,i,a=n+"";return function(){var l=this.getAttribute(t);return l===a?null:l===r?i:i=e(r=l,n)}}function Zn(t,e,n){var r,i,a=n+"";return function(){var l=this.getAttributeNS(t.space,t.local);return l===a?null:l===r?i:i=e(r=l,n)}}function Kn(t,e,n){var r,i,a;return function(){var l,o,s=n(this);if(null!=s)return(l=this.getAttribute(t))===(o=s+"")?null:l===r&&o===i?a:(i=o,a=e(r=l,s));this.removeAttribute(t)}}function Jn(t,e,n){var r,i,a;return function(){var l,o,s=n(this);if(null!=s)return(l=this.getAttributeNS(t.space,t.local))===(o=s+"")?null:l===r&&o===i?a:(i=o,a=e(r=l,s));this.removeAttributeNS(t.space,t.local)}}function tr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}function er(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i}function nr(t,e){return function(){Rn(this,t).delay=+e.apply(this,arguments)}}function rr(t,e){return e=+e,function(){Rn(this,t).delay=e}}function ir(t,e){return function(){zn(this,t).duration=+e.apply(this,arguments)}}function ar(t,e){return e=+e,function(){zn(this,t).duration=e}}var lr=Gt.prototype.constructor;function or(t){return function(){this.style.removeProperty(t)}}var sr=0;function ur(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function fr(){return++sr}var cr=Gt.prototype;ur.prototype={constructor:ur,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=X(t));for(var r=this._groups,i=r.length,a=new Array(i),l=0;l<i;++l)for(var o,s,u=r[l],f=u.length,c=a[l]=new Array(f),h=0;h<f;++h)(o=u[h])&&(s=t.call(o,o.__data__,h,u))&&("__data__"in o&&(s.__data__=o.__data__),c[h]=s,Yn(c[h],e,n,h,c,Un(o,n)));return new ur(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=j(t));for(var r=this._groups,i=r.length,a=[],l=[],o=0;o<i;++o)for(var s,u=r[o],f=u.length,c=0;c<f;++c)if(s=u[c]){for(var h,d=t.call(s,s.__data__,c,u),g=Un(s,n),p=0,y=d.length;p<y;++p)(h=d[p])&&Yn(h,e,n,p,d,g);a.push(d),l.push(s)}return new ur(a,l,e,n)},selectChild:cr.selectChild,selectChildren:cr.selectChildren,filter:function(t){"function"!=typeof t&&(t=G(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,l=e[i],o=l.length,s=r[i]=[],u=0;u<o;++u)(a=l[u])&&t.call(a,a.__data__,u,l)&&s.push(a);return new ur(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),l=new Array(r),o=0;o<a;++o)for(var s,u=e[o],f=n[o],c=u.length,h=l[o]=new Array(c),d=0;d<c;++d)(s=u[d]||f[d])&&(h[d]=s);for(;o<r;++o)l[o]=e[o];return new ur(l,this._parents,this._name,this._id)},selection:function(){return new lr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=fr(),r=this._groups,i=r.length,a=0;a<i;++a)for(var l,o=r[a],s=o.length,u=0;u<s;++u)if(l=o[u]){var f=Un(l,e);Yn(l,t,n,u,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new ur(r,this._parents,t,n)},call:cr.call,nodes:cr.nodes,node:cr.node,size:cr.size,empty:cr.empty,each:cr.each,on:function(t,e){var n=this._id;return arguments.length<2?Un(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Rn:zn;return function(){var l=a(this,t),o=l.on;o!==r&&(i=(r=o).copy()).on(e,n),l.on=i}}(n,t,e))},attr:function(t,e){var n=Y(t),r="transform"===n?vn:jn;return this.attrTween(t,"function"==typeof e?(n.local?Jn:Kn)(n,r,Wn(this,"attr."+t,e)):null==e?(n.local?Gn:qn)(n):(n.local?Zn:Qn)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Y(t);return this.tween(n,(r.local?tr:er)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?mn:jn;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=vt(this,t),l=(this.style.removeProperty(t),vt(this,t));return a===l?null:a===n&&l===r?i:i=e(n=a,r=l)}}(t,r)).on("end.style."+t,or(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var l=vt(this,t),o=n(this),s=o+"";return null==o&&(this.style.removeProperty(t),s=o=vt(this,t)),l===s?null:l===r&&s===i?a:(i=s,a=e(r=l,o))}}(t,r,Wn(this,"style."+t,e))).each(function(t,e){var n,r,i,a,l="style."+e,o="end."+l;return function(){var s=zn(this,t),u=s.on,f=null==s.value[l]?a||(a=or(e)):void 0;u===n&&i===f||(r=(n=u).copy()).on(o,i=f),s.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var l=vt(this,t);return l===a?null:l===r?i:i=e(r=l,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,a,n)),r}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Wn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=Un(this.node(),n).tween,a=0,l=i.length;a<l;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Hn:Xn)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?nr:rr)(e,t)):Un(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ir:ar)(e,t)):Un(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){zn(this,t).ease=e}}(e,t)):Un(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;zn(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,l){var o={value:l},s={value:function(){0==--i&&a()}};n.each((function(){var n=zn(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(o),e._.interrupt.push(o),e._.end.push(s)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:cr[Symbol.iterator]};var hr={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function dr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Gt.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,l=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):l=!1;l&&delete t.__transition}}(this,t)}))},Gt.prototype.transition=function(t){var e,n;t instanceof ur?(e=t._id,t=t._name):(e=fr(),(n=hr).time=Fn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var l,o=r[a],s=o.length,u=0;u<s;++u)(l=o[u])&&Yn(l,t,e,u,o,n||dr(l,e));return new ur(r,this._parents,t,e)};const gr=Math.PI,pr=2*gr,yr=1e-6,mr=pr-yr;function vr(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class xr{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?vr:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return vr;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,a){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let a=this._x1,l=this._y1,o=n-t,s=r-e,u=a-t,f=l-e,c=u*u+f*f;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(c>yr)if(Math.abs(f*o-s*u)>yr&&i){let h=n-a,d=r-l,g=o*o+s*s,p=h*h+d*d,y=Math.sqrt(g),m=Math.sqrt(c),v=i*Math.tan((gr-Math.acos((g+c-p)/(2*y*m)))/2),x=v/m,A=v/y;Math.abs(x-1)>yr&&this._append`L${t+x*u},${e+x*f}`,this._append`A${i},${i},0,0,${+(f*h>u*d)},${this._x1=t+A*o},${this._y1=e+A*s}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(r),o=n*Math.sin(r),s=t+l,u=e+o,f=1^a,c=a?r-i:i-r;null===this._x1?this._append`M${s},${u}`:(Math.abs(this._x1-s)>yr||Math.abs(this._y1-u)>yr)&&this._append`L${s},${u}`,n&&(c<0&&(c=c%pr+pr),c>mr?this._append`A${n},${n},0,1,${f},${t-l},${e-o}A${n},${n},0,1,${f},${this._x1=s},${this._y1=u}`:c>yr&&this._append`A${n},${n},0,${+(c>=gr)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Ar(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function wr(t){return(t=Ar(Math.abs(t)))?t[1]:NaN}var br,Dr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function kr(t){if(!(e=Dr.exec(t)))throw new Error("invalid format: "+t);var e;return new Cr({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Cr(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Mr(t,e){var n=Ar(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}kr.prototype=Cr.prototype,Cr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Tr={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Mr(100*t,e),r:Mr,s:function(t,e){var n=Ar(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(br=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,l=r.length;return a===l?r:a>l?r+new Array(a-l+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Ar(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function _r(t){return t}var Er,Fr,Sr,Br=Array.prototype.map,Nr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Lr(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?_r:(e=Br.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],l=0,o=e[0],s=0;i>0&&o>0&&(s+o+1>r&&(o=Math.max(1,r-s)),a.push(t.substring(i-=o,i+o)),!((s+=o+1)>r));)o=e[l=(l+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",l=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?_r:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Br.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";function c(t){var e=(t=kr(t)).fill,n=t.align,c=t.sign,h=t.symbol,d=t.zero,g=t.width,p=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(p=!0,v="g"):Tr[v]||(void 0===y&&(y=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var x="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",A="$"===h?a:/[%p]/.test(v)?s:"",w=Tr[v],b=/[defgprs%]/.test(v);function D(t){var i,a,s,h=x,D=A;if("c"===v)D=w(t)+D,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?f:w(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),k&&0==+t&&"+"!==c&&(k=!1),h=(k?"("===c?c:u:"-"===c||"("===c?"":c)+h,D=("s"===v?Nr[8+br/3]:"")+D+(k&&"("===c?")":""),b)for(i=-1,a=t.length;++i<a;)if(48>(s=t.charCodeAt(i))||s>57){D=(46===s?l+t.slice(i+1):t.slice(i))+D,t=t.slice(0,i);break}}p&&!d&&(t=r(t,1/0));var C=h.length+t.length+D.length,M=C<g?new Array(g-C+1).join(e):"";switch(p&&d&&(t=r(M+t,M.length?g-D.length:1/0),M=""),n){case"<":t=h+t+D+M;break;case"=":t=h+M+t+D;break;case"^":t=M.slice(0,C=M.length>>1)+h+t+D+M.slice(C);break;default:t=M+h+t+D}return o(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),D.toString=function(){return t+""},D}return{format:c,formatPrefix:function(t,e){var n=c(((t=kr(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(wr(e)/3))),i=Math.pow(10,-r),a=Nr[8+r/3];return function(t){return n(i*t)+a}}}}function Ir(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}Er=Lr({thousands:",",grouping:[3],currency:["$",""]}),Fr=Er.format,Sr=Er.formatPrefix;const Or=Symbol("implicit");function Vr(){var t=new l,e=[],n=[],r=Or;function i(i){let a=t.get(i);if(void 0===a){if(r!==Or)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new l;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Vr(e,n).unknown(r)},Ir.apply(i,arguments),i}function Pr(t){return+t}var $r=[0,1];function Yr(t){return t}function Rr(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function zr(t,e,n){var r=t[0],i=t[1],a=e[0],l=e[1];return i<r?(r=Rr(i,r),a=n(l,a)):(r=Rr(r,i),a=n(a,l)),function(t){return a(r(t))}}function Ur(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),l=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Rr(t[o],t[o+1]),l[o]=n(e[o],e[o+1]);return function(e){var n=a(t,e,1,r)-1;return l[n](i[n](e))}}function Hr(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Xr(){var t,e,n,r,i,a,l=$r,o=$r,s=fn,u=Yr;function f(){var t,e,n,s=Math.min(l.length,o.length);return u!==Yr&&(t=l[0],e=l[s-1],t>e&&(n=t,t=e,e=n),u=function(n){return Math.max(t,Math.min(e,n))}),r=s>2?Ur:zr,i=a=null,c}function c(e){return null==e||isNaN(e=+e)?n:(i||(i=r(l.map(t),o,s)))(t(u(e)))}return c.invert=function(n){return u(e((a||(a=r(o,l.map(t),an)))(n)))},c.domain=function(t){return arguments.length?(l=Array.from(t,Pr),f()):l.slice()},c.range=function(t){return arguments.length?(o=Array.from(t),f()):o.slice()},c.rangeRound=function(t){return o=Array.from(t),s=cn,f()},c.clamp=function(t){return arguments.length?(u=!!t||Yr,f()):u!==Yr},c.interpolate=function(t){return arguments.length?(s=t,f()):s},c.unknown=function(t){return arguments.length?(n=t,c):n},function(n,r){return t=n,e=r,f()}}function Wr(){return Xr()(Yr,Yr)}function jr(t,e,n,r){var i,a=p(t,e,n);switch((r=kr(null==r?",f":r)).type){case"s":var l=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(wr(e)/3)))-wr(Math.abs(t)))}(a,l))||(r.precision=i),Sr(r,l);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,wr(e)-wr(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-wr(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Fr(r)}function qr(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)==(e=+e))return[t];const r=e<t,[i,a,l]=r?d(e,t,n):d(t,e,n);if(!(a>=i))return[];const o=a-i+1,s=new Array(o);if(r)if(l<0)for(let t=0;t<o;++t)s[t]=(a-t)/-l;else for(let t=0;t<o;++t)s[t]=(a-t)*l;else if(l<0)for(let t=0;t<o;++t)s[t]=(i+t)/-l;else for(let t=0;t<o;++t)s[t]=(i+t)*l;return s}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return jr(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,a=e(),l=0,o=a.length-1,s=a[l],u=a[o],f=10;for(u<s&&(i=s,s=u,u=i,i=l,l=o,o=i);f-- >0;){if((i=g(s,u,n))===r)return a[l]=s,a[o]=u,e(a);if(i>0)s=Math.floor(s/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;s=Math.ceil(s*i)/i,u=Math.floor(u*i)/i}r=i}return t},t}function Gr(){var t=Wr();return t.copy=function(){return Hr(t,Gr())},Ir.apply(t,arguments),qr(t)}const Qr=new Date,Zr=new Date;function Kr(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=(t,n)=>(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,a)=>{const l=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return l;let o;do{l.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return l},i.filter=n=>Kr((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})),n&&(i.count=(e,r)=>(Qr.setTime(+e),Zr.setTime(+r),t(Qr),t(Zr),Math.floor(n(Qr,Zr))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t==0:e=>i.count(0,e)%t==0):i:null)),i}const Jr=Kr((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));Jr.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Kr((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):Jr:null),Jr.range;const ti=1e3,ei=6e4,ni=36e5,ri=864e5,ii=6048e5,ai=2592e6,li=31536e6,oi=Kr((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*ti)}),((t,e)=>(e-t)/ti),(t=>t.getUTCSeconds()));oi.range;const si=Kr((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ti)}),((t,e)=>{t.setTime(+t+e*ei)}),((t,e)=>(e-t)/ei),(t=>t.getMinutes()));si.range;const ui=Kr((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*ei)}),((t,e)=>(e-t)/ei),(t=>t.getUTCMinutes()));ui.range;const fi=Kr((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ti-t.getMinutes()*ei)}),((t,e)=>{t.setTime(+t+e*ni)}),((t,e)=>(e-t)/ni),(t=>t.getHours()));fi.range;const ci=Kr((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*ni)}),((t,e)=>(e-t)/ni),(t=>t.getUTCHours()));ci.range;const hi=Kr((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ei)/ri),(t=>t.getDate()-1));hi.range;const di=Kr((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/ri),(t=>t.getUTCDate()-1));di.range;const gi=Kr((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/ri),(t=>Math.floor(t/ri)));function pi(t){return Kr((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ei)/ii))}gi.range;const yi=pi(0),mi=pi(1),vi=pi(2),xi=pi(3),Ai=pi(4),wi=pi(5),bi=pi(6);function Di(t){return Kr((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/ii))}yi.range,mi.range,vi.range,xi.range,Ai.range,wi.range,bi.range;const ki=Di(0),Ci=Di(1),Mi=Di(2),Ti=Di(3),_i=Di(4),Ei=Di(5),Fi=Di(6);ki.range,Ci.range,Mi.range,Ti.range,_i.range,Ei.range,Fi.range;const Si=Kr((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()));Si.range;const Bi=Kr((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));Bi.range;const Ni=Kr((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));Ni.every=t=>isFinite(t=Math.floor(t))&&t>0?Kr((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null,Ni.range;const Li=Kr((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));Li.every=t=>isFinite(t=Math.floor(t))&&t>0?Kr((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null,Li.range;const[Ii,Oi]=function(t,e,n,i,a,l){const o=[[oi,1,ti],[oi,5,5e3],[oi,15,15e3],[oi,30,3e4],[l,1,ei],[l,5,3e5],[l,15,9e5],[l,30,18e5],[a,1,ni],[a,3,108e5],[a,6,216e5],[a,12,432e5],[i,1,ri],[i,2,1728e5],[n,1,ii],[e,1,ai],[e,3,7776e6],[t,1,li]];function s(e,n,i){const a=Math.abs(n-e)/i,l=r((([,,t])=>t)).right(o,a);if(l===o.length)return t.every(p(e/li,n/li,i));if(0===l)return Jr.every(Math.max(p(e,n,i),1));const[s,u]=o[a/o[l-1][2]<o[l][2]/a?l-1:l];return s.every(u)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"==typeof n.range?n:s(t,e,n),a=i?i.range(t,+e+1):[];return r?a.reverse():a},s]}(Ni,Si,yi,hi,fi,si);function Vi(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Pi(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $i(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var Yi,Ri,zi={"-":"",_:" ",0:"0"},Ui=/^\s*\d+/,Hi=/^%/,Xi=/[\\^$*+?|[\]().{}]/g;function Wi(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function ji(t){return t.replace(Xi,"\\$&")}function qi(t){return new RegExp("^(?:"+t.map(ji).join("|")+")","i")}function Gi(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function Qi(t,e,n){var r=Ui.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Zi(t,e,n){var r=Ui.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ki(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Ji(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function ta(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ea(t,e,n){var r=Ui.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function na(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ra(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ia(t,e,n){var r=Ui.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function aa(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function la(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function oa(t,e,n){var r=Ui.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function sa(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ua(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function fa(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function ca(t,e,n){var r=Ui.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ha(t,e,n){var r=Ui.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function da(t,e,n){var r=Hi.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function ga(t,e,n){var r=Ui.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function pa(t,e,n){var r=Ui.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function ya(t,e){return Wi(t.getDate(),e,2)}function ma(t,e){return Wi(t.getHours(),e,2)}function va(t,e){return Wi(t.getHours()%12||12,e,2)}function xa(t,e){return Wi(1+hi.count(Ni(t),t),e,3)}function Aa(t,e){return Wi(t.getMilliseconds(),e,3)}function wa(t,e){return Aa(t,e)+"000"}function ba(t,e){return Wi(t.getMonth()+1,e,2)}function Da(t,e){return Wi(t.getMinutes(),e,2)}function ka(t,e){return Wi(t.getSeconds(),e,2)}function Ca(t){var e=t.getDay();return 0===e?7:e}function Ma(t,e){return Wi(yi.count(Ni(t)-1,t),e,2)}function Ta(t){var e=t.getDay();return e>=4||0===e?Ai(t):Ai.ceil(t)}function _a(t,e){return t=Ta(t),Wi(Ai.count(Ni(t),t)+(4===Ni(t).getDay()),e,2)}function Ea(t){return t.getDay()}function Fa(t,e){return Wi(mi.count(Ni(t)-1,t),e,2)}function Sa(t,e){return Wi(t.getFullYear()%100,e,2)}function Ba(t,e){return Wi((t=Ta(t)).getFullYear()%100,e,2)}function Na(t,e){return Wi(t.getFullYear()%1e4,e,4)}function La(t,e){var n=t.getDay();return Wi((t=n>=4||0===n?Ai(t):Ai.ceil(t)).getFullYear()%1e4,e,4)}function Ia(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Wi(e/60|0,"0",2)+Wi(e%60,"0",2)}function Oa(t,e){return Wi(t.getUTCDate(),e,2)}function Va(t,e){return Wi(t.getUTCHours(),e,2)}function Pa(t,e){return Wi(t.getUTCHours()%12||12,e,2)}function $a(t,e){return Wi(1+di.count(Li(t),t),e,3)}function Ya(t,e){return Wi(t.getUTCMilliseconds(),e,3)}function Ra(t,e){return Ya(t,e)+"000"}function za(t,e){return Wi(t.getUTCMonth()+1,e,2)}function Ua(t,e){return Wi(t.getUTCMinutes(),e,2)}function Ha(t,e){return Wi(t.getUTCSeconds(),e,2)}function Xa(t){var e=t.getUTCDay();return 0===e?7:e}function Wa(t,e){return Wi(ki.count(Li(t)-1,t),e,2)}function ja(t){var e=t.getUTCDay();return e>=4||0===e?_i(t):_i.ceil(t)}function qa(t,e){return t=ja(t),Wi(_i.count(Li(t),t)+(4===Li(t).getUTCDay()),e,2)}function Ga(t){return t.getUTCDay()}function Qa(t,e){return Wi(Ci.count(Li(t)-1,t),e,2)}function Za(t,e){return Wi(t.getUTCFullYear()%100,e,2)}function Ka(t,e){return Wi((t=ja(t)).getUTCFullYear()%100,e,2)}function Ja(t,e){return Wi(t.getUTCFullYear()%1e4,e,4)}function tl(t,e){var n=t.getUTCDay();return Wi((t=n>=4||0===n?_i(t):_i.ceil(t)).getUTCFullYear()%1e4,e,4)}function el(){return"+0000"}function nl(){return"%"}function rl(t){return+t}function il(t){return Math.floor(+t/1e3)}function al(t){return new Date(t)}function ll(t){return t instanceof Date?+t:+new Date(+t)}function ol(t,e,n,r,i,a,l,o,s,u){var f=Wr(),c=f.invert,h=f.domain,d=u(".%L"),g=u(":%S"),p=u("%I:%M"),y=u("%I %p"),m=u("%a %d"),v=u("%b %d"),x=u("%B"),A=u("%Y");function w(t){return(s(t)<t?d:o(t)<t?g:l(t)<t?p:a(t)<t?y:r(t)<t?i(t)<t?m:v:n(t)<t?x:A)(t)}return f.invert=function(t){return new Date(c(t))},f.domain=function(t){return arguments.length?h(Array.from(t,ll)):h().map(al)},f.ticks=function(e){var n=h();return t(n[0],n[n.length-1],null==e?10:e)},f.tickFormat=function(t,e){return null==e?w:u(e)},f.nice=function(t){var n=h();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?h(function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],l=t[i];return l<a&&(n=r,r=i,i=n,n=a,a=l,l=n),t[r]=e.floor(a),t[i]=e.ceil(l),t}(n,t)):f},f.copy=function(){return Hr(f,ol(t,e,n,r,i,a,l,o,s,u))},f}function sl(){return Ir.apply(ol(Ii,Oi,Ni,Si,yi,hi,fi,si,oi,Ri).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}!function(t){Yi=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,l=t.shortDays,o=t.months,s=t.shortMonths,u=qi(i),f=Gi(i),c=qi(a),h=Gi(a),d=qi(l),g=Gi(l),p=qi(o),y=Gi(o),m=qi(s),v=Gi(s),x={a:function(t){return l[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return s[t.getMonth()]},B:function(t){return o[t.getMonth()]},c:null,d:ya,e:ya,f:wa,g:Ba,G:La,H:ma,I:va,j:xa,L:Aa,m:ba,M:Da,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:rl,s:il,S:ka,u:Ca,U:Ma,V:_a,w:Ea,W:Fa,x:null,X:null,y:Sa,Y:Na,Z:Ia,"%":nl},A={a:function(t){return l[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return o[t.getUTCMonth()]},c:null,d:Oa,e:Oa,f:Ra,g:Ka,G:tl,H:Va,I:Pa,j:$a,L:Ya,m:za,M:Ua,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:rl,s:il,S:Ha,u:Xa,U:Wa,V:qa,w:Ga,W:Qa,x:null,X:null,y:Za,Y:Ja,Z:el,"%":nl},w={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return k(t,e,n,r)},d:la,e:la,f:ha,g:na,G:ea,H:sa,I:sa,j:oa,L:ca,m:aa,M:ua,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=f.get(r[0].toLowerCase()),n+r[0].length):-1},q:ia,Q:ga,s:pa,S:fa,u:Zi,U:Ki,V:Ji,w:Qi,W:ta,x:function(t,e,r){return k(t,n,e,r)},X:function(t,e,n){return k(t,r,e,n)},y:na,Y:ea,Z:ra,"%":da};function b(t,e){return function(n){var r,i,a,l=[],o=-1,s=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++o<u;)37===t.charCodeAt(o)&&(l.push(t.slice(s,o)),null!=(i=zi[r=t.charAt(++o)])?r=t.charAt(++o):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),l.push(r),s=o+1);return l.push(t.slice(s,o)),l.join("")}}function D(t,e){return function(n){var r,i,a=$i(1900,void 0,1);if(k(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Pi($i(a.y,0,1))).getUTCDay(),r=i>4||0===i?Ci.ceil(r):Ci(r),r=di.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Vi($i(a.y,0,1))).getDay(),r=i>4||0===i?mi.ceil(r):mi(r),r=hi.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Pi($i(a.y,0,1)).getUTCDay():Vi($i(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Pi(a)):Vi(a)}}function k(t,e,n,r){for(var i,a,l=0,o=e.length,s=n.length;l<o;){if(r>=s)return-1;if(37===(i=e.charCodeAt(l++))){if(i=e.charAt(l++),!(a=w[i in zi?e.charAt(l++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return x.x=b(n,x),x.X=b(r,x),x.c=b(e,x),A.x=b(n,A),A.X=b(r,A),A.c=b(e,A),{format:function(t){var e=b(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=D(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=b(t+="",A);return e.toString=function(){return t},e},utcParse:function(t){var e=D(t+="",!0);return e.toString=function(){return t},e}}}(t),Ri=Yi.format,Yi.parse,Yi.utcFormat,Yi.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var ul=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map((function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}));function fl(t){return function(){return t}}(t=>{tn(t[t.length-1])})(ul);const cl=Math.abs,hl=Math.atan2,dl=Math.cos,gl=Math.max,pl=Math.min,yl=Math.sin,ml=Math.sqrt,vl=1e-12,xl=Math.PI,Al=xl/2,wl=2*xl;function bl(t){return t>=1?Al:t<=-1?-Al:Math.asin(t)}function Dl(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new xr(e)}function kl(t){return t.innerRadius}function Cl(t){return t.outerRadius}function Ml(t){return t.startAngle}function Tl(t){return t.endAngle}function _l(t){return t&&t.padAngle}function El(t,e,n,r,i,a,l){var o=t-n,s=e-r,u=(l?a:-a)/ml(o*o+s*s),f=u*s,c=-u*o,h=t+f,d=e+c,g=n+f,p=r+c,y=(h+g)/2,m=(d+p)/2,v=g-h,x=p-d,A=v*v+x*x,w=i-a,b=h*p-g*d,D=(x<0?-1:1)*ml(gl(0,w*w*A-b*b)),k=(b*x-v*D)/A,C=(-b*v-x*D)/A,M=(b*x+v*D)/A,T=(-b*v+x*D)/A,_=k-y,E=C-m,F=M-y,S=T-m;return _*_+E*E>F*F+S*S&&(k=M,C=T),{cx:k,cy:C,x01:-f,y01:-c,x11:k*(i/w-1),y11:C*(i/w-1)}}function Fl(){var t=kl,e=Cl,n=fl(0),r=null,i=Ml,a=Tl,l=_l,o=null,s=Dl(u);function u(){var u,f,c=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-Al,g=a.apply(this,arguments)-Al,p=cl(g-d),y=g>d;if(o||(o=u=s()),h<c&&(f=h,h=c,c=f),h>vl)if(p>wl-vl)o.moveTo(h*dl(d),h*yl(d)),o.arc(0,0,h,d,g,!y),c>vl&&(o.moveTo(c*dl(g),c*yl(g)),o.arc(0,0,c,g,d,y));else{var m,v,x=d,A=g,w=d,b=g,D=p,k=p,C=l.apply(this,arguments)/2,M=C>vl&&(r?+r.apply(this,arguments):ml(c*c+h*h)),T=pl(cl(h-c)/2,+n.apply(this,arguments)),_=T,E=T;if(M>vl){var F=bl(M/c*yl(C)),S=bl(M/h*yl(C));(D-=2*F)>vl?(w+=F*=y?1:-1,b-=F):(D=0,w=b=(d+g)/2),(k-=2*S)>vl?(x+=S*=y?1:-1,A-=S):(k=0,x=A=(d+g)/2)}var B=h*dl(x),N=h*yl(x),L=c*dl(b),I=c*yl(b);if(T>vl){var O,V=h*dl(A),P=h*yl(A),$=c*dl(w),Y=c*yl(w);if(p<xl)if(O=function(t,e,n,r,i,a,l,o){var s=n-t,u=r-e,f=l-i,c=o-a,h=c*s-f*u;if(!(h*h<vl))return[t+(h=(f*(e-a)-c*(t-i))/h)*s,e+h*u]}(B,N,$,Y,V,P,L,I)){var R=B-O[0],z=N-O[1],U=V-O[0],H=P-O[1],X=1/yl(function(t){return t>1?0:t<-1?xl:Math.acos(t)}((R*U+z*H)/(ml(R*R+z*z)*ml(U*U+H*H)))/2),W=ml(O[0]*O[0]+O[1]*O[1]);_=pl(T,(c-W)/(X-1)),E=pl(T,(h-W)/(X+1))}else _=E=0}k>vl?E>vl?(m=El($,Y,B,N,h,E,y),v=El(V,P,L,I,h,E,y),o.moveTo(m.cx+m.x01,m.cy+m.y01),E<T?o.arc(m.cx,m.cy,E,hl(m.y01,m.x01),hl(v.y01,v.x01),!y):(o.arc(m.cx,m.cy,E,hl(m.y01,m.x01),hl(m.y11,m.x11),!y),o.arc(0,0,h,hl(m.cy+m.y11,m.cx+m.x11),hl(v.cy+v.y11,v.cx+v.x11),!y),o.arc(v.cx,v.cy,E,hl(v.y11,v.x11),hl(v.y01,v.x01),!y))):(o.moveTo(B,N),o.arc(0,0,h,x,A,!y)):o.moveTo(B,N),c>vl&&D>vl?_>vl?(m=El(L,I,V,P,c,-_,y),v=El(B,N,$,Y,c,-_,y),o.lineTo(m.cx+m.x01,m.cy+m.y01),_<T?o.arc(m.cx,m.cy,_,hl(m.y01,m.x01),hl(v.y01,v.x01),!y):(o.arc(m.cx,m.cy,_,hl(m.y01,m.x01),hl(m.y11,m.x11),!y),o.arc(0,0,c,hl(m.cy+m.y11,m.cx+m.x11),hl(v.cy+v.y11,v.cx+v.x11),y),o.arc(v.cx,v.cy,_,hl(v.y11,v.x11),hl(v.y01,v.x01),!y))):o.arc(0,0,c,b,w,y):o.lineTo(L,I)}else o.moveTo(0,0);if(o.closePath(),u)return o=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-xl/2;return[dl(r)*n,yl(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:fl(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:fl(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:fl(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:fl(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:fl(+t),u):i},u.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:fl(+t),u):a},u.padAngle=function(t){return arguments.length?(l="function"==typeof t?t:fl(+t),u):l},u.context=function(t){return arguments.length?(o=null==t?null:t,u):o},u}function Sl(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Bl(t){this._context=t}function Nl(t){return new Bl(t)}function Ll(t){return t[0]}function Il(t){return t[1]}function Ol(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Vl(t){return t}function Pl(t,e,n){this.k=t,this.x=e,this.y=n}var $l,Yl,Rl;Bl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},Pl.prototype={constructor:Pl,scale:function(t){return 1===t?this:new Pl(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Pl(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Pl.prototype,function(t){t[t.Tag=0]="Tag",t[t.Frontmatter=1]="Frontmatter",t[t.Wiki=2]="Wiki",t[t.WikiLink=3]="WikiLink",t[t.WikiDisplay=4]="WikiDisplay",t[t.Text=5]="Text",t[t.dvField=6]="dvField",t[t.Table=7]="Table",t[t.FileMeta=8]="FileMeta",t[t.Task=9]="Task",t[t.TaskDone=10]="TaskDone",t[t.TaskNotDone=11]="TaskNotDone"}($l||($l={})),function(t){t[t.Line=0]="Line",t[t.Bar=1]="Bar",t[t.Pie=2]="Pie",t[t.Radar=3]="Radar",t[t.Summary=4]="Summary",t[t.Table=5]="Table",t[t.Month=6]="Month",t[t.Heatmap=7]="Heatmap",t[t.Bullet=8]="Bullet",t[t.Unknown=9]="Unknown"}(Yl||(Yl={})),function(t){t[t.Number=0]="Number",t[t.Int=1]="Int",t[t.Date=2]="Date",t[t.Time=3]="Time",t[t.DateTime=4]="DateTime",t[t.String=5]="String"}(Rl||(Rl={}));class zl{constructor(t,e){this.date=t,this.value=e}}class Ul{constructor(t,e,n){if(this.type=e,this.target=n,this.separator="",this.id=t,this.accessor=-1,this.accessor1=-1,this.accessor2=-1,this.valueType=Rl.Number,this.usedAsXDataset=!1,this.numTargets=0,e===$l.Table){let t,e=new RegExp("\\[(?<accessor>[0-9]+)\\]\\[(?<accessor1>[0-9]+)\\](\\[(?<accessor2>[0-9]+)\\])?","gm");for(;t=e.exec(n);)if(void 0!==t.groups.accessor){let r=parseFloat(t.groups.accessor);if(Number.isNumber(r)&&void 0!==t.groups.accessor1){let i=parseFloat(t.groups.accessor1);if(Number.isNumber(i)){let a;void 0!==t.groups.accessor2&&(a=parseFloat(t.groups.accessor2)),this.accessor=r,this.accessor1=i,Number.isNumber(a)&&(this.accessor2=a),this.parentTarget=n.replace(e,"")}break}}}else{let t,e=new RegExp("\\[(?<accessor>[0-9]+)\\]","gm");for(;t=e.exec(n);)if(void 0!==t.groups.accessor){let r=parseFloat(t.groups.accessor);Number.isNumber(r)&&(this.accessor=r,this.parentTarget=n.replace(e,""));break}}}equalTo(t){return this.type===t.type&&this.target===t.target}getType(){return this.type}getTarget(){return this.target}getParentTarget(){return this.parentTarget}getId(){return this.id}getAccessor(t=0){switch(t){case 0:return this.accessor;case 1:return this.accessor1;case 2:return this.accessor2}return null}setSeparator(t){this.separator=t}getSeparator(t=!1){return""===this.separator?t?",":"/":this.separator}addNumTargets(t=1){this.numTargets=this.numTargets+t}getNumTargets(){return this.numTargets}}class Hl{constructor(t,e){this.currentIndex=0,this.name="untitled",this.query=e,this.values=[],this.parent=t,this.id=-1,this.yMin=null,this.yMax=null,this.startDate=null,this.endDate=null,this.numTargets=0,this.lineInfo=null,this.barInfo=null,this.isTmpDataset=!1,this.valueType=null==e?void 0:e.valueType;for(let e=0;e<t.getDates().length;e++)this.values.push(null)}cloneToTmpDataset(){if(!this.isTmpDataset){let t=new Hl(this.parent,null);return t.name="tmp",t.values=[...this.values],t.yMin=this.yMin,t.yMax=this.yMax,t.startDate=this.startDate.clone(),t.endDate=this.endDate.clone(),t.numTargets=this.numTargets,t.isTmpDataset=!0,t.valueType=this.valueType,t}return this}getName(){return this.name}setName(t){this.name=t}getId(){return this.id}setId(t){this.id=t}addNumTargets(t){this.numTargets=this.numTargets+t}getNumTargets(){return this.numTargets}getValue(t,e=0){let n=this.parent.getIndexOfDate(t)+Math.floor(e);return n>=0&&n<this.values.length?this.values[n]:null}setValue(t,e){let n=this.parent.getIndexOfDate(t);n>=0&&n<this.values.length&&(this.values[n]=e,(null===this.yMin||e<this.yMin)&&(this.yMin=e),(null===this.yMax||e>this.yMax)&&(this.yMax=e),(null===this.startDate||t<this.startDate)&&(this.startDate=t.clone()),(null===this.endDate||t>this.endDate)&&(this.endDate=t.clone()))}recalculateMinMax(){this.yMin=Math.min(...this.values),this.yMax=Math.max(...this.values)}getYMin(){return this.yMin}getYMax(){return this.yMax}getStartDate(){return this.startDate}getEndDate(){return this.endDate}shift(t,e){let n=!1;for(let r=0;r<this.values.length;r++)null!==this.values[r]&&(null===e||this.values[r]>=e)&&(this.values[r]=this.values[r]+t,n=!0);n&&(this.yMin=this.yMin+t,this.yMax=this.yMax+t)}setPenalty(t){for(let e=0;e<this.values.length;e++)null===this.values[e]&&(this.values[e]=t,t<this.yMin&&(this.yMin=t),t>this.yMax&&(this.yMax=t))}getQuery(){return this.query}accumulateValues(){let t=0;for(let e=0;e<this.values.length;e++)null!==this.values[e]&&(t+=this.values[e]),this.values[e]=t,t<this.yMin&&(this.yMin=t),t>this.yMax&&(this.yMax=t)}shiftByDataset(t){for(let e=0;e<this.values.length;e++){let n=this.values[e];null!==t.values[e]&&null!==n?n+=t.values[e]:null!==t.values[e]&&(n=t.values[e]),this.values[e]=n,n<this.yMin&&(this.yMin=n),n>this.yMax&&(this.yMax=n)}}getValues(){return this.values}getLength(){return this.values.length}getLengthNotNull(){let t=0;for(let e=0;e<this.values.length;e++)null!==this.values[e]&&t++;return t}next(){if(this.currentIndex<this.values.length){let t=this.currentIndex++;return{done:!1,value:new zl(this.parent.getDates()[t],this.values[t])}}return this.currentIndex=0,{done:!0,value:null}}[Symbol.iterator](){return this}}class Xl{constructor(t,e){this.currentIndex=0,this.dates=[],this.datasets=[];const n=t.creationData().format.toString();for(let r=t.clone();r<=e;r.add(1,"days")){let t=window.moment(r.format(n),n,!0);this.dates.push(t)}}createDataset(t,e){let n=new Hl(this,t);return n.setId(t.getId()),e&&n.setName(e.datasetName[t.getId()]),this.datasets.push(n),n}getIndexOfDate(t){const e=t.creationData().format.toString();for(let n=0;n<this.dates.length;n++)if(this.dates[n].format(e)===t.format(e))return n;return-1}getDatasetByQuery(t){for(let e of this.datasets)if(e.getQuery().equalTo(t))return e;return null}getDatasetById(t){for(let e of this.datasets)if(e.getId()===t)return e;return null}getXDatasetIds(){let t=[];for(let e of this.datasets)if(e.getQuery().usedAsXDataset){let n=e.getQuery().getId();t.includes(n)||-1===n||t.push(n)}return t}getDates(){return this.dates}getNames(){let t=[];for(let e of this.datasets)t.push(e.getName());return t}next(){return this.currentIndex<this.datasets.length?{done:!1,value:this.datasets[this.currentIndex++]}:(this.currentIndex=0,{done:!0,value:null})}[Symbol.iterator](){return this}}class Wl{constructor(t){this.queries=t,this.xDataset=[],this.folder="/",this.file=[],this.specifiedFilesOnly=!1,this.fileContainsLinkedFiles=[],this.fileMultiplierAfterLink="",this.dateFormat="YYYY-MM-DD",this.dateFormatPrefix="",this.dateFormatSuffix="",this.startDate=null,this.endDate=null,this.datasetName=[],this.constValue=[1],this.ignoreAttachedValue=[],this.ignoreZeroValue=[],this.accum=[],this.stack=!1,this.penalty=[],this.valueShift=[],this.shiftOnlyValueLargerThan=[],this.valueType=[],this.textValueMap={},this.dataAreaSize=new no(300,300),this.aspectRatio=new ro(1,1),this.margin=new io(10,10,10,10),this.fixedScale=1,this.fitPanelWidth=!1,this.output=[],this.line=[],this.bar=[],this.pie=[],this.summary=[],this.month=[],this.heatmap=[],this.bullet=[],this.customDataset=[],this.datasets=null}getQueryById(t){for(let e of this.queries)if(e.getId()===t)return e}}class jl{constructor(){this.id=-1,this.name="",this.xData=[],this.yData=[]}}class ql{constructor(){this.title="",this.xAxisLabel="Date",this.xAxisColor="",this.xAxisLabelColor="",this.yAxisLabel=[],this.yAxisColor=[],this.yAxisLabelColor=[],this.yAxisUnit=[],this.xAxisTickInterval=null,this.yAxisTickInterval=[],this.xAxisTickLabelFormat=null,this.yAxisTickLabelFormat=[],this.yMin=[],this.yMax=[],this.reverseYAxis=[],this.allowInspectData=!0,this.showLegend=!1,this.legendPosition="",this.legendOrientation="",this.legendBgColor="",this.legendBorderColor=""}GetGraphType(){return Yl.Unknown}}class Gl extends ql{constructor(){super(),this.lineColor=[],this.lineWidth=[],this.showLine=[],this.showPoint=[],this.pointColor=[],this.pointBorderColor=[],this.pointBorderWidth=[],this.pointSize=[],this.fillGap=[],this.yAxisLocation=[]}GetGraphType(){return Yl.Line}}class Ql extends ql{constructor(){super(),this.barColor=[],this.yAxisLocation=[]}GetGraphType(){return Yl.Bar}}class Zl{constructor(){this.title="",this.data=[],this.dataColor=[],this.dataName=[],this.label=[],this.hideLabelLessThan=.03,this.extLabel=[],this.showExtLabelOnlyIfNoLabel=!1,this.ratioInnerRadius=0,this.showLegend=!1,this.legendPosition="",this.legendOrientation="",this.legendBgColor="",this.legendBorderColor=""}GetGraphType(){return Yl.Pie}}class Kl{constructor(){this.template="",this.style=""}GetGraphType(){return Yl.Summary}}class Jl{constructor(){this.mode="circle",this.dataset=[],this.startWeekOn="Sun",this.threshold=[],this.yMin=[],this.yMax=[],this.color=null,this.dimNotInMonth=!0,this.initMonth="",this.showSelectedValue=!0,this.headerYearColor=null,this.headerMonthColor=null,this.dividingLineColor=null,this.showCircle=!0,this.showStreak=!0,this.showTodayRing=!0,this.showSelectedRing=!0,this.circleColor=null,this.circleColorByValue=!1,this.todayRingColor="",this.selectedRingColor="firebrick",this.showAnnotation=!0,this.annotation=[],this.showAnnotationOfAllTargets=!0,this.selectedDate="",this.selectedDataset=null}GetGraphType(){return Yl.Month}}class to{constructor(){this.dataset="0",this.startWeekOn="Sun",this.orientation="vertical",this.yMin=null,this.yMax=null,this.color=null}GetGraphType(){return Yl.Heatmap}}class eo{constructor(){this.title="",this.dataset="0",this.orientation="horizontal",this.value="",this.valueUnit="",this.valueColor="#69b3a2",this.range=[],this.rangeColor=[],this.showMarker=!1,this.markerValue=0,this.markerColor=""}GetGraphType(){return Yl.Bullet}}class no{constructor(t,e){this.width=t,this.height=e}}class ro{constructor(t,e){this.x=t,this.y=e}recalculateSize(t){let e=this.x/this.y,n=parseFloat((t.width*e).toFixed(2));return new no(n,t.height)}}class io{constructor(t,e,n,r){this.top=t,this.right=e,this.bottom=n,this.left=r}}class ao{constructor(t){if(this.translateX=0,this.translateY=0,"string"==typeof t){let e=t.match(/translate\(\s*(?<x>[\d\.\/-]+)\s*,\s*(?<y>[\d\.\/-]+)\s*\)/).groups;e&&(this.translateX=parseFloat(e.x),this.translateY=parseFloat(e.y))}}}class lo{constructor(t,e){this.filePath=t,this.tableIndex=e,this.xDataset=null,this.yDatasets=[]}}class oo{constructor(){this.fileTotal=0,this.fileAvailable=0,this.fileOutOfDateRange=0,this.fileNotInFormat=0,this.errorMessage="",this.minDate=window.moment(""),this.maxDate=window.moment(""),this.gotAnyValidXValue=!1,this.gotAnyValidYValue=!1}}const so=function(){const t=["HH","H","hh","h"],e=["mm","m"],n=["ss","s",""];let r=[];for(let i of t)for(let t of e)for(let e of n){let n=`${i}:${t}`;""!==e&&(n+=`:${e}`),i.contains("h")&&(n+=" a"),r.push(n)}return r}();function uo(t,e,n){if(!e&&!n)return t;let r=t;if(r.startsWith("^")&&(r=r.slice(1)),e){let t=new RegExp("^("+e+")","gm");t.test(r)&&(r=r.replace(t,""))}if(n){let t=new RegExp("("+n+")$","gm");t.test(r)&&(r=r.replace(t,""))}return r}function fo(t,e){let n=e;t.length>4&&t.startsWith("[[")&&t.endsWith("]]")&&(t=t.substring(2,t.length-2)),"iso-8601"===e.toLowerCase()&&(n=window.moment.ISO_8601);let r=window.moment(t,n,!0);return r=r.startOf("day"),r}function co(t,e,n=!0){if(!t||!e||0===e.length)return[null,t];let r=null;const i="^(?<value>[0-9]+)("+e.join("|")+")$",a=new RegExp(i,"gm");let l=a.exec(t);return l&&void 0!==l.groups&&void 0!==l.groups.value&&(r=parseFloat(l.groups.value),Number.isNumber(r)&&!Number.isNaN(r))?(n&&(t=t.replace(a,"")),[r,t]):[null,t]}function ho(t){if(!t)return null;let e=window.moment.duration(0),n=!1,r=!1;t.startsWith("+")&&(r=!1,t=t.substring(1)),t.startsWith("-")&&(r=!0,t=t.substring(1));let i=null;[i,t]=co(t,["year","years","Y","y"]),null!==i&&(r&&(i*=-1),e.add(i,"years"),n=!0);let a=null;[a,t]=co(t,["month","months","M"]),null!==a&&(r&&(a*=-1),e.add(a,"months"),n=!0);let l=null;[l,t]=co(t,["week","weeks","W","w"]),null!==l&&(r&&(l*=-1),e.add(l,"weeks"),n=!0);let o=null;[o,t]=co(t,["day","days","D","d"]),null!==o&&(r&&(o*=-1),e.add(o,"days"),n=!0);let s=null;[s,t]=co(t,["hour","hours","H","h"]),null!==s&&(r&&(s*=-1),e.add(s,"hours"),n=!0);let u=null;[u,t]=co(t,["minute","minutes","m"]),null!==u&&(r&&(u*=-1),e.add(u,"minutes"),n=!0);let f=null;return[f,t]=co(t,["second","seconds","S","s"]),null!==f&&(r&&(f*=-1),e.add(f,"seconds"),n=!0),n?e:null}function go(t,e){let n=null,r=ho(t);return r&&window.moment.isDuration(r)&&(n=mo(e),n=n.add(r),n&&n.isValid()),n}function po(t,e){return null==t?null:"iso-8601"===e.toLowerCase()?t.format():t.format(e)}function yo(t,e){return fo(po(window.moment(t),e),e)}function mo(t){return fo(po(window.moment(),t),t)}function vo(t,e){for(var n=(e=e.replace(/^\./,"")).split("."),r=0,i=n.length;r<i;++r){var a=n[r];if(!(a in t))return null;t=t[a]}return"string"==typeof t||Array.isArray(t)?t:"number"==typeof t||"boolean"==typeof t?t.toString():null}function xo(t,e){const n=Array.from(t),r=n.findIndex((t=>t!==e)),i=n.reverse().findIndex((t=>t!==e));return-1===r&&-1===i?t:t.substring(r,t.length-i)}function Ao(t){if(null===t)return null;let e=new RegExp('<img[^>]*?alt\\s*=\\s*[""\']?(?<emoji>[^\'"" >]+?)[ \'""][^>]*?>',"g");return t.replace(e,((...t)=>{let e=t[t.length-1];return e&&e.emoji?e.emoji.trim():""}))}function wo(t,e=null){let n=null,r=Rl.Number;if("string"==typeof t)if(t.includes(":")){let e=!1;t.startsWith("-")&&(e=!0,t=t.substring(1));let i=window.moment(t,so,!0);i.isValid()&&(n=i.diff(window.moment("00:00","HH:mm",!0),"seconds"),e&&(n*=-1),r=Rl.Time)}else if(e){const r=Object.keys(e);for(let n of r)if("string"==typeof n){let r=new RegExp(n,"gm");if(r.test(t)&&Number.isNumber(e[n])){let i=e[n].toString();t=t.replace(r,i);break}}n=parseFloat(t),Number.isNaN(n)&&(n=null)}else n=parseFloat(t),Number.isNaN(n)&&(n=null);else"number"==typeof t&&(n=t);return{type:r,value:n}}function bo(t,e="",n=""){var r=Qt("body").append("svg");let i=r.append("text").text(t).attr("x",-99999).attr("y",-99999);e&&i.attr("class",e),n&&i.attr("transform","rotate("+n+")");var a=r.node().getBBox();return r.remove(),{width:a.width,height:a.height}}function Do(t,e,n){let r=(0|parseFloat(t.attr("width")))+e,i=(0|parseFloat(t.attr("height")))+n;t.attr("width",r),t.attr("height",i)}function ko(t,e,n){let r=new ao(t.attr("transform"));t.attr("transform","translate("+(r.translateX+e)+","+(r.translateY+n)+")")}function Co(t){return t=(t=(t=t.replace(/(^\\s\*)|(\\s\*$)/gi,"")).replace(/\[ \]{2,}/gi," ")).replace(/\\n /,"\\n")}class Mo{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+Mo.version}static addUnaryOp(t){return Mo.max_unop_len=Math.max(t.length,Mo.max_unop_len),Mo.unary_ops[t]=1,Mo}static addBinaryOp(t,e,n){return Mo.max_binop_len=Math.max(t.length,Mo.max_binop_len),Mo.binary_ops[t]=e,n?Mo.right_associative.add(t):Mo.right_associative.delete(t),Mo}static addIdentifierChar(t){return Mo.additional_identifier_chars.add(t),Mo}static addLiteral(t,e){return Mo.literals[t]=e,Mo}static removeUnaryOp(t){return delete Mo.unary_ops[t],t.length===Mo.max_unop_len&&(Mo.max_unop_len=Mo.getMaxKeyLen(Mo.unary_ops)),Mo}static removeAllUnaryOps(){return Mo.unary_ops={},Mo.max_unop_len=0,Mo}static removeIdentifierChar(t){return Mo.additional_identifier_chars.delete(t),Mo}static removeBinaryOp(t){return delete Mo.binary_ops[t],t.length===Mo.max_binop_len&&(Mo.max_binop_len=Mo.getMaxKeyLen(Mo.binary_ops)),Mo.right_associative.delete(t),Mo}static removeAllBinaryOps(){return Mo.binary_ops={},Mo.max_binop_len=0,Mo}static removeLiteral(t){return delete Mo.literals[t],Mo}static removeAllLiterals(){return Mo.literals={},Mo}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new Mo(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map((t=>t.length)))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return Mo.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!Mo.binary_ops[String.fromCharCode(t)]||Mo.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return Mo.isIdentifierStart(t)||Mo.isDecimalDigit(t)}throwError(t){const e=new Error(t+" at character "+this.index);throw e.index=this.index,e.description=t,e}runHook(t,e){if(Mo.hooks[t]){const n={context:this,node:e};return Mo.hooks.run(t,n),n.node}return e}searchHook(t){if(Mo.hooks[t]){const e={context:this};return Mo.hooks[t].find((function(t){return t.call(e.context,e),e.node})),e.node}}gobbleSpaces(){let t=this.code;for(;t===Mo.SPACE_CODE||t===Mo.TAB_CODE||t===Mo.LF_CODE||t===Mo.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),e=1===t.length?t[0]:{type:Mo.COMPOUND,body:t};return this.runHook("after-all",e)}gobbleExpressions(t){let e,n,r=[];for(;this.index<this.expr.length;)if(e=this.code,e===Mo.SEMCOL_CODE||e===Mo.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())r.push(n);else if(this.index<this.expr.length){if(e===t)break;this.throwError('Unexpected "'+this.char+'"')}return r}gobbleExpression(){const t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,Mo.max_binop_len),e=t.length;for(;e>0;){if(Mo.binary_ops.hasOwnProperty(t)&&(!Mo.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!Mo.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=e,t;t=t.substr(0,--e)}return!1}gobbleBinaryExpression(){let t,e,n,r,i,a,l,o,s;if(a=this.gobbleToken(),!a)return a;if(e=this.gobbleBinaryOp(),!e)return a;for(i={value:e,prec:Mo.binaryPrecedence(e),right_a:Mo.right_associative.has(e)},l=this.gobbleToken(),l||this.throwError("Expected expression after "+e),r=[a,i,l];e=this.gobbleBinaryOp();){if(n=Mo.binaryPrecedence(e),0===n){this.index-=e.length;break}i={value:e,prec:n,right_a:Mo.right_associative.has(e)},s=e;const o=t=>i.right_a&&t.right_a?n>t.prec:n<=t.prec;for(;r.length>2&&o(r[r.length-2]);)l=r.pop(),e=r.pop().value,a=r.pop(),t={type:Mo.BINARY_EXP,operator:e,left:a,right:l},r.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+s),r.push(i,t)}for(o=r.length-1,t=r[o];o>1;)t={type:Mo.BINARY_EXP,operator:r[o-1].value,left:r[o-2],right:t},o-=2;return t}gobbleToken(){let t,e,n,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"),r)return this.runHook("after-token",r);if(t=this.code,Mo.isDecimalDigit(t)||t===Mo.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===Mo.SQUOTE_CODE||t===Mo.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(t===Mo.OBRACK_CODE)r=this.gobbleArray();else{for(e=this.expr.substr(this.index,Mo.max_unop_len),n=e.length;n>0;){if(Mo.unary_ops.hasOwnProperty(e)&&(!Mo.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!Mo.isIdentifierPart(this.expr.charCodeAt(this.index+e.length)))){this.index+=n;const t=this.gobbleToken();return t||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:Mo.UNARY_EXP,operator:e,argument:t,prefix:!0})}e=e.substr(0,--n)}Mo.isIdentifierStart(t)?(r=this.gobbleIdentifier(),Mo.literals.hasOwnProperty(r.name)?r={type:Mo.LITERAL,value:Mo.literals[r.name],raw:r.name}:r.name===Mo.this_str&&(r={type:Mo.THIS_EXP})):t===Mo.OPAREN_CODE&&(r=this.gobbleGroup())}return r?(r=this.gobbleTokenProperty(r),this.runHook("after-token",r)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let e=this.code;for(;e===Mo.PERIOD_CODE||e===Mo.OBRACK_CODE||e===Mo.OPAREN_CODE||e===Mo.QUMARK_CODE;){let n;if(e===Mo.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==Mo.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),e=this.code}this.index++,e===Mo.OBRACK_CODE?((t={type:Mo.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),e=this.code,e!==Mo.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):e===Mo.OPAREN_CODE?t={type:Mo.CALL_EXP,arguments:this.gobbleArguments(Mo.CPAREN_CODE),callee:t}:(e===Mo.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),t={type:Mo.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),n&&(t.optional=!0),this.gobbleSpaces(),e=this.code}return t}gobbleNumericLiteral(){let t,e,n="";for(;Mo.isDecimalDigit(this.code);)n+=this.expr.charAt(this.index++);if(this.code===Mo.PERIOD_CODE)for(n+=this.expr.charAt(this.index++);Mo.isDecimalDigit(this.code);)n+=this.expr.charAt(this.index++);if(t=this.char,"e"===t||"E"===t){for(n+=this.expr.charAt(this.index++),t=this.char,"+"!==t&&"-"!==t||(n+=this.expr.charAt(this.index++));Mo.isDecimalDigit(this.code);)n+=this.expr.charAt(this.index++);Mo.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")")}return e=this.code,Mo.isIdentifierStart(e)?this.throwError("Variable names cannot start with a number ("+n+this.char+")"):(e===Mo.PERIOD_CODE||1===n.length&&n.charCodeAt(0)===Mo.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:Mo.LITERAL,value:parseFloat(n),raw:n}}gobbleStringLiteral(){let t="";const e=this.index,n=this.expr.charAt(this.index++);let r=!1;for(;this.index<this.expr.length;){let e=this.expr.charAt(this.index++);if(e===n){r=!0;break}if("\\"===e)switch(e=this.expr.charAt(this.index++),e){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=e}else t+=e}return r||this.throwError('Unclosed quote after "'+t+'"'),{type:Mo.LITERAL,value:t,raw:this.expr.substring(e,this.index)}}gobbleIdentifier(){let t=this.code,e=this.index;for(Mo.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,Mo.isIdentifierPart(t));)this.index++;return{type:Mo.IDENTIFIER,name:this.expr.slice(e,this.index)}}gobbleArguments(t){const e=[];let n=!1,r=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let i=this.code;if(i===t){n=!0,this.index++,t===Mo.CPAREN_CODE&&r&&r>=e.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(i===Mo.COMMA_CODE){if(this.index++,r++,r!==e.length)if(t===Mo.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===Mo.CBRACK_CODE)for(let t=e.length;t<r;t++)e.push(null)}else if(e.length!==r&&0!==r)this.throwError("Expected comma");else{const t=this.gobbleExpression();t&&t.type!==Mo.COMPOUND||this.throwError("Expected comma"),e.push(t)}}return n||this.throwError("Expected "+String.fromCharCode(t)),e}gobbleGroup(){this.index++;let t=this.gobbleExpressions(Mo.CPAREN_CODE);if(this.code===Mo.CPAREN_CODE)return this.index++,1===t.length?t[0]:!!t.length&&{type:Mo.SEQUENCE_EXP,expressions:t};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:Mo.ARRAY_EXP,elements:this.gobbleArguments(Mo.CBRACK_CODE)}}}const To=new class{add(t,e,n){if("string"!=typeof arguments[0])for(let t in arguments[0])this.add(t,arguments[0][t],arguments[1]);else(Array.isArray(t)?t:[t]).forEach((function(t){this[t]=this[t]||[],e&&this[t][n?"unshift":"push"](e)}),this)}run(t,e){this[t]=this[t]||[],this[t].forEach((function(t){t.call(e&&e.context?e.context:e,e)}))}};Object.assign(Mo,{hooks:To,plugins:new class{constructor(t){this.jsep=t,this.registered={}}register(...t){t.forEach((t=>{if("object"!=typeof t||!t.name||!t.init)throw new Error("Invalid JSEP plugin format");this.registered[t.name]||(t.init(this.jsep),this.registered[t.name]=t)}))}}(Mo),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),Mo.max_unop_len=Mo.getMaxKeyLen(Mo.unary_ops),Mo.max_binop_len=Mo.getMaxKeyLen(Mo.binary_ops);const _o=t=>new Mo(t).parse(),Eo=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(Mo).filter((t=>!Eo.includes(t)&&void 0===_o[t])).forEach((t=>{_o[t]=Mo[t]})),_o.Jsep=Mo;var Fo={name:"ternary",init(t){t.hooks.add("after-expression",(function(e){if(e.node&&this.code===t.QUMARK_CODE){this.index++;const n=e.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===t.COLON_CODE){this.index++;const i=this.gobbleExpression();if(i||this.throwError("Expected expression"),e.node={type:"ConditionalExpression",test:n,consequent:r,alternate:i},n.operator&&t.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&t.binary_ops[r.right.operator]<=.9;)r=r.right;e.node.test=r.right,r.right=e.node,e.node=n}}else this.throwError("Expected :")}}))}};_o.plugins.register(Fo);var So,Bo={};function No(t){if("number"==typeof t){if(0===t)return!1}else if(t instanceof Hl&&t.getValues().some((function(t){return 0===t})))return!1;return!0}So=Bo,function(){var t={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(n){return function(n,r){var i,a,l,o,s,u,f,c,h,d=1,g=n.length,p="";for(a=0;a<g;a++)if("string"==typeof n[a])p+=n[a];else if("object"==typeof n[a]){if((o=n[a]).keys)for(i=r[d],l=0;l<o.keys.length;l++){if(null==i)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',o.keys[l],o.keys[l-1]));i=i[o.keys[l]]}else i=o.param_no?r[o.param_no]:r[d++];if(t.not_type.test(o.type)&&t.not_primitive.test(o.type)&&i instanceof Function&&(i=i()),t.numeric_arg.test(o.type)&&"number"!=typeof i&&isNaN(i))throw new TypeError(e("[sprintf] expecting number but found %T",i));switch(t.number.test(o.type)&&(c=i>=0),o.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,o.width?parseInt(o.width):0);break;case"e":i=o.precision?parseFloat(i).toExponential(o.precision):parseFloat(i).toExponential();break;case"f":i=o.precision?parseFloat(i).toFixed(o.precision):parseFloat(i);break;case"g":i=o.precision?String(Number(i.toPrecision(o.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=o.precision?i.substring(0,o.precision):i;break;case"t":i=String(!!i),i=o.precision?i.substring(0,o.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=o.precision?i.substring(0,o.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=o.precision?i.substring(0,o.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}t.json.test(o.type)?p+=i:(!t.number.test(o.type)||c&&!o.sign?h="":(h=c?"+":"-",i=i.toString().replace(t.sign,"")),u=o.pad_char?"0"===o.pad_char?"0":o.pad_char.charAt(1):" ",f=o.width-(h+i).length,s=o.width&&f>0?u.repeat(f):"",p+=o.align?h+i+s:"0"===u?h+s+i:s+h+i)}return p}(function(e){if(r[e])return r[e];for(var n,i=e,a=[],l=0;i;){if(null!==(n=t.text.exec(i)))a.push(n[0]);else if(null!==(n=t.modulo.exec(i)))a.push("%");else{if(null===(n=t.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(n[2]){l|=1;var o=[],s=n[2],u=[];if(null===(u=t.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(u[1]);""!==(s=s.substring(u[0].length));)if(null!==(u=t.key_access.exec(s)))o.push(u[1]);else{if(null===(u=t.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(u[1])}n[2]=o}else l|=2;if(3===l)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({placeholder:n[0],param_no:n[1],keys:n[2],sign:n[3],pad_char:n[4],align:n[5],width:n[6],precision:n[7],type:n[8]})}i=i.substring(n[0].length)}return r[e]=a}(n),arguments)}function n(t,n){return e.apply(null,[t].concat(n||[]))}var r=Object.create(null);So.sprintf=e,So.vsprintf=n,"undefined"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}();const Lo={first:function(t,e){return t.getValue(this.startDate(...arguments))},last:function(t,e){return t.getValue(this.endDate(...arguments))},min:function(t,e){return m(t.getValues())},minDate:function(t,e){let n=m(t.getValues());if(Number.isNumber(n)){let e=Array.from(t);for(let t of e.reverse())if(null!==t.value&&t.value===n)return t.date}return"Error: min not found"},max:function(t,e){return y(t.getValues())},maxDate:function(t,e){let n=y(t.getValues());if(Number.isNumber(n)){let e=Array.from(t);for(let t of e.reverse())if(null!==t.value&&t.value===n)return t.date}return"Error: max not found"},startDate:function(t,e){if(t){let e=t.getStartDate();if(e&&e.isValid())return e}return e.startDate},endDate:function(t,e){if(t){let e=t.getEndDate();if(e&&e.isValid())return e}return e.endDate},sum:function(t,e){return b(t.getValues())},count:function(t,e){return"Error: deprecated function 'count'"},numTargets:function(t,e){return t.getNumTargets()},days:function(t,e){return"Error: deprecated function 'days'"},numDays:function(t,e){return t.getLength()},numDaysHavingData:function(t,e){return t.getLengthNotNull()},maxStreak:function(t,e){let n=0,r=0;for(let e of t)e.value?n++:n=0,n>=r&&(r=n);return r},maxStreakStart:function(t,e){let n=0,r=0,i=null,a=null;if(t)for(let e of t)e.value?(0===n&&(i=e.date),n++):n=0,n>=r&&(r=n,a=i);return a},maxStreakEnd:function(t,e){let n=0,r=0,i=null,a=null;if(t){let e=Array.from(t);for(let t=0;t<e.length;t++){let l=e[t],o=null;t<e.length-1&&(o=e[t+1]),l.value?(n++,(null==o?void 0:o.value)||(i=l.date)):n=0,n>=r&&(r=n,a=i)}}return a},maxBreaks:function(t,e){let n=0,r=0;for(let e of t)e.value?n=0:n++,n>r&&(r=n);return r},maxBreaksStart:function(t,e){let n=0,r=0,i=null,a=null;if(t)for(let e of t)e.value?n=0:(0===n&&(i=e.date),n++),n>=r&&(r=n,a=i);return a},maxBreaksEnd:function(t,e){let n=0,r=0,i=null,a=null;if(t){let e=Array.from(t);for(let t=0;t<e.length;t++){let l=e[t],o=null;t<e.length-1&&(o=e[t+1]),l.value?n=0:(n++,(null==o?void 0:o.value)&&(i=l.date)),n>=r&&(r=n,a=i)}}return a},lastStreak:function(t,e){return"Error: deprecated function 'lastStreak'"},currentStreak:function(t,e){let n=0;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){if(!e[t].value)break;n++}}return n},currentStreakStart:function(t,e){let n=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let r=e[t];if(t<e.length-1&&(n=e[t+1].date),!r.value)break}}return null===n?"Error: absense":n},currentStreakEnd:function(t,e){let n=0,r=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i.value)break;0===n&&(r=i.date),n++}}return null===r?"Error: absense":r},currentBreaks:function(t,e){let n=0;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){if(e[t].value)break;n++}}return n},currentBreaksStart:function(t,e){let n=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let r=e[t];if(t<e.length-1&&(n=e[t+1].date),r.value)break}}return null===n?"Error: absense":n},currentBreaksEnd:function(t,e){let n=0,r=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let i=e[t];if(i.value)break;0===n&&(r=i.date),n++}}return null===r?"Error: absense":r},average:function(t,e){let n=t.getLengthNotNull();return No(n)?b(t.getValues())/n:"Error: divide by zero in expression"},median:function(t,e){return A(t.getValues())},variance:function(t,e){return function(t){let e,n=0,r=0,i=0;for(let a of t)null!=a&&(a=+a)>=a&&(e=a-r,r+=e/++n,i+=e*(a-r));if(n>1)return i/(n-1)}(t.getValues())}},Io={"-":function(t){if("number"==typeof t)return-1*t;if(t instanceof Hl){let e=t.cloneToTmpDataset();return e.getValues().forEach((function(t,e,n){null!==n[e]&&(n[e]=-1*t)})),e.recalculateMinMax(),e}return"Error: unknown operation for '-'"},"+":function(t){if("number"==typeof t)return t;if(t instanceof Hl){return t.cloneToTmpDataset()}return"Error: unknown operation for '+'"}},Oo={"+":function(t,e){if("number"==typeof t&&"number"==typeof e)return t+e;if("number"==typeof t&&e instanceof Hl){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t+e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t+e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&e instanceof Hl){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t+e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '+'"},"-":function(t,e){if("number"==typeof t&&"number"==typeof e)return t-e;if("number"==typeof t&&e instanceof Hl){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t-e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t-e:r[n]=null})),n}if(t instanceof Hl&&e instanceof Hl){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t-e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '-'"},"*":function(t,e){if("number"==typeof t&&"number"==typeof e)return t*e;if("number"==typeof t&&e instanceof Hl){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t*e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t*e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&e instanceof Hl){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t*e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '*'"},"/":function(t,e){if(!No(e))return"Error: divide by zero in expression";if("number"==typeof t&&"number"==typeof e)return t/e;if("number"==typeof t&&e instanceof Hl){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t/e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t/e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&e instanceof Hl){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t/e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '/'"},"%":function(t,e){if(!No(e))return"Error: divide by zero in expression";if("number"==typeof t&&"number"==typeof e)return t%e;if("number"==typeof t&&e instanceof Hl){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t%e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t%e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&e instanceof Hl){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t%e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '%'"}},Vo={normalize:function(t,e,n){let r=t.getYMin(),i=t.getYMax();if(null!==r&&null!==i&&i>r){let e=t.cloneToTmpDataset();return e.getValues().forEach((function(t,e,n){n[e]=(t-r)/(i-r)})),e.recalculateMinMax(),e}return"Error: invalid data range for function 'normalize'"},setMissingValues:function(t,e,n){if(e&&e.length>0){let n=e[0],r=t.cloneToTmpDataset();return Number.isNumber(n)&&!Number.isNaN(n)?(r.getValues().forEach((function(t,e,r){null===t&&(r[e]=n)})),r.recalculateMinMax(),r):"Error: invalid arguments for function 'setMissingValues'"}return"Error: invalid arguments for function 'setMissingValues"}};function Po(t,e){switch(t.type){case"Literal":return t.value;case"Identifier":let n=t.name;return n in Lo||n in Vo?`Error: deprecated template variable '${n}', use '${n}()' instead`:`Error: unknown function name '${n}'`;case"UnaryExpression":let r=t,i=Po(r.argument,e);return"string"==typeof i?i:Io[r.operator](i);case"BinaryExpression":let a=t,l=Po(a.left,e),o=Po(a.right,e),s=function(t,e){return"string"==typeof t?t:"string"==typeof e?e:"number"==typeof t||window.moment.isMoment(t)||t instanceof Hl?"number"==typeof e||window.moment.isMoment(e)||e instanceof Hl?"":"Error: invalide operant type":"Error: invalid operant type"}(l,o);return"string"==typeof s&&s.startsWith("Error:")?s:Oo[a.operator](l,o);case"CallExpression":let u=t,f=u.callee.name,c=function(t,e){return t.map((function(t){return Po(t,e)}))}(u.arguments,e);if("string"==typeof c)return c;if("dataset"===f){if(1===c.length){let t=c[0];if("string"==typeof t)return t;if("number"!=typeof t)return"Error: function 'dataset' only accepts id in number";let n=function(t,e){return e.datasets.getDatasetById(t)}(t,e);return n||`Error: no dataset found for id '${t}'`}}else{if(f in Lo){if(0===c.length){let t=null;for(let n of e.datasets)t||n.getQuery().usedAsXDataset||(t=n);return t?Lo[f](t,e):`No available dataset found for function ${f}`}if(1===c.length){let t=c[0];return"string"==typeof t?t:t instanceof Hl?Lo[f](t,e):`Error: function '${f}' only accepts Dataset`}return`Error: Too many arguments for function ${f}`}if(f in Vo){if(1===c.length){if("string"==typeof c[0])return c[0];if(c[0]instanceof Hl){let t=c[0];return Vo[f](t,null,e)}return`Error: function ${f} only accept Dataset`}if(c.length>1){if("string"==typeof c[0])return c[0];if(c[0]instanceof Hl){let t=c[0];return Vo[f](t,c.filter((function(t,e,n){return e>0})),e)}return`Error: function ${f} only accept Dataset`}return`Error: Too many arguments for function ${f}`}}return`Error: unknown function name '${f}'`}return"Error: unknown expression"}function $o(t,e){let n,r=[],i=new RegExp("{{(?<expr>[\\w+\\-*\\/0-9\\s()\\[\\]%.,]+)(::(?<format>[\\w+\\-*\\/0-9\\s()\\[\\]%.:]+))?}}","gm");for(;n=i.exec(t);){let t=n[0];if(!r.some((e=>e.source===t))&&(void 0!==n.groups&&void 0!==n.groups.expr)){let i=n.groups.expr,a=null;try{a=_o(i)}catch(t){return"Error:"+t.message}if(!a)return"Error: failed to parse expression";const l=Po(a,e);if("string"==typeof l)return l;if("number"==typeof l||window.moment.isMoment(l)){let e=null;void 0!==n.groups.format&&(e=n.groups.format),r.push({source:t,value:l,format:e})}}}return r}function Yo(t,e){let n=$o(t,e);if("string"==typeof n)return n;let r=n;for(let n of r){let r=n.source,i=n.value,a=n.format,l="";"number"==typeof i?l=a?Bo.sprintf("%"+a,i):i.toFixed(1):window.moment.isMoment(i)&&(l=po(i,a||e.dateFormat)),l&&(t=t.split(r).join(l))}return t}function Ro(t,e){if(t=t.trim(),/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)$/.test(t))return parseFloat(t);let n=$o(t,e);if("string"==typeof n)return n;let r=n;return r.length>0?r[0].value:"Error: failed to resolve values"}function zo(t,e,n,r){let i="",a=.5*n.dataAreaSize.width,l=.7*a,o=l*r.ratioInnerRadius,s=[];for(let t of r.data){let e=Ro(t,n);if("string"==typeof e){i=e;break}"number"==typeof e&&s.push(e)}if(""!==i)return i;let u=[];for(let t of r.label){let e=Yo(t,n);if(e.startsWith("Error")){i=e;break}u.push(e)}if(""!==i)return i;let f=r.hideLabelLessThan,c=u.map((function(t){return bo(t,"tracker-tick-label")})),h=[];for(let t of r.extLabel){let e=Yo(t,n);if(e.startsWith("Error")){i=e;break}h.push(e)}if(""!==i)return i;let d=h.map((function(t){return bo(t,"tracker-pie-label")})),g=r.showExtLabelOnlyIfNoLabel,p=Vr().range(r.dataColor),y=e.dataArea.append("g");y.attr("transform",(function(){return"translate("+.5*n.dataAreaSize.width+","+.5*n.dataAreaSize.height+")"}));let m=function(){var t=Vl,e=Ol,n=null,r=fl(0),i=fl(wl),a=fl(0);function l(l){var o,s,u,f,c,h=(l=Sl(l)).length,d=0,g=new Array(h),p=new Array(h),y=+r.apply(this,arguments),m=Math.min(wl,Math.max(-wl,i.apply(this,arguments)-y)),v=Math.min(Math.abs(m)/h,a.apply(this,arguments)),x=v*(m<0?-1:1);for(o=0;o<h;++o)(c=p[g[o]=o]=+t(l[o],o,l))>0&&(d+=c);for(null!=e?g.sort((function(t,n){return e(p[t],p[n])})):null!=n&&g.sort((function(t,e){return n(l[t],l[e])})),o=0,u=d?(m-h*x)/d:0;o<h;++o,y=f)s=g[o],f=y+((c=p[s])>0?c*u:0)+x,p[s]={data:l[s],index:o,value:c,startAngle:y,endAngle:f,padAngle:v};return p}return l.value=function(e){return arguments.length?(t="function"==typeof e?e:fl(+e),l):t},l.sortValues=function(t){return arguments.length?(e=t,n=null,l):e},l.sort=function(t){return arguments.length?(n=t,e=null,l):n},l.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:fl(+t),l):r},l.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:fl(+t),l):i},l.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:fl(+t),l):a},l}(),v=m(s);v.forEach((function(t,e){t.input_index=e}));let x=y.selectAll("sector").data(v).enter().append("g").attr("class","sector"),A=Fl().innerRadius(o).outerRadius(l);var w=Fl().innerRadius(.9*a).outerRadius(.9*a);function b(t){return(t.endAngle-t.startAngle)/(2*Math.PI)<f}function D(t){return t.startAngle+(t.endAngle-t.startAngle)/2}function k(t,e){return g?""===u[e]||b(t)?h[e]:"":h[e]}x.append("path").attr("fill",(function(t,e){return p(e.toString())})).attr("d",A),y.selectAll("label").data(m(s)).enter().append("text").text((function(t,e){return b(t)?"":u[e]})).attr("transform",(function(t){return"translate("+A.centroid(t)[0]+","+A.centroid(t)[1]+")"})).style("text-anchor","middle").attr("class","tracker-pie-label");let C=null,M={};function T(t,e){let n=c[e].width;d[e].width;let r=b(t),i=D(t),a=A.centroid(t),l=w.centroid(t),o=M[e]||w.centroid(t);l[1]=o[1];let s=Math.sqrt((l[0]-a[0])**2+(l[1]-a[1])**2);return""===u[e]||r||(a[0]=a[0]+(l[0]-a[0])*n/s,a[1]=a[1]+(l[1]-a[1])*n/s,o[0]=o[0]+-3*(i<Math.PI?1:-1)),s=Math.sqrt((l[0]-a[0])**2+(l[1]-a[1])**2),s>Math.sqrt((o[0]-a[0])**2+(o[1]-a[1])**2)?[a,o]:[a,l,o]}y.selectAll("extLabel").data(v).enter().append("text").sort((function(t,e){return Math.cos(D(e))-Math.cos(D(t))})).text((function(t,e){return k(t,t.input_index)})).attr("transform",(function(t,e){if(0==k(t,e=t.input_index).length)return;let n=w.centroid(t),r=D(t);n[0]=(.99*a-d[e].width)*(r<Math.PI?1:-1);var i=0;let l=new DOMRect(n[0],n[1],d[e].width,d[e].height);return null!==C&&(l.right<C.left||C.right<l.left||C.bottom<l.top||(i=C.bottom-l.top)),0!=i&&(l=new DOMRect(n[0],n[1]+i,d[e].width,d[e].height)),C=l,M[e]=[n[0],n[1]+i],"translate("+n[0]+","+(n[1]+i)+")"})).style("text-anchor",(function(t){return D(t)<Math.PI?"start":"end"})).attr("class","tracker-pie-label"),y.selectAll("line").data(v).enter().append("polyline").attr("stroke","black").style("fill","none").attr("stroke-width",1).attr("points",(function(t,e){if(g){if((""===u[e]||b(t))&&""!==h[e])return T(t,e)}else if(""!==h[e])return T(t,e)})).attr("class","tracker-axis")}function Uo(t,e,n){if(!e||!n)return;let r={};r=function(t,e,n){Qt(e).select("#svg").remove();for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++)delete t[r[i]];let a=Qt(e).append("svg").attr("id","svg").attr("width",n.dataAreaSize.width+n.margin.left+n.margin.right).attr("height",n.dataAreaSize.height+n.margin.top+n.margin.bottom);t.svg=a;let l=a.append("g").attr("id","graphArea").attr("transform","translate("+n.margin.left+","+n.margin.top+")").attr("width",n.dataAreaSize.width+n.margin.right).attr("height",n.dataAreaSize.height+n.margin.bottom);t.graphArea=l;let o=l.append("g").attr("id","dataArea").attr("width",n.dataAreaSize.width).attr("height",n.dataAreaSize.height);return t.dataArea=o,t}(r,t,e);let i=ul[n.dataColor.length];for(let t=0;t<n.dataColor.length;t++)null===n.dataColor[t]&&(n.dataColor[t]=i[t]);!function(t,e,n,r){if(!n||!r)return;if(!r.title)return;let i=bo(r.title,"tracker-title"),a=e.graphArea.append("text").text(r.title).attr("id","title").attr("transform","translate("+n.dataAreaSize.width/2+","+i.height/2+")").attr("height",i.height).attr("class","tracker-title");e.title=a,Do(e.svg,0,i.height),Do(e.graphArea,0,i.height),ko(e.dataArea,0,i.height)}(0,r,e,n),zo(0,r,e,n),n.showLegend&&function(t,e,n,r){let i=e.svg;e.graphArea;let a=e.dataArea,l=e.title,o=0;l&&(o=parseFloat(l.attr("height")));let s=r.dataName,u=s.map((function(t){return bo(t,"tracker-legend-label")})),f=0,c=0;for(let t=0;t<s.length;t++)u[t].width>c&&(c=u[t].width,f=t);let h=c/s[f].length,d=u[f].height,g=s.length,p=2*h,y=d,m=2*h,v=0,x=0;"vertical"===r.legendOrientation?(v=3*p+m+c,x=(g+1)*y):"horizontal"===r.legendOrientation&&(v=(2*p+m)*g+p+b(u,(function(t,e){return t.width})),x=y+d);let A=0,w=0;if("top"===r.legendPosition)A=n.dataAreaSize.width/2-v/2,w=o,Do(i,0,x+y),ko(a,0,x+y);else if("bottom"===r.legendPosition)A=n.dataAreaSize.width/2-v/2,w=o+n.dataAreaSize.height+y,Do(i,0,x+y);else if("left"===r.legendPosition)A=0,w=o+n.dataAreaSize.height/2-x/2,Do(i,v+p,0),ko(a,v+p,0);else{if("right"!==r.legendPosition)return;A=n.dataAreaSize.width+p,w=o+n.dataAreaSize.height/2-x/2,Do(i,v+p,0)}let D=e.graphArea.append("g").attr("id","legend").attr("transform","translate("+A+","+w+")"),k=D.append("rect").attr("class","tracker-legend").attr("width",v).attr("height",x);r.legendBgColor&&k.style("fill",r.legendBgColor),r.legendBorderColor&&k.style("stroke",r.legendBorderColor);let C=p,M=d,T=C+p+m,_=M;if("vertical"===r.legendOrientation)D.selectAll("markers").data(s).enter().append("circle").attr("cx",C+m/2).attr("cy",(function(t,e){return M+e*y})).attr("r",(function(t,e){return 5})).style("fill",(function(t,e){return r.dataColor[e]})),D.selectAll("labels").data(s).enter().append("text").attr("x",T).attr("y",(function(t,e){return _+e*y})).text((function(t,e){return t})).style("alignment-baseline","middle").attr("class","tracker-legend-label").style("fill",(function(t,e){return r.dataColor[e]}));else if("horizontal"===r.legendOrientation){let t=0;t=0,D.selectAll("markers").data(s).enter().append("circle").attr("cx",(function(e,n){return 0===n?t=C+m/2:t+=u[n].width+p+m+p,t})).attr("cy",M).attr("r",(function(t,e){return 5})).style("fill",(function(t,e){return r.dataColor[e]})),t=0,D.selectAll("labels").data(s).enter().append("text").attr("x",(function(e,n){return 0===n?t=T:t+=u[n].width+p+m+p,t})).attr("y",_).text((function(t,e){return t})).style("alignment-baseline","middle").attr("class","tracker-legend-label").style("fill",(function(t,e){return r.dataColor[e]}))}}(0,r,e,n),function(t,e,n){let r=Qt(t),i=e.svg,a=parseFloat(i.attr("width")),l=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${l}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(l*n.fixedScale).toString()+"px"))}(t,r,e)}function Ho(t,e,n){if(!e||!n)return;let r="";n.template,r=n.template;let i=Yo(r,e);if(i.startsWith("Error:"))return i;if(r=i,""!==r){let e=Qt(t).append("div");if(r.includes("\n")||r.includes("\\n")){let t=r.split(/(\n|\\n)/);for(let n of t)"\n"!==n&&"\\n"!==n&&e.append("div").text(n)}else e.text(r);""!==n.style&&e.attr("style",n.style)}}let Xo=!1;function Wo(t,e,n){let r=Qt(t),i=e.svg,a=parseFloat(i.attr("width")),l=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${l}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(l*n.fixedScale).toString()+"px"))}function jo(t,e){let n=e.dataset;if(0===n.length)return!1;let r=null;if(null===e.selectedDataset){for(let e of n)if(r=t.datasets.getDatasetById(e),r&&!r.getQuery().usedAsXDataset)break;if(r)return e.selectedDataset=r.getId(),!0}else{let i=e.selectedDataset,a=n.findIndex((t=>t===i));if(a>=0){if(a===e.dataset.length-1){for(let e of n)if(r=t.datasets.getDatasetById(e),r&&!r.getQuery().usedAsXDataset)break;return!!r&&(e.selectedDataset=r.getId(),!0)}{a++;let i=n[a];if(r=t.datasets.getDatasetById(i),e.selectedDataset=i,r&&!r.getQuery().usedAsXDataset)return!0;jo(t,e)}}}return!1}function qo(t,e,n,r){Qt(e).select("#svg").remove();for(var i=Object.getOwnPropertyNames(t),a=0;a<i.length;a++)delete t[i[a]];let l=Qt(e).append("svg").attr("id","svg").attr("width",n.dataAreaSize.width+n.margin.left+n.margin.right).attr("height",n.dataAreaSize.height+n.margin.top+n.margin.bottom);t.svg=l;let o=l.append("g").attr("id","graphArea").attr("transform","translate("+n.margin.left+","+n.margin.top+")").attr("width",n.dataAreaSize.width+n.margin.right).attr("height",n.dataAreaSize.height+n.margin.bottom);t.graphArea=o;let s=o.append("g").attr("id","dataArea").attr("width",n.dataAreaSize.width).attr("height",n.dataAreaSize.height);return t.dataArea=s,t}function Go(t,e){let n=t.svg.selectAll("circle");for(let t of n){let e=Qt(t).attr("id");e&&e.startsWith("tracker-selected-circle-")&&Qt(t).style("stroke","none")}e.selectedDate="",t.monitor.text("")}function Qo(t,e,n,r,i){if(!n||!r)return;let a=r.selectedDataset;if(null===a)return;let l=n.datasets.getDatasetById(a);if(!l)return;let o=l.getName();i.month(),i.daysInMonth(),i.year();let s=bo("30","tracker-month-label"),u=2.8*Math.max(s.width,s.height),f=i.format("YYYY"),c=i.format("MMM"),h=bo(f,"tracker-month-header-year"),d=bo(c,"tracker-month-header-month"),g=0,p=e.graphArea.append("g"),y=null;r.headerMonthColor?y=r.headerMonthColor:r.color&&(y=r.color);let m=p.append("text").text(c).attr("id","titleMonth").attr("transform","translate("+u/4+","+d.height+")").attr("class","tracker-month-header-month").style("cursor","default").on("click",(function(t){Go(e,r)}));y&&m.style("fill",y),g+=d.height;let v=null;r.headerYearColor?v=r.headerYearColor:r.color&&(v=r.color);let x=p.append("text").text(f).attr("id","titleYear").attr("transform","translate("+u/4+","+(g+h.height)+")").attr("class","tracker-month-header-year").style("cursor","default").attr("font-weight","bold").on("click",(function(t){Go(e,r)}));v&&x.style("fill",v),g+=h.height,"annotation"===r.mode&&r.showAnnotationOfAllTargets&&r.dataset.length>1&&(o="All Targets");let A=bo(o,"tracker-month-title-rotator"),w=p.append("text").text(o).attr("transform","translate("+3.5*u+","+A.height+")").attr("class","tracker-month-title-rotator").style("cursor","pointer");r.showAnnotationOfAllTargets&&"annotation"===r.mode||w.on("click",(function(a){jo(n,r)&&(Go(e,r),Ko(t,e,n,r,i))})),e.rotator=w;let b=bo("0.0000","tracker-month-title-monitor"),D=p.append("text").text("").attr("id","monitor").attr("class","tracker-month-title-monitor").attr("transform","translate("+3.5*u+","+(A.height+b.height)+")").style("cursor","pointer").style("fill",r.selectedRingColor);e.monitor=D;let k=bo("<","tracker-month-title-arrow");p.append("text").text("<").attr("id","arrowLeft").attr("transform","translate("+5.5*u+","+(g/2+k.height/2)+")").attr("class","tracker-month-title-arrow").on("click",(function(a){Go(e,r),r.selectedDate="";let l=i.clone().add(-1,"month");Ko(t,e,n,r,l)})).style("cursor","pointer"),p.append("text").text(">").attr("id","arrowLeft").attr("transform","translate("+6.5*u+","+(g/2+k.height/2)+")").attr("class","tracker-month-title-arrow").on("click",(function(a){Go(e,r);let l=i.clone().add(1,"month");Ko(t,e,n,r,l)})).style("cursor","pointer"),p.append("text").text("◦").attr("id","arrowToday").attr("transform","translate("+6*u+","+(g/2+k.height/2)+")").attr("class","tracker-month-title-arrow").on("click",(function(i){Go(e,r);let a=mo(n.dateFormat);Ko(t,e,n,r,a)})).style("cursor","pointer"),g+=8;let C=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];"mon"===r.startWeekOn.toLowerCase()&&C.push(C.shift());let M=bo(C[0],"tracker-month-weekday");e.graphArea.selectAll("weekDays").data(C).enter().append("text").text((function(t){return t})).attr("transform",(function(t,e){return"translate("+(e+.5)*u+","+(g+M.height)+")"})).attr("class","tracker-month-weekday").attr("text-anchor","middle").style("cursor","default").on("click",(function(t){Go(e,r)})),g+=M.height+8;let T=null;r.dividingLineColor?T=r.dividingLineColor:r.color&&(T=r.color);let _=e.graphArea.append("rect").attr("x",0).attr("y",g).attr("width",6.5*u+M.width).attr("height",1).attr("class","tracker-month-dividing-line");T&&_.style("fill",T),g+=1,p.attr("height",g),e.header=p,ko(e.dataArea,0,g)}function Zo(t,e,n,r,i){if(!n||!r)return;let a=r.mode;if("circle"!==a&&"annotation"!==a)return"Unknown month view mode";let l=r.selectedDataset;if(null===l)return;let o=n.datasets.getDatasetById(l);if(!o)return;let s=r.dataset.findIndex((t=>t===l));l<0&&(s=0);let u=r.threshold[s];i.month(),i.daysInMonth();let f=bo("30","tracker-month-label"),c=2.8*Math.max(f.width,f.height),h=c/2.8*1.8/2,d=(c-2*h)/2,g=m(o.getValues());null!==r.yMin[s]&&(g=r.yMin[s]);let p=y(o.getValues());null!==r.yMax[s]&&(p=r.yMax[s]);let v=!0;(null===p||null===g||p<=g)&&(v=!1);const x=i.clone().startOf("month");let A=x.clone().subtract(x.day(),"days");"mon"===r.startWeekOn.toLowerCase()&&(A=A.add(1,"days"));const w=i.clone().endOf("month");let b=w.clone().add(7-w.day()-1,"days");"mon"===r.startWeekOn.toLowerCase()&&(b=b.add(1,"days"));const D=o.getStartDate(),k=o.getEndDate();let C=r.showAnnotation,M=r.annotation,T=M[s],_=r.showAnnotationOfAllTargets,E=[],F=0,S=0,B=0;for(let t=A.clone();t<=b;t.add(1,"days")){t=fo(po(t,n.dateFormat),n.dateFormat),"2021-09-13"===t.format("YYYY-MM-DD")&&(Xo=!1),"mon"===r.startWeekOn.toLowerCase()?(F=t.day()-1,F<0&&(F=6),S=Math.floor(B/7)):(F=t.day(),S=Math.floor(B/7));let e=!0;(t.diff(x)<0||t.diff(w)>0)&&(e=!1);let i=!0;D&&k&&t.diff(D)>=0&&t.diff(k)<=0&&(i=!1);const a=o.getValue(t);Xo&&(console.log(o),console.log(po(t,n.dateFormat)),console.log(a));const l=null!=a&&a>u;let s=null;r.circleColorByValue&&v&&null!==a&&(s=(a-g)/(p-g)),Xo&&(console.log(g),console.log(p),console.log(s));let f=o.getValue(t,1),c=o.getValue(t,-1),h=!1;null!==a&&a>u&&null!==c&&c>u&&(h=!0);let d=!1;null!==a&&a>u&&null!==f&&f>u&&(d=!0),Xo&&(console.log(`preValue: ${c}, curValue: ${a}, nextValue: ${f}`),console.log(r.threshold),console.log(`streakIn: ${h}, streakOut: ${d}`));let y="";if(C)if(_)for(let e of r.dataset){let i=r.dataset.findIndex((t=>t===e));if(i>=0){let a=n.datasets.getDatasetById(e).getValue(t),l=r.threshold[i];null!==a&&a>l&&(y+=M[i])}}else a>u&&(y=T);E.push({date:po(t,n.dateFormat),value:a,scaledValue:s,dayInMonth:t.date(),isInThisMonth:e,isOutOfDataRange:i,row:S,col:F,showCircle:l,streakIn:h,streakOut:d,annotation:y}),B++,Xo&&(Xo=!1)}let N=(F+1)*c,L=Gr().domain([-.5,6.5]).range([0,N]);if("circle"===a&&r.showCircle&&r.showStreak){let t="#69b3a2";r.circleColor?t=r.circleColor:r.color&&(t=r.color),e.dataArea.selectAll("streakIn").data(E.filter((function(t){return t.streakIn}))).enter().append("rect").attr("x",(function(t){return L(t.col)-h-d})).attr("y",(function(t){return L(t.row)-1.5})).attr("width",d).attr("height",3).style("fill",(function(e){return e.showCircle?r.circleColorByValue?null!==e.scaledValue?xn("white",t)(.8*e.scaledValue+.2):"none":t:"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})),e.dataArea.selectAll("streakOut").data(E.filter((function(t){return t.streakOut}))).enter().append("rect").attr("x",(function(t){return L(t.col)+h})).attr("y",(function(t){return L(t.row)-1.5})).attr("width",d).attr("height",3).style("fill",(function(e){return e.showCircle?r.circleColorByValue?null!==e.scaledValue?xn("white",t)(.8*e.scaledValue+.2):"none":t:"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1}))}let I="#69b3a2";r.circleColor?I=r.circleColor:r.color&&(I=r.color),"circle"===a&&r.showCircle&&e.dataArea.selectAll("dot").data(E).enter().append("circle").attr("r",h).attr("cx",(function(t){return L(t.col)})).attr("cy",(function(t){return L(t.row)})).style("fill",(function(t){if(t.showCircle){if(!r.circleColorByValue)return I;if(null!==t.scaledValue){return xn("white",I)(.8*t.scaledValue+.2)}return"none"}return"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})).style("cursor","default");let O=po(window.moment(),n.dateFormat);if("circle"===a&&r.showTodayRing){let t=e.dataArea.selectAll("todayRing").data(E.filter((function(t){return t.date===O}))).enter().append("circle").attr("r",.9*h).attr("cx",(function(t){return L(t.col)})).attr("cy",(function(t){return L(t.row)})).attr("class","tracker-month-today-circle").style("cursor","default");""!==r.todayRingColor?t.style("stroke",r.todayRingColor):t.style("stroke","white")}"circle"===a&&r.showSelectedRing&&e.dataArea.selectAll("selectedRing").data(E).enter().append("circle").attr("r",h).attr("cx",(function(t){return L(t.col)})).attr("cy",(function(t){return L(t.row)})).attr("id",(function(t){return"tracker-selected-circle-"+t.date})).attr("class","tracker-month-selected-circle").style("cursor","default").style("stroke","none"),e.dataArea.selectAll("dayLabel").data(E).enter().append("text").text((function(t){return t.dayInMonth.toString()})).attr("transform",(function(t){return"translate("+L(t.col)+","+(L(t.row)+f.height/4)+")"})).style("fill-opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})).attr("date",(function(t){return t.date})).attr("value",(function(t){return t.value})).attr("valueType",(function(t){return Rl[o.valueType]})).attr("class","tracker-month-label").on("click",(function(t){Go(e,r);let n=Qt(this).attr("date");if(r.selectedDate=n,r.showSelectedRing&&e.dataArea.select("#tracker-selected-circle-"+n).style("stroke",r.selectedRingColor),r.showSelectedValue){let t=Qt(this).attr("value"),n="";if("Time"===Qt(this).attr("valueType")){n=window.moment("00:00","HH:mm",!0).add(parseFloat(t),"seconds").format("HH:mm")}else n=t;e.monitor.text(n)}})).style("cursor","pointer"),"annotation"===a&&C&&e.dataArea.selectAll("dayAnnotation").data(E).enter().append("text").text((function(t){return t.annotation})).attr("transform",(function(t){let e=L(t.col),n=L(t.row)+f.height/4;return t.annotation&&(n+=h),"translate("+e+","+n+")"})).attr("class","tracker-month-annotation");let V=parseFloat(e.svg.attr("width")),P=parseFloat(e.svg.attr("height")),$=parseFloat(e.graphArea.attr("width")),Y=parseFloat(e.graphArea.attr("height")),R=7*c+parseFloat(e.header.attr("height")),z=7*c;R>P&&Do(e.svg,0,R-P),z>V&&Do(e.svg,z-V,0),R>Y&&Do(e.graphArea,0,R-Y),z>$&&Do(e.svg,z-$,0)}function Ko(t,e,n,r,i){n&&Jo&&(Qo(t,e=qo(e,t,n),n,r,i),Zo(0,e,n,r,i),Wo(t,e,n))}function Jo(t,e,n){if(!e||!Jo)return;n.dataset;let r=0;for(let t of e.datasets)t.getQuery().usedAsXDataset||r++;if(0===r)return"No available dataset found";if(jo(e,n),null===n.selectedDataset)return"No available dataset found";let i={};i=qo(i,t,e);let a=null;if(n.initMonth){if(a=go(n.initMonth,e.dateFormat),!a){let t=window.moment(n.initMonth,"YYYY-MM",!0);if(!t.isValid())return"Invalid initMonth";a=t}}else a=e.datasets.getDates().last();a&&(Qo(t,i,e,n,a),Zo(0,i,e,n,a),Wo(t,i,e))}function ts(t,e,n){if(e&&ts)return"Under construction"}function es(t,e,n){if(!e||!n)return;let r=parseFloat(n.dataset);e.datasets.getDatasetById(r),"horizontal"===n.orientation?e.dataAreaSize={width:250,height:24}:"vertical"===n.orientation&&(e.dataAreaSize={width:24,height:250});let i=function(t,e,n){let r={};if(!e||!n)return;let i=Qt(t).append("svg").attr("id","svg").attr("width",e.dataAreaSize.width+e.margin.left+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.top+e.margin.bottom);r.svg=i;let a=i.append("g").attr("id","graphArea").attr("transform","translate("+e.margin.left+","+e.margin.top+")").attr("width",e.dataAreaSize.width+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.bottom);r.graphArea=a;let l=a.append("g").attr("id","dataArea").attr("width",e.dataAreaSize.width).attr("height",e.dataAreaSize.height);return r.dataArea=l,r}(t,e,n),a=function(t,e,n){if(!e||!n)return;let r=n.range,i=r[r.length-1],a=[0,i],l=n.valueUnit,o=function(t){return l&&l.endsWith("%")?jr(0,i,7)(t)+" %":jr(0,i,7)(t)},s=bo(o(i),"tracker-tick-label");if("horizontal"===n.orientation){let n=Gr();n.domain(a).range([0,e.dataAreaSize.width]),t.scale=n;let r=S(n);r.tickFormat(o);let i=t.dataArea.append("g").attr("id","axis").attr("transform","translate(0,"+e.dataAreaSize.height+")").call(r).attr("class","tracker-axis");t.axis=i,i.selectAll("path").style("stroke","none"),i.selectAll("line"),i.selectAll("text").attr("class","tracker-tick-label"),i.attr("width",e.dataAreaSize.width+s.width),i.attr("height",6+s.height),Do(t.svg,+s.width,6+s.height),Do(t.graphArea,+s.width,6+s.height)}else if("vertical"===n.orientation){let n=Gr();n.domain(a).range([e.dataAreaSize.height,0]),t.scale=n;let r=B(n);r.tickFormat(o);let i=t.dataArea.append("g").attr("id","axis").attr("x",0).attr("y",0).call(r).attr("class","tracker-axis");t.axis=i,i.selectAll("path").style("stroke","none"),i.selectAll("line"),i.selectAll("text").attr("class","tracker-tick-label"),i.attr("width",6+s.width),i.attr("height",e.dataAreaSize.width),Do(t.svg,6+s.width,0),Do(t.graphArea,6+s.width,0),ko(t.dataArea,6+s.width,0)}}(i,e,n);if("string"==typeof a)return a;!function(t,e,n){if(!e||!n)return;if(n.title){let r=bo(n.title,"tracker-title-small");if("horizontal"===n.orientation){let i=t.graphArea.append("text").text(n.title).attr("id","title").attr("x",r.width/2).attr("y",e.dataAreaSize.height/2).attr("height",r.height).attr("class","tracker-title-small");t.title=i,Do(t.svg,r.width+6,0),Do(t.graphArea,r.width+6,0),ko(t.dataArea,r.width+6,0)}else if("vertical"===n.orientation){let i=e.dataAreaSize.width/2;r.width>e.dataAreaSize.width&&(Do(t.svg,r.width-e.dataAreaSize.width,0),Do(t.graphArea,r.width-e.dataAreaSize.width,0),ko(t.dataArea,r.width/2-e.dataAreaSize.width/2,0),i=r.width/2);let a=parseFloat(t.axis.attr("width")),l=t.graphArea.append("text").text(n.title).attr("id","title").attr("x",i+a).attr("y",r.height/2).attr("height",r.height).attr("class","tracker-title-small");t.title=l,Do(t.svg,0,r.height+6),Do(t.graphArea,0,r.height+6),ko(t.dataArea,0,r.height+6)}}if(n.valueUnit){let r=bo(n.valueUnit,"tracker-tick-label");if("horizontal"===n.orientation){let i=t.dataArea.append("text").text(n.valueUnit).attr("id","unit").attr("x",-1*(r.width+6)).attr("y",e.dataAreaSize.height+6).attr("height",r.height).attr("class","tracker-tick-label");t.unit=i}else if("vertical"===n.orientation){let i=t.dataArea.append("text").text(n.valueUnit).attr("id","unit").attr("x",e.dataAreaSize.width/2-r.width/2).attr("y",-(r.height/2+6)).attr("height",r.height).attr("class","tracker-tick-label");t.unit=i,Do(t.svg,0,r.height+6),Do(t.graphArea,0,r.height+6),ko(t.dataArea,0,r.height+6)}}}(i,e,n),function(t,e,n){if(!e||!n)return;let r=t.scale,i=n.range,a=n.rangeColor,l=[],o=0;for(let t=0;t<i.length;t++)l.push({start:o,end:i[t],color:a[t]}),o=i[t];"horizontal"===n.orientation?t.dataArea.selectAll("backPanel").data(l).enter().append("rect").attr("x",(function(t,e){return Math.floor(r(t.start))})).attr("y",(function(t){return 0})).attr("width",(function(t,e){return Math.ceil(r(t.end-t.start))})).attr("height",e.dataAreaSize.height).style("fill",(function(t){return t.color})):"vertical"===n.orientation&&t.dataArea.selectAll("backPanel").data(l).enter().append("rect").attr("x",(function(t,e){return 0})).attr("y",(function(t){return Math.floor(r(t.end))})).attr("width",e.dataAreaSize.width).attr("height",(function(t){return e.dataAreaSize.height-Math.floor(r(t.end-t.start))})).style("fill",(function(t){return t.color}))}(i,e,n);let l=function(t,e,n){let r="";if(!e||!n)return;let i=Ro(n.value,e);if("string"==typeof i)return i;let a=i;if(Number.isNaN(a))return r="Invalid input value: "+i,r;let l=n.valueColor,o=t.scale;if("horizontal"===n.orientation){let n=e.dataAreaSize.height/3;t.dataArea.append("rect").attr("x",o(0)).attr("y",n).attr("width",Math.floor(o(a))).attr("height",n).style("fill",l)}else if("vertical"===n.orientation){let n=e.dataAreaSize.width/3;t.dataArea.append("rect").attr("x",n).attr("y",Math.floor(o(a))).attr("width",n).attr("height",e.dataAreaSize.height-Math.floor(o(a))).style("fill",l)}}(i,e,n);if("string"==typeof l)return l;!function(t,e,n){if(!e||!n)return;if(!n.showMarker)return;let r=n.markerValue,i=n.markerColor,a=t.scale;if("horizontal"===n.orientation){let n=2*e.dataAreaSize.height/3;t.dataArea.append("rect").attr("x",a(r)-1.5).attr("y",n/4).attr("width",3).attr("height",n).style("fill",i)}else if("vertical"===n.orientation){let n=2*e.dataAreaSize.width/3;t.dataArea.append("rect").attr("x",n/4).attr("y",a(r)-1.5).attr("width",n).attr("height",3).style("fill",i)}}(i,e,n),function(t,e,n){let r=Qt(t),i=e.svg,a=parseFloat(i.attr("width")),l=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${l}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(l*n.fixedScale).toString()+"px"))}(t,i,e)}function ns(t,e,n){if(!e||!n)return;let r=e.datasets,i=function(t){let e,n;for(const r of t)null!=r&&(void 0===e?r>=r&&(e=n=r):(e>r&&(e=r),n<r&&(n=r)));return[e,n]}(r.getDates()),a=sl().domain(i).range([0,e.dataAreaSize.width]);t.xScale=a;let l=ho(n.xAxisTickInterval),[o,s]=function(t,e){let n=[],r=null;if(e){let r=t[0],i=t[t.length-1];n=hi.range(r.toDate(),i.toDate(),e.asDays())}else{let e=t.length;r=e<=15?hi:e<=60?hi.every(4):e<=105?yi:e<=450?Si:e<=900?Si.every(2):Ni}return[n,r]}(r.getDates(),l),u=function(t,e){if(e){function n(t){return po(window.moment(t),e)}return n}{let r=null,i=t.length;return r=Ri(i<=15||i<=60||i<=105?"%y-%m-%d":i<=450||i<=900?"%y %b":"%Y"),r}}(r.getDates(),n.xAxisTickLabelFormat),f=S(a);o&&0!==o.length?f.tickValues(o):s&&f.ticks(s),u&&f.tickFormat(u);let c=t.dataArea.append("g").attr("id","xAxis").attr("transform","translate(0,"+e.dataAreaSize.height+")").call(f).attr("class","tracker-axis");n.xAxisColor&&c.style("stroke",n.xAxisColor),t.xAxis=c;let h=bo("99-99-99"),d=c.selectAll("text").attr("x",-1*h.height*Math.cos(65/180*Math.PI)).attr("y",0).attr("transform","rotate(-65)").style("text-anchor","end").attr("class","tracker-tick-label");n.xAxisColor&&d.style("fill",n.xAxisColor);let g=h.width*Math.sin(65/180*Math.PI),p=c.append("text").text(n.xAxisLabel).attr("transform","translate("+e.dataAreaSize.width/2+","+(6+g)+")").attr("class","tracker-axis-label");n.xAxisLabelColor&&p.style("fill",n.xAxisLabelColor),c.attr("height",6+g),Do(t.svg,0,6+g),Do(t.graphArea,0,6+g)}function rs(t,e,n,r,i){if(!e||!n)return;let a=e.datasets;if(0===i.length)return;if("left"!==r&&"right"!==r)return;let l=null,o=null,s=null,u=!1;for(let t of i){let e=a.getDatasetById(t);if(!e.getQuery().usedAsXDataset)if((null===l||e.getYMin()<l)&&(l=e.getYMin()),(null===o||e.getYMax()>o)&&(o=e.getYMax()),u=e.valueType===Rl.Time,null===s)s=u;else if(u!==s)return"Not all values in time format"}let f=null;"left"===r?f=n.yMin[0]:"right"===r&&(f=n.yMin[1]);let c=!1;"number"!=typeof f?f=l:c=!0;let h=null;"left"===r?h=n.yMax[0]:"right"===r&&(h=n.yMax[1]);let d=!1;if("number"!=typeof h?h=o:d=!0,h<f){let t=f;f=h,h=t;let e=c;c=d,d=e}let g,p,y=h-f,m=Gr();g=c?f:f-.2*y,p=d?h:h+.2*y,n.GetGraphType()===Yl.Bar&&(p<0&&(p=0),g>0&&(g=0));let v=[g,p];("left"===r&&n.reverseYAxis[0]||"right"===r&&n.reverseYAxis[1])&&(v=[p,g]),m.domain(v).range([e.dataAreaSize.height,0]),"left"===r?t.leftYScale=m:"right"===r&&(t.rightYScale=m);let x="";"left"===r?x=n.yAxisColor[0]:"right"===r&&(x=n.yAxisColor[1]);let A="";"left"===r?A=n.yAxisLabelColor[0]:"right"===r&&(A=n.yAxisLabelColor[1]);let b="";"left"===r?b=n.yAxisLabel[0]:"right"===r&&(b=n.yAxisLabel[1]);let D="",k=null,C=null;"left"===r?(D=n.yAxisUnit[0],k=n.yAxisTickInterval[0],C=n.yAxisTickLabelFormat[0]):"right"===r&&(D=n.yAxisUnit[1],k=n.yAxisTickInterval[1],C=n.yAxisTickLabelFormat[1]);let M,T=null;if(u?T=ho(k):(T=parseFloat(k),Number.isNumber(T)&&!Number.isNaN(T)||(T=null)),"left"===r?M=B(m):"right"===r&&(M=F(2,m)),M){let t=function(t,e,n,r=!1){if(r){if(n){function i(t){return window.moment("00:00","HH:mm",!0).add(t,"seconds").format(n)}return i}{function a(n){const r=Math.abs(e-t);let i=window.moment("00:00","HH:mm",!0).add(n,"seconds").format("HH:mm");return r>43200&&(n<t||n>e||(n-t)/3600%2<1)&&(i=""),i}return a}}if(n){function l(t){return Bo.sprintf("%"+n,t)}return l}return jr(t,e,10)}(g,p,C,u);t&&M.tickFormat(t);let e=function(t,e,n,r=!1){const i=Math.abs(e-t);let a=[];r?a=n&&window.moment.isDuration(n)?w(t,e,Math.abs(n.asSeconds())):i>18e3?w(t=3600*Math.floor(t/3600),e=3600*Math.ceil(e/3600),3600):w(t=1800*Math.floor(t/1800),e=1800*Math.ceil(e/1800),1800):n&&"number"==typeof n&&(a=w(t,e,n));return 0===a.length?null:a}(g,p,T,u);e&&M.tickValues(e)}let _=t.dataArea.append("g").attr("id","yAxis").call(M).attr("class","tracker-axis");"right"==r&&_.attr("transform","translate("+e.dataAreaSize.width+" ,0)"),"left"===r?t.leftYAxis=_:"right"===r&&(t.rightYAxis=_);let E=_.selectAll("path");x&&E.style("stroke",x);let S=_.selectAll("line");x&&S.style("stroke",x);let N=_.selectAll("text").attr("class","tracker-tick-label");x&&N.style("fill",x);let L=0;for(let t of N)if(t.textContent){let e=bo(t.textContent,"tracker-axis-label");e.width>L&&(L=e.width)}""!==D&&(b+=" ("+D+")");let I=bo(b),O=_.append("text").text(b).attr("transform","rotate(-90)").attr("x",-1*e.dataAreaSize.height/2).attr("class","tracker-axis-label");"left"===r?O.attr("y",-6-L-I.height/2):O.attr("y",6+L+I.height),A&&O.style("fill",A);let V=I.height+L+6;_.attr("width",V),Do(t.svg,V,0),Do(t.graphArea,V,0),"left"===r&&(ko(t.dataArea,V,0),t.title&&ko(t.title,V,0))}function is(t,e,n,r,i){if(!e||!n)return;let a=null;if("left"===i?a=t.leftYScale:"right"===i&&(a=t.rightYScale),n.showLine[r.getId()]){let e=function(t,e){var n=fl(!0),r=null,i=Nl,a=null,l=Dl(o);function o(o){var s,u,f,c=(o=Sl(o)).length,h=!1;for(null==r&&(a=i(f=l())),s=0;s<=c;++s)!(s<c&&n(u=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(u,s,o),+e(u,s,o));if(f)return a=null,f+""||null}return t="function"==typeof t?t:void 0===t?Ll:fl(t),e="function"==typeof e?e:void 0===e?Il:fl(e),o.x=function(e){return arguments.length?(t="function"==typeof e?e:fl(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:fl(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:fl(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}().defined((function(t){return null!==t.value})).x((function(e){return t.xScale(e.date)})).y((function(t){return a(t.value)})),i=t.dataArea.append("path").attr("class","tracker-line").style("stroke-width",n.lineWidth[r.getId()]);n.fillGap[r.getId()]?i.datum(Array.from(r).filter((function(t){return null!==t.value}))).attr("d",e):i.datum(r).attr("d",e),n.lineColor[r.getId()]&&i.style("stroke",n.lineColor[r.getId()])}}function as(t,e,n,r,i){if(!e||!n)return;let a=null;if("left"===i?a=t.leftYScale:"right"===i&&(a=t.rightYScale),n.showPoint[r.getId()]){let i=t.dataArea.selectAll("dot").data(Array.from(r).filter((function(t){return null!==t.value}))).enter().append("circle").attr("r",n.pointSize[r.getId()]).attr("cx",(function(e){return t.xScale(e.date)})).attr("cy",(function(t){return a(t.value)})).attr("date",(function(t){return Ri("%y-%m-%d")(t.date)})).attr("value",(function(t){if(null!==t.value)return Number.isInteger(t.value)?t.value.toFixed(0):t.value.toFixed(2)})).attr("valueType",Rl[r.valueType]).attr("class","tracker-dot");n.pointColor[r.getId()]&&(i.style("fill",n.pointColor[r.getId()]),n.pointBorderColor[r.getId()]&&n.pointBorderWidth[r.getId()]>0&&(i.style("stroke",n.pointBorderColor[r.getId()]),i.style("stroke-width",n.pointBorderWidth[r.getId()]))),n.allowInspectData&&function(t,e,n){let r=e.dataArea.append("svg").style("opacity",0),i=r.append("rect").attr("x",0).attr("y",0),a=r.append("text"),l=a.append("tspan").attr("class","tracker-tooltip-label"),o=a.append("tspan").attr("class","tracker-tooltip-label"),s=3,u=3;t.on("mouseenter",(function(t){const[e,f]=function(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}(t);let c=0,h=0,d="date: "+Qt(this).attr("date"),g=bo(d,"tracker-tooltip-label");l.text(d),g.width>c&&(c=g.width),h+=g.height,l.attr("x",s).attr("y",h);let p="value: ",y=Qt(this).attr("valueType"),m=Qt(this).attr("value");if("Time"===y){p+=window.moment("00:00","HH:mm",!0).add(parseFloat(m),"seconds").format("HH:mm"),o.text(p)}else p+=m,o.text(p);let v=bo(p,"tracker-tooltip-label");v.width>c&&(c=v.width),h+=u+v.height,o.attr("x",s).attr("y",h),c+=2*s,h+=2*u,a.attr("width",c).attr("height",h),i.attr("width",c).attr("height",h).attr("class","tracker-tooltip");let x=e,A=f,w=12,b=12;x=e+w+c>n.dataAreaSize.width?e-c-w:e+w,A=f-b-h<0?f+b:f-b-h,r.attr("x",x).attr("y",A),r.transition().duration(200).style("opacity",1)})).on("mouseleave",(function(){r.transition().duration(500).style("opacity",0)}))}(i,t,e)}}function ls(t,e,n,r,i,a,l){if(!e||!n)return;let o=e.dataAreaSize.width/r.getLength(),s=o,u=a,f=l;o-1>0&&(s=o-1),e.stack?(u=0,f=1):s/=l;let c=null;"left"===i?c=t.leftYScale:"right"===i&&(c=t.rightYScale);let h=t.dataArea.selectAll("bar").data(Array.from(r).filter((function(t){return null!==t.value}))).enter().append("rect").attr("x",(function(e,n){if(0===n){let n=u+1-f/2;if(n<1)return t.xScale(e.date)-o/2+u*s+n*s}return t.xScale(e.date)-o/2+u*s})).attr("y",(function(t){return c(Math.max(t.value,0))})).attr("width",(function(t,e){if(0===e){let t=u+1-f/2;return t<0?0:t<1?s*t:s}if(e===r.getLength()-1){let t=1-(u+1-f/2);return t<0?0:t<1?s*t:s}return s})).attr("height",(function(t){if(null!==t.value)return Math.abs(c(t.value)-c(0))})).attr("class","tracker-bar");n.barColor[r.getId()]&&h.style("fill",n.barColor[r.getId()])}function os(t,e,n){let r=t.svg;t.graphArea;let i=t.dataArea,a=t.title,l=t.xAxis,o=t.leftYAxis,s=t.rightYAxis,u=0;a&&(u=parseFloat(a.attr("height")));let f=parseFloat(l.attr("height")),c=0;o&&(c=parseFloat(o.attr("width")));let h=0;s&&(h=parseFloat(s.attr("width")));let d=e.datasets,g=d.getXDatasetIds(),p=d.getNames(),y=p.map((function(t){return bo(t,"tracker-legend-label")})),m=0,v=0;for(let t=0;t<p.length;t++)g.includes(t)||y[t].width>v&&(v=y[t].width,m=t);let x=v/p[m].length,A=y[m].height,w=p.length-g.length,D=2*x,k=A,C=2*x,M=0,T=0;"vertical"===n.legendOrientation?(M=3*D+C+v,T=(w+1)*k):"horizontal"===n.legendOrientation&&(M=(2*D+C)*w+D+b(y,(function(t,e){return g.includes(e)?0:t.width})),T=k+A);let _=0,E=0;if("top"===n.legendPosition)_=c+e.dataAreaSize.width/2-M/2,E=u,Do(r,0,T+k),ko(i,0,T+k);else if("bottom"===n.legendPosition)_=c+e.dataAreaSize.width/2-M/2,E=u+e.dataAreaSize.height+f+k,Do(r,0,T+k);else if("left"===n.legendPosition)_=0,E=u+e.dataAreaSize.height/2-T/2,Do(r,M+D,0),ko(i,M+D,0);else{if("right"!==n.legendPosition)return;_=e.dataAreaSize.width+c+h+D,E=u+e.dataAreaSize.height/2-T/2,Do(r,M+D,0)}let F=t.graphArea.append("g").attr("id","legend").attr("transform","translate("+_+","+E+")"),S=F.append("rect").attr("class","tracker-legend").attr("width",M).attr("height",T);n.legendBgColor&&S.style("fill",n.legendBgColor),n.legendBorderColor&&S.style("stroke",n.legendBorderColor);let B=D,N=A,L=B+D+C,I=N;if("vertical"===n.legendOrientation){n.GetGraphType()===Yl.Line?(F.selectAll("markers").data(p).enter().append("line").attr("x1",B).attr("x2",B+C).attr("y1",(function(t,e){let n=g.filter((t=>t<e)).length;return N+(e-=n)*k})).attr("y2",(function(t,e){let n=g.filter((t=>t<e)).length;return N+(e-=n)*k})).style("stroke",(function(t,e){if(!g.includes(e))return n.lineColor[e]})),F.selectAll("markers").data(p).enter().append("circle").attr("cx",B+C/2).attr("cy",(function(t,e){let n=g.filter((t=>t<e)).length;return N+(e-=n)*k})).attr("r",(function(t,e){if(!g.includes(e))return n.showPoint[e]?n.pointSize[e]:0})).style("fill",(function(t,e){if(!g.includes(e))return n.pointColor[e]}))):n.GetGraphType()===Yl.Bar&&F.selectAll("markers").data(p).enter().append("rect").attr("x",B).attr("y",(function(t,e){let n=g.filter((t=>t<e)).length;return N+(e-=n)*k-A/2})).attr("width",C).attr("height",A).style("fill",(function(t,e){if(!g.includes(e))return n.barColor[e]}));let t=F.selectAll("labels").data(p).enter().append("text").attr("x",L).attr("y",(function(t,e){let n=g.filter((t=>t<e)).length;return I+(e-=n)*k})).text((function(t,e){return g.includes(e)?"":t})).style("alignment-baseline","middle").attr("class","tracker-legend-label");n.GetGraphType()===Yl.Line?t.style("fill",(function(t,e){if(!g.includes(e))return n.lineColor[e]})):n.GetGraphType()===Yl.Bar&&t.style("fill",(function(t,e){if(!g.includes(e))return n.barColor[e]}))}else if("horizontal"===n.legendOrientation){n.GetGraphType()===Yl.Line?(F.selectAll("markers").data(p).enter().append("line").attr("x1",(function(t,e){let n=D;for(let[t,r]of y.entries())if(!g.includes(t)){if(!(t<e))break;n+=C+D+r.width+D}return n})).attr("x2",(function(t,e){let n=D+C;for(let[t,r]of y.entries())if(!g.includes(t)){if(!(t<e))break;n+=D+r.width+D+C}return n})).attr("y1",N).attr("y2",N).style("stroke",(function(t,e){if(!g.includes(e))return n.lineColor[e]})),F.selectAll("markers").data(p).enter().append("circle").attr("cx",(function(t,e){let n=D+C/2;for(let[t,r]of y.entries())if(!g.includes(t)){if(!(t<e))break;n+=C/2+D+r.width+D+C/2}return n})).attr("cy",N).attr("r",(function(t,e){if(!g.includes(e))return n.showPoint[e]?n.pointSize[e]:0})).style("fill",(function(t,e){if(!g.includes(e))return n.pointColor[e]}))):n.GetGraphType()===Yl.Bar&&F.selectAll("markers").data(p.filter(((t,e)=>!g.includes(e)))).enter().append("rect").attr("x",(function(t,e){let n=D;for(let[t,r]of y.entries())if(!g.includes(t)){if(!(t<e))break;n+=C+D+r.width+D}return n})).attr("y",N-A/2).attr("width",C).attr("height",A).style("fill",(function(t,e){if(!g.includes(e))return n.barColor[e]}));let t=F.selectAll("labels").data(p).enter().append("text").attr("x",(function(t,e){let n=D+C+D;for(let[t,r]of y.entries())if(!g.includes(t)){if(!(t<e))break;n+=r.width+D+C+D}return n})).attr("y",I).text((function(t,e){return g.includes(e)?"":t})).style("alignment-baseline","middle").attr("class","tracker-legend-label");n.GetGraphType()===Yl.Line?t.style("fill",(function(t,e){if(!g.includes(e))return n.lineColor[e]})):n.GetGraphType()===Yl.Bar&&t.style("fill",(function(t,e){if(!g.includes(e))return n.barColor[e]}))}}function ss(t,e,n){if(!e||!n)return;if(!n.title)return;let r=bo(n.title,"tracker-title"),i=t.graphArea.append("text").text(n.title).attr("id","title").attr("transform","translate("+e.dataAreaSize.width/2+","+r.height/2+")").attr("height",r.height).attr("class","tracker-title");t.title=i,Do(t.svg,0,r.height),Do(t.graphArea,0,r.height),ko(t.dataArea,0,r.height)}function us(t,e,n){let r=Qt(t),i=e.svg,a=parseFloat(i.attr("width")),l=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${l}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(l*n.fixedScale).toString()+"px"))}function fs(t,e){let n={},r=Qt(t).append("svg").attr("id","svg").attr("width",e.dataAreaSize.width+e.margin.left+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.top+e.margin.bottom);n.svg=r;let i=r.append("g").attr("id","graphArea").attr("transform","translate("+e.margin.left+","+e.margin.top+")").attr("width",e.dataAreaSize.width+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.bottom);n.graphArea=i;let a=i.append("g").attr("id","dataArea").attr("width",e.dataAreaSize.width).attr("height",e.dataAreaSize.height);return n.dataArea=a,n}function cs(t,e,n){if(!e||!n)return;let r=fs(t,e);ss(r,e,n),ns(r,e,n);let i=[],a=[],l=e.datasets.getXDatasetIds();for(let t=0;t<n.yAxisLocation.length;t++){if(l.includes(t))continue;let e=n.yAxisLocation[t];"left"===e.toLowerCase()?i.push(t):"right"===e.toLocaleLowerCase()&&a.push(t)}let o=rs(r,e,n,"left",i);if("string"==typeof o)return o;if(r.leftYAxis&&r.leftYScale)for(let t of i){let i=e.datasets.getDatasetById(t);i.getQuery().usedAsXDataset||(is(r,e,n,i,"left"),as(r,e,n,i,"left"))}let s=rs(r,e,n,"right",a);if("string"==typeof s)return s;if(r.rightYAxis&&r.rightYScale)for(let t of a){let i=e.datasets.getDatasetById(t);i.getQuery().usedAsXDataset||(is(r,e,n,i,"right"),as(r,e,n,i,"right"))}n.showLegend&&os(r,e,n),us(t,r,e)}function hs(t,e,n){if(!e||!n)return;let r=fs(t,e);ss(r,e,n),ns(r,e,n);let i=[],a=[],l=e.datasets.getXDatasetIds();if(e.stack)for(let t=n.yAxisLocation.length-1;t>=0;t--){if(l.includes(t))continue;let e=n.yAxisLocation[t];"left"===e.toLowerCase()?i.push(t):"right"===e.toLocaleLowerCase()&&a.push(t)}else for(let t=0;t<n.yAxisLocation.length;t++){if(l.includes(t))continue;let e=n.yAxisLocation[t];"left"===e.toLowerCase()?i.push(t):"right"===e.toLocaleLowerCase()&&a.push(t)}let o=rs(r,e,n,"left",i);if("string"==typeof o)return o;let s=i.length+a.length,u=0;if(r.leftYAxis&&r.leftYScale)for(let t of i){let i=e.datasets.getDatasetById(t);i.getQuery().usedAsXDataset||(ls(r,e,n,i,"left",u,s),u++)}let f=rs(r,e,n,"right",a);if("string"==typeof f)return f;if(r.rightYAxis&&r.rightYScale)for(let t of a){let i=e.datasets.getDatasetById(t);i.getQuery().usedAsXDataset||(ls(r,e,n,i,"right",u,s),u++)}n.showLegend&&os(r,e,n),us(t,r,e)}function ds(t){switch(t=t.trim().toLowerCase()){case"true":case"1":case"on":case"yes":return!0;case"false":case"0":case"off":case"no":return!1}return null}function gs(t){return"tag"===t.toLowerCase()||"text"===t.toLowerCase()||"frontmatter"===t.toLowerCase()||"wiki"===t.toLowerCase()||"wiki.link"===t.toLowerCase()||"wiki.display"===t.toLowerCase()||"dvfield"===t.toLowerCase()||"table"===t.toLowerCase()||"filemeta"===t.toLowerCase()||"task"===t.toLowerCase()||"task.all"===t.toLowerCase()||"task.done"===t.toLowerCase()||"task.notdone"===t.toLowerCase()}function ps(t){return"left"===t||"right"===t||"none"===t}function ys(t){return!0}function ms(t){const e="::::::tracker::::::";let n=t.split("\\,").join(e).split(",");for(let t=0;t<n.length;t++)n[t]=n[t].split(e).join(",");return n}function vs(t,e,n,r,i){let a=[],l="",o=0;for(;n>a.length;)a.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return l="Too many inputs for parameter '"+t+"'",l;if(0===e.length)return l="Empty array not allowd for "+t,l;for(let n=0;n<a.length;n++)if(n<e.length){let i=e[n],s=null;if(n>0&&(s=e[n-1].trim()),"string"==typeof i){if(i=i.trim(),""!==i){l="Invalid inputs for "+t;break}a[n]=null!==s?s:r}else{if("boolean"!=typeof i){l="Invalid inputs for "+t;break}a[n]=i,o++}}else{let t=e[e.length-1];a[n]=o>0?t:r}}}else if("string"==typeof e){let i=ms(e);if(i.length>1){if(i.length>n)return l="Too many inputs for parameter '"+t+"'",l;for(let e=0;e<a.length;e++)if(e<i.length){let n=i[e].trim(),s=null;if(e>0&&(s=ds(i[e-1].trim())),""===n)a[e]=null!==s?s:r;else{let r=ds(n);if(null===r){l="Invalid inputs for "+t;break}a[e]=r,o++}}else{let t=ds(i[i.length-1].trim());a[e]=o>0&&null!==t?t:r}}else if(""===e);else{let n=ds(e);if(null!==n){a[0]=n,o++;for(let t=1;t<a.length;t++)a[t]=n}else l="Invalid inputs for "+t}}else if("boolean"==typeof e){a[0]=e,o++;for(let t=1;t<a.length;t++)a[t]=e}else l="Invalid inputs for "+t;return""!==l?l:a}function xs(t,e,n,r,i){let a=[],l="",o=0;for(;n>a.length;)a.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return l="Too many inputs for parameter '"+t+"'",l;if(0===e.length)return l="Empty array not allowd for "+t,l;for(let n=0;n<a.length;n++)if(n<e.length){let i=e[n],s=null;if(n>0&&(s=e[n-1].trim()),"string"==typeof i){if(i=i.trim(),""!==i){l="Invalid inputs for "+t;break}a[n]=null!==s?s:r}else{if("number"!=typeof i){l="Invalid inputs for "+t;break}a[n]=i,o++}}else{let t=e[e.length-1];a[n]=o>0?t:r}}}else if("string"==typeof e){let i=ms(e);if(i.length>1){if(i.length>n)return l="Too many inputs for parameter '"+t+"'",l;for(let n=0;n<a.length;n++)if(n<i.length){let e=i[n].trim(),s=null;if(n>0&&(s=wo(i[n-1].trim()).value),""===e)null!==s&&Number.isNumber(s)?a[n]=s:a[n]=r;else{let r=wo(e).value;if(null===r){l="Invalid inputs for "+t;break}a[n]=r,o++}}else{let t=wo(i[e.length-1].trim()).value;a[n]=o>0&&null!==t?t:r}}else if(""===e);else{let n=wo(e).value;if(null!==n){a[0]=n,o++;for(let t=1;t<a.length;t++)a[t]=n}else l="Invalid inputs for "+t}}else if("number"==typeof e)if(Number.isNumber(e)){a[0]=e,o++;for(let t=1;t<a.length;t++)a[t]=e}else l="Invalid inputs for "+t;else l="Invalid inputs for "+t;return""!==l?l:a}function As(t,e){return"string"==typeof t?Ao(t):"number"==typeof t?t.toString():e}function ws(t,e,n,r,i,a){let l=[],o="",s=0;for(;n>l.length;)l.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return o="Too many inputs for parameter '"+t+"'",o;if(0===e.length)return o="Empty array not allowd for "+t,o;for(let n=0;n<l.length;n++)if(n<e.length){let a=e[n],u=null;if(n>0&&(u=e[n-1].trim()),"string"!=typeof a){o="Invalid inputs for "+t;break}if(a=a.trim(),""===a)l[n]=null!==u?u:r;else if(i){if(!i(a)){o="Invalid inputs for "+t;break}l[n]=a,s++}else l[n]=a,s++}else{let t=e[e.length-1].trim();l[n]=s>0?t:r}}}else if("string"==typeof e){let a=ms(e);if(a.length>1){if(a.length>n)return o="Too many inputs for parameter '"+t+"'",o;for(let e=0;e<l.length;e++)if(e<a.length){let n=a[e].trim(),u=null;if(e>0&&(u=a[e-1].trim()),""===n)l[e]=null!==u?u:r;else if(i){if(!i(n)){o="Invalid inputs for "+t;break}l[e]=n,s++}else l[e]=n,s++}else{let t=a[a.length-1].trim();l[e]=s>0?t:r}}else if(""===e);else if(i)if(i(e)){l[0]=e,s++;for(let t=1;t<l.length;t++)l[t]=e}else o="Invalid inputs for "+t;else{l[0]=e,s++;for(let t=1;t<l.length;t++)l[t]=e}}else if("number"==typeof e){let n=e.toString();if(i)if(i(n)){l[0]=n,s++;for(let t=1;t<l.length;t++)l[t]=n}else o="Invalid inputs for "+t;else{l[0]=n,s++;for(let t=1;t<l.length;t++)l[t]=n}}else o="Invalid inputs for "+t;if(a||0!==s||(o="No valid input for "+t),""!==o)return o;for(let t=0;t<l.length;t++)l[t]=Ao(l[t]);return l}function bs(t,e){let n=[];if(null==e)return n;if("object"==typeof e){if(Array.isArray(e))for(let r of e)if("string"==typeof r){let e=parseFloat(r);if(!Number.isNumber(e)){return`Parameter '${t}' accepts only numbers`}n.push(e)}}else if("string"==typeof e){let r=ms(e);if(r.length>1)for(let e of r){let r=parseFloat(e.trim());if(Number.isNaN(r)){return`Parameter '${t}' accepts only numbers`}n.push(r)}else{if(""===e){return`Empty ${t} is not allowed.`}{let r=parseFloat(e);if(!Number.isNumber(r)){return`Parameter '${t}' accepts only numbers`}n.push(r)}}}else{if("number"!=typeof e){return`Invalid ${t}`}n.push(e)}return n}function Ds(t,e){let n=[];if(null==e)return n;if("object"==typeof e){if(Array.isArray(e))for(let t of e)"string"==typeof t&&n.push(t.trim())}else{if("string"!=typeof e){return`Invalid ${t}`}{let r=ms(e);if(r.length>1)for(let t of r)n.push(t.trim());else{if(""===e){return`Empty ${t} is not allowed.`}n.push(e)}}}for(let t=0;t<n.length;t++)n[t]=Ao(n[t]);return n}function ks(t,e){t&&(e.title=As(null==t?void 0:t.title,e.title),e.xAxisLabel=As(null==t?void 0:t.xAxisLabel,e.xAxisLabel),e.xAxisColor=As(null==t?void 0:t.xAxisColor,e.xAxisColor),e.xAxisLabelColor=As(null==t?void 0:t.xAxisLabelColor,e.xAxisLabelColor),"boolean"==typeof t.allowInspectData&&(e.allowInspectData=t.allowInspectData),"boolean"==typeof t.showLegend&&(e.showLegend=t.showLegend),"string"==typeof t.legendPosition?e.legendPosition=t.legendPosition:e.legendPosition="bottom","string"==typeof t.legendOrientation?e.legendOrientation=t.legendOrientation:"top"===e.legendPosition||"bottom"===e.legendPosition?e.legendOrientation="horizontal":"left"===e.legendPosition||"right"===e.legendPosition?e.legendOrientation="vertical":e.legendOrientation="horizontal",e.legendBgColor=As(null==t?void 0:t.legendBgColor,e.legendBgColor),e.legendBorderColor=As(null==t?void 0:t.legendBorderColor,e.legendBorderColor));let n=ws("yAxisLabel",null==t?void 0:t.yAxisLabel,2,"Value",null,!0);if("string"==typeof n)return n;if(n.length>2)return"yAxisLabel accepts not more than two values for left and right y-axes";e.yAxisLabel=n;let r=ws("yAxisColor",null==t?void 0:t.yAxisColor,2,"",ys,!0);if("string"==typeof r)return r;if(r.length>2)return"yAxisColor accepts not more than two values for left and right y-axes";e.yAxisColor=r;let i=ws("yAxisLabelColor",null==t?void 0:t.yAxisLabelColor,2,"",ys,!0);if("string"==typeof i)return i;if(i.length>2)return"yAxisLabelColor accepts not more than two values for left and right y-axes";e.yAxisLabelColor=i;let a=ws("yAxisUnit",null==t?void 0:t.yAxisUnit,2,"",null,!0);if("string"==typeof a)return a;if(a.length>2)return"yAxisUnit accepts not more than two values for left and right y-axes";e.yAxisUnit=a,e.xAxisTickInterval=As(null==t?void 0:t.xAxisTickInterval,e.xAxisTickInterval);let l=ws("yAxisTickInterval",null==t?void 0:t.yAxisTickInterval,2,null,null,!0);if("string"==typeof l)return l;if(l.length>2)return"yAxisTickInterval accepts not more than two values for left and right y-axes";e.yAxisTickInterval=l,e.xAxisTickLabelFormat=As(null==t?void 0:t.xAxisTickLabelFormat,e.xAxisTickLabelFormat);let o=ws("yAxisTickLabelFormat",null==t?void 0:t.yAxisTickLabelFormat,2,null,null,!0);if("string"==typeof o)return o;if(o.length>2)return"yAxisTickLabelFormat accepts not more than two values for left and right y-axes";e.yAxisTickLabelFormat=o;let s=xs("yMin",null==t?void 0:t.yMin,2,null);if("string"==typeof s)return s;if(s.length>2)return"yMin accepts not more than two values for left and right y-axes";e.yMin=s;let u=xs("yMax",null==t?void 0:t.yMax,2,null);if("string"==typeof u)return u;if(u.length>2)return"yMax accepts not more than two values for left and right y-axes";e.yMax=u;let f=vs("reverseYAxis",null==t?void 0:t.reverseYAxis,2,!1);return"string"==typeof f?f:f.length>2?"reverseYAxis accepts not more than two values for left and right y-axes":void(e.reverseYAxis=f)}function Cs(t){let e=[];if(null!==t){const n=Object.keys(t);for(let t of n)e.push(t.toString())}return e}function Ms(t,e){return fo(uo(t.basename,e.dateFormatPrefix,e.dateFormatSuffix),e.dateFormat)}function Ts(t,e,n){let r=window.moment(""),i=t.frontmatter;if(i&&vo(i,e.getTarget())){let t=vo(i,e.getTarget());"string"==typeof t&&(t=uo(t,n.dateFormatPrefix,n.dateFormatSuffix),r=fo(t,n.dateFormat))}return r}function _s(t,e,n){let r,i=window.moment(""),a=new RegExp(e,"gm");for(;r=a.exec(t);)if(void 0!==r.groups&&void 0!==r.groups.value){let t=r.groups.value.trim();if(t=uo(t,n.dateFormatPrefix,n.dateFormatSuffix),i=fo(t,n.dateFormat),i.isValid())return i}return i}function Es(t,e,n){window.moment("");let r=e.getTarget();return e.getParentTarget()&&(r=e.getParentTarget()),_s(t,"(^|\\s)#"+r+"(\\/[\\w-]+)*(:(?<value>[\\d\\.\\/-]*)[a-zA-Z]*)?([\\.!,\\?;~-]*)?(\\s|$)",n)}function Fs(t,e,n){return window.moment(""),_s(t,e.getTarget(),n)}function Ss(t,e,n){window.moment("");let r=e.getTarget();return e.getParentTarget()&&(r=e.getParentTarget()),r=r.replace("-","[\\s\\-]"),_s(t,"(^| |\\t)\\*{0,2}"+r+"\\*{0,2}(::[ |\\t]*(?<value>[\\d\\.\\/\\-\\w,@; \\t:]*))(\\r\\?\\n|\\r|$)",n)}function Bs(e,n,r){let i=window.moment("");if(e&&e instanceof t.TFile){let t=n.getTarget();if("cDate"===t){i=yo(e.stat.ctime,r.dateFormat)}else if("mDate"===t){i=yo(e.stat.mtime,r.dateFormat)}else"name"===t&&(i=Ms(e,r))}return i}function Ns(t,e,n){window.moment("");let r=e.getType(),i=e.getTarget();return i=r===$l.Task?"\\[[\\sx]\\]\\s"+i:r===$l.TaskDone?"\\[x\\]\\s"+i:r===$l.TaskNotDone?"\\[\\s\\]\\s"+i:"\\[[\\sx]\\]\\s"+i,_s(t,i,n)}function Ls(t,e,n,r){if(t.has(e)){t.get(e).push({query:n,value:r})}else{let i=new Array;i.push({query:n,value:r}),t.set(e,i)}}function Is(t,e,n,r,i,a){let l,o=new RegExp(e,"gmu"),s=0,u=!1;for(;l=o.exec(t);)if(a.ignoreAttachedValue[n.getId()])s+=a.constValue[n.getId()],u=!0,n.addNumTargets();else if(void 0!==l.groups&&void 0!==l.groups.value){let t=l.groups.value.trim().split(n.getSeparator());if(!t)continue;if(1===t.length){let e=wo(t[0].trim(),a.textValueMap);null!==e.value&&(e.type===Rl.Time?(s=e.value,u=!0,n.valueType=Rl.Time,n.addNumTargets()):a.ignoreZeroValue[n.getId()]&&0===e.value||(s+=e.value,u=!0,n.addNumTargets()))}else if(t.length>n.getAccessor()&&n.getAccessor()>=0){let e=wo(t[n.getAccessor()].trim(),a.textValueMap);null!==e.value&&(e.type===Rl.Time?(s=e.value,u=!0,n.valueType=Rl.Time,n.addNumTargets()):(s+=e.value,u=!0,n.addNumTargets()))}}else s+=a.constValue[n.getId()],u=!0,n.addNumTargets();if(u){return Ls(r,i.get(a.xDataset[n.getId()]),n,s),!0}return!1}function Os(e,n,r,i,a,l){if(e&&e instanceof t.TFile){let t=r.getTarget(),o=l.get(i.xDataset[r.getId()]);if("cDate"===t){let t=e.stat.ctime;return r.valueType=Rl.Date,r.addNumTargets(),Ls(a,o,r,t),!0}if("mDate"===t){let t=e.stat.mtime;return r.valueType=Rl.Date,r.addNumTargets(),Ls(a,o,r,t),!0}if("size"===t){let t=e.stat.size;return r.addNumTargets(),Ls(a,o,r,t),!0}if("numWords"===t){return Ls(a,o,r,function(t){t=Co(t);var e=new RegExp(["(?:[0-9]+(?:(?:,|\\.)[0-9]+)*|[\\-"+/A-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source+"])+",/[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5]{1}/.source].join("|"),"g");return(t.match(e)||[]).length}(n)),!0}if("numChars"===t){let t=n.length;return r.addNumTargets(),Ls(a,o,r,t),!0}if("numSentences"===t){let t=function(t){return(((t=Co(t))||"").match(/[^.。!!??\s][^.。!!??]*(?:[.!?](?!['‘’"“”「」『』]?\s|$)[^.。!!??]*)*[.。!!??]?['’"”」』]?(?=\s||$)/gm)||[]).length}(n);return r.addNumTargets(),Ls(a,o,r,t),!0}if("name"===t){let t=0,n=!1,l=wo(e.basename,i.textValueMap);null!==l.value&&(l.type===Rl.Time?(t=l.value,n=!0,r.valueType=Rl.Time,r.addNumTargets()):i.ignoreZeroValue[r.getId()]&&0===l.value||(t+=l.value,n=!0,r.addNumTargets()));let s=null;if(n&&(s=t),null!==s)return Ls(a,o,r,s),!0}}return!1}const Vs={folder:"/",dateFormat:"YYYY-MM-DD"};class Ps extends t.PluginSettingTab{constructor(t,e){super(t,e),this.plugin=e}display(){let{containerEl:e}=this;e.empty(),new t.Setting(e).setName("Default folder location").setDesc("Files in this folder will be parsed and used as input data of the tracker plugin.\nYou can also override it using 'folder' argument in the tracker codeblock.").addText((t=>t.setPlaceholder("Folder Path").setValue(this.plugin.settings.folder).onChange((async t=>{this.plugin.settings.folder=t,await this.plugin.saveSettings()})))),new t.Setting(e).setName("Default date format").setDesc("This format is used to parse the date in your diary title.\nYou can also override it using 'dateFormat' argument in the tracker codeblock.").addText((t=>t.setPlaceholder("YYYY-MM-DD").setValue(this.plugin.settings.dateFormat).onChange((async t=>{this.plugin.settings.dateFormat=t,await this.plugin.saveSettings()}))))}}class $s extends t.Plugin{async onload(){console.log("loading obsidian-tracker plugin"),await this.loadSettings(),this.addSettingTab(new Ps(this.app,this)),this.registerMarkdownCodeBlockProcessor("tracker",this.postprocessor.bind(this)),this.addCommand({id:"add-line-chart-tracker",name:"Add Line Chart Tracker",callback:()=>this.addCodeBlock(Yl.Line)}),this.addCommand({id:"add-bar-chart-tracker",name:"Add Bar Chart Tracker",callback:()=>this.addCodeBlock(Yl.Bar)}),this.addCommand({id:"add-summary-tracker",name:"Add Summary Tracker",callback:()=>this.addCodeBlock(Yl.Summary)})}async loadSettings(){this.settings=Object.assign({},Vs,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}renderErrorMessage(t,e,n){!function(t,e){Qt(t).select("#svg").remove(),Qt(t).append("div").text(e).style("background-color","white").style("margin-bottom","20px").style("padding","10px").style("color","red")}(e,t),n.appendChild(e)}onunload(){console.log("unloading obsidian-tracker plugin")}getFilesInFolder(e,n=!0){let r=[];for(let i of e.children)i instanceof t.TFile?"md"===i.extension&&r.push(i):i instanceof t.TFolder&&n&&(r=r.concat(this.getFilesInFolder(i)));return r}async getFiles(e,n,r=!0){if(!e)return;let i=n.folder,a=n.specifiedFilesOnly,l=n.file,o=n.fileContainsLinkedFiles,s=n.fileMultiplierAfterLink;if(!a){let n=this.app.vault.getAbstractFileByPath(t.normalizePath(i));if(n&&n instanceof t.TFolder){let t=this.getFilesInFolder(n);for(let n of t)e.push(n)}}for(let n of l){let r=n;r.endsWith(".md")||(r+=".md"),r=t.normalizePath(r);let i=this.app.vault.getAbstractFileByPath(r);i&&i instanceof t.TFile&&e.push(i)}let u=1,f=!0;""===s?f=!1:/^[0-9]+$/.test(s)?(u=parseFloat(s),f=!1):/\?<value>/.test(s)||(f=!1);for(let r of o){r.endsWith(".md")||(r+=".md");let i=this.app.vault.getAbstractFileByPath(t.normalizePath(r));if(i&&i instanceof t.TFile){let a=this.app.metadataCache.getFileCache(i),l=(await this.app.vault.adapter.read(i.path)).split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/);if(!(null==a?void 0:a.links))continue;for(let i of a.links){if(!i)continue;let a=this.app.metadataCache.getFirstLinkpathDest(i.link,r);if(a&&a instanceof t.TFile){if(f){let t=i.position.end.line;if(t>=0&&t<l.length){let e=l[t].split(i.original);if(2===e.length){let t,r=e[1].trim(),i=new RegExp(s,"gm");for(;t=i.exec(r);)if(void 0!==t.groups&&void 0!==t.groups.value){let e=wo(t.groups.value.trim(),n.textValueMap);if(null!==e.value){u=e.value;break}}}}}for(let t=0;t<u;t++)e.push(a)}}}}}async postprocessor(e,n,r){const i=document.createElement("div");let a=e.trim(),l=this.app.vault.getConfig("tabSize"),o=Array(l).fill(" ").join("");a=a.replace(/\t/gm,o);let s=function(e,n){let r;try{r=t.parseYaml(e)}catch(t){let e="Error parsing YAML";return console.log(t),e}if(!r)return"Error parsing YAML";let i=Cs(r),a="";if(!i.includes("searchTarget"))return"Parameter 'searchTarget' not found in YAML";let l=[];if("object"==typeof r.searchTarget&&null!==r.searchTarget){if(Array.isArray(r.searchTarget))for(let t of r.searchTarget)if("string"==typeof t){if(""===t){a="Empty search target is not allowed.";break}l.push(t)}}else if("string"==typeof r.searchTarget){let t=ms(r.searchTarget);if(t.length>1)for(let e of t){if(e=e.trim(),""===e){a="Empty search target is not allowed.";break}l.push(e)}else""===r.searchTarget?a="Empty search target is not allowed.":l.push(r.searchTarget)}else a="Invalid search target (searchTarget)";for(let t=0;t<l.length;t++)l[t]=Ao(l[t]);if(""!==a)return a;let o=l.length;if(!i.includes("searchType"))return"Parameter 'searchType' not found in YAML";let s=[],u=ws("searchType",r.searchType,o,"",gs,!1);if("string"==typeof u)return u;for(let t of u)switch(t.toLowerCase()){case"tag":s.push($l.Tag);break;case"frontmatter":s.push($l.Frontmatter);break;case"wiki":s.push($l.Wiki);break;case"wiki.link":s.push($l.WikiLink);break;case"wiki.display":s.push($l.WikiDisplay);break;case"text":s.push($l.Text);break;case"dvfield":s.push($l.dvField);break;case"table":s.push($l.Table);break;case"filemeta":s.push($l.FileMeta);break;case"task":case"task.all":s.push($l.Task);break;case"task.done":s.push($l.TaskDone);break;case"task.notdone":s.push($l.TaskNotDone)}if(s.includes($l.Table)&&s.filter((t=>t!==$l.Table)).length>0)return"searchType 'table' doestn't work with other types for now";let f=[],c=ws("separator",r.separator,o,"",null,!0);if("string"==typeof c)return c;f=c.map((t=>"comma"===t||"\\,"===t?",":t));let h=xs("xDataset",r.xDataset,o,-1);if("string"==typeof h)return h;let d=h.map((t=>t<0||t>=o?-1:t)),g=[];for(let t=0;t<l.length;t++){let e=new Ul(g.length,s[t],l[t]);e.setSeparator(f[t]),d.includes(t)&&(e.usedAsXDataset=!0),g.push(e)}let p=new Wl(g),y=Cs(p),m=["searchType","searchTarget","separator"],v=[],x=[],A=[],w=[],b=[],D=[],k=[];for(let t of i)/^line[0-9]*$/.test(t)&&(v.push(t),m.push(t)),/^bar[0-9]*$/.test(t)&&(x.push(t),m.push(t)),/^pie[0-9]*$/.test(t)&&(A.push(t),m.push(t)),/^summary[0-9]*$/.test(t)&&(w.push(t),m.push(t)),/^bullet[0-9]*$/.test(t)&&(k.push(t),m.push(t)),/^month[0-9]*$/.test(t)&&(b.push(t),m.push(t)),/^heatmap[0-9]*$/.test(t)&&(D.push(t),m.push(t));let C=[];for(let t of i)if(/^dataset[0-9]*$/.test(t)){let e=-1,n=t.replace("dataset","");if(e=""===n?0:parseFloat(n),g.some((t=>t.getId()===e)))return a="Duplicated dataset id for key '"+t+"'",a;C.push(t),m.push(t)}for(let t of i)if(!y.includes(t)&&!m.includes(t))return a="'"+t+"' is not an available key",a;if(0===v.length+x.length+A.length+w.length+k.length+b.length+D.length)return"No output parameter provided, please place line, bar, pie, month, bullet, or summary.";p.folder=As(null==r?void 0:r.folder,n.settings.folder),""===p.folder.trim()&&(p.folder=n.settings.folder);let M=n.app.vault.getAbstractFileByPath(t.normalizePath(p.folder));if(!(M&&M instanceof t.TFolder))return"Folder '"+p.folder+"' doesn't exist";if("string"==typeof r.file){let t=Ds("file",r.file);if("string"==typeof t)return t;p.file=t}if("boolean"==typeof r.specifiedFilesOnly&&(p.specifiedFilesOnly=r.specifiedFilesOnly),"string"==typeof r.fileContainsLinkedFiles){let t=Ds("fileContainsLinkedFiles",r.fileContainsLinkedFiles);if("string"==typeof t)return t;p.fileContainsLinkedFiles=t}p.fileMultiplierAfterLink=As(null==r?void 0:r.fileMultiplierAfterLink,p.fileMultiplierAfterLink);const T=r.dateFormat;if("string"==typeof r.dateFormat?""===r.dateFormat?p.dateFormat=n.settings.dateFormat:p.dateFormat=T:p.dateFormat=n.settings.dateFormat,p.dateFormatPrefix=As(null==r?void 0:r.dateFormatPrefix,p.dateFormatPrefix),p.dateFormatSuffix=As(null==r?void 0:r.dateFormatSuffix,p.dateFormatSuffix),"string"==typeof r.startDate){if(/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)m$/.test(r.startDate))return"'m' for 'minute' is too small for parameter startDate, please use 'd' for 'day' or 'M' for month";let t=uo(r.startDate,p.dateFormatPrefix,p.dateFormatSuffix),e=null,n=!1;if(e=go(t,p.dateFormat),e?n=!0:(e=fo(t,p.dateFormat),e.isValid()&&(n=!0)),!n||null===e)return"Invalid startDate, the format of startDate may not match your dateFormat "+p.dateFormat;p.startDate=e}if("string"==typeof r.endDate){if(/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)m$/.test(r.endDate))return"'m' for 'minute' is too small for parameter endDate, please use 'd' for 'day' or 'M' for month";let t=uo(r.endDate,p.dateFormatPrefix,p.dateFormatSuffix),e=null,n=!1;if(e=go(t,p.dateFormat),e?n=!0:(e=fo(t,p.dateFormat),e.isValid()&&(n=!0)),!n||null===e)return"Invalid endDate, the format of endDate may not match your dateFormat "+p.dateFormat;p.endDate=e}if(null!==p.startDate&&p.startDate.isValid()&&null!==p.endDate&&p.endDate.isValid()&&p.endDate<p.startDate)return"Invalid date range (startDate larger than endDate)";p.xDataset=d;let _=ws("datasetName",r.datasetName,o,"untitled",null,!0);if("string"==typeof _)return _;let E=0;for(let t=0;t<_.length;t++)p.xDataset.includes(t)||"untitled"===_[t]&&(_[t]="untitled"+E.toString(),E++);if(new Set(_).size!==_.length)return"Not enough dataset names or duplicated names";p.datasetName=_;let F=xs("constValue",r.constValue,o,1);if("string"==typeof F)return F;p.constValue=F;let S=vs("ignoreAttachedValue",r.ignoreAttachedValue,o,!1);if("string"==typeof S)return S;p.ignoreAttachedValue=S;let B=vs("ignoreZeroValue",r.ignoreZeroValue,o,!1);if("string"==typeof B)return B;p.ignoreZeroValue=B;let N=vs("accum",r.accum,o,!1);if("string"==typeof N)return N;p.accum=N,"boolean"==typeof r.stack&&(p.stack=r.stack);let L=xs("penalty",r.penalty,o,null);if("string"==typeof L)return L;p.penalty=L;let I=xs("valueShift",r.valueShift,o,0);if("string"==typeof I)return I;p.valueShift=I;let O=xs("shiftOnlyValueLargerThan",r.shiftOnlyValueLargerThan,o,null);if("string"==typeof O)return O;if(p.shiftOnlyValueLargerThan=O,void 0!==r.textValueMap){let t=Cs(r.textValueMap);for(let e of t){let t=e.trim();p.textValueMap[t]=r.textValueMap[t]}}if("number"==typeof r.fixedScale&&(p.fixedScale=r.fixedScale),"boolean"==typeof r.fitPanelWidth&&(p.fitPanelWidth=r.fitPanelWidth),"string"==typeof r.aspectRatio){let t=/([0-9]*):([0-9]*)/,e=r.aspectRatio.match(t);e.shift(),e=e.map((t=>parseInt(t,10))),2==e.length&&(p.aspectRatio=new ro(e[0],e[1]),p.dataAreaSize=p.aspectRatio.recalculateSize(p.dataAreaSize))}let V=xs("margin",r.margin,4,10);if("string"==typeof V)return V;if(V.length>4)return"margin accepts not more than four values for top, right, bottom, and left margins.";p.margin=new io(V[0],V[1],V[2],V[3]);for(let t of C){let e=new jl,n=r[t],i=Cs(e),l=Cs(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let o=-1,s=t.replace("dataset","");o=""===s?0:parseFloat(s),e.id=o,e.name=As(null==n?void 0:n.name,e.name);let u=Ds("xData",null==n?void 0:n.xData);if("string"==typeof u)return u;e.xData=u;let f=e.xData.length,c=Ds("yData",null==n?void 0:n.yData);if("string"==typeof c)return c;if(e.yData=c,e.yData.length!==f)return"Number of elements in xData and yData not matched";p.customDataset.push(e)}for(let t of v){let e=new Gl,n=r[t],i=Cs(e),l=Cs(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let s=ks(n,e);if("string"==typeof s)return s;let u=ws("lineColor",null==n?void 0:n.lineColor,o,"",ys,!0);if("string"==typeof u)return u;e.lineColor=u;let f=xs("lineWidth",null==n?void 0:n.lineWidth,o,1.5);if("string"==typeof f)return f;e.lineWidth=f;let c=vs("showLine",null==n?void 0:n.showLine,o,!0);if("string"==typeof c)return c;e.showLine=c;let h=vs("showPoint",null==n?void 0:n.showPoint,o,!0);if("string"==typeof h)return h;e.showPoint=h;let d=ws("pointColor",null==n?void 0:n.pointColor,o,"#69b3a2",ys,!0);if("string"==typeof d)return d;e.pointColor=d;let g=ws("pointBorderColor",null==n?void 0:n.pointBorderColor,o,"#69b3a2",ys,!0);if("string"==typeof g)return g;e.pointBorderColor=g;let y=xs("pointBorderWidth",null==n?void 0:n.pointBorderWidth,o,0);if("string"==typeof y)return y;e.pointBorderWidth=y;let m=xs("pointSize",null==n?void 0:n.pointSize,o,3);if("string"==typeof m)return m;e.pointSize=m;let v=vs("fillGap",null==n?void 0:n.fillGap,o,!1);if("string"==typeof v)return v;e.fillGap=v;let x=ws("yAxisLocation",null==n?void 0:n.yAxisLocation,o,"left",ps,!0);if("string"==typeof x)return x;e.yAxisLocation=x,p.line.push(e)}for(let t of x){let e=new Ql,n=r[t],i=Cs(e),l=Cs(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let s=ks(n,e);if("string"==typeof s)return s;let u=ws("barColor",null==n?void 0:n.barColor,o,"",ys,!0);if("string"==typeof u)return u;e.barColor=u;let f=ws("yAxisLocation",null==n?void 0:n.yAxisLocation,o,"left",ps,!0);if("string"==typeof f)return f;e.yAxisLocation=f,p.bar.push(e)}for(let t of A){let e=new Zl,n=r[t],i=Cs(e),l=Cs(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.title=As(null==n?void 0:n.title,e.title);let o=Ds("data",null==n?void 0:n.data);if("string"==typeof o)return o;e.data=o;let s=e.data.length,u=ws("dataColor",null==n?void 0:n.dataColor,s,null,ys,!0);if("string"==typeof u)return u;e.dataColor=u;let f=ws("dataName",null==n?void 0:n.dataName,s,"",null,!0);if("string"==typeof f)return f;e.dataName=f;let c=ws("label",null==n?void 0:n.label,s,"",null,!0);if("string"==typeof c)return c;e.label=c,"number"==typeof(null==n?void 0:n.hideLabelLessThan)&&(e.hideLabelLessThan=n.hideLabelLessThan);let h=ws("extLabel",null==n?void 0:n.extLabel,s,"",null,!0);if("string"==typeof h)return h;e.extLabel=h,"boolean"==typeof(null==n?void 0:n.showExtLabelOnlyIfNoLabel)&&(e.showExtLabelOnlyIfNoLabel=n.showExtLabelOnlyIfNoLabel),"number"==typeof(null==n?void 0:n.ratioInnerRadius)&&(e.ratioInnerRadius=n.ratioInnerRadius),"boolean"==typeof(null==n?void 0:n.showLegend)&&(e.showLegend=n.showLegend),e.legendPosition=As(null==n?void 0:n.legendPosition,"right");let d="horizontal";d="top"===e.legendPosition||"bottom"===e.legendPosition?"horizontal":"left"===e.legendPosition||"right"===e.legendPosition?"vertical":"horizontal",e.legendOrientation=As(null==n?void 0:n.legendOrientation,d),e.legendBgColor=As(null==n?void 0:n.legendBgColor,e.legendBgColor),e.legendBorderColor=As(null==n?void 0:n.legendBorderColor,e.legendBorderColor),p.pie.push(e)}for(let t of w){let e=new Kl,n=r[t],i=Cs(e),l=Cs(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.template=As(null==n?void 0:n.template,e.template),e.style=As(null==n?void 0:n.style,e.style),p.summary.push(e)}for(let t of b){let e=new Jl,n=r[t],i=Cs(e),l=Cs(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.mode=As(null==n?void 0:n.mode,e.mode);let o=bs("dataset",null==n?void 0:n.dataset);if("string"==typeof o)return o;if(0===o.length)for(let t of g)o.push(t.getId());e.dataset=o;let s=e.dataset.length;e.startWeekOn=As(null==n?void 0:n.startWeekOn,e.startWeekOn),"boolean"==typeof(null==n?void 0:n.showCircle)&&(e.showCircle=n.showCircle);let u=bs("threshold",null==n?void 0:n.threshold);if("string"==typeof u)return u;if(e.threshold=u,0===e.threshold.length)for(let t=0;t<s;t++)e.threshold.push(0);if(e.threshold.length!==e.dataset.length)return"The number of inputs of threshold and dataset not matched";let f=bs("yMin",null==n?void 0:n.yMin);if("string"==typeof f)return f;if(e.yMin=f,0===e.yMin.length)for(let t=0;t<s;t++)e.yMin.push(null);if(e.yMin.length!==e.dataset.length)return"The number of inputs of yMin and dataset not matched";let c=bs("yMax",null==n?void 0:n.yMax);if("string"==typeof c)return c;if(e.yMax=c,0===e.yMax.length)for(let t=0;t<s;t++)e.yMax.push(null);if(e.yMax.length!==e.dataset.length)return"The number of inputs of yMin and dataset not matched";e.color=As(null==n?void 0:n.color,e.color),"boolean"==typeof(null==n?void 0:n.dimNotInMonth)&&(e.dimNotInMonth=n.dimNotInMonth),"boolean"==typeof(null==n?void 0:n.showStreak)&&(e.showStreak=n.showStreak),"boolean"==typeof(null==n?void 0:n.showTodayRing)&&(e.showTodayRing=n.showTodayRing),"boolean"==typeof(null==n?void 0:n.showSelectedValue)&&(e.showSelectedValue=n.showSelectedValue),"boolean"==typeof(null==n?void 0:n.showSelectedRing)&&(e.showSelectedRing=n.showSelectedRing),e.circleColor=As(null==n?void 0:n.circleColor,e.circleColor),"boolean"==typeof(null==n?void 0:n.circleColorByValue)&&(e.circleColorByValue=n.circleColorByValue),e.headerYearColor=As(null==n?void 0:n.headerYearColor,e.headerYearColor),e.headerMonthColor=As(null==n?void 0:n.headerMonthColor,e.headerMonthColor),e.dividingLineColor=As(null==n?void 0:n.dividingLineColor,e.dividingLineColor),e.todayRingColor=As(null==n?void 0:n.todayRingColor,e.todayRingColor),e.selectedRingColor=As(null==n?void 0:n.selectedRingColor,e.selectedRingColor),e.initMonth=As(null==n?void 0:n.initMonth,e.initMonth),"boolean"==typeof(null==n?void 0:n.showAnnotation)&&(e.showAnnotation=n.showAnnotation);let h=Ds("annotation",null==n?void 0:n.annotation);if("string"==typeof h)return h;if(e.annotation=h,0===e.annotation.length)for(let t=0;t<s;t++)e.annotation.push(null);if(e.annotation.length!==e.dataset.length)return"The number of inputs of annotation and dataset not matched";"boolean"==typeof(null==n?void 0:n.showAnnotationOfAllTargets)&&(e.showAnnotationOfAllTargets=n.showAnnotationOfAllTargets),p.month.push(e)}for(let t of D){let e=new to,n=r[t],i=Cs(e),l=Cs(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;p.heatmap.push(e)}for(let t of k){let e=new eo,n=r[t],i=Cs(e),l=Cs(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.title=As(null==n?void 0:n.title,e.title),e.dataset=As(null==n?void 0:n.dataset,e.dataset),e.orientation=As(null==n?void 0:n.orientation,e.orientation);let o=bs("range",null==n?void 0:n.range);if("string"==typeof o)return o;let s=o;if(1===s.length){if(s[0]<0)return a="Negative range value is not allowed",a}else{if(!(s.length>1))return a="Empty range is not allowed",a;{let t=s[0];if(t<0)return a="Negative range value is not allowed",a;for(let e=1;e<s.length;e++)if(s[e]<=t)return a="Values in parameter 'range' should be monotonically increasing",a}}e.range=s;let u=s.length,f=ws("rangeColor",null==n?void 0:n.rangeColor,u,"",ys,!0);if("string"==typeof f)return f;e.rangeColor=f,e.value=As(null==n?void 0:n.value,e.value),e.valueUnit=As(null==n?void 0:n.valueUnit,e.valueUnit),e.valueColor=As(null==n?void 0:n.valueColor,e.valueColor),"boolean"==typeof(null==n?void 0:n.showMarker)&&(e.showMarker=n.showMarker),"number"==typeof(null==n?void 0:n.markerValue)&&(e.markerValue=n.markerValue),e.markerColor=As(null==n?void 0:n.markerColor,e.markerColor),p.bullet.push(e)}return p}(a,this);if("string"==typeof s)return this.renderErrorMessage(s,i,n);let u=s,f=[];try{await this.getFiles(f,u)}catch(t){return this.renderErrorMessage(t.message,i,n)}if(0===f.length)return this.renderErrorMessage("No markdown files found in folder",i,n);let c=new Map,h=new oo;h.fileTotal=f.length;const d=f.map((async t=>{let e=null;u.queries.some((t=>{let e=t.getType();return t.getTarget(),e===$l.Frontmatter||e===$l.Tag||e===$l.Wiki||e===$l.WikiLink||e===$l.WikiDisplay}))&&(e=this.app.metadataCache.getFileCache(t));let n=null;u.queries.some((t=>{let e=t.getType(),n=t.getTarget();return e===$l.Tag||e===$l.Text||e===$l.dvField||e===$l.Task||e===$l.TaskDone||e===$l.TaskNotDone||e===$l.FileMeta&&("numWords"===n||"numChars"===n||"numSentences"===n)}))&&(n=await this.app.vault.adapter.read(t.path));let r=new Map,i=!1;for(let a of u.xDataset)if(!r.has(a)){let l=window.moment("");if(-1===a)l=Ms(t,u);else{let r=u.queries[a];switch(r.getType()){case $l.Frontmatter:l=Ts(e,r,u);break;case $l.Tag:l=Es(n,r,u);break;case $l.Text:l=Fs(n,r,u);break;case $l.dvField:l=Ss(n,r,u);break;case $l.FileMeta:l=Bs(t,r,u);break;case $l.Task:case $l.TaskDone:case $l.TaskNotDone:l=Ns(n,r,u)}}l.isValid()?(null!==u.startDate&&l<u.startDate&&(i=!0,h.fileOutOfDateRange++),null!==u.endDate&&l>u.endDate&&(i=!0,h.fileOutOfDateRange++)):(i=!0,h.fileNotInFormat++),i||(h.gotAnyValidXValue||(h.gotAnyValidXValue=!0),r.set(a,po(l,u.dateFormat)),h.fileAvailable++,1==h.fileAvailable?(h.minDate=l.clone(),h.maxDate=l.clone()):(l<h.minDate&&(h.minDate=l.clone()),l>h.maxDate&&(h.maxDate=l.clone())))}if(i)return;const a=u.queries.filter((t=>t.getType()!==$l.Table&&!t.usedAsXDataset)).map((async i=>{if(e&&i.getType()===$l.Tag){let t=function(t,e,n,r,i){let a=t.frontmatter,l=[];if(a&&a.tags){let t=0,o=!1;if(Array.isArray(a.tags))l=l.concat(a.tags);else if("string"==typeof a.tags){let t=a.tags.split(e.getSeparator(!0));for(let e of t){let t=e.trim();""!==t&&l.push(t)}}for(let a of l){if(a===e.getTarget())t+=n.constValue[e.getId()],o=!0,e.addNumTargets();else{if(!a.startsWith(e.getTarget()+"/"))continue;t+=n.constValue[e.getId()],o=!0,e.addNumTargets()}let l=null;return o&&(l=t),Ls(r,i.get(n.xDataset[e.getId()]),e,l),!0}}return!1}(e,i,u,c,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(e&&i.getType()===$l.Frontmatter&&"tags"!==i.getTarget()){let t=function(t,e,n,r,i){let a=t.frontmatter;if(a){let t=vo(a,e.getTarget());if(t){let a=wo(t,n.textValueMap);if(null===a.value&&("true"!==t&&"false"!==t||(a.type=Rl.Number,a.value="true"===t?1:0)),null!==a.value)return a.type===Rl.Time&&(e.valueType=Rl.Time),e.addNumTargets(),Ls(r,i.get(n.xDataset[e.getId()]),e,a.value),!0}else if(e.getParentTarget()&&vo(a,e.getParentTarget())){let t=vo(a,e.getParentTarget()),l=null;if(Array.isArray(t)?l=t.map((t=>t.toString())):"string"==typeof t&&(l=t.split(e.getSeparator())),l&&l.length>e.getAccessor()&&e.getAccessor()>=0){let t=wo(l[e.getAccessor()].trim(),n.textValueMap);if(null!==t.value)return t.type===Rl.Time&&(e.valueType=Rl.Time),e.addNumTargets(),Ls(r,i.get(n.xDataset[e.getId()]),e,t.value),!0}}}return!1}(e,i,u,c,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(e&&(i.getType()===$l.Wiki||i.getType()===$l.WikiLink||i.getType()===$l.WikiDisplay)){let t=function(t,e,n,r,i){let a=t.links;if(!a)return!1;let l=e.getTarget(),o=e.getType(),s="",u=l;for(let t of a){if(!t)continue;let e="";o===$l.Wiki?e=t.displayText?t.displayText:t.link:o===$l.WikiLink?e=t.link:o===$l.WikiDisplay?t.displayText&&(e=t.displayText):e=t.displayText?t.displayText:t.link,e=e.trim(),s+=e+"\n"}return Is(s,u,e,r,i,n)}(e,i,u,c,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(n&&i.getType()===$l.Tag){let t=function(t,e,n,r,i){let a=e.getTarget();return e.getParentTarget()&&(a=e.getParentTarget()),a.length>1&&a.startsWith("#")&&(a=a.substring(1)),Is(t,"(^|\\s)#"+a+"(\\/[\\w-]+)*(:(?<value>[\\d\\.\\/-]*)[a-zA-Z]*)?([\\.!,\\?;~-]*)?(\\s|$)",e,r,i,n)}(n,i,u,c,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(n&&i.getType()===$l.Text){let t=function(t,e,n,r,i){return Is(t,e.getTarget(),e,r,i,n)}(n,i,u,c,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(i.getType()===$l.FileMeta){let e=Os(t,n,i,u,c,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=e)}if(n&&i.getType()===$l.dvField){let t=function(t,e,n,r,i){let a=e.getTarget();return e.getParentTarget()&&(a=e.getParentTarget()),a=a.replace("-","[\\s\\-]"),Is(t,String.raw`(^| |\t|\|)(\[|\()?\*{0,2}`+a+String.raw`\*{0,2}(::[ |\t]*(?<value>[\p{ExtPict}\d\.\/\-\w,@; \t:`+"\\w$€£¥¢₹₨₱₩฿₫₪α-ωΑ-Ω©®℗™℠一-鿿㐀-䶿 、-〿"+String.raw`]*)(\]|\))?)`,e,r,i,n)}(n,i,u,c,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(n&&(i.getType()===$l.Task||i.getType()===$l.TaskDone||i.getType()===$l.TaskNotDone)){let t=function(t,e,n,r,i){let a=e.getType(),l=e.getTarget();return l=a===$l.Task?"\\[[\\sx]\\]\\s"+l:a===$l.TaskDone?"\\[x\\]\\s"+l:a===$l.TaskNotDone?"\\[\\s\\]\\s"+l:"\\[[\\sx]\\]\\s"+l,Is(t,l,e,r,i,n)}(n,i,u,c,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}}));await Promise.all(a)}));if(await Promise.all(d),await this.collectDataFromTable(c,u,h),h.errorMessage)return this.renderErrorMessage(h.errorMessage,i,n);let g="";if(h.minDate.isValid()&&h.maxDate.isValid()&&0!==h.fileAvailable&&h.gotAnyValidXValue||(g="No valid date as X value found in notes",h.fileOutOfDateRange>0&&(g+=`\n${h.fileOutOfDateRange} files are out of the date range.`),h.fileNotInFormat&&(g+=`\n${h.fileNotInFormat} files are not in the right format.`)),null===u.startDate&&null===u.endDate?(u.startDate=h.minDate.clone(),u.endDate=h.maxDate.clone()):null!==u.startDate&&null===u.endDate?u.startDate<h.maxDate?u.endDate=h.maxDate.clone():g="Invalid date range":null!==u.endDate&&null===u.startDate?u.endDate>h.minDate?u.startDate=h.minDate.clone():g="Invalid date range":(u.startDate<h.minDate&&u.endDate<h.minDate||u.startDate>h.maxDate&&u.endDate>h.maxDate)&&(g="Invalid date range"),g)return this.renderErrorMessage(g,i,n);if(!h.gotAnyValidYValue)return this.renderErrorMessage("No valid Y value found in notes",i,n);let p=new Xl(u.startDate,u.endDate);for(let t of u.queries){let e=p.createDataset(t,u);e.addNumTargets(t.getNumTargets());for(let n=u.startDate.clone();n<=u.endDate;n.add(1,"days"))if(c.has(po(n,u.dateFormat))){let r=c.get(po(n,u.dateFormat)).filter((function(e){return e.query.equalTo(t)}));if(r.length>0){let t=null;for(let e=0;e<r.length;e++){let n=r[e].value;Number.isNumber(n)&&!Number.isNaN(n)&&(null===t?t=n:t+=n)}null!==t&&e.setValue(n,t)}}}u.datasets=p;let y=function(t,e){for(let t of e.datasets){if(t.getQuery().usedAsXDataset)continue;let n=e.valueShift[t.getId()];null!==n&&0!==n&&t.shift(n,e.shiftOnlyValueLargerThan[t.getId()]),null!==e.penalty[t.getId()]&&t.setPenalty(e.penalty[t.getId()]),e.accum[t.getId()]&&t.accumulateValues()}if(e.stack){let t=null;for(let n of e.datasets)n.getQuery().usedAsXDataset||(t&&n.shiftByDataset(t),t=n)}for(let n of e.line){let r=cs(t,e,n);if("string"==typeof r)return r}for(let n of e.bar){let r=hs(t,e,n);if("string"==typeof r)return r}for(let n of e.pie){let r=Uo(t,e,n);if("string"==typeof r)return r}for(let n of e.summary){let r=Ho(t,e,n);if("string"==typeof r)return r}for(let n of e.bullet){let r=es(t,e,n);if("string"==typeof r)return r}for(let n of e.month){let r=Jo(t,e,n);if("string"==typeof r)return r}for(let t of e.heatmap){let t=ts(0,e);if("string"==typeof t)return t}}(i,u);if("string"==typeof y)return this.renderErrorMessage(y,i,n);n.appendChild(i)}async collectDataFromTable(e,n,r){let i=n.queries.filter((t=>t.getType()===$l.Table)),a=[],l=!1;for(let e of i){let n=e.getParentTarget(),r=this.app.vault.getAbstractFileByPath(t.normalizePath(n+".md"));if(!(r&&r instanceof t.TFile)){l=!0;break}let i=e.getAccessor(),o=e.usedAsXDataset,s=a.find((t=>t.filePath===n&&t.tableIndex===i));if(s)o?s.xDataset=e:s.yDatasets.push(e);else{let t=new lo(n,i);o?t.xDataset=e:t.yDatasets.push(e),a.push(t)}}if(l)r.errorMessage="File containing tables not found";else for(let i of a){let a=i.xDataset;if(!a)continue;let l=i.yDatasets,o=a.getParentTarget(),s=a.getAccessor(),u="";o+=".md";let f=this.app.vault.getAbstractFileByPath(t.normalizePath(o));if(!(f&&f instanceof t.TFile))continue;{r.fileAvailable++;let t,e=await this.app.vault.adapter.read(f.path),n=new RegExp("((\\r?\\n){2}|^)([^\\r\\n]*\\|[^\\r\\n]*(\\r?\\n)?)+(?=(\\r?\\n){2}|$)","gm"),i=0;for(;t=n.exec(e);){if(i===s){u=t[0];break}i++}}let c=u.split(/\r?\n/);c=c.filter((t=>""!==t));let h=0,d=0;if(c.length>=2){let t=c.shift().trim();t=xo(t,"|"),h=t.split("|").length;let e=c.shift().trim();e=xo(e,"|");let n=e.split("|");for(let t of n)if(!t.includes("-"))break;d=c.length}if(0==d)continue;let g=a.getAccessor(1);if(g>=h)continue;let p=[];for(let t of c){let e=xo(t.trim(),"|").split("|");if(g<e.length){let t=fo(e[g].trim(),n.dateFormat);t.isValid()?(p.push(t),r.minDate.isValid()||r.maxDate.isValid()?(t<r.minDate&&(r.minDate=t.clone()),t>r.maxDate&&(r.maxDate=t.clone())):(r.minDate=t.clone(),r.maxDate=t.clone())):p.push(null)}else p.push(null)}if(p.every((t=>null===t)))return void(r.errorMessage="No valid date as X value found in table");r.gotAnyValidXValue||(r.gotAnyValidXValue=!0);for(let t of l){let i=t.getAccessor(1);if(i>=h)continue;let a=0;for(let l of c){let o=xo(l.trim(),"|").split("|");if(i<o.length){let l=o[i].trim().split(t.getSeparator());if(!l)continue;if(1===l.length){let i=wo(l[0],n.textValueMap);if(null!==i.value){i.type===Rl.Time&&(t.valueType=Rl.Time);let l=i.value;a<p.length&&p[a]&&(r.gotAnyValidYValue||(r.gotAnyValidYValue=!0),Ls(e,po(p[a],n.dateFormat),t,l))}}else if(l.length>t.getAccessor(2)&&t.getAccessor(2)>=0){let i=null,o=wo(l[t.getAccessor(2)].trim(),n.textValueMap);null!==o.value&&(o.type===Rl.Time&&(t.valueType=Rl.Time),i=o.value,a<p.length&&p[a]&&(r.gotAnyValidYValue||(r.gotAnyValidYValue=!0),Ls(e,po(p[a],n.dateFormat),t,i)))}}a++}}}}getEditor(){return this.app.workspace.getActiveViewOfType(t.MarkdownView).editor}addCodeBlock(e){if(!(this.app.workspace.activeLeaf.view instanceof t.MarkdownView))return;let n="";switch(e){case Yl.Line:n='``` tracker\nsearchType: tag\nsearchTarget: tagName\nfolder: /\nstartDate:\nendDate:\nline:\n title: "Line Chart"\n xAxisLabel: Date\n yAxisLabel: Value\n```';break;case Yl.Bar:n='``` tracker\nsearchType: tag\nsearchTarget: tagName\nfolder: /\nstartDate:\nendDate:\nbar:\n title: "Bar Chart"\n xAxisLabel: Date\n yAxisLabel: Value\n```';break;case Yl.Summary:n='``` tracker\nsearchType: tag\nsearchTarget: tagName\nfolder: /\nstartDate:\nendDate:\nsummary:\n template: "Average value of tagName is {{average()}}"\n style: "color:white;"\n```'}""!==n&&this.insertToNextLine(n)}insertToNextLine(t){let e=this.getEditor();if(e){let n=e.getCursor(),r=n.line,i=e.getLine(r);return n.ch=i.length,e.setSelection(n),e.replaceSelection("\n"+t),!0}return!1}}module.exports=$s; +"use strict";var t=require("obsidian");function e(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function n(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function r(t){let r,a,l;function o(t,e,n=0,i=t.length){if(n<i){if(0!==r(e,e))return i;do{const r=n+i>>>1;a(t[r],e)<0?n=r+1:i=r}while(n<i)}return n}return 2!==t.length?(r=e,a=(n,r)=>e(t(n),r),l=(e,n)=>t(e)-n):(r=t===e||t===n?t:i,a=t,l=t),{left:o,center:function(t,e,n=0,r=t.length){const i=o(t,e,n,r-1);return i>n&&l(t[i-1],e)>-l(t[i],e)?i-1:i},right:function(t,e,n=0,i=t.length){if(n<i){if(0!==r(e,e))return i;do{const r=n+i>>>1;a(t[r],e)<=0?n=r+1:i=r}while(n<i)}return n}}}function i(){return 0}const a=r(e).right;r((function(t){return null===t?NaN:+t})).center;class l extends Map{constructor(t,e=s){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(o(this,t))}has(t){return super.has(o(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const r=e(n);t.has(r)&&(n=t.get(r),t.delete(r));return n}(this,t))}}function o({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function s(t){return null!==t&&"object"==typeof t?t.valueOf():t}function u(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}const f=Math.sqrt(50),h=Math.sqrt(10),c=Math.sqrt(2);function d(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),l=a>=f?10:a>=h?5:a>=c?2:1;let o,s,u;return i<0?(u=Math.pow(10,-i)/l,o=Math.round(t*u),s=Math.round(e*u),o/u<t&&++o,s/u>e&&--s,u=-u):(u=Math.pow(10,i)*l,o=Math.round(t/u),s=Math.round(e/u),o*u<t&&++o,s*u>e&&--s),s<o&&.5<=n&&n<2?d(t,e,2*n):[o,s,u]}function g(t,e,n){return d(t=+t,e=+e,n=+n)[2]}function p(t,e,n){n=+n;const r=(e=+e)<(t=+t),i=r?g(e,t,n):g(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function y(t,e){let n;for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);return n}function m(t,e){let n;for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);return n}function v(t,n,r=0,i=1/0,a){if(n=Math.floor(n),r=Math.floor(Math.max(0,r)),i=Math.floor(Math.min(t.length-1,i)),!(r<=n&&n<=i))return t;for(a=void 0===a?u:function(t=e){if(t===e)return u;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}(a);i>r;){if(i-r>600){const e=i-r+1,l=n-r+1,o=Math.log(e),s=.5*Math.exp(2*o/3),u=.5*Math.sqrt(o*s*(e-s)/e)*(l-e/2<0?-1:1);v(t,n,Math.max(r,Math.floor(n-l*s/e+u)),Math.min(i,Math.floor(n+(e-l)*s/e+u)),a)}const e=t[n];let l=r,o=i;for(x(t,r,n),a(t[i],e)>0&&x(t,r,i);l<o;){for(x(t,l,o),++l,--o;a(t[l],e)<0;)++l;for(;a(t[o],e)>0;)--o}0===a(t[r],e)?x(t,r,o):(++o,x(t,o,i)),o<=n&&(r=o+1),n<=o&&(i=o-1)}return t}function x(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function A(t,e){return function(t,e){if((n=(t=Float64Array.from(function*(t){for(let e of t)null!=e&&(e=+e)>=e&&(yield e)}(t))).length)&&!isNaN(e=+e)){if(e<=0||n<2)return m(t);if(e>=1)return y(t);var n,r=(n-1)*e,i=Math.floor(r),a=y(v(t,i).subarray(0,i+1));return a+(m(t.subarray(i+1))-a)*(r-i)}}(t,.5)}function w(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function b(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function D(t){return t}var k=1e-6;function C(t){return"translate("+t+",0)"}function T(t){return"translate(0,"+t+")"}function M(t){return e=>+t(e)}function _(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function E(){return!this.__axis}function F(t,e){var n=[],r=null,i=null,a=6,l=6,o=3,s="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=1===t||4===t?-1:1,f=4===t||2===t?"x":"y",h=1===t||3===t?C:T;function c(c){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,g=null==i?e.tickFormat?e.tickFormat.apply(e,n):D:i,p=Math.max(a,0)+o,y=e.range(),m=+y[0]+s,v=+y[y.length-1]+s,x=(e.bandwidth?_:M)(e.copy(),s),A=c.selection?c.selection():c,w=A.selectAll(".domain").data([null]),b=A.selectAll(".tick").data(d,e).order(),C=b.exit(),T=b.enter().append("g").attr("class","tick"),F=b.select("line"),S=b.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(T),F=F.merge(T.append("line").attr("stroke","currentColor").attr(f+"2",u*a)),S=S.merge(T.append("text").attr("fill","currentColor").attr(f,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),c!==A&&(w=w.transition(c),b=b.transition(c),F=F.transition(c),S=S.transition(c),C=C.transition(c).attr("opacity",k).attr("transform",(function(t){return isFinite(t=x(t))?h(t+s):this.getAttribute("transform")})),T.attr("opacity",k).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:x(t))+s)}))),C.remove(),w.attr("d",4===t||2===t?l?"M"+u*l+","+m+"H"+s+"V"+v+"H"+u*l:"M"+s+","+m+"V"+v:l?"M"+m+","+u*l+"V"+s+"H"+v+"V"+u*l:"M"+m+","+s+"H"+v),b.attr("opacity",1).attr("transform",(function(t){return h(x(t)+s)})),F.attr(f+"2",u*a),S.attr(f,u*p).text(g),A.filter(E).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),A.each((function(){this.__axis=x}))}return c.scale=function(t){return arguments.length?(e=t,c):e},c.ticks=function(){return n=Array.from(arguments),c},c.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),c):n.slice()},c.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),c):r&&r.slice()},c.tickFormat=function(t){return arguments.length?(i=t,c):i},c.tickSize=function(t){return arguments.length?(a=l=+t,c):a},c.tickSizeInner=function(t){return arguments.length?(a=+t,c):a},c.tickSizeOuter=function(t){return arguments.length?(l=+t,c):l},c.tickPadding=function(t){return arguments.length?(o=+t,c):o},c.offset=function(t){return arguments.length?(s=+t,c):s},c}function S(t){return F(3,t)}function B(t){return F(4,t)}var N={value:()=>{}};function L(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new I(r)}function I(t){this._=t}function O(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function V(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=N,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}I.prototype=L.prototype={constructor:I,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),l=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++l<o;)if(n=(t=a[l]).type)i[n]=V(i[n],t.name,e);else if(null==e)for(n in i)i[n]=V(i[n],t.name,null);return this}for(;++l<o;)if((n=(t=a[l]).type)&&(n=O(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new I(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var P="http://www.w3.org/1999/xhtml",$={svg:"http://www.w3.org/2000/svg",xhtml:P,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Y(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),$.hasOwnProperty(e)?{space:$[e],local:t}:t}function R(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===P&&e.documentElement.namespaceURI===P?e.createElement(t):e.createElementNS(n,t)}}function z(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function U(t){var e=Y(t);return(e.local?z:R)(e)}function H(){}function X(t){return null==t?H:function(){return this.querySelector(t)}}function W(){return[]}function j(t){return null==t?W:function(){return this.querySelectorAll(t)}}function q(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function G(t){return function(){return this.matches(t)}}function Q(t){return function(e){return e.matches(t)}}var Z=Array.prototype.find;function K(){return this.firstElementChild}var J=Array.prototype.filter;function tt(){return Array.from(this.children)}function et(t){return new Array(t.length)}function nt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function rt(t,e,n,r,i,a){for(var l,o=0,s=e.length,u=a.length;o<u;++o)(l=e[o])?(l.__data__=a[o],r[o]=l):n[o]=new nt(t,a[o]);for(;o<s;++o)(l=e[o])&&(i[o]=l)}function it(t,e,n,r,i,a,l){var o,s,u,f=new Map,h=e.length,c=a.length,d=new Array(h);for(o=0;o<h;++o)(s=e[o])&&(d[o]=u=l.call(s,s.__data__,o,e)+"",f.has(u)?i[o]=s:f.set(u,s));for(o=0;o<c;++o)u=l.call(t,a[o],o,a)+"",(s=f.get(u))?(r[o]=s,s.__data__=a[o],f.delete(u)):n[o]=new nt(t,a[o]);for(o=0;o<h;++o)(s=e[o])&&f.get(d[o])===s&&(i[o]=s)}function at(t){return t.__data__}function lt(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function ot(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function st(t){return function(){this.removeAttribute(t)}}function ut(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ft(t,e){return function(){this.setAttribute(t,e)}}function ht(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ct(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function dt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function gt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function pt(t){return function(){this.style.removeProperty(t)}}function yt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function mt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function vt(t,e){return t.style.getPropertyValue(e)||gt(t).getComputedStyle(t,null).getPropertyValue(e)}function xt(t){return function(){delete this[t]}}function At(t,e){return function(){this[t]=e}}function wt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function bt(t){return t.trim().split(/^|\s+/)}function Dt(t){return t.classList||new kt(t)}function kt(t){this._node=t,this._names=bt(t.getAttribute("class")||"")}function Ct(t,e){for(var n=Dt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Tt(t,e){for(var n=Dt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Mt(t){return function(){Ct(this,t)}}function _t(t){return function(){Tt(this,t)}}function Et(t,e){return function(){(e.apply(this,arguments)?Ct:Tt)(this,t)}}function Ft(){this.textContent=""}function St(t){return function(){this.textContent=t}}function Bt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Nt(){this.innerHTML=""}function Lt(t){return function(){this.innerHTML=t}}function It(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Ot(){this.nextSibling&&this.parentNode.appendChild(this)}function Vt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Pt(){return null}function $t(){var t=this.parentNode;t&&t.removeChild(this)}function Yt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Rt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function zt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Ut(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var l=0,o=i.length;l<o;++l)if((r=i[l]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function Ht(t,e,n){var r=gt(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Xt(t,e){return function(){return Ht(this,t,e)}}function Wt(t,e){return function(){return Ht(this,t,e.apply(this,arguments))}}nt.prototype={constructor:nt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},kt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var jt=[null];function qt(t,e){this._groups=t,this._parents=e}function Gt(){return new qt([[document.documentElement]],jt)}function Qt(t){return"string"==typeof t?new qt([[document.querySelector(t)]],[document.documentElement]):new qt([[t]],jt)}function Zt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Kt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Jt(){}qt.prototype=Gt.prototype={constructor:qt,select:function(t){"function"!=typeof t&&(t=X(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,l,o=e[i],s=o.length,u=r[i]=new Array(s),f=0;f<s;++f)(a=o[f])&&(l=t.call(a,a.__data__,f,o))&&("__data__"in a&&(l.__data__=a.__data__),u[f]=l);return new qt(r,this._parents)},selectAll:function(t){t="function"==typeof t?q(t):j(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var l,o=e[a],s=o.length,u=0;u<s;++u)(l=o[u])&&(r.push(t.call(l,l.__data__,u,o)),i.push(l));return new qt(r,i)},selectChild:function(t){return this.select(null==t?K:function(t){return function(){return Z.call(this.children,t)}}("function"==typeof t?t:Q(t)))},selectChildren:function(t){return this.selectAll(null==t?tt:function(t){return function(){return J.call(this.children,t)}}("function"==typeof t?t:Q(t)))},filter:function(t){"function"!=typeof t&&(t=G(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,l=e[i],o=l.length,s=r[i]=[],u=0;u<o;++u)(a=l[u])&&t.call(a,a.__data__,u,l)&&s.push(a);return new qt(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,at);var n=e?it:rt,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=i.length,l=new Array(a),o=new Array(a),s=new Array(a),u=0;u<a;++u){var f=r[u],h=i[u],c=h.length,d=lt(t.call(f,f&&f.__data__,u,r)),g=d.length,p=o[u]=new Array(g),y=l[u]=new Array(g);n(f,h,p,y,s[u]=new Array(c),d,e);for(var m,v,x=0,A=0;x<g;++x)if(m=p[x]){for(x>=A&&(A=x+1);!(v=y[A])&&++A<g;);m._next=v||null}}return(l=new qt(l,r))._enter=o,l._exit=s,l},enter:function(){return new qt(this._enter||this._groups.map(et),this._parents)},exit:function(){return new qt(this._exit||this._groups.map(et),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,l=Math.min(i,a),o=new Array(i),s=0;s<l;++s)for(var u,f=n[s],h=r[s],c=f.length,d=o[s]=new Array(c),g=0;g<c;++g)(u=f[g]||h[g])&&(d[g]=u);for(;s<i;++s)o[s]=n[s];return new qt(o,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,l=i[a];--a>=0;)(r=i[a])&&(l&&4^r.compareDocumentPosition(l)&&l.parentNode.insertBefore(r,l),l=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ot);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var l,o=n[a],s=o.length,u=i[a]=new Array(s),f=0;f<s;++f)(l=o[f])&&(u[f]=l);u.sort(e)}return new qt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var l=r[i];if(l)return l}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],l=0,o=a.length;l<o;++l)(i=a[l])&&t.call(i,i.__data__,l,a);return this},attr:function(t,e){var n=Y(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?ut:st:"function"==typeof e?n.local?dt:ct:n.local?ht:ft)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?pt:"function"==typeof e?mt:yt)(t,e,null==n?"":n)):vt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?xt:"function"==typeof e?wt:At)(t,e)):this.node()[t]},classed:function(t,e){var n=bt(t+"");if(arguments.length<2){for(var r=Dt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Et:e?Mt:_t)(n,e))},text:function(t){return arguments.length?this.each(null==t?Ft:("function"==typeof t?Bt:St)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Nt:("function"==typeof t?It:Lt)(t)):this.node().innerHTML},raise:function(){return this.each(Ot)},lower:function(){return this.each(Vt)},append:function(t){var e="function"==typeof t?t:U(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:U(t),r=null==e?Pt:"function"==typeof e?e:X(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each($t)},clone:function(t){return this.select(t?Rt:Yt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),l=a.length;if(!(arguments.length<2)){for(o=e?Ut:zt,r=0;r<l;++r)this.each(o(a[r],e,n));return this}var o=this.node().__on;if(o)for(var s,u=0,f=o.length;u<f;++u)for(r=0,s=o[u];r<l;++r)if((i=a[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,e){return this.each(("function"==typeof e?Wt:Xt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,l=i.length;a<l;++a)(r=i[a])&&(yield r)}};var te=.7,ee=1/te,ne="\\s*([+-]?\\d+)\\s*",re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ae=/^#([0-9a-f]{3,8})$/,le=new RegExp(`^rgb\\(${ne},${ne},${ne}\\)$`),oe=new RegExp(`^rgb\\(${ie},${ie},${ie}\\)$`),se=new RegExp(`^rgba\\(${ne},${ne},${ne},${re}\\)$`),ue=new RegExp(`^rgba\\(${ie},${ie},${ie},${re}\\)$`),fe=new RegExp(`^hsl\\(${re},${ie},${ie}\\)$`),he=new RegExp(`^hsla\\(${re},${ie},${ie},${re}\\)$`),ce={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function de(){return this.rgb().formatHex()}function ge(){return this.rgb().formatRgb()}function pe(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ae.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ye(e):3===n?new Ae(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?me(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?me(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=le.exec(t))?new Ae(e[1],e[2],e[3],1):(e=oe.exec(t))?new Ae(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=se.exec(t))?me(e[1],e[2],e[3],e[4]):(e=ue.exec(t))?me(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=fe.exec(t))?Te(e[1],e[2]/100,e[3]/100,1):(e=he.exec(t))?Te(e[1],e[2]/100,e[3]/100,e[4]):ce.hasOwnProperty(t)?ye(ce[t]):"transparent"===t?new Ae(NaN,NaN,NaN,0):null}function ye(t){return new Ae(t>>16&255,t>>8&255,255&t,1)}function me(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ae(t,e,n,r)}function ve(t){return t instanceof Jt||(t=pe(t)),t?new Ae((t=t.rgb()).r,t.g,t.b,t.opacity):new Ae}function xe(t,e,n,r){return 1===arguments.length?ve(t):new Ae(t,e,n,null==r?1:r)}function Ae(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function we(){return`#${Ce(this.r)}${Ce(this.g)}${Ce(this.b)}`}function be(){const t=De(this.opacity);return`${1===t?"rgb(":"rgba("}${ke(this.r)}, ${ke(this.g)}, ${ke(this.b)}${1===t?")":`, ${t})`}`}function De(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ke(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ce(t){return((t=ke(t))<16?"0":"")+t.toString(16)}function Te(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new _e(t,e,n,r)}function Me(t){if(t instanceof _e)return new _e(t.h,t.s,t.l,t.opacity);if(t instanceof Jt||(t=pe(t)),!t)return new _e;if(t instanceof _e)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),l=NaN,o=a-i,s=(a+i)/2;return o?(l=e===a?(n-r)/o+6*(n<r):n===a?(r-e)/o+2:(e-n)/o+4,o/=s<.5?a+i:2-a-i,l*=60):o=s>0&&s<1?0:l,new _e(l,o,s,t.opacity)}function _e(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ee(t){return(t=(t||0)%360)<0?t+360:t}function Fe(t){return Math.max(0,Math.min(1,t||0))}function Se(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Zt(Jt,pe,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:de,formatHex:de,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Me(this).formatHsl()},formatRgb:ge,toString:ge}),Zt(Ae,xe,Kt(Jt,{brighter(t){return t=null==t?ee:Math.pow(ee,t),new Ae(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?te:Math.pow(te,t),new Ae(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ae(ke(this.r),ke(this.g),ke(this.b),De(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:we,formatHex:we,formatHex8:function(){return`#${Ce(this.r)}${Ce(this.g)}${Ce(this.b)}${Ce(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:be,toString:be})),Zt(_e,(function(t,e,n,r){return 1===arguments.length?Me(t):new _e(t,e,n,null==r?1:r)}),Kt(Jt,{brighter(t){return t=null==t?ee:Math.pow(ee,t),new _e(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?te:Math.pow(te,t),new _e(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ae(Se(t>=240?t-240:t+120,i,r),Se(t,i,r),Se(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new _e(Ee(this.h),Fe(this.s),Fe(this.l),De(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=De(this.opacity);return`${1===t?"hsl(":"hsla("}${Ee(this.h)}, ${100*Fe(this.s)}%, ${100*Fe(this.l)}%${1===t?")":`, ${t})`}`}}));const Be=Math.PI/180,Ne=180/Math.PI,Le=.96422,Ie=.82521,Oe=4/29,Ve=6/29,Pe=3*Ve*Ve,$e=Ve*Ve*Ve;function Ye(t){if(t instanceof ze)return new ze(t.l,t.a,t.b,t.opacity);if(t instanceof je)return qe(t);t instanceof Ae||(t=ve(t));var e,n,r=We(t.r),i=We(t.g),a=We(t.b),l=Ue((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=l:(e=Ue((.4360747*r+.3850649*i+.1430804*a)/Le),n=Ue((.0139322*r+.0971045*i+.7141733*a)/Ie)),new ze(116*l-16,500*(e-l),200*(l-n),t.opacity)}function Re(t,e,n,r){return 1===arguments.length?Ye(t):new ze(t,e,n,null==r?1:r)}function ze(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Ue(t){return t>$e?Math.pow(t,1/3):t/Pe+Oe}function He(t){return t>Ve?t*t*t:Pe*(t-Oe)}function Xe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function We(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function je(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function qe(t){if(isNaN(t.h))return new ze(t.l,0,0,t.opacity);var e=t.h*Be;return new ze(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Zt(ze,Re,Kt(Jt,{brighter(t){return new ze(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new ze(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ae(Xe(3.1338561*(e=Le*He(e))-1.6168667*(t=1*He(t))-.4906146*(n=Ie*He(n))),Xe(-.9787684*e+1.9161415*t+.033454*n),Xe(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Zt(je,(function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof je)return new je(t.h,t.c,t.l,t.opacity);if(t instanceof ze||(t=Ye(t)),0===t.a&&0===t.b)return new je(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Ne;return new je(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new je(t,e,n,null==r?1:r)}),Kt(Jt,{brighter(t){return new je(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new je(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return qe(this).rgb()}}));var Ge=t=>()=>t;function Qe(t){return 1==(t=+t)?Ze:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ge(isNaN(e)?n:e)}}function Ze(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ge(isNaN(t)?e:t)}var Ke=function t(e){var n=Qe(e);function r(t,e){var r=n((t=xe(t)).r,(e=xe(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),l=Ze(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=l(e),t+""}}return r.gamma=t,r}(1);var Je,tn=(Je=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],l=r>0?t[r-1]:2*i-a,o=r<e-1?t[r+2]:2*a-i;return function(t,e,n,r,i){var a=t*t,l=a*t;return((1-3*t+3*a-l)*e+(4-6*a+3*l)*n+(1+3*t+3*a-3*l)*r+l*i)/6}((n-r/e)*e,l,i,a,o)}},function(t){var e,n,r=t.length,i=new Array(r),a=new Array(r),l=new Array(r);for(e=0;e<r;++e)n=xe(t[e]),i[e]=n.r||0,a[e]=n.g||0,l[e]=n.b||0;return i=Je(i),a=Je(a),l=Je(l),n.opacity=1,function(t){return n.r=i(t),n.g=a(t),n.b=l(t),n+""}});function en(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function nn(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),l=new Array(r);for(n=0;n<i;++n)a[n]=fn(t[n],e[n]);for(;n<r;++n)l[n]=e[n];return function(t){for(n=0;n<i;++n)l[n]=a[n](t);return l}}function rn(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function an(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function ln(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=fn(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var on=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sn=new RegExp(on.source,"g");function un(t,e){var n,r,i,a=on.lastIndex=sn.lastIndex=0,l=-1,o=[],s=[];for(t+="",e+="";(n=on.exec(t))&&(r=sn.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),o[l]?o[l]+=i:o[++l]=i),(n=n[0])===(r=r[0])?o[l]?o[l]+=r:o[++l]=r:(o[++l]=null,s.push({i:l,x:an(n,r)})),a=sn.lastIndex;return a<e.length&&(i=e.slice(a),o[l]?o[l]+=i:o[++l]=i),o.length<2?s[0]?function(t){return function(e){return t(e)+""}}(s[0].x):function(t){return function(){return t}}(e):(e=s.length,function(t){for(var n,r=0;r<e;++r)o[(n=s[r]).i]=n.x(t);return o.join("")})}function fn(t,e){var n,r=typeof e;return null==e||"boolean"===r?Ge(e):("number"===r?an:"string"===r?(n=pe(e))?(e=n,Ke):un:e instanceof pe?Ke:e instanceof Date?rn:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?en:Array.isArray(e)?nn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?ln:an)(t,e)}function hn(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var cn,dn=180/Math.PI,gn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function pn(t,e,n,r,i,a){var l,o,s;return(l=Math.sqrt(t*t+e*e))&&(t/=l,e/=l),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,s/=o),t*r<e*n&&(t=-t,e=-e,s=-s,l=-l),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*dn,skewX:Math.atan(s)*dn,scaleX:l,scaleY:o}}function yn(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,l){var o=[],s=[];return a=t(a),l=t(l),function(t,r,i,a,l,o){if(t!==i||r!==a){var s=l.push("translate(",null,e,null,n);o.push({i:s-4,x:an(t,i)},{i:s-2,x:an(r,a)})}else(i||a)&&l.push("translate("+i+e+a+n)}(a.translateX,a.translateY,l.translateX,l.translateY,o,s),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:an(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,l.rotate,o,s),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:an(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,l.skewX,o,s),function(t,e,n,r,a,l){if(t!==n||e!==r){var o=a.push(i(a)+"scale(",null,",",null,")");l.push({i:o-4,x:an(t,n)},{i:o-2,x:an(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,l.scaleX,l.scaleY,o,s),a=l=null,function(t){for(var e,n=-1,r=s.length;++n<r;)o[(e=s[n]).i]=e.x(t);return o.join("")}}}var mn=yn((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?gn:pn(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),vn=yn((function(t){return null==t?gn:(cn||(cn=document.createElementNS("http://www.w3.org/2000/svg","g")),cn.setAttribute("transform",t),(t=cn.transform.baseVal.consolidate())?pn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):gn)}),", ",")",")");function xn(t,e){var n=Ze((t=Re(t)).l,(e=Re(e)).l),r=Ze(t.a,e.a),i=Ze(t.b,e.b),a=Ze(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}var An,wn,bn=0,Dn=0,kn=0,Cn=0,Tn=0,Mn=0,_n="object"==typeof performance&&performance.now?performance:Date,En="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Fn(){return Tn||(En(Sn),Tn=_n.now()+Mn)}function Sn(){Tn=0}function Bn(){this._call=this._time=this._next=null}function Nn(t,e,n){var r=new Bn;return r.restart(t,e,n),r}function Ln(){Tn=(Cn=_n.now())+Mn,bn=Dn=0;try{!function(){Fn(),++bn;for(var t,e=An;e;)(t=Tn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--bn}()}finally{bn=0,function(){var t,e,n=An,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:An=e);wn=t,On(r)}(),Tn=0}}function In(){var t=_n.now(),e=t-Cn;e>1e3&&(Mn-=e,Cn=t)}function On(t){bn||(Dn&&(Dn=clearTimeout(Dn)),t-Tn>24?(t<1/0&&(Dn=setTimeout(Ln,t-_n.now()-Mn)),kn&&(kn=clearInterval(kn))):(kn||(Cn=_n.now(),kn=setInterval(In,1e3)),bn=1,En(Ln)))}function Vn(t,e,n){var r=new Bn;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Bn.prototype=Nn.prototype={constructor:Bn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Fn():+n)+(null==e?0:+e),this._next||wn===this||(wn?wn._next=this:An=this,wn=this),this._call=t,this._time=n,On()},stop:function(){this._call&&(this._call=null,this._time=1/0,On())}};var Pn=L("start","end","cancel","interrupt"),$n=[];function Yn(t,e,n,r,i,a){var l=t.__transition;if(l){if(n in l)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=1,n.timer.restart(l,n.delay,n.time),n.delay<=t&&l(t-n.delay)}function l(a){var u,f,h,c;if(1!==n.state)return s();for(u in i)if((c=i[u]).name===n.name){if(3===c.state)return Vn(l);4===c.state?(c.state=6,c.timer.stop(),c.on.call("interrupt",t,t.__data__,c.index,c.group),delete i[u]):+u<e&&(c.state=6,c.timer.stop(),c.on.call("cancel",t,t.__data__,c.index,c.group),delete i[u])}if(Vn((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(a))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,f=-1;u<h;++u)(c=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++f]=c);r.length=f+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,l=r.length;++a<l;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Nn(a,0,n.time)}(t,n,{name:e,index:r,group:i,on:Pn,tween:$n,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Rn(t,e){var n=Un(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function zn(t,e){var n=Un(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Un(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Hn(t,e){var n,r;return function(){var i=zn(this,t),a=i.tween;if(a!==n)for(var l=0,o=(r=n=a).length;l<o;++l)if(r[l].name===e){(r=r.slice()).splice(l,1);break}i.tween=r}}function Xn(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=zn(this,t),l=a.tween;if(l!==r){i=(r=l).slice();for(var o={name:e,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===e){i[s]=o;break}s===u&&i.push(o)}a.tween=i}}function Wn(t,e,n){var r=t._id;return t.each((function(){var t=zn(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Un(t,r).value[e]}}function jn(t,e){var n;return("number"==typeof e?an:e instanceof pe?Ke:(n=pe(e))?(e=n,Ke):un)(t,e)}function qn(t){return function(){this.removeAttribute(t)}}function Gn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Qn(t,e,n){var r,i,a=n+"";return function(){var l=this.getAttribute(t);return l===a?null:l===r?i:i=e(r=l,n)}}function Zn(t,e,n){var r,i,a=n+"";return function(){var l=this.getAttributeNS(t.space,t.local);return l===a?null:l===r?i:i=e(r=l,n)}}function Kn(t,e,n){var r,i,a;return function(){var l,o,s=n(this);if(null!=s)return(l=this.getAttribute(t))===(o=s+"")?null:l===r&&o===i?a:(i=o,a=e(r=l,s));this.removeAttribute(t)}}function Jn(t,e,n){var r,i,a;return function(){var l,o,s=n(this);if(null!=s)return(l=this.getAttributeNS(t.space,t.local))===(o=s+"")?null:l===r&&o===i?a:(i=o,a=e(r=l,s));this.removeAttributeNS(t.space,t.local)}}function tr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}function er(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i}function nr(t,e){return function(){Rn(this,t).delay=+e.apply(this,arguments)}}function rr(t,e){return e=+e,function(){Rn(this,t).delay=e}}function ir(t,e){return function(){zn(this,t).duration=+e.apply(this,arguments)}}function ar(t,e){return e=+e,function(){zn(this,t).duration=e}}var lr=Gt.prototype.constructor;function or(t){return function(){this.style.removeProperty(t)}}var sr=0;function ur(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function fr(){return++sr}var hr=Gt.prototype;ur.prototype={constructor:ur,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=X(t));for(var r=this._groups,i=r.length,a=new Array(i),l=0;l<i;++l)for(var o,s,u=r[l],f=u.length,h=a[l]=new Array(f),c=0;c<f;++c)(o=u[c])&&(s=t.call(o,o.__data__,c,u))&&("__data__"in o&&(s.__data__=o.__data__),h[c]=s,Yn(h[c],e,n,c,h,Un(o,n)));return new ur(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=j(t));for(var r=this._groups,i=r.length,a=[],l=[],o=0;o<i;++o)for(var s,u=r[o],f=u.length,h=0;h<f;++h)if(s=u[h]){for(var c,d=t.call(s,s.__data__,h,u),g=Un(s,n),p=0,y=d.length;p<y;++p)(c=d[p])&&Yn(c,e,n,p,d,g);a.push(d),l.push(s)}return new ur(a,l,e,n)},selectChild:hr.selectChild,selectChildren:hr.selectChildren,filter:function(t){"function"!=typeof t&&(t=G(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,l=e[i],o=l.length,s=r[i]=[],u=0;u<o;++u)(a=l[u])&&t.call(a,a.__data__,u,l)&&s.push(a);return new ur(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),l=new Array(r),o=0;o<a;++o)for(var s,u=e[o],f=n[o],h=u.length,c=l[o]=new Array(h),d=0;d<h;++d)(s=u[d]||f[d])&&(c[d]=s);for(;o<r;++o)l[o]=e[o];return new ur(l,this._parents,this._name,this._id)},selection:function(){return new lr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=fr(),r=this._groups,i=r.length,a=0;a<i;++a)for(var l,o=r[a],s=o.length,u=0;u<s;++u)if(l=o[u]){var f=Un(l,e);Yn(l,t,n,u,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new ur(r,this._parents,t,n)},call:hr.call,nodes:hr.nodes,node:hr.node,size:hr.size,empty:hr.empty,each:hr.each,on:function(t,e){var n=this._id;return arguments.length<2?Un(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Rn:zn;return function(){var l=a(this,t),o=l.on;o!==r&&(i=(r=o).copy()).on(e,n),l.on=i}}(n,t,e))},attr:function(t,e){var n=Y(t),r="transform"===n?vn:jn;return this.attrTween(t,"function"==typeof e?(n.local?Jn:Kn)(n,r,Wn(this,"attr."+t,e)):null==e?(n.local?Gn:qn)(n):(n.local?Zn:Qn)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Y(t);return this.tween(n,(r.local?tr:er)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?mn:jn;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=vt(this,t),l=(this.style.removeProperty(t),vt(this,t));return a===l?null:a===n&&l===r?i:i=e(n=a,r=l)}}(t,r)).on("end.style."+t,or(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var l=vt(this,t),o=n(this),s=o+"";return null==o&&(this.style.removeProperty(t),s=o=vt(this,t)),l===s?null:l===r&&s===i?a:(i=s,a=e(r=l,o))}}(t,r,Wn(this,"style."+t,e))).each(function(t,e){var n,r,i,a,l="style."+e,o="end."+l;return function(){var s=zn(this,t),u=s.on,f=null==s.value[l]?a||(a=or(e)):void 0;u===n&&i===f||(r=(n=u).copy()).on(o,i=f),s.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var l=vt(this,t);return l===a?null:l===r?i:i=e(r=l,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,a,n)),r}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Wn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=Un(this.node(),n).tween,a=0,l=i.length;a<l;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Hn:Xn)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?nr:rr)(e,t)):Un(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ir:ar)(e,t)):Un(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){zn(this,t).ease=e}}(e,t)):Un(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;zn(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,l){var o={value:l},s={value:function(){0==--i&&a()}};n.each((function(){var n=zn(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(o),e._.interrupt.push(o),e._.end.push(s)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:hr[Symbol.iterator]};var cr={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function dr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Gt.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,l=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):l=!1;l&&delete t.__transition}}(this,t)}))},Gt.prototype.transition=function(t){var e,n;t instanceof ur?(e=t._id,t=t._name):(e=fr(),(n=cr).time=Fn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var l,o=r[a],s=o.length,u=0;u<s;++u)(l=o[u])&&Yn(l,t,e,u,o,n||dr(l,e));return new ur(r,this._parents,t,e)};const gr=Math.PI,pr=2*gr,yr=1e-6,mr=pr-yr;function vr(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class xr{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?vr:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return vr;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,a){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let a=this._x1,l=this._y1,o=n-t,s=r-e,u=a-t,f=l-e,h=u*u+f*f;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(h>yr)if(Math.abs(f*o-s*u)>yr&&i){let c=n-a,d=r-l,g=o*o+s*s,p=c*c+d*d,y=Math.sqrt(g),m=Math.sqrt(h),v=i*Math.tan((gr-Math.acos((g+h-p)/(2*y*m)))/2),x=v/m,A=v/y;Math.abs(x-1)>yr&&this._append`L${t+x*u},${e+x*f}`,this._append`A${i},${i},0,0,${+(f*c>u*d)},${this._x1=t+A*o},${this._y1=e+A*s}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(r),o=n*Math.sin(r),s=t+l,u=e+o,f=1^a,h=a?r-i:i-r;null===this._x1?this._append`M${s},${u}`:(Math.abs(this._x1-s)>yr||Math.abs(this._y1-u)>yr)&&this._append`L${s},${u}`,n&&(h<0&&(h=h%pr+pr),h>mr?this._append`A${n},${n},0,1,${f},${t-l},${e-o}A${n},${n},0,1,${f},${this._x1=s},${this._y1=u}`:h>yr&&this._append`A${n},${n},0,${+(h>=gr)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Ar(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function wr(t){return(t=Ar(Math.abs(t)))?t[1]:NaN}var br,Dr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function kr(t){if(!(e=Dr.exec(t)))throw new Error("invalid format: "+t);var e;return new Cr({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Cr(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Tr(t,e){var n=Ar(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}kr.prototype=Cr.prototype,Cr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Mr={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Tr(100*t,e),r:Tr,s:function(t,e){var n=Ar(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(br=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,l=r.length;return a===l?r:a>l?r+new Array(a-l+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Ar(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function _r(t){return t}var Er,Fr,Sr,Br=Array.prototype.map,Nr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Lr(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?_r:(e=Br.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],l=0,o=e[0],s=0;i>0&&o>0&&(s+o+1>r&&(o=Math.max(1,r-s)),a.push(t.substring(i-=o,i+o)),!((s+=o+1)>r));)o=e[l=(l+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",l=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?_r:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Br.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=kr(t)).fill,n=t.align,h=t.sign,c=t.symbol,d=t.zero,g=t.width,p=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(p=!0,v="g"):Mr[v]||(void 0===y&&(y=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var x="$"===c?i:"#"===c&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",A="$"===c?a:/[%p]/.test(v)?s:"",w=Mr[v],b=/[defgprs%]/.test(v);function D(t){var i,a,s,c=x,D=A;if("c"===v)D=w(t)+D,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?f:w(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),k&&0==+t&&"+"!==h&&(k=!1),c=(k?"("===h?h:u:"-"===h||"("===h?"":h)+c,D=("s"===v?Nr[8+br/3]:"")+D+(k&&"("===h?")":""),b)for(i=-1,a=t.length;++i<a;)if(48>(s=t.charCodeAt(i))||s>57){D=(46===s?l+t.slice(i+1):t.slice(i))+D,t=t.slice(0,i);break}}p&&!d&&(t=r(t,1/0));var C=c.length+t.length+D.length,T=C<g?new Array(g-C+1).join(e):"";switch(p&&d&&(t=r(T+t,T.length?g-D.length:1/0),T=""),n){case"<":t=c+t+D+T;break;case"=":t=c+T+t+D;break;case"^":t=T.slice(0,C=T.length>>1)+c+t+D+T.slice(C);break;default:t=T+c+t+D}return o(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),D.toString=function(){return t+""},D}return{format:h,formatPrefix:function(t,e){var n=h(((t=kr(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(wr(e)/3))),i=Math.pow(10,-r),a=Nr[8+r/3];return function(t){return n(i*t)+a}}}}function Ir(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}Er=Lr({thousands:",",grouping:[3],currency:["$",""]}),Fr=Er.format,Sr=Er.formatPrefix;const Or=Symbol("implicit");function Vr(){var t=new l,e=[],n=[],r=Or;function i(i){let a=t.get(i);if(void 0===a){if(r!==Or)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new l;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Vr(e,n).unknown(r)},Ir.apply(i,arguments),i}function Pr(t){return+t}var $r=[0,1];function Yr(t){return t}function Rr(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function zr(t,e,n){var r=t[0],i=t[1],a=e[0],l=e[1];return i<r?(r=Rr(i,r),a=n(l,a)):(r=Rr(r,i),a=n(a,l)),function(t){return a(r(t))}}function Ur(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),l=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Rr(t[o],t[o+1]),l[o]=n(e[o],e[o+1]);return function(e){var n=a(t,e,1,r)-1;return l[n](i[n](e))}}function Hr(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Xr(){var t,e,n,r,i,a,l=$r,o=$r,s=fn,u=Yr;function f(){var t,e,n,s=Math.min(l.length,o.length);return u!==Yr&&(t=l[0],e=l[s-1],t>e&&(n=t,t=e,e=n),u=function(n){return Math.max(t,Math.min(e,n))}),r=s>2?Ur:zr,i=a=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(l.map(t),o,s)))(t(u(e)))}return h.invert=function(n){return u(e((a||(a=r(o,l.map(t),an)))(n)))},h.domain=function(t){return arguments.length?(l=Array.from(t,Pr),f()):l.slice()},h.range=function(t){return arguments.length?(o=Array.from(t),f()):o.slice()},h.rangeRound=function(t){return o=Array.from(t),s=hn,f()},h.clamp=function(t){return arguments.length?(u=!!t||Yr,f()):u!==Yr},h.interpolate=function(t){return arguments.length?(s=t,f()):s},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,f()}}function Wr(){return Xr()(Yr,Yr)}function jr(t,e,n,r){var i,a=p(t,e,n);switch((r=kr(null==r?",f":r)).type){case"s":var l=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(wr(e)/3)))-wr(Math.abs(t)))}(a,l))||(r.precision=i),Sr(r,l);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,wr(e)-wr(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-wr(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Fr(r)}function qr(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)==(e=+e))return[t];const r=e<t,[i,a,l]=r?d(e,t,n):d(t,e,n);if(!(a>=i))return[];const o=a-i+1,s=new Array(o);if(r)if(l<0)for(let t=0;t<o;++t)s[t]=(a-t)/-l;else for(let t=0;t<o;++t)s[t]=(a-t)*l;else if(l<0)for(let t=0;t<o;++t)s[t]=(i+t)/-l;else for(let t=0;t<o;++t)s[t]=(i+t)*l;return s}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return jr(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,a=e(),l=0,o=a.length-1,s=a[l],u=a[o],f=10;for(u<s&&(i=s,s=u,u=i,i=l,l=o,o=i);f-- >0;){if((i=g(s,u,n))===r)return a[l]=s,a[o]=u,e(a);if(i>0)s=Math.floor(s/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;s=Math.ceil(s*i)/i,u=Math.floor(u*i)/i}r=i}return t},t}function Gr(){var t=Wr();return t.copy=function(){return Hr(t,Gr())},Ir.apply(t,arguments),qr(t)}const Qr=new Date,Zr=new Date;function Kr(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=(t,n)=>(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,a)=>{const l=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return l;let o;do{l.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return l},i.filter=n=>Kr((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})),n&&(i.count=(e,r)=>(Qr.setTime(+e),Zr.setTime(+r),t(Qr),t(Zr),Math.floor(n(Qr,Zr))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t==0:e=>i.count(0,e)%t==0):i:null)),i}const Jr=Kr((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));Jr.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Kr((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):Jr:null),Jr.range;const ti=1e3,ei=6e4,ni=36e5,ri=864e5,ii=6048e5,ai=2592e6,li=31536e6,oi=Kr((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*ti)}),((t,e)=>(e-t)/ti),(t=>t.getUTCSeconds()));oi.range;const si=Kr((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ti)}),((t,e)=>{t.setTime(+t+e*ei)}),((t,e)=>(e-t)/ei),(t=>t.getMinutes()));si.range;const ui=Kr((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*ei)}),((t,e)=>(e-t)/ei),(t=>t.getUTCMinutes()));ui.range;const fi=Kr((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ti-t.getMinutes()*ei)}),((t,e)=>{t.setTime(+t+e*ni)}),((t,e)=>(e-t)/ni),(t=>t.getHours()));fi.range;const hi=Kr((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*ni)}),((t,e)=>(e-t)/ni),(t=>t.getUTCHours()));hi.range;const ci=Kr((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ei)/ri),(t=>t.getDate()-1));ci.range;const di=Kr((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/ri),(t=>t.getUTCDate()-1));di.range;const gi=Kr((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/ri),(t=>Math.floor(t/ri)));function pi(t){return Kr((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ei)/ii))}gi.range;const yi=pi(0),mi=pi(1),vi=pi(2),xi=pi(3),Ai=pi(4),wi=pi(5),bi=pi(6);function Di(t){return Kr((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/ii))}yi.range,mi.range,vi.range,xi.range,Ai.range,wi.range,bi.range;const ki=Di(0),Ci=Di(1),Ti=Di(2),Mi=Di(3),_i=Di(4),Ei=Di(5),Fi=Di(6);ki.range,Ci.range,Ti.range,Mi.range,_i.range,Ei.range,Fi.range;const Si=Kr((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()));Si.range;const Bi=Kr((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));Bi.range;const Ni=Kr((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));Ni.every=t=>isFinite(t=Math.floor(t))&&t>0?Kr((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null,Ni.range;const Li=Kr((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));Li.every=t=>isFinite(t=Math.floor(t))&&t>0?Kr((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null,Li.range;const[Ii,Oi]=function(t,e,n,i,a,l){const o=[[oi,1,ti],[oi,5,5e3],[oi,15,15e3],[oi,30,3e4],[l,1,ei],[l,5,3e5],[l,15,9e5],[l,30,18e5],[a,1,ni],[a,3,108e5],[a,6,216e5],[a,12,432e5],[i,1,ri],[i,2,1728e5],[n,1,ii],[e,1,ai],[e,3,7776e6],[t,1,li]];function s(e,n,i){const a=Math.abs(n-e)/i,l=r((([,,t])=>t)).right(o,a);if(l===o.length)return t.every(p(e/li,n/li,i));if(0===l)return Jr.every(Math.max(p(e,n,i),1));const[s,u]=o[a/o[l-1][2]<o[l][2]/a?l-1:l];return s.every(u)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"==typeof n.range?n:s(t,e,n),a=i?i.range(t,+e+1):[];return r?a.reverse():a},s]}(Ni,Si,yi,ci,fi,si);function Vi(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Pi(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $i(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var Yi,Ri,zi={"-":"",_:" ",0:"0"},Ui=/^\s*\d+/,Hi=/^%/,Xi=/[\\^$*+?|[\]().{}]/g;function Wi(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function ji(t){return t.replace(Xi,"\\$&")}function qi(t){return new RegExp("^(?:"+t.map(ji).join("|")+")","i")}function Gi(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function Qi(t,e,n){var r=Ui.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Zi(t,e,n){var r=Ui.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ki(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Ji(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function ta(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ea(t,e,n){var r=Ui.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function na(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ra(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ia(t,e,n){var r=Ui.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function aa(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function la(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function oa(t,e,n){var r=Ui.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function sa(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ua(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function fa(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function ha(t,e,n){var r=Ui.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ca(t,e,n){var r=Ui.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function da(t,e,n){var r=Hi.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function ga(t,e,n){var r=Ui.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function pa(t,e,n){var r=Ui.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function ya(t,e){return Wi(t.getDate(),e,2)}function ma(t,e){return Wi(t.getHours(),e,2)}function va(t,e){return Wi(t.getHours()%12||12,e,2)}function xa(t,e){return Wi(1+ci.count(Ni(t),t),e,3)}function Aa(t,e){return Wi(t.getMilliseconds(),e,3)}function wa(t,e){return Aa(t,e)+"000"}function ba(t,e){return Wi(t.getMonth()+1,e,2)}function Da(t,e){return Wi(t.getMinutes(),e,2)}function ka(t,e){return Wi(t.getSeconds(),e,2)}function Ca(t){var e=t.getDay();return 0===e?7:e}function Ta(t,e){return Wi(yi.count(Ni(t)-1,t),e,2)}function Ma(t){var e=t.getDay();return e>=4||0===e?Ai(t):Ai.ceil(t)}function _a(t,e){return t=Ma(t),Wi(Ai.count(Ni(t),t)+(4===Ni(t).getDay()),e,2)}function Ea(t){return t.getDay()}function Fa(t,e){return Wi(mi.count(Ni(t)-1,t),e,2)}function Sa(t,e){return Wi(t.getFullYear()%100,e,2)}function Ba(t,e){return Wi((t=Ma(t)).getFullYear()%100,e,2)}function Na(t,e){return Wi(t.getFullYear()%1e4,e,4)}function La(t,e){var n=t.getDay();return Wi((t=n>=4||0===n?Ai(t):Ai.ceil(t)).getFullYear()%1e4,e,4)}function Ia(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Wi(e/60|0,"0",2)+Wi(e%60,"0",2)}function Oa(t,e){return Wi(t.getUTCDate(),e,2)}function Va(t,e){return Wi(t.getUTCHours(),e,2)}function Pa(t,e){return Wi(t.getUTCHours()%12||12,e,2)}function $a(t,e){return Wi(1+di.count(Li(t),t),e,3)}function Ya(t,e){return Wi(t.getUTCMilliseconds(),e,3)}function Ra(t,e){return Ya(t,e)+"000"}function za(t,e){return Wi(t.getUTCMonth()+1,e,2)}function Ua(t,e){return Wi(t.getUTCMinutes(),e,2)}function Ha(t,e){return Wi(t.getUTCSeconds(),e,2)}function Xa(t){var e=t.getUTCDay();return 0===e?7:e}function Wa(t,e){return Wi(ki.count(Li(t)-1,t),e,2)}function ja(t){var e=t.getUTCDay();return e>=4||0===e?_i(t):_i.ceil(t)}function qa(t,e){return t=ja(t),Wi(_i.count(Li(t),t)+(4===Li(t).getUTCDay()),e,2)}function Ga(t){return t.getUTCDay()}function Qa(t,e){return Wi(Ci.count(Li(t)-1,t),e,2)}function Za(t,e){return Wi(t.getUTCFullYear()%100,e,2)}function Ka(t,e){return Wi((t=ja(t)).getUTCFullYear()%100,e,2)}function Ja(t,e){return Wi(t.getUTCFullYear()%1e4,e,4)}function tl(t,e){var n=t.getUTCDay();return Wi((t=n>=4||0===n?_i(t):_i.ceil(t)).getUTCFullYear()%1e4,e,4)}function el(){return"+0000"}function nl(){return"%"}function rl(t){return+t}function il(t){return Math.floor(+t/1e3)}function al(t){return new Date(t)}function ll(t){return t instanceof Date?+t:+new Date(+t)}function ol(t,e,n,r,i,a,l,o,s,u){var f=Wr(),h=f.invert,c=f.domain,d=u(".%L"),g=u(":%S"),p=u("%I:%M"),y=u("%I %p"),m=u("%a %d"),v=u("%b %d"),x=u("%B"),A=u("%Y");function w(t){return(s(t)<t?d:o(t)<t?g:l(t)<t?p:a(t)<t?y:r(t)<t?i(t)<t?m:v:n(t)<t?x:A)(t)}return f.invert=function(t){return new Date(h(t))},f.domain=function(t){return arguments.length?c(Array.from(t,ll)):c().map(al)},f.ticks=function(e){var n=c();return t(n[0],n[n.length-1],null==e?10:e)},f.tickFormat=function(t,e){return null==e?w:u(e)},f.nice=function(t){var n=c();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?c(function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],l=t[i];return l<a&&(n=r,r=i,i=n,n=a,a=l,l=n),t[r]=e.floor(a),t[i]=e.ceil(l),t}(n,t)):f},f.copy=function(){return Hr(f,ol(t,e,n,r,i,a,l,o,s,u))},f}function sl(){return Ir.apply(ol(Ii,Oi,Ni,Si,yi,ci,fi,si,oi,Ri).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}!function(t){Yi=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,l=t.shortDays,o=t.months,s=t.shortMonths,u=qi(i),f=Gi(i),h=qi(a),c=Gi(a),d=qi(l),g=Gi(l),p=qi(o),y=Gi(o),m=qi(s),v=Gi(s),x={a:function(t){return l[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return s[t.getMonth()]},B:function(t){return o[t.getMonth()]},c:null,d:ya,e:ya,f:wa,g:Ba,G:La,H:ma,I:va,j:xa,L:Aa,m:ba,M:Da,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:rl,s:il,S:ka,u:Ca,U:Ta,V:_a,w:Ea,W:Fa,x:null,X:null,y:Sa,Y:Na,Z:Ia,"%":nl},A={a:function(t){return l[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return o[t.getUTCMonth()]},c:null,d:Oa,e:Oa,f:Ra,g:Ka,G:tl,H:Va,I:Pa,j:$a,L:Ya,m:za,M:Ua,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:rl,s:il,S:Ha,u:Xa,U:Wa,V:qa,w:Ga,W:Qa,x:null,X:null,y:Za,Y:Ja,Z:el,"%":nl},w={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=c.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return k(t,e,n,r)},d:la,e:la,f:ca,g:na,G:ea,H:sa,I:sa,j:oa,L:ha,m:aa,M:ua,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=f.get(r[0].toLowerCase()),n+r[0].length):-1},q:ia,Q:ga,s:pa,S:fa,u:Zi,U:Ki,V:Ji,w:Qi,W:ta,x:function(t,e,r){return k(t,n,e,r)},X:function(t,e,n){return k(t,r,e,n)},y:na,Y:ea,Z:ra,"%":da};function b(t,e){return function(n){var r,i,a,l=[],o=-1,s=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++o<u;)37===t.charCodeAt(o)&&(l.push(t.slice(s,o)),null!=(i=zi[r=t.charAt(++o)])?r=t.charAt(++o):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),l.push(r),s=o+1);return l.push(t.slice(s,o)),l.join("")}}function D(t,e){return function(n){var r,i,a=$i(1900,void 0,1);if(k(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Pi($i(a.y,0,1))).getUTCDay(),r=i>4||0===i?Ci.ceil(r):Ci(r),r=di.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Vi($i(a.y,0,1))).getDay(),r=i>4||0===i?mi.ceil(r):mi(r),r=ci.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Pi($i(a.y,0,1)).getUTCDay():Vi($i(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Pi(a)):Vi(a)}}function k(t,e,n,r){for(var i,a,l=0,o=e.length,s=n.length;l<o;){if(r>=s)return-1;if(37===(i=e.charCodeAt(l++))){if(i=e.charAt(l++),!(a=w[i in zi?e.charAt(l++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return x.x=b(n,x),x.X=b(r,x),x.c=b(e,x),A.x=b(n,A),A.X=b(r,A),A.c=b(e,A),{format:function(t){var e=b(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=D(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=b(t+="",A);return e.toString=function(){return t},e},utcParse:function(t){var e=D(t+="",!0);return e.toString=function(){return t},e}}}(t),Ri=Yi.format,Yi.parse,Yi.utcFormat,Yi.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var ul=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map((function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}));function fl(t){return function(){return t}}(t=>{tn(t[t.length-1])})(ul);const hl=Math.abs,cl=Math.atan2,dl=Math.cos,gl=Math.max,pl=Math.min,yl=Math.sin,ml=Math.sqrt,vl=1e-12,xl=Math.PI,Al=xl/2,wl=2*xl;function bl(t){return t>=1?Al:t<=-1?-Al:Math.asin(t)}function Dl(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new xr(e)}function kl(t){return t.innerRadius}function Cl(t){return t.outerRadius}function Tl(t){return t.startAngle}function Ml(t){return t.endAngle}function _l(t){return t&&t.padAngle}function El(t,e,n,r,i,a,l){var o=t-n,s=e-r,u=(l?a:-a)/ml(o*o+s*s),f=u*s,h=-u*o,c=t+f,d=e+h,g=n+f,p=r+h,y=(c+g)/2,m=(d+p)/2,v=g-c,x=p-d,A=v*v+x*x,w=i-a,b=c*p-g*d,D=(x<0?-1:1)*ml(gl(0,w*w*A-b*b)),k=(b*x-v*D)/A,C=(-b*v-x*D)/A,T=(b*x+v*D)/A,M=(-b*v+x*D)/A,_=k-y,E=C-m,F=T-y,S=M-m;return _*_+E*E>F*F+S*S&&(k=T,C=M),{cx:k,cy:C,x01:-f,y01:-h,x11:k*(i/w-1),y11:C*(i/w-1)}}function Fl(){var t=kl,e=Cl,n=fl(0),r=null,i=Tl,a=Ml,l=_l,o=null,s=Dl(u);function u(){var u,f,h=+t.apply(this,arguments),c=+e.apply(this,arguments),d=i.apply(this,arguments)-Al,g=a.apply(this,arguments)-Al,p=hl(g-d),y=g>d;if(o||(o=u=s()),c<h&&(f=c,c=h,h=f),c>vl)if(p>wl-vl)o.moveTo(c*dl(d),c*yl(d)),o.arc(0,0,c,d,g,!y),h>vl&&(o.moveTo(h*dl(g),h*yl(g)),o.arc(0,0,h,g,d,y));else{var m,v,x=d,A=g,w=d,b=g,D=p,k=p,C=l.apply(this,arguments)/2,T=C>vl&&(r?+r.apply(this,arguments):ml(h*h+c*c)),M=pl(hl(c-h)/2,+n.apply(this,arguments)),_=M,E=M;if(T>vl){var F=bl(T/h*yl(C)),S=bl(T/c*yl(C));(D-=2*F)>vl?(w+=F*=y?1:-1,b-=F):(D=0,w=b=(d+g)/2),(k-=2*S)>vl?(x+=S*=y?1:-1,A-=S):(k=0,x=A=(d+g)/2)}var B=c*dl(x),N=c*yl(x),L=h*dl(b),I=h*yl(b);if(M>vl){var O,V=c*dl(A),P=c*yl(A),$=h*dl(w),Y=h*yl(w);if(p<xl)if(O=function(t,e,n,r,i,a,l,o){var s=n-t,u=r-e,f=l-i,h=o-a,c=h*s-f*u;if(!(c*c<vl))return[t+(c=(f*(e-a)-h*(t-i))/c)*s,e+c*u]}(B,N,$,Y,V,P,L,I)){var R=B-O[0],z=N-O[1],U=V-O[0],H=P-O[1],X=1/yl(function(t){return t>1?0:t<-1?xl:Math.acos(t)}((R*U+z*H)/(ml(R*R+z*z)*ml(U*U+H*H)))/2),W=ml(O[0]*O[0]+O[1]*O[1]);_=pl(M,(h-W)/(X-1)),E=pl(M,(c-W)/(X+1))}else _=E=0}k>vl?E>vl?(m=El($,Y,B,N,c,E,y),v=El(V,P,L,I,c,E,y),o.moveTo(m.cx+m.x01,m.cy+m.y01),E<M?o.arc(m.cx,m.cy,E,cl(m.y01,m.x01),cl(v.y01,v.x01),!y):(o.arc(m.cx,m.cy,E,cl(m.y01,m.x01),cl(m.y11,m.x11),!y),o.arc(0,0,c,cl(m.cy+m.y11,m.cx+m.x11),cl(v.cy+v.y11,v.cx+v.x11),!y),o.arc(v.cx,v.cy,E,cl(v.y11,v.x11),cl(v.y01,v.x01),!y))):(o.moveTo(B,N),o.arc(0,0,c,x,A,!y)):o.moveTo(B,N),h>vl&&D>vl?_>vl?(m=El(L,I,V,P,h,-_,y),v=El(B,N,$,Y,h,-_,y),o.lineTo(m.cx+m.x01,m.cy+m.y01),_<M?o.arc(m.cx,m.cy,_,cl(m.y01,m.x01),cl(v.y01,v.x01),!y):(o.arc(m.cx,m.cy,_,cl(m.y01,m.x01),cl(m.y11,m.x11),!y),o.arc(0,0,h,cl(m.cy+m.y11,m.cx+m.x11),cl(v.cy+v.y11,v.cx+v.x11),y),o.arc(v.cx,v.cy,_,cl(v.y11,v.x11),cl(v.y01,v.x01),!y))):o.arc(0,0,h,b,w,y):o.lineTo(L,I)}else o.moveTo(0,0);if(o.closePath(),u)return o=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-xl/2;return[dl(r)*n,yl(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:fl(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:fl(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:fl(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:fl(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:fl(+t),u):i},u.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:fl(+t),u):a},u.padAngle=function(t){return arguments.length?(l="function"==typeof t?t:fl(+t),u):l},u.context=function(t){return arguments.length?(o=null==t?null:t,u):o},u}function Sl(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Bl(t){this._context=t}function Nl(t){return new Bl(t)}function Ll(t){return t[0]}function Il(t){return t[1]}function Ol(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Vl(t){return t}function Pl(t,e,n){this.k=t,this.x=e,this.y=n}var $l,Yl,Rl,zl;Bl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},Pl.prototype={constructor:Pl,scale:function(t){return 1===t?this:new Pl(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Pl(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Pl.prototype,function(t){t[t.Tag=0]="Tag",t[t.Frontmatter=1]="Frontmatter",t[t.Wiki=2]="Wiki",t[t.WikiLink=3]="WikiLink",t[t.WikiDisplay=4]="WikiDisplay",t[t.Text=5]="Text",t[t.dvField=6]="dvField",t[t.Table=7]="Table",t[t.FileMeta=8]="FileMeta",t[t.Task=9]="Task",t[t.TaskDone=10]="TaskDone",t[t.TaskNotDone=11]="TaskNotDone"}($l||($l={})),function(t){t[t.Line=0]="Line",t[t.Bar=1]="Bar",t[t.Pie=2]="Pie",t[t.Radar=3]="Radar",t[t.Summary=4]="Summary",t[t.Table=5]="Table",t[t.Month=6]="Month",t[t.Heatmap=7]="Heatmap",t[t.Bullet=8]="Bullet",t[t.Unknown=9]="Unknown"}(Yl||(Yl={})),function(t){t[t.Number=0]="Number",t[t.Int=1]="Int",t[t.Date=2]="Date",t[t.Time=3]="Time",t[t.DateTime=4]="DateTime",t[t.String=5]="String"}(Rl||(Rl={})),function(t){t.GreaterThan="greaterthan",t.LessThan="lessthan"}(zl||(zl={}));class Ul{constructor(t,e){this.date=t,this.value=e}}class Hl{constructor(t,e,n){if(this.type=e,this.target=n,this.separator="",this.id=t,this.accessor=-1,this.accessor1=-1,this.accessor2=-1,this.valueType=Rl.Number,this.usedAsXDataset=!1,this.numTargets=0,e===$l.Table){let t,e=new RegExp("\\[(?<accessor>[0-9]+)\\]\\[(?<accessor1>[0-9]+)\\](\\[(?<accessor2>[0-9]+)\\])?","gm");for(;t=e.exec(n);)if(void 0!==t.groups.accessor){let r=parseFloat(t.groups.accessor);if(Number.isNumber(r)&&void 0!==t.groups.accessor1){let i=parseFloat(t.groups.accessor1);if(Number.isNumber(i)){let a;void 0!==t.groups.accessor2&&(a=parseFloat(t.groups.accessor2)),this.accessor=r,this.accessor1=i,Number.isNumber(a)&&(this.accessor2=a),this.parentTarget=n.replace(e,"")}break}}}else{let t,e=new RegExp("\\[(?<accessor>[0-9]+)\\]","gm");for(;t=e.exec(n);)if(void 0!==t.groups.accessor){let r=parseFloat(t.groups.accessor);Number.isNumber(r)&&(this.accessor=r,this.parentTarget=n.replace(e,""));break}}}equalTo(t){return this.type===t.type&&this.target===t.target}getType(){return this.type}getTarget(){return this.target}getParentTarget(){return this.parentTarget}getId(){return this.id}getAccessor(t=0){switch(t){case 0:return this.accessor;case 1:return this.accessor1;case 2:return this.accessor2}return null}setSeparator(t){this.separator=t}getSeparator(t=!1){return""===this.separator?t?",":"/":this.separator}addNumTargets(t=1){this.numTargets=this.numTargets+t}getNumTargets(){return this.numTargets}}class Xl{constructor(t,e){this.currentIndex=0,this.name="untitled",this.query=e,this.values=[],this.parent=t,this.id=-1,this.yMin=null,this.yMax=null,this.startDate=null,this.endDate=null,this.numTargets=0,this.lineInfo=null,this.barInfo=null,this.isTmpDataset=!1,this.valueType=null==e?void 0:e.valueType;for(let e=0;e<t.getDates().length;e++)this.values.push(null)}cloneToTmpDataset(){if(!this.isTmpDataset){let t=new Xl(this.parent,null);return t.name="tmp",t.values=[...this.values],t.yMin=this.yMin,t.yMax=this.yMax,t.startDate=this.startDate.clone(),t.endDate=this.endDate.clone(),t.numTargets=this.numTargets,t.isTmpDataset=!0,t.valueType=this.valueType,t}return this}getName(){return this.name}setName(t){this.name=t}getId(){return this.id}setId(t){this.id=t}addNumTargets(t){this.numTargets=this.numTargets+t}getNumTargets(){return this.numTargets}getValue(t,e=0){let n=this.parent.getIndexOfDate(t)+Math.floor(e);return n>=0&&n<this.values.length?this.values[n]:null}setValue(t,e){let n=this.parent.getIndexOfDate(t);n>=0&&n<this.values.length&&(this.values[n]=e,(null===this.yMin||e<this.yMin)&&(this.yMin=e),(null===this.yMax||e>this.yMax)&&(this.yMax=e),(null===this.startDate||t<this.startDate)&&(this.startDate=t.clone()),(null===this.endDate||t>this.endDate)&&(this.endDate=t.clone()))}recalculateMinMax(){this.yMin=Math.min(...this.values),this.yMax=Math.max(...this.values)}getYMin(){return this.yMin}getYMax(){return this.yMax}getStartDate(){return this.startDate}getEndDate(){return this.endDate}shift(t,e){let n=!1;for(let r=0;r<this.values.length;r++)null!==this.values[r]&&(null===e||this.values[r]>=e)&&(this.values[r]=this.values[r]+t,n=!0);n&&(this.yMin=this.yMin+t,this.yMax=this.yMax+t)}setPenalty(t){for(let e=0;e<this.values.length;e++)null===this.values[e]&&(this.values[e]=t,t<this.yMin&&(this.yMin=t),t>this.yMax&&(this.yMax=t))}getQuery(){return this.query}accumulateValues(){let t=0;for(let e=0;e<this.values.length;e++)null!==this.values[e]&&(t+=this.values[e]),this.values[e]=t,t<this.yMin&&(this.yMin=t),t>this.yMax&&(this.yMax=t)}shiftByDataset(t){for(let e=0;e<this.values.length;e++){let n=this.values[e];null!==t.values[e]&&null!==n?n+=t.values[e]:null!==t.values[e]&&(n=t.values[e]),this.values[e]=n,n<this.yMin&&(this.yMin=n),n>this.yMax&&(this.yMax=n)}}getValues(){return this.values}getLength(){return this.values.length}getLengthNotNull(){let t=0;for(let e=0;e<this.values.length;e++)null!==this.values[e]&&t++;return t}next(){if(this.currentIndex<this.values.length){let t=this.currentIndex++;return{done:!1,value:new Ul(this.parent.getDates()[t],this.values[t])}}return this.currentIndex=0,{done:!0,value:null}}[Symbol.iterator](){return this}}class Wl{constructor(t,e){this.currentIndex=0,this.dates=[],this.datasets=[];const n=t.creationData().format.toString();for(let r=t.clone();r<=e;r.add(1,"days")){let t=window.moment(r.format(n),n,!0);this.dates.push(t)}}createDataset(t,e){let n=new Xl(this,t);return n.setId(t.getId()),e&&n.setName(e.datasetName[t.getId()]),this.datasets.push(n),n}getIndexOfDate(t){const e=t.creationData().format.toString();for(let n=0;n<this.dates.length;n++)if(this.dates[n].format(e)===t.format(e))return n;return-1}getDatasetByQuery(t){for(let e of this.datasets)if(e.getQuery().equalTo(t))return e;return null}getDatasetById(t){for(let e of this.datasets)if(e.getId()===t)return e;return null}getXDatasetIds(){let t=[];for(let e of this.datasets)if(e.getQuery().usedAsXDataset){let n=e.getQuery().getId();t.includes(n)||-1===n||t.push(n)}return t}getDates(){return this.dates}getNames(){let t=[];for(let e of this.datasets)t.push(e.getName());return t}next(){return this.currentIndex<this.datasets.length?{done:!1,value:this.datasets[this.currentIndex++]}:(this.currentIndex=0,{done:!0,value:null})}[Symbol.iterator](){return this}}class jl{constructor(t){this.queries=t,this.xDataset=[],this.folder="/",this.file=[],this.specifiedFilesOnly=!1,this.fileContainsLinkedFiles=[],this.fileMultiplierAfterLink="",this.dateFormat="YYYY-MM-DD",this.dateFormatPrefix="",this.dateFormatSuffix="",this.startDate=null,this.endDate=null,this.datasetName=[],this.constValue=[1],this.ignoreAttachedValue=[],this.ignoreZeroValue=[],this.accum=[],this.stack=!1,this.penalty=[],this.valueShift=[],this.shiftOnlyValueLargerThan=[],this.valueType=[],this.textValueMap={},this.dataAreaSize=new ro(300,300),this.aspectRatio=new io(1,1),this.margin=new ao(10,10,10,10),this.fixedScale=1,this.fitPanelWidth=!1,this.output=[],this.line=[],this.bar=[],this.pie=[],this.summary=[],this.month=[],this.heatmap=[],this.bullet=[],this.customDataset=[],this.datasets=null}getQueryById(t){for(let e of this.queries)if(e.getId()===t)return e}}class ql{constructor(){this.id=-1,this.name="",this.xData=[],this.yData=[]}}class Gl{constructor(){this.title="",this.xAxisLabel="Date",this.xAxisColor="",this.xAxisLabelColor="",this.yAxisLabel=[],this.yAxisColor=[],this.yAxisLabelColor=[],this.yAxisUnit=[],this.xAxisTickInterval=null,this.yAxisTickInterval=[],this.xAxisTickLabelFormat=null,this.yAxisTickLabelFormat=[],this.yMin=[],this.yMax=[],this.reverseYAxis=[],this.allowInspectData=!0,this.showLegend=!1,this.legendPosition="",this.legendOrientation="",this.legendBgColor="",this.legendBorderColor=""}GetGraphType(){return Yl.Unknown}}class Ql extends Gl{constructor(){super(),this.lineColor=[],this.lineWidth=[],this.showLine=[],this.showPoint=[],this.pointColor=[],this.pointBorderColor=[],this.pointBorderWidth=[],this.pointSize=[],this.fillGap=[],this.yAxisLocation=[]}GetGraphType(){return Yl.Line}}class Zl extends Gl{constructor(){super(),this.barColor=[],this.yAxisLocation=[],this.xAxisPadding=null}GetGraphType(){return Yl.Bar}}class Kl{constructor(){this.title="",this.data=[],this.dataColor=[],this.dataName=[],this.label=[],this.hideLabelLessThan=.03,this.extLabel=[],this.showExtLabelOnlyIfNoLabel=!1,this.ratioInnerRadius=0,this.showLegend=!1,this.legendPosition="",this.legendOrientation="",this.legendBgColor="",this.legendBorderColor=""}GetGraphType(){return Yl.Pie}}class Jl{constructor(){this.template="",this.style=""}GetGraphType(){return Yl.Summary}}class to{constructor(){this.mode="circle",this.dataset=[],this.startWeekOn="Sun",this.threshold=[],this.thresholdType=[],this.yMin=[],this.yMax=[],this.color=null,this.dimNotInMonth=!0,this.initMonth="",this.showSelectedValue=!0,this.headerYearColor=null,this.headerMonthColor=null,this.dividingLineColor=null,this.showCircle=!0,this.showStreak=!0,this.showTodayRing=!0,this.showSelectedRing=!0,this.circleColor=null,this.circleColorByValue=!1,this.todayRingColor="",this.selectedRingColor="firebrick",this.showAnnotation=!0,this.annotation=[],this.showAnnotationOfAllTargets=!0,this.selectedDate="",this.selectedDataset=null}GetGraphType(){return Yl.Month}}class eo{constructor(){this.dataset="0",this.startWeekOn="Sun",this.orientation="vertical",this.yMin=null,this.yMax=null,this.color=null}GetGraphType(){return Yl.Heatmap}}class no{constructor(){this.title="",this.dataset="0",this.orientation="horizontal",this.value="",this.valueUnit="",this.valueColor="#69b3a2",this.range=[],this.rangeColor=[],this.showMarker=!1,this.markerValue=0,this.markerColor=""}GetGraphType(){return Yl.Bullet}}class ro{constructor(t,e){this.width=t,this.height=e}}class io{constructor(t,e){this.x=t,this.y=e}recalculateSize(t){let e=this.x/this.y,n=parseFloat((t.width*e).toFixed(2));return new ro(n,t.height)}}class ao{constructor(t,e,n,r){this.top=t,this.right=e,this.bottom=n,this.left=r}}class lo{constructor(t){if(this.translateX=0,this.translateY=0,"string"==typeof t){let e=t.match(/translate\(\s*(?<x>[\d\.\/-]+)\s*,\s*(?<y>[\d\.\/-]+)\s*\)/).groups;e&&(this.translateX=parseFloat(e.x),this.translateY=parseFloat(e.y))}}}class oo{constructor(t,e){this.filePath=t,this.tableIndex=e,this.xDataset=null,this.yDatasets=[]}}class so{constructor(){this.fileTotal=0,this.fileAvailable=0,this.fileOutOfDateRange=0,this.fileNotInFormat=0,this.errorMessage="",this.minDate=window.moment(""),this.maxDate=window.moment(""),this.gotAnyValidXValue=!1,this.gotAnyValidYValue=!1}}const uo=function(){const t=["HH","H","hh","h"],e=["mm","m"],n=["ss","s",""];let r=[];for(let i of t)for(let t of e)for(let e of n){let n=`${i}:${t}`;""!==e&&(n+=`:${e}`),i.contains("h")&&(n+=" a"),r.push(n)}return r}();function fo(t,e,n){if(!e&&!n)return t;let r=t;if(r.startsWith("^")&&(r=r.slice(1)),e){let t=new RegExp("^("+e+")","gm");t.test(r)&&(r=r.replace(t,""))}if(n){let t=new RegExp("("+n+")$","gm");t.test(r)&&(r=r.replace(t,""))}return r}function ho(t,e){let n=e;t.length>4&&t.startsWith("[[")&&t.endsWith("]]")&&(t=t.substring(2,t.length-2)),"iso-8601"===e.toLowerCase()&&(n=window.moment.ISO_8601);let r=window.moment(t,n,!0);return r=r.startOf("day"),r}function co(t,e,n=!0){if(!t||!e||0===e.length)return[null,t];let r=null;const i="^(?<value>[0-9]+)("+e.join("|")+")$",a=new RegExp(i,"gm");let l=a.exec(t);return l&&void 0!==l.groups&&void 0!==l.groups.value&&(r=parseFloat(l.groups.value),Number.isNumber(r)&&!Number.isNaN(r))?(n&&(t=t.replace(a,"")),[r,t]):[null,t]}function go(t){if(!t)return null;let e=window.moment.duration(0),n=!1,r=!1;t.startsWith("+")&&(r=!1,t=t.substring(1)),t.startsWith("-")&&(r=!0,t=t.substring(1));let i=null;[i,t]=co(t,["year","years","Y","y"]),null!==i&&(r&&(i*=-1),e.add(i,"years"),n=!0);let a=null;[a,t]=co(t,["month","months","M"]),null!==a&&(r&&(a*=-1),e.add(a,"months"),n=!0);let l=null;[l,t]=co(t,["week","weeks","W","w"]),null!==l&&(r&&(l*=-1),e.add(l,"weeks"),n=!0);let o=null;[o,t]=co(t,["day","days","D","d"]),null!==o&&(r&&(o*=-1),e.add(o,"days"),n=!0);let s=null;[s,t]=co(t,["hour","hours","H","h"]),null!==s&&(r&&(s*=-1),e.add(s,"hours"),n=!0);let u=null;[u,t]=co(t,["minute","minutes","m"]),null!==u&&(r&&(u*=-1),e.add(u,"minutes"),n=!0);let f=null;return[f,t]=co(t,["second","seconds","S","s"]),null!==f&&(r&&(f*=-1),e.add(f,"seconds"),n=!0),n?e:null}function po(t,e){let n=null,r=go(t);return r&&window.moment.isDuration(r)&&(n=vo(e),n=n.add(r),n&&n.isValid()),n}function yo(t,e){return null==t?null:"iso-8601"===e.toLowerCase()?t.format():t.format(e)}function mo(t,e){return ho(yo(window.moment(t),e),e)}function vo(t){return ho(yo(window.moment(),t),t)}function xo(t,e){for(var n=(e=e.replace(/^\./,"")).split("."),r=0,i=n.length;r<i;++r){var a=n[r];if(!(a in t))return null;t=t[a]}return"string"==typeof t||Array.isArray(t)?t:"number"==typeof t||"boolean"==typeof t?t.toString():null}function Ao(t,e){const n=Array.from(t),r=n.findIndex((t=>t!==e)),i=n.reverse().findIndex((t=>t!==e));return-1===r&&-1===i?t:t.substring(r,t.length-i)}function wo(t){if(null===t)return null;let e=new RegExp('<img[^>]*?alt\\s*=\\s*[""\']?(?<emoji>[^\'"" >]+?)[ \'""][^>]*?>',"g");return t.replace(e,((...t)=>{let e=t[t.length-1];return e&&e.emoji?e.emoji.trim():""}))}function bo(t,e=null){let n=null,r=Rl.Number;if("string"==typeof t)if(t.includes(":")){let e=!1;t.startsWith("-")&&(e=!0,t=t.substring(1));let i=window.moment(t,uo,!0);i.isValid()&&(n=i.diff(window.moment("00:00","HH:mm",!0),"seconds"),e&&(n*=-1),r=Rl.Time)}else if(e){const r=Object.keys(e);for(let n of r)if("string"==typeof n){let r=new RegExp(n,"gm");if(r.test(t)&&Number.isNumber(e[n])){let i=e[n].toString();t=t.replace(r,i);break}}n=parseFloat(t),Number.isNaN(n)&&(n=null)}else n=parseFloat(t),Number.isNaN(n)&&(n=null);else"number"==typeof t&&(n=t);return{type:r,value:n}}function Do(t,e="",n=""){var r=Qt("body").append("svg");let i=r.append("text").text(t).attr("x",-99999).attr("y",-99999);e&&i.attr("class",e),n&&i.attr("transform","rotate("+n+")");var a=r.node().getBBox();return r.remove(),{width:a.width,height:a.height}}function ko(t,e,n){let r=(0|parseFloat(t.attr("width")))+e,i=(0|parseFloat(t.attr("height")))+n;t.attr("width",r),t.attr("height",i)}function Co(t,e,n){let r=new lo(t.attr("transform"));t.attr("transform","translate("+(r.translateX+e)+","+(r.translateY+n)+")")}function To(t){return t=(t=(t=t.replace(/(^\\s\*)|(\\s\*$)/gi,"")).replace(/\[ \]{2,}/gi," ")).replace(/\\n /,"\\n")}class Mo{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+Mo.version}static addUnaryOp(t){return Mo.max_unop_len=Math.max(t.length,Mo.max_unop_len),Mo.unary_ops[t]=1,Mo}static addBinaryOp(t,e,n){return Mo.max_binop_len=Math.max(t.length,Mo.max_binop_len),Mo.binary_ops[t]=e,n?Mo.right_associative.add(t):Mo.right_associative.delete(t),Mo}static addIdentifierChar(t){return Mo.additional_identifier_chars.add(t),Mo}static addLiteral(t,e){return Mo.literals[t]=e,Mo}static removeUnaryOp(t){return delete Mo.unary_ops[t],t.length===Mo.max_unop_len&&(Mo.max_unop_len=Mo.getMaxKeyLen(Mo.unary_ops)),Mo}static removeAllUnaryOps(){return Mo.unary_ops={},Mo.max_unop_len=0,Mo}static removeIdentifierChar(t){return Mo.additional_identifier_chars.delete(t),Mo}static removeBinaryOp(t){return delete Mo.binary_ops[t],t.length===Mo.max_binop_len&&(Mo.max_binop_len=Mo.getMaxKeyLen(Mo.binary_ops)),Mo.right_associative.delete(t),Mo}static removeAllBinaryOps(){return Mo.binary_ops={},Mo.max_binop_len=0,Mo}static removeLiteral(t){return delete Mo.literals[t],Mo}static removeAllLiterals(){return Mo.literals={},Mo}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new Mo(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map((t=>t.length)))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return Mo.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!Mo.binary_ops[String.fromCharCode(t)]||Mo.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return Mo.isIdentifierStart(t)||Mo.isDecimalDigit(t)}throwError(t){const e=new Error(t+" at character "+this.index);throw e.index=this.index,e.description=t,e}runHook(t,e){if(Mo.hooks[t]){const n={context:this,node:e};return Mo.hooks.run(t,n),n.node}return e}searchHook(t){if(Mo.hooks[t]){const e={context:this};return Mo.hooks[t].find((function(t){return t.call(e.context,e),e.node})),e.node}}gobbleSpaces(){let t=this.code;for(;t===Mo.SPACE_CODE||t===Mo.TAB_CODE||t===Mo.LF_CODE||t===Mo.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),e=1===t.length?t[0]:{type:Mo.COMPOUND,body:t};return this.runHook("after-all",e)}gobbleExpressions(t){let e,n,r=[];for(;this.index<this.expr.length;)if(e=this.code,e===Mo.SEMCOL_CODE||e===Mo.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())r.push(n);else if(this.index<this.expr.length){if(e===t)break;this.throwError('Unexpected "'+this.char+'"')}return r}gobbleExpression(){const t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,Mo.max_binop_len),e=t.length;for(;e>0;){if(Mo.binary_ops.hasOwnProperty(t)&&(!Mo.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!Mo.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=e,t;t=t.substr(0,--e)}return!1}gobbleBinaryExpression(){let t,e,n,r,i,a,l,o,s;if(a=this.gobbleToken(),!a)return a;if(e=this.gobbleBinaryOp(),!e)return a;for(i={value:e,prec:Mo.binaryPrecedence(e),right_a:Mo.right_associative.has(e)},l=this.gobbleToken(),l||this.throwError("Expected expression after "+e),r=[a,i,l];e=this.gobbleBinaryOp();){if(n=Mo.binaryPrecedence(e),0===n){this.index-=e.length;break}i={value:e,prec:n,right_a:Mo.right_associative.has(e)},s=e;const o=t=>i.right_a&&t.right_a?n>t.prec:n<=t.prec;for(;r.length>2&&o(r[r.length-2]);)l=r.pop(),e=r.pop().value,a=r.pop(),t={type:Mo.BINARY_EXP,operator:e,left:a,right:l},r.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+s),r.push(i,t)}for(o=r.length-1,t=r[o];o>1;)t={type:Mo.BINARY_EXP,operator:r[o-1].value,left:r[o-2],right:t},o-=2;return t}gobbleToken(){let t,e,n,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"),r)return this.runHook("after-token",r);if(t=this.code,Mo.isDecimalDigit(t)||t===Mo.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===Mo.SQUOTE_CODE||t===Mo.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(t===Mo.OBRACK_CODE)r=this.gobbleArray();else{for(e=this.expr.substr(this.index,Mo.max_unop_len),n=e.length;n>0;){if(Mo.unary_ops.hasOwnProperty(e)&&(!Mo.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!Mo.isIdentifierPart(this.expr.charCodeAt(this.index+e.length)))){this.index+=n;const t=this.gobbleToken();return t||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:Mo.UNARY_EXP,operator:e,argument:t,prefix:!0})}e=e.substr(0,--n)}Mo.isIdentifierStart(t)?(r=this.gobbleIdentifier(),Mo.literals.hasOwnProperty(r.name)?r={type:Mo.LITERAL,value:Mo.literals[r.name],raw:r.name}:r.name===Mo.this_str&&(r={type:Mo.THIS_EXP})):t===Mo.OPAREN_CODE&&(r=this.gobbleGroup())}return r?(r=this.gobbleTokenProperty(r),this.runHook("after-token",r)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let e=this.code;for(;e===Mo.PERIOD_CODE||e===Mo.OBRACK_CODE||e===Mo.OPAREN_CODE||e===Mo.QUMARK_CODE;){let n;if(e===Mo.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==Mo.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),e=this.code}this.index++,e===Mo.OBRACK_CODE?((t={type:Mo.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),e=this.code,e!==Mo.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):e===Mo.OPAREN_CODE?t={type:Mo.CALL_EXP,arguments:this.gobbleArguments(Mo.CPAREN_CODE),callee:t}:(e===Mo.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),t={type:Mo.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),n&&(t.optional=!0),this.gobbleSpaces(),e=this.code}return t}gobbleNumericLiteral(){let t,e,n="";for(;Mo.isDecimalDigit(this.code);)n+=this.expr.charAt(this.index++);if(this.code===Mo.PERIOD_CODE)for(n+=this.expr.charAt(this.index++);Mo.isDecimalDigit(this.code);)n+=this.expr.charAt(this.index++);if(t=this.char,"e"===t||"E"===t){for(n+=this.expr.charAt(this.index++),t=this.char,"+"!==t&&"-"!==t||(n+=this.expr.charAt(this.index++));Mo.isDecimalDigit(this.code);)n+=this.expr.charAt(this.index++);Mo.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+n+this.char+")")}return e=this.code,Mo.isIdentifierStart(e)?this.throwError("Variable names cannot start with a number ("+n+this.char+")"):(e===Mo.PERIOD_CODE||1===n.length&&n.charCodeAt(0)===Mo.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:Mo.LITERAL,value:parseFloat(n),raw:n}}gobbleStringLiteral(){let t="";const e=this.index,n=this.expr.charAt(this.index++);let r=!1;for(;this.index<this.expr.length;){let e=this.expr.charAt(this.index++);if(e===n){r=!0;break}if("\\"===e)switch(e=this.expr.charAt(this.index++),e){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=e}else t+=e}return r||this.throwError('Unclosed quote after "'+t+'"'),{type:Mo.LITERAL,value:t,raw:this.expr.substring(e,this.index)}}gobbleIdentifier(){let t=this.code,e=this.index;for(Mo.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,Mo.isIdentifierPart(t));)this.index++;return{type:Mo.IDENTIFIER,name:this.expr.slice(e,this.index)}}gobbleArguments(t){const e=[];let n=!1,r=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let i=this.code;if(i===t){n=!0,this.index++,t===Mo.CPAREN_CODE&&r&&r>=e.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(i===Mo.COMMA_CODE){if(this.index++,r++,r!==e.length)if(t===Mo.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===Mo.CBRACK_CODE)for(let t=e.length;t<r;t++)e.push(null)}else if(e.length!==r&&0!==r)this.throwError("Expected comma");else{const t=this.gobbleExpression();t&&t.type!==Mo.COMPOUND||this.throwError("Expected comma"),e.push(t)}}return n||this.throwError("Expected "+String.fromCharCode(t)),e}gobbleGroup(){this.index++;let t=this.gobbleExpressions(Mo.CPAREN_CODE);if(this.code===Mo.CPAREN_CODE)return this.index++,1===t.length?t[0]:!!t.length&&{type:Mo.SEQUENCE_EXP,expressions:t};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:Mo.ARRAY_EXP,elements:this.gobbleArguments(Mo.CBRACK_CODE)}}}const _o=new class{add(t,e,n){if("string"!=typeof arguments[0])for(let t in arguments[0])this.add(t,arguments[0][t],arguments[1]);else(Array.isArray(t)?t:[t]).forEach((function(t){this[t]=this[t]||[],e&&this[t][n?"unshift":"push"](e)}),this)}run(t,e){this[t]=this[t]||[],this[t].forEach((function(t){t.call(e&&e.context?e.context:e,e)}))}};Object.assign(Mo,{hooks:_o,plugins:new class{constructor(t){this.jsep=t,this.registered={}}register(...t){t.forEach((t=>{if("object"!=typeof t||!t.name||!t.init)throw new Error("Invalid JSEP plugin format");this.registered[t.name]||(t.init(this.jsep),this.registered[t.name]=t)}))}}(Mo),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),Mo.max_unop_len=Mo.getMaxKeyLen(Mo.unary_ops),Mo.max_binop_len=Mo.getMaxKeyLen(Mo.binary_ops);const Eo=t=>new Mo(t).parse(),Fo=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(Mo).filter((t=>!Fo.includes(t)&&void 0===Eo[t])).forEach((t=>{Eo[t]=Mo[t]})),Eo.Jsep=Mo;var So={name:"ternary",init(t){t.hooks.add("after-expression",(function(e){if(e.node&&this.code===t.QUMARK_CODE){this.index++;const n=e.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===t.COLON_CODE){this.index++;const i=this.gobbleExpression();if(i||this.throwError("Expected expression"),e.node={type:"ConditionalExpression",test:n,consequent:r,alternate:i},n.operator&&t.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&t.binary_ops[r.right.operator]<=.9;)r=r.right;e.node.test=r.right,r.right=e.node,e.node=n}}else this.throwError("Expected :")}}))}};Eo.plugins.register(So);var Bo,No={};var Lo,Io=(Bo||(Bo=1,Lo=No,function(){var t={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(n){return function(n,r){var i,a,l,o,s,u,f,h,c,d=1,g=n.length,p="";for(a=0;a<g;a++)if("string"==typeof n[a])p+=n[a];else if("object"==typeof n[a]){if((o=n[a]).keys)for(i=r[d],l=0;l<o.keys.length;l++){if(null==i)throw new Error(e('[sprintf] Cannot access property "%s" of undefined value "%s"',o.keys[l],o.keys[l-1]));i=i[o.keys[l]]}else i=o.param_no?r[o.param_no]:r[d++];if(t.not_type.test(o.type)&&t.not_primitive.test(o.type)&&i instanceof Function&&(i=i()),t.numeric_arg.test(o.type)&&"number"!=typeof i&&isNaN(i))throw new TypeError(e("[sprintf] expecting number but found %T",i));switch(t.number.test(o.type)&&(h=i>=0),o.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,o.width?parseInt(o.width):0);break;case"e":i=o.precision?parseFloat(i).toExponential(o.precision):parseFloat(i).toExponential();break;case"f":i=o.precision?parseFloat(i).toFixed(o.precision):parseFloat(i);break;case"g":i=o.precision?String(Number(i.toPrecision(o.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=o.precision?i.substring(0,o.precision):i;break;case"t":i=String(!!i),i=o.precision?i.substring(0,o.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=o.precision?i.substring(0,o.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=o.precision?i.substring(0,o.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}t.json.test(o.type)?p+=i:(!t.number.test(o.type)||h&&!o.sign?c="":(c=h?"+":"-",i=i.toString().replace(t.sign,"")),u=o.pad_char?"0"===o.pad_char?"0":o.pad_char.charAt(1):" ",f=o.width-(c+i).length,s=o.width&&f>0?u.repeat(f):"",p+=o.align?c+i+s:"0"===u?c+s+i:s+c+i)}return p}(function(e){if(r[e])return r[e];for(var n,i=e,a=[],l=0;i;){if(null!==(n=t.text.exec(i)))a.push(n[0]);else if(null!==(n=t.modulo.exec(i)))a.push("%");else{if(null===(n=t.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(n[2]){l|=1;var o=[],s=n[2],u=[];if(null===(u=t.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(u[1]);""!==(s=s.substring(u[0].length));)if(null!==(u=t.key_access.exec(s)))o.push(u[1]);else{if(null===(u=t.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(u[1])}n[2]=o}else l|=2;if(3===l)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({placeholder:n[0],param_no:n[1],keys:n[2],sign:n[3],pad_char:n[4],align:n[5],width:n[6],precision:n[7],type:n[8]})}i=i.substring(n[0].length)}return r[e]=a}(n),arguments)}function n(t,n){return e.apply(null,[t].concat(n||[]))}var r=Object.create(null);Lo.sprintf=e,Lo.vsprintf=n,"undefined"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()),No);function Oo(t){if("number"==typeof t){if(0===t)return!1}else if(t instanceof Xl&&t.getValues().some((function(t){return 0===t})))return!1;return!0}const Vo={first:function(t,e){return t.getValue(this.startDate(...arguments))},last:function(t,e){return t.getValue(this.endDate(...arguments))},min:function(t,e){return m(t.getValues())},minDate:function(t,e){let n=m(t.getValues());if(Number.isNumber(n)){let e=Array.from(t);for(let t of e.reverse())if(null!==t.value&&t.value===n)return t.date}return"Error: min not found"},max:function(t,e){return y(t.getValues())},maxDate:function(t,e){let n=y(t.getValues());if(Number.isNumber(n)){let e=Array.from(t);for(let t of e.reverse())if(null!==t.value&&t.value===n)return t.date}return"Error: max not found"},startDate:function(t,e){if(t){let e=t.getStartDate();if(e&&e.isValid())return e}return e.startDate},endDate:function(t,e){if(t){let e=t.getEndDate();if(e&&e.isValid())return e}return e.endDate},sum:function(t,e){return b(t.getValues())},count:function(t,e){return"Error: deprecated function 'count'"},numTargets:function(t,e){return t.getNumTargets()},days:function(t,e){return"Error: deprecated function 'days'"},numDays:function(t,e){return t.getLength()},numDaysHavingData:function(t,e){return t.getLengthNotNull()},maxStreak:function(t,e){let n=0,r=0;for(let e of t)e.value?n++:n=0,n>=r&&(r=n);return r},maxStreakStart:function(t,e){let n=0,r=0,i=null,a=null;if(t)for(let e of t)e.value?(0===n&&(i=e.date),n++):n=0,n>=r&&(r=n,a=i);return a},maxStreakEnd:function(t,e){let n=0,r=0,i=null,a=null;if(t){let e=Array.from(t);for(let t=0;t<e.length;t++){let l=e[t],o=null;t<e.length-1&&(o=e[t+1]),l.value?(n++,(null==o?void 0:o.value)||(i=l.date)):n=0,n>=r&&(r=n,a=i)}}return a},maxBreaks:function(t,e){let n=0,r=0;for(let e of t)e.value?n=0:n++,n>r&&(r=n);return r},maxBreaksStart:function(t,e){let n=0,r=0,i=null,a=null;if(t)for(let e of t)e.value?n=0:(0===n&&(i=e.date),n++),n>=r&&(r=n,a=i);return a},maxBreaksEnd:function(t,e){let n=0,r=0,i=null,a=null;if(t){let e=Array.from(t);for(let t=0;t<e.length;t++){let l=e[t],o=null;t<e.length-1&&(o=e[t+1]),l.value?n=0:(n++,(null==o?void 0:o.value)&&(i=l.date)),n>=r&&(r=n,a=i)}}return a},lastStreak:function(t,e){return"Error: deprecated function 'lastStreak'"},currentStreak:function(t,e){let n=0;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){if(!e[t].value)break;n++}}return n},currentStreakStart:function(t,e){let n=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let r=e[t];if(t<e.length-1&&(n=e[t+1].date),!r.value)break}}return null===n?"Error: absense":n},currentStreakEnd:function(t,e){let n=0,r=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i.value)break;0===n&&(r=i.date),n++}}return null===r?"Error: absense":r},currentBreaks:function(t,e){let n=0;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){if(e[t].value)break;n++}}return n},currentBreaksStart:function(t,e){let n=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let r=e[t];if(t<e.length-1&&(n=e[t+1].date),r.value)break}}return null===n?"Error: absense":n},currentBreaksEnd:function(t,e){let n=0,r=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let i=e[t];if(i.value)break;0===n&&(r=i.date),n++}}return null===r?"Error: absense":r},average:function(t,e){let n=t.getLengthNotNull();return Oo(n)?b(t.getValues())/n:"Error: divide by zero in expression"},median:function(t,e){return A(t.getValues())},variance:function(t,e){return function(t){let e,n=0,r=0,i=0;for(let a of t)null!=a&&(a=+a)>=a&&(e=a-r,r+=e/++n,i+=e*(a-r));if(n>1)return i/(n-1)}(t.getValues())}},Po={"-":function(t){if("number"==typeof t)return-1*t;if(t instanceof Xl){let e=t.cloneToTmpDataset();return e.getValues().forEach((function(t,e,n){null!==n[e]&&(n[e]=-1*t)})),e.recalculateMinMax(),e}return"Error: unknown operation for '-'"},"+":function(t){if("number"==typeof t)return t;if(t instanceof Xl){return t.cloneToTmpDataset()}return"Error: unknown operation for '+'"}},$o={"+":function(t,e){if("number"==typeof t&&"number"==typeof e)return t+e;if("number"==typeof t&&e instanceof Xl){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t+e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Xl&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t+e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Xl&&e instanceof Xl){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t+e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '+'"},"-":function(t,e){if("number"==typeof t&&"number"==typeof e)return t-e;if("number"==typeof t&&e instanceof Xl){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t-e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Xl&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t-e:r[n]=null})),n}if(t instanceof Xl&&e instanceof Xl){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t-e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '-'"},"*":function(t,e){if("number"==typeof t&&"number"==typeof e)return t*e;if("number"==typeof t&&e instanceof Xl){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t*e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Xl&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t*e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Xl&&e instanceof Xl){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t*e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '*'"},"/":function(t,e){if(!Oo(e))return"Error: divide by zero in expression";if("number"==typeof t&&"number"==typeof e)return t/e;if("number"==typeof t&&e instanceof Xl){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t/e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Xl&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t/e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Xl&&e instanceof Xl){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t/e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '/'"},"%":function(t,e){if(!Oo(e))return"Error: divide by zero in expression";if("number"==typeof t&&"number"==typeof e)return t%e;if("number"==typeof t&&e instanceof Xl){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t%e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Xl&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t%e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Xl&&e instanceof Xl){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t%e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '%'"}},Yo={normalize:function(t,e,n){let r=t.getYMin(),i=t.getYMax();if(null!==r&&null!==i&&i>r){let e=t.cloneToTmpDataset();return e.getValues().forEach((function(t,e,n){n[e]=(t-r)/(i-r)})),e.recalculateMinMax(),e}return"Error: invalid data range for function 'normalize'"},setMissingValues:function(t,e,n){if(e&&e.length>0){let n=e[0],r=t.cloneToTmpDataset();return Number.isNumber(n)&&!Number.isNaN(n)?(r.getValues().forEach((function(t,e,r){null===t&&(r[e]=n)})),r.recalculateMinMax(),r):"Error: invalid arguments for function 'setMissingValues'"}return"Error: invalid arguments for function 'setMissingValues"}};function Ro(t,e){switch(t.type){case"Literal":return t.value;case"Identifier":let n=t.name;return n in Vo||n in Yo?`Error: deprecated template variable '${n}', use '${n}()' instead`:`Error: unknown function name '${n}'`;case"UnaryExpression":let r=t,i=Ro(r.argument,e);return"string"==typeof i?i:Po[r.operator](i);case"BinaryExpression":let a=t,l=Ro(a.left,e),o=Ro(a.right,e),s=function(t,e){return"string"==typeof t?t:"string"==typeof e?e:"number"==typeof t||window.moment.isMoment(t)||t instanceof Xl?"number"==typeof e||window.moment.isMoment(e)||e instanceof Xl?"":"Error: invalide operant type":"Error: invalid operant type"}(l,o);return"string"==typeof s&&s.startsWith("Error:")?s:$o[a.operator](l,o);case"CallExpression":let u=t,f=u.callee.name,h=function(t,e){return t.map((function(t){return Ro(t,e)}))}(u.arguments,e);if("string"==typeof h)return h;if("dataset"===f){if(1===h.length){let t=h[0];if("string"==typeof t)return t;if("number"!=typeof t)return"Error: function 'dataset' only accepts id in number";let n=function(t,e){return e.datasets.getDatasetById(t)}(t,e);return n||`Error: no dataset found for id '${t}'`}}else{if(f in Vo){if(0===h.length){let t=null;for(let n of e.datasets)t||n.getQuery().usedAsXDataset||(t=n);return t?Vo[f](t,e):`No available dataset found for function ${f}`}if(1===h.length){let t=h[0];return"string"==typeof t?t:t instanceof Xl?Vo[f](t,e):`Error: function '${f}' only accepts Dataset`}return`Error: Too many arguments for function ${f}`}if(f in Yo){if(1===h.length){if("string"==typeof h[0])return h[0];if(h[0]instanceof Xl){let t=h[0];return Yo[f](t,null,e)}return`Error: function ${f} only accept Dataset`}if(h.length>1){if("string"==typeof h[0])return h[0];if(h[0]instanceof Xl){let t=h[0];return Yo[f](t,h.filter((function(t,e,n){return e>0})),e)}return`Error: function ${f} only accept Dataset`}return`Error: Too many arguments for function ${f}`}}return`Error: unknown function name '${f}'`}return"Error: unknown expression"}function zo(t,e){let n,r=[],i=new RegExp("{{(?<expr>[\\w+\\-*\\/0-9\\s()\\[\\]%.,]+)(::(?<format>[\\w+\\-*\\/0-9\\s()\\[\\]%.:]+))?}}","gm");for(;n=i.exec(t);){let t=n[0];if(!r.some((e=>e.source===t))&&(void 0!==n.groups&&void 0!==n.groups.expr)){let i=n.groups.expr,a=null;try{a=Eo(i)}catch(t){return"Error:"+t.message}if(!a)return"Error: failed to parse expression";const l=Ro(a,e);if("string"==typeof l)return l;if("number"==typeof l||window.moment.isMoment(l)){let e=null;void 0!==n.groups.format&&(e=n.groups.format),r.push({source:t,value:l,format:e})}}}return r}function Uo(t,e){let n=zo(t,e);if("string"==typeof n)return n;let r=n;for(let n of r){let r=n.source,i=n.value,a=n.format,l="";"number"==typeof i?l=a?Io.sprintf("%"+a,i):i.toFixed(1):window.moment.isMoment(i)&&(l=yo(i,a||e.dateFormat)),l&&(t=t.split(r).join(l))}return t}function Ho(t,e){if(t=t.trim(),/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)$/.test(t))return parseFloat(t);let n=zo(t,e);if("string"==typeof n)return n;let r=n;return r.length>0?r[0].value:"Error: failed to resolve values"}function Xo(t,e,n,r){let i="",a=.5*n.dataAreaSize.width,l=.7*a,o=l*r.ratioInnerRadius,s=[];for(let t of r.data){let e=Ho(t,n);if("string"==typeof e){i=e;break}"number"==typeof e&&s.push(e)}if(""!==i)return i;let u=[];for(let t of r.label){let e=Uo(t,n);if(e.startsWith("Error")){i=e;break}u.push(e)}if(""!==i)return i;let f=r.hideLabelLessThan,h=u.map((function(t){return Do(t,"tracker-tick-label")})),c=[];for(let t of r.extLabel){let e=Uo(t,n);if(e.startsWith("Error")){i=e;break}c.push(e)}if(""!==i)return i;let d=c.map((function(t){return Do(t,"tracker-pie-label")})),g=r.showExtLabelOnlyIfNoLabel,p=Vr().range(r.dataColor),y=e.dataArea.append("g");y.attr("transform",(function(){return"translate("+.5*n.dataAreaSize.width+","+.5*n.dataAreaSize.height+")"}));let m=function(){var t=Vl,e=Ol,n=null,r=fl(0),i=fl(wl),a=fl(0);function l(l){var o,s,u,f,h,c=(l=Sl(l)).length,d=0,g=new Array(c),p=new Array(c),y=+r.apply(this,arguments),m=Math.min(wl,Math.max(-wl,i.apply(this,arguments)-y)),v=Math.min(Math.abs(m)/c,a.apply(this,arguments)),x=v*(m<0?-1:1);for(o=0;o<c;++o)(h=p[g[o]=o]=+t(l[o],o,l))>0&&(d+=h);for(null!=e?g.sort((function(t,n){return e(p[t],p[n])})):null!=n&&g.sort((function(t,e){return n(l[t],l[e])})),o=0,u=d?(m-c*x)/d:0;o<c;++o,y=f)s=g[o],f=y+((h=p[s])>0?h*u:0)+x,p[s]={data:l[s],index:o,value:h,startAngle:y,endAngle:f,padAngle:v};return p}return l.value=function(e){return arguments.length?(t="function"==typeof e?e:fl(+e),l):t},l.sortValues=function(t){return arguments.length?(e=t,n=null,l):e},l.sort=function(t){return arguments.length?(n=t,e=null,l):n},l.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:fl(+t),l):r},l.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:fl(+t),l):i},l.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:fl(+t),l):a},l}(),v=m(s);v.forEach((function(t,e){t.input_index=e}));let x=y.selectAll("sector").data(v).enter().append("g").attr("class","sector"),A=Fl().innerRadius(o).outerRadius(l);var w=Fl().innerRadius(.9*a).outerRadius(.9*a);function b(t){return(t.endAngle-t.startAngle)/(2*Math.PI)<f}function D(t){return t.startAngle+(t.endAngle-t.startAngle)/2}function k(t,e){return g?""===u[e]||b(t)?c[e]:"":c[e]}x.append("path").attr("fill",(function(t,e){return p(e.toString())})).attr("d",A),y.selectAll("label").data(m(s)).enter().append("text").text((function(t,e){return b(t)?"":u[e]})).attr("transform",(function(t){return"translate("+A.centroid(t)[0]+","+A.centroid(t)[1]+")"})).style("text-anchor","middle").attr("class","tracker-pie-label");let C=null,T={};function M(t,e){let n=h[e].width;d[e].width;let r=b(t),i=D(t),a=A.centroid(t),l=w.centroid(t),o=T[e]||w.centroid(t);l[1]=o[1];let s=Math.sqrt((l[0]-a[0])**2+(l[1]-a[1])**2);return""===u[e]||r||(a[0]=a[0]+(l[0]-a[0])*n/s,a[1]=a[1]+(l[1]-a[1])*n/s,o[0]=o[0]+-3*(i<Math.PI?1:-1)),s=Math.sqrt((l[0]-a[0])**2+(l[1]-a[1])**2),s>Math.sqrt((o[0]-a[0])**2+(o[1]-a[1])**2)?[a,o]:[a,l,o]}y.selectAll("extLabel").data(v).enter().append("text").sort((function(t,e){return Math.cos(D(e))-Math.cos(D(t))})).text((function(t,e){return k(t,t.input_index)})).attr("transform",(function(t,e){if(0==k(t,e=t.input_index).length)return;let n=w.centroid(t),r=D(t);n[0]=(.99*a-d[e].width)*(r<Math.PI?1:-1);var i=0;let l=new DOMRect(n[0],n[1],d[e].width,d[e].height);return null!==C&&(l.right<C.left||C.right<l.left||C.bottom<l.top||(i=C.bottom-l.top)),0!=i&&(l=new DOMRect(n[0],n[1]+i,d[e].width,d[e].height)),C=l,T[e]=[n[0],n[1]+i],"translate("+n[0]+","+(n[1]+i)+")"})).style("text-anchor",(function(t){return D(t)<Math.PI?"start":"end"})).attr("class","tracker-pie-label"),y.selectAll("line").data(v).enter().append("polyline").attr("stroke","black").style("fill","none").attr("stroke-width",1).attr("points",(function(t,e){if(g){if((""===u[e]||b(t))&&""!==c[e])return M(t,e)}else if(""!==c[e])return M(t,e)})).attr("class","tracker-axis")}function Wo(t,e,n){if(!e||!n)return;let r={};r=function(t,e,n){Qt(e).select("#svg").remove();for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++)delete t[r[i]];let a=Qt(e).append("svg").attr("id","svg").attr("width",n.dataAreaSize.width+n.margin.left+n.margin.right).attr("height",n.dataAreaSize.height+n.margin.top+n.margin.bottom);t.svg=a;let l=a.append("g").attr("id","graphArea").attr("transform","translate("+n.margin.left+","+n.margin.top+")").attr("width",n.dataAreaSize.width+n.margin.right).attr("height",n.dataAreaSize.height+n.margin.bottom);t.graphArea=l;let o=l.append("g").attr("id","dataArea").attr("width",n.dataAreaSize.width).attr("height",n.dataAreaSize.height);return t.dataArea=o,t}(r,t,e);let i=ul[n.dataColor.length];for(let t=0;t<n.dataColor.length;t++)null===n.dataColor[t]&&(n.dataColor[t]=i[t]);!function(t,e,n,r){if(!n||!r)return;if(!r.title)return;let i=Do(r.title,"tracker-title"),a=e.graphArea.append("text").text(r.title).attr("id","title").attr("transform","translate("+n.dataAreaSize.width/2+","+i.height/2+")").attr("height",i.height).attr("class","tracker-title");e.title=a,ko(e.svg,0,i.height),ko(e.graphArea,0,i.height),Co(e.dataArea,0,i.height)}(0,r,e,n),Xo(0,r,e,n),n.showLegend&&function(t,e,n,r){let i=e.svg;e.graphArea;let a=e.dataArea,l=e.title,o=0;l&&(o=parseFloat(l.attr("height")));let s=r.dataName,u=s.map((function(t){return Do(t,"tracker-legend-label")})),f=0,h=0;for(let t=0;t<s.length;t++)u[t].width>h&&(h=u[t].width,f=t);let c=h/s[f].length,d=u[f].height,g=s.length,p=2*c,y=d,m=2*c,v=0,x=0;"vertical"===r.legendOrientation?(v=3*p+m+h,x=(g+1)*y):"horizontal"===r.legendOrientation&&(v=(2*p+m)*g+p+b(u,(function(t,e){return t.width})),x=y+d);let A=0,w=0;if("top"===r.legendPosition)A=n.dataAreaSize.width/2-v/2,w=o,ko(i,0,x+y),Co(a,0,x+y);else if("bottom"===r.legendPosition)A=n.dataAreaSize.width/2-v/2,w=o+n.dataAreaSize.height+y,ko(i,0,x+y);else if("left"===r.legendPosition)A=0,w=o+n.dataAreaSize.height/2-x/2,ko(i,v+p,0),Co(a,v+p,0);else{if("right"!==r.legendPosition)return;A=n.dataAreaSize.width+p,w=o+n.dataAreaSize.height/2-x/2,ko(i,v+p,0)}let D=e.graphArea.append("g").attr("id","legend").attr("transform","translate("+A+","+w+")"),k=D.append("rect").attr("class","tracker-legend").attr("width",v).attr("height",x);r.legendBgColor&&k.style("fill",r.legendBgColor),r.legendBorderColor&&k.style("stroke",r.legendBorderColor);let C=p,T=d,M=C+p+m,_=T;if("vertical"===r.legendOrientation)D.selectAll("markers").data(s).enter().append("circle").attr("cx",C+m/2).attr("cy",(function(t,e){return T+e*y})).attr("r",(function(t,e){return 5})).style("fill",(function(t,e){return r.dataColor[e]})),D.selectAll("labels").data(s).enter().append("text").attr("x",M).attr("y",(function(t,e){return _+e*y})).text((function(t,e){return t})).style("alignment-baseline","middle").attr("class","tracker-legend-label").style("fill",(function(t,e){return r.dataColor[e]}));else if("horizontal"===r.legendOrientation){let t=0;t=0,D.selectAll("markers").data(s).enter().append("circle").attr("cx",(function(e,n){return 0===n?t=C+m/2:t+=u[n].width+p+m+p,t})).attr("cy",T).attr("r",(function(t,e){return 5})).style("fill",(function(t,e){return r.dataColor[e]})),t=0,D.selectAll("labels").data(s).enter().append("text").attr("x",(function(e,n){return 0===n?t=M:t+=u[n].width+p+m+p,t})).attr("y",_).text((function(t,e){return t})).style("alignment-baseline","middle").attr("class","tracker-legend-label").style("fill",(function(t,e){return r.dataColor[e]}))}}(0,r,e,n),function(t,e,n){let r=Qt(t),i=e.svg,a=parseFloat(i.attr("width")),l=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${l}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(l*n.fixedScale).toString()+"px"))}(t,r,e)}function jo(t,e,n){if(!e||!n)return;let r="";n.template,r=n.template;let i=Uo(r,e);if(i.startsWith("Error:"))return i;if(r=i,""!==r){let e=Qt(t).append("div");if(r.includes("\n")||r.includes("\\n")){let t=r.split(/(\n|\\n)/);for(let n of t)"\n"!==n&&"\\n"!==n&&e.append("div").text(n)}else e.text(r);""!==n.style&&e.attr("style",n.style)}}let qo=!1;function Go(t,e,n){let r=Qt(t),i=e.svg,a=parseFloat(i.attr("width")),l=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${l}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(l*n.fixedScale).toString()+"px"))}function Qo(t,e){let n=e.dataset;if(0===n.length)return!1;let r=null;if(null===e.selectedDataset){for(let e of n)if(r=t.datasets.getDatasetById(e),r&&!r.getQuery().usedAsXDataset)break;if(r)return e.selectedDataset=r.getId(),!0}else{let i=e.selectedDataset,a=n.findIndex((t=>t===i));if(a>=0){if(a===e.dataset.length-1){for(let e of n)if(r=t.datasets.getDatasetById(e),r&&!r.getQuery().usedAsXDataset)break;return!!r&&(e.selectedDataset=r.getId(),!0)}{a++;let i=n[a];if(r=t.datasets.getDatasetById(i),e.selectedDataset=i,r&&!r.getQuery().usedAsXDataset)return!0;Qo(t,e)}}}return!1}function Zo(t,e,n,r){Qt(e).select("#svg").remove();for(var i=Object.getOwnPropertyNames(t),a=0;a<i.length;a++)delete t[i[a]];let l=Qt(e).append("svg").attr("id","svg").attr("width",n.dataAreaSize.width+n.margin.left+n.margin.right).attr("height",n.dataAreaSize.height+n.margin.top+n.margin.bottom);t.svg=l;let o=l.append("g").attr("id","graphArea").attr("transform","translate("+n.margin.left+","+n.margin.top+")").attr("width",n.dataAreaSize.width+n.margin.right).attr("height",n.dataAreaSize.height+n.margin.bottom);t.graphArea=o;let s=o.append("g").attr("id","dataArea").attr("width",n.dataAreaSize.width).attr("height",n.dataAreaSize.height);return t.dataArea=s,t}function Ko(t,e){let n=t.svg.selectAll("circle");for(let t of n){let e=Qt(t).attr("id");e&&e.startsWith("tracker-selected-circle-")&&Qt(t).style("stroke","none")}e.selectedDate="",t.monitor.text("")}function Jo(t,e,n,r,i){if(!n||!r)return;let a=r.selectedDataset;if(null===a)return;let l=n.datasets.getDatasetById(a);if(!l)return;let o=l.getName();i.month(),i.daysInMonth(),i.year();let s=Do("30","tracker-month-label"),u=2.8*Math.max(s.width,s.height),f=i.format("YYYY"),h=i.format("MMM"),c=Do(f,"tracker-month-header-year"),d=Do(h,"tracker-month-header-month"),g=0,p=e.graphArea.append("g"),y=null;r.headerMonthColor?y=r.headerMonthColor:r.color&&(y=r.color);let m=p.append("text").text(h).attr("id","titleMonth").attr("transform","translate("+u/4+","+d.height+")").attr("class","tracker-month-header-month").style("cursor","default").on("click",(function(t){Ko(e,r)}));y&&m.style("fill",y),g+=d.height;let v=null;r.headerYearColor?v=r.headerYearColor:r.color&&(v=r.color);let x=p.append("text").text(f).attr("id","titleYear").attr("transform","translate("+u/4+","+(g+c.height)+")").attr("class","tracker-month-header-year").style("cursor","default").attr("font-weight","bold").on("click",(function(t){Ko(e,r)}));v&&x.style("fill",v),g+=c.height,"annotation"===r.mode&&r.showAnnotationOfAllTargets&&r.dataset.length>1&&(o="All Targets");let A=Do(o,"tracker-month-title-rotator"),w=p.append("text").text(o).attr("transform","translate("+3.5*u+","+A.height+")").attr("class","tracker-month-title-rotator").style("cursor","pointer");r.showAnnotationOfAllTargets&&"annotation"===r.mode||w.on("click",(function(a){Qo(n,r)&&(Ko(e,r),es(t,e,n,r,i))})),e.rotator=w;let b=Do("0.0000","tracker-month-title-monitor"),D=p.append("text").text("").attr("id","monitor").attr("class","tracker-month-title-monitor").attr("transform","translate("+3.5*u+","+(A.height+b.height)+")").style("cursor","pointer").style("fill",r.selectedRingColor);e.monitor=D;let k=Do("<","tracker-month-title-arrow");p.append("text").text("<").attr("id","arrowLeft").attr("transform","translate("+5.5*u+","+(g/2+k.height/2)+")").attr("class","tracker-month-title-arrow").on("click",(function(a){Ko(e,r),r.selectedDate="";let l=i.clone().add(-1,"month");es(t,e,n,r,l)})).style("cursor","pointer"),p.append("text").text(">").attr("id","arrowLeft").attr("transform","translate("+6.5*u+","+(g/2+k.height/2)+")").attr("class","tracker-month-title-arrow").on("click",(function(a){Ko(e,r);let l=i.clone().add(1,"month");es(t,e,n,r,l)})).style("cursor","pointer"),p.append("text").text("◦").attr("id","arrowToday").attr("transform","translate("+6*u+","+(g/2+k.height/2)+")").attr("class","tracker-month-title-arrow").on("click",(function(i){Ko(e,r);let a=vo(n.dateFormat);es(t,e,n,r,a)})).style("cursor","pointer"),g+=8;let C=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];"mon"===r.startWeekOn.toLowerCase()&&C.push(C.shift());let T=Do(C[0],"tracker-month-weekday");e.graphArea.selectAll("weekDays").data(C).enter().append("text").text((function(t){return t})).attr("transform",(function(t,e){return"translate("+(e+.5)*u+","+(g+T.height)+")"})).attr("class","tracker-month-weekday").attr("text-anchor","middle").style("cursor","default").on("click",(function(t){Ko(e,r)})),g+=T.height+8;let M=null;r.dividingLineColor?M=r.dividingLineColor:r.color&&(M=r.color);let _=e.graphArea.append("rect").attr("x",0).attr("y",g).attr("width",6.5*u+T.width).attr("height",1).attr("class","tracker-month-dividing-line");M&&_.style("fill",M),g+=1,p.attr("height",g),e.header=p,Co(e.dataArea,0,g)}function ts(t,e,n,r,i){if(!n||!r)return;let a=r.mode;if("circle"!==a&&"annotation"!==a)return"Unknown month view mode";let l=r.selectedDataset;if(null===l)return;let o=n.datasets.getDatasetById(l);if(!o)return;let s=r.dataset.findIndex((t=>t===l));l<0&&(s=0);let u=r.threshold[s],f=r.thresholdType[s];qo&&console.log(`threshold: ${u}, thresholdType: ${f}`),i.month(),i.daysInMonth();let h=Do("30","tracker-month-label"),c=2.8*Math.max(h.width,h.height),d=c/2.8*1.8/2,g=(c-2*d)/2,p=m(o.getValues());null!==r.yMin[s]&&(p=r.yMin[s]);let v=y(o.getValues());null!==r.yMax[s]&&(v=r.yMax[s]);let x=!0;(null===v||null===p||v<=p)&&(x=!1);const A=i.clone().startOf("month");let w=A.clone().subtract(A.day(),"days");"mon"===r.startWeekOn.toLowerCase()&&(w=w.add(1,"days"));const b=i.clone().endOf("month");let D=b.clone().add(7-b.day()-1,"days");"mon"===r.startWeekOn.toLowerCase()&&(D=D.add(1,"days"));const k=o.getStartDate(),C=o.getEndDate();let T=r.showAnnotation,M=r.annotation,_=M[s],E=r.showAnnotationOfAllTargets,F=[],S=0,B=0,N=0;for(let t=w.clone();t<=D;t.add(1,"days")){t=ho(yo(t,n.dateFormat),n.dateFormat),"2021-09-13"===t.format("YYYY-MM-DD")&&(qo=!1),"mon"===r.startWeekOn.toLowerCase()?(S=t.day()-1,S<0&&(S=6),B=Math.floor(N/7)):(S=t.day(),B=Math.floor(N/7));let e=!0;(t.diff(A)<0||t.diff(b)>0)&&(e=!1);let i=!0;k&&C&&t.diff(k)>=0&&t.diff(C)<=0&&(i=!1);const a=o.getValue(t);qo&&(console.log(o),console.log(yo(t,n.dateFormat)),console.log(a));let l=null!=a;l=f===zl.LessThan?l&&a<u:l&&a>u;let s=null;r.circleColorByValue&&x&&null!==a&&(s=(a-p)/(v-p)),qo&&(console.log(p),console.log(v),console.log(s));let h=o.getValue(t,1),c=o.getValue(t,-1),d=!1;l&&null!==c&&(f===zl.LessThan&&c<u||f===zl.GreaterThan&&c>u)&&(d=!0);let g=!1;l&&null!==h&&(f===zl.LessThan&&h<u||f===zl.GreaterThan&&h>u)&&(g=!0),qo&&(console.log(`preValue: ${c}, curValue: ${a}, nextValue: ${h}`),console.log(r.threshold),console.log(`streakIn: ${d}, streakOut: ${g}`));let y="";if(T)if(E)for(let e of r.dataset){let i=r.dataset.findIndex((t=>t===e));if(i>=0){let a=n.datasets.getDatasetById(e).getValue(t),l=r.thresholdType[i],o=r.threshold[i];null!==a&&(l===zl.LessThan&&a<o||l==zl.GreaterThan&&a>o)&&(y+=M[i])}}else l&&(y=_);F.push({date:yo(t,n.dateFormat),value:a,scaledValue:s,dayInMonth:t.date(),isInThisMonth:e,isOutOfDataRange:i,row:B,col:S,showCircle:l,streakIn:d,streakOut:g,annotation:y}),N++,qo&&(qo=!1)}let L=(S+1)*c,I=Gr().domain([-.5,6.5]).range([0,L]);if("circle"===a&&r.showCircle&&r.showStreak){let t="#69b3a2";r.circleColor?t=r.circleColor:r.color&&(t=r.color),e.dataArea.selectAll("streakIn").data(F.filter((function(t){return t.streakIn}))).enter().append("rect").attr("x",(function(t){return I(t.col)-d-g})).attr("y",(function(t){return I(t.row)-1.5})).attr("width",g).attr("height",3).style("fill",(function(e){return e.showCircle?r.circleColorByValue?null!==e.scaledValue?xn("white",t)(.8*e.scaledValue+.2):"none":t:"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})),e.dataArea.selectAll("streakOut").data(F.filter((function(t){return t.streakOut}))).enter().append("rect").attr("x",(function(t){return I(t.col)+d})).attr("y",(function(t){return I(t.row)-1.5})).attr("width",g).attr("height",3).style("fill",(function(e){return e.showCircle?r.circleColorByValue?null!==e.scaledValue?xn("white",t)(.8*e.scaledValue+.2):"none":t:"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1}))}let O="#69b3a2";r.circleColor?O=r.circleColor:r.color&&(O=r.color),"circle"===a&&r.showCircle&&e.dataArea.selectAll("dot").data(F).enter().append("circle").attr("r",d).attr("cx",(function(t){return I(t.col)})).attr("cy",(function(t){return I(t.row)})).style("fill",(function(t){if(t.showCircle){if(!r.circleColorByValue)return O;if(null!==t.scaledValue){return xn("white",O)(.8*t.scaledValue+.2)}return"none"}return"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})).style("cursor","default");let V=yo(window.moment(),n.dateFormat);if("circle"===a&&r.showTodayRing){let t=e.dataArea.selectAll("todayRing").data(F.filter((function(t){return t.date===V}))).enter().append("circle").attr("r",.9*d).attr("cx",(function(t){return I(t.col)})).attr("cy",(function(t){return I(t.row)})).attr("class","tracker-month-today-circle").style("cursor","default");""!==r.todayRingColor?t.style("stroke",r.todayRingColor):t.style("stroke","white")}"circle"===a&&r.showSelectedRing&&e.dataArea.selectAll("selectedRing").data(F).enter().append("circle").attr("r",d).attr("cx",(function(t){return I(t.col)})).attr("cy",(function(t){return I(t.row)})).attr("id",(function(t){return"tracker-selected-circle-"+t.date})).attr("class","tracker-month-selected-circle").style("cursor","default").style("stroke","none"),e.dataArea.selectAll("dayLabel").data(F).enter().append("text").text((function(t){return t.dayInMonth.toString()})).attr("transform",(function(t){return"translate("+I(t.col)+","+(I(t.row)+h.height/4)+")"})).style("fill-opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})).attr("date",(function(t){return t.date})).attr("value",(function(t){return t.value})).attr("valueType",(function(t){return Rl[o.valueType]})).attr("class","tracker-month-label").on("click",(function(t){Ko(e,r);let n=Qt(this).attr("date");if(r.selectedDate=n,r.showSelectedRing&&e.dataArea.select("#tracker-selected-circle-"+n).style("stroke",r.selectedRingColor),r.showSelectedValue){let t=Qt(this).attr("value"),n="";if("Time"===Qt(this).attr("valueType")){n=window.moment("00:00","HH:mm",!0).add(parseFloat(t),"seconds").format("HH:mm")}else n=t;e.monitor.text(n)}})).style("cursor","pointer"),"annotation"===a&&T&&e.dataArea.selectAll("dayAnnotation").data(F).enter().append("text").text((function(t){return t.annotation})).attr("transform",(function(t){let e=I(t.col),n=I(t.row)+h.height/4;return t.annotation&&(n+=d),"translate("+e+","+n+")"})).attr("class","tracker-month-annotation");let P=parseFloat(e.svg.attr("width")),$=parseFloat(e.svg.attr("height")),Y=parseFloat(e.graphArea.attr("width")),R=parseFloat(e.graphArea.attr("height")),z=7*c+parseFloat(e.header.attr("height")),U=7*c;z>$&&ko(e.svg,0,z-$),U>P&&ko(e.svg,U-P,0),z>R&&ko(e.graphArea,0,z-R),U>Y&&ko(e.svg,U-Y,0)}function es(t,e,n,r,i){n&&ns&&(Jo(t,e=Zo(e,t,n),n,r,i),ts(0,e,n,r,i),Go(t,e,n))}function ns(t,e,n){if(!e||!ns)return;n.dataset;let r=0;for(let t of e.datasets)t.getQuery().usedAsXDataset||r++;if(0===r)return"No available dataset found";if(Qo(e,n),null===n.selectedDataset)return"No available dataset found";let i={};i=Zo(i,t,e);let a=null;if(n.initMonth){if(a=po(n.initMonth,e.dateFormat),!a){let t=window.moment(n.initMonth,"YYYY-MM",!0);if(!t.isValid())return"Invalid initMonth";a=t}}else a=e.datasets.getDates().last();a&&(Jo(t,i,e,n,a),ts(0,i,e,n,a),Go(t,i,e))}function rs(t,e,n){if(e&&rs)return"Under construction"}function is(t,e,n){if(!e||!n)return;let r=parseFloat(n.dataset);e.datasets.getDatasetById(r),"horizontal"===n.orientation?e.dataAreaSize={width:250,height:24}:"vertical"===n.orientation&&(e.dataAreaSize={width:24,height:250});let i=function(t,e,n){let r={};if(!e||!n)return;let i=Qt(t).append("svg").attr("id","svg").attr("width",e.dataAreaSize.width+e.margin.left+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.top+e.margin.bottom);r.svg=i;let a=i.append("g").attr("id","graphArea").attr("transform","translate("+e.margin.left+","+e.margin.top+")").attr("width",e.dataAreaSize.width+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.bottom);r.graphArea=a;let l=a.append("g").attr("id","dataArea").attr("width",e.dataAreaSize.width).attr("height",e.dataAreaSize.height);return r.dataArea=l,r}(t,e,n),a=function(t,e,n){if(!e||!n)return;let r=n.range,i=r[r.length-1],a=[0,i],l=n.valueUnit,o=function(t){return l&&l.endsWith("%")?jr(0,i,7)(t)+" %":jr(0,i,7)(t)},s=Do(o(i),"tracker-tick-label");if("horizontal"===n.orientation){let n=Gr();n.domain(a).range([0,e.dataAreaSize.width]),t.scale=n;let r=S(n);r.tickFormat(o);let i=t.dataArea.append("g").attr("id","axis").attr("transform","translate(0,"+e.dataAreaSize.height+")").call(r).attr("class","tracker-axis");t.axis=i,i.selectAll("path").style("stroke","none"),i.selectAll("line"),i.selectAll("text").attr("class","tracker-tick-label"),i.attr("width",e.dataAreaSize.width+s.width),i.attr("height",6+s.height),ko(t.svg,+s.width,6+s.height),ko(t.graphArea,+s.width,6+s.height)}else if("vertical"===n.orientation){let n=Gr();n.domain(a).range([e.dataAreaSize.height,0]),t.scale=n;let r=B(n);r.tickFormat(o);let i=t.dataArea.append("g").attr("id","axis").attr("x",0).attr("y",0).call(r).attr("class","tracker-axis");t.axis=i,i.selectAll("path").style("stroke","none"),i.selectAll("line"),i.selectAll("text").attr("class","tracker-tick-label"),i.attr("width",6+s.width),i.attr("height",e.dataAreaSize.width),ko(t.svg,6+s.width,0),ko(t.graphArea,6+s.width,0),Co(t.dataArea,6+s.width,0)}}(i,e,n);if("string"==typeof a)return a;!function(t,e,n){if(!e||!n)return;if(n.title){let r=Do(n.title,"tracker-title-small");if("horizontal"===n.orientation){let i=t.graphArea.append("text").text(n.title).attr("id","title").attr("x",r.width/2).attr("y",e.dataAreaSize.height/2).attr("height",r.height).attr("class","tracker-title-small");t.title=i,ko(t.svg,r.width+6,0),ko(t.graphArea,r.width+6,0),Co(t.dataArea,r.width+6,0)}else if("vertical"===n.orientation){let i=e.dataAreaSize.width/2;r.width>e.dataAreaSize.width&&(ko(t.svg,r.width-e.dataAreaSize.width,0),ko(t.graphArea,r.width-e.dataAreaSize.width,0),Co(t.dataArea,r.width/2-e.dataAreaSize.width/2,0),i=r.width/2);let a=parseFloat(t.axis.attr("width")),l=t.graphArea.append("text").text(n.title).attr("id","title").attr("x",i+a).attr("y",r.height/2).attr("height",r.height).attr("class","tracker-title-small");t.title=l,ko(t.svg,0,r.height+6),ko(t.graphArea,0,r.height+6),Co(t.dataArea,0,r.height+6)}}if(n.valueUnit){let r=Do(n.valueUnit,"tracker-tick-label");if("horizontal"===n.orientation){let i=t.dataArea.append("text").text(n.valueUnit).attr("id","unit").attr("x",-1*(r.width+6)).attr("y",e.dataAreaSize.height+6).attr("height",r.height).attr("class","tracker-tick-label");t.unit=i}else if("vertical"===n.orientation){let i=t.dataArea.append("text").text(n.valueUnit).attr("id","unit").attr("x",e.dataAreaSize.width/2-r.width/2).attr("y",-(r.height/2+6)).attr("height",r.height).attr("class","tracker-tick-label");t.unit=i,ko(t.svg,0,r.height+6),ko(t.graphArea,0,r.height+6),Co(t.dataArea,0,r.height+6)}}}(i,e,n),function(t,e,n){if(!e||!n)return;let r=t.scale,i=n.range,a=n.rangeColor,l=[],o=0;for(let t=0;t<i.length;t++)l.push({start:o,end:i[t],color:a[t]}),o=i[t];"horizontal"===n.orientation?t.dataArea.selectAll("backPanel").data(l).enter().append("rect").attr("x",(function(t,e){return Math.floor(r(t.start))})).attr("y",(function(t){return 0})).attr("width",(function(t,e){return Math.ceil(r(t.end-t.start))})).attr("height",e.dataAreaSize.height).style("fill",(function(t){return t.color})):"vertical"===n.orientation&&t.dataArea.selectAll("backPanel").data(l).enter().append("rect").attr("x",(function(t,e){return 0})).attr("y",(function(t){return Math.floor(r(t.end))})).attr("width",e.dataAreaSize.width).attr("height",(function(t){return e.dataAreaSize.height-Math.floor(r(t.end-t.start))})).style("fill",(function(t){return t.color}))}(i,e,n);let l=function(t,e,n){let r="";if(!e||!n)return;let i=Ho(n.value,e);if("string"==typeof i)return i;let a=i;if(Number.isNaN(a))return r="Invalid input value: "+i,r;let l=n.valueColor,o=t.scale;if("horizontal"===n.orientation){let n=e.dataAreaSize.height/3;t.dataArea.append("rect").attr("x",o(0)).attr("y",n).attr("width",Math.floor(o(a))).attr("height",n).style("fill",l)}else if("vertical"===n.orientation){let n=e.dataAreaSize.width/3;t.dataArea.append("rect").attr("x",n).attr("y",Math.floor(o(a))).attr("width",n).attr("height",e.dataAreaSize.height-Math.floor(o(a))).style("fill",l)}}(i,e,n);if("string"==typeof l)return l;!function(t,e,n){if(!e||!n)return;if(!n.showMarker)return;let r=n.markerValue,i=n.markerColor,a=t.scale;if("horizontal"===n.orientation){let n=2*e.dataAreaSize.height/3;t.dataArea.append("rect").attr("x",a(r)-1.5).attr("y",n/4).attr("width",3).attr("height",n).style("fill",i)}else if("vertical"===n.orientation){let n=2*e.dataAreaSize.width/3;t.dataArea.append("rect").attr("x",n/4).attr("y",a(r)-1.5).attr("width",n).attr("height",3).style("fill",i)}}(i,e,n),function(t,e,n){let r=Qt(t),i=e.svg,a=parseFloat(i.attr("width")),l=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${l}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(l*n.fixedScale).toString()+"px"))}(t,i,e)}function as(t,e,n){if(!e||!n)return;let r=e.datasets,i=function(t){let e,n;for(const r of t)null!=r&&(void 0===e?r>=r&&(e=n=r):(e>r&&(e=r),n<r&&(n=r)));return[e,n]}(r.getDates());if(n instanceof Zl&&null!==n.xAxisPadding){let t=go(n.xAxisPadding);null!==t&&(i=[i[0].clone().subtract(t.asHours(),"hours"),i[1].clone().add(t.asHours(),"hours")])}let a=sl().domain(i).range([0,e.dataAreaSize.width]);t.xScale=a;let l=go(n.xAxisTickInterval),[o,s]=function(t,e){let n=[],r=null;if(e){let r=t[0],i=t[t.length-1];n=ci.range(r.toDate(),i.toDate(),e.asDays())}else{let e=t.length;r=e<=15?ci:e<=60?ci.every(4):e<=105?yi:e<=450?Si:e<=900?Si.every(2):Ni}return[n,r]}(r.getDates(),l),u=function(t,e){if(e){function n(t){return yo(window.moment(t),e)}return n}{let r=null,i=t.length;return r=Ri(i<=15||i<=60||i<=105?"%y-%m-%d":i<=450||i<=900?"%y %b":"%Y"),r}}(r.getDates(),n.xAxisTickLabelFormat),f=S(a);o&&0!==o.length?f.tickValues(o):s&&f.ticks(s),u&&f.tickFormat(u);let h=t.dataArea.append("g").attr("id","xAxis").attr("transform","translate(0,"+e.dataAreaSize.height+")").call(f).attr("class","tracker-axis");n.xAxisColor&&h.style("stroke",n.xAxisColor),t.xAxis=h;let c=Do("99-99-99"),d=h.selectAll("text").attr("x",-1*c.height*Math.cos(65/180*Math.PI)).attr("y",0).attr("transform","rotate(-65)").style("text-anchor","end").attr("class","tracker-tick-label");n.xAxisColor&&d.style("fill",n.xAxisColor);let g=c.width*Math.sin(65/180*Math.PI),p=h.append("text").text(n.xAxisLabel).attr("transform","translate("+e.dataAreaSize.width/2+","+(6+g)+")").attr("class","tracker-axis-label");n.xAxisLabelColor&&p.style("fill",n.xAxisLabelColor),h.attr("height",6+g),ko(t.svg,0,6+g),ko(t.graphArea,0,6+g)}function ls(t,e,n,r,i){if(!e||!n)return;let a=e.datasets;if(0===i.length)return;if("left"!==r&&"right"!==r)return;let l=null,o=null,s=null,u=!1;for(let t of i){let e=a.getDatasetById(t);if(!e.getQuery().usedAsXDataset)if((null===l||e.getYMin()<l)&&(l=e.getYMin()),(null===o||e.getYMax()>o)&&(o=e.getYMax()),u=e.valueType===Rl.Time,null===s)s=u;else if(u!==s)return"Not all values in time format"}let f=null;"left"===r?f=n.yMin[0]:"right"===r&&(f=n.yMin[1]);let h=!1;"number"!=typeof f?f=l:h=!0;let c=null;"left"===r?c=n.yMax[0]:"right"===r&&(c=n.yMax[1]);let d=!1;if("number"!=typeof c?c=o:d=!0,c<f){let t=f;f=c,c=t;let e=h;h=d,d=e}let g,p,y=c-f,m=Gr();g=h?f:f-.2*y,p=d?c:c+.2*y,n.GetGraphType()===Yl.Bar&&(p<0&&(p=0),g>0&&(g=0));let v=[g,p];("left"===r&&n.reverseYAxis[0]||"right"===r&&n.reverseYAxis[1])&&(v=[p,g]),m.domain(v).range([e.dataAreaSize.height,0]),"left"===r?t.leftYScale=m:"right"===r&&(t.rightYScale=m);let x="";"left"===r?x=n.yAxisColor[0]:"right"===r&&(x=n.yAxisColor[1]);let A="";"left"===r?A=n.yAxisLabelColor[0]:"right"===r&&(A=n.yAxisLabelColor[1]);let b="";"left"===r?b=n.yAxisLabel[0]:"right"===r&&(b=n.yAxisLabel[1]);let D="",k=null,C=null;"left"===r?(D=n.yAxisUnit[0],k=n.yAxisTickInterval[0],C=n.yAxisTickLabelFormat[0]):"right"===r&&(D=n.yAxisUnit[1],k=n.yAxisTickInterval[1],C=n.yAxisTickLabelFormat[1]);let T,M=null;if(u?M=go(k):(M=parseFloat(k),Number.isNumber(M)&&!Number.isNaN(M)||(M=null)),"left"===r?T=B(m):"right"===r&&(T=F(2,m)),T){let t=function(t,e,n,r=!1){if(r){if(n){function i(t){return window.moment("00:00","HH:mm",!0).add(t,"seconds").format(n)}return i}{function a(n){const r=Math.abs(e-t);let i=window.moment("00:00","HH:mm",!0).add(n,"seconds").format("HH:mm");return r>43200&&(n<t||n>e||(n-t)/3600%2<1)&&(i=""),i}return a}}if(n){function l(t){return Io.sprintf("%"+n,t)}return l}return jr(t,e,10)}(g,p,C,u);t&&T.tickFormat(t);let e=function(t,e,n,r=!1){const i=Math.abs(e-t);let a=[];r?a=n&&window.moment.isDuration(n)?w(t,e,Math.abs(n.asSeconds())):i>18e3?w(t=3600*Math.floor(t/3600),e=3600*Math.ceil(e/3600),3600):w(t=1800*Math.floor(t/1800),e=1800*Math.ceil(e/1800),1800):n&&"number"==typeof n&&(a=w(t,e,n));return 0===a.length?null:a}(g,p,M,u);e&&T.tickValues(e)}let _=t.dataArea.append("g").attr("id","yAxis").call(T).attr("class","tracker-axis");"right"==r&&_.attr("transform","translate("+e.dataAreaSize.width+" ,0)"),"left"===r?t.leftYAxis=_:"right"===r&&(t.rightYAxis=_);let E=_.selectAll("path");x&&E.style("stroke",x);let S=_.selectAll("line");x&&S.style("stroke",x);let N=_.selectAll("text").attr("class","tracker-tick-label");x&&N.style("fill",x);let L=0;for(let t of N)if(t.textContent){let e=Do(t.textContent,"tracker-axis-label");e.width>L&&(L=e.width)}""!==D&&(b+=" ("+D+")");let I=Do(b),O=_.append("text").text(b).attr("transform","rotate(-90)").attr("x",-1*e.dataAreaSize.height/2).attr("class","tracker-axis-label");"left"===r?O.attr("y",-6-L-I.height/2):O.attr("y",6+L+I.height),A&&O.style("fill",A);let V=I.height+L+6;_.attr("width",V),ko(t.svg,V,0),ko(t.graphArea,V,0),"left"===r&&(Co(t.dataArea,V,0),t.title&&Co(t.title,V,0))}function os(t,e,n,r,i){if(!e||!n)return;let a=null;if("left"===i?a=t.leftYScale:"right"===i&&(a=t.rightYScale),n.showLine[r.getId()]){let e=function(t,e){var n=fl(!0),r=null,i=Nl,a=null,l=Dl(o);function o(o){var s,u,f,h=(o=Sl(o)).length,c=!1;for(null==r&&(a=i(f=l())),s=0;s<=h;++s)!(s<h&&n(u=o[s],s,o))===c&&((c=!c)?a.lineStart():a.lineEnd()),c&&a.point(+t(u,s,o),+e(u,s,o));if(f)return a=null,f+""||null}return t="function"==typeof t?t:void 0===t?Ll:fl(t),e="function"==typeof e?e:void 0===e?Il:fl(e),o.x=function(e){return arguments.length?(t="function"==typeof e?e:fl(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:fl(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:fl(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}().defined((function(t){return null!==t.value})).x((function(e){return t.xScale(e.date)})).y((function(t){return a(t.value)})),i=t.dataArea.append("path").attr("class","tracker-line").style("stroke-width",n.lineWidth[r.getId()]);n.fillGap[r.getId()]?i.datum(Array.from(r).filter((function(t){return null!==t.value}))).attr("d",e):i.datum(r).attr("d",e),n.lineColor[r.getId()]&&i.style("stroke",n.lineColor[r.getId()])}}function ss(t,e,n,r,i){if(!e||!n)return;let a=null;if("left"===i?a=t.leftYScale:"right"===i&&(a=t.rightYScale),n.showPoint[r.getId()]){let i=t.dataArea.selectAll("dot").data(Array.from(r).filter((function(t){return null!==t.value}))).enter().append("circle").attr("r",n.pointSize[r.getId()]).attr("cx",(function(e){return t.xScale(e.date)})).attr("cy",(function(t){return a(t.value)})).attr("date",(function(t){return Ri("%y-%m-%d")(t.date)})).attr("value",(function(t){if(null!==t.value)return Number.isInteger(t.value)?t.value.toFixed(0):t.value.toFixed(2)})).attr("valueType",Rl[r.valueType]).attr("class","tracker-dot");n.pointColor[r.getId()]&&(i.style("fill",n.pointColor[r.getId()]),n.pointBorderColor[r.getId()]&&n.pointBorderWidth[r.getId()]>0&&(i.style("stroke",n.pointBorderColor[r.getId()]),i.style("stroke-width",n.pointBorderWidth[r.getId()]))),n.allowInspectData&&function(t,e,n){let r=e.dataArea.append("svg").style("opacity",0),i=r.append("rect").attr("x",0).attr("y",0),a=r.append("text"),l=a.append("tspan").attr("class","tracker-tooltip-label"),o=a.append("tspan").attr("class","tracker-tooltip-label"),s=3,u=3;t.on("mouseenter",(function(t){const[e,f]=function(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}(t);let h=0,c=0,d="date: "+Qt(this).attr("date"),g=Do(d,"tracker-tooltip-label");l.text(d),g.width>h&&(h=g.width),c+=g.height,l.attr("x",s).attr("y",c);let p="value: ",y=Qt(this).attr("valueType"),m=Qt(this).attr("value");if("Time"===y){p+=window.moment("00:00","HH:mm",!0).add(parseFloat(m),"seconds").format("HH:mm"),o.text(p)}else p+=m,o.text(p);let v=Do(p,"tracker-tooltip-label");v.width>h&&(h=v.width),c+=u+v.height,o.attr("x",s).attr("y",c),h+=2*s,c+=2*u,a.attr("width",h).attr("height",c),i.attr("width",h).attr("height",c).attr("class","tracker-tooltip");let x=e,A=f,w=12,b=12;x=e+w+h>n.dataAreaSize.width?e-h-w:e+w,A=f-b-c<0?f+b:f-b-c,r.attr("x",x).attr("y",A),r.transition().duration(200).style("opacity",1)})).on("mouseleave",(function(){r.transition().duration(500).style("opacity",0)}))}(i,t,e)}}function us(t,e,n,r,i,a,l){if(!e||!n)return;let o=e.dataAreaSize.width/r.getLength(),s=o,u=a,f=l;o-1>0&&(s=o-1),e.stack?(u=0,f=1):s/=l;let h=null;"left"===i?h=t.leftYScale:"right"===i&&(h=t.rightYScale);let c=t.dataArea.selectAll("bar").data(Array.from(r).filter((function(t){return null!==t.value}))).enter().append("rect").attr("x",(function(e,r){if(0===r&&null===n.xAxisPadding){let n=u+1-f/2;if(n<1)return t.xScale(e.date)-o/2+u*s+n*s}return t.xScale(e.date)-o/2+u*s})).attr("y",(function(t){return h(Math.max(t.value,0))})).attr("width",(function(t,e){if(0===e&&null===n.xAxisPadding){let t=u+1-f/2;return t<0?0:t<1?s*t:s}if(e===r.getLength()-1&&null===n.xAxisPadding){let t=1-(u+1-f/2);return t<0?0:t<1?s*t:s}return s})).attr("height",(function(t){if(null!==t.value)return Math.abs(h(t.value)-h(0))})).attr("class","tracker-bar");n.barColor[r.getId()]&&c.style("fill",n.barColor[r.getId()])}function fs(t,e,n){let r=t.svg;t.graphArea;let i=t.dataArea,a=t.title,l=t.xAxis,o=t.leftYAxis,s=t.rightYAxis,u=0;a&&(u=parseFloat(a.attr("height")));let f=parseFloat(l.attr("height")),h=0;o&&(h=parseFloat(o.attr("width")));let c=0;s&&(c=parseFloat(s.attr("width")));let d=e.datasets,g=d.getXDatasetIds(),p=d.getNames(),y=p.map((function(t){return Do(t,"tracker-legend-label")})),m=0,v=0;for(let t=0;t<p.length;t++)g.includes(t)||y[t].width>v&&(v=y[t].width,m=t);let x=v/p[m].length,A=y[m].height,w=p.length-g.length,D=2*x,k=A,C=2*x,T=0,M=0;"vertical"===n.legendOrientation?(T=3*D+C+v,M=(w+1)*k):"horizontal"===n.legendOrientation&&(T=(2*D+C)*w+D+b(y,(function(t,e){return g.includes(e)?0:t.width})),M=k+A);let _=0,E=0;if("top"===n.legendPosition)_=h+e.dataAreaSize.width/2-T/2,E=u,ko(r,0,M+k),Co(i,0,M+k);else if("bottom"===n.legendPosition)_=h+e.dataAreaSize.width/2-T/2,E=u+e.dataAreaSize.height+f+k,ko(r,0,M+k);else if("left"===n.legendPosition)_=0,E=u+e.dataAreaSize.height/2-M/2,ko(r,T+D,0),Co(i,T+D,0);else{if("right"!==n.legendPosition)return;_=e.dataAreaSize.width+h+c+D,E=u+e.dataAreaSize.height/2-M/2,ko(r,T+D,0)}let F=t.graphArea.append("g").attr("id","legend").attr("transform","translate("+_+","+E+")"),S=F.append("rect").attr("class","tracker-legend").attr("width",T).attr("height",M);n.legendBgColor&&S.style("fill",n.legendBgColor),n.legendBorderColor&&S.style("stroke",n.legendBorderColor);let B=D,N=A,L=B+D+C,I=N;if("vertical"===n.legendOrientation){n.GetGraphType()===Yl.Line?(F.selectAll("markers").data(p).enter().append("line").attr("x1",B).attr("x2",B+C).attr("y1",(function(t,e){let n=g.filter((t=>t<e)).length;return N+(e-=n)*k})).attr("y2",(function(t,e){let n=g.filter((t=>t<e)).length;return N+(e-=n)*k})).style("stroke",(function(t,e){if(!g.includes(e))return n.lineColor[e]})),F.selectAll("markers").data(p).enter().append("circle").attr("cx",B+C/2).attr("cy",(function(t,e){let n=g.filter((t=>t<e)).length;return N+(e-=n)*k})).attr("r",(function(t,e){if(!g.includes(e))return n.showPoint[e]?n.pointSize[e]:0})).style("fill",(function(t,e){if(!g.includes(e))return n.pointColor[e]}))):n.GetGraphType()===Yl.Bar&&F.selectAll("markers").data(p).enter().append("rect").attr("x",B).attr("y",(function(t,e){let n=g.filter((t=>t<e)).length;return N+(e-=n)*k-A/2})).attr("width",C).attr("height",A).style("fill",(function(t,e){if(!g.includes(e))return n.barColor[e]}));let t=F.selectAll("labels").data(p).enter().append("text").attr("x",L).attr("y",(function(t,e){let n=g.filter((t=>t<e)).length;return I+(e-=n)*k})).text((function(t,e){return g.includes(e)?"":t})).style("alignment-baseline","middle").attr("class","tracker-legend-label");n.GetGraphType()===Yl.Line?t.style("fill",(function(t,e){if(!g.includes(e))return n.lineColor[e]})):n.GetGraphType()===Yl.Bar&&t.style("fill",(function(t,e){if(!g.includes(e))return n.barColor[e]}))}else if("horizontal"===n.legendOrientation){n.GetGraphType()===Yl.Line?(F.selectAll("markers").data(p).enter().append("line").attr("x1",(function(t,e){let n=D;for(let[t,r]of y.entries())if(!g.includes(t)){if(!(t<e))break;n+=C+D+r.width+D}return n})).attr("x2",(function(t,e){let n=D+C;for(let[t,r]of y.entries())if(!g.includes(t)){if(!(t<e))break;n+=D+r.width+D+C}return n})).attr("y1",N).attr("y2",N).style("stroke",(function(t,e){if(!g.includes(e))return n.lineColor[e]})),F.selectAll("markers").data(p).enter().append("circle").attr("cx",(function(t,e){let n=D+C/2;for(let[t,r]of y.entries())if(!g.includes(t)){if(!(t<e))break;n+=C/2+D+r.width+D+C/2}return n})).attr("cy",N).attr("r",(function(t,e){if(!g.includes(e))return n.showPoint[e]?n.pointSize[e]:0})).style("fill",(function(t,e){if(!g.includes(e))return n.pointColor[e]}))):n.GetGraphType()===Yl.Bar&&F.selectAll("markers").data(p.filter(((t,e)=>!g.includes(e)))).enter().append("rect").attr("x",(function(t,e){let n=D;for(let[t,r]of y.entries())if(!g.includes(t)){if(!(t<e))break;n+=C+D+r.width+D}return n})).attr("y",N-A/2).attr("width",C).attr("height",A).style("fill",(function(t,e){if(!g.includes(e))return n.barColor[e]}));let t=F.selectAll("labels").data(p).enter().append("text").attr("x",(function(t,e){let n=D+C+D;for(let[t,r]of y.entries())if(!g.includes(t)){if(!(t<e))break;n+=r.width+D+C+D}return n})).attr("y",I).text((function(t,e){return g.includes(e)?"":t})).style("alignment-baseline","middle").attr("class","tracker-legend-label");n.GetGraphType()===Yl.Line?t.style("fill",(function(t,e){if(!g.includes(e))return n.lineColor[e]})):n.GetGraphType()===Yl.Bar&&t.style("fill",(function(t,e){if(!g.includes(e))return n.barColor[e]}))}}function hs(t,e,n){if(!e||!n)return;if(!n.title)return;let r=Do(n.title,"tracker-title"),i=t.graphArea.append("text").text(n.title).attr("id","title").attr("transform","translate("+e.dataAreaSize.width/2+","+r.height/2+")").attr("height",r.height).attr("class","tracker-title");t.title=i,ko(t.svg,0,r.height),ko(t.graphArea,0,r.height),Co(t.dataArea,0,r.height)}function cs(t,e,n){let r=Qt(t),i=e.svg,a=parseFloat(i.attr("width")),l=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${l}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(l*n.fixedScale).toString()+"px"))}function ds(t,e){let n={},r=Qt(t).append("svg").attr("id","svg").attr("width",e.dataAreaSize.width+e.margin.left+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.top+e.margin.bottom);n.svg=r;let i=r.append("g").attr("id","graphArea").attr("transform","translate("+e.margin.left+","+e.margin.top+")").attr("width",e.dataAreaSize.width+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.bottom);n.graphArea=i;let a=i.append("g").attr("id","dataArea").attr("width",e.dataAreaSize.width).attr("height",e.dataAreaSize.height);return n.dataArea=a,n}function gs(t,e,n){if(!e||!n)return;let r=ds(t,e);hs(r,e,n),as(r,e,n);let i=[],a=[],l=e.datasets.getXDatasetIds();for(let t=0;t<n.yAxisLocation.length;t++){if(l.includes(t))continue;let e=n.yAxisLocation[t];"left"===e.toLowerCase()?i.push(t):"right"===e.toLocaleLowerCase()&&a.push(t)}let o=ls(r,e,n,"left",i);if("string"==typeof o)return o;if(r.leftYAxis&&r.leftYScale)for(let t of i){let i=e.datasets.getDatasetById(t);i.getQuery().usedAsXDataset||(os(r,e,n,i,"left"),ss(r,e,n,i,"left"))}let s=ls(r,e,n,"right",a);if("string"==typeof s)return s;if(r.rightYAxis&&r.rightYScale)for(let t of a){let i=e.datasets.getDatasetById(t);i.getQuery().usedAsXDataset||(os(r,e,n,i,"right"),ss(r,e,n,i,"right"))}n.showLegend&&fs(r,e,n),cs(t,r,e)}function ps(t,e,n){if(!e||!n)return;let r=ds(t,e);hs(r,e,n),as(r,e,n);let i=[],a=[],l=e.datasets.getXDatasetIds();if(e.stack)for(let t=n.yAxisLocation.length-1;t>=0;t--){if(l.includes(t))continue;let e=n.yAxisLocation[t];"left"===e.toLowerCase()?i.push(t):"right"===e.toLocaleLowerCase()&&a.push(t)}else for(let t=0;t<n.yAxisLocation.length;t++){if(l.includes(t))continue;let e=n.yAxisLocation[t];"left"===e.toLowerCase()?i.push(t):"right"===e.toLocaleLowerCase()&&a.push(t)}let o=ls(r,e,n,"left",i);if("string"==typeof o)return o;let s=i.length+a.length,u=0;if(r.leftYAxis&&r.leftYScale)for(let t of i){let i=e.datasets.getDatasetById(t);i.getQuery().usedAsXDataset||(us(r,e,n,i,"left",u,s),u++)}let f=ls(r,e,n,"right",a);if("string"==typeof f)return f;if(r.rightYAxis&&r.rightYScale)for(let t of a){let i=e.datasets.getDatasetById(t);i.getQuery().usedAsXDataset||(us(r,e,n,i,"right",u,s),u++)}n.showLegend&&fs(r,e,n),cs(t,r,e)}function ys(t){switch(t=t.trim().toLowerCase()){case"true":case"1":case"on":case"yes":return!0;case"false":case"0":case"off":case"no":return!1}return null}function ms(t){return"tag"===t.toLowerCase()||"text"===t.toLowerCase()||"frontmatter"===t.toLowerCase()||"wiki"===t.toLowerCase()||"wiki.link"===t.toLowerCase()||"wiki.display"===t.toLowerCase()||"dvfield"===t.toLowerCase()||"table"===t.toLowerCase()||"filemeta"===t.toLowerCase()||"task"===t.toLowerCase()||"task.all"===t.toLowerCase()||"task.done"===t.toLowerCase()||"task.notdone"===t.toLowerCase()}function vs(t){return"left"===t||"right"===t||"none"===t}function xs(t){return!0}function As(t){const e="::::::tracker::::::";let n=t.split("\\,").join(e).split(",");for(let t=0;t<n.length;t++)n[t]=n[t].split(e).join(",");return n}function ws(t,e,n,r,i){let a=[],l="",o=0;for(;n>a.length;)a.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return l="Too many inputs for parameter '"+t+"'",l;if(0===e.length)return l="Empty array not allowd for "+t,l;for(let n=0;n<a.length;n++)if(n<e.length){let i=e[n],s=null;if(n>0&&(s=e[n-1].trim()),"string"==typeof i){if(i=i.trim(),""!==i){l="Invalid inputs for "+t;break}a[n]=null!==s?s:r}else{if("boolean"!=typeof i){l="Invalid inputs for "+t;break}a[n]=i,o++}}else{let t=e[e.length-1];a[n]=o>0?t:r}}}else if("string"==typeof e){let i=As(e);if(i.length>1){if(i.length>n)return l="Too many inputs for parameter '"+t+"'",l;for(let e=0;e<a.length;e++)if(e<i.length){let n=i[e].trim(),s=null;if(e>0&&(s=ys(i[e-1].trim())),""===n)a[e]=null!==s?s:r;else{let r=ys(n);if(null===r){l="Invalid inputs for "+t;break}a[e]=r,o++}}else{let t=ys(i[i.length-1].trim());a[e]=o>0&&null!==t?t:r}}else if(""===e);else{let n=ys(e);if(null!==n){a[0]=n,o++;for(let t=1;t<a.length;t++)a[t]=n}else l="Invalid inputs for "+t}}else if("boolean"==typeof e){a[0]=e,o++;for(let t=1;t<a.length;t++)a[t]=e}else l="Invalid inputs for "+t;return""!==l?l:a}function bs(t,e,n,r,i){let a=[],l="",o=0;for(;n>a.length;)a.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return l="Too many inputs for parameter '"+t+"'",l;if(0===e.length)return l="Empty array not allowd for "+t,l;for(let n=0;n<a.length;n++)if(n<e.length){let i=e[n],s=null;if(n>0&&(s=e[n-1].trim()),"string"==typeof i){if(i=i.trim(),""!==i){l="Invalid inputs for "+t;break}a[n]=null!==s?s:r}else{if("number"!=typeof i){l="Invalid inputs for "+t;break}a[n]=i,o++}}else{let t=e[e.length-1];a[n]=o>0?t:r}}}else if("string"==typeof e){let i=As(e);if(i.length>1){if(i.length>n)return l="Too many inputs for parameter '"+t+"'",l;for(let n=0;n<a.length;n++)if(n<i.length){let e=i[n].trim(),s=null;if(n>0&&(s=bo(i[n-1].trim()).value),""===e)null!==s&&Number.isNumber(s)?a[n]=s:a[n]=r;else{let r=bo(e).value;if(null===r){l="Invalid inputs for "+t;break}a[n]=r,o++}}else{let t=bo(i[e.length-1].trim()).value;a[n]=o>0&&null!==t?t:r}}else if(""===e);else{let n=bo(e).value;if(null!==n){a[0]=n,o++;for(let t=1;t<a.length;t++)a[t]=n}else l="Invalid inputs for "+t}}else if("number"==typeof e)if(Number.isNumber(e)){a[0]=e,o++;for(let t=1;t<a.length;t++)a[t]=e}else l="Invalid inputs for "+t;else l="Invalid inputs for "+t;return""!==l?l:a}function Ds(t,e){return"string"==typeof t?wo(t):"number"==typeof t?t.toString():e}function ks(t,e,n,r,i,a){let l=[],o="",s=0;for(;n>l.length;)l.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return o="Too many inputs for parameter '"+t+"'",o;if(0===e.length)return o="Empty array not allowd for "+t,o;for(let n=0;n<l.length;n++)if(n<e.length){let a=e[n],u=null;if(n>0&&(u=e[n-1].trim()),"string"!=typeof a){o="Invalid inputs for "+t;break}if(a=a.trim(),""===a)l[n]=null!==u?u:r;else if(i){if(!i(a)){o="Invalid inputs for "+t;break}l[n]=a,s++}else l[n]=a,s++}else{let t=e[e.length-1].trim();l[n]=s>0?t:r}}}else if("string"==typeof e){let a=As(e);if(a.length>1){if(a.length>n)return o="Too many inputs for parameter '"+t+"'",o;for(let e=0;e<l.length;e++)if(e<a.length){let n=a[e].trim(),u=null;if(e>0&&(u=a[e-1].trim()),""===n)l[e]=null!==u?u:r;else if(i){if(!i(n)){o="Invalid inputs for "+t;break}l[e]=n,s++}else l[e]=n,s++}else{let t=a[a.length-1].trim();l[e]=s>0?t:r}}else if(""===e);else if(i)if(i(e)){l[0]=e,s++;for(let t=1;t<l.length;t++)l[t]=e}else o="Invalid inputs for "+t;else{l[0]=e,s++;for(let t=1;t<l.length;t++)l[t]=e}}else if("number"==typeof e){let n=e.toString();if(i)if(i(n)){l[0]=n,s++;for(let t=1;t<l.length;t++)l[t]=n}else o="Invalid inputs for "+t;else{l[0]=n,s++;for(let t=1;t<l.length;t++)l[t]=n}}else o="Invalid inputs for "+t;if(a||0!==s||(o="No valid input for "+t),""!==o)return o;for(let t=0;t<l.length;t++)l[t]=wo(l[t]);return l}function Cs(t,e){let n=[];if(null==e)return n;if("object"==typeof e){if(Array.isArray(e))for(let r of e)if("string"==typeof r){let e=parseFloat(r);if(!Number.isNumber(e)){return`Parameter '${t}' accepts only numbers`}n.push(e)}}else if("string"==typeof e){let r=As(e);if(r.length>1)for(let e of r){let r=parseFloat(e.trim());if(Number.isNaN(r)){return`Parameter '${t}' accepts only numbers`}n.push(r)}else{if(""===e){return`Empty ${t} is not allowed.`}{let r=parseFloat(e);if(!Number.isNumber(r)){return`Parameter '${t}' accepts only numbers`}n.push(r)}}}else{if("number"!=typeof e){return`Invalid ${t}`}n.push(e)}return n}function Ts(t,e){let n=[];if(null==e)return n;if("object"==typeof e){if(Array.isArray(e))for(let t of e)"string"==typeof t&&n.push(t.trim())}else{if("string"!=typeof e){return`Invalid ${t}`}{let r=As(e);if(r.length>1)for(let t of r)n.push(t.trim());else{if(""===e){return`Empty ${t} is not allowed.`}n.push(e)}}}for(let t=0;t<n.length;t++)n[t]=wo(n[t]);return n}function Ms(t,e){t&&(e.title=Ds(null==t?void 0:t.title,e.title),e.xAxisLabel=Ds(null==t?void 0:t.xAxisLabel,e.xAxisLabel),e.xAxisColor=Ds(null==t?void 0:t.xAxisColor,e.xAxisColor),e.xAxisLabelColor=Ds(null==t?void 0:t.xAxisLabelColor,e.xAxisLabelColor),"boolean"==typeof t.allowInspectData&&(e.allowInspectData=t.allowInspectData),"boolean"==typeof t.showLegend&&(e.showLegend=t.showLegend),"string"==typeof t.legendPosition?e.legendPosition=t.legendPosition:e.legendPosition="bottom","string"==typeof t.legendOrientation?e.legendOrientation=t.legendOrientation:"top"===e.legendPosition||"bottom"===e.legendPosition?e.legendOrientation="horizontal":"left"===e.legendPosition||"right"===e.legendPosition?e.legendOrientation="vertical":e.legendOrientation="horizontal",e.legendBgColor=Ds(null==t?void 0:t.legendBgColor,e.legendBgColor),e.legendBorderColor=Ds(null==t?void 0:t.legendBorderColor,e.legendBorderColor));let n=ks("yAxisLabel",null==t?void 0:t.yAxisLabel,2,"Value",null,!0);if("string"==typeof n)return n;if(n.length>2)return"yAxisLabel accepts not more than two values for left and right y-axes";e.yAxisLabel=n;let r=ks("yAxisColor",null==t?void 0:t.yAxisColor,2,"",xs,!0);if("string"==typeof r)return r;if(r.length>2)return"yAxisColor accepts not more than two values for left and right y-axes";e.yAxisColor=r;let i=ks("yAxisLabelColor",null==t?void 0:t.yAxisLabelColor,2,"",xs,!0);if("string"==typeof i)return i;if(i.length>2)return"yAxisLabelColor accepts not more than two values for left and right y-axes";e.yAxisLabelColor=i;let a=ks("yAxisUnit",null==t?void 0:t.yAxisUnit,2,"",null,!0);if("string"==typeof a)return a;if(a.length>2)return"yAxisUnit accepts not more than two values for left and right y-axes";e.yAxisUnit=a,e.xAxisTickInterval=Ds(null==t?void 0:t.xAxisTickInterval,e.xAxisTickInterval);let l=ks("yAxisTickInterval",null==t?void 0:t.yAxisTickInterval,2,null,null,!0);if("string"==typeof l)return l;if(l.length>2)return"yAxisTickInterval accepts not more than two values for left and right y-axes";e.yAxisTickInterval=l,e.xAxisTickLabelFormat=Ds(null==t?void 0:t.xAxisTickLabelFormat,e.xAxisTickLabelFormat);let o=ks("yAxisTickLabelFormat",null==t?void 0:t.yAxisTickLabelFormat,2,null,null,!0);if("string"==typeof o)return o;if(o.length>2)return"yAxisTickLabelFormat accepts not more than two values for left and right y-axes";e.yAxisTickLabelFormat=o;let s=bs("yMin",null==t?void 0:t.yMin,2,null);if("string"==typeof s)return s;if(s.length>2)return"yMin accepts not more than two values for left and right y-axes";e.yMin=s;let u=bs("yMax",null==t?void 0:t.yMax,2,null);if("string"==typeof u)return u;if(u.length>2)return"yMax accepts not more than two values for left and right y-axes";e.yMax=u;let f=ws("reverseYAxis",null==t?void 0:t.reverseYAxis,2,!1);return"string"==typeof f?f:f.length>2?"reverseYAxis accepts not more than two values for left and right y-axes":void(e.reverseYAxis=f)}function _s(t){let e=[];if(null!==t){const n=Object.keys(t);for(let t of n)e.push(t.toString())}return e}function Es(t,e){return ho(fo(t.basename,e.dateFormatPrefix,e.dateFormatSuffix),e.dateFormat)}function Fs(t,e,n){let r=window.moment(""),i=t.frontmatter;if(i&&xo(i,e.getTarget())){let t=xo(i,e.getTarget());"string"==typeof t&&(t=fo(t,n.dateFormatPrefix,n.dateFormatSuffix),r=ho(t,n.dateFormat))}return r}function Ss(t,e,n){let r,i=window.moment(""),a=new RegExp(e,"gm");for(;r=a.exec(t);)if(void 0!==r.groups&&void 0!==r.groups.value){let t=r.groups.value.trim();if(t=fo(t,n.dateFormatPrefix,n.dateFormatSuffix),i=ho(t,n.dateFormat),i.isValid())return i}return i}function Bs(t,e,n){window.moment("");let r=e.getTarget();return e.getParentTarget()&&(r=e.getParentTarget()),Ss(t,"(^|\\s)#"+r+"(\\/[\\w-]+)*(:(?<value>[\\d\\.\\/-]*)[a-zA-Z]*)?([\\.!,\\?;~-]*)?(\\s|$)",n)}function Ns(t,e,n){return window.moment(""),Ss(t,e.getTarget(),n)}function Ls(t,e,n){window.moment("");let r=e.getTarget();return e.getParentTarget()&&(r=e.getParentTarget()),r=r.replace("-","[\\s\\-]"),Ss(t,"(^| |\\t)\\*{0,2}"+r+"\\*{0,2}(::[ |\\t]*(?<value>[\\d\\.\\/\\-\\w,@; \\t:]*))(\\r\\?\\n|\\r|$)",n)}function Is(e,n,r){let i=window.moment("");if(e&&e instanceof t.TFile){let t=n.getTarget();if("cDate"===t){i=mo(e.stat.ctime,r.dateFormat)}else if("mDate"===t){i=mo(e.stat.mtime,r.dateFormat)}else"name"===t&&(i=Es(e,r))}return i}function Os(t,e,n){window.moment("");let r=e.getType(),i=e.getTarget();return i=r===$l.Task?"\\[[\\sx]\\]\\s"+i:r===$l.TaskDone?"\\[x\\]\\s"+i:r===$l.TaskNotDone?"\\[\\s\\]\\s"+i:"\\[[\\sx]\\]\\s"+i,Ss(t,i,n)}function Vs(t,e,n,r){if(t.has(e)){t.get(e).push({query:n,value:r})}else{let i=new Array;i.push({query:n,value:r}),t.set(e,i)}}function Ps(t,e,n,r,i,a){let l,o=new RegExp(e,"gmu"),s=0,u=!1;for(;l=o.exec(t);)if(a.ignoreAttachedValue[n.getId()])s+=a.constValue[n.getId()],u=!0,n.addNumTargets();else if(void 0!==l.groups&&void 0!==l.groups.value){let t=l.groups.value.trim().split(n.getSeparator());if(!t)continue;if(1===t.length){let e=bo(t[0].trim(),a.textValueMap);null!==e.value&&(e.type===Rl.Time?(s=e.value,u=!0,n.valueType=Rl.Time,n.addNumTargets()):a.ignoreZeroValue[n.getId()]&&0===e.value||(s+=e.value,u=!0,n.addNumTargets()))}else if(t.length>n.getAccessor()&&n.getAccessor()>=0){let e=bo(t[n.getAccessor()].trim(),a.textValueMap);null!==e.value&&(e.type===Rl.Time?(s=e.value,u=!0,n.valueType=Rl.Time,n.addNumTargets()):(s+=e.value,u=!0,n.addNumTargets()))}}else s+=a.constValue[n.getId()],u=!0,n.addNumTargets();if(u){return Vs(r,i.get(a.xDataset[n.getId()]),n,s),!0}return!1}function $s(e,n,r,i,a,l){if(e&&e instanceof t.TFile){let t=r.getTarget(),o=l.get(i.xDataset[r.getId()]);if("cDate"===t){let t=e.stat.ctime;return r.valueType=Rl.Date,r.addNumTargets(),Vs(a,o,r,t),!0}if("mDate"===t){let t=e.stat.mtime;return r.valueType=Rl.Date,r.addNumTargets(),Vs(a,o,r,t),!0}if("size"===t){let t=e.stat.size;return r.addNumTargets(),Vs(a,o,r,t),!0}if("numWords"===t){return Vs(a,o,r,function(t){t=To(t);var e=new RegExp(["(?:[0-9]+(?:(?:,|\\.)[0-9]+)*|[\\-"+/A-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source+"])+",/[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5]{1}/.source].join("|"),"g");return(t.match(e)||[]).length}(n)),!0}if("numChars"===t){let t=n.length;return r.addNumTargets(),Vs(a,o,r,t),!0}if("numSentences"===t){let t=function(t){return(((t=To(t))||"").match(/[^.。!!??\s][^.。!!??]*(?:[.!?](?!['‘’"“”「」『』]?\s|$)[^.。!!??]*)*[.。!!??]?['’"”」』]?(?=\s||$)/gm)||[]).length}(n);return r.addNumTargets(),Vs(a,o,r,t),!0}if("name"===t){let t=0,n=!1,l=bo(e.basename,i.textValueMap);null!==l.value&&(l.type===Rl.Time?(t=l.value,n=!0,r.valueType=Rl.Time,r.addNumTargets()):i.ignoreZeroValue[r.getId()]&&0===l.value||(t+=l.value,n=!0,r.addNumTargets()));let s=null;if(n&&(s=t),null!==s)return Vs(a,o,r,s),!0}}return!1}const Ys={folder:"/",dateFormat:"YYYY-MM-DD"};class Rs extends t.PluginSettingTab{constructor(t,e){super(t,e),this.plugin=e}display(){let{containerEl:e}=this;e.empty(),new t.Setting(e).setName("Default folder location").setDesc("Files in this folder will be parsed and used as input data of the tracker plugin.\nYou can also override it using 'folder' argument in the tracker codeblock.").addText((t=>t.setPlaceholder("Folder Path").setValue(this.plugin.settings.folder).onChange((async t=>{this.plugin.settings.folder=t,await this.plugin.saveSettings()})))),new t.Setting(e).setName("Default date format").setDesc("This format is used to parse the date in your diary title.\nYou can also override it using 'dateFormat' argument in the tracker codeblock.").addText((t=>t.setPlaceholder("YYYY-MM-DD").setValue(this.plugin.settings.dateFormat).onChange((async t=>{this.plugin.settings.dateFormat=t,await this.plugin.saveSettings()}))))}}class zs extends t.Plugin{async onload(){console.log("loading obsidian-tracker plugin"),await this.loadSettings(),this.addSettingTab(new Rs(this.app,this)),this.registerMarkdownCodeBlockProcessor("tracker",this.postprocessor.bind(this)),this.addCommand({id:"add-line-chart-tracker",name:"Add Line Chart Tracker",callback:()=>this.addCodeBlock(Yl.Line)}),this.addCommand({id:"add-bar-chart-tracker",name:"Add Bar Chart Tracker",callback:()=>this.addCodeBlock(Yl.Bar)}),this.addCommand({id:"add-summary-tracker",name:"Add Summary Tracker",callback:()=>this.addCodeBlock(Yl.Summary)})}async loadSettings(){this.settings=Object.assign({},Ys,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}renderErrorMessage(t,e,n){!function(t,e){Qt(t).select("#svg").remove(),Qt(t).append("div").text(e).style("background-color","white").style("margin-bottom","20px").style("padding","10px").style("color","red")}(e,t),n.appendChild(e)}onunload(){console.log("unloading obsidian-tracker plugin")}getFilesInFolder(e,n=!0){let r=[];for(let i of e.children)i instanceof t.TFile?"md"===i.extension&&r.push(i):i instanceof t.TFolder&&n&&(r=r.concat(this.getFilesInFolder(i)));return r}async getFiles(e,n,r=!0){if(!e)return;let i=n.folder,a=n.specifiedFilesOnly,l=n.file,o=n.fileContainsLinkedFiles,s=n.fileMultiplierAfterLink;if(!a){let n=this.app.vault.getAbstractFileByPath(t.normalizePath(i));if(n&&n instanceof t.TFolder){let t=this.getFilesInFolder(n);for(let n of t)e.push(n)}}for(let n of l){let r=n;r.endsWith(".md")||(r+=".md"),r=t.normalizePath(r);let i=this.app.vault.getAbstractFileByPath(r);i&&i instanceof t.TFile&&e.push(i)}let u=1,f=!0;""===s?f=!1:/^[0-9]+$/.test(s)?(u=parseFloat(s),f=!1):/\?<value>/.test(s)||(f=!1);for(let r of o){r.endsWith(".md")||(r+=".md");let i=this.app.vault.getAbstractFileByPath(t.normalizePath(r));if(i&&i instanceof t.TFile){let a=this.app.metadataCache.getFileCache(i),l=(await this.app.vault.adapter.read(i.path)).split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/);if(!(null==a?void 0:a.links))continue;for(let i of a.links){if(!i)continue;let a=this.app.metadataCache.getFirstLinkpathDest(i.link,r);if(a&&a instanceof t.TFile){if(f){let t=i.position.end.line;if(t>=0&&t<l.length){let e=l[t].split(i.original);if(2===e.length){let t,r=e[1].trim(),i=new RegExp(s,"gm");for(;t=i.exec(r);)if(void 0!==t.groups&&void 0!==t.groups.value){let e=bo(t.groups.value.trim(),n.textValueMap);if(null!==e.value){u=e.value;break}}}}}for(let t=0;t<u;t++)e.push(a)}}}}}async postprocessor(e,n,r){const i=document.createElement("div");let a=e.trim(),l=this.app.vault.getConfig("tabSize"),o=Array(l).fill(" ").join("");a=a.replace(/\t/gm,o);let s=function(e,n){let r;try{r=t.parseYaml(e)}catch(t){let e="Error parsing YAML";return console.log(t),e}if(!r)return"Error parsing YAML";let i=_s(r),a="";if(!i.includes("searchTarget"))return"Parameter 'searchTarget' not found in YAML";let l=[];if("object"==typeof r.searchTarget&&null!==r.searchTarget){if(Array.isArray(r.searchTarget))for(let t of r.searchTarget)if("string"==typeof t){if(""===t){a="Empty search target is not allowed.";break}l.push(t)}}else if("string"==typeof r.searchTarget){let t=As(r.searchTarget);if(t.length>1)for(let e of t){if(e=e.trim(),""===e){a="Empty search target is not allowed.";break}l.push(e)}else""===r.searchTarget?a="Empty search target is not allowed.":l.push(r.searchTarget)}else a="Invalid search target (searchTarget)";for(let t=0;t<l.length;t++)l[t]=wo(l[t]);if(""!==a)return a;let o=l.length;if(!i.includes("searchType"))return"Parameter 'searchType' not found in YAML";let s=[],u=ks("searchType",r.searchType,o,"",ms,!1);if("string"==typeof u)return u;for(let t of u)switch(t.toLowerCase()){case"tag":s.push($l.Tag);break;case"frontmatter":s.push($l.Frontmatter);break;case"wiki":s.push($l.Wiki);break;case"wiki.link":s.push($l.WikiLink);break;case"wiki.display":s.push($l.WikiDisplay);break;case"text":s.push($l.Text);break;case"dvfield":s.push($l.dvField);break;case"table":s.push($l.Table);break;case"filemeta":s.push($l.FileMeta);break;case"task":case"task.all":s.push($l.Task);break;case"task.done":s.push($l.TaskDone);break;case"task.notdone":s.push($l.TaskNotDone)}if(s.includes($l.Table)&&s.filter((t=>t!==$l.Table)).length>0)return"searchType 'table' doesn't work with other types for now";let f=[],h=ks("separator",r.separator,o,"",null,!0);if("string"==typeof h)return h;f=h.map((t=>"comma"===t||"\\,"===t?",":t));let c=bs("xDataset",r.xDataset,o,-1);if("string"==typeof c)return c;let d=c.map((t=>t<0||t>=o?-1:t)),g=[];for(let t=0;t<l.length;t++){let e=new Hl(g.length,s[t],l[t]);e.setSeparator(f[t]),d.includes(t)&&(e.usedAsXDataset=!0),g.push(e)}let p=new jl(g),y=_s(p),m=["searchType","searchTarget","separator"],v=[],x=[],A=[],w=[],b=[],D=[],k=[];for(let t of i)/^line[0-9]*$/.test(t)&&(v.push(t),m.push(t)),/^bar[0-9]*$/.test(t)&&(x.push(t),m.push(t)),/^pie[0-9]*$/.test(t)&&(A.push(t),m.push(t)),/^summary[0-9]*$/.test(t)&&(w.push(t),m.push(t)),/^bullet[0-9]*$/.test(t)&&(k.push(t),m.push(t)),/^month[0-9]*$/.test(t)&&(b.push(t),m.push(t)),/^heatmap[0-9]*$/.test(t)&&(D.push(t),m.push(t));let C=[];for(let t of i)if(/^dataset[0-9]*$/.test(t)){let e=-1,n=t.replace("dataset","");if(e=""===n?0:parseFloat(n),g.some((t=>t.getId()===e)))return a="Duplicated dataset id for key '"+t+"'",a;C.push(t),m.push(t)}for(let t of i)if(!y.includes(t)&&!m.includes(t))return a="'"+t+"' is not an available key",a;if(0===v.length+x.length+A.length+w.length+k.length+b.length+D.length)return"No output parameter provided, please place line, bar, pie, month, bullet, or summary.";p.folder=Ds(null==r?void 0:r.folder,n.settings.folder),""===p.folder.trim()&&(p.folder=n.settings.folder);let T=n.app.vault.getAbstractFileByPath(t.normalizePath(p.folder));if(!(T&&T instanceof t.TFolder))return"Folder '"+p.folder+"' doesn't exist";if("string"==typeof r.file){let t=Ts("file",r.file);if("string"==typeof t)return t;p.file=t}if("boolean"==typeof r.specifiedFilesOnly&&(p.specifiedFilesOnly=r.specifiedFilesOnly),"string"==typeof r.fileContainsLinkedFiles){let t=Ts("fileContainsLinkedFiles",r.fileContainsLinkedFiles);if("string"==typeof t)return t;p.fileContainsLinkedFiles=t}p.fileMultiplierAfterLink=Ds(null==r?void 0:r.fileMultiplierAfterLink,p.fileMultiplierAfterLink);const M=r.dateFormat;if("string"==typeof r.dateFormat?""===r.dateFormat?p.dateFormat=n.settings.dateFormat:p.dateFormat=M:p.dateFormat=n.settings.dateFormat,p.dateFormatPrefix=Ds(null==r?void 0:r.dateFormatPrefix,p.dateFormatPrefix),p.dateFormatSuffix=Ds(null==r?void 0:r.dateFormatSuffix,p.dateFormatSuffix),"string"==typeof r.startDate){if(/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)m$/.test(r.startDate))return"'m' for 'minute' is too small for parameter startDate, please use 'd' for 'day' or 'M' for month";let t=fo(r.startDate,p.dateFormatPrefix,p.dateFormatSuffix),e=null,n=!1;if(e=po(t,p.dateFormat),e?n=!0:(e=ho(t,p.dateFormat),e.isValid()&&(n=!0)),!n||null===e)return"Invalid startDate, the format of startDate may not match your dateFormat "+p.dateFormat;p.startDate=e}if("string"==typeof r.endDate){if(/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)m$/.test(r.endDate))return"'m' for 'minute' is too small for parameter endDate, please use 'd' for 'day' or 'M' for month";let t=fo(r.endDate,p.dateFormatPrefix,p.dateFormatSuffix),e=null,n=!1;if(e=po(t,p.dateFormat),e?n=!0:(e=ho(t,p.dateFormat),e.isValid()&&(n=!0)),!n||null===e)return"Invalid endDate, the format of endDate may not match your dateFormat "+p.dateFormat;p.endDate=e}if(null!==p.startDate&&p.startDate.isValid()&&null!==p.endDate&&p.endDate.isValid()&&p.endDate<p.startDate)return"Invalid date range (startDate larger than endDate)";p.xDataset=d;let _=ks("datasetName",r.datasetName,o,"untitled",null,!0);if("string"==typeof _)return _;let E=0;for(let t=0;t<_.length;t++)p.xDataset.includes(t)||"untitled"===_[t]&&(_[t]="untitled"+E.toString(),E++);if(new Set(_).size!==_.length)return"Not enough dataset names or duplicated names";p.datasetName=_;let F=bs("constValue",r.constValue,o,1);if("string"==typeof F)return F;p.constValue=F;let S=ws("ignoreAttachedValue",r.ignoreAttachedValue,o,!1);if("string"==typeof S)return S;p.ignoreAttachedValue=S;let B=ws("ignoreZeroValue",r.ignoreZeroValue,o,!1);if("string"==typeof B)return B;p.ignoreZeroValue=B;let N=ws("accum",r.accum,o,!1);if("string"==typeof N)return N;p.accum=N,"boolean"==typeof r.stack&&(p.stack=r.stack);let L=bs("penalty",r.penalty,o,null);if("string"==typeof L)return L;p.penalty=L;let I=bs("valueShift",r.valueShift,o,0);if("string"==typeof I)return I;p.valueShift=I;let O=bs("shiftOnlyValueLargerThan",r.shiftOnlyValueLargerThan,o,null);if("string"==typeof O)return O;if(p.shiftOnlyValueLargerThan=O,void 0!==r.textValueMap){let t=_s(r.textValueMap);for(let e of t){let t=e.trim();p.textValueMap[t]=r.textValueMap[t]}}if("number"==typeof r.fixedScale&&(p.fixedScale=r.fixedScale),"boolean"==typeof r.fitPanelWidth&&(p.fitPanelWidth=r.fitPanelWidth),"string"==typeof r.aspectRatio){let t=/([0-9]*):([0-9]*)/,e=r.aspectRatio.match(t);e.shift(),e=e.map((t=>parseInt(t,10))),2==e.length&&(p.aspectRatio=new io(e[0],e[1]),p.dataAreaSize=p.aspectRatio.recalculateSize(p.dataAreaSize))}let V=bs("margin",r.margin,4,10);if("string"==typeof V)return V;if(V.length>4)return"margin accepts not more than four values for top, right, bottom, and left margins.";p.margin=new ao(V[0],V[1],V[2],V[3]);for(let t of C){let e=new ql,n=r[t],i=_s(e),l=_s(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let o=-1,s=t.replace("dataset","");o=""===s?0:parseFloat(s),e.id=o,e.name=Ds(null==n?void 0:n.name,e.name);let u=Ts("xData",null==n?void 0:n.xData);if("string"==typeof u)return u;e.xData=u;let f=e.xData.length,h=Ts("yData",null==n?void 0:n.yData);if("string"==typeof h)return h;if(e.yData=h,e.yData.length!==f)return"Number of elements in xData and yData not matched";p.customDataset.push(e)}for(let t of v){let e=new Ql,n=r[t],i=_s(e),l=_s(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let s=Ms(n,e);if("string"==typeof s)return s;let u=ks("lineColor",null==n?void 0:n.lineColor,o,"",xs,!0);if("string"==typeof u)return u;e.lineColor=u;let f=bs("lineWidth",null==n?void 0:n.lineWidth,o,1.5);if("string"==typeof f)return f;e.lineWidth=f;let h=ws("showLine",null==n?void 0:n.showLine,o,!0);if("string"==typeof h)return h;e.showLine=h;let c=ws("showPoint",null==n?void 0:n.showPoint,o,!0);if("string"==typeof c)return c;e.showPoint=c;let d=ks("pointColor",null==n?void 0:n.pointColor,o,"#69b3a2",xs,!0);if("string"==typeof d)return d;e.pointColor=d;let g=ks("pointBorderColor",null==n?void 0:n.pointBorderColor,o,"#69b3a2",xs,!0);if("string"==typeof g)return g;e.pointBorderColor=g;let y=bs("pointBorderWidth",null==n?void 0:n.pointBorderWidth,o,0);if("string"==typeof y)return y;e.pointBorderWidth=y;let m=bs("pointSize",null==n?void 0:n.pointSize,o,3);if("string"==typeof m)return m;e.pointSize=m;let v=ws("fillGap",null==n?void 0:n.fillGap,o,!1);if("string"==typeof v)return v;e.fillGap=v;let x=ks("yAxisLocation",null==n?void 0:n.yAxisLocation,o,"left",vs,!0);if("string"==typeof x)return x;e.yAxisLocation=x,p.line.push(e)}for(let t of x){let e=new Zl,n=r[t],i=_s(e),l=_s(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let s=Ms(n,e);if("string"==typeof s)return s;let u=ks("barColor",null==n?void 0:n.barColor,o,"",xs,!0);if("string"==typeof u)return u;e.barColor=u;let f=ks("yAxisLocation",null==n?void 0:n.yAxisLocation,o,"left",vs,!0);if("string"==typeof f)return f;e.yAxisLocation=f;let h=Ds(null==n?void 0:n.xAxisPadding,null);e.xAxisPadding=h,p.bar.push(e)}for(let t of A){let e=new Kl,n=r[t],i=_s(e),l=_s(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.title=Ds(null==n?void 0:n.title,e.title);let o=Ts("data",null==n?void 0:n.data);if("string"==typeof o)return o;e.data=o;let s=e.data.length,u=ks("dataColor",null==n?void 0:n.dataColor,s,null,xs,!0);if("string"==typeof u)return u;e.dataColor=u;let f=ks("dataName",null==n?void 0:n.dataName,s,"",null,!0);if("string"==typeof f)return f;e.dataName=f;let h=ks("label",null==n?void 0:n.label,s,"",null,!0);if("string"==typeof h)return h;e.label=h,"number"==typeof(null==n?void 0:n.hideLabelLessThan)&&(e.hideLabelLessThan=n.hideLabelLessThan);let c=ks("extLabel",null==n?void 0:n.extLabel,s,"",null,!0);if("string"==typeof c)return c;e.extLabel=c,"boolean"==typeof(null==n?void 0:n.showExtLabelOnlyIfNoLabel)&&(e.showExtLabelOnlyIfNoLabel=n.showExtLabelOnlyIfNoLabel),"number"==typeof(null==n?void 0:n.ratioInnerRadius)&&(e.ratioInnerRadius=n.ratioInnerRadius),"boolean"==typeof(null==n?void 0:n.showLegend)&&(e.showLegend=n.showLegend),e.legendPosition=Ds(null==n?void 0:n.legendPosition,"right");let d="horizontal";d="top"===e.legendPosition||"bottom"===e.legendPosition?"horizontal":"left"===e.legendPosition||"right"===e.legendPosition?"vertical":"horizontal",e.legendOrientation=Ds(null==n?void 0:n.legendOrientation,d),e.legendBgColor=Ds(null==n?void 0:n.legendBgColor,e.legendBgColor),e.legendBorderColor=Ds(null==n?void 0:n.legendBorderColor,e.legendBorderColor),p.pie.push(e)}for(let t of w){let e=new Jl,n=r[t],i=_s(e),l=_s(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.template=Ds(null==n?void 0:n.template,e.template),e.style=Ds(null==n?void 0:n.style,e.style),p.summary.push(e)}for(let t of b){let e=new to,n=r[t],i=_s(e),l=_s(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.mode=Ds(null==n?void 0:n.mode,e.mode);let o=Cs("dataset",null==n?void 0:n.dataset);if("string"==typeof o)return o;if(0===o.length)for(let t of g)o.push(t.getId());e.dataset=o;let s=e.dataset.length;e.startWeekOn=Ds(null==n?void 0:n.startWeekOn,e.startWeekOn),"boolean"==typeof(null==n?void 0:n.showCircle)&&(e.showCircle=n.showCircle);let u=Cs("threshold",null==n?void 0:n.threshold);if("string"==typeof u)return u;if(e.threshold=u,0===e.threshold.length)for(let t=0;t<s;t++)e.threshold.push(0);if(e.threshold.length!==e.dataset.length)return"The number of inputs of threshold and dataset not matched";let f=Ts("thresholdType",null==n?void 0:n.thresholdType);if("string"==typeof f)return f;if(e.thresholdType=f,0===e.thresholdType.length)for(let t=0;t<s;t++)e.thresholdType.push(zl.GreaterThan);if(e.thresholdType.length!==e.dataset.length)return"The number of inputs of thresholdType and dataset not matched";for(let t in e.thresholdType){if(!Object.values(zl).includes(e.thresholdType[t].toLowerCase()))return"thresholdType should be either 'GreaterThan' or 'LessThan'";e.thresholdType[t]=e.thresholdType[t].toLowerCase()}let h=Cs("yMin",null==n?void 0:n.yMin);if("string"==typeof h)return h;if(e.yMin=h,0===e.yMin.length)for(let t=0;t<s;t++)e.yMin.push(null);if(e.yMin.length!==e.dataset.length)return"The number of inputs of yMin and dataset not matched";let c=Cs("yMax",null==n?void 0:n.yMax);if("string"==typeof c)return c;if(e.yMax=c,0===e.yMax.length)for(let t=0;t<s;t++)e.yMax.push(null);if(e.yMax.length!==e.dataset.length)return"The number of inputs of yMin and dataset not matched";e.color=Ds(null==n?void 0:n.color,e.color),"boolean"==typeof(null==n?void 0:n.dimNotInMonth)&&(e.dimNotInMonth=n.dimNotInMonth),"boolean"==typeof(null==n?void 0:n.showStreak)&&(e.showStreak=n.showStreak),"boolean"==typeof(null==n?void 0:n.showTodayRing)&&(e.showTodayRing=n.showTodayRing),"boolean"==typeof(null==n?void 0:n.showSelectedValue)&&(e.showSelectedValue=n.showSelectedValue),"boolean"==typeof(null==n?void 0:n.showSelectedRing)&&(e.showSelectedRing=n.showSelectedRing),e.circleColor=Ds(null==n?void 0:n.circleColor,e.circleColor),"boolean"==typeof(null==n?void 0:n.circleColorByValue)&&(e.circleColorByValue=n.circleColorByValue),e.headerYearColor=Ds(null==n?void 0:n.headerYearColor,e.headerYearColor),e.headerMonthColor=Ds(null==n?void 0:n.headerMonthColor,e.headerMonthColor),e.dividingLineColor=Ds(null==n?void 0:n.dividingLineColor,e.dividingLineColor),e.todayRingColor=Ds(null==n?void 0:n.todayRingColor,e.todayRingColor),e.selectedRingColor=Ds(null==n?void 0:n.selectedRingColor,e.selectedRingColor),e.initMonth=Ds(null==n?void 0:n.initMonth,e.initMonth),"boolean"==typeof(null==n?void 0:n.showAnnotation)&&(e.showAnnotation=n.showAnnotation);let d=Ts("annotation",null==n?void 0:n.annotation);if("string"==typeof d)return d;if(e.annotation=d,0===e.annotation.length)for(let t=0;t<s;t++)e.annotation.push(null);if(e.annotation.length!==e.dataset.length)return"The number of inputs of annotation and dataset not matched";"boolean"==typeof(null==n?void 0:n.showAnnotationOfAllTargets)&&(e.showAnnotationOfAllTargets=n.showAnnotationOfAllTargets),p.month.push(e)}for(let t of D){let e=new eo,n=r[t],i=_s(e),l=_s(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;p.heatmap.push(e)}for(let t of k){let e=new no,n=r[t],i=_s(e),l=_s(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.title=Ds(null==n?void 0:n.title,e.title),e.dataset=Ds(null==n?void 0:n.dataset,e.dataset),e.orientation=Ds(null==n?void 0:n.orientation,e.orientation);let o=Cs("range",null==n?void 0:n.range);if("string"==typeof o)return o;let s=o;if(1===s.length){if(s[0]<0)return a="Negative range value is not allowed",a}else{if(!(s.length>1))return a="Empty range is not allowed",a;{let t=s[0];if(t<0)return a="Negative range value is not allowed",a;for(let e=1;e<s.length;e++)if(s[e]<=t)return a="Values in parameter 'range' should be monotonically increasing",a}}e.range=s;let u=s.length,f=ks("rangeColor",null==n?void 0:n.rangeColor,u,"",xs,!0);if("string"==typeof f)return f;e.rangeColor=f,e.value=Ds(null==n?void 0:n.value,e.value),e.valueUnit=Ds(null==n?void 0:n.valueUnit,e.valueUnit),e.valueColor=Ds(null==n?void 0:n.valueColor,e.valueColor),"boolean"==typeof(null==n?void 0:n.showMarker)&&(e.showMarker=n.showMarker),"number"==typeof(null==n?void 0:n.markerValue)&&(e.markerValue=n.markerValue),e.markerColor=Ds(null==n?void 0:n.markerColor,e.markerColor),p.bullet.push(e)}return p}(a,this);if("string"==typeof s)return this.renderErrorMessage(s,i,n);let u=s,f=[];try{await this.getFiles(f,u)}catch(t){return this.renderErrorMessage(t.message,i,n)}if(0===f.length)return this.renderErrorMessage("No markdown files found in folder",i,n);let h=new Map,c=new so;c.fileTotal=f.length;const d=f.map((async t=>{let e=null;u.queries.some((t=>{let e=t.getType();return t.getTarget(),e===$l.Frontmatter||e===$l.Tag||e===$l.Wiki||e===$l.WikiLink||e===$l.WikiDisplay}))&&(e=this.app.metadataCache.getFileCache(t));let n=null;u.queries.some((t=>{let e=t.getType(),n=t.getTarget();return e===$l.Tag||e===$l.Text||e===$l.dvField||e===$l.Task||e===$l.TaskDone||e===$l.TaskNotDone||e===$l.FileMeta&&("numWords"===n||"numChars"===n||"numSentences"===n)}))&&(n=await this.app.vault.adapter.read(t.path));let r=new Map,i=!1;for(let a of u.xDataset)if(!r.has(a)){let l=window.moment("");if(-1===a)l=Es(t,u);else{let r=u.queries[a];switch(r.getType()){case $l.Frontmatter:l=Fs(e,r,u);break;case $l.Tag:l=Bs(n,r,u);break;case $l.Text:l=Ns(n,r,u);break;case $l.dvField:l=Ls(n,r,u);break;case $l.FileMeta:l=Is(t,r,u);break;case $l.Task:case $l.TaskDone:case $l.TaskNotDone:l=Os(n,r,u)}}l.isValid()?(null!==u.startDate&&l<u.startDate&&(i=!0,c.fileOutOfDateRange++),null!==u.endDate&&l>u.endDate&&(i=!0,c.fileOutOfDateRange++)):(i=!0,c.fileNotInFormat++),i||(c.gotAnyValidXValue||(c.gotAnyValidXValue=!0),r.set(a,yo(l,u.dateFormat)),c.fileAvailable++,1==c.fileAvailable?(c.minDate=l.clone(),c.maxDate=l.clone()):(l<c.minDate&&(c.minDate=l.clone()),l>c.maxDate&&(c.maxDate=l.clone())))}if(i)return;const a=u.queries.filter((t=>t.getType()!==$l.Table&&!t.usedAsXDataset)).map((async i=>{if(e&&i.getType()===$l.Tag){let t=function(t,e,n,r,i){let a=t.frontmatter,l=[];if(a&&a.tags){let t=0,o=!1;if(Array.isArray(a.tags))l=l.concat(a.tags);else if("string"==typeof a.tags){let t=a.tags.split(e.getSeparator(!0));for(let e of t){let t=e.trim();""!==t&&l.push(t)}}for(let a of l){if(a===e.getTarget())t+=n.constValue[e.getId()],o=!0,e.addNumTargets();else{if(!a.startsWith(e.getTarget()+"/"))continue;t+=n.constValue[e.getId()],o=!0,e.addNumTargets()}let l=null;return o&&(l=t),Vs(r,i.get(n.xDataset[e.getId()]),e,l),!0}}return!1}(e,i,u,h,r);c.gotAnyValidYValue||(c.gotAnyValidYValue=t)}if(e&&i.getType()===$l.Frontmatter&&"tags"!==i.getTarget()){let t=function(t,e,n,r,i){let a=t.frontmatter;if(a){let t=xo(a,e.getTarget());if(t){let a=bo(t,n.textValueMap);if(null===a.value&&("true"!==t&&"false"!==t||(a.type=Rl.Number,a.value="true"===t?1:0)),null!==a.value)return a.type===Rl.Time&&(e.valueType=Rl.Time),e.addNumTargets(),Vs(r,i.get(n.xDataset[e.getId()]),e,a.value),!0}else if(e.getParentTarget()&&xo(a,e.getParentTarget())){let t=xo(a,e.getParentTarget()),l=null;if(Array.isArray(t)?l=t.map((t=>t.toString())):"string"==typeof t&&(l=t.split(e.getSeparator())),l&&l.length>e.getAccessor()&&e.getAccessor()>=0){let t=bo(l[e.getAccessor()].trim(),n.textValueMap);if(null!==t.value)return t.type===Rl.Time&&(e.valueType=Rl.Time),e.addNumTargets(),Vs(r,i.get(n.xDataset[e.getId()]),e,t.value),!0}}}return!1}(e,i,u,h,r);c.gotAnyValidYValue||(c.gotAnyValidYValue=t)}if(e&&(i.getType()===$l.Wiki||i.getType()===$l.WikiLink||i.getType()===$l.WikiDisplay)){let t=function(t,e,n,r,i){let a=t.links;if(!a)return!1;let l=e.getTarget(),o=e.getType(),s="",u=l;for(let t of a){if(!t)continue;let e="";o===$l.Wiki?e=t.displayText?t.displayText:t.link:o===$l.WikiLink?e=t.link:o===$l.WikiDisplay?t.displayText&&(e=t.displayText):e=t.displayText?t.displayText:t.link,e=e.trim(),s+=e+"\n"}return Ps(s,u,e,r,i,n)}(e,i,u,h,r);c.gotAnyValidYValue||(c.gotAnyValidYValue=t)}if(n&&i.getType()===$l.Tag){let t=function(t,e,n,r,i){let a=e.getTarget();return e.getParentTarget()&&(a=e.getParentTarget()),a.length>1&&a.startsWith("#")&&(a=a.substring(1)),Ps(t,"(^|\\s)#"+a+"(\\/[\\w-]+)*(:(?<value>[\\d\\.\\/-]*)[a-zA-Z]*)?([\\.!,\\?;~-]*)?(\\s|$)",e,r,i,n)}(n,i,u,h,r);c.gotAnyValidYValue||(c.gotAnyValidYValue=t)}if(n&&i.getType()===$l.Text){let t=function(t,e,n,r,i){return Ps(t,e.getTarget(),e,r,i,n)}(n,i,u,h,r);c.gotAnyValidYValue||(c.gotAnyValidYValue=t)}if(i.getType()===$l.FileMeta){let e=$s(t,n,i,u,h,r);c.gotAnyValidYValue||(c.gotAnyValidYValue=e)}if(n&&i.getType()===$l.dvField){let t=function(t,e,n,r,i){let a=e.getTarget();return e.getParentTarget()&&(a=e.getParentTarget()),a=a.replace("-","[\\s\\-]"),Ps(t,String.raw`(^| |\t|\|)(\[|\()?\*{0,2}`+a+String.raw`\*{0,2}(::[ |\t]*(?<value>[\p{ExtPict}\d\.\/\-\w,@; \t:`+"\\w$€£¥¢₹₨₱₩฿₫₪α-ωΑ-Ω©®℗™℠一-鿿㐀-䶿 、-〿"+String.raw`]*)(\]|\))?)`,e,r,i,n)}(n,i,u,h,r);c.gotAnyValidYValue||(c.gotAnyValidYValue=t)}if(n&&(i.getType()===$l.Task||i.getType()===$l.TaskDone||i.getType()===$l.TaskNotDone)){let t=function(t,e,n,r,i){let a=e.getType(),l=e.getTarget();return l=a===$l.Task?"\\[[\\sx]\\]\\s"+l:a===$l.TaskDone?"\\[x\\]\\s"+l:a===$l.TaskNotDone?"\\[\\s\\]\\s"+l:"\\[[\\sx]\\]\\s"+l,Ps(t,l,e,r,i,n)}(n,i,u,h,r);c.gotAnyValidYValue||(c.gotAnyValidYValue=t)}}));await Promise.all(a)}));if(await Promise.all(d),await this.collectDataFromTable(h,u,c),c.errorMessage)return this.renderErrorMessage(c.errorMessage,i,n);let g="";if(c.minDate.isValid()&&c.maxDate.isValid()&&0!==c.fileAvailable&&c.gotAnyValidXValue||(g="No valid date as X value found in notes",c.fileOutOfDateRange>0&&(g+=`\n${c.fileOutOfDateRange} files are out of the date range.`),c.fileNotInFormat&&(g+=`\n${c.fileNotInFormat} files are not in the right format.`)),null===u.startDate&&null===u.endDate?(u.startDate=c.minDate.clone(),u.endDate=c.maxDate.clone()):null!==u.startDate&&null===u.endDate?u.startDate<c.maxDate?u.endDate=c.maxDate.clone():g="Invalid date range":null!==u.endDate&&null===u.startDate?u.endDate>c.minDate?u.startDate=c.minDate.clone():g="Invalid date range":(u.startDate<c.minDate&&u.endDate<c.minDate||u.startDate>c.maxDate&&u.endDate>c.maxDate)&&(g="Invalid date range"),g)return this.renderErrorMessage(g,i,n);if(!c.gotAnyValidYValue)return this.renderErrorMessage("No valid Y value found in notes",i,n);let p=new Wl(u.startDate,u.endDate);for(let t of u.queries){let e=p.createDataset(t,u);e.addNumTargets(t.getNumTargets());for(let n=u.startDate.clone();n<=u.endDate;n.add(1,"days"))if(h.has(yo(n,u.dateFormat))){let r=h.get(yo(n,u.dateFormat)).filter((function(e){return e.query.equalTo(t)}));if(r.length>0){let t=null;for(let e=0;e<r.length;e++){let n=r[e].value;Number.isNumber(n)&&!Number.isNaN(n)&&(null===t?t=n:t+=n)}null!==t&&e.setValue(n,t)}}}u.datasets=p;let y=function(t,e){for(let t of e.datasets){if(t.getQuery().usedAsXDataset)continue;let n=e.valueShift[t.getId()];null!==n&&0!==n&&t.shift(n,e.shiftOnlyValueLargerThan[t.getId()]),null!==e.penalty[t.getId()]&&t.setPenalty(e.penalty[t.getId()]),e.accum[t.getId()]&&t.accumulateValues()}if(e.stack){let t=null;for(let n of e.datasets)n.getQuery().usedAsXDataset||(t&&n.shiftByDataset(t),t=n)}for(let n of e.line){let r=gs(t,e,n);if("string"==typeof r)return r}for(let n of e.bar){let r=ps(t,e,n);if("string"==typeof r)return r}for(let n of e.pie){let r=Wo(t,e,n);if("string"==typeof r)return r}for(let n of e.summary){let r=jo(t,e,n);if("string"==typeof r)return r}for(let n of e.bullet){let r=is(t,e,n);if("string"==typeof r)return r}for(let n of e.month){let r=ns(t,e,n);if("string"==typeof r)return r}for(let t of e.heatmap){let t=rs(0,e);if("string"==typeof t)return t}}(i,u);if("string"==typeof y)return this.renderErrorMessage(y,i,n);n.appendChild(i)}async collectDataFromTable(e,n,r){let i=n.queries.filter((t=>t.getType()===$l.Table)),a=[],l=!1;for(let e of i){let n=e.getParentTarget(),r=this.app.vault.getAbstractFileByPath(t.normalizePath(n+".md"));if(!(r&&r instanceof t.TFile)){l=!0;break}let i=e.getAccessor(),o=e.usedAsXDataset,s=a.find((t=>t.filePath===n&&t.tableIndex===i));if(s)o?s.xDataset=e:s.yDatasets.push(e);else{let t=new oo(n,i);o?t.xDataset=e:t.yDatasets.push(e),a.push(t)}}if(l)r.errorMessage="File containing tables not found";else for(let i of a){let a=i.xDataset;if(!a)continue;let l=i.yDatasets,o=a.getParentTarget(),s=a.getAccessor(),u="";o+=".md";let f=this.app.vault.getAbstractFileByPath(t.normalizePath(o));if(!(f&&f instanceof t.TFile))continue;{r.fileAvailable++;let t,e=await this.app.vault.adapter.read(f.path),n=new RegExp("((\\r?\\n){2}|^)([^\\r\\n]*\\|[^\\r\\n]*(\\r?\\n)?)+(?=(\\r?\\n){2}|$)","gm"),i=0;for(;t=n.exec(e);){if(i===s){u=t[0];break}i++}}let h=u.split(/\r?\n/);h=h.filter((t=>""!==t));let c=0,d=0;if(h.length>=2){let t=h.shift().trim();t=Ao(t,"|"),c=t.split("|").length;let e=h.shift().trim();e=Ao(e,"|");let n=e.split("|");for(let t of n)if(!t.includes("-"))break;d=h.length}if(0==d)continue;let g=a.getAccessor(1);if(g>=c)continue;let p=[];for(let t of h){let e=Ao(t.trim(),"|").split("|");if(g<e.length){let t=ho(e[g].trim(),n.dateFormat);t.isValid()?(p.push(t),r.minDate.isValid()||r.maxDate.isValid()?(t<r.minDate&&(r.minDate=t.clone()),t>r.maxDate&&(r.maxDate=t.clone())):(r.minDate=t.clone(),r.maxDate=t.clone())):p.push(null)}else p.push(null)}if(p.every((t=>null===t)))return void(r.errorMessage="No valid date as X value found in table");r.gotAnyValidXValue||(r.gotAnyValidXValue=!0);for(let t of l){let i=t.getAccessor(1);if(i>=c)continue;let a=0;for(let l of h){let o=Ao(l.trim(),"|").split("|");if(i<o.length){let l=o[i].trim().split(t.getSeparator());if(!l)continue;if(1===l.length){let i=bo(l[0],n.textValueMap);if(null!==i.value){i.type===Rl.Time&&(t.valueType=Rl.Time);let l=i.value;a<p.length&&p[a]&&(r.gotAnyValidYValue||(r.gotAnyValidYValue=!0),Vs(e,yo(p[a],n.dateFormat),t,l))}}else if(l.length>t.getAccessor(2)&&t.getAccessor(2)>=0){let i=null,o=bo(l[t.getAccessor(2)].trim(),n.textValueMap);null!==o.value&&(o.type===Rl.Time&&(t.valueType=Rl.Time),i=o.value,a<p.length&&p[a]&&(r.gotAnyValidYValue||(r.gotAnyValidYValue=!0),Vs(e,yo(p[a],n.dateFormat),t,i)))}}a++}}}}getEditor(){return this.app.workspace.getActiveViewOfType(t.MarkdownView).editor}addCodeBlock(e){if(!(this.app.workspace.activeLeaf.view instanceof t.MarkdownView))return;let n="";switch(e){case Yl.Line:n='``` tracker\nsearchType: tag\nsearchTarget: tagName\nfolder: /\nstartDate:\nendDate:\nline:\n title: "Line Chart"\n xAxisLabel: Date\n yAxisLabel: Value\n```';break;case Yl.Bar:n='``` tracker\nsearchType: tag\nsearchTarget: tagName\nfolder: /\nstartDate:\nendDate:\nbar:\n title: "Bar Chart"\n xAxisLabel: Date\n yAxisLabel: Value\n```';break;case Yl.Summary:n='``` tracker\nsearchType: tag\nsearchTarget: tagName\nfolder: /\nstartDate:\nendDate:\nsummary:\n template: "Average value of tagName is {{average()}}"\n style: "color:white;"\n```'}""!==n&&this.insertToNextLine(n)}insertToNextLine(t){let e=this.getEditor();if(e){let n=e.getCursor(),r=n.line,i=e.getLine(r);return n.ch=i.length,e.setSelection(n),e.replaceSelection("\n"+t),!0}return!1}}module.exports=zs; /* nosourcemap */ \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-tracker/manifest.json b/.obsidian/plugins/obsidian-tracker/manifest.json index 8046462..ccb0aaa 100644 --- a/.obsidian/plugins/obsidian-tracker/manifest.json +++ b/.obsidian/plugins/obsidian-tracker/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-tracker", "name": "Tracker", - "version": "1.15.1", + "version": "1.16.0", "minAppVersion": "0.9.12", "description": "A plugin tracks occurrences and numbers in your notes", "author": "pyrochlore",