2022-01-05 20:52:55 +00:00
/ *
THIS IS A GENERATED / BUNDLED FILE BY ESBUILD
if you want to view the source visit the plugins github repository
* /
2022-08-23 16:25:36 +00:00
const requestAnimationFrame = ( cb ) => activeWindow . requestAnimationFrame ( cb ) ;
const cancelAnimationFrame = ( id ) => activeWindow . cancelAnimationFrame ( id ) ;
const setTimeout = ( ... args ) => activeWindow . setTimeout ( ... args ) ;
const clearTimeout = ( id ) => activeWindow . clearTimeout ( id ) ;
2022-01-05 20:52:55 +00:00
2022-09-18 14:03:25 +00:00
var UE = Object . create ; var eo = Object . defineProperty ; var WE = Object . getOwnPropertyDescriptor ; var VE = Object . getOwnPropertyNames ; var zE = Object . getPrototypeOf , jE = Object . prototype . hasOwnProperty ; var kf = e => eo ( e , "__esModule" , { value : ! 0 } ) ; var El = ( e , t ) => ( ) => ( e && ( t = e ( e = 0 ) ) , t ) ; var ft = ( e , t ) => ( ) => ( t || e ( ( t = { exports : { } } ) . exports , t ) , t . exports ) , zi = ( e , t ) => { kf ( e ) ; for ( var r in t ) eo ( e , r , { get : t [ r ] , enumerable : ! 0 } ) } , qE = ( e , t , r ) => { if ( t && typeof t == "object" || typeof t == "function" ) for ( let n of VE ( t ) ) ! jE . call ( e , n ) && n !== "default" && eo ( e , n , { get : ( ) => t [ n ] , enumerable : ! ( r = WE ( t , n ) ) || r . enumerable } ) ; return e } , ge = e => qE ( kf ( eo ( e != null ? UE ( zE ( e ) ) : { } , "default" , e && e . _ _esModule && "default" in e ? { get : ( ) => e . default , enumerable : ! 0 } : { value : e , enumerable : ! 0 } ) ) , e ) ; function Wn ( e , t ) { for ( var r in t ) e [ r ] = t [ r ] ; return e } function Mf ( e ) { var t = e . parentNode ; t && t . removeChild ( e ) } function g ( e , t , r ) { var n , i , a , o = { } ; for ( a in t ) a == "key" ? n = t [ a ] : a == "ref" ? i = t [ a ] : o [ a ] = t [ a ] ; if ( arguments . length > 2 && ( o . children = arguments . length > 3 ? ji . call ( arguments , 2 ) : r ) , typeof e == "function" && e . defaultProps != null ) for ( a in e . defaultProps ) o [ a ] === void 0 && ( o [ a ] = e . defaultProps [ a ] ) ; return Yi ( e , o , n , i , null ) } function Yi ( e , t , r , n , i ) { var a = { type : e , props : t , key : r , ref : n , _ _k : null , _ _ : null , _ _b : 0 , _ _e : null , _ _d : void 0 , _ _c : null , _ _h : null , constructor : void 0 , _ _v : i ? ? ++ Sf } ; return i == null && fe . vnode != null && fe . vnode ( a ) , a } function ei ( ) { return { current : null } } function S ( e ) { return e . children } function pt ( e , t ) { this . props = e , this . context = t } function ti ( e , t ) { if ( t == null ) return e . _ _ ? ti ( e . _ _ , e . _ _ . _ _k . indexOf ( e ) + 1 ) : null ; for ( var r ; t < e . _ _k . length ; t ++ ) if ( ( r = e . _ _k [ t ] ) != null && r . _ _e != null ) return r . _ _e ; return typeof e . type == "function" ? ti ( e ) : null } function If ( e ) { var t , r ; if ( ( e = e . _ _ ) != null && e . _ _c != null ) { for ( e . _ _e = e . _ _c . base = null , t = 0 ; t < e . _ _k . length ; t ++ ) if ( ( r = e . _ _k [ t ] ) != null && r . _ _e != null ) { e . _ _e = e . _ _c . base = r . _ _e ; break } return If ( e ) } } function xl ( e ) { ( ! e . _ _d && ( e . _ _d = ! 0 ) && qi . push ( e ) && ! no . _ _r ++ || Cf !== fe . debounceRendering ) && ( ( Cf = fe . debounceRendering ) || _f ) ( no ) } function no ( ) { for ( var e ; no . _ _r = qi . length ; ) e = qi . sort ( function ( t , r ) { return t . _ _v . _ _b - r . _ _v . _ _b } ) , qi = [ ] , e . some ( function ( t ) { var r , n , i , a , o , s ; t . _ _d && ( o = ( a = ( r = t ) . _ _v ) . _ _e , ( s = r . _ _P ) && ( n = [ ] , ( i = Wn ( { } , a ) ) . _ _v = a . _ _v + 1 , kl ( s , a , i , r . _ _n , s . ownerSVGElement !== void 0 , a . _ _h != null ? [ o ] : null , n , o ? ? ti ( a ) , a . _ _h ) , Rf ( n , a ) , a . _ _e != o && If ( a ) ) ) } ) } function Af ( e , t , r , n , i , a , o , s , u , l ) { var c , d , f , p , m , y , b , x = n && n . _ _k || Df , D = x . length ; for ( r . _ _k = [ ] , c = 0 ; c < t . length ; c ++ ) if ( ( p = r . _ _k [ c ] = ( p = t [ c ] ) == null || typeof p == "boolean" ? null : typeof p == "string" || typeof p == "number" || typeof p == "bigint" ? Yi ( null , p , null , null , p ) : Array . isArray ( p ) ? Yi ( S , { children : p } , null , null , null ) : p . _ _b > 0 ? Yi ( p . type , p . props , p . key , null , p . _ _v ) : p ) != null ) { if ( p . _ _ = r , p . _ _b = r . _ _b + 1 , ( f = x [ c ] ) === null || f && p . key == f . key && p . type === f . type ) x [ c ] = void 0 ; else for ( d = 0 ; d < D ; d ++ ) { if ( ( f = x [ d ] ) && p . key == f . key && p . type === f . type ) { x [ d ] = void 0 ; break } f = null } kl ( e , p , f = f || to , i , a , o , s , u , l ) , m = p . _ _e , ( d = p . ref ) && f . ref != d && ( b || ( b = [ ] ) , f . ref && b . push ( f . ref , null , p ) , b . push ( d , p . _ _c || m , p ) ) , m != null ? ( y == null && ( y = m ) , typeof p . type == "function" && p . _ _k === f . _ _k ? p . _ _d = u = Lf ( p , u , e ) : u = Pf ( e , p , f , x , m , u ) , typeof r . type == "function" && ( r . _ _d = u ) ) : u && f . _ _e == u && u . parentNode != e && ( u = ti ( f ) ) } for ( r . _ _e = y , c = D ; c -- ; ) x [ c ] != null && ( typeof r . type == "function" && x [ c ] . _ _e != null && x [ c ] . _ _e == r . _ _d && ( r . _ _d = ti ( n , c + 1 ) ) , Bf ( x [ c ] , x [ c ] ) ) ; if ( b ) for ( c = 0 ; c < b . length ; c ++ ) Hf ( b [ c ] , b [ ++ c ] , b [ ++ c ] ) } function Lf ( e , t , r ) { for ( var n , i = e . _ _k , a = 0 ; i && a < i . length ; a ++ ) ( n = i [ a ] ) && ( n . _ _ = e , t = typeof n . type == "function" ? Lf ( n , t , r ) : Pf ( r , n , n , i , n . _ _e , t ) ) ; return t } function wt ( e , t ) { return t = t || [ ] , e == null || typeof e == "boolean" || ( Array . isArray ( e ) ? e . some ( function ( r ) { wt ( r , t ) } ) : t . push ( e ) ) , t } function Pf ( e , t , r , n , i , a ) { var o , s , u ; if ( t . _ _d !== void 0 ) o = t . _ _d , t . _ _d = void 0 ; else if ( r == null || i != a || i . parentNode == null ) e : if ( a == null || a . parentNode !== e ) e . appendChild ( i ) , o = null ; else { for ( s = a , u = 0 ; ( s = s . nextSibling ) && u < n . length ; u += 2 ) if ( s == i ) break e ; e . insertBefore ( i , a ) , o = a } return o !== void 0 ? o : i . nextSibling } function GE ( e , t , r , n , i ) { var a ; for ( a in r ) a === "children" || a === "key" || a in t || ro ( e , a , null , r [ a ] , n ) ; for ( a in t ) i && typeof t [ a ] != "function" || a === "children" || a === "key" || a === "value" || a === "checked" || r [ a ] === t [ a ] || ro ( e , a , t [ a ] , r [ a ] , n ) } function Ff ( e , t , r ) { t [ 0 ] === "-" ? e . setProperty ( t , r ) : e [ t ] = r == null ? "" : ty
Search pattern : "`.concat(b,'" ' ) ) ; var D = this . _prepareSearchers ( b ) , C = D . tokenSearchers , A = D . fullSearcher , N = this . _search ( C , A ) , T = N . weights , O = N . results ; return this . _computeScore ( T , O ) , this . options . shouldSort && this . _sort ( O ) , x . limit && typeof x . limit == "number" && ( O = O . slice ( 0 , x . limit ) ) , this . _format ( O ) } } , { key : "_prepareSearchers" , value : function ( ) { var b = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : "" , x = [ ] ; if ( this . options . tokenize ) for ( var D = b . split ( this . options . tokenSeparator ) , C = 0 , A = D . length ; C < A ; C += 1 ) x . push ( new u ( D [ C ] , this . options ) ) ; return { tokenSearchers : x , fullSearcher : new u ( b , this . options ) } } } , { key : "_search" , value : function ( ) { var b = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : [ ] , x = arguments . length > 1 ? arguments [ 1 ] : void 0 , D = this . list , C = { } , A = [ ] ; if ( typeof D [ 0 ] == "string" ) { for ( var N = 0 , T = D . length ; N < T ; N += 1 ) this . _analyze ( { key : "" , value : D [ N ] , record : N , index : N } , { resultMap : C , results : A , tokenSearchers : b , fullSearcher : x } ) ; return { weights : null , results : A } } for ( var O = { } , W = 0 , z = D . length ; W < z ; W += 1 ) for ( var ee = D [ W ] , Z = 0 , le = this . options . keys . length ; Z < le ; Z += 1 ) { var X = this . options . keys [ Z ] ; if ( typeof X != "string" ) { if ( O [ X . name ] = { weight : 1 - X . weight || 1 } , X . weight <= 0 || X . weight > 1 ) throw new Error ( "Key weight has to be > 0 and <= 1" ) ; X = X . name } else O [ X ] = { weight : 1 } ; this . _analyze ( { key : X , value : this . options . getFn ( ee , X ) , record : ee , index : W } , { resultMap : C , results : A , tokenSearchers : b , fullSearcher : x } ) } return { weights : O , results : A } } } , { key : "_analyze" , value : function ( b , x ) { var D = b . key , C = b . arrayIndex , A = C === void 0 ? - 1 : C , N = b . value , T = b . record , O = b . index , W = x . tokenSearchers , z = W === void 0 ? [ ] : W , ee = x . fullSearcher , Z = ee === void 0 ? [ ] : ee , le = x . resultMap , X = le === void 0 ? { } : le , G = x . results , re = G === void 0 ? [ ] : G ; if ( N != null ) { var pe = ! 1 , he = - 1 , ve = 0 ; if ( typeof N == "string" ) { this . _log ( `
Key : ` .concat(D===""?"-":D));var be=Z.search(N);if(this._log('Full text: "'.concat(N,'", score: ').concat(be.score)),this.options.tokenize){for(var De=N.split(this.options.tokenSeparator),L=[],P=0;P<z.length;P+=1){var ct=z[P];this._log( `
Pattern : "`.concat(ct.pattern,'" '));for(var Je=!1,V=0;V<De.length;V+=1){var j=De[V],q=ct.search(j),te={};q.isMatch?(te[j]=q.score,pe=!0,Je=!0,L.push(q.score)):(te[j]=1,this.options.matchAllTokens||L.push(1)),this._log(' Token : "'.concat(j,'" , score : ' ) . concat ( te [ j ] ) ) } Je && ( ve += 1 ) } he = L [ 0 ] ; for ( var we = L . length , ke = 1 ; ke < we ; ke += 1 ) he += L [ ke ] ; he /= we , this . _log ( "Token score average:" , he ) } var Ue = be . score ; he > - 1 && ( Ue = ( Ue + he ) / 2 ) , this . _log ( "Score average:" , Ue ) ; var ut = ! this . options . tokenize || ! this . options . matchAllTokens || ve >= z . length ; if ( this . _log ( `
Check Matches : ` .concat(ut)),(pe||be.isMatch)&&ut){var vt=X[O];vt?vt.output.push({key:D,arrayIndex:A,value:N,score:Ue,matchedIndices:be.matchedIndices}):(X[O]={item:T,output:[{key:D,arrayIndex:A,value:N,score:Ue,matchedIndices:be.matchedIndices}]},re.push(X[O]))}}else if(c(N))for(var Nt=0,Bn=N.length;Nt<Bn;Nt+=1)this._analyze({key:D,arrayIndex:Nt,value:N[Nt],record:T,index:O},{resultMap:X,results:re,tokenSearchers:z,fullSearcher:Z})}}},{key:"_computeScore",value:function(b,x){this._log( `
2022-01-05 20:52:55 +00:00
Computing score :
2022-09-18 14:03:25 +00:00
` );for(var D=0,C=x.length;D<C;D+=1){for(var A=x[D].output,N=A.length,T=1,O=1,W=0;W<N;W+=1){var z=b?b[A[W].key].weight:1,ee=(z===1?A[W].score:A[W].score||.001)*z;z!==1?O=Math.min(O,ee):(A[W].nScore=ee,T*=ee)}x[D].score=O===1?T:O,this._log(x[D])}}},{key:"_sort",value:function(b){this._log( `
2022-01-05 20:52:55 +00:00
2022-09-18 14:03:25 +00:00
Sorting ... . ` ),b.sort(this.options.sortFn)}},{key:"_format",value:function(b){var x=[];if(this.options.verbose){var D=[];this._log( `
2022-01-05 20:52:55 +00:00
Output :
2022-09-18 14:03:25 +00:00
` ,JSON.stringify(b,function(ee,Z){if(o(Z)==="object"&&Z!==null){if(D.indexOf(Z)!==-1)return;D.push(Z)}return Z})),D=null}var C=[];this.options.includeMatches&&C.push(function(ee,Z){var le=ee.output;Z.matches=[];for(var X=0,G=le.length;X<G;X+=1){var re=le[X];if(re.matchedIndices.length!==0){var pe={indices:re.matchedIndices,value:re.value};re.key&&(pe.key=re.key),re.hasOwnProperty("arrayIndex")&&re.arrayIndex>-1&&(pe.arrayIndex=re.arrayIndex),Z.matches.push(pe)}}}),this.options.includeScore&&C.push(function(ee,Z){Z.score=ee.score});for(var A=0,N=b.length;A<N;A+=1){var T=b[A];if(this.options.id&&(T.item=this.options.getFn(T.item,this.options.id)[0]),C.length){for(var O={item:T.item},W=0,z=C.length;W<z;W+=1)C[W](T,O);x.push(O)}else x.push(T.item)}return x}},{key:"_log",value:function(){var b;this.options.verbose&&(b=console).log.apply(b,arguments)}}])&&s(p.prototype,m),y&&s(p,y),f}();n.exports=d},function(n,i,a){function o(d,f){for(var p=0;p<f.length;p++){var m=f[p];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}var s=a(3),u=a(4),l=a(7),c=function(){function d(y,b){var x=b.location,D=x===void 0?0:x,C=b.distance,A=C===void 0?100:C,N=b.threshold,T=N===void 0?.6:N,O=b.maxPatternLength,W=O===void 0?32:O,z=b.isCaseSensitive,ee=z!==void 0&&z,Z=b.tokenSeparator,le=Z===void 0?/ +/g:Z,X=b.findAllMatches,G=X!==void 0&&X,re=b.minMatchCharLength,pe=re===void 0?1:re;(function(he,ve){if(!(he instanceof ve))throw new TypeError("Cannot call a class as a function")})(this,d),this.options={location:D,distance:A,threshold:T,maxPatternLength:W,isCaseSensitive:ee,tokenSeparator:le,findAllMatches:G,minMatchCharLength:pe},this.pattern=this.options.isCaseSensitive?y:y.toLowerCase(),this.pattern.length<=W&&(this.patternAlphabet=l(this.pattern))}var f,p,m;return f=d,(p=[{key:"search",value:function(y){if(this.options.isCaseSensitive||(y=y.toLowerCase()),this.pattern===y)return{isMatch:!0,score:0,matchedIndices:[[0,y.length-1]]};var b=this.options,x=b.maxPatternLength,D=b.tokenSeparator;if(this.pattern.length>x)return s(y,this.pattern,D);var C=this.options,A=C.location,N=C.distance,T=C.threshold,O=C.findAllMatches,W=C.minMatchCharLength;return u(y,this.pattern,this.patternAlphabet,{location:A,distance:N,threshold:T,findAllMatches:O,minMatchCharLength:W})}}])&&o(f.prototype,p),m&&o(f,m),d}();n.exports=c},function(n,i){var a=/[ \- \[ \] \/ \{ \} \( \) \* \+ \? \. \\ \^ \$ \| ]/g;n.exports=function(o,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:/ +/g,l=new RegExp(s.replace(a," \\ $ &").replace(u,"|")),c=o.match(l),d=!!c,f=[];if(d)for(var p=0,m=c.length;p<m;p+=1){var y=c[p];f.push([o.indexOf(y),y.length-1])}return{score:d?.5:1,isMatch:d,matchedIndices:f}}},function(n,i,a){var o=a(5),s=a(6);n.exports=function(u,l,c,d){for(var f=d.location,p=f===void 0?0:f,m=d.distance,y=m===void 0?100:m,b=d.threshold,x=b===void 0?.6:b,D=d.findAllMatches,C=D!==void 0&&D,A=d.minMatchCharLength,N=A===void 0?1:A,T=p,O=u.length,W=x,z=u.indexOf(l,T),ee=l.length,Z=[],le=0;le<O;le+=1)Z[le]=0;if(z!==-1){var X=o(l,{errors:0,currentLocation:z,expectedLocation:T,distance:y});if(W=Math.min(X,W),(z=u.lastIndexOf(l,T+ee))!==-1){var G=o(l,{errors:0,currentLocation:z,expectedLocation:T,distance:y});W=Math.min(G,W)}}z=-1;for(var re=[],pe=1,he=ee+O,ve=1<<ee-1,be=0;be<ee;be+=1){for(var De=0,L=he;De<L;)o(l,{errors:be,currentLocation:T+L,expectedLocation:T,distance:y})<=W?De=L:he=L,L=Math.floor((he-De)/2+De);he=L;var P=Math.max(1,T-L+1),ct=C?O:Math.min(T+L,O)+ee,Je=Array(ct+2);Je[ct+1]=(1<<be)-1;for(var V=ct;V>=P;V-=1){var j=V-1,q=c[u.charAt(j)];if(q&&(Z[j]=1),Je[V]=(Je[V+1]<<1|1)&q,be!==0&&(Je[V]|=(re[V+1]|re[V])<<1|1|re[V+1]),Je[V]&ve&&(pe=o(l,{errors:be,currentLocation:j,expectedLocation:T,distance:y}))<=W){if(W=pe,(z=j)<=T)break;P=Math.max(1,2*T-z)}}if(o(l,{errors:be+1,currentLocation:T,expectedLocation:T,distance:y})>W)break;re=Je}return{isMatch:z>=0,score:pe===0?.001:pe,matchedIndices:s(Z,N)}}},function(n,i){n.exports=function(a,o){var s=o.errors,u=s===void 0?0:s,l=o.currentLocation,c=l===void 0?0:l,d=o.expectedLocation,f=d=
2022-01-05 20:52:55 +00:00
< span class = 'flatpickr-weekday' >
2022-08-23 16:25:36 +00:00
$ { M . join ( "</span><span class='flatpickr-weekday'>" ) }
2022-01-05 20:52:55 +00:00
< / s p a n >
2022-09-18 14:03:25 +00:00
` }function L(){n.calendarContainer.classList.add("hasWeeks");let _=je(r.document,"div","flatpickr-weekwrapper");_.appendChild(je(r.document,"span","flatpickr-weekday",n.l10n.weekAbbreviation));let M=je(r.document,"div","flatpickr-weeks");return _.appendChild(M),{weekWrapper:_,weekNumbers:M}}function P(_,M=!0){let K=M?_:_-n.currentMonth;K<0&&n._hidePrevMonthArrow===!0||K>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=K,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,We("onYearChange"),G()),X(),We("onMonthChange"),Dt())}function ct(_=!0,M=!0){if(n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,M===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){let{hours:K,minutes:Q,seconds:se}=Zo(n.config);m(K,Q,se)}n.redraw(),_&&We("onChange")}function Je(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),We("onClose")}function V(){n.config!==void 0&&We("onDestroy");for(let _=n._handlers.length;_--;)n._handlers[_].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){let _=n.calendarContainer.parentNode;if(_.lastChild&&_.removeChild(_.lastChild),_.parentNode){for(;_.firstChild;)_.parentNode.insertBefore(_.firstChild,_);_.parentNode.removeChild(_)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.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(_=>{try{delete n[_]}catch(M){}})}function j(_){return n.calendarContainer.contains(_)}function q(_){if(n.isOpen&&!n.config.inline){let M=rn(_),K=j(M),se=!(M===n.input||M===n.altInput||n.element.contains(M)||_.path&&_.path.indexOf&&(~_.path.indexOf(n.input)||~_.path.indexOf(n.altInput)))&&!K&&!j(_.relatedTarget),ie=!n.config.ignoredFocusElements.some(me=>me.contains(M));se&&ie&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==""&&n.input.value!==void 0&&l(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function te(_){if(!_||n.config.minDate&&_<n.config.minDate.getFullYear()||n.config.maxDate&&_>n.config.maxDate.getFullYear())return;let M=_,K=n.currentYear!==M;n.currentYear=M||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),K&&(n.redraw(),We("onYearChange"),G())}function we(_,M=!0){var ie;let K=n.parseDate(_,void 0,M);if(n.config.minDate&&K&&nn(K,n.config.minDate,M!==void 0?M:!n.minDateHasTime)<0||n.config.maxDate&&K&&nn(K,n.config.maxDate,M!==void 0?M:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(K===void 0)return!1;let Q=!!n.config.enable,se=(ie=n.config.enable)!=null?ie:n.confi
` );At(u,l)}}catch(s){console.error(s),t.setError(s)}}h();var od=ge(require("obsidian"));h();h();var dv={};h();var fv={};h();var pv={};h();var hv={"Open as kanban board":" \x D6ffne als Kanban-Board","Create new board":"Erstelle ein neues Board","Archive completed cards in active board":"Archiviere fertiggestellte Karten im aktiven Board","Error: current file is not a Kanban board":"Fehler: Momentan ge \x F6ffnete Datei ist kein Kanban-Board","Convert empty note to Kanban":"Konvertiere leere Notiz in ein Kanban-Board","Error: cannot create Kanban, the current note is not empty":"Fehler: Kanban konnte nicht erstellt werden, momentan ge \x F6ffnete Datei ist nicht leer","New kanban board":"Neues Kanban-Board","Untitled Kanban":"Unbenanntes Kanban","Toggle between Kanban and markdown mode":"Wechsle zwischen Kanban und Markdown Modus","Open as markdown":" \x D6ffne als Markdown","Open board settings":" \x D6ffne Board-Einstellungen","Archive completed cards":"Archiviere fertiggestellte Karten","Something went wrong":"Etwas ist schief gelaufen","You may wish to open as markdown and inspect or edit the file.":"Du kannst die Datei im Markdown Modus \x F6ffnen und \x FCberpr \x FCfen oder bearbeiten.","Are you sure you want to archive all completed cards on this board?":"Bist du dir sicher, dass du alle fertiggestellten Karten des Boards archivieren m \x F6chtest?",Complete:"Fertiggestellt",Archive:"Archiv","Invalid Kanban file: problems parsing frontmatter":"Fehlerhafte Kanban Datei: Probleme beim Parsen des Frontmatters","I don't know how to interpret this line:":"Ich wei \x DF nicht, wie ich diese Zeile interpretieren soll:",Untitled:"Unbenannt","Note: No template plugins are currently enabled.":"Beachte: Keine Template-Plugins sind derzeit aktiviert.",default:"Standard","Search...":"Suche...","These settings will take precedence over the default Kanban board settings.":"Diese Einstellung wird Vorrang vor der standard Kanban-Board Einstellung haben. ","Set the default Kanban board settings. Settings can be overridden on a board-by-board basis.":"Stelle standard Kanban-Board Einstellungen ein. Einstellungen k \x F6nnen auf einer Board-f \x FCr-Board Basis \x FCberschrieben werden.","Note template":"Notiz Vorlage","This template will be used when creating new notes from Kanban cards.":"Diese Vorlage wird beim Erstellen neuer Notizen aus Kanban-Karten verwendet.","No template":"Keine Vorlage","Note folder":"Notiz Ordner","Notes created from Kanban cards will be placed in this folder. If blank, they will be placed in the default location for this vault.":"Notizen, welche aus einer Kanban-Karte erstellt wurden, werden in diesem Ordner platziert. Falls leer, werden die Einstellungen des Vaults verwendet.","Default folder":"Standard Ordner","Lane width":"Schienen Breite","Enter a number to set the lane width in pixels.":"Gebe ein Zahl ein, um die Schienen Breite in Pixeln einzustellen.","Maximum number of archived cards":"Maximale Anzahl archivierter Karten.","Archived cards can be viewed in markdown mode. This setting will begin removing old cards once the limit is reached. Setting this value to -1 will allow a board's archive to grow infinitely.":"Archivierte Karten k \x F6nnen im Markdown-Modus betrachtet werden. Diese Einstellung wird alte Karten l \x F6schen, sobald das Limit erreicht wird. Eine Einstellung von -1 setzt das Archiv auf eine unendliche Gr \x F6 \x DFe.","Display card checkbox":"Zeige Karten Checkbox","When toggled, a checkbox will be displayed with each card":"Wenn aktiviert, wird eine Checkbox mit jeder Karte angezeigt.","Reset to default":"Zur \x FCcksetzen","Date & Time":"Datum & Uhrzeit","Date trigger":"Datums Ausl \x F6ser","When this is typed, it will trigger the date selector":"Wenn dies eingegeben wird, dann wird die Datumsauswahl angezeigt","Time trigger":"Uhrzeit Ausl \x F6ser","When this is typed, it will trigger the time selector":"Wenn dies eingegeben wird, dann wird die Uhrzeitsauswahl angezeigt","Date format":"Format des Datums","This format will be used when saving dates in markdown.":"Dieses Format wird verwendet, wenn ein Datum in
2022-01-05 20:52:55 +00:00
2022-09-18 14:03:25 +00:00
` :" ";t.app.vault.cachedRead(i.item.file).then(c=>{let d= ` $ { c . slice ( 0 , i . item . block . end ) } $ { l } ^ $ { u } $ { c . slice ( i . item . block . end ) } ` ;t.app.vault.modify(i.item.file,d)}).catch(c=>{t.setError(c),console.error(c)}),o+=u}a.push(t.app.fileManager.generateMarkdownLink(i.item.file,t.file.path,o,i.item.alias));let s=!!t.app.vault.getConfig("useMarkdownLinks");return r&&!s?a[a.length-1]=a[a.length-1].slice(0,-2):!r&&!s&&a.push("]] "),a.join("")}}}h();var n_=/ \B #([^ \s ]*)? $ /;function ay(e,t){return{id:"tag",match:n_,index:1,search:(r,n)=>{n(r?[{item: ` < em > # $ { r } < /em>`,refIndex:-1},...t.search(r,{limit:50})]:e.slice(0,50).map((i,a)=>({item:i,refIndex:a})))},template:r=>r.item,replace:r=>`${r.item.replace(/ < \ / ? em > /g,"")} `}}h();h();var sy=ge(Ta());h();h();var a_=/ \ $ & /g,o_=/ \ $ ( \ d ) / g , Ju = class { constructor ( t , r , n ) { this . data = t ; this . term = r ; this . strategy = n } getReplacementData ( t ) { let r = this . strategy . replace ( this . data ) ; if ( r == null ) return null ; let n = "" ; Array . isArray ( r ) && ( n = r [ 1 ] , r = r [ 0 ] ) ; let i = this . strategy . match ( t ) ; if ( i == null || i . index == null ) return null ; let a = r . replace ( a _ , i [ 0 ] ) . replace ( o _ , ( o , s ) => i [ parseInt ( s ) ] ) ; return { start : i . index , end : i . index + i [ 0 ] . length , beforeCursor : a , afterCursor : n } } replace ( t , r ) { let n = this . getReplacementData ( t ) ; if ( n !== null ) return r = n . afterCursor + r , [ [ t . slice ( 0 , n . start ) , n . beforeCursor , t . slice ( n . end ) ] . join ( "" ) , r ] } render ( ) { return this . strategy . renderTemplate ( this . data , this . term ) } getStrategyId ( ) { return this . strategy . getId ( ) } } ; var s _ = 1 , Gu = class { constructor ( t ) { this . props = t ; this . cache = { } } destroy ( ) { return this . cache = { } , this } replace ( t ) { return this . props . replace ( t ) } execute ( t , r ) { var a ; let n = this . matchWithContext ( t ) ; if ( ! n ) return ! 1 ; let i = n [ ( a = this . props . index ) != null ? a : s _ ] ; return this . search ( i , o => { r ( o . map ( s => new Ju ( s , i , this ) ) ) } , n ) , ! 0 } renderTemplate ( t , r ) { if ( this . props . template ) return this . props . template ( t , r ) ; if ( typeof t == "string" ) return t ; throw new Error ( ` Unexpected render data type: ${ typeof t } . Please implement template parameter by yourself ` ) } getId ( ) { return this . props . id || null } match ( t ) { return typeof this . props . match == "function" ? this . props . match ( t ) : t . match ( this . props . match ) } search ( t , r , n ) { this . props . cache ? this . searchWithCach ( t , r , n ) : this . props . search ( t , r , n ) } matchWithContext ( t ) { let r = this . context ( t ) ; return r === ! 1 ? null : this . match ( r === ! 0 ? t : r ) } context ( t ) { return this . props . context ? this . props . context ( t ) : ! 0 } searchWithCach ( t , r , n ) { this . cache [ t ] != null ? r ( this . cache [ t ] ) : this . props . search ( t , i => { this . cache [ t ] = i , r ( i ) } , n ) } } ; var Qu = class extends sy . EventEmitter { constructor ( t ) { super ( ) ; this . handleQueryResult = t => { this . emit ( "hit" , { searchResults : t } ) } ; this . strategies = t . map ( r => new Gu ( r ) ) } destroy ( ) { return this . strategies . forEach ( t => t . destroy ( ) ) , this } run ( t ) { for ( let r of this . strategies ) if ( r . execute ( t , this . handleQueryResult ) ) return ; this . handleQueryResult ( [ ] ) } } ; h ( ) ; var ly = ge ( Ta ( ) ) ; h ( ) ; var l _ = typeof window != "undefined" && ! ! window . CustomEvent , Ut = ( e , t , r ) => { if ( l _ ) return new CustomEvent ( t , r ) ; let n = e . createEvent ( "CustomEvent" ) ; return n . initCustomEvent ( t , ! 1 , ( r == null ? void 0 : r . cancelable ) || ! 1 , ( r == null ? void 0 : r . detail ) || void 0 ) , n } ; var c _ = 10 , u _ = "auto" , d _ = "dropdown-menu textcomplete-dropdown" , cy = "textcomplete-item" , f _ = ` ${ cy } active ` , Da = class extends ly . EventEmitter { constructor ( t , r ) { super ( ) ; this . el = t ; this . option = r ; this . shown = ! 1 ; this . items = [ ] ; this . activeIndex = null } static create ( t ) { let r = t . parent || window . document . body , i = r . doc . createElement ( "ul" ) ; return i . className = t . className || d _ , Object . assign ( i . style , { display : "none" , position : "absolute" , zIndex : "1000" } , t . style ) , r == null || r . appendChild ( i ) , new Da ( i , t ) } render ( t , r ) { let n = Ut ( this . el . doc , "render" , { cancelable : ! 0 } ) ; return this . emit ( "render" , n ) , n . defaultPrevented ? this : ( this . clear ( ) , t . length === 0 ? this . hide ( ) : ( this . items = t . slice ( 0 , this . option . maxCount || c _ ) . map ( ( i , a ) => { var o ; return new uy ( this , a , i , ( ( o = this . option ) == null ? void 0 : o . item ) || { } ) } ) , this . setStrategyId ( t [ 0 ] ) . renderEdge ( t , "header" ) . renderItems ( ) . renderEdge ( t , "footer" ) . show ( ) . setOffset ( r ) . activate ( 0 ) , this . emit ( "rendered" , Ut ( this . el . doc , "rendered" ) ) , this ) ) } destroy ( ) { var t ; return this . clear ( ) , ( t = this . el . parentNode ) == null || t . removeChild ( this . el ) , this } select ( t ) { let r = { searchResult : t . searchResult } , n = Ut ( this . e
2022-08-23 16:25:36 +00:00
` ).map(r=>r[0]===">"?r: ` > $ { r } ` ).join( `
2022-09-18 14:03:25 +00:00
` )}function C_(e){return e.split( `
2022-08-23 16:25:36 +00:00
` ).map(r=>r[0]!==">"?r:r.replace(/^>+ \s */,"")).join( `
2022-09-18 14:03:25 +00:00
` )}var Ma=/^(?: \s * \d +[.)] \s +.*?(?:[ \r \n ]| $ ))+ $ /,ed=/^(?: \s * \d +[.)] \s + \[ \s + \] \s +.*?(?:[ \r \n ]| $ ))+ $ /,td=/^(?: \s * \d +[.)] \s + \[ [^ \] \s ]+ \] \s +.*?(?:[ \r \n ]| $ ))+ $ /;function T_(e){return e.match(/^ \s */)[0].length}function D_(e){return parseInt(e.match(/^ \s *( \d +)/)[1],10)}function M_(e){let t=[0],r=0;return e.split( `
` ).map(n=>{let i=T_(n);if(i>r?t.push(0):i<r&&t.pop(),r=i,Ma.test(n)){let a=D_(n);return t[t.length-1]=a,n}return t[t.length-1]=t[t.length-1]+1,n.replace(/^( \s *)/, ` $1$ { t [ t . length - 1 ] } . ` )}).join( `
` )}function I_(e){return e.split( `
` ).map(t=>Ma.test(t)?t.replace(/^( \s *) \d +[.)] \s +/," $ 1"):t).join( `
` )}var Ia=/^(?: \s *[-*+] \s +.*?(?:[ \r \n ]| $ ))+ $ /,nd=/^(?: \s *[-*+] \s + \[ \s + \] \s +.*?(?:[ \r \n ]| $ ))+ $ /,rd=/^(?: \s *[-*+] \s + \[ [^ \] \s ]+ \] \s +.*?(?:[ \r \n ]| $ ))+ $ /;function _y(e){return e.split( `
` ).map(r=>Ia.test(r)?r:r.replace(/^( \s *)/," $ 1- ")).join( `
` )}function A_(e){return e.split( `
` ).map(t=>nd.test(t)||rd.test(t)?t:t.replace(/^( \s *[-*+] \s +)/," $ 1[ ] ")).join( `
` )}function L_(e){return e.split( `
` ).map(t=>ed.test(t)||td.test(t)?t:t.replace(/^( \s * \d +[.)] \s +)/," $ 1[ ] ")).join( `
` )}function P_(e){return e.split( `
` ).map(t=>nd.test(t)?t:t.replace(/^( \s *[-*+] \s +) \[ [^ \] ] \] /," $ 1[ ]")).join( `
` )}function F_(e){return e.split( `
` ).map(t=>ed.test(t)?t:t.replace(/^( \s * \d +[.)] \s +) \[ [^ \] ]{1} \] /," $ 1[ ]")).join( `
` )}function N_(e){return e.split( `
` ).map(t=>rd.test(t)?t:t.replace(/^( \s *[-*+] \s +) \[ \s \] /," $ 1[x]")).join( `
` )}function O_(e){return e.split( `
` ).map(t=>td.test(t)?t:t.replace(/^( \s * \d +[.)] \s +) \[ \s \] /," $ 1[x]")).join( `
` )}function R_(e){return e.split( `
` ).map(r=>Ia.test(r)?r.replace(/^( \s *)[-+*] \s +/," $ 1"):r).join( `
` )}var Cy={"editor:toggle-bold":e=>{Mi(e,wy,b_,"**")},"editor:toggle-code":e=>{Mi(e,xy,E_," ` ")}," editor : toggle - italics ":e=>{Mi(e,Ey,w_," * ")}," editor : toggle - highlight ":e=>{Mi(e,ky,x_," == ")}," editor : toggle - strikethrough ":e=>{Mi(e,Sy,k_," ~ ~ ")}," editor : toggle - blockquote ":e=>{ps(e,S_,__,C_)}," editor : toggle - bullet - list ":e=>{ps(e,Ia,_y,R_)}," editor : toggle - numbered - list ":e=>{ps(e,Ma,M_,I_)}," editor : toggle - checklist - status ":e=>{let t=On(e),r=t.selection.end===t.selection.start,n=Di({text:t.text,selection:t.selection}),i=Lt(e,n),a=i.selectedText,o=Ia.test(a),s=Ma.test(a);!o&&!s?a=_y(a):o?nd.test(a)?a=N_(a):rd.test(a)?a=P_(a):a=A_(a):ed.test(a)?a=O_(a):td.test(a)?a=F_(a):a=L_(a);let u=At(e,a);if(r){let l=a.length-i.selectedText.length;Lt(e,{start:t.selection.start+l,end:t.selection.end+l})}else Lt(e,{start:i.selection.start,end:u.selection.end})}},id={" ( ":e=>cn(e," ( "," ) ",!1)," [ ":e=>cn(e," [ "," ] ",!1,!0)," { ":e=>cn(e," { "," } ",!1)," '":e=>cn(e,"' "," '",!1),' "':e=>cn(e,'" ',' "',!1)},ad={" * ":e=>cn(e," * "," * ",!1),_:e=>cn(e," _ "," _ ",!1)," ` ":e=>cn(e," ` "," ` ",!1),"=":e=>cn(e,"=","=",!0),"~":e=>cn(e,"~","~",!0), $ :e=>cn(e," $ "," $ ",!0),"%":e=>cn(e,"%","%",!0)},H_={"(":")","[":"]","{":"}","'":"'",'"':'"',"*":"*",_:"_"," ` ":" ` ","=":"=","~":"~", $ :" $ ","%":"%"};function Ty(e,t){let r=On(e);if(r.selection.end!==r.selection.start||r.selection.end===r.text.length)return!1;let n=r.text[r.selection.end-1],i=r.text[r.selection.end];if(t[n]&&i===H_[n])return Lt(e,{start:r.selection.end,end:r.selection.end+1}),At(e,""),!0}function Dy(e){return Ty(e,id)}function My(e){return Ty(e,ad)}function B_(e,t,r){let n=t?" ":" ".repeat(r);return e.split( `
2022-08-23 16:25:36 +00:00
` ).map(i=>n+i).join( `
2022-09-18 14:03:25 +00:00
` )}function K_(e,t,r){let n=t?" \\ t":" ".repeat(r),i=new RegExp( ` ^ $ { n } ` );return e.split( `
2022-01-05 20:52:55 +00:00
` ).map(a=>i.test(a)?a.replace(i,""):a).join( `
2022-09-18 14:03:25 +00:00
` )}function Iy(e,t,r,n){let i=On(e);if(t){let l=Di(i),c=Lt(e,l);if(At(e,K_(c.selectedText,r,n)),i.selection.start===i.selection.end){let d=r?1:n;Lt(e,{start:i.selection.start-d,end:i.selection.end-d})}return!0}let a=Di(i),o=Lt(e,a),u=B_(o.selectedText,r,n).replace(/^( \s *)( \d +)([.)] \s )/,(l,c,d,f)=> ` $ { c } 1 $ { f } ` );return At(e,u),!0}function Ay(e){let t=On(e);if(t.selection.start!==t.selection.end)return!1;let r=Di(t),n=e.value.slice(r.start,t.selection.end),i=e.value.slice(r.start,r.end);if(/^( \s *[-*+] \s +(?: \[ [^ \] ] \] \s *)?) $ /.test(i))return Lt(e,{start:r.start-1,end:r.end}),At(e, `
` ),!0;if(/^( \s * \d [.)] \s +(?: \[ [^ \] ] \] \s *)?) $ /.test(i))return Lt(e,{start:r.start-1,end:r.end}),At(e, `
` ),!0;if(Ia.test(n)){let a=n.match(/^( \s *[-*+] \s +(?: \[ [^ \] ] \] \s *)?)/)[1];return _a(e, `
$ { a . replace ( /^(\s*[-*+]\s+)\[[^\]]\]/ , "$1[ ]" ) } ` ),!0}if(Ma.test(n)){let s=n.match(/^( \s * \d +[.)] \s +(?: \[ [^ \] ] \] \s *)?)/)[1].replace(/^( \s * \d +[.)] \s +) \[ [^ \] ] \] /," $ 1[ ]").replace(/^( \s *)( \d +)/,(u,l,c)=> ` $ { l } $ { parseInt ( c ) + 1 } ` );return _a(e, `
$ { s } ` ),!0}return!1}function Xn(e,t){return od.Platform.isMobile?e.key==="Enter"&&!0:t.getSetting("new-line-trigger")==="enter"?e.key==="Enter"&&!(e.shiftKey||e.metaKey||e.ctrlKey):e.key==="Enter"&&e.shiftKey}var Er=F.forwardRef(function({onEnter:t,onEscape:r,onSubmit:n,...i},a){let{view:o,stateManager:s}=F.useContext(Ve),u=app.vault.getConfig("autoPairMarkdown"),l=app.vault.getConfig("autoPairBrackets"),c=app.vault.getConfig("useTab"),d=app.vault.getConfig("tabSize"),f=!!app.vault.getConfig("useMarkdownLinks"),p=by({isInputVisible:!0,onEnter:t,onEscape:r,onKeyDown:m=>{if(m.key==="Backspace"){let y=Dy(m.target);return y||My(m.target)}if(Xn(m,s)){let y=Ay(m.target);if(y)return m.preventDefault(),y}if(m.key==="Tab")return m.preventDefault(),Iy(m.target,m.shiftKey,c,d);if(u){let y=ad[m.key];if(y&&y(m.target))return m.preventDefault(),!0}if(l){if(f&&m.key==="[")return!1;let y=id[m.key];if(y&&y(m.target))return m.preventDefault(),!0}return!1}});return F.useEffect(()=>{let m=y=>{let b=Cy[y];b&&b(p.ref.current)};return o.emitter.on("hotkey",m),()=>{o.emitter.off("hotkey",m)}},[o]),g(S,null,g("div",{"data-replicated-value":i.value,className: $ ("grow-wrap")},g("textarea",{"data-ignore-drag":!0,rows:1,className: $ ("item-input"),...i,...p,ref:m=>{p.ref.current=m,a&&typeof a=="function"?a(m):a&&(a.current=m)}})),od.Platform.isMobile&&g("button",{onPointerDown:n,className: $ ("item-submit-button")},B("Submit")))});h();var cd=ge(Ly());h();var xr=ge(require("obsidian"));var $ _=["bmp","png","jpg","jpeg","gif","svg"],U_=["mp3","wav","m4a","3gp","flac","ogg","oga"],W_=["mp4","webm","ogv"],V_=/ \u 00A0/g,z_=/[!"# $ %&()*+,.:;<=>?@^ ` { | } ~ /[\]\\]/g ; function Py ( e ) { return e . replace ( z _ , " " ) . replace ( /\s+/g , " " ) . trim ( ) } function Ur ( e ) { let r = e . replace ( V _ , " " ) . normalize ( "NFC" ) . split ( /\|(.*)/ ) , n = r [ 0 ] . split ( /#(.*)/ ) ; return { root : n [ 0 ] , subpath : n [ 1 ] ? "#" + n [ 1 ] : "" , alias : r [ 1 ] || "" } } function j _ ( e , t ) { if ( ! e || ! t ) return null ; let r = t . split ( "#" ) . filter ( l => ! ! l ) ; if ( ! r || r . length === 0 ) return null ; if ( r . length === 1 ) { let l = r [ 0 ] ; if ( l . startsWith ( "^" ) ) { let c = l . slice ( 1 ) . toLowerCase ( ) , d = e . blocks ; if ( d && d [ c ] ) { let f = d [ c ] ; return { type : "block" , block : f , start : f . position . start . offset , end : f . position . end . offset , startLine : f . position . start . line , endLine : f . position . end . line } } else return null } } let n = e . headings ; if ( ! n || n . length === 0 ) return null ; let i = 0 , a = 0 , o = 0 , s = null , u = null ; for ( ; a < n . length ; a ++ ) { let l = n [ a ] ; if ( s && l . level <= o ) { u = l ; break } ! s && l . level > o && Py ( l . heading ) . toLowerCase ( ) === Py ( r [ i ] ) . toLowerCase ( ) && ( i ++ , o = l . level , i === r . length && ( s = l ) ) } return s ? { type : "heading" , current : s , next : u , start : s . position . start . offset , end : u ? u . position . start . offset : null , startLine : s . position . start . line , endLine : u ? u . position . end . line : null } : null } function q _ ( e ) { e . querySelectorAll ( ".task-list-item-checkbox" ) . forEach ( ( r , n ) => { r . dataset . checkboxIndex = n . toString ( ) } ) } function Y _ ( e , t ) { e . querySelectorAll ( ".internal-link" ) . forEach ( n => { let i = Ur ( n . getAttr ( "href" ) ) ; t . app . metadataCache . getFirstLinkpathDest ( i . root , t . file . path ) || n . addClass ( "is-unresolved" ) } ) } function J _ ( e , t , r ) { e . empty ( ) , e . createEl ( "img" , { attr : { src : r . app . vault . getResourcePath ( t ) } } , n => { e . hasAttribute ( "width" ) && n . setAttribute ( "width" , e . getAttribute ( "width" ) ) , e . hasAttribute ( "height" ) && n . setAttribute ( "height" , e . getAttribute ( "height" ) ) , e . hasAttribute ( "alt" ) && n . setAttribute ( "alt" , e . getAttribute ( "alt" ) ) } ) , e . addClasses ( [ "image-embed" , "is-loaded" ] ) } function Fy ( e , t , r ) { e . empty ( ) , e . createEl ( "audio" , { attr : { controls : "" , src : r . app . vault . getResourcePath ( t ) } } ) , e . addClasses ( [ "media-embed" , "is-loaded" ] ) } function G _ ( e , t , r ) { e . empty ( ) , e . createEl ( "video" , { attr : { controls : "" , src : r . app . vault . getResourcePath ( t ) } } , n => { let i = ( ) => { n . removeEventListener ( "loadedmetadata" , i ) , n . videoWidth === 0 && n . videoHeight === 0 && ( e . empty ( ) , Fy ( e , t , r ) ) } ; n . addEventListener ( "loadedmetadata" , i ) } ) , e . addClasses ( [ "media-embed" , "is-loaded" ] ) } async function Ny ( e , t , r ) { let n = r . app . metadataCache . getFileCache ( e ) ; if ( ! n ) return null ; let i = await r . app . vault . cachedRead ( e ) ; if ( ! t . subpath ) return { markdown : i , boundary : null } ; let a = j _ ( n , t . subpath ) ; if ( a ) return { markdown : i . substring ( a . start , a . end === null ? void 0 : a . end ) , boundary : a } ; if ( t . subpath ) return { markdown : ` ${ B ( " Unable t
` )[0].trim(),p=f.replace(aC," $ 1").replace(oC," $ 1").replace(sC," $ 1").replace(iC," ").trim(),m=i.getSetting("new-note-folder"),y=i.getSetting("new-note-template"),b=m?i.app.vault.getAbstractFileByPath(m):i.app.fileManager.getNewFileParent(i.file.path),x=await i.app.fileManager.createNewMarkdownFile(b,p),D=i.app.workspace.splitActiveLeaf();await D.openFile(x),i.app.workspace.setActiveLeaf(D,!1,!0),await _p(i,y);let C=t.data.titleRaw.replace(f,i.app.fileManager.generateMarkdownLink(x,i.file.path));i.updateItemContent(t,C).then(A=>{n.updateItem(r,A)}).catch(A=>{i.setError(A),console.error(A)})})}).addItem(d=>{d.setIcon("links-coming-in").setTitle(B("Copy link to card")).onClick(()=>{if(t.data.blockId)navigator.clipboard.writeText( ` $ { this . app . fileManager . generateMarkdownLink ( i . file , "" , "#^" + t . data . blockId ) } ` );else{let f=Re(6);navigator.clipboard.writeText( ` $ { this . app . fileManager . generateMarkdownLink ( i . file , "" , "#^" + f ) } ` ),i.updateItemContent(t, ` $ { t . data . titleRaw } ^ $ { f } ` ).then(p=>{n.updateItem(r,p)}).catch(p=>{i.setError(p),console.error(p)})}})}).addSeparator(),/ \n /.test(t.data.titleRaw)&&c.addItem(d=>{d.setIcon("split").setTitle(B("Split card")).onClick(async()=>{let f=t.data.titleRaw.split(/[ \r \n ]+/g).map(m=>m.trim()),p=await Promise.all(f.map(m=>i.getNewItem(m)));n.splitItem(r,p)})}),c.addItem(d=>{d.setIcon("documents").setTitle(B("Duplicate card")).onClick(()=>n.duplicateEntity(r))}).addItem(d=>{d.setIcon("plus-with-circle").setTitle(B("Insert card before")).onClick(async()=>n.insertItems(r,[await i.getNewItem("",!1,!0)]))}).addItem(d=>{d.setIcon("plus-with-circle").setTitle(B("Insert card after")).onClick(async()=>{let f=[...r];f[f.length-1]=f[f.length-1]+1,n.insertItems(f,[await i.getNewItem("",!1,!0)])})}).addItem(d=>{d.setIcon("sheets-in-box").setTitle(B("Archive card")).onClick(()=>n.archiveItem(r))}).addItem(d=>{d.setIcon("trash").setTitle(B("Delete card")).onClick(()=>n.deleteEntity(r))}).addSeparator().addItem(d=>{d.setIcon("calendar-with-checkmark").setTitle(u?B("Edit date"):B("Add date")).onClick(()=>{var f;ns(a.view,i,s,rs({stateManager:i,boardModifiers:n,item:t,hasDate:u,path:r}),(f=t.data.metadata.date)==null?void 0:f.toDate())})}),u&&(c.addItem(d=>{d.setIcon("cross").setTitle(B("Remove date")).onClick(()=>{let f=i.getSetting("link-date-to-daily-note"),p=i.getSetting("date-trigger"),m=f?"(?: \\ [[^ \\ ]]+ \\ ] \\ ([^ \\ )]+ \\ )| \\ [ \\ [[^ \\ ]]+ \\ ] \\ ])":"{[^}]+}",y=new RegExp( ` ( ^ | \ \ s ) $ { Ln ( p ) } $ { m } ` ),b=t.data.titleRaw.replace(y,"").trim();i.updateItemContent(t,b).then(x=>{n.updateItem(r,x)}).catch(x=>{i.setError(x),console.error(x)})})}),c.addItem(d=>{d.setIcon("clock").setTitle(l?B("Edit time"):B("Add time")).onClick(()=>{is(a.view,i,s,as({stateManager:i,boardModifiers:n,item:t,hasTime:l,path:r}),t.data.metadata.time)})}),l&&c.addItem(d=>{d.setIcon("cross").setTitle(B("Remove time")).onClick(()=>{let f=i.getSetting("time-trigger"),p=new RegExp( ` ( ^ | \ \ s ) $ { Ln ( f ) } { ( [ ^ } ] + ) } ` ),m=t.data.titleRaw.replace(p,"").trim();i.updateItemContent(t,m).then(y=>{n.updateItem(r,y)}).catch(y=>{i.setError(y),console.error(y)})})})),c.showAtPosition(s)}},[e,t,r,n,i])}h();var Vy=F.memo(function({isEditing:t,setIsEditing:r,showMenu:n}){let i=F.useMemo(()=>t?{"data-ignore-drag":!0}:{},[t]);return g("div",{...i,className: $ ("item-postfix-button-wrapper")},t?g("button",{"data-ignore-drag":!0,onPointerDown:a=>{a.preventDefault()},onClick:()=>{r(!1)},className: ` $ { $ ( "item-postfix-button" ) } is - enabled ` ,"aria-label":B("Cancel")},g(Kt,{name:"cross"})):g("button",{"data-ignore-drag":!0,onPointerDown:a=>a.preventDefault(),onClick:n,className: $ ("item-postfix-button"),"aria-label":B("More options")},g(Kt,{name:"vertical-three-dots"})))});h();var Ss=ge(require("obsidian"));function zy({item:e,isSettingsVisible:t,searchQuery:r}){return t||!e.data.metadata.fileMetadata?null:g("div",{className: $ ("item-metadata-wrapper")},g(cC,{metadata:e.data.metadata.fileMetadata,order:e.data.metadata.fileMetadataOrder,searchQuery:r}))}function jy(e,t){if(e.ts){let r=t.getSetting("date-display-format");return(0,Ss.moment)(e.ts).format(r)}return null}function qy(e,t){if(!e.path)return nu
2022-08-23 16:25:36 +00:00
Available method signatures are :
animateScrollTo ( y : number , options )
animateScrollTo ( [ x : number | null , y : number | null ] , options )
2022-09-18 14:03:25 +00:00
animateScrollTo ( scrollToElement : Element , options ) ` ;r+=a.horizontalOffset,n+=a.verticalOffset;let d=c.getMaxHorizontalScroll(),f=c.getHorizontalScroll();r>d&&(r=d);let p=r-f,m=c.getMaxVerticalScroll(),y=c.getVerticalScroll();n>m&&(n=m);let b=n-y,x=Math.abs(Math.round(p/1e3*a.speed)),D=Math.abs(Math.round(b/1e3*a.speed)),C=x>D?x:D;return C<a.minDuration?C=a.minDuration:C>a.maxDuration&&(C=a.maxDuration),new Promise((A,N)=>{p===0&&b===0&&A(!0),Zn.remove(c.element,!0);let T,O=()=>{le(),cancelAnimationFrame(T),A(!1)};Zn.add(c.element,O);let W=re=>re.preventDefault(),z=a.cancelOnUserAction?O:W,ee=a.cancelOnUserAction?{passive:!0}:{passive:!1},Z=["wheel","touchstart","keydown","mousedown"],le=()=>{Z.forEach(re=>{c.element.removeEventListener(re,z,ee)})};Z.forEach(re=>{c.element.addEventListener(re,z,ee)});let X=Date.now(),G=()=>{var re=Date.now()-X,pe=re/C;let he=Math.round(f+p*a.easing(pe)),ve=Math.round(y+b*a.easing(pe));re<C&&(he!==r||ve!==n)?(c.scrollTo(he,ve),T=requestAnimationFrame(G)):(c.scrollTo(r,n),cancelAnimationFrame(T),le(),Zn.remove(c.element,!1),A(!0))};T=requestAnimationFrame(G)})})}var Cs=fC;var Ib=ge(xt());h();h();h();var pC="scroll-container",Ts=8,Ds=["top","right","bottom","left"],fd=class{constructor(t,r,n,i,a){this.scrollFrame=0;this.onScroll=()=>{this.activeScroll.size===0&&(this.scrollState=Kl(this.scrollEl),this.handleEntityRegistration())};this.onDragEnd=()=>{this.activeScroll.clear()};this.handleBeginDragScroll=({scrollEntitySide:t,scrollStrength:r})=>{this.isDoneScrolling(t)||(this.activeScroll.set(t,r),this.handleDragScroll())};this.handleUpdateDragScroll=({scrollEntitySide:t,scrollStrength:r})=>{this.isDoneScrolling(t)||this.activeScroll.set(t,r)};this.handleEndDragScroll=({scrollEntitySide:t})=>{this.activeScroll.delete(t)};this.dndManager=t,this.instanceId=Re(),this.scopeId=r,this.triggerTypes=n,this.scrollState=on,this.parent=i,this.activeScroll=new Map,this.pollForNodes(a)}pollForNodes(t){!t()||this.parent&&!this.parent.observerHandlers?this.dndManager.win.requestAnimationFrame(()=>this.pollForNodes(t)):this.initNodes(t())}initNodes(t){this.scrollEl=t,this.scrollEl.dataset.hitboxid=this.instanceId,this.scrollEl.dataset.scrollid=this.instanceId,this.top=this.createScrollEntity("top"),this.right=this.createScrollEntity("right"),this.bottom=this.createScrollEntity("bottom"),this.left=this.createScrollEntity("left"),this.bindScrollHandlers(),this.observerHandlers=new Map,this.observer=new IntersectionObserver(r=>{r.forEach(n=>{var a;let i=(a=n.target.dataset)==null?void 0:a.hitboxid;if(i&&this.observerHandlers.has(i)){let o=this.observerHandlers.get(i);o&&o(n)}})},{root:t,threshold:.1}),this.scrollEl.addEventListener("scroll",this.onScroll,{passive:!0,capture:!1}),this.dndManager.emitter.on("scrollResize",this.onScroll),this.scrollEl.win.setTimeout(()=>{this.onScroll()}),this.dndManager.observeResize(this.scrollEl),this.parent?this.parent.registerObserverHandler(this.instanceId,this.scrollEl,r=>{r.isIntersecting?this.handleEntityRegistration():this.handleEntityUnregistration()}):this.handleEntityRegistration()}destroy(){var t;this.handleEntityUnregistration(),this.observer.disconnect(),this.unbindScrollHandlers(),this.scrollEl.removeEventListener("scroll",this.onScroll),this.dndManager.emitter.off("scrollResize",this.onScroll),(t=this.parent)==null||t.unregisterObserverHandler(this.instanceId,this.scrollEl),this.dndManager.unobserveResize(this.scrollEl)}handleEntityRegistration(){Ds.forEach(t=>{let r=Ze(this.scrollEl),n=this.getId(t),i=this.dndManager.scrollEntities.has(n),a=this.isDoneScrolling(t);!a&&!i?this.dndManager.registerScrollEntity(n,this[t],r):a&&i&&this.dndManager.unregisterScrollEntity(n,r)})}handleEntityUnregistration(){Ds.forEach(t=>{let r=Ze(this.scrollEl),n=this.getId(t);this.dndManager.unregisterScrollEntity(n,r)})}registerObserverHandler(t,r,n){this.observerHandlers.set(t,n),this.observer.observe(r)}unregisterObserverHandler(t,r){this.observerHandlers.delete(t),this.observer.unobserve(r)}bindScrollHandlers(){Ds.forEach(t=>{let r=this.getId(t);this.dndManager.dragManager.emitte
` ).trim()}function Wr(e){e=Ls(e);let t=e.match(/^(.*?) \s * \( ( \d +) \) $ /);return t==null?{title:e,maxItems:0}:{title:t[1],maxItems:Number(t[2])}}h();function bb(e){return g("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},g("path",{fill:"currentColor",d:"M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z"}))}h();var yd=ge(xt()),wb=ge(require("obsidian"));var Eb={delete:{description:B("Are you sure you want to delete this list and all its cards?"),confirm:B("Yes, delete list")},archive:{description:B("Are you sure you want to archive this list and all its cards?"),confirm:B("Yes, archive list")},"archive-items":{description:B("Are you sure you want to archive all cards in this list?"),confirm:B("Yes, archive cards")}};function xb({action:e,cancel:t,onAction:r,lane:n}){return F.useEffect(()=>{e&&n.children.length===0&&r()},[e,n.children.length]),!e||e&&n.children.length===0?null:g("div",{className: $ ("action-confirm-wrapper")},g("div",{className: $ ("action-confirm-text")},Eb[e].description),g("div",null,g("button",{onClick:r,className: $ ("confirm-action-button")},Eb[e].confirm),g("button",{onClick:t,className: $ ("cancel-action-button")},"Cancel")))}function kb({setIsEditing:e,path:t,lane:r}){let{stateManager:n,boardModifiers:i}=F.useContext(Ve),[a,o]=F.useState(null);return{settingsMenu:F.useMemo(()=>new wb.Menu().addItem(u=>{u.setIcon("pencil").setTitle(B("Edit list")).onClick(()=>e(!0))}).addItem(u=>{u.setIcon("documents").setTitle(B("Archive cards")).onClick(()=>o("archive-items"))}).addSeparator().addItem(u=>{u.setIcon("up-and-down-arrows").setTitle(B("Sort by card text")).onClick(()=>{let l=r.children.slice(),c=r.data.sorted===Mn.TitleAsc;l.sort((d,f)=>c?f.data.titleSearch.localeCompare(d.data.titleSearch):d.data.titleSearch.localeCompare(f.data.titleSearch)),i.updateLane(t,(0,yd.default)(r,{children:{ $ set:l},data:{sorted:{ $ set:r.data.sorted===Mn.TitleAsc?Mn.TitleDsc:Mn.TitleAsc}}}))})}).addItem(u=>{u.setIcon("up-and-down-arrows").setTitle(B("Sort by date")).onClick(()=>{let l=r.children.slice(),c=r.data.sorted===Mn.DateAsc?-1:1;l.sort((d,f)=>{let p=d.data.metadata.time||d.data.metadata.date,m=f.data.metadata.time||f.data.metadata.date;return p&&!m?-1*c:m&&!p?1*c:!p&&!m?0:(p.isBefore(m)?-1:1)*c}),i.updateLane(t,(0,yd.default)(r,{children:{ $ set:l},data:{sorted:{ $ set:r.data.sorted===Mn.DateAsc?Mn.DateDsc:Mn.DateAsc}}}))})}).addSeparator().addItem(u=>{u.setIcon("plus-with-circle").setTitle(B("Insert list before")).onClick(()=>i.insertLane(t,{...wr,id:Re(),children:[],data:{title:"",shouldMarkItemsComplete:!1,forceEditMode:!0}}))}).addItem(u=>{u.setIcon("plus-with-circle").setTitle(B("Insert list after")).onClick(()=>{let l=[...t];l[l.length-1]=l[l.length-1]+1,i.insertLane(l,{...wr,id:Re(),children:[],data:{title:"",shouldMarkItemsComplete:!1,forceEditMode:!0}})})}).addSeparator().addItem(u=>{u.setIcon("sheets-in-box").setTitle(B("Archive list")).onClick(()=>o("archive"))}).addItem(u=>{u.setIcon("trash").setTitle(B("Delete list")).onClick(()=>o("delete"))}),[n,o,t,r]),confirmAction:a,setConfirmAction:o}}h();var Sb=ge(xt());function _b({lane:e,lanePath:t}){let{boardModifiers:r}=F.useContext(Ve);return g("div",{className: $ ("lane-setting-wrapper")},g("div",{className: $ ("checkbox-wrapper")},g("div",{className: $ ("checkbox-label")},B("Mark cards in this list as complete")),g("div",{onClick:()=>r.updateLane(t,(0,Sb.default)(e,{data:{ $ toggle:["shouldMarkItemsComplete"]}})),className: ` checkbox - container $ { e . data . shouldMarkItemsComplete ? "is-enabled" : "" } ` })))}h();var Cb=ge(require("obsidian"));function Tb({itemCount:e,maxItems:t,isEditing:r,setIsEditing:n,title:i,onChange:a}){let{stateManager:o}=F.useContext(Ve),s=F.useRef(),u=o.getSetting("hide-card-count"),l=p=>{Xn(p,o)||(p.preventDefault(),r&&n(!1))},c=()=>{r&&n(!1)},d=()=>{r&&n(!1)};F.useEffect(()=>{if(r&&s.current){let p=s.current;s.current.focus(),p.selectionStart=p.selectionEnd=p.value.length}},[r]);let f=[ $ ("lane-title-count")];return t&&t<e&&f.push("wip-exceeded"),g(S,null,g("div",{className: $ ("lane-title")},r?g(Er,{ref:s,className: $ ("lane-input"
` );function $ b(e){return["","","%% kanban:settings"," ` ` ` ",JSON.stringify(e)," ` ` ` ","%%"].join( `
` )}function Ub(e,t,r){let n=e.innerText.trim();if((t==null?void 0:t.length)&&(n+=" "+t.join(" ")),r){let i=Object.keys(r).join(" "),a=Object.values(r).map(o=>Array.isArray(o.value)?o.value.join(" "):o.value.toString()).join(" ");n+=" "+i+" "+a}return n.toLocaleLowerCase()}function zC(e,t,r){var n,i,a;if(e.plugins.enabledPlugins.has("dataview")&&((a=(i=(n=e.plugins)==null?void 0:n.plugins)==null?void 0:i.dataview)==null?void 0:a.api))return e.plugins.plugins.dataview.api.page(t.path,r.path)}function Wb(e,t){if(!e)return null;if(e[t])return e[t];let r=t.split("."),n=e;for(let i of r)if(typeof n=="object"&&i in n)n=n[i];else{n=null;break}return n}function kd(e,t){let r=e.getSetting("metadata-keys");if(!r.length)return{};if(!t)return{};let n=e.app.metadataCache.getFileCache(t),i=zC(e.app,t,e.file);if(!n&&!i)return{};let a={},o={},s={},u=[],l=!1;return r.forEach(c=>{var p;if(s[c.metadataKey])return;if(s[c.metadataKey]=!0,c.metadataKey==="tags"){let m=(n==null?void 0:n.tags)||[];if(Array.isArray((p=n==null?void 0:n.frontmatter)==null?void 0:p.tags)&&(m=[].concat(m,n.frontmatter.tags.map(y=>({tag: ` # $ { y } ` })))),(m==null?void 0:m.length)===0)return;u.push(c.metadataKey),a.tags={...c,value:m.map(y=>y.tag).filter(y=>o[y]?!1:(o[y]=!0,!0))},l=!0;return}let d=Wb(n==null?void 0:n.frontmatter,c.metadataKey),f=Wb(i,c.metadataKey);if(d)u.push(c.metadataKey),a[c.metadataKey]={...c,value:d},l=!0;else if(f){let m=i[c.metadataKey],y=m.values||m.val||m;if(y===m&&typeof y=="object")y={...m};else if(!Array.isArray(y)&&typeof y!="string"&&typeof y!="number")return;u.push(c.metadataKey),a[c.metadataKey]={...c,value:y},l=!0}}),{fileMetadata:l?a:void 0,fileMetadataOrder:u}}function Vb(e,t){return!e&&t?!0:!["metadata-keys","date-trigger","time-trigger","link-date-to-daily-note","date-format","time-format","hide-date-in-title","hide-tags-in-title","hide-card-count"].every(n=>e[n]===t[n])}h();function zb({onNewLane:e,closeLaneForm:t}){let{boardModifiers:r,stateManager:n}=F.useContext(Ve),[i,a]=F.useState(!1),[o,s]=F.useState(""),u=F.useRef(),l=Li(()=>{t()},{ignoreClass: $ ("ignore-click-outside")});F.useLayoutEffect(()=>{var d;(d=u.current)==null||d.focus()},[]);let c=()=>{r.addLane({...wr,id:Re(),children:[],data:{...Wr(o),shouldMarkItemsComplete:i}}),s(""),a(!1),e()};return g("div",{ref:l,className: $ ("lane-form-wrapper")},g("div",{className: $ ("lane-input-wrapper")},g(Er,{ref:u,className: $ ("lane-input"),onChange:d=>s(d.target.value),onEnter:d=>{Xn(d,n)||(d.preventDefault(),c())},onSubmit:()=>{c()},onEscape:t,value:o})),g("div",{className: $ ("checkbox-wrapper")},g("div",{className: $ ("checkbox-label")},B("Mark cards in this list as complete")),g("div",{onClick:()=>a(!i),className: ` checkbox - container $ { i ? "is-enabled" : "" } ` })),g("div",{className: $ ("lane-input-actions")},g("button",{className: $ ("lane-action-add"),onClick:c},B("Add list")),g("button",{className: $ ("lane-action-cancel"),onClick:t},B("Cancel"))))}var jC=[Ge.Item,Ge.Lane],qC=[Ge.Lane],Yb=({view:e,stateManager:t})=>{let r=t.useState(),n=Fb(),i=F.useRef(null),a=F.useRef(null),[o,s]=F.useState(""),[u,l]=F.useState(!1),[c,d]=F.useState(""),[f,p]=F.useState((r==null?void 0:r.children.length)===0),m=t.file.path,y=t.useSetting("max-archive-size"),b=F.useCallback(()=>{(r==null?void 0:r.children.length)>0&&p(!1)},[r==null?void 0:r.children.length]);F.useEffect(()=>{(r==null?void 0:r.children.length)===0&&!t.hasError()&&p(!0)},[r==null?void 0:r.children.length,t]);let x=F.useCallback(()=>{var O;(O=i.current)==null||O.win.setTimeout(()=>{var z;let W=(z=i.current)==null?void 0:z.getElementsByClassName( $ ("board"));(W==null?void 0:W.length)&&Cs([W[0].scrollWidth,0],{elementToScroll:W[0],speed:300,minDuration:150,easing:ee=>ee===1?1:1-Math.pow(2,-10*ee)})})},[]);F.useEffect(()=>{let O=z=>{z==="editor:open-search"&&l(ee=>!ee)},W=()=>{p(!0)};return e.emitter.on("hotkey",O),e.emitter.on("showLaneForm",W),()=>{e.emitter.off("hotkey",O),e.emitter.off("showLaneForm",W)}},[e]),F.useEffect(()=>{var O;u&&((O=a.current)==null||O.focus())},[u]),F.useEffect(()=>{let O=e.getWindow(),W=o.trim(),z;return W?z=O.setTimeout(()=>{d
` )}var $ a=function(e){_1(t,e);function t(r,n,i,a,o){var s=this.constructor,u=e.call(this,Cw(r,{name:n,index:i,operation:a,tree:o}))||this;return u.name=n,u.index=i,u.operation=a,u.tree=o,Object.setPrototypeOf(u,s.prototype),u.message=Cw(r,{name:n,index:i,operation:a,tree:o}),u}return t}(Error);var at= $ a,T1=Pt,Fi={add:function(e,t,r){return e[t]=this.value,{newDocument:r}},remove:function(e,t,r){var n=e[t];return delete e[t],{newDocument:r,removed:n}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:function(e,t,r){var n=Xs(r,this.path);n&&(n=Pt(n));var i=zr(r,{op:"remove",path:this.from}).removed;return zr(r,{op:"add",path:this.path,value:i}),{newDocument:r,removed:n}},copy:function(e,t,r){var n=Xs(r,this.from);return zr(r,{op:"add",path:this.path,value:Pt(n)}),{newDocument:r}},test:function(e,t,r){return{newDocument:r,test:Ua(e[t],this.value)}},_get:function(e,t,r){return this.value=e[t],{newDocument:r}}},D1={add:function(e,t,r){return Gs(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:r,index:t}},remove:function(e,t,r){var n=e.splice(t,1);return{newDocument:r,removed:n[0]}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:Fi.move,copy:Fi.copy,test:Fi.test,_get:Fi._get};function Xs(e,t){if(t=="")return e;var r={op:"_get",path:t};return zr(e,r),r.value}function zr(e,t,r,n,i,a){if(r===void 0&&(r=!1),n===void 0&&(n=!0),i===void 0&&(i=!0),a===void 0&&(a=0),r&&(typeof r=="function"?r(t,0,e,t.path):el(t,0)),t.path===""){var o={newDocument:e};if(t.op==="add")return o.newDocument=t.value,o;if(t.op==="replace")return o.newDocument=t.value,o.removed=e,o;if(t.op==="move"||t.op==="copy")return o.newDocument=Xs(e,t.from),t.op==="move"&&(o.removed=e),o;if(t.op==="test"){if(o.test=Ua(e,t.value),o.test===!1)throw new at("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o.newDocument=e,o}else{if(t.op==="remove")return o.removed=e,o.newDocument=null,o;if(t.op==="_get")return t.value=e,o;if(r)throw new at("Operation ` op ` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e);return o}}else{n||(e=Pt(e));var s=t.path||"",u=s.split("/"),l=e,c=1,d=u.length,f=void 0,p=void 0,m=void 0;for(typeof r=="function"?m=r:m=el;;){if(p=u[c],p&&p.indexOf("~")!=-1&&(p=Ka(p)),i&&(p=="__proto__"||p=="prototype"&&c>0&&u[c-1]=="constructor"))throw new TypeError("JSON-Patch: modifying ` _ _proto _ _ ` or ` constructor / prototype ` prop is banned for security reasons, if this was on purpose, please set ` banPrototypeModifications ` flag false and pass it to this function. More info in fast-json-patch README");if(r&&f===void 0&&(l[p]===void 0?f=u.slice(0,c).join("/"):c==d-1&&(f=t.path),f!==void 0&&m(t,0,e,f)),c++,Array.isArray(l)){if(p==="-")p=l.length;else{if(r&&!Gs(p))throw new at("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);Gs(p)&&(p=~~p)}if(c>=d){if(r&&t.op==="add"&&p>l.length)throw new at("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var o=D1[t.op].call(t,l,p,e);if(o.test===!1)throw new at("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}}else if(c>=d){var o=Fi[t.op].call(t,l,p,e);if(o.test===!1)throw new at("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}if(l=l[p],r&&c<d&&(!l||typeof l!="object"))throw new at("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,t,e)}}}function Zs(e,t,r,n,i){if(n===void 0&&(n=!0),i===void 0&&(i=!0),r&&!Array.isArray(t))throw new at("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");n||(e=Pt(e));for(var a=new Array(t.length),o=0,s=t.length;o<s;o++)a[o]=zr(e,t[o],r,!0,i,o),e=a[o].newDocument;return a.newDocument=e,a}function M1(e,t,r){var n=zr(e,t);if(n.test===!1)throw new at("Test operation failed","TEST_OPERATION_FAILED",r,t,e);return n.newDocument}function el(e,t,r,n){if(typeof e!="object"||e===null||Array.isArray(e))throw new at("Operation is n
` ,Nfr:" \u {1D511}",NoBreak:" \u 2060",NonBreakingSpace:" \x A0",Nopf:" \u 2115",Not:" \u 2AEC",NotCongruent:" \u 2262",NotCupCap:" \u 226D",NotDoubleVerticalBar:" \u 2226",NotElement:" \u 2209",NotEqual:" \u 2260",NotEqualTilde:" \u 2242 \u 0338",NotExists:" \u 2204",NotGreater:" \u 226F",NotGreaterEqual:" \u 2271",NotGreaterFullEqual:" \u 2267 \u 0338",NotGreaterGreater:" \u 226B \u 0338",NotGreaterLess:" \u 2279",NotGreaterSlantEqual:" \u 2A7E \u 0338",NotGreaterTilde:" \u 2275",NotHumpDownHump:" \u 224E \u 0338",NotHumpEqual:" \u 224F \u 0338",NotLeftTriangle:" \u 22EA",NotLeftTriangleBar:" \u 29CF \u 0338",NotLeftTriangleEqual:" \u 22EC",NotLess:" \u 226E",NotLessEqual:" \u 2270",NotLessGreater:" \u 2278",NotLessLess:" \u 226A \u 0338",NotLessSlantEqual:" \u 2A7D \u 0338",NotLessTilde:" \u 2274",NotNestedGreaterGreater:" \u 2AA2 \u 0338",NotNestedLessLess:" \u 2AA1 \u 0338",NotPrecedes:" \u 2280",NotPrecedesEqual:" \u 2AAF \u 0338",NotPrecedesSlantEqual:" \u 22E0",NotReverseElement:" \u 220C",NotRightTriangle:" \u 22EB",NotRightTriangleBar:" \u 29D0 \u 0338",NotRightTriangleEqual:" \u 22ED",NotSquareSubset:" \u 228F \u 0338",NotSquareSubsetEqual:" \u 22E2",NotSquareSuperset:" \u 2290 \u 0338",NotSquareSupersetEqual:" \u 22E3",NotSubset:" \u 2282 \u 20D2",NotSubsetEqual:" \u 2288",NotSucceeds:" \u 2281",NotSucceedsEqual:" \u 2AB0 \u 0338",NotSucceedsSlantEqual:" \u 22E1",NotSucceedsTilde:" \u 227F \u 0338",NotSuperset:" \u 2283 \u 20D2",NotSupersetEqual:" \u 2289",NotTilde:" \u 2241",NotTildeEqual:" \u 2244",NotTildeFullEqual:" \u 2247",NotTildeTilde:" \u 2249",NotVerticalBar:" \u 2224",Nscr:" \u {1D4A9}",Ntilde:" \x D1",Nu:" \u 039D",OElig:" \u 0152",Oacute:" \x D3",Ocirc:" \x D4",Ocy:" \u 041E",Odblac:" \u 0150",Ofr:" \u {1D512}",Ograve:" \x D2",Omacr:" \u 014C",Omega:" \u 03A9",Omicron:" \u 039F",Oopf:" \u {1D546}",OpenCurlyDoubleQuote:" \u 201C",OpenCurlyQuote:" \u 2018",Or:" \u 2A54",Oscr:" \u {1D4AA}",Oslash:" \x D8",Otilde:" \x D5",Otimes:" \u 2A37",Ouml:" \x D6",OverBar:" \u 203E",OverBrace:" \u 23DE",OverBracket:" \u 23B4",OverParenthesis:" \u 23DC",PartialD:" \u 2202",Pcy:" \u 041F",Pfr:" \u {1D513}",Phi:" \u 03A6",Pi:" \u 03A0",PlusMinus:" \x B1",Poincareplane:" \u 210C",Popf:" \u 2119",Pr:" \u 2ABB",Precedes:" \u 227A",PrecedesEqual:" \u 2AAF",PrecedesSlantEqual:" \u 227C",PrecedesTilde:" \u 227E",Prime:" \u 2033",Product:" \u 220F",Proportion:" \u 2237",Proportional:" \u 221D",Pscr:" \u {1D4AB}",Psi:" \u 03A8",QUOT:'"',Qfr:" \u {1D514}",Qopf:" \u 211A",Qscr:" \u {1D4AC}",RBarr:" \u 2910",REG:" \x AE",Racute:" \u 0154",Rang:" \u 27EB",Rarr:" \u 21A0",Rarrtl:" \u 2916",Rcaron:" \u 0158",Rcedil:" \u 0156",Rcy:" \u 0420",Re:" \u 211C",ReverseElement:" \u 220B",ReverseEquilibrium:" \u 21CB",ReverseUpEquilibrium:" \u 296F",Rfr:" \u 211C",Rho:" \u 03A1",RightAngleBracket:" \u 27E9",RightArrow:" \u 2192",RightArrowBar:" \u 21E5",RightArrowLeftArrow:" \u 21C4",RightCeiling:" \u 2309",RightDoubleBracket:" \u 27E7",RightDownTeeVector:" \u 295D",RightDownVector:" \u 21C2",RightDownVectorBar:" \u 2955",RightFloor:" \u 230B",RightTee:" \u 22A2",RightTeeArrow:" \u 21A6",RightTeeVector:" \u 295B",RightTriangle:" \u 22B3",RightTriangleBar:" \u 29D0",RightTriangleEqual:" \u 22B5",RightUpDownVector:" \u 294F",RightUpTeeVector:" \u 295C",RightUpVector:" \u 21BE",RightUpVectorBar:" \u 2954",RightVector:" \u 21C0",RightVectorBar:" \u 2953",Rightarrow:" \u 21D2",Ropf:" \u 211D",RoundImplies:" \u 2970",Rrightarrow:" \u 21DB",Rscr:" \u 211B",Rsh:" \u 21B1",RuleDelayed:" \u 29F4",SHCHcy:" \u 0429",SHcy:" \u 0428",SOFTcy:" \u 042C",Sacute:" \u 015A",Sc:" \u 2ABC",Scaron:" \u 0160",Scedil:" \u 015E",Scirc:" \u 015C",Scy:" \u 0421",Sfr:" \u {1D516}",ShortDownArrow:" \u 2193",ShortLeftArrow:" \u 2190",ShortRightArrow:" \u 2192",ShortUpArrow:" \u 2191",Sigma:" \u 03A3",SmallCircle:" \u 2218",Sopf:" \u {1D54A}",Sqrt:" \u 221A",Square:" \u 25A1",SquareIntersection:" \u 2293",SquareSubset:" \u 228F",SquareSubsetEqual:" \u 2291",SquareSuperset:" \u 2290",SquareSupersetEqual:" \u 2292",SquareUnion:" \u 2294",Sscr:" \u {1D4AE}",Star:" \u 22C6",Sub:" \u 22D0",Subset:" \u 22D0",SubsetEqual:" \u 2286",Succeeds:" \u 227B",SucceedsEqual:" \u 2AB0",SucceedsSlantEqual:" \u 227D",SucceedsTilde:" \u 227F",SuchThat:" \u 220B",Sum:" \u 2211",Sup:" \u 22D1",Superset:" \u 2283",SupersetEqual:" \u 2287",Supset:" \u 22D1",THORN:" \x DE",TRADE:" \u 2122",TSHcy:" \u 040B",TScy:" \u 0426",Tab:" ",Tau:" \u 03A4",Tcaron:" \u 0164",Tcedil:" \u 0162",Tcy:" \u 0422",Tfr:" \u {1D517}",T
2022-01-05 20:52:55 +00:00
` ;break}case-3:{o= ` \ r
2022-09-18 14:03:25 +00:00
` ;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,n.push(o)}return n.join("")}var uf={};zi(uf,{attentionMarkers:()=>oD,contentInitial:()=>eD,disable:()=>sD,document:()=>ZT,flow:()=>nD,flowInitial:()=>tD,insideSpan:()=>aD,string:()=>rD,text:()=>iD});h();var ZT={[42]:Wt,[43]:Wt,[45]:Wt,[48]:Wt,[49]:Wt,[50]:Wt,[51]:Wt,[52]:Wt,[53]:Wt,[54]:Wt,[55]:Wt,[56]:Wt,[57]:Wt,[62]:rl},eD={[91]:tf},tD={[-2]:Ya,[-1]:Ya,[32]:Ya},nD={[35]:rf,[42]:Yr,[45]:[dl,Yr],[60]:of,[61]:dl,[95]:Yr,[96]:ol,[126]:ol},rD={[38]:al,[92]:il},iD={[-5]:Ja,[-4]:Ja,[-3]:Ja,[33]:lf,[38]:al,[42]:qa,[60]:[Qd,sf],[91]:cf,[92]:[nf,il],[93]:qr,[95]:qa,[96]:Zd},aD={null:[qa,tE]},oD={null:[42,95]},sD={null:[]};function sE(e={}){let t=Ww([uf].concat(e.extensions||[])),r={defined:[],lazy:{},constructs:t,content:n(Jw),document:n(Gw),flow:n(eE),string:n(nE),text:n(rE)};return r;function n(i){return a;function a(o){return oE(r,i,o)}}}h();var lE=/[ \0 \t \n \r ]/g;function cE(){let e=1,t="",r=!0,n;return i;function i(a,o,s){let u=[],l,c,d,f,p;for(a=t+a.toString(o),d=0,t="",r&&(a.charCodeAt(0)===65279&&d++,r=void 0);d<a.length;){if(lE.lastIndex=d,l=lE.exec(a),f=l&&l.index!==void 0?l.index:a.length,p=a.charCodeAt(f),!l){t=a.slice(d);break}if(p===10&&d===f&&n)u.push(-3),n=void 0;else switch(n&&(u.push(-5),n=void 0),d<f&&(u.push(a.slice(d,f)),e+=f-d),p){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:n=!0,e=1}d=f+1}return s&&(n&&u.push(-5),t&&u.push(t),u.push(null)),u}}h();function uE(e){for(;!sl(e););return e}h();function fl(e,t){let r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)==65535||(r&65535)==65534||r>1114111?" \u FFFD":String.fromCharCode(r)}h();var lD=/ \\ ([!-/:-@[- ` { - ~ ] ) | & ( # ( ? : \ d { 1 , 7 } | x [ \ da - f ] { 1 , 6 } ) | [ \ da - z ] { 1 , 31 } ) ; / g i ; f u n c t i o n d E ( e ) { r e t u r n e . r e p l a c e ( l D , c D ) } f u n c t i o n c D ( e , t , r ) { i f ( t ) r e t u r n t ; i f ( r . c h a r C o d e A t ( 0 ) = = = 3 5 ) { l e t i = r . c h a r C o d e A t ( 1 ) , a = i = = = 1 2 0 | | i = = = 8 8 ; r e t u r n f l ( r . s l i c e ( a ? 2 : 1 ) , a ? 1 6 : 1 0 ) } r e t u r n O i ( r ) | | e } h ( ) ; f u n c t i o n G a ( e ) { r e t u r n ! e | | t y p e o f e ! = " o b j e c t " ? " " : " p o s i t i o n " i n e | | " t y p e " i n e ? f E ( e . p o s i t i o n ) : " s t a r t " i n e | | " e n d " i n e ? f E ( e ) : " l i n e " i n e | | " c o l u m n " i n e ? d f ( e ) : " " } f u n c t i o n d f ( e ) { r e t u r n p E ( e & & e . l i n e ) + " : " + p E ( e & & e . c o l u m n ) } f u n c t i o n f E ( e ) { r e t u r n d f ( e & & e . s t a r t ) + " - " + d f ( e & & e . e n d ) } f u n c t i o n p E ( e ) { r e t u r n e & & t y p e o f e = = " n u m b e r " ? e : 1 } v a r f f = { } . h a s O w n P r o p e r t y , p l = f u n c t i o n ( e , t , r ) { r e t u r n t y p e o f t ! = " s t r i n g " & & ( r = t , t = v o i d 0 ) , u D ( r ) ( u E ( s E ( r ) . d o c u m e n t ( ) . w r i t e ( c E ( ) ( e , t , ! 0 ) ) ) ) } ; f u n c t i o n u D ( e = { } ) { l e t t = h E ( { t r a n s f o r m s : [ ] , c a n C o n t a i n E o l s : [ " e m p h a s i s " , " f r a g m e n t " , " h e a d i n g " , " p a r a g r a p h " , " s t r o n g " ] , e n t e r : { a u t o l i n k : u ( G r ) , a u t o l i n k P r o t o c o l : l e , a u t o l i n k E m a i l : l e , a t x H e a d i n g : u ( $ n ) , b l o c k Q u o t e : u ( u t ) , c h a r a c t e r E s c a p e : l e , c h a r a c t e r R e f e r e n c e : l e , c o d e F e n c e d : u ( v t ) , c o d e F e n c e d F e n c e I n f o : l , c o d e F e n c e d F e n c e M e t a : l , c o d e I n d e n t e d : u ( v t , l ) , c o d e T e x t : u ( N t , l ) , c o d e T e x t D a t a : l e , d a t a : l e , c o d e F l o w V a l u e : l e , d e f i n i t i o n : u ( B n ) , d e f i n i t i o n D e s t i n a t i o n S t r i n g : l , d e f i n i t i o n L a b e l S t r i n g : l , d e f i n i t i o n T i t l e S t r i n g : l , e m p h a s i s : u ( K n ) , h a r d B r e a k E s c a p e : u ( b n ) , h a r d B r e a k T r a i l i n g : u ( b n ) , h t m l F l o w : u ( w n , l ) , h t m l F l o w D a t a : l e , h t m l T e x t : u ( w n , l ) , h t m l T e x t D a t a : l e , i m a g e : u ( U n ) , l a b e l : l , l i n k : u ( G r ) , l i s t I t e m : u ( X r ) , l i s t I t e m V a l u e : y , l i s t O r d e r e d : u ( Q r , m ) , l i s t U n o r d e r e d : u ( Q r ) , p a r a g r a p h : u ( r r ) , r e f e r e n c e : j , r e f e r e n c e S t r i n g : l , r e s o u r c e D e s t i n a t i o n S t r i n g : l , r e s o u r c e T i t l e S t r i n g : l , s e t e x t H e a d i n g : u ( $ n ) , s t r o n g : u ( O t ) , t h e m a t i c B r e a k : u ( y t ) } , e x i t : { a t x H e a d i n g : d ( ) , a t x H e a d i n g S e q u e n c e : W , a u t o l i n k : d ( ) , a u t o l i n k E m a i l : U e , a u t o l i n k P r o t o c o l : k e , b l o c k Q u o t e : d ( ) , c h a r a c t e r E s c a p e V a l u e : X , c h a r a c t e r R e f e r e n c e M a r k e r H e x a d e c i m a l : t e , c h a r a c t e r R e f e r e n c e M a r k e r N u m e r i c : t e , c h a r a c t e r R e f e r e n c e V a l u e : w e , c o d e F e n c e d : d ( C ) , c o d e F e n c e d F e n c e : D , c o d e F e n c e d F e n c e I n f o : b , c o d e F e n c e d F e n c e M e t a : x , c o d e F l o w V a l u e : X , c o d e I n d e n t e d : d ( A ) , c o d e T e x t : d ( v e ) , c o d e T e x t D a t a : X , d a t a : X , d e f i n i t i o n : d ( ) , d e f i n i t i o n D e s t i n a t i o n S t r i n g : O , d e f i n i t i o n L a b e l S t r i n g : N , d e f i n i t i o n T i t l e S t r i n g : T , e m p h a s i s : d ( ) , h a r d B r e a k E s c a p e : d ( r e ) , h a r d B r e a k T r a i l i n g : d ( r e ) , h t m l F l o w : d ( p e ) , h t m l F l o w D a t a : X , h t m l T e x t : d ( h e ) , h t m l T e x t D a t a : X , i m a g e : d ( D e ) , l a b e l : P , l a b e l T e x t : L , l i n e E n d i n g : G , l i n k : d ( b e ) , l i s t I t e m : d ( ) , l i s t O r d e r e d : d ( ) , l i s t U n o r d e
` )}function SD(e){if(e.length){let t=[Kb,"", ` # # $ { B ( "Archive" ) } ` ,""];return e.forEach(r=>{t.push(HE(r))}),t.join( `
` )}return""}function BE(e){let t=e.children.reduce((n,i)=>n+kD(i),"");return["---","",(0,FE.stringifyYaml)(e.data.frontmatter),"---","",""].join( `
` )+t+SD(e.data.archive)+ $ b(e.data.settings)}var bf=class{constructor(t){this.stateManager=t}newItem(t,r,n){return OE(this.stateManager,t,r,n)}updateItemContent(t,r){return yf(this.stateManager,t,r)}boardToMd(t){return BE(t)}mdToBoard(t){let{ast:r,settings:n,frontmatter:i}=PE(this.stateManager,t),a=NE(this.stateManager,n,i,r,t);if(!this.stateManager.hasError()&&this.stateManager.state){let s=Ud(this.stateManager.state,a).filter(l=>["/id","/dom","/date","/time","/titleSearch","/file"].every(c=>!l.path.endsWith(c))),u=(0,KE.immutableJSONPatch)(this.stateManager.state,s);return $ w(this.stateManager,u,s)}return Kw(this.stateManager,a)}reparseBoard(){return RE(this.stateManager,this.stateManager.state)}};var wf=class{constructor(t,r,n,i,a){this.stateReceivers=[];this.settingsNotifiers=new Map;this.viewSet=new Set;this.compiledSettings={};this.newBoardPromise=null;this.getSetting=(t,r)=>r&&r[t]!==void 0?r[t]:this.compiledSettings&&this.compiledSettings[t]!==void 0?this.compiledSettings[t]:this.getSettingRaw(t);this.getSettingRaw=(t,r)=>{var n,i;return r&&r[t]!==void 0?r[t]:((i=(n=this.state)==null?void 0:n.data)==null?void 0:i.settings)&&this.state.data.settings[t]!==void 0?this.state.data.settings[t]:this.getGlobalSetting(t)};this.getGlobalSetting=t=>{let r=this.getGlobalSettings();return r&&r[t]!==void 0?r[t]:null};this.app=t,this.file=r.file,this.onEmpty=i,this.getGlobalSettings=a,this.parser=new bf(this),this.registerView(r,n,!0)}getAView(){return this.viewSet.values().next().value}hasError(){var t,r,n;return!!((n=(r=(t=this.state)==null?void 0:t.data)==null?void 0:r.errors)==null?void 0:n.length)}registerView(t,r,n){this.viewSet.has(t)||(this.viewSet.add(t),t.initHeaderButtons()),n&&(this.newBoardPromise!==null?this.newBoardPromise.then(()=>this.newBoard(r)):this.newBoardPromise=this.newBoard(r).then(()=>{this.newBoardPromise=null}).catch(i=>{console.error(i),this.setError(i)}))}unregisterView(t){this.viewSet.has(t)&&(this.viewSet.delete(t),this.viewSet.size===0&&this.onEmpty())}buildSettingRetrievers(){return{getGlobalSettings:this.getGlobalSettings,getGlobalSetting:this.getGlobalSetting,getSetting:this.getSetting}}async newBoard(t){try{await this.setState(await this.getParsedBoard(t),!1)}catch(r){this.setError(r)}}saveToDisk(){if(this.state.data.errors.length>0)return;let t=this.getAView();if(t){let r=this.parser.boardToMd(this.state);t.requestSaveToDisk(r),this.viewSet.forEach(n=>{n.data=r})}}softRefresh(){this.stateReceivers.forEach(t=>t({...this.state}))}async forceRefresh(){if(this.state)try{this.compileSettings(),this.state=await this.parser.reparseBoard(),this.stateReceivers.forEach(t=>t(this.state)),this.viewSet.forEach(t=>t.initHeaderButtons())}catch(t){console.error(t),this.setError(t)}}async setState(t,r=!0){var n;try{let i=(n=this.state)==null?void 0:n.data.settings,a=typeof t=="function"?await t(this.state):t,o=a==null?void 0:a.data.settings;i&&o&&Vb(i,o)?(this.state=(0, $ i.default)(this.state,{data:{settings:{ $ set:o}}}),this.compileSettings(),this.state=await this.parser.reparseBoard()):(this.state=a,this.compileSettings()),this.viewSet.forEach(s=>s.initHeaderButtons()),r&&this.saveToDisk(),this.stateReceivers.forEach(s=>s(this.state)),i!==o&&o&&this.settingsNotifiers.forEach((s,u)=>{(!i&&o||i[u]!==o[u])&&s.forEach(l=>l())})}catch(i){console.error(i),this.setError(i)}}useState(){let[t,r]=F.useState(this.state);return F.useEffect(()=>(this.stateReceivers.push(n=>{r(n)}),r(this.state),()=>{this.stateReceivers.remove(r)}),[]),t}useSetting(t){let[r,n]=F.useState(this.getSetting(t));return F.useEffect(()=>{let i=()=>{n(this.getSetting(t))};return this.settingsNotifiers.has(t)?this.settingsNotifiers.get(t).push(i):this.settingsNotifiers.set(t,[i]),()=>{this.settingsNotifiers.get(t).remove(i)}},[]),r}compileSettings(t){var s,u,l,c,d;let r=this.getGlobalSetting("metadata-keys")||[],n=this.getSettingRaw("metadata-keys",t)||[],i=this.getSettingRaw("date-format",t)||li(this.app),a=this.getSettingRaw("time-format",t)||ra(this.app),o=this.getSettingRaw("prepend-archive-format",t)|| ` $ { i } $ { a } ` ;this.compiledSettings={"date
2022-01-05 20:52:55 +00:00
/ * !
* Fuse . js v3 . 4.5 - Lightweight fuzzy - search ( http : //fusejs.io)
*
* Copyright ( c ) 2012 - 2017 Kirollos Risk ( http : //kiro.me)
* All Rights Reserved . Apache Software License 2.0
*
* http : //www.apache.org/licenses/LICENSE-2.0
* /
/ * !
* The buffer module from node . js , for the browser .
*
* @ author Feross Aboukhadijeh < feross @ feross . org > < http : //feross.org>
* @ license MIT
* /
/ * !
* https : //github.com/Starcounter-Jack/JSON-Patch
2022-08-23 16:25:36 +00:00
* ( c ) 2017 - 2021 Joachim Wester
2022-01-05 20:52:55 +00:00
* MIT license
* /
2022-08-23 16:25:36 +00:00
/ * !
* https : //github.com/Starcounter-Jack/JSON-Patch
* ( c ) 2017 - 2022 Joachim Wester
* MIT licensed
* /
2022-01-05 20:52:55 +00:00
/ * !
* is - plain - object < https : //github.com/jonschlinkert/is-plain-object>
*
* Copyright ( c ) 2014 - 2017 , Jon Schlinkert .
* Released under the MIT License .
* /
/*! choices.js v9.0.1 | © 2019 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* mark . js v8 . 11.1
* https : //markjs.io/
* Copyright ( c ) 2014 – 2018 , Julian Kühnel
* Released under the MIT license https : //git.io/vwTVl
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /