varar=Object.create;varM2=Object.defineProperty,nr=Object.defineProperties,or=Object.getOwnPropertyDescriptor,ir=Object.getOwnPropertyDescriptors,lr=Object.getOwnPropertyNames,Q2=Object.getOwnPropertySymbols,cr=Object.getPrototypeOf,M5=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable;varft=(t,e,r)=>eint?M2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,D1=(t,e)=>{for(varrine||(e={}))M5.call(e,r)&&ft(t,r,e[r]);if(Q2)for(varrofQ2(e))gt.call(e,r)&&ft(t,r,e[r]);returnt},M0=(t,e)=>nr(t,ir(e)),pt=t=>M2(t,"__esModule",{value:!0});varCt=(t,e)=>{varr={};for(varaint)M5.call(t,a)&&e.indexOf(a)<0&&(r[a]=t[a]);if(t!=null&&Q2)for(varaofQ2(t))e.indexOf(a)<0&>.call(t,a)&&(r[a]=t[a]);returnr};varN1=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),hr=(t,e)=>{pt(t);for(varrine)M2(t,r,{get:e[r],enumerable:!0})},sr=(t,e,r)=>{if(e&&typeofe=="object"||typeofe=="function")for(letaoflr(e))!M5.call(t,a)&&a!=="default"&&M2(t,a,{get:()=>e[a],enumerable:!(r=or(e,a))||r.enumerable});returnt},y1=t=>sr(pt(M2(t!=null?ar(cr(t)):{},"default",t&&t.__esModule&&"default"int?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);varw1=(t,e,r)=>newPromise((a,n)=>{varo=c=>{try{l(r.next(c))}catch(h){n(h)}},i=c=>{try{l(r.throw(c))}catch(h){n(h)}},l=c=>c.done?a(c.value):Promise.resolve(c.value).then(o,i);l((r=r.apply(t,e)).next())});varo7=N1((hv,n7)=>{"use strict";varOr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";n7.exports=Or});varh7=N1((sv,c7)=>{"use strict";varDr=o7();functioni7(){}functionl7(){}l7.resetWarningCache=i7;c7.exports=function(){functiont(a,n,o,i,l,c){if(c!==Dr){varh=newError("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throwh.name="Invariant Violation",h}}t.isRequired=t;functione(){returnt}varr={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:l7,resetWarningCache:i7};returnr.PropTypes=r,r}});varR5=N1((dv,s7)=>{s7.exports=h7()();varvv,uv});varR7=N1((gv,c4)=>{varv7,u7,d7,g7,f7,p7,C7,M7,x7,i4,S5,z7,m7,H7,G0,V7,L7,w7,B7,y7,_7,Z7,b7,l4;(function(t){vare=typeofglobal=="object"?global:typeofself=="object"?self:typeofthis=="object"?this:{};typeofdefine=="function"&&define.amd?define("tslib",["exports"],function(a){t(r(e,r(a)))}):typeofc4=="object"&&typeofc4.exports=="object"?t(r(e,r(c4.exports))):t(r(e));functionr(a,n){returna!==e&&(typeofObject.create=="function"?Object.defineProperty(a,"__esModule",{value:!0}):a.__esModule=!0),function(o,i){returna[o]=n?n(o,i):i}}})(function(t){vare=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(a,n){a.__proto__=n}||function(a,n){for(varoinn)Object.prototype.hasOwnProperty.call(n,o)&&(a[o]=n[o])};v7=function(a,n){if(typeofn!="function"&&n!==null)thrownewTypeError("Class extends value "+String(n)+" is not a constructor or null");e(a,n);functiono(){this.constructor=a}a.prototype=n===null?Object.create(n):(o.prototype=n.prototype,newo)},u7=Object.assign||function(a){for(varn,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(varlinn)Object.prototype.hasOwnProperty.call(n,l)&&(a[l]=n[l])}returna},d7=function(a,n){varo={};for(variina)Object.prototype.hasOwnProperty.call(a,i)&&n.indexOf(i)<0&&(o[i]=a[i]);if(a!=null&&typeofObject.getOwnPropertySymbols=="function")for(varl=0,i=Object.getOwnPropertySymbols(a);l<i.length;l++)n.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(a,i[l])&&(o[i[l]]=a[i[l]]);returno},g7=function(a,n,o,i){varl=arguments.length,c=l<3?n:i===null?i=Object.getOwnPropertyDescriptor(n,o):i,h;if(typeofReflect=="object"&&typeofReflect.decorate=="function")c=Reflect.decorate(a,n,o,i);elsefor(vars=a.length-1;s>=0;s--)(h=a[s])&&(c=(l<3?h(c):l>3?h(n,o,c):h(n,o))||c);returnl>3&&c&&Object.defineProperty(n,o,c),c},f7=function(a,n){returnfunction(o,i){n(o,i,a)}},p7=function(a,n){if
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}function Qr(t,e){if(!!t){if(typeof t=="string")return O7(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return O7(t,e)}}function O7(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}function ta(t,e){var r=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var a=[],n=!0,o=!1,i,l;try{for(r=r.call(t);!(n=(i=r.next()).done)&&(a.push(i.value),!(e&&a.length===e));n=!0);}catch(c){o=!0,l=c}finally{try{!n&&r.return!=null&&r.return()}finally{if(o)throw l}}return a}}function ea(t){if(Array.isArray(t))return t}var ra="file-invalid-type",aa="file-too-large",na="file-too-small",oa="too-many-files";var ia=function(e){e=Array.isArray(e)&&e.length===1?e[0]:e;var r=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:ra,message:"File type must be ".concat(r)}},N7=function(e){return{code:aa,message:"File is larger than ".concat(e," bytes")}},U7=function(e){return{code:na,message:"File is smaller than ".concat(e," bytes")}},$7={code:oa,message:"Too many files"};function I5(t,e){var r=t.type==="application/x-moz-file"||(0,D7.default)(t,e);return[r,r?null:ia(e)]}function E5(t,e,r){if(B2(t.size))if(B2(e)&&B2(r)){if(t.size>r)return[!1,N7(r)];if(t.size<e)return[!1,U7(e)]}else{if(B2(e)&&t.size<e)return[!1,U7(e)];if(B2(r)&&t.size>r)return[!1,N7(r)]}return[!0,null]}function B2(t){return t!=null}function j7(t){var e=t.files,r=t.accept,a=t.minSize,n=t.maxSize,o=t.multiple,i=t.maxFiles;return!o&&e.length>1||o&&i>=1&&e.length>i?!1:e.every(function(l){var c=I5(l,r),h=k7(c,1),s=h[0],u=E5(l,a,n),v=k7(u,1),f=v[0];return s&&f})}function y2(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble!="undefined"?t.cancelBubble:!1}function _2(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function F5(t){t.preventDefault()}function la(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function ca(t){return t.indexOf("Edge/")!==-1}function W7(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return la(t)||ca(t)}function c0(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(a){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return e.some(function(l){return!y2(a)&&l&&l.apply(void 0,[a].concat(o)),y2(a)})}}var ha=["children"],sa=["open"],va=["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],ua=["refKey","onChange","onClick"];function da(t){return pa(t)||fa(t)||G7(t)||ga()}function ga(){throw new TypeError(`Invalidattempttospreadnon-iterableinstance.
Allsubfoldersaregoingtobeexcluded,aswell.Youneedtoreloadthevaulttomakechangeseffective.`).addTextArea(i=>i.setValue(this.plugin.settings.excludedFolders).onChange(l=>{this.plugin.settings.excludedFolders=l,this.plugin.saveSettings()})),e.createEl("h2",{text:"Clear Data"}),new B1.Setting(e).setName("Clear All Cache Data").setDesc(`Thisbuttonwillclearthefollowingcachedata:"Last position of the divider"&"List of expanded folders in the folder pane",
&"Last active folder path".Itwillnottouchyoursettingsaboveandlistofpinnedfiles.Itisrecommendedtodothisclearingonceinawhile.`).addButton(i=>{let l=i.setTooltip("Click here to clear the cache data").setButtonText("Click for Clearing the Cache").onClick(()=>w1(this,null,function*(){r.removeFromLocalStorage({key:this.plugin.keys.customHeightKey}),r.removeFromLocalStorage({key:this.plugin.keys.openFoldersKey}),r.removeFromLocalStorage({key:this.plugin.keys.activeFolderPathKey}),this.plugin.refreshTreeLeafs(),new B1.Notice("The plugin cache is cleared...")}))}),new B1.Setting(e).setName("Clear Pinned Files").setDesc("This button will clear the pinned files in the file list pane.").addButton(i=>{let l=i.setTooltip("Click here to clear the pinned files").setButtonText("Click for Clearing the Pinned files").onClick(()=>w1(this,null,function*(){r.removeFromLocalStorage({key:this.plugin.keys.pinnedFilesKey}),this.plugin.refreshTreeLeafs(),new B1.Notice("The pinned files are cleared...")}))})}};var ut=class extends v2.Plugin{constructor(){super(...arguments);this.ribbonIconEl=void 0;this.keys={activeFolderPathKey:"fileTreePlugin-ActiveFolderPath",pinnedFilesKey:"fileTreePlugin-PinnedFiles",openFoldersKey:"fileTreePlugin-OpenFolders",customHeightKey:"fileTreePlugin-CustomHeight"};this.refreshIconRibbon=()=>{var e;(e=this.ribbonIconEl)==null||e.remove(),this.settings.ribbonIcon&&(this.ribbonIconEl=this.addRibbonIcon(ht,"File Tree Alternative Plugin",()=>w1(this,null,function*(){yield this.openFileTreeLeaf(!0)})))};this.openFileTreeLeaf=e=>w1(this,null,function*(){if(this.app.workspace.getLeavesOfType(s2).length==0){let r=this.app.workspace.getLeftLeaf(!1);yield r.setViewState({type:s2}),e&&this.app.workspace.revealLeaf(r)}});this.detachFileTreeLeafs=()=>{let e=this.app.workspace.getLeavesOfType(s2);for(let r of e)r.view.destroy(),r.detach()};this.refreshTreeLeafs=()=>{this.detachFileTreeLeafs(),this.openFileTreeLeaf(!0)}}onload(){return w1(this,null,function*(){console.log("Loading Alternative File Tree Plugin"),(0,v2.addIcon)("zoomInIcon",J6),(0,v2.addIcon)("zoomOutIcon",Y6),(0,v2.addIcon)("zoomOutDoubleIcon",X6),this.addSettingTab(new vt(this.app,this)),yield this.loadSettings(),this.registerView(s2,e=>new st(e,this)),this.app.workspace.onLayoutReady(()=>w1(this,null,function*(){return yield this.openFileTreeLeaf(!0)})),this.addCommand({id:"open-file-tree-leaf",name:"Open File Tree Leaf",callback:()=>w1(this,null,function*(){return yield this.openFileTreeLeaf(!0)})}),this.refreshIconRibbon()})}onunload(){console.log("Unloading Alternative File Tree Plugin"),this.detachFileTreeLeafs()}loadSettings(){return w1(this,null,function*(){this.settings=Object.assign({},tr,yield this.loadData())})}saveSettings(){return w1(this,null,function*(){yield this.saveData(this.settings)})}};0&&(module.exports={});