Oscar Plaisant 66c143b7b3 update
2024-05-14 10:51:40 +02:00

17 lines
74 KiB
JavaScript

/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var $t=Object.defineProperty;var hr=Object.getOwnPropertyDescriptor;var gr=Object.getOwnPropertyNames;var xr=Object.prototype.hasOwnProperty;var Lr=(t,e,a)=>e in t?$t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var Ir=(t,e)=>{for(var a in e)$t(t,a,{get:e[a],enumerable:!0})},Cr=(t,e,a,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of gr(e))!xr.call(t,r)&&r!==a&&$t(t,r,{get:()=>e[r],enumerable:!(o=hr(e,r))||o.enumerable});return t};var br=t=>Cr($t({},"__esModule",{value:!0}),t);var X=(t,e,a)=>(Lr(t,typeof e!="symbol"?e+"":e,a),a);var Bl={};Ir(Bl,{default:()=>Sa});module.exports=br(Bl);var ur=require("obsidian");var wr=require("obsidian");var lo="obsidian-vertical-tabs-view";var Wt=t=>{console.log(`[${lo}]: ${t}`)};var oe=require("obsidian");var so={left:"left",right:"right"},wa={TARGET:{directory:"directory",title:"title"},CONDITION:{startsWith:"starts with",endsWith:"ends with",includes:"includes",equals:"equals",regexp:"regexp"}},va={matchConfig:{target:"title",condition:"startsWith",value:""},priority:1,icon:"file"};var zt=require("obsidian"),no=(t,e,a,o,r)=>new zt.Setting(t).setName(e).setDesc(a).addText(l=>l.setValue(o).onChange(r)),$e=(t,e,a,o,r)=>new zt.Setting(t).setName(e).setDesc(a).addToggle(l=>l.setValue(o).onChange(r)),uo=(t,e,a,o,r,l)=>new zt.Setting(t).setName(e).setDesc(a).addDropdown(s=>{s.addOptions(o).setValue(r).onChange(l)});var io={defaultPosition:"left",showDirectory:!0,showCloseIcon:!0,showPinnedIcon:!0,showPinIconIfNotPinned:!0,showTabIcon:!0,customizeTabIcon:!1,defaultTabIcon:"file",tabIconRules:[]},Xt=class extends oe.PluginSettingTab{constructor(a,o){super(a,o);this.plugin=o,this.settings=structuredClone(o.settings)}save(){this.plugin.saveSettings(this.settings)}display(){let{containerEl:a}=this;if(a.empty(),uo(a,"Default position","Default position of vertical tabs view opened",so,this.settings.defaultPosition,o=>{this.settings.defaultPosition=o,this.save()}),$e(a,"Show directory","",this.settings.showDirectory,o=>{this.settings.showDirectory=o,this.save()}),$e(a,"Show close icon","",this.settings.showCloseIcon,o=>{this.settings.showCloseIcon=o,this.save()}),$e(a,"Show pinned icon","",this.settings.showPinnedIcon,o=>{this.settings.showPinnedIcon=o,this.save()}),$e(a,"Show pin icon if not pinned","",this.settings.showPinIconIfNotPinned,o=>{this.settings.showPinIconIfNotPinned=o,this.save()}),$e(a,"Show tab icon","",this.settings.showTabIcon,o=>{this.settings.showTabIcon=o,this.save(),this.display()}),$e(a,"Customize tab icon","",this.settings.customizeTabIcon,o=>{this.settings.customizeTabIcon=o,this.save(),this.display()}),this.settings.customizeTabIcon){let{previewIconWrapper:o,previewIcon:r,previewIconText:l}=this.createPreviewIcon(this.settings.defaultTabIcon);no(a,"Default tab icon","If you clear this field, icon will be hidden by default.",this.settings.defaultTabIcon,i=>{this.settings.defaultTabIcon=i,this.save(),(0,oe.setIcon)(r,i),r.children.length===0?l.innerText="Not found.":l.innerText="Preview: "}).setDesc("See https://lucide.dev/icons for available icons.").controlEl.prepend(o),new oe.Setting(a).setName("Icon rules for override icon");let n=a.createEl("div");n.className="vertical-tabs-view-settings-tab-icon-rules",this.settings.tabIconRules.length===0&&this.settings.tabIconRules.push(structuredClone(va)),this.settings.tabIconRules.forEach((i,d)=>{this.addTabIconRule(n,i,d)}),new oe.Setting(n).addButton(i=>{i.setButtonText("Add").onClick(async()=>{this.settings.tabIconRules.push(structuredClone(va)),this.display()})}).setClass("vertical-tabs-view-settings-tab-icon-rules-add-btn")}}createPreviewIcon(a){let o=document.createElement("div");o.className="vertical-tabs-view-settings-tab-preview-icon-wrapper";let r=document.createElement("div");r.className="vertical-tabs-view-settings-tab-preview-icon-text",r.innerText="Preview: ";let l=document.createElement("div");return(0,oe.setIcon)(l,a),l.children.length===0?r.innerText="Icon not found":r.innerText="Preview: ",o.setChildrenInPlace([r,l]),{previewIconWrapper:o,previewIcon:l,previewIconText:r}}addTabIconRule(a,o,r){let l=a.createEl("div");l.className="vertical-tabs-view-settings-tab-icon-rule-wrapper";let s=l.createEl("div");s.className="vertical-tabs-view-settings-tab-icon-rule-match-config-wrapper",new oe.Setting(s).addDropdown(f=>{f.addOptions(wa.TARGET).setValue(o.matchConfig.target).onChange(async h=>{o.matchConfig.target=h,this.save()})}).setName("Match target"),new oe.Setting(s).addDropdown(f=>{f.addOptions(wa.CONDITION).setValue(o.matchConfig.condition).onChange(async h=>{o.matchConfig.condition=h,this.save()})}).setName("Match condition"),new oe.Setting(s).addText(f=>{f.setValue(o.matchConfig.value).onChange(h=>{o.matchConfig.value=h,this.save()})}).setName("Match value").setDesc("For regexp, write like: /foo/i"),new oe.Setting(s).addSlider(f=>{f.setLimits(1,100,1).setValue(o.priority).onChange(h=>{o.priority=h,this.save()}).setDynamicTooltip()}).setName("Priority").setDesc("If there are multiple configs with the same priority, the one defined first will be prioritized.");let{previewIconWrapper:n,previewIcon:u,previewIconText:i}=this.createPreviewIcon(o.icon);new oe.Setting(s).addText(f=>{f.setValue(o.icon).onChange(h=>{o.icon=h,this.save(),(0,oe.setIcon)(u,h),u.children.length===0?i.innerText="Icon not found":i.innerText="Preview: "})}).setName("Icon").setDesc("See https://lucide.dev/icons for available icons.").controlEl.prepend(n);let p=l.createEl("div");p.className="vertical-tabs-view-settings-tab-icon-rule-remove-btn-wrapper";let x=p.createEl("button");x.setText("Remove"),x.onclick=()=>{this.settings.tabIconRules.splice(r,1),this.save(),this.display()}}};var sr=require("obsidian");var ya=async(t,e)=>{t.workspace.setActiveLeaf(e,{focus:!0})},fo=async(t,e)=>{let a=t.workspace.getLeafById(e);if(a)return await ya(t,a),a};function ge(){}function re(t,e){for(let a in e)t[a]=e[a];return t}function _a(t){return t()}function jt(){return Object.create(null)}function ue(t){t.forEach(_a)}function Ct(t){return typeof t=="function"}function xe(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function co(t){return Object.keys(t).length===0}function Qe(t,e,a,o){if(t){let r=po(t,e,a,o);return t[0](r)}}function po(t,e,a,o){return t[1]&&o?re(a.ctx.slice(),t[1](o(e))):a.ctx}function et(t,e,a,o){if(t[2]&&o){let r=t[2](o(a));if(e.dirty===void 0)return r;if(typeof r=="object"){let l=[],s=Math.max(e.dirty.length,r.length);for(let n=0;n<s;n+=1)l[n]=e.dirty[n]|r[n];return l}return e.dirty|r}return e.dirty}function tt(t,e,a,o,r,l){if(r){let s=po(e,a,o,l);t.p(s,r)}}function at(t){if(t.ctx.length>32){let e=[],a=t.ctx.length/32;for(let o=0;o<a;o++)e[o]=-1;return e}return-1}function Te(t){let e={};for(let a in t)a[0]!=="$"&&(e[a]=t[a]);return e}function ka(t,e){let a={};e=new Set(e);for(let o in t)!e.has(o)&&o[0]!=="$"&&(a[o]=t[o]);return a}var Ta=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;var ot=class{constructor(e){X(this,"_listeners","WeakMap"in Ta?new WeakMap:void 0);X(this,"_observer");X(this,"options");this.options=e}observe(e,a){return this._listeners.set(e,a),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!=null?e:this._observer=new ResizeObserver(a=>{var o;for(let r of a)ot.entries.set(r.target,r),(o=this._listeners.get(r.target))==null||o(r)})}};ot.entries="WeakMap"in Ta?new WeakMap:void 0;var Kt=!1;function mo(){Kt=!0}function ho(){Kt=!1}function _r(t,e,a,o){for(;t<e;){let r=t+(e-t>>1);a(r)<=o?t=r+1:e=r}return t}function kr(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if(t.nodeName==="HEAD"){let u=[];for(let i=0;i<e.length;i++){let d=e[i];d.claim_order!==void 0&&u.push(d)}e=u}let a=new Int32Array(e.length+1),o=new Int32Array(e.length);a[0]=-1;let r=0;for(let u=0;u<e.length;u++){let i=e[u].claim_order,d=(r>0&&e[a[r]].claim_order<=i?r+1:_r(1,r,x=>e[a[x]].claim_order,i))-1;o[u]=a[d]+1;let p=d+1;a[p]=u,r=Math.max(p,r)}let l=[],s=[],n=e.length-1;for(let u=a[r]+1;u!=0;u=o[u-1]){for(l.push(e[u-1]);n>=u;n--)s.push(e[n]);n--}for(;n>=0;n--)s.push(e[n]);l.reverse(),s.sort((u,i)=>u.claim_order-i.claim_order);for(let u=0,i=0;u<s.length;u++){for(;i<l.length&&s[u].claim_order>=l[i].claim_order;)i++;let d=i<l.length?l[i]:null;t.insertBefore(s[u],d)}}function ee(t,e){t.appendChild(e)}function go(t,e,a){let o=xo(t);if(!o.getElementById(e)){let r=J("style");r.id=e,r.textContent=a,Tr(o,r)}}function xo(t){if(!t)return document;let e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Tr(t,e){return ee(t.head||t,e),e.sheet}function Yt(t,e){if(Kt){for(kr(t),(t.actual_end_child===void 0||t.actual_end_child!==null&&t.actual_end_child.parentNode!==t)&&(t.actual_end_child=t.firstChild);t.actual_end_child!==null&&t.actual_end_child.claim_order===void 0;)t.actual_end_child=t.actual_end_child.nextSibling;e!==t.actual_end_child?(e.claim_order!==void 0||e.parentNode!==t)&&t.insertBefore(e,t.actual_end_child):t.actual_end_child=e.nextSibling}else(e.parentNode!==t||e.nextSibling!==null)&&t.appendChild(e)}function Le(t,e,a){t.insertBefore(e,a||null)}function bt(t,e,a){Kt&&!a?Yt(t,e):(e.parentNode!==t||e.nextSibling!=a)&&t.insertBefore(e,a||null)}function $(t){t.parentNode&&t.parentNode.removeChild(t)}function Zt(t,e){for(let a=0;a<t.length;a+=1)t[a]&&t[a].d(e)}function J(t){return document.createElement(t)}function Jt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function St(t){return document.createTextNode(t)}function rt(){return St(" ")}function wt(){return St("")}function We(t,e,a,o){return t.addEventListener(e,a,o),()=>t.removeEventListener(e,a,o)}function N(t,e,a){a==null?t.removeAttribute(e):t.getAttribute(e)!==a&&t.setAttribute(e,a)}function vt(t,e){for(let a in e)N(t,a,e[a])}function yt(t){return Array.from(t.childNodes)}function Dr(t){t.claim_info===void 0&&(t.claim_info={last_index:0,total_claimed:0})}function Fr(t,e,a,o,r=!1){Dr(t);let l=(()=>{for(let s=t.claim_info.last_index;s<t.length;s++){let n=t[s];if(e(n)){let u=a(n);return u===void 0?t.splice(s,1):t[s]=u,r||(t.claim_info.last_index=s),n}}for(let s=t.claim_info.last_index-1;s>=0;s--){let n=t[s];if(e(n)){let u=a(n);return u===void 0?t.splice(s,1):t[s]=u,r?u===void 0&&t.claim_info.last_index--:t.claim_info.last_index=s,n}}return o()})();return l.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,l}function Ar(t,e,a,o){return Fr(t,r=>r.nodeName===e,r=>{let l=[];for(let s=0;s<r.attributes.length;s++){let n=r.attributes[s];a[n.name]||l.push(n.name)}l.forEach(s=>r.removeAttribute(s))},()=>o(e))}function Da(t,e,a){return Ar(t,e,a,Jt)}function Fa(t,e){e=""+e,t.data!==e&&(t.data=e)}function _t(t,e,a){t.classList.toggle(e,!!a)}function Lo(t){let e={};return t.childNodes.forEach(a=>{e[a.slot||"default"]=!0}),e}var Oe;function De(t){Oe=t}function Co(){if(!Oe)throw new Error("Function called outside component initialization");return Oe}function Aa(t){Co().$$.on_mount.push(t)}var ze=[];var Qt=[],st=[],bo=[],Rr=Promise.resolve(),Ba=!1;function So(){Ba||(Ba=!0,Rr.then(ea))}function kt(t){st.push(t)}var Pa=new Set,lt=0;function ea(){if(lt!==0)return;let t=Oe;do{try{for(;lt<ze.length;){let e=ze[lt];lt++,De(e),Ur(e.$$)}}catch(e){throw ze.length=0,lt=0,e}for(De(null),ze.length=0,lt=0;Qt.length;)Qt.pop()();for(let e=0;e<st.length;e+=1){let a=st[e];Pa.has(a)||(Pa.add(a),a())}st.length=0}while(ze.length);for(;bo.length;)bo.pop()();Ba=!1,Pa.clear(),De(t)}function Ur(t){if(t.fragment!==null){t.update(),ue(t.before_update);let e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(kt)}}function wo(t){let e=[],a=[];st.forEach(o=>t.indexOf(o)===-1?e.push(o):a.push(o)),a.forEach(o=>o()),st=e}var ta=new Set,Xe;function Tt(){Xe={r:0,c:[],p:Xe}}function Dt(){Xe.r||ue(Xe.c),Xe=Xe.p}function B(t,e){t&&t.i&&(ta.delete(t),t.i(e))}function q(t,e,a,o){if(t&&t.o){if(ta.has(t))return;ta.add(t),Xe.c.push(()=>{ta.delete(t),o&&(a&&t.d(1),o())}),t.o(e)}else o&&o()}function Me(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function je(t,e){let a={},o={},r={$$scope:1},l=t.length;for(;l--;){let s=t[l],n=e[l];if(n){for(let u in s)u in n||(o[u]=1);for(let u in n)r[u]||(a[u]=n[u],r[u]=1);t[l]=n}else for(let u in s)r[u]=1}for(let s in o)s in a||(a[s]=void 0);return a}function aa(t){return typeof t=="object"&&t!==null?t:{}}var Hr=["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"],Nr=new Set([...Hr]);function Re(t){t&&t.c()}function oa(t,e){t&&t.l(e)}function Fe(t,e,a){let{fragment:o,after_update:r}=t.$$;o&&o.m(e,a),kt(()=>{let l=t.$$.on_mount.map(_a).filter(Ct);t.$$.on_destroy?t.$$.on_destroy.push(...l):ue(l),t.$$.on_mount=[]}),r.forEach(kt)}function Ae(t,e){let a=t.$$;a.fragment!==null&&(wo(a.after_update),ue(a.on_destroy),a.fragment&&a.fragment.d(e),a.on_destroy=a.fragment=null,a.ctx=[])}function Vr(t,e){t.$$.dirty[0]===-1&&(ze.push(t),So(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Ue(t,e,a,o,r,l,s=null,n=[-1]){let u=Oe;De(t);let i=t.$$={fragment:null,ctx:[],props:l,update:ge,not_equal:r,bound:jt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:jt(),dirty:n,skip_bound:!1,root:e.target||u.$$.root};s&&s(i.root);let d=!1;if(i.ctx=a?a(t,e.props||{},(p,x,...f)=>{let h=f.length?f[0]:x;return i.ctx&&r(i.ctx[p],i.ctx[p]=h)&&(!i.skip_bound&&i.bound[p]&&i.bound[p](h),d&&Vr(t,p)),x}):[],i.update(),d=!0,ue(i.before_update),i.fragment=o?o(i.ctx):!1,e.target){if(e.hydrate){mo();let p=yt(e.target);i.fragment&&i.fragment.l(p),p.forEach($)}else i.fragment&&i.fragment.c();e.intro&&B(t.$$.fragment),Fe(t,e.target,e.anchor),ho(),ea()}De(u)}var Gr;typeof HTMLElement=="function"&&(Gr=class extends HTMLElement{constructor(e,a,o){super();X(this,"$$ctor");X(this,"$$s");X(this,"$$c");X(this,"$$cn",!1);X(this,"$$d",{});X(this,"$$r",!1);X(this,"$$p_d",{});X(this,"$$l",{});X(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=a,o&&this.attachShadow({mode:"open"})}addEventListener(e,a,o){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(a),this.$$c){let r=this.$$c.$on(e,a);this.$$l_u.set(a,r)}super.addEventListener(e,a,o)}removeEventListener(e,a,o){if(super.removeEventListener(e,a,o),this.$$c){let r=this.$$l_u.get(a);r&&(r(),this.$$l_u.delete(a))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(l){return()=>{let s;return{c:function(){s=J("slot"),l!=="default"&&N(s,"name",l)},m:function(i,d){Le(i,s,d)},d:function(i){i&&$(s)}}}};if(await Promise.resolve(),!this.$$cn)return;let a={},o=Lo(this);for(let l of this.$$s)l in o&&(a[l]=[e(l)]);for(let l of this.attributes){let s=this.$$g_p(l.name);s in this.$$d||(this.$$d[s]=Ea(s,l.value,this.$$p_d,"toProp"))}this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:a,$$scope:{ctx:[]}}});let r=()=>{this.$$r=!0;for(let l in this.$$p_d)if(this.$$d[l]=this.$$c.$$.ctx[this.$$c.$$.props[l]],this.$$p_d[l].reflect){let s=Ea(l,this.$$d[l],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[l].attribute||l):this.setAttribute(this.$$p_d[l].attribute||l,s)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(let l in this.$$l)for(let s of this.$$l[l]){let n=this.$$c.$on(l,s);this.$$l_u.set(s,n)}this.$$l={}}}attributeChangedCallback(e,a,o){var r;this.$$r||(e=this.$$g_p(e),this.$$d[e]=Ea(e,o,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(a=>this.$$p_d[a].attribute===e||!this.$$p_d[a].attribute&&a.toLowerCase()===e)||e}});function Ea(t,e,a,o){var l;let r=(l=a[t])==null?void 0:l.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!a[t])return e;if(o==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e==null?null:e;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}var Ie=class{constructor(){X(this,"$$");X(this,"$$set")}$destroy(){Ae(this,1),this.$destroy=ge}$on(e,a){if(!Ct(a))return ge;let o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(a),()=>{let r=o.indexOf(a);r!==-1&&o.splice(r,1)}}$set(e){this.$$set&&!co(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var vo="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(vo);function le(t,e,a,o){function r(l){return l instanceof a?l:new a(function(s){s(l)})}return new(a||(a=Promise))(function(l,s){function n(d){try{i(o.next(d))}catch(p){s(p)}}function u(d){try{i(o.throw(d))}catch(p){s(p)}}function i(d){d.done?l(d.value):r(d.value).then(n,u)}i((o=o.apply(t,e||[])).next())})}var be=require("obsidian");function yo(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),a.push.apply(a,o)}return a}function ye(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?yo(Object(a),!0).forEach(function(o){$r(t,o,a[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):yo(Object(a)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(a,o))})}return t}function ua(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ua=function(e){return typeof e}:ua=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ua(t)}function $r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Be(){return Be=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(t[o]=a[o])}return t},Be.apply(this,arguments)}function Wr(t,e){if(t==null)return{};var a={},o=Object.keys(t),r,l;for(l=0;l<o.length;l++)r=o[l],!(e.indexOf(r)>=0)&&(a[r]=t[r]);return a}function zr(t,e){if(t==null)return{};var a=Wr(t,e),o,r;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)o=l[r],!(e.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(a[o]=t[o])}return a}var Xr="1.15.0";function Pe(t){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(t)}var Ee=Pe(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ut=Pe(/Edge/i),_o=Pe(/firefox/i),Bt=Pe(/safari/i)&&!Pe(/chrome/i)&&!Pe(/android/i),Eo=Pe(/iP(ad|od|hone)/i),Oo=Pe(/chrome/i)&&Pe(/android/i),Mo={capture:!1,passive:!1};function T(t,e,a){t.addEventListener(e,a,!Ee&&Mo)}function _(t,e,a){t.removeEventListener(e,a,!Ee&&Mo)}function pa(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(a){return!1}return!1}}function jr(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function we(t,e,a,o){if(t){a=a||document;do{if(e!=null&&(e[0]===">"?t.parentNode===a&&pa(t,e):pa(t,e))||o&&t===a)return t;if(t===a)break}while(t=jr(t))}return null}var ko=/\s+/g;function ie(t,e,a){if(t&&e)if(t.classList)t.classList[a?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(ko," ").replace(" "+e+" "," ");t.className=(o+(a?" "+e:"")).replace(ko," ")}}function C(t,e,a){var o=t&&t.style;if(o){if(a===void 0)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(a=t.currentStyle),e===void 0?a:a[e];!(e in o)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),o[e]=a+(typeof a=="string"?"":"px")}}function ft(t,e){var a="";if(typeof t=="string")a=t;else do{var o=C(t,"transform");o&&o!=="none"&&(a=o+" "+a)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(a)}function Ro(t,e,a){if(t){var o=t.getElementsByTagName(e),r=0,l=o.length;if(a)for(;r<l;r++)a(o[r],r);return o}return[]}function ve(){var t=document.scrollingElement;return t||document.documentElement}function W(t,e,a,o,r){if(!(!t.getBoundingClientRect&&t!==window)){var l,s,n,u,i,d,p;if(t!==window&&t.parentNode&&t!==ve()?(l=t.getBoundingClientRect(),s=l.top,n=l.left,u=l.bottom,i=l.right,d=l.height,p=l.width):(s=0,n=0,u=window.innerHeight,i=window.innerWidth,d=window.innerHeight,p=window.innerWidth),(e||a)&&t!==window&&(r=r||t.parentNode,!Ee))do if(r&&r.getBoundingClientRect&&(C(r,"transform")!=="none"||a&&C(r,"position")!=="static")){var x=r.getBoundingClientRect();s-=x.top+parseInt(C(r,"border-top-width")),n-=x.left+parseInt(C(r,"border-left-width")),u=s+l.height,i=n+l.width;break}while(r=r.parentNode);if(o&&t!==window){var f=ft(r||t),h=f&&f.a,I=f&&f.d;f&&(s/=I,n/=h,p/=h,d/=I,u=s+d,i=n+p)}return{top:s,left:n,bottom:u,right:i,width:p,height:d}}}function To(t,e,a){for(var o=qe(t,!0),r=W(t)[e];o;){var l=W(o)[a],s=void 0;if(a==="top"||a==="left"?s=r>=l:s=r<=l,!s)return o;if(o===ve())break;o=qe(o,!1)}return!1}function ct(t,e,a,o){for(var r=0,l=0,s=t.children;l<s.length;){if(s[l].style.display!=="none"&&s[l]!==b.ghost&&(o||s[l]!==b.dragged)&&we(s[l],a.draggable,t,!1)){if(r===e)return s[l];r++}l++}return null}function ja(t,e){for(var a=t.lastElementChild;a&&(a===b.ghost||C(a,"display")==="none"||e&&!pa(a,e));)a=a.previousElementSibling;return a||null}function me(t,e){var a=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==b.clone&&(!e||pa(t,e))&&a++;return a}function Do(t){var e=0,a=0,o=ve();if(t)do{var r=ft(t),l=r.a,s=r.d;e+=t.scrollLeft*l,a+=t.scrollTop*s}while(t!==o&&(t=t.parentNode));return[e,a]}function Kr(t,e){for(var a in t)if(t.hasOwnProperty(a)){for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[a][o])return Number(a)}return-1}function qe(t,e){if(!t||!t.getBoundingClientRect)return ve();var a=t,o=!1;do if(a.clientWidth<a.scrollWidth||a.clientHeight<a.scrollHeight){var r=C(a);if(a.clientWidth<a.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||a.clientHeight<a.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!a.getBoundingClientRect||a===document.body)return ve();if(o||e)return a;o=!0}}while(a=a.parentNode);return ve()}function Yr(t,e){if(t&&e)for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);return t}function Oa(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}var Et;function Uo(t,e){return function(){if(!Et){var a=arguments,o=this;a.length===1?t.call(o,a[0]):t.apply(o,a),Et=setTimeout(function(){Et=void 0},e)}}}function Zr(){clearTimeout(Et),Et=void 0}function Ho(t,e,a){t.scrollLeft+=e,t.scrollTop+=a}function No(t){var e=window.Polymer,a=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):a?a(t).clone(!0)[0]:t.cloneNode(!0)}var fe="Sortable"+new Date().getTime();function Jr(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(r){if(!(C(r,"display")==="none"||r===b.ghost)){t.push({target:r,rect:W(r)});var l=ye({},t[t.length-1].rect);if(r.thisAnimationDuration){var s=ft(r,!0);s&&(l.top-=s.f,l.left-=s.e)}r.fromRect=l}})}},addAnimationState:function(o){t.push(o)},removeAnimationState:function(o){t.splice(Kr(t,{target:o}),1)},animateAll:function(o){var r=this;if(!this.options.animation){clearTimeout(e),typeof o=="function"&&o();return}var l=!1,s=0;t.forEach(function(n){var u=0,i=n.target,d=i.fromRect,p=W(i),x=i.prevFromRect,f=i.prevToRect,h=n.rect,I=ft(i,!0);I&&(p.top-=I.f,p.left-=I.e),i.toRect=p,i.thisAnimationDuration&&Oa(x,p)&&!Oa(d,p)&&(h.top-p.top)/(h.left-p.left)===(d.top-p.top)/(d.left-p.left)&&(u=el(h,x,f,r.options)),Oa(p,d)||(i.prevFromRect=d,i.prevToRect=p,u||(u=r.options.animation),r.animate(i,h,p,u)),u&&(l=!0,s=Math.max(s,u),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout(function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null},u),i.thisAnimationDuration=u)}),clearTimeout(e),l?e=setTimeout(function(){typeof o=="function"&&o()},s):typeof o=="function"&&o(),t=[]},animate:function(o,r,l,s){if(s){C(o,"transition",""),C(o,"transform","");var n=ft(this.el),u=n&&n.a,i=n&&n.d,d=(r.left-l.left)/(u||1),p=(r.top-l.top)/(i||1);o.animatingX=!!d,o.animatingY=!!p,C(o,"transform","translate3d("+d+"px,"+p+"px,0)"),this.forRepaintDummy=Qr(o),C(o,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),C(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){C(o,"transition",""),C(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},s)}}}}function Qr(t){return t.offsetWidth}function el(t,e,a,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-a.top,2)+Math.pow(e.left-a.left,2))*o.animation}var nt=[],Ma={initializeByDefault:!0},Ht={mount:function(e){for(var a in Ma)Ma.hasOwnProperty(a)&&!(a in e)&&(e[a]=Ma[a]);nt.forEach(function(o){if(o.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),nt.push(e)},pluginEvent:function(e,a,o){var r=this;this.eventCanceled=!1,o.cancel=function(){r.eventCanceled=!0};var l=e+"Global";nt.forEach(function(s){a[s.pluginName]&&(a[s.pluginName][l]&&a[s.pluginName][l](ye({sortable:a},o)),a.options[s.pluginName]&&a[s.pluginName][e]&&a[s.pluginName][e](ye({sortable:a},o)))})},initializePlugins:function(e,a,o,r){nt.forEach(function(n){var u=n.pluginName;if(!(!e.options[u]&&!n.initializeByDefault)){var i=new n(e,a,e.options);i.sortable=e,i.options=e.options,e[u]=i,Be(o,i.defaults)}});for(var l in e.options)if(e.options.hasOwnProperty(l)){var s=this.modifyOption(e,l,e.options[l]);typeof s!="undefined"&&(e.options[l]=s)}},getEventProperties:function(e,a){var o={};return nt.forEach(function(r){typeof r.eventProperties=="function"&&Be(o,r.eventProperties.call(a[r.pluginName],e))}),o},modifyOption:function(e,a,o){var r;return nt.forEach(function(l){e[l.pluginName]&&l.optionListeners&&typeof l.optionListeners[a]=="function"&&(r=l.optionListeners[a].call(e[l.pluginName],o))}),r}};function tl(t){var e=t.sortable,a=t.rootEl,o=t.name,r=t.targetEl,l=t.cloneEl,s=t.toEl,n=t.fromEl,u=t.oldIndex,i=t.newIndex,d=t.oldDraggableIndex,p=t.newDraggableIndex,x=t.originalEvent,f=t.putSortable,h=t.extraEventProperties;if(e=e||a&&a[fe],!!e){var I,v=e.options,G="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!Ee&&!Ut?I=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(I=document.createEvent("Event"),I.initEvent(o,!0,!0)),I.to=s||a,I.from=n||a,I.item=r||a,I.clone=l,I.oldIndex=u,I.newIndex=i,I.oldDraggableIndex=d,I.newDraggableIndex=p,I.originalEvent=x,I.pullMode=f?f.lastPutMode:void 0;var U=ye(ye({},h),Ht.getEventProperties(o,e));for(var y in U)I[y]=U[y];a&&a.dispatchEvent(I),v[G]&&v[G].call(e,I)}}var al=["evt"],se=function(e,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=o.evt,l=zr(o,al);Ht.pluginEvent.bind(b)(e,a,ye({dragEl:g,parentEl:R,ghostEl:w,rootEl:E,nextEl:Ze,lastDownEl:ia,cloneEl:O,cloneHidden:Ne,dragStarted:Ft,putSortable:K,activeSortable:b.active,originalEvent:r,oldIndex:dt,oldDraggableIndex:Ot,newIndex:de,newDraggableIndex:He,hideGhostForTarget:$o,unhideGhostForTarget:Wo,cloneNowHidden:function(){Ne=!0},cloneNowShown:function(){Ne=!1},dispatchSortableEvent:function(n){te({sortable:a,name:n,originalEvent:r})}},l))};function te(t){tl(ye({putSortable:K,cloneEl:O,targetEl:g,rootEl:E,oldIndex:dt,oldDraggableIndex:Ot,newIndex:de,newDraggableIndex:He},t))}var g,R,w,E,Ze,ia,O,Ne,dt,de,Ot,He,ra,K,it=!1,ma=!1,ha=[],Ke,Ce,Ra,Ua,Fo,Ao,Ft,ut,Mt,Rt=!1,la=!1,da,Q,Ha=[],$a=!1,ga=[],La=typeof document!="undefined",sa=Eo,Po=Ut||Ee?"cssFloat":"float",ol=La&&!Oo&&!Eo&&"draggable"in document.createElement("div"),qo=function(){if(La){if(Ee)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Vo=function(e,a){var o=C(e),r=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),l=ct(e,0,a),s=ct(e,1,a),n=l&&C(l),u=s&&C(s),i=n&&parseInt(n.marginLeft)+parseInt(n.marginRight)+W(l).width,d=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+W(s).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(l&&n.float&&n.float!=="none"){var p=n.float==="left"?"left":"right";return s&&(u.clear==="both"||u.clear===p)?"vertical":"horizontal"}return l&&(n.display==="block"||n.display==="flex"||n.display==="table"||n.display==="grid"||i>=r&&o[Po]==="none"||s&&o[Po]==="none"&&i+d>r)?"vertical":"horizontal"},rl=function(e,a,o){var r=o?e.left:e.top,l=o?e.right:e.bottom,s=o?e.width:e.height,n=o?a.left:a.top,u=o?a.right:a.bottom,i=o?a.width:a.height;return r===n||l===u||r+s/2===n+i/2},ll=function(e,a){var o;return ha.some(function(r){var l=r[fe].options.emptyInsertThreshold;if(!(!l||ja(r))){var s=W(r),n=e>=s.left-l&&e<=s.right+l,u=a>=s.top-l&&a<=s.bottom+l;if(n&&u)return o=r}}),o},Go=function(e){function a(l,s){return function(n,u,i,d){var p=n.options.group.name&&u.options.group.name&&n.options.group.name===u.options.group.name;if(l==null&&(s||p))return!0;if(l==null||l===!1)return!1;if(s&&l==="clone")return l;if(typeof l=="function")return a(l(n,u,i,d),s)(n,u,i,d);var x=(s?n:u).options.group.name;return l===!0||typeof l=="string"&&l===x||l.join&&l.indexOf(x)>-1}}var o={},r=e.group;(!r||ua(r)!="object")&&(r={name:r}),o.name=r.name,o.checkPull=a(r.pull,!0),o.checkPut=a(r.put),o.revertClone=r.revertClone,e.group=o},$o=function(){!qo&&w&&C(w,"display","none")},Wo=function(){!qo&&w&&C(w,"display","")};La&&!Oo&&document.addEventListener("click",function(t){if(ma)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),ma=!1,!1},!0);var Ye=function(e){if(g){e=e.touches?e.touches[0]:e;var a=ll(e.clientX,e.clientY);if(a){var o={};for(var r in e)e.hasOwnProperty(r)&&(o[r]=e[r]);o.target=o.rootEl=a,o.preventDefault=void 0,o.stopPropagation=void 0,a[fe]._onDragOver(o)}}},sl=function(e){g&&g.parentNode[fe]._isOutsideThisEl(e.target)};function b(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Be({},e),t[fe]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Vo(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,n){s.setData("Text",n.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:b.supportPointer!==!1&&"PointerEvent"in window&&!Bt,emptyInsertThreshold:5};Ht.initializePlugins(this,t,a);for(var o in a)!(o in e)&&(e[o]=a[o]);Go(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:ol,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?T(t,"pointerdown",this._onTapStart):(T(t,"mousedown",this._onTapStart),T(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(T(t,"dragover",this),T(t,"dragenter",this)),ha.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Be(this,Jr())}b.prototype={constructor:b,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(ut=null)},_getDirection:function(e,a){return typeof this.options.direction=="function"?this.options.direction.call(this,e,a,g):this.options.direction},_onTapStart:function(e){if(e.cancelable){var a=this,o=this.el,r=this.options,l=r.preventOnFilter,s=e.type,n=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,u=(n||e).target,i=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,d=r.filter;if(ml(o),!g&&!(/mousedown|pointerdown/.test(s)&&e.button!==0||r.disabled)&&!i.isContentEditable&&!(!this.nativeDraggable&&Bt&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=we(u,r.draggable,o,!1),!(u&&u.animated)&&ia!==u)){if(dt=me(u),Ot=me(u,r.draggable),typeof d=="function"){if(d.call(this,e,u,this)){te({sortable:a,rootEl:i,name:"filter",targetEl:u,toEl:o,fromEl:o}),se("filter",a,{evt:e}),l&&e.cancelable&&e.preventDefault();return}}else if(d&&(d=d.split(",").some(function(p){if(p=we(i,p.trim(),o,!1),p)return te({sortable:a,rootEl:p,name:"filter",targetEl:u,fromEl:o,toEl:o}),se("filter",a,{evt:e}),!0}),d)){l&&e.cancelable&&e.preventDefault();return}r.handle&&!we(i,r.handle,o,!1)||this._prepareDragStart(e,n,u)}}},_prepareDragStart:function(e,a,o){var r=this,l=r.el,s=r.options,n=l.ownerDocument,u;if(o&&!g&&o.parentNode===l){var i=W(o);if(E=l,g=o,R=g.parentNode,Ze=g.nextSibling,ia=o,ra=s.group,b.dragged=g,Ke={target:g,clientX:(a||e).clientX,clientY:(a||e).clientY},Fo=Ke.clientX-i.left,Ao=Ke.clientY-i.top,this._lastX=(a||e).clientX,this._lastY=(a||e).clientY,g.style["will-change"]="all",u=function(){if(se("delayEnded",r,{evt:e}),b.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!_o&&r.nativeDraggable&&(g.draggable=!0),r._triggerDragStart(e,a),te({sortable:r,name:"choose",originalEvent:e}),ie(g,s.chosenClass,!0)},s.ignore.split(",").forEach(function(d){Ro(g,d.trim(),Na)}),T(n,"dragover",Ye),T(n,"mousemove",Ye),T(n,"touchmove",Ye),T(n,"mouseup",r._onDrop),T(n,"touchend",r._onDrop),T(n,"touchcancel",r._onDrop),_o&&this.nativeDraggable&&(this.options.touchStartThreshold=4,g.draggable=!0),se("delayStart",this,{evt:e}),s.delay&&(!s.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(Ut||Ee))){if(b.eventCanceled){this._onDrop();return}T(n,"mouseup",r._disableDelayedDrag),T(n,"touchend",r._disableDelayedDrag),T(n,"touchcancel",r._disableDelayedDrag),T(n,"mousemove",r._delayedDragTouchMoveHandler),T(n,"touchmove",r._delayedDragTouchMoveHandler),s.supportPointer&&T(n,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(u,s.delay)}else u()}},_delayedDragTouchMoveHandler:function(e){var a=e.touches?e.touches[0]:e;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){g&&Na(g),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;_(e,"mouseup",this._disableDelayedDrag),_(e,"touchend",this._disableDelayedDrag),_(e,"touchcancel",this._disableDelayedDrag),_(e,"mousemove",this._delayedDragTouchMoveHandler),_(e,"touchmove",this._delayedDragTouchMoveHandler),_(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,a){a=a||e.pointerType=="touch"&&e,!this.nativeDraggable||a?this.options.supportPointer?T(document,"pointermove",this._onTouchMove):a?T(document,"touchmove",this._onTouchMove):T(document,"mousemove",this._onTouchMove):(T(g,"dragend",this),T(E,"dragstart",this._onDragStart));try{document.selection?fa(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(o){}},_dragStarted:function(e,a){if(it=!1,E&&g){se("dragStarted",this,{evt:a}),this.nativeDraggable&&T(document,"dragover",sl);var o=this.options;!e&&ie(g,o.dragClass,!1),ie(g,o.ghostClass,!0),b.active=this,e&&this._appendGhost(),te({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(Ce){this._lastX=Ce.clientX,this._lastY=Ce.clientY,$o();for(var e=document.elementFromPoint(Ce.clientX,Ce.clientY),a=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Ce.clientX,Ce.clientY),e!==a);)a=e;if(g.parentNode[fe]._isOutsideThisEl(e),a)do{if(a[fe]){var o=void 0;if(o=a[fe]._onDragOver({clientX:Ce.clientX,clientY:Ce.clientY,target:e,rootEl:a}),o&&!this.options.dragoverBubble)break}e=a}while(a=a.parentNode);Wo()}},_onTouchMove:function(e){if(Ke){var a=this.options,o=a.fallbackTolerance,r=a.fallbackOffset,l=e.touches?e.touches[0]:e,s=w&&ft(w,!0),n=w&&s&&s.a,u=w&&s&&s.d,i=sa&&Q&&Do(Q),d=(l.clientX-Ke.clientX+r.x)/(n||1)+(i?i[0]-Ha[0]:0)/(n||1),p=(l.clientY-Ke.clientY+r.y)/(u||1)+(i?i[1]-Ha[1]:0)/(u||1);if(!b.active&&!it){if(o&&Math.max(Math.abs(l.clientX-this._lastX),Math.abs(l.clientY-this._lastY))<o)return;this._onDragStart(e,!0)}if(w){s?(s.e+=d-(Ra||0),s.f+=p-(Ua||0)):s={a:1,b:0,c:0,d:1,e:d,f:p};var x="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");C(w,"webkitTransform",x),C(w,"mozTransform",x),C(w,"msTransform",x),C(w,"transform",x),Ra=d,Ua=p,Ce=l}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!w){var e=this.options.fallbackOnBody?document.body:E,a=W(g,!0,sa,!0,e),o=this.options;if(sa){for(Q=e;C(Q,"position")==="static"&&C(Q,"transform")==="none"&&Q!==document;)Q=Q.parentNode;Q!==document.body&&Q!==document.documentElement?(Q===document&&(Q=ve()),a.top+=Q.scrollTop,a.left+=Q.scrollLeft):Q=ve(),Ha=Do(Q)}w=g.cloneNode(!0),ie(w,o.ghostClass,!1),ie(w,o.fallbackClass,!0),ie(w,o.dragClass,!0),C(w,"transition",""),C(w,"transform",""),C(w,"box-sizing","border-box"),C(w,"margin",0),C(w,"top",a.top),C(w,"left",a.left),C(w,"width",a.width),C(w,"height",a.height),C(w,"opacity","0.8"),C(w,"position",sa?"absolute":"fixed"),C(w,"zIndex","100000"),C(w,"pointerEvents","none"),b.ghost=w,e.appendChild(w),C(w,"transform-origin",Fo/parseInt(w.style.width)*100+"% "+Ao/parseInt(w.style.height)*100+"%")}},_onDragStart:function(e,a){var o=this,r=e.dataTransfer,l=o.options;if(se("dragStart",this,{evt:e}),b.eventCanceled){this._onDrop();return}se("setupClone",this),b.eventCanceled||(O=No(g),O.removeAttribute("id"),O.draggable=!1,O.style["will-change"]="",this._hideClone(),ie(O,this.options.chosenClass,!1),b.clone=O),o.cloneId=fa(function(){se("clone",o),!b.eventCanceled&&(o.options.removeCloneOnHide||E.insertBefore(O,g),o._hideClone(),te({sortable:o,name:"clone"}))}),!a&&ie(g,l.dragClass,!0),a?(ma=!0,o._loopId=setInterval(o._emulateDragOver,50)):(_(document,"mouseup",o._onDrop),_(document,"touchend",o._onDrop),_(document,"touchcancel",o._onDrop),r&&(r.effectAllowed="move",l.setData&&l.setData.call(o,r,g)),T(document,"drop",o),C(g,"transform","translateZ(0)")),it=!0,o._dragStartId=fa(o._dragStarted.bind(o,a,e)),T(document,"selectstart",o),Ft=!0,Bt&&C(document.body,"user-select","none")},_onDragOver:function(e){var a=this.el,o=e.target,r,l,s,n=this.options,u=n.group,i=b.active,d=ra===u,p=n.sort,x=K||i,f,h=this,I=!1;if($a)return;function v(Ge,Vt){se(Ge,h,ye({evt:e,isOwner:d,axis:f?"vertical":"horizontal",revert:s,dragRect:r,targetRect:l,canSort:p,fromSortable:x,target:o,completed:U,onMove:function(gt,Gt){return na(E,a,g,r,gt,W(gt),e,Gt)},changed:y},Vt))}function G(){v("dragOverAnimationCapture"),h.captureAnimationState(),h!==x&&x.captureAnimationState()}function U(Ge){return v("dragOverCompleted",{insertion:Ge}),Ge&&(d?i._hideClone():i._showClone(h),h!==x&&(ie(g,K?K.options.ghostClass:i.options.ghostClass,!1),ie(g,n.ghostClass,!0)),K!==h&&h!==b.active?K=h:h===b.active&&K&&(K=null),x===h&&(h._ignoreWhileAnimating=o),h.animateAll(function(){v("dragOverAnimationComplete"),h._ignoreWhileAnimating=null}),h!==x&&(x.animateAll(),x._ignoreWhileAnimating=null)),(o===g&&!g.animated||o===a&&!o.animated)&&(ut=null),!n.dragoverBubble&&!e.rootEl&&o!==document&&(g.parentNode[fe]._isOutsideThisEl(e.target),!Ge&&Ye(e)),!n.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),I=!0}function y(){de=me(g),He=me(g,n.draggable),te({sortable:h,name:"change",toEl:a,newIndex:de,newDraggableIndex:He,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),o=we(o,n.draggable,a,!0),v("dragOver"),b.eventCanceled)return I;if(g.contains(e.target)||o.animated&&o.animatingX&&o.animatingY||h._ignoreWhileAnimating===o)return U(!1);if(ma=!1,i&&!n.disabled&&(d?p||(s=R!==E):K===this||(this.lastPutMode=ra.checkPull(this,i,g,e))&&u.checkPut(this,i,g,e))){if(f=this._getDirection(e,o)==="vertical",r=W(g),v("dragOverValid"),b.eventCanceled)return I;if(s)return R=E,G(),this._hideClone(),v("revert"),b.eventCanceled||(Ze?E.insertBefore(g,Ze):E.appendChild(g)),U(!0);var k=ja(a,n.draggable);if(!k||dl(e,f,this)&&!k.animated){if(k===g)return U(!1);if(k&&a===e.target&&(o=k),o&&(l=W(o)),na(E,a,g,r,o,l,e,!!o)!==!1)return G(),k&&k.nextSibling?a.insertBefore(g,k.nextSibling):a.appendChild(g),R=a,y(),U(!0)}else if(k&&il(e,f,this)){var Y=ct(a,0,n,!0);if(Y===g)return U(!1);if(o=Y,l=W(o),na(E,a,g,r,o,l,e,!1)!==!1)return G(),a.insertBefore(g,Y),R=a,y(),U(!0)}else if(o.parentNode===a){l=W(o);var M=0,ne,_e=g.parentNode!==a,j=!rl(g.animated&&g.toRect||r,o.animated&&o.toRect||l,f),P=f?"top":"left",A=To(o,"top","top")||To(g,"top","top"),ce=A?A.scrollTop:void 0;ut!==o&&(ne=l[P],Rt=!1,la=!j&&n.invertSwap||_e),M=fl(e,o,l,f,j?1:n.swapThreshold,n.invertedSwapThreshold==null?n.swapThreshold:n.invertedSwapThreshold,la,ut===o);var he;if(M!==0){var ke=me(g);do ke-=M,he=R.children[ke];while(he&&(C(he,"display")==="none"||he===w))}if(M===0||he===o)return U(!1);ut=o,Mt=M;var Ve=o.nextElementSibling,Se=!1;Se=M===1;var Je=na(E,a,g,r,o,l,e,Se);if(Je!==!1)return(Je===1||Je===-1)&&(Se=Je===1),$a=!0,setTimeout(ul,30),G(),Se&&!Ve?a.appendChild(g):o.parentNode.insertBefore(g,Se?Ve:o),A&&Ho(A,0,ce-A.scrollTop),R=g.parentNode,ne!==void 0&&!la&&(da=Math.abs(ne-W(o)[P])),y(),U(!0)}if(a.contains(g))return U(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){_(document,"mousemove",this._onTouchMove),_(document,"touchmove",this._onTouchMove),_(document,"pointermove",this._onTouchMove),_(document,"dragover",Ye),_(document,"mousemove",Ye),_(document,"touchmove",Ye)},_offUpEvents:function(){var e=this.el.ownerDocument;_(e,"mouseup",this._onDrop),_(e,"touchend",this._onDrop),_(e,"pointerup",this._onDrop),_(e,"touchcancel",this._onDrop),_(document,"selectstart",this)},_onDrop:function(e){var a=this.el,o=this.options;if(de=me(g),He=me(g,o.draggable),se("drop",this,{evt:e}),R=g&&g.parentNode,de=me(g),He=me(g,o.draggable),b.eventCanceled){this._nulling();return}it=!1,la=!1,Rt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Wa(this.cloneId),Wa(this._dragStartId),this.nativeDraggable&&(_(document,"drop",this),_(a,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Bt&&C(document.body,"user-select",""),C(g,"transform",""),e&&(Ft&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),w&&w.parentNode&&w.parentNode.removeChild(w),(E===R||K&&K.lastPutMode!=="clone")&&O&&O.parentNode&&O.parentNode.removeChild(O),g&&(this.nativeDraggable&&_(g,"dragend",this),Na(g),g.style["will-change"]="",Ft&&!it&&ie(g,K?K.options.ghostClass:this.options.ghostClass,!1),ie(g,this.options.chosenClass,!1),te({sortable:this,name:"unchoose",toEl:R,newIndex:null,newDraggableIndex:null,originalEvent:e}),E!==R?(de>=0&&(te({rootEl:R,name:"add",toEl:R,fromEl:E,originalEvent:e}),te({sortable:this,name:"remove",toEl:R,originalEvent:e}),te({rootEl:R,name:"sort",toEl:R,fromEl:E,originalEvent:e}),te({sortable:this,name:"sort",toEl:R,originalEvent:e})),K&&K.save()):de!==dt&&de>=0&&(te({sortable:this,name:"update",toEl:R,originalEvent:e}),te({sortable:this,name:"sort",toEl:R,originalEvent:e})),b.active&&((de==null||de===-1)&&(de=dt,He=Ot),te({sortable:this,name:"end",toEl:R,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){se("nulling",this),E=g=R=w=Ze=O=ia=Ne=Ke=Ce=Ft=de=He=dt=Ot=ut=Mt=K=ra=b.dragged=b.ghost=b.clone=b.active=null,ga.forEach(function(e){e.checked=!0}),ga.length=Ra=Ua=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":g&&(this._onDragOver(e),nl(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],a,o=this.el.children,r=0,l=o.length,s=this.options;r<l;r++)a=o[r],we(a,s.draggable,this.el,!1)&&e.push(a.getAttribute(s.dataIdAttr)||pl(a));return e},sort:function(e,a){var o={},r=this.el;this.toArray().forEach(function(l,s){var n=r.children[s];we(n,this.options.draggable,r,!1)&&(o[l]=n)},this),a&&this.captureAnimationState(),e.forEach(function(l){o[l]&&(r.removeChild(o[l]),r.appendChild(o[l]))}),a&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,a){return we(e,a||this.options.draggable,this.el,!1)},option:function(e,a){var o=this.options;if(a===void 0)return o[e];var r=Ht.modifyOption(this,e,a);typeof r!="undefined"?o[e]=r:o[e]=a,e==="group"&&Go(o)},destroy:function(){se("destroy",this);var e=this.el;e[fe]=null,_(e,"mousedown",this._onTapStart),_(e,"touchstart",this._onTapStart),_(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(_(e,"dragover",this),_(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ha.splice(ha.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Ne){if(se("hideClone",this),b.eventCanceled)return;C(O,"display","none"),this.options.removeCloneOnHide&&O.parentNode&&O.parentNode.removeChild(O),Ne=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Ne){if(se("showClone",this),b.eventCanceled)return;g.parentNode==E&&!this.options.group.revertClone?E.insertBefore(O,g):Ze?E.insertBefore(O,Ze):E.appendChild(O),this.options.group.revertClone&&this.animate(g,O),C(O,"display",""),Ne=!1}}};function nl(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function na(t,e,a,o,r,l,s,n){var u,i=t[fe],d=i.options.onMove,p;return window.CustomEvent&&!Ee&&!Ut?u=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent("move",!0,!0)),u.to=e,u.from=t,u.dragged=a,u.draggedRect=o,u.related=r||e,u.relatedRect=l||W(e),u.willInsertAfter=n,u.originalEvent=s,t.dispatchEvent(u),d&&(p=d.call(i,u,s)),p}function Na(t){t.draggable=!1}function ul(){$a=!1}function il(t,e,a){var o=W(ct(a.el,0,a.options,!0)),r=10;return e?t.clientX<o.left-r||t.clientY<o.top&&t.clientX<o.right:t.clientY<o.top-r||t.clientY<o.bottom&&t.clientX<o.left}function dl(t,e,a){var o=W(ja(a.el,a.options.draggable)),r=10;return e?t.clientX>o.right+r||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+r}function fl(t,e,a,o,r,l,s,n){var u=o?t.clientY:t.clientX,i=o?a.height:a.width,d=o?a.top:a.left,p=o?a.bottom:a.right,x=!1;if(!s){if(n&&da<i*r){if(!Rt&&(Mt===1?u>d+i*l/2:u<p-i*l/2)&&(Rt=!0),Rt)x=!0;else if(Mt===1?u<d+da:u>p-da)return-Mt}else if(u>d+i*(1-r)/2&&u<p-i*(1-r)/2)return cl(e)}return x=x||s,x&&(u<d+i*l/2||u>p-i*l/2)?u>d+i/2?1:-1:0}function cl(t){return me(g)<me(t)?1:-1}function pl(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,a=e.length,o=0;a--;)o+=e.charCodeAt(a);return o.toString(36)}function ml(t){ga.length=0;for(var e=t.getElementsByTagName("input"),a=e.length;a--;){var o=e[a];o.checked&&ga.push(o)}}function fa(t){return setTimeout(t,0)}function Wa(t){return clearTimeout(t)}La&&T(document,"touchmove",function(t){(b.active||it)&&t.cancelable&&t.preventDefault()});b.utils={on:T,off:_,css:C,find:Ro,is:function(e,a){return!!we(e,a,e,!1)},extend:Yr,throttle:Uo,closest:we,toggleClass:ie,clone:No,index:me,nextTick:fa,cancelNextTick:Wa,detectDirection:Vo,getChild:ct};b.get=function(t){return t[fe]};b.mount=function(){for(var t=arguments.length,e=new Array(t),a=0;a<t;a++)e[a]=arguments[a];e[0].constructor===Array&&(e=e[0]),e.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(b.utils=ye(ye({},b.utils),o.utils)),Ht.mount(o)})};b.create=function(t,e){return new b(t,e)};b.version=Xr;var V=[],At,za,Xa=!1,qa,Va,xa,Pt;function hl(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(a){var o=a.originalEvent;this.sortable.nativeDraggable?T(document,"dragover",this._handleAutoScroll):this.options.supportPointer?T(document,"pointermove",this._handleFallbackAutoScroll):o.touches?T(document,"touchmove",this._handleFallbackAutoScroll):T(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(a){var o=a.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?_(document,"dragover",this._handleAutoScroll):(_(document,"pointermove",this._handleFallbackAutoScroll),_(document,"touchmove",this._handleFallbackAutoScroll),_(document,"mousemove",this._handleFallbackAutoScroll)),Bo(),ca(),Zr()},nulling:function(){xa=za=At=Xa=Pt=qa=Va=null,V.length=0},_handleFallbackAutoScroll:function(a){this._handleAutoScroll(a,!0)},_handleAutoScroll:function(a,o){var r=this,l=(a.touches?a.touches[0]:a).clientX,s=(a.touches?a.touches[0]:a).clientY,n=document.elementFromPoint(l,s);if(xa=a,o||this.options.forceAutoScrollFallback||Ut||Ee||Bt){Ga(a,this.options,n,o);var u=qe(n,!0);Xa&&(!Pt||l!==qa||s!==Va)&&(Pt&&Bo(),Pt=setInterval(function(){var i=qe(document.elementFromPoint(l,s),!0);i!==u&&(u=i,ca()),Ga(a,r.options,i,o)},10),qa=l,Va=s)}else{if(!this.options.bubbleScroll||qe(n,!0)===ve()){ca();return}Ga(a,this.options,qe(n,!1),!1)}}},Be(t,{pluginName:"scroll",initializeByDefault:!0})}function ca(){V.forEach(function(t){clearInterval(t.pid)}),V=[]}function Bo(){clearInterval(Pt)}var Ga=Uo(function(t,e,a,o){if(e.scroll){var r=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,s=e.scrollSensitivity,n=e.scrollSpeed,u=ve(),i=!1,d;za!==a&&(za=a,ca(),At=e.scroll,d=e.scrollFn,At===!0&&(At=qe(a,!0)));var p=0,x=At;do{var f=x,h=W(f),I=h.top,v=h.bottom,G=h.left,U=h.right,y=h.width,k=h.height,Y=void 0,M=void 0,ne=f.scrollWidth,_e=f.scrollHeight,j=C(f),P=f.scrollLeft,A=f.scrollTop;f===u?(Y=y<ne&&(j.overflowX==="auto"||j.overflowX==="scroll"||j.overflowX==="visible"),M=k<_e&&(j.overflowY==="auto"||j.overflowY==="scroll"||j.overflowY==="visible")):(Y=y<ne&&(j.overflowX==="auto"||j.overflowX==="scroll"),M=k<_e&&(j.overflowY==="auto"||j.overflowY==="scroll"));var ce=Y&&(Math.abs(U-r)<=s&&P+y<ne)-(Math.abs(G-r)<=s&&!!P),he=M&&(Math.abs(v-l)<=s&&A+k<_e)-(Math.abs(I-l)<=s&&!!A);if(!V[p])for(var ke=0;ke<=p;ke++)V[ke]||(V[ke]={});(V[p].vx!=ce||V[p].vy!=he||V[p].el!==f)&&(V[p].el=f,V[p].vx=ce,V[p].vy=he,clearInterval(V[p].pid),(ce!=0||he!=0)&&(i=!0,V[p].pid=setInterval(function(){o&&this.layer===0&&b.active._onTouchMove(xa);var Ve=V[this.layer].vy?V[this.layer].vy*n:0,Se=V[this.layer].vx?V[this.layer].vx*n:0;typeof d=="function"&&d.call(b.dragged.parentNode[fe],Se,Ve,t,xa,V[this.layer].el)!=="continue"||Ho(V[this.layer].el,Se,Ve)}.bind({layer:p}),24))),p++}while(e.bubbleScroll&&x!==u&&(x=qe(x,!1)));Xa=i}},30),zo=function(e){var a=e.originalEvent,o=e.putSortable,r=e.dragEl,l=e.activeSortable,s=e.dispatchSortableEvent,n=e.hideGhostForTarget,u=e.unhideGhostForTarget;if(a){var i=o||l;n();var d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,p=document.elementFromPoint(d.clientX,d.clientY);u(),i&&!i.el.contains(p)&&(s("spill"),this.onSpill({dragEl:r,putSortable:o}))}};function Ka(){}Ka.prototype={startIndex:null,dragStart:function(e){var a=e.oldDraggableIndex;this.startIndex=a},onSpill:function(e){var a=e.dragEl,o=e.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var r=ct(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(a,r):this.sortable.el.appendChild(a),this.sortable.animateAll(),o&&o.animateAll()},drop:zo};Be(Ka,{pluginName:"revertOnSpill"});function Ya(){}Ya.prototype={onSpill:function(e){var a=e.dragEl,o=e.putSortable,r=o||this.sortable;r.captureAnimationState(),a.parentNode&&a.parentNode.removeChild(a),r.animateAll()},drop:zo};Be(Ya,{pluginName:"removeOnSpill"});b.mount(new hl);b.mount(Ya,Ka);var Xo=b;var Za={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"};function jo(t,e,a){let o=t.slice();return o[10]=e[a][0],o[11]=e[a][1],o}function Ja(t){let e,a=[t[11]],o={};for(let r=0;r<a.length;r+=1)o=re(o,a[r]);return{c(){e=Jt(t[10]),this.h()},l(r){e=Da(r,t[10],{}),yt(e).forEach($),this.h()},h(){vt(e,o)},m(r,l){bt(r,e,l)},p(r,l){vt(e,o=je(a,[l&32&&r[11]]))},d(r){r&&$(e)}}}function Ko(t){let e=t[10],a,o=t[10]&&Ja(t);return{c(){o&&o.c(),a=wt()},l(r){o&&o.l(r),a=wt()},m(r,l){o&&o.m(r,l),bt(r,a,l)},p(r,l){r[10]?e?xe(e,r[10])?(o.d(1),o=Ja(r),e=r[10],o.c(),o.m(a.parentNode,a)):o.p(r,l):(o=Ja(r),e=r[10],o.c(),o.m(a.parentNode,a)):e&&(o.d(1),o=null,e=r[10])},d(r){r&&$(a),o&&o.d(r)}}}function gl(t){var x;let e,a,o,r,l,s=Me(t[5]),n=[];for(let f=0;f<s.length;f+=1)n[f]=Ko(jo(t,s,f));let u=t[9].default,i=Qe(u,t,t[8],null),d=[Za,t[6],{width:t[2]},{height:t[2]},{stroke:t[1]},{"stroke-width":o=t[4]?Number(t[3])*24/Number(t[2]):t[3]},{class:r=`lucide-icon lucide lucide-${t[0]} ${(x=t[7].class)!=null?x:""}`}],p={};for(let f=0;f<d.length;f+=1)p=re(p,d[f]);return{c(){e=Jt("svg");for(let f=0;f<n.length;f+=1)n[f].c();a=wt(),i&&i.c(),this.h()},l(f){e=Da(f,"svg",{width:!0,height:!0,stroke:!0,"stroke-width":!0,class:!0});var h=yt(e);for(let I=0;I<n.length;I+=1)n[I].l(h);a=wt(),i&&i.l(h),h.forEach($),this.h()},h(){vt(e,p)},m(f,h){bt(f,e,h);for(let I=0;I<n.length;I+=1)n[I]&&n[I].m(e,null);Yt(e,a),i&&i.m(e,null),l=!0},p(f,[h]){var I;if(h&32){s=Me(f[5]);let v;for(v=0;v<s.length;v+=1){let G=jo(f,s,v);n[v]?n[v].p(G,h):(n[v]=Ko(G),n[v].c(),n[v].m(e,a))}for(;v<n.length;v+=1)n[v].d(1);n.length=s.length}i&&i.p&&(!l||h&256)&&tt(i,u,f,f[8],l?et(u,f[8],h,null):at(f[8]),null),vt(e,p=je(d,[Za,h&64&&f[6],(!l||h&4)&&{width:f[2]},(!l||h&4)&&{height:f[2]},(!l||h&2)&&{stroke:f[1]},(!l||h&28&&o!==(o=f[4]?Number(f[3])*24/Number(f[2]):f[3]))&&{"stroke-width":o},(!l||h&129&&r!==(r=`lucide-icon lucide lucide-${f[0]} ${(I=f[7].class)!=null?I:""}`))&&{class:r}]))},i(f){l||(B(i,f),l=!0)},o(f){q(i,f),l=!1},d(f){f&&$(e),Zt(n,f),i&&i.d(f)}}}function xl(t,e,a){let o=["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"],r=ka(e,o),{$$slots:l={},$$scope:s}=e,{name:n}=e,{color:u="currentColor"}=e,{size:i=24}=e,{strokeWidth:d=2}=e,{absoluteStrokeWidth:p=!1}=e,{iconNode:x}=e;return t.$$set=f=>{a(7,e=re(re({},e),Te(f))),a(6,r=ka(e,o)),"name"in f&&a(0,n=f.name),"color"in f&&a(1,u=f.color),"size"in f&&a(2,i=f.size),"strokeWidth"in f&&a(3,d=f.strokeWidth),"absoluteStrokeWidth"in f&&a(4,p=f.absoluteStrokeWidth),"iconNode"in f&&a(5,x=f.iconNode),"$$scope"in f&&a(8,s=f.$$scope)},e=Te(e),[n,u,i,d,p,x,r,e,s,l]}var Qa=class extends Ie{constructor(e){super(),Ue(this,e,xl,gl,xe,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}},Ia=Qa;function Ll(t){let e,a=t[2].default,o=Qe(a,t,t[3],null);return{c(){o&&o.c()},l(r){o&&o.l(r)},m(r,l){o&&o.m(r,l),e=!0},p(r,l){o&&o.p&&(!e||l&8)&&tt(o,a,r,r[3],e?et(a,r[3],l,null):at(r[3]),null)},i(r){e||(B(o,r),e=!0)},o(r){q(o,r),e=!1},d(r){o&&o.d(r)}}}function Il(t){let e,a,o=[{name:"pin"},t[1],{iconNode:t[0]}],r={$$slots:{default:[Ll]},$$scope:{ctx:t}};for(let l=0;l<o.length;l+=1)r=re(r,o[l]);return e=new Ia({props:r}),{c(){Re(e.$$.fragment)},l(l){oa(e.$$.fragment,l)},m(l,s){Fe(e,l,s),a=!0},p(l,[s]){let n=s&3?je(o,[o[0],s&2&&aa(l[1]),s&1&&{iconNode:l[0]}]):{};s&8&&(n.$$scope={dirty:s,ctx:l}),e.$set(n)},i(l){a||(B(e.$$.fragment,l),a=!0)},o(l){q(e.$$.fragment,l),a=!1},d(l){Ae(e,l)}}}function Cl(t,e,a){let{$$slots:o={},$$scope:r}=e,l=[["line",{x1:"12",x2:"12",y1:"17",y2:"22"}],["path",{d:"M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"}]];return t.$$set=s=>{a(1,e=re(re({},e),Te(s))),"$$scope"in s&&a(3,r=s.$$scope)},e=Te(e),[l,e,o,r]}var eo=class extends Ie{constructor(e){super(),Ue(this,e,Cl,Il,xe,{})}},pt=eo;function bl(t){let e,a=t[2].default,o=Qe(a,t,t[3],null);return{c(){o&&o.c()},l(r){o&&o.l(r)},m(r,l){o&&o.m(r,l),e=!0},p(r,l){o&&o.p&&(!e||l&8)&&tt(o,a,r,r[3],e?et(a,r[3],l,null):at(r[3]),null)},i(r){e||(B(o,r),e=!0)},o(r){q(o,r),e=!1},d(r){o&&o.d(r)}}}function Sl(t){let e,a,o=[{name:"x"},t[1],{iconNode:t[0]}],r={$$slots:{default:[bl]},$$scope:{ctx:t}};for(let l=0;l<o.length;l+=1)r=re(r,o[l]);return e=new Ia({props:r}),{c(){Re(e.$$.fragment)},l(l){oa(e.$$.fragment,l)},m(l,s){Fe(e,l,s),a=!0},p(l,[s]){let n=s&3?je(o,[o[0],s&2&&aa(l[1]),s&1&&{iconNode:l[0]}]):{};s&8&&(n.$$scope={dirty:s,ctx:l}),e.$set(n)},i(l){a||(B(e.$$.fragment,l),a=!0)},o(l){q(e.$$.fragment,l),a=!1},d(l){Ae(e,l)}}}function wl(t,e,a){let{$$slots:o={},$$scope:r}=e,l=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];return t.$$set=s=>{a(1,e=re(re({},e),Te(s))),"$$scope"in s&&a(3,r=s.$$scope)},e=Te(e),[l,e,o,r]}var to=class extends Ie{constructor(e){super(),Ue(this,e,wl,Sl,xe,{})}},Nt=to;var mt=[];function Ca(t,e=ge){let a,o=new Set;function r(n){if(xe(t,n)&&(t=n,a)){let u=!mt.length;for(let i of o)i[1](),mt.push(i,t);if(u){for(let i=0;i<mt.length;i+=2)mt[i][0](mt[i+1]);mt.length=0}}}function l(n){r(n(t))}function s(n,u=ge){let i=[n,u];return o.add(i),o.size===1&&(a=e(r,l)||ge),n(t),()=>{o.delete(i),o.size===0&&a&&(a(),a=null)}}return{set:r,update:l,subscribe:s}}var vl=Ca(),yl=Ca([]),_l=Ca(),ae={plugin:vl,leaves:yl,activeLeafId:_l};var Yo=(t,e,a,o)=>{let r=s=>{if(o[s])return o[s];let[n,u,i]=s.split("/"),d=new RegExp(u,i);return o[s]=d,d},l=(s,n)=>{if(s.matchConfig.condition==="startsWith"&&n.startsWith(s.matchConfig.value)||s.matchConfig.condition==="endsWith"&&n.endsWith(s.matchConfig.value)||s.matchConfig.condition==="includes"&&n.includes(s.matchConfig.value)||s.matchConfig.condition==="equals"&&n===s.matchConfig.value||s.matchConfig.condition==="regexp"&&r(s.matchConfig.value).test(n))return!0};return t.find(s=>{if(s.matchConfig.target==="directory")return l(s,e);if(s.matchConfig.target==="title")return l(s,a)})};var Zo=(t,e)=>t.vault.getAbstractFileByPath(e),qt=async(t,e,a)=>{let o=Zo(t,e);if(o)return await t.vault.trash(o,a)},ao=async(t,e)=>{let a=Zo(t,e);if(a)return await t.vault.delete(a)};function kl(t){go(t,"svelte-fthq2i",":root{--ctx-menu-font-size:0.9rem;--ctx-menu-margin:0.25rem 0;--ctx-menu-padding:0;--ctx-menu-item-padding:0 0.5rem;--ctx-menu-divider-margin:0.2rem 0}")}function Jo(t,e,a){let o=t.slice();return o[42]=e[a],o}function Qo(t){let e,a,o,r,l;a=new Nt({});function s(...n){return t[16](t[42],...n)}return{c(){e=J("div"),Re(a.$$.fragment),N(e,"class","vertical-tabs-view-list-item-close-btn vertical-tabs-view-list-item-icon")},m(n,u){Le(n,e,u),Fe(a,e,null),o=!0,r||(l=We(e,"click",s),r=!0)},p(n,u){t=n},i(n){o||(B(a.$$.fragment,n),o=!0)},o(n){q(a.$$.fragment,n),o=!1},d(n){n&&$(e),Ae(a),r=!1,l()}}}function er(t){let e,a=t[5](t[42])+"",o;return{c(){e=J("span"),o=St(a),N(e,"class","vertical-tabs-view-list-item-dirname")},m(r,l){Le(r,e,l),ee(e,o)},p(r,l){l[0]&1&&a!==(a=r[5](r[42])+"")&&Fa(o,a)},d(r){r&&$(e)}}}function Tl(t){let e,a,o,r,l;a=new pt({});function s(){return t[18](t[42])}return{c(){e=J("div"),Re(a.$$.fragment),N(e,"class","vertical-tabs-view-list-item-icon vertical-tabs-view-list-item-icon-pinned vertical-tabs-view-list-item-pin-btn vertical-tabs-view-list-item-pin-btn-pin")},m(n,u){Le(n,e,u),Fe(a,e,null),o=!0,r||(l=We(e,"click",s),r=!0)},p(n,u){t=n},i(n){o||(B(a.$$.fragment,n),o=!0)},o(n){q(a.$$.fragment,n),o=!1},d(n){n&&$(e),Ae(a),r=!1,l()}}}function Dl(t){let e,a,o,r,l;a=new pt({});function s(){return t[17](t[42])}return{c(){e=J("div"),Re(a.$$.fragment),N(e,"class","vertical-tabs-view-list-item-icon vertical-tabs-view-list-item-pin-btn vertical-tabs-view-list-item-pin-btn-pin")},m(n,u){Le(n,e,u),Fe(a,e,null),o=!0,r||(l=We(e,"click",s),r=!0)},p(n,u){t=n},i(n){o||(B(a.$$.fragment,n),o=!0)},o(n){q(a.$$.fragment,n),o=!1},d(n){n&&$(e),Ae(a),r=!1,l()}}}function tr(t){let e,a,o,r,l,s,n,u,i=t[6](t[42])+"",d,p,x,f,h,I,v,G,U,y=t[3].showCloseIcon&&Qo(t),k=t[3].showDirectory&&er(t),Y=[Dl,Tl],M=[];function ne(P,A){return P[3].showPinIconIfNotPinned&&!P[42].pinned?0:P[3].showPinnedIcon&&P[42].pinned?1:-1}~(f=ne(t,[-1,-1]))&&(h=M[f]=Y[f](t));function _e(...P){return t[19](t[42],...P)}function j(...P){return t[20](t[42],...P)}return{c(){e=J("li"),a=J("div"),y&&y.c(),o=rt(),r=J("div"),l=rt(),s=J("div"),k&&k.c(),n=rt(),u=J("span"),d=St(i),p=rt(),x=J("div"),h&&h.c(),N(r,"class","vertical-tabs-view-list-item-tab-icon vertical-tabs-view-list-item-icon"),N(u,"class","vertical-tabs-view-list-item-title"),N(s,"class","vertical-tabs-view-list-item-name-container"),N(a,"class","vertical-tabs-view-list-item-left-container"),N(x,"class","vertical-tabs-view-list-item-right-container"),N(e,"data-leaf-id",I=t[42].id),N(e,"class","vertical-tabs-view-list-item"),_t(e,"selected",t[2].includes(t[42].id)),_t(e,"focused",t[42].id===t[1])},m(P,A){Le(P,e,A),ee(e,a),y&&y.m(a,null),ee(a,o),ee(a,r),ee(a,l),ee(a,s),k&&k.m(s,null),ee(s,n),ee(s,u),ee(u,d),ee(e,p),ee(e,x),~f&&M[f].m(x,null),v=!0,G||(U=[We(e,"mousedown",_e),We(e,"contextmenu",j)],G=!0)},p(P,A){t=P,t[3].showCloseIcon?y?(y.p(t,A),A[0]&8&&B(y,1)):(y=Qo(t),y.c(),B(y,1),y.m(a,o)):y&&(Tt(),q(y,1,1,()=>{y=null}),Dt()),t[3].showDirectory?k?k.p(t,A):(k=er(t),k.c(),k.m(s,n)):k&&(k.d(1),k=null),(!v||A[0]&1)&&i!==(i=t[6](t[42])+"")&&Fa(d,i);let ce=f;f=ne(t,A),f===ce?~f&&M[f].p(t,A):(h&&(Tt(),q(M[ce],1,1,()=>{M[ce]=null}),Dt()),~f?(h=M[f],h?h.p(t,A):(h=M[f]=Y[f](t),h.c()),B(h,1),h.m(x,null)):h=null),(!v||A[0]&1&&I!==(I=t[42].id))&&N(e,"data-leaf-id",I),(!v||A[0]&5)&&_t(e,"selected",t[2].includes(t[42].id)),(!v||A[0]&3)&&_t(e,"focused",t[42].id===t[1])},i(P){v||(B(y),B(h),v=!0)},o(P){q(y),q(h),v=!1},d(P){P&&$(e),y&&y.d(),k&&k.d(),~f&&M[f].d(),G=!1,ue(U)}}}function ar(t){let e;return{c(){e=J("div"),N(e,"class","vertical-tabs-view-list-mobile-margin-block")},m(a,o){Le(a,e,o)},d(a){a&&$(e)}}}function Fl(t){let e,a,o,r=Me(t[0]),l=[];for(let u=0;u<r.length;u+=1)l[u]=tr(Jo(t,r,u));let s=u=>q(l[u],1,1,()=>{l[u]=null}),n=t[0].length>0&&be.Platform.isMobile&&ar(t);return{c(){e=J("ul");for(let u=0;u<l.length;u+=1)l[u].c();a=rt(),n&&n.c(),N(e,"id","vertical-tabs-view-list"),N(e,"class","vertical-tabs-view-list")},m(u,i){Le(u,e,i);for(let d=0;d<l.length;d+=1)l[d]&&l[d].m(e,null);ee(e,a),n&&n.m(e,null),t[21](e),o=!0},p(u,i){if(i[0]&2031){r=Me(u[0]);let d;for(d=0;d<r.length;d+=1){let p=Jo(u,r,d);l[d]?(l[d].p(p,i),B(l[d],1)):(l[d]=tr(p),l[d].c(),B(l[d],1),l[d].m(e,a))}for(Tt(),d=r.length;d<l.length;d+=1)s(d);Dt()}u[0].length>0&&be.Platform.isMobile?n||(n=ar(u),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},i(u){if(!o){for(let i=0;i<r.length;i+=1)B(l[i]);o=!0}},o(u){l=l.filter(Boolean);for(let i=0;i<l.length;i+=1)q(l[i]);o=!1},d(u){u&&$(e),Zt(l,u),n&&n.d(),t[21](null)}}}var or="vertical-tabs-view";function Al(t,e,a){let o,r,l=or+"-list-item-tab-icon",s={LIST_STATE:or+"list-state"},n,u=[],i="",d=[];ae.plugin.subscribe(c=>{a(15,n=c)}),ae.leaves.subscribe(c=>{a(0,u=c)}),ae.activeLeafId.subscribe(c=>{a(1,i=c)});let{view:p}=e,{state:x={tabIdToIndex:{},sortedTabIds:[]}}=e,f,{viewContentId:h}=e,{updateView:I}=e,v={},G=c=>{var m,L;let S=(m=c.view)===null||m===void 0?void 0:m.file;return S&&((L=S.parent)===null||L===void 0?void 0:L.path)||""},U=c=>{var m;let L=(m=c.view)===null||m===void 0?void 0:m.file;if(!L)return"";let S=c.view.titleContainerEl.querySelectorAll(`.${c.view.titleEl.className}`),H=Array.from(S).find(Z=>{if(!Z.hasAttribute("hidden"))return Z});return(H==null?void 0:H.getText())||L.name},y=c=>{var m;if(c.detach(),c.id===i)if(c.id===u[0].id&&u[1])a(1,i=u[1].id);else if(c.id===((m=u.at(-1))===null||m===void 0?void 0:m.id)&&u.at(-2))a(1,i=u.at(-2).id);else{let L=x.tabIdToIndex[c.id];u[L-1]&&a(1,i=u[L-1].id)}},k=(c,m)=>le(void 0,void 0,void 0,function*(){var L,S;if(c.stopPropagation(),c.button===1){y(m);return}if(c.button!==2&&!(c.target instanceof SVGElement))if(c.shiftKey){let H=x.tabIdToIndex[m.id],Z=x.tabIdToIndex[i],xt=Math.min(H,Z),pe=Math.max(H,Z),F=[];for(let D=xt;D<=pe;D++){let z=u[D];z&&F.push(z.id)}a(2,d=Array.from(new Set([...d,...F])))}else c.metaKey?(d.length||a(2,d=[i]),d.includes(m.id)?a(2,d=d.filter(H=>H!==m.id)):a(2,d=[...d,m.id])):(a(2,d=[]),yield ya(n.app,m),a(1,i=m.id),n.app.isMobile&&(!((L=n.app.workspace.leftSplit)===null||L===void 0)&&L.collapsed||n.app.workspace.leftSplit.collapse(),!((S=n.app.workspace.rightSplit)===null||S===void 0)&&S.collapsed||n.app.workspace.rightSplit.collapse()))}),Y=(c,m)=>le(void 0,void 0,void 0,function*(){let L=new Set(c);for(let S of u){if(L.has(S.id)){let H=m(S);H instanceof Promise&&(yield H.catch(console.error)),L.delete(S.id)}if(L.size===0){I.bind(p)();return}}I.bind(p)()}),M=c=>le(void 0,void 0,void 0,function*(){yield Y(c,m=>m.detach())}),ne=c=>{y(c)},_e=c=>le(void 0,void 0,void 0,function*(){let m=u.filter(L=>!c.includes(L.id)).map(L=>L.id);yield M(m)}),j=c=>{let m=x.tabIdToIndex[c.id],L=x.tabIdToIndex[i];0<=L&&L<m&&a(1,i=u[m+1].id),u.slice(0,m).forEach(S=>{S.detach()})},P=c=>{let m=x.tabIdToIndex[c.id],L=x.tabIdToIndex[i];m+1<=L&&L<=u.length-1&&a(1,i=u[m].id),u.slice(m+1,u.length).forEach(S=>{S.detach()})},A=(c,m)=>{c.setPinned(m),I.bind(p)()},ce=(c,m)=>Y(c,L=>L.setPinned(m)),he=c=>le(void 0,void 0,void 0,function*(){let m=c.view.file;m.deleted||(yield ao(n.app,m.path),I.bind(p)())}),ke=c=>le(void 0,void 0,void 0,function*(){return Y(c,m=>le(void 0,void 0,void 0,function*(){let L=m.view.file;L.deleted||(yield ao(n.app,L.path))}))}),Ve=c=>le(void 0,void 0,void 0,function*(){yield qt(n.app,c.view.file.path,!0),I.bind(p)()}),Se=c=>le(void 0,void 0,void 0,function*(){return Y(c,m=>le(void 0,void 0,void 0,function*(){yield qt(n.app,m.view.file.path,!0)}))}),Je=c=>le(void 0,void 0,void 0,function*(){yield qt(n.app,c.view.file.path,!1),I.bind(p)()}),Ge=c=>le(void 0,void 0,void 0,function*(){return Y(c,m=>le(void 0,void 0,void 0,function*(){yield qt(n.app,m.view.file.path,!1)}))});function Vt(){var c;let m=document.querySelector(`li[data-leaf-id="${i}"]`);if(!m)return;let L=m.getBoundingClientRect();if(!L)return;let S=(c=m.parentElement)===null||c===void 0?void 0:c.getBoundingClientRect();S&&(L.top>S.top||L.bottom<S.bottom)&&m.scrollIntoView({behavior:"smooth",block:"nearest"})}let ro=c=>{a(11,x.tabIdToIndex={},x),a(11,x.sortedTabIds=[],x),c.forEach((m,L)=>{a(11,x.tabIdToIndex[m.id]=L,x),x.sortedTabIds.push(m.id)}),localStorage.setItem(s.LIST_STATE,JSON.stringify(x))},gt=()=>{u.forEach(c=>{let m=`li[data-leaf-id="${c.id}"] .${l}`,L=document.querySelector(m);if(!L)return;if(o.showTabIcon)L.removeClass("_hidden");else{L.addClass("_hidden");return}if(!o.customizeTabIcon){let Z=n.app.workspace.getLeafById(c.id).tabHeaderInnerIconEl.firstChild.cloneNode(!0);if(!Z)return;if(Z){L.setChildrenInPlace([Z]);return}}let S=Yo(r,G(c),U(c),v);S?(0,be.setIcon)(L,S.icon):o.defaultTabIcon?(0,be.setIcon)(L,o.defaultTabIcon):c.getViewState().type==="markdown"&&(0,be.setIcon)(L,"")})};Aa(()=>{Xo.create(f,{group:"vertical-tabs-view-list",delay:100,delayOnTouchOnly:!0,touchStartThreshold:3,animation:150,draggable:".vertical-tabs-view-list-item",direction:"vertical",ghostClass:"vertical-tabs-view-list-item-ghost",chosenClass:"vertical-tabs-view-list-item-chosen",forceFallback:!be.Platform.isDesktop,fallbackOnBody:!be.Platform.isDesktop,onChange:c=>{let m=document.querySelector(`#${h}`);if(!m)return;let L=m.getBoundingClientRect(),S=c.item.getBoundingClientRect(),H=S.height*2;S.top<H?m.scrollBy({top:-H,behavior:"smooth"}):L.height-S.top<H&&m.scrollBy({top:H,behavior:"smooth"})},onEnd:c=>{if(c.oldIndex==null||c.newIndex==null)return;let m=Math.min(c.oldIndex,c.newIndex),L=Math.max(c.oldIndex,c.newIndex);for(let S=m;S<=L;S++){let Z=f.children[S].getAttribute("data-leaf-id");Z&&(a(11,x.tabIdToIndex[Z]=S,x),a(11,x.sortedTabIds[S]=Z,x),localStorage.setItem(s.LIST_STATE,JSON.stringify(x)))}}}),gt(),Vt()});let Gt=c=>{let m=new be.Menu,L=d.length>1&&d.includes(c.id),S=L?d:[c.id],H=L?`${S.length} tabs`:"tab",Z=Array.from(new Set(u.filter(F=>S.includes(F.id)).map(F=>{var D;let z=F.view.file,Lt=((D=z.parent)===null||D===void 0?void 0:D.path)||"",It=z.name;return`${Lt}${It}`}))),xt=L&&Z.length?`${Z.length} files`:"file",pe=()=>{a(2,d=[])};if(m.addItem(F=>F.setTitle(`Close ${H}`).setIcon("x").onClick(D=>{D.preventDefault(),L?M(S):y(c)})),m.addItem(F=>{let D=u.length-S.length;return F.setTitle(`Close others (${D} unselected tabs)`).setIcon("x").onClick(z=>{z.preventDefault(),_e(S),pe()})}),m.addItem(F=>F.setTitle("Close all tabs above").setIcon("x").onClick(D=>{D.preventDefault(),j(c),pe()})),m.addItem(F=>F.setTitle("Close all tabs below").setIcon("x").onClick(D=>{D.preventDefault(),P(c),pe()})),m.addSeparator(),L){let F=[],D=[];u.forEach(z=>{z.pinned&&S.includes(z.id)?F.push(z):!z.pinned&&S.includes(z.id)&&D.push(z)}),D.length&&m.addItem(z=>z.setTitle(`Pin ${D.length} tabs`).setIcon("pin").onClick(Lt=>{Lt.preventDefault(),ce(D.map(It=>It.id),!0),pe()})),F.length&&m.addItem(z=>z.setTitle(`Unpin ${F.length} tabs`).setIcon("pin-off").onClick(Lt=>{Lt.preventDefault(),ce(F.map(It=>It.id),!1),pe()}))}else c.pinned||m.addItem(F=>F.setTitle("Pin").setIcon("pin").onClick(D=>{D.preventDefault(),A(c,!0),pe()})),c.pinned&&m.addItem(F=>F.setTitle("Unpin").setIcon("pin-off").onClick(D=>{D.preventDefault(),A(c,!1),pe()}));return m.addSeparator(),m.addItem(F=>F.setTitle(`Trash ${xt} to local`).setIcon("trash").onClick(D=>{D.preventDefault(),L?Ge(S):Je(c),pe()})),m.addItem(F=>F.setTitle(`Trash ${xt} to system`).setIcon("trash").onClick(D=>{D.preventDefault(),L?Se(S):Ve(c),pe()})),m.addItem(F=>F.setTitle(`Delete ${xt}`).setIcon("trash-2").onClick(D=>{D.preventDefault(),L?ke(S):he(c),pe()})),m},ir=(c,m)=>ne(c),dr=c=>A(c,!0),fr=c=>A(c,!1),cr=(c,m)=>k(m,c),pr=(c,m)=>{Gt(c).showAtMouseEvent(m)};function mr(c){Qt[c?"unshift":"push"](()=>{f=c,a(4,f)})}return t.$$set=c=>{"view"in c&&a(12,p=c.view),"state"in c&&a(11,x=c.state),"viewContentId"in c&&a(13,h=c.viewContentId),"updateView"in c&&a(14,I=c.updateView)},t.$$.update=()=>{if(t.$$.dirty[0]&32768){e:a(3,o=n.settings)}if(t.$$.dirty[0]&8){e:r=o.tabIconRules.slice().sort((c,m)=>m.priority-c.priority)}if(t.$$.dirty[0]&1){e:a(0,u)}if(t.$$.dirty[0]&2){e:a(1,i)}if(t.$$.dirty[0]&4){e:a(2,d)}if(t.$$.dirty[0]&1){e:ro(u),gt()}if(t.$$.dirty[0]&2){e:i&&Vt()}},[u,i,d,o,f,G,U,k,ne,A,Gt,x,p,h,I,n,ir,dr,fr,cr,pr,mr]}var oo=class extends Ie{constructor(e){super(),Ue(this,e,Al,Fl,xe,{view:12,state:11,viewContentId:13,updateView:14},kl,[-1,-1])}},rr=oo;var nr="vertical-tabs-view",lr=nr+"-content",Pl={LIST_STATE:nr+"list-state"},ht="vertical-tabs-view",ba=class extends sr.ItemView{constructor(a,o){super(o);this.state={tabIdToIndex:{},sortedTabIds:[]};this.plugin=a,this.settings=a.settings;let r=localStorage.getItem(Pl.LIST_STATE);if(r)try{this.state=JSON.parse(r)}catch(l){console.error(l)}this.registerEvent(this.app.workspace.on("layout-change",()=>{let l=this.getActiveLeaf();ae.activeLeafId.set(l.id),this.updateView()})),this.registerEvent(this.app.workspace.on("active-leaf-change",l=>{!l||l.getViewState().type===ht||ae.activeLeafId.set(l.id)}))}setSettings(a){this.plugin.settings=a,ae.plugin.set(this.plugin),this.updateView()}getViewType(){return ht}getIcon(){return"list"}getDisplayText(){return"Vertical Tabs"}async onClose(){this.Tabs.$destroy()}async onOpen(){ae.plugin.set(this.plugin),ae.leaves.set(this.getSortedLeaves()),ae.activeLeafId.set(this.getActiveLeaf().id);let a=this.contentEl;a.id=lr,this.Tabs=new rr({target:this.contentEl,props:{view:this,state:this.state,updateView:this.updateView,viewContentId:lr}})}getActiveLeaf(){return this.app.workspace.getMostRecentLeaf()}async setActiveLeafById(a){await fo(this.app,a),ae.activeLeafId.set(a)}updateView(){ae.plugin.set(this.plugin);let a=this.getSortedLeaves();a.forEach(o=>{o.on("pinned-change",()=>{ae.leaves.set(a)})}),ae.leaves.set(a)}getActiveLeafIndex(){let a=this.getActiveLeaf();return a?this.state.tabIdToIndex[a.id]:0}async cycleNextTab(){let a=this.getActiveLeafIndex();if(a==null)return;let o=(a+1)%this.state.sortedTabIds.length;await this.setActiveLeafById(this.state.sortedTabIds[o])}async cyclePreviousTab(){let a=this.getActiveLeafIndex();if(a==null)return;let o=(a-1)%this.state.sortedTabIds.length;o<0&&(o+=this.state.sortedTabIds.length),await this.setActiveLeafById(this.state.sortedTabIds[o])}collectLeafIds(a,o=[]){return a.forEach(r=>{if(r.type==="leaf")o.push(r.id);else if("children"in r&&Array.isArray(r.children))return this.collectLeafIds(r.children,o)}),o}getLeaves(){let a=[],o=this.app.workspace.rootSplit,r=this.collectLeafIds(o.children);return this.app.workspace.iterateRootLeaves(l=>{r.includes(l.id)&&a.push(l)}),a}getSortedLeaves(){return this.getLeaves().slice().sort((a,o)=>{var s,n;let r=(s=this.state.tabIdToIndex[a.id])!=null?s:1/0,l=(n=this.state.tabIdToIndex[o.id])!=null?n:1/0;return r-l})}};var Sa=class extends ur.Plugin{async onload(){Wt("loading..."),await this.loadSettings(),this.addSettingTab(new Xt(this.app,this)),this.addCommands(),this.app.workspace.onLayoutReady(async()=>{this.registerViewExtension()}),Wt("loaded.")}onunload(){Wt("unloaded.")}async loadSettings(){let a=await this.loadData();this.settings=Object.assign({},io,a),this.settings.tabIconRules.length===0&&"tabIconConfigs"in this.settings&&Array.isArray(this.settings.tabIconConfigs)&&this.settings.tabIconConfigs.length>0&&(this.settings.tabIconRules=structuredClone(this.settings.tabIconConfigs),delete this.settings.tabIconConfigs,this.saveSettings(this.settings)),a&&!a.hasOwnProperty("customizeTabIcon")&&a.tabIconRules.length>0&&(this.settings.customizeTabIcon=!0)}async saveSettings(a){await this.saveData(a),this.settings=a;let o=this.getView();o&&o.updateView()}addCommands(){this.addCommand({id:"show-tabs-view",name:"Show vertical tabs view",callback:async()=>{this.openViewLeaf()}}),this.addCommand({id:"cycle-previous-tab",name:"Cycle previous tab",callback:async()=>{let a=this.getView();a&&await a.cyclePreviousTab()}}),this.addCommand({id:"cycle-next-tab",name:"Cycle next tab",callback:async()=>{let a=this.getView();a&&await a.cycleNextTab()}})}registerViewExtension(){this.registerView(ht,a=>new ba(this,a))}getView(){let a=this.app.workspace.getLeavesOfType(ht)[0];if(a)return a.view}async openViewLeaf(){let a=()=>this.settings.defaultPosition==="left"?this.app.workspace.getLeftLeaf(!1):this.settings.defaultPosition==="right"?this.app.workspace.getRightLeaf(!1):this.app.workspace.getLeftLeaf(!1),o=this.getView();if(o)return o.updateView(),this.app.workspace.revealLeaf(o.leaf);let r=a();await r.setViewState({type:ht,active:!0}),this.app.workspace.revealLeaf(r)}};
/*! Bundled license information:
sortablejs/modular/sortable.esm.js:
(**!
* Sortable 1.15.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*)
*/