diff --git a/.obsidian/app.json b/.obsidian/app.json old mode 100644 new mode 100755 index 1d93f44..c575879 --- a/.obsidian/app.json +++ b/.obsidian/app.json @@ -1,19 +1,18 @@ { "livePreview": false, - "newFileLocation": "folder", - "newFileFolderPath": "🏛️ Home", - "trashOption": "local", - "attachmentFolderPath": "📂 Media", + "promptDelete": false, "pdfExportSettings": { + "includeName": true, "pageSize": "Letter", "landscape": false, "margin": "0", "downscalePercent": 100 }, - "focusNewTab": true, - "promptDelete": false, - "defaultViewMode": "preview", "showLineNumber": true, + "defaultViewMode": "preview", "alwaysUpdateLinks": true, - "showUnsupportedFiles": true + "trashOption": "local", + "newFileLocation": "folder", + "newFileFolderPath": "🏛️ Home", + "attachmentFolderPath": "/" } \ No newline at end of file diff --git a/.obsidian/appearance.json b/.obsidian/appearance.json old mode 100644 new mode 100755 diff --git a/.obsidian/bookmarks.json b/.obsidian/bookmarks.json old mode 100644 new mode 100755 diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json old mode 100644 new mode 100755 index 7fab40f..499d051 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -16,5 +16,7 @@ "obsidian-pandoc", "obsidian-columns", "obsidian-excalidraw-plugin", - "typst" + "typst", + "obsidian-sort-and-permute-lines", + "obsidian-git" ] \ No newline at end of file diff --git a/.obsidian/core-plugins-migration.json b/.obsidian/core-plugins-migration.json old mode 100644 new mode 100755 diff --git a/.obsidian/core-plugins.json b/.obsidian/core-plugins.json old mode 100644 new mode 100755 diff --git a/.obsidian/global-search.json b/.obsidian/global-search.json old mode 100644 new mode 100755 diff --git a/.obsidian/graph.json b/.obsidian/graph.json old mode 100644 new mode 100755 index 5253c54..476ddbe --- a/.obsidian/graph.json +++ b/.obsidian/graph.json @@ -1,11 +1,11 @@ { - "collapse-filter": true, + "collapse-filter": false, "search": "", "showTags": true, - "showAttachments": false, + "showAttachments": true, "hideUnresolved": true, - "showOrphans": false, - "collapse-color-groups": true, + "showOrphans": true, + "collapse-color-groups": false, "colorGroups": [ { "query": "#debate", @@ -28,20 +28,6 @@ "rgb": 7393985 } }, - { - "query": "#personal", - "color": { - "a": 1, - "rgb": 12020434 - } - }, - { - "query": "#school", - "color": { - "a": 1, - "rgb": 7255508 - } - }, { "query": "#exercise", "color": { @@ -55,6 +41,13 @@ "a": 1, "rgb": 13395456 } + }, + { + "query": "#hyperblog", + "color": { + "a": 1, + "rgb": 3512547 + } } ], "collapse-display": true, @@ -67,6 +60,6 @@ "repelStrength": 16.5625, "linkStrength": 0.911458333333333, "linkDistance": 375, - "scale": 0.07998098890400604, + "scale": 0.023698070786372122, "close": true } \ No newline at end of file diff --git a/.obsidian/hotkeys.json b/.obsidian/hotkeys.json old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/auto-note-mover/data.json b/.obsidian/plugins/auto-note-mover/data.json old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/auto-note-mover/main.js b/.obsidian/plugins/auto-note-mover/main.js old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/auto-note-mover/manifest.json b/.obsidian/plugins/auto-note-mover/manifest.json old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/better-word-count/main.js b/.obsidian/plugins/better-word-count/main.js old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/better-word-count/manifest.json b/.obsidian/plugins/better-word-count/manifest.json old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/better-word-count/styles.css b/.obsidian/plugins/better-word-count/styles.css old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/code-block-copy/main.js b/.obsidian/plugins/code-block-copy/main.js old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/code-block-copy/manifest.json b/.obsidian/plugins/code-block-copy/manifest.json old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/code-block-copy/styles.css b/.obsidian/plugins/code-block-copy/styles.css old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/mousewheel-image-zoom/main.js b/.obsidian/plugins/mousewheel-image-zoom/main.js old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/mousewheel-image-zoom/manifest.json b/.obsidian/plugins/mousewheel-image-zoom/manifest.json old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-autocomplete-plugin/data.json b/.obsidian/plugins/obsidian-autocomplete-plugin/data.json old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-autocomplete-plugin/main.js b/.obsidian/plugins/obsidian-autocomplete-plugin/main.js old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-autocomplete-plugin/manifest.json b/.obsidian/plugins/obsidian-autocomplete-plugin/manifest.json old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-autocomplete-plugin/styles.css b/.obsidian/plugins/obsidian-autocomplete-plugin/styles.css old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-columns/main.js b/.obsidian/plugins/obsidian-columns/main.js old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-columns/manifest.json b/.obsidian/plugins/obsidian-columns/manifest.json old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-columns/styles.css b/.obsidian/plugins/obsidian-columns/styles.css old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-contextual-typography/main.js b/.obsidian/plugins/obsidian-contextual-typography/main.js old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-contextual-typography/manifest.json b/.obsidian/plugins/obsidian-contextual-typography/manifest.json old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-enhancing-export/data.json b/.obsidian/plugins/obsidian-enhancing-export/data.json old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-enhancing-export/lua/citefilter.lua b/.obsidian/plugins/obsidian-enhancing-export/lua/citefilter.lua old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-enhancing-export/lua/markdown+hugo.lua b/.obsidian/plugins/obsidian-enhancing-export/lua/markdown+hugo.lua old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-enhancing-export/lua/markdown.lua b/.obsidian/plugins/obsidian-enhancing-export/lua/markdown.lua old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-enhancing-export/lua/math_block.lua b/.obsidian/plugins/obsidian-enhancing-export/lua/math_block.lua old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-enhancing-export/lua/pdf.lua b/.obsidian/plugins/obsidian-enhancing-export/lua/pdf.lua old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-enhancing-export/lua/polyfill.lua b/.obsidian/plugins/obsidian-enhancing-export/lua/polyfill.lua old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-enhancing-export/lua/url.lua b/.obsidian/plugins/obsidian-enhancing-export/lua/url.lua old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-enhancing-export/lua/utf8_filenames.lua b/.obsidian/plugins/obsidian-enhancing-export/lua/utf8_filenames.lua old mode 100644 new mode 100755 diff --git a/.obsidian/plugins/obsidian-enhancing-export/main.js b/.obsidian/plugins/obsidian-enhancing-export/main.js old mode 100644 new mode 100755 index 511ec5e..84a999a --- a/.obsidian/plugins/obsidian-enhancing-export/main.js +++ b/.obsidian/plugins/obsidian-enhancing-export/main.js @@ -1,30 +1,30 @@ -"use strict";var dl=(e,l,t)=>{if(!l.has(e))throw TypeError("Cannot "+t)};var gl=(e,l,t)=>(dl(e,l,"read from private field"),t?t.call(e):l.get(e)),bl=(e,l,t)=>{if(l.has(e))throw TypeError("Cannot add the same private member more than once");l instanceof WeakSet?l.add(e):l.set(e,t)},Zl=(e,l,t,n)=>(dl(e,l,"write to private field"),n?n.call(e,t):l.set(e,t),t);/*! +"use strict";var Al=(e,t,l)=>{if(!t.has(e))throw TypeError("Cannot "+l)};var Yl=(e,t,l)=>(Al(e,t,"read from private field"),l?l.call(e):t.get(e)),xl=(e,t,l)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,l)},yl=(e,t,l,n)=>(Al(e,t,"write to private field"),n?n.call(e,l):t.set(e,l),l);/*! THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository https://github.com/mokeyish/obsidian-enhancing-export . -*/Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Ge=require("obsidian"),kn=require("child_process"),pt=require("process"),Ol=require("electron"),Pl=require("fs"),oe=require("path"),Sn=require("util");function Pt(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(l,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return l.default=e,Object.freeze(l)}const wn=Pt(Ge),ye=Pt(Ol),Jt=Pt(Pl),dt={Markdown:{name:"Markdown",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/markdown.lua" -s -o "${outputPath}" -t commonmark_x-attributes',extension:".md"},"Markdown (Hugo)":{name:"Markdown (Hugo)",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/markdown+hugo.lua" -s -o "${outputPath}" -t commonmark_x-attributes',extension:".md"},Html:{name:"Html",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/math_block.lua" --embed-resources --standalone --metadata title="${currentFileName}" -s -o "${outputPath}" -t html',customArguments:'--mathjax="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg-full.js"',extension:".html"},TextBundle:{name:"TextBundle",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/markdown.lua" -V media_dir="${outputDir}/${outputFileName}.textbundle/assets" -s -o "${outputDir}/${outputFileName}.textbundle/text.md" -t commonmark_x-attributes',extension:".md"},Typst:{name:"Typst",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/markdown.lua" -s -o "${outputPath}" -t typst',extension:".typ"},PDF:{name:"PDF",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/pdf.lua" ${ options.textemplate ? `--resource-path="${pluginDir}/textemplate" --template="${options.textemplate}"` : ` ` } -o "${outputPath}" -t pdf',customArguments:"--pdf-engine=pdflatex",optionsMeta:{textemplate:"preset:textemplate"},extension:".pdf"},"Word (.docx)":{name:"Word (.docx)",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -o "${outputPath}" -t docx',extension:".docx"},OpenOffice:{name:"OpenOffice",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -o "${outputPath}" -t odt',extension:".odt"},RTF:{name:"RTF",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -s -o "${outputPath}" -t rtf',extension:".rtf"},Epub:{name:"Epub",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -o "${outputPath}" -t epub',extension:".epub"},Latex:{name:"Latex",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" ${ options.textemplate ? `--resource-path="${pluginDir}/textemplate" --template="${options.textemplate}"` : ` ` } --extract-media="${outputDir}" -s -o "${outputPath}" -t latex',optionsMeta:{textemplate:"preset:textemplate"},extension:".tex"},"Media Wiki":{name:"Media Wiki",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -s -o "${outputPath}" -t mediawiki',extension:".mediawiki"},reStructuredText:{name:"reStructuredText",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -s -o "${outputPath}" -t rst',extension:".rst"},Textile:{name:"Textile",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -s -o "${outputPath}" -t textile',extension:".textile"},OPML:{name:"OPML",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -s -o "${outputPath}" -t opml',extension:".opml"},"Bibliography (.bib)":{name:"Bibliography",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/citefilter.lua" -o "${outputPath}" --to=bibtex "${currentPath}"',extension:".bib"},Custom:{name:"Custom",type:"custom",command:"your command",targetFileExtensions:".ext"}};function Ae(e,l,t){return typeof l=="string"&&l.trim()===""&&(l=void 0),t instanceof Array?t.reduce((n,c)=>Ae(n,l,c),e):(t??(t=pt.platform),{...e??{},[t]:l})}function de(e,l){e??(e={});const t=e[l??pt.platform],n=e["*"];return n&&typeof n=="object"?Object.assign({},n,t):t??n}function T(e,...l){return function(...t){const n=t[t.length-1]||{},c=[e[0]];return l.forEach(function(i,s){const a=Number.isInteger(i)?t[i]:n[i];c.push(a,e[s+1])}),c.join("")}}function Qt(e,l){return l=l??{},new Promise((t,n)=>{kn.exec(e,l,(c,i,s)=>{if(c){n(c),console.error(i,c);return}if(s&&s!==""){n(s),console.error(i,c);return}(i==null?void 0:i.trim().length)===0&&localStorage.getItem("debug-plugin")==="1"&&console.log(i),t(i)})})}function En(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.substring(1,e.length-1):e}function zt(e,l={}){for(;;)try{const t=Object.keys(l).filter(Kn),n=t.map(c=>l[c]);return new Function(...t,`{ return \`${e.replaceAll("\\","\\\\")}\` }`).bind(l)(...n)}catch(t){if(t instanceof ReferenceError&&t.message.endsWith("is not defined")){const n=t.message.substring(0,t.message.indexOf(" ")),c=Object.keys(l).filter(i=>i.toLowerCase()===n.toLowerCase()).map(i=>l[i])[0]??`\${${n}}`;l[n]=c}else throw t}}const Kn=e=>{if(typeof e!="string"||e.trim()!==e)return!1;try{new Function(e,"var "+e)}catch{return!1}return!0},Qn={textemplate:{title:"Latex Template",type:"dropdown",options:[{name:"None",value:null},{name:"Dissertation",value:"dissertation.tex"},{name:"Academic Paper",value:"neurips.tex"}]}},De=(()=>{let e={};return e=Ae(e,{HOME:"${HOME}",PATH:"${PATH}",TEXINPUTS:"${pluginDir}/textemplate/:"},"*"),e=Ae(e,{TEXINPUTS:"${pluginDir}/textemplate/;",PATH:"${HOME}\\AppData\\Local\\Pandoc;${PATH}"},"win32"),e=Ae(e,{PATH:"/opt/homebrew/bin:/usr/local/bin:/Library/TeX/texbin:${PATH}"},"darwin"),e})(),je={items:Object.values(dt).filter(e=>e.type!=="custom"),pandocPath:void 0,defaultExportDirectoryMode:"Auto",openExportedFile:!0,env:De,showExportProgressBar:!0};function Dl(e){var l;return e.type==="pandoc"?e.extension:e.type==="custom"?(l=e.targetFileExtensions)==null?void 0:l.split(",")[0]:""}function _l(e,l){return e=Object.assign({},de(De),e),l=Object.assign({HOME:process.env.HOME??process.env.USERPROFILE},process.env,l??{}),Object.fromEntries(Object.entries(e).map(([t,n])=>[t,zt(n,l)]))}function zn(e){return e?Object.fromEntries(Object.entries(e).map(([l,t])=>[l,typeof t=="string"?Qn[t.startsWith("preset:")?t.substring(7):""]:t])):{}}const Un=(e,l)=>e===l,pe=Symbol("solid-proxy"),Ut=Symbol("solid-track"),ut={equals:Un};let ql=an;const Fe=1,mt=2,en={owned:null,cleanups:null,context:null,owner:null};var $=null;let Bt=null,jn=null,P=null,te=null,xe=null,Xt=0;function Oe(e,l){const t=P,n=$,c=e.length===0,i=l===void 0?n:l,s=c?en:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=c?e:()=>e(()=>O(()=>ft(s)));$=s,P=null;try{return ze(a,!0)}finally{P=t,$=n}}function ae(e,l){l=l?Object.assign({},ut,l):ut;const t={value:e,observers:null,observerSlots:null,comparator:l.equals||void 0},n=c=>(typeof c=="function"&&(c=c(t.value)),cn(t,c));return[nn.bind(t),n]}function ee(e,l,t){const n=Dt(e,l,!1,Fe);tt(n)}function Ye(e,l,t){ql=On;const n=Dt(e,l,!1,Fe);(!t||!t.render)&&(n.user=!0),xe?xe.push(n):tt(n)}function q(e,l,t){t=t?Object.assign({},ut,t):ut;const n=Dt(e,l,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=t.equals||void 0,tt(n),nn.bind(n)}function gt(e){return ze(e,!1)}function O(e){if(P===null)return e();const l=P;P=null;try{return e()}finally{P=l}}function tn(e){Ye(()=>O(e))}function et(e){return $===null||($.cleanups===null?$.cleanups=[e]:$.cleanups.push(e)),e}function jt(){return P}function Ln(e,l){const t=Symbol("context");return{id:t,Provider:Dn(t),defaultValue:e}}function Tn(e){return $&&$.context&&$.context[e.id]!==void 0?$.context[e.id]:e.defaultValue}function ln(e){const l=q(e),t=q(()=>Lt(l()));return t.toArray=()=>{const n=t();return Array.isArray(n)?n:n!=null?[n]:[]},t}function nn(){if(this.sources&&this.state)if(this.state===Fe)tt(this);else{const e=te;te=null,ze(()=>It(this),!1),te=e}if(P){const e=this.observers?this.observers.length:0;P.sources?(P.sources.push(this),P.sourceSlots.push(e)):(P.sources=[this],P.sourceSlots=[e]),this.observers?(this.observers.push(P),this.observerSlots.push(P.sources.length-1)):(this.observers=[P],this.observerSlots=[P.sources.length-1])}return this.value}function cn(e,l,t){let n=e.value;return(!e.comparator||!e.comparator(n,l))&&(e.value=l,e.observers&&e.observers.length&&ze(()=>{for(let c=0;c1e6)throw te=[],new Error},!1)),l}function tt(e){if(!e.fn)return;ft(e);const l=Xt;$n(e,e.value,l)}function $n(e,l,t){let n;const c=$,i=P;P=$=e;try{n=e.fn(l)}catch(s){return e.pure&&(e.state=Fe,e.owned&&e.owned.forEach(ft),e.owned=null),e.updatedAt=t+1,on(s)}finally{P=i,$=c}(!e.updatedAt||e.updatedAt<=t)&&(e.updatedAt!=null&&"observers"in e?cn(e,n):e.value=n,e.updatedAt=t)}function Dt(e,l,t,n=Fe,c){const i={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:l,owner:$,context:$?$.context:null,pure:t};return $===null||$!==en&&($.owned?$.owned.push(i):$.owned=[i]),i}function Gt(e){if(e.state===0)return;if(e.state===mt)return It(e);if(e.suspense&&O(e.suspense.inFallback))return e.suspense.effects.push(e);const l=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;t--)if(e=l[t],e.state===Fe)tt(e);else if(e.state===mt){const n=te;te=null,ze(()=>It(e,l[0]),!1),te=n}}function ze(e,l){if(te)return e();let t=!1;l||(te=[]),xe?t=!0:xe=[],Xt++;try{const n=e();return Mn(t),n}catch(n){t||(xe=null),te=null,on(n)}}function Mn(e){if(te&&(an(te),te=null),e)return;const l=xe;xe=null,l.length&&ze(()=>ql(l),!1)}function an(e){for(let l=0;l=0;l--)ft(e.owned[l]);e.owned=null}if(e.cleanups){for(l=e.cleanups.length-1;l>=0;l--)e.cleanups[l]();e.cleanups=null}e.state=0}function Pn(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function on(e,l=$){throw Pn(e)}function Lt(e){if(typeof e=="function"&&!e.length)return Lt(e());if(Array.isArray(e)){const l=[];for(let t=0;tc=O(()=>($.context={...$.context,[e]:n.value},ln(()=>n.children))),void 0),c}}const _n=Symbol("fallback");function ul(e){for(let l=0;l1?[]:null;return et(()=>ul(i)),()=>{let o=e()||[],g,b;return o[Ut],O(()=>{let J=o.length,W,x,L,u,j,w,E,M,K;if(J===0)s!==0&&(ul(i),i=[],n=[],c=[],s=0,a&&(a=[])),t.fallback&&(n=[_n],c[0]=Oe(ie=>(i[0]=ie,t.fallback())),s=1);else if(s===0){for(c=new Array(J),b=0;b=w&&M>=w&&n[E]===o[M];E--,M--)L[M]=c[E],u[M]=i[E],a&&(j[M]=a[E]);for(W=new Map,x=new Array(M+1),b=M;b>=w;b--)K=o[b],g=W.get(K),x[b]=g===void 0?-1:g,W.set(K,b);for(g=w;g<=E;g++)K=n[g],b=W.get(K),b!==void 0&&b!==-1?(L[b]=c[g],u[b]=i[g],a&&(j[b]=a[g]),b=x[b],W.set(K,b)):i[g]();for(b=w;be(l||{}))}function ct(){return!0}const ml={get(e,l,t){return l===pe?t:e.get(l)},has(e,l){return l===pe?!0:e.has(l)},set:ct,deleteProperty:ct,getOwnPropertyDescriptor(e,l){return{configurable:!0,enumerable:!0,get(){return e.get(l)},set:ct,deleteProperty:ct}},ownKeys(e){return e.keys()}};function ec(e,...l){if(pe in e){const c=new Set(l.length>1?l.flat():l[0]),i=l.map(s=>new Proxy({get(a){return s.includes(a)?e[a]:void 0},has(a){return s.includes(a)&&a in e},keys(){return s.filter(a=>a in e)}},ml));return i.push(new Proxy({get(s){return c.has(s)?void 0:e[s]},has(s){return c.has(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!c.has(s))}},ml)),i}const t={},n=l.map(()=>({}));for(const c of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,c),s=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let a=!1,o=0;for(const g of l)g.includes(c)&&(a=!0,s?n[o][c]=i.value:Object.defineProperty(n[o],c,i)),++o;a||(s?t[c]=i.value:Object.defineProperty(t,c,i))}return[...n,t]}const rn=e=>`Stale read from <${e}>.`;function dn(e){const l="fallback"in e&&{fallback:()=>e.fallback};return q(qn(()=>e.each,e.children,l||void 0))}function bt(e){const l=e.keyed,t=q(()=>e.when,void 0,{equals:(n,c)=>l?n===c:!n==!c});return q(()=>{const n=t();if(n){const c=e.children;return typeof c=="function"&&c.length>0?O(()=>c(l?n:()=>{if(!O(t))throw rn("Show");return e.when})):c}return e.fallback},void 0,void 0)}function tc(e){let l=!1;const t=(i,s)=>(l?i[1]===s[1]:!i[1]==!s[1])&&i[2]===s[2],n=ln(()=>e.children),c=q(()=>{let i=n();Array.isArray(i)||(i=[i]);for(let s=0;s{const[i,s,a]=c();if(i<0)return e.fallback;const o=a.children;return typeof o=="function"&&o.length>0?O(()=>o(l?s:()=>{if(O(c)[0]!==i)throw rn("Match");return a.when})):o},void 0,void 0)}function Gl(e){return e}const lc=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],nc=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...lc]),cc=new Set(["innerHTML","textContent","innerText","children"]),ic=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),ac=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function sc(e,l){const t=ac[e];return typeof t=="object"?t[l]?t.$:void 0:t}const oc=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),rc=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),dc={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function gc(e,l,t){let n=t.length,c=l.length,i=n,s=0,a=0,o=l[c-1].nextSibling,g=null;for(;sb-a){const x=l[s];for(;a{const s=document.createElement("template");return s.innerHTML=e,t?s.content.firstChild.firstChild:s.content.firstChild},i=l?()=>O(()=>document.importNode(n||(n=c()),!0)):()=>(n||(n=c())).cloneNode(!0);return i.cloneNode=i,i}function _t(e,l=window.document){const t=l[Il]||(l[Il]=new Set);for(let n=0,c=e.length;nc.call(e,t[1],i))}else e.addEventListener(l,t)}function Zc(e,l,t={}){const n=Object.keys(l||{}),c=Object.keys(t);let i,s;for(i=0,s=c.length;ic.children=we(e,l.children,c.children)),ee(()=>typeof l.ref=="function"?tl(l.ref,e):l.ref=e),ee(()=>mc(e,l,t,!0,c,!0)),c}function tl(e,l,t){return O(()=>e(l,t))}function se(e,l,t,n){if(t!==void 0&&!n&&(n=[]),typeof l!="function")return we(e,l,n,t);ee(c=>we(e,l(),c,t),n)}function mc(e,l,t,n,c={},i=!1){l||(l={});for(const s in c)if(!(s in l)){if(s==="children")continue;c[s]=hl(e,s,null,c[s],t,i)}for(const s in l){if(s==="children"){n||we(e,l.children);continue}const a=l[s];c[s]=hl(e,s,a,c[s],t,i)}}function Gc(e){return e.toLowerCase().replace(/-([a-z])/g,(l,t)=>t.toUpperCase())}function Cl(e,l,t){const n=l.trim().split(/\s+/);for(let c=0,i=n.length;c-1&&dc[l.split(":")[0]];G?bc(e,G,l,t):Je(e,ic[l]||l,t)}return t}function Ic(e){const l=`$$${e.type}`;let t=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==t&&Object.defineProperty(e,"target",{configurable:!0,value:t}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}});t;){const n=t[l];if(n&&!t.disabled){const c=t[`${l}Data`];if(c!==void 0?n.call(t,c,e):n.call(t,e),e.cancelBubble)return}t=t._$host||t.parentNode||t.host}}function we(e,l,t,n,c){for(;typeof t=="function";)t=t();if(l===t)return t;const i=typeof l,s=n!==void 0;if(e=s&&t[0]&&t[0].parentNode||e,i==="string"||i==="number")if(i==="number"&&(l=l.toString()),s){let a=t[0];a&&a.nodeType===3?a.data!==l&&(a.data=l):a=document.createTextNode(l),t=ve(e,t,n,a)}else t!==""&&typeof t=="string"?t=e.firstChild.data=l:t=e.textContent=l;else if(l==null||i==="boolean")t=ve(e,t,n);else{if(i==="function")return ee(()=>{let a=l();for(;typeof a=="function";)a=a();t=we(e,a,t,n)}),()=>t;if(Array.isArray(l)){const a=[],o=t&&Array.isArray(t);if(Tt(a,l,t,c))return ee(()=>t=we(e,a,t,n,!0)),()=>t;if(a.length===0){if(t=ve(e,t,n),s)return t}else o?t.length===0?Wl(e,a,n):gc(e,t,a):(t&&ve(e),Wl(e,a));t=a}else if(l.nodeType){if(Array.isArray(t)){if(s)return t=ve(e,t,n,l);ve(e,t,null,l)}else t==null||t===""||!e.firstChild?e.appendChild(l):e.replaceChild(l,e.firstChild);t=l}}return t}function Tt(e,l,t,n){let c=!1;for(let i=0,s=l.length;i=0;s--){const a=l[s];if(c!==a){const o=a.parentNode===e;!i&&!s?o?e.replaceChild(c,a):e.insertBefore(c,t):o&&a.remove()}else i=!0}}else e.insertBefore(c,t);return[c]}const Cc="http://www.w3.org/2000/svg";function hc(e,l=!1){return l?document.createElementNS(Cc,e):document.createElement(e)}function Wc(e){const[l,t]=ec(e,["component"]),n=q(()=>l.component);return q(()=>{const c=n();switch(typeof c){case"function":return O(()=>c(t));case"string":const i=rc.has(c),s=hc(c,i);return uc(s,t,i),s}})}/** +*/Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const We=require("obsidian"),tc=require("child_process"),Nt=require("process"),mn=require("electron"),Gn=require("fs"),de=require("path"),lc=require("util");function bl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const n=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,n.get?n:{enumerable:!0,get:()=>e[l]})}}return t.default=e,Object.freeze(t)}const nc=bl(We),Se=bl(mn),Ut=bl(Gn),ft={Markdown:{name:"Markdown",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/markdown.lua" -s -o "${outputPath}" -t commonmark_x-attributes',extension:".md"},"Markdown (Hugo)":{name:"Markdown (Hugo)",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/markdown+hugo.lua" -s -o "${outputPath}" -t commonmark_x-attributes',extension:".md"},Html:{name:"Html",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/math_block.lua" --embed-resources --standalone --metadata title="${currentFileName}" -s -o "${outputPath}" -t html',customArguments:'--mathjax="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg-full.js"',extension:".html"},TextBundle:{name:"TextBundle",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/markdown.lua" -V media_dir="${outputDir}/${outputFileName}.textbundle/assets" -s -o "${outputDir}/${outputFileName}.textbundle/text.md" -t commonmark_x-attributes',extension:".md"},Typst:{name:"Typst",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/markdown.lua" -s -o "${outputPath}" -t typst',extension:".typ"},PDF:{name:"PDF",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/pdf.lua" ${ options.textemplate ? `--resource-path="${pluginDir}/textemplate" --template="${options.textemplate}"` : ` ` } -o "${outputPath}" -t pdf',customArguments:"--pdf-engine=pdflatex",optionsMeta:{textemplate:"preset:textemplate"},extension:".pdf"},"Word (.docx)":{name:"Word (.docx)",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -o "${outputPath}" -t docx',extension:".docx"},OpenOffice:{name:"OpenOffice",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -o "${outputPath}" -t odt',extension:".odt"},RTF:{name:"RTF",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -s -o "${outputPath}" -t rtf',extension:".rtf"},Epub:{name:"Epub",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -o "${outputPath}" -t epub',extension:".epub"},Latex:{name:"Latex",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" ${ options.textemplate ? `--resource-path="${pluginDir}/textemplate" --template="${options.textemplate}"` : ` ` } --extract-media="${outputDir}" -s -o "${outputPath}" -t latex',optionsMeta:{textemplate:"preset:textemplate"},extension:".tex"},"Media Wiki":{name:"Media Wiki",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -s -o "${outputPath}" -t mediawiki',extension:".mediawiki"},reStructuredText:{name:"reStructuredText",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -s -o "${outputPath}" -t rst',extension:".rst"},Textile:{name:"Textile",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -s -o "${outputPath}" -t textile',extension:".textile"},OPML:{name:"OPML",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -s -o "${outputPath}" -t opml',extension:".opml"},"Bibliography (.bib)":{name:"Bibliography",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/citefilter.lua" -o "${outputPath}" --to=bibtex "${currentPath}"',extension:".bib"},Custom:{name:"Custom",type:"custom",command:"your command",targetFileExtensions:".ext"}};function Be(e,t,l){return typeof t=="string"&&t.trim()===""&&(t=void 0),l instanceof Array?l.reduce((n,c)=>Be(n,t,c),e):(l??(l=Nt.platform),{...e??{},[l]:t})}function ue(e,t){e??(e={});const l=e[t??Nt.platform],n=e["*"];return n&&typeof n=="object"?Object.assign({},n,l):l??n}function L(e,...t){return function(...l){const n=l[l.length-1]||{},c=[e[0]];return t.forEach(function(i,s){const a=Number.isInteger(i)?l[i]:n[i];c.push(a,e[s+1])}),c.join("")}}function cl(e,t){return t=t??{},new Promise((l,n)=>{tc.exec(e,t,(c,i,s)=>{if(c){n(c),console.error(i,c);return}if(s&&s!==""){n(s),console.error(i,c);return}(i==null?void 0:i.trim().length)===0&&localStorage.getItem("debug-plugin")==="1"&&console.log(i),l(i)})})}function cc(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.substring(1,e.length-1):e}function il(e,t={}){for(;;)try{const l=Object.keys(t).filter(ic),n=l.map(c=>t[c]);return new Function(...l,`{ return \`${e.replaceAll("\\","\\\\")}\` }`).bind(t)(...n)}catch(l){if(l instanceof ReferenceError&&l.message.endsWith("is not defined")){const n=l.message.substring(0,l.message.indexOf(" ")),c=Object.keys(t).filter(i=>i.toLowerCase()===n.toLowerCase()).map(i=>t[i])[0]??`\${${n}}`;t[n]=c}else throw l}}const ic=e=>{if(typeof e!="string"||e.trim()!==e)return!1;try{new Function(e,"var "+e)}catch{return!1}return!0},sc={textemplate:{title:"Latex Template",type:"dropdown",options:[{name:"None",value:null},{name:"Dissertation",value:"dissertation.tex"},{name:"Academic Paper",value:"neurips.tex"}]}},ot=(()=>{let e={};return e=Be(e,{HOME:"${HOME}",PATH:"${PATH}",TEXINPUTS:"${pluginDir}/textemplate/:"},"*"),e=Be(e,{TEXINPUTS:"${pluginDir}/textemplate/;",PATH:"${HOME}\\AppData\\Local\\Pandoc;${PATH}"},"win32"),e=Be(e,{PATH:"/opt/homebrew/bin:/usr/local/bin:/Library/TeX/texbin:${PATH}"},"darwin"),e})(),tt={items:Object.values(ft).filter(e=>e.type!=="custom"),pandocPath:void 0,defaultExportDirectoryMode:"Auto",openExportedFile:!0,env:ot,showExportProgressBar:!0};function hn(e){var t;return e.type==="pandoc"?e.extension:e.type==="custom"?(t=e.targetFileExtensions)==null?void 0:t.split(",")[0]:""}function In(e,t){return e=Object.assign({},ue(ot),e),t=Object.assign({HOME:process.env.HOME??process.env.USERPROFILE},process.env,t??{}),Object.fromEntries(Object.entries(e).map(([l,n])=>[l,il(n,t)]))}function ac(e){return e?Object.fromEntries(Object.entries(e).map(([t,l])=>[t,typeof l=="string"?sc[l.startsWith("preset:")?l.substring(7):""]:l])):{}}const rc=(e,t)=>e===t,Re=Symbol("solid-proxy"),sl=Symbol("solid-track"),At={equals:rc};let Cn=Vn;const ke=1,Yt=2,Wn={owned:null,cleanups:null,context:null,owner:null};var T=null;let jt=null,oc=null,P=null,ie=null,He=null,vt=0;function Te(e,t){const l=P,n=T,c=e.length===0,i=n,s=c?Wn:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=c?e:()=>e(()=>D(()=>St(s)));T=s,P=null;try{return qe(a,!0)}finally{P=l,T=n}}function oe(e,t){t=t?Object.assign({},At,t):At;const l={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=c=>(typeof c=="function"&&(c=c(l.value)),Rn(l,c));return[Xn.bind(l),n]}function ne(e,t,l){const n=Zl(e,t,!1,ke);bt(n)}function Fe(e,t,l){Cn=Zc;const n=Zl(e,t,!1,ke);n.user=!0,He?He.push(n):bt(n)}function le(e,t,l){l=l?Object.assign({},At,l):At;const n=Zl(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=l.equals||void 0,bt(n),Xn.bind(n)}function Xt(e){return qe(e,!1)}function D(e){if(P===null)return e();const t=P;P=null;try{return e()}finally{P=t}}function pn(e){Fe(()=>D(e))}function _e(e){return T===null||(T.cleanups===null?T.cleanups=[e]:T.cleanups.push(e)),e}function al(){return P}function dc(e,t){const l=Symbol("context");return{id:l,Provider:Gc(l),defaultValue:e}}function gc(e){return T&&T.context&&T.context[e.id]!==void 0?T.context[e.id]:e.defaultValue}function fn(e){const t=le(e),l=le(()=>rl(t()));return l.toArray=()=>{const n=l();return Array.isArray(n)?n:n!=null?[n]:[]},l}function Xn(){if(this.sources&&this.state)if(this.state===ke)bt(this);else{const e=ie;ie=null,qe(()=>yt(this),!1),ie=e}if(P){const e=this.observers?this.observers.length:0;P.sources?(P.sources.push(this),P.sourceSlots.push(e)):(P.sources=[this],P.sourceSlots=[e]),this.observers?(this.observers.push(P),this.observerSlots.push(P.sources.length-1)):(this.observers=[P],this.observerSlots=[P.sources.length-1])}return this.value}function Rn(e,t,l){let n=e.value;return(!e.comparator||!e.comparator(n,t))&&(e.value=t,e.observers&&e.observers.length&&qe(()=>{for(let c=0;c1e6)throw ie=[],new Error},!1)),t}function bt(e){if(!e.fn)return;St(e);const t=vt;uc(e,e.value,t)}function uc(e,t,l){let n;const c=T,i=P;P=T=e;try{n=e.fn(t)}catch(s){return e.pure&&(e.state=ke,e.owned&&e.owned.forEach(St),e.owned=null),e.updatedAt=l+1,Yn(s)}finally{P=i,T=c}(!e.updatedAt||e.updatedAt<=l)&&(e.updatedAt!=null&&"observers"in e?Rn(e,n):e.value=n,e.updatedAt=l)}function Zl(e,t,l,n=ke,c){const i={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:T,context:T?T.context:null,pure:l};return T===null||T!==Wn&&(T.owned?T.owned.push(i):T.owned=[i]),i}function xt(e){if(e.state===0)return;if(e.state===Yt)return yt(e);if(e.suspense&&D(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;l--)if(e=t[l],e.state===ke)bt(e);else if(e.state===Yt){const n=ie;ie=null,qe(()=>yt(e,t[0]),!1),ie=n}}function qe(e,t){if(ie)return e();let l=!1;t||(ie=[]),He?l=!0:He=[],vt++;try{const n=e();return bc(l),n}catch(n){l||(He=null),ie=null,Yn(n)}}function bc(e){if(ie&&(Vn(ie),ie=null),e)return;const t=He;He=null,t.length&&qe(()=>Cn(t),!1)}function Vn(e){for(let t=0;t=0;t--)St(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function mc(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Yn(e,t=T){throw mc(e)}function rl(e){if(typeof e=="function"&&!e.length)return rl(e());if(Array.isArray(e)){const t=[];for(let l=0;lc=D(()=>(T.context={...T.context,[e]:n.value},fn(()=>n.children))),void 0),c}}const hc=Symbol("fallback");function Jl(e){for(let t=0;t1?[]:null;return _e(()=>Jl(i)),()=>{let r=e()||[],C,u;return r[sl],D(()=>{let Y=r.length,X,M,O,b,j,k,z,$,w;if(Y===0)s!==0&&(Jl(i),i=[],n=[],c=[],s=0,a&&(a=[])),l.fallback&&(n=[hc],c[0]=Te(be=>(i[0]=be,l.fallback())),s=1);else if(s===0){for(c=new Array(Y),u=0;u=k&&$>=k&&n[z]===r[$];z--,$--)O[$]=c[z],b[$]=i[z],a&&(j[$]=a[z]);for(X=new Map,M=new Array($+1),u=$;u>=k;u--)w=r[u],C=X.get(w),M[u]=C===void 0?-1:C,X.set(w,u);for(C=k;C<=z;C++)w=n[C],u=X.get(w),u!==void 0&&u!==-1?(O[u]=c[C],b[u]=i[C],a&&(j[u]=a[C]),u=M[u],X.set(w,u)):i[C]();for(u=k;ue(t||{}))}function Gt(){return!0}const Bl={get(e,t,l){return t===Re?l:e.get(t)},has(e,t){return t===Re?!0:e.has(t)},set:Gt,deleteProperty:Gt,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Gt,deleteProperty:Gt}},ownKeys(e){return e.keys()}};function Cc(e,...t){if(Re in e){const c=new Set(t.length>1?t.flat():t[0]),i=t.map(s=>new Proxy({get(a){return s.includes(a)?e[a]:void 0},has(a){return s.includes(a)&&a in e},keys(){return s.filter(a=>a in e)}},Bl));return i.push(new Proxy({get(s){return c.has(s)?void 0:e[s]},has(s){return c.has(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!c.has(s))}},Bl)),i}const l={},n=t.map(()=>({}));for(const c of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,c),s=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let a=!1,r=0;for(const C of t)C.includes(c)&&(a=!0,s?n[r][c]=i.value:Object.defineProperty(n[r],c,i)),++r;a||(s?l[c]=i.value:Object.defineProperty(l,c,i))}return[...n,l]}const xn=e=>`Stale read from <${e}>.`;function yn(e){const t="fallback"in e&&{fallback:()=>e.fallback};return le(Ic(()=>e.each,e.children,t||void 0))}function Rt(e){const t=e.keyed,l=le(()=>e.when,void 0,{equals:(n,c)=>t?n===c:!n==!c});return le(()=>{const n=l();if(n){const c=e.children;return typeof c=="function"&&c.length>0?D(()=>c(t?n:()=>{if(!D(l))throw xn("Show");return e.when})):c}return e.fallback},void 0,void 0)}function Wc(e){let t=!1;const l=(i,s)=>(t?i[1]===s[1]:!i[1]==!s[1])&&i[2]===s[2],n=fn(()=>e.children),c=le(()=>{let i=n();Array.isArray(i)||(i=[i]);for(let s=0;s{const[i,s,a]=c();if(i<0)return e.fallback;const r=a.children;return typeof r=="function"&&r.length>0?D(()=>r(t?s:()=>{if(D(c)[0]!==i)throw xn("Match");return a.when})):r},void 0,void 0)}function Fl(e){return e}const pc=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],fc=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...pc]),Xc=new Set(["innerHTML","textContent","innerText","children"]),Rc=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Vc=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function Ac(e,t){const l=Vc[e];return typeof l=="object"?l[t]?l.$:void 0:l}const Yc=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),xc=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),yc={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Jc(e,t,l){let n=l.length,c=t.length,i=n,s=0,a=0,r=t[c-1].nextSibling,C=null;for(;su-a){const M=t[s];for(;a{const s=document.createElement("template");return s.innerHTML=e,s.content.firstChild},i=()=>(n||(n=c())).cloneNode(!0);return i.cloneNode=i,i}function ml(e,t=window.document){const l=t[Hl]||(t[Hl]=new Set);for(let n=0,c=e.length;nc.call(e,l[1],i))}else e.addEventListener(t,l)}function Fc(e,t,l={}){const n=Object.keys(t||{}),c=Object.keys(l);let i,s;for(i=0,s=c.length;ic.children=dt(e,t.children,c.children)),ne(()=>typeof t.ref=="function"?kt(t.ref,e):t.ref=e),ne(()=>Nc(e,t,l,!0,c,!0)),c}function kt(e,t,l){return D(()=>e(t,l))}function se(e,t,l,n){if(l!==void 0&&!n&&(n=[]),typeof t!="function")return dt(e,t,n,l);ne(c=>dt(e,t(),c,l),n)}function Nc(e,t,l,n,c={},i=!1){t||(t={});for(const s in c)if(!(s in t)){if(s==="children")continue;c[s]=vl(e,s,null,c[s],l,i)}for(const s in t){if(s==="children")continue;const a=t[s];c[s]=vl(e,s,a,c[s],l,i)}}function vc(e){return e.toLowerCase().replace(/-([a-z])/g,(t,l)=>l.toUpperCase())}function Nl(e,t,l){const n=t.trim().split(/\s+/);for(let c=0,i=n.length;c-1&&yc[t.split(":")[0]];h?Bc(e,h,t,l):Ne(e,Rc[t]||t,l)}return l}function Sc(e){const t=`$$${e.type}`;let l=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==l&&Object.defineProperty(e,"target",{configurable:!0,value:l}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return l||document}});l;){const n=l[t];if(n&&!l.disabled){const c=l[`${t}Data`];if(c!==void 0?n.call(l,c,e):n.call(l,e),e.cancelBubble)return}l=l._$host||l.parentNode||l.host}}function dt(e,t,l,n,c){for(;typeof l=="function";)l=l();if(t===l)return l;const i=typeof t,s=n!==void 0;if(e=s&&l[0]&&l[0].parentNode||e,i==="string"||i==="number")if(i==="number"&&(t=t.toString()),s){let a=l[0];a&&a.nodeType===3?a.data!==t&&(a.data=t):a=document.createTextNode(t),l=Ue(e,l,n,a)}else l!==""&&typeof l=="string"?l=e.firstChild.data=t:l=e.textContent=t;else if(t==null||i==="boolean")l=Ue(e,l,n);else{if(i==="function")return ne(()=>{let a=t();for(;typeof a=="function";)a=a();l=dt(e,a,l,n)}),()=>l;if(Array.isArray(t)){const a=[],r=l&&Array.isArray(l);if(ol(a,t,l,c))return ne(()=>l=dt(e,a,l,n,!0)),()=>l;if(a.length===0){if(l=Ue(e,l,n),s)return l}else r?l.length===0?Sl(e,a,n):Jc(e,l,a):(l&&Ue(e),Sl(e,a));l=a}else if(t.nodeType){if(Array.isArray(l)){if(s)return l=Ue(e,l,n,t);Ue(e,l,null,t)}else l==null||l===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);l=t}}return l}function ol(e,t,l,n){let c=!1;for(let i=0,s=t.length;i=0;s--){const a=t[s];if(c!==a){const r=a.parentNode===e;!i&&!s?r?e.replaceChild(c,a):e.insertBefore(c,l):r&&a.remove()}else i=!0}}else e.insertBefore(c,l);return[c]}const kc="http://www.w3.org/2000/svg";function wc(e,t=!1){return t?document.createElementNS(kc,e):document.createElement(e)}function Ec(e){const[t,l]=Cc(e,["component"]),n=le(()=>t.component);return le(()=>{const c=n();switch(typeof c){case"function":return D(()=>c(l));case"string":const i=xc.has(c),s=wc(c,i);return Hc(s,l,i),s}})}/** * @license * Copyright (c) 2016, Contributors * SPDX-License-Identifier: ISC - */function Te(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let t="",n=!1;const c=e.match(/^-+/);for(let i=c?c[0].length:0;i0?n+=`${l}${t.charAt(c)}`:n+=s}return n}function Zn(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}/** + */function ct(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let l="",n=!1;const c=e.match(/^-+/);for(let i=c?c[0].length:0;i0?n+=`${t}${l.charAt(c)}`:n+=s}return n}function Fn(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}/** * @license * Copyright (c) 2016, Contributors * SPDX-License-Identifier: ISC - */function pc(e){if(Array.isArray(e))return e.map(s=>typeof s!="string"?s+"":s);e=e.trim();let l=0,t=null,n=null,c=null;const i=[];for(let s=0;stypeof s!="string"?s+"":s);e=e.trim();let t=0,l=null,n=null,c=null;const i=[];for(let s=0;s{typeof Z=="number"&&(u.nargs[r]=Z,u.keys.push(r))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([r,Z])=>{typeof Z=="function"&&(u.coercions[r]=Z,u.keys.push(r))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(r){u.configs[r]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([r,Z])=>{(typeof Z=="boolean"||typeof Z=="function")&&(u.configs[r]=Z)})),_(n.key,s,n.default,u.arrays),Object.keys(o).forEach(function(r){(u.aliases[r]||[]).forEach(function(Z){o[Z]=o[r]})});let E=null;vn();let M=[];const K=Object.assign(Object.create(null),{_:[]}),ie={};for(let r=0;r=3&&(A(Y[1],u.arrays)?r=X(r,Y[1],c,Y[2]):A(Y[1],u.nargs)!==!1?r=p(r,Y[1],c,Y[2]):R(Y[1],Y[2],!0));else if(Z.match(w)&&a["boolean-negation"])Y=Z.match(w),Y!==null&&Array.isArray(Y)&&Y.length>=2&&(d=Y[1],R(d,A(d,u.arrays)?[!1]:!1));else if(Z.match(/^--.+/)||!a["short-option-groups"]&&Z.match(/^-[^-]+/))Y=Z.match(/^--?(.+)/),Y!==null&&Array.isArray(Y)&&Y.length>=2&&(d=Y[1],A(d,u.arrays)?r=X(r,d,c):A(d,u.nargs)!==!1?r=p(r,d,c):(F=c[r+1],F!==void 0&&(!F.match(/^-/)||F.match(j))&&!A(d,u.bools)&&!A(d,u.counts)||/^(true|false)$/.test(F)?(R(d,F),r++):R(d,Ne(d))));else if(Z.match(/^-.\..+=/))Y=Z.match(/^-([^=]+)=([\s\S]*)$/),Y!==null&&Array.isArray(Y)&&Y.length>=3&&R(Y[1],Y[2]);else if(Z.match(/^-.\..+/)&&!Z.match(j))F=c[r+1],Y=Z.match(/^-(.\..+)/),Y!==null&&Array.isArray(Y)&&Y.length>=2&&(d=Y[1],F!==void 0&&!F.match(/^-/)&&!A(d,u.bools)&&!A(d,u.counts)?(R(d,F),r++):R(d,Ne(d)));else if(Z.match(/^-[^-]+/)&&!Z.match(j)){B=Z.slice(1,-1).split(""),m=!1;for(let ne=0;ner!=="--"&&r.includes("-")).forEach(r=>{delete K[r]}),a["strip-aliased"]&&[].concat(...Object.keys(s).map(r=>s[r])).forEach(r=>{a["camel-case-expansion"]&&r.includes("-")&&delete K[r.split(".").map(Z=>Te(Z)).join(".")],delete K[r]});function ge(r){const Z=C("_",r);(typeof Z=="string"||typeof Z=="number")&&K._.push(Z)}function p(r,Z,h,m){let d,B=A(Z,u.nargs);if(B=typeof B!="number"||isNaN(B)?1:B,B===0)return fe(m)||(E=Error(L("Argument unexpected for: %s",Z))),R(Z,Ne(Z)),r;let Y=fe(m)?0:1;if(a["nargs-eats-options"])h.length-(r+1)+Y0&&(R(Z,m),F--),d=r+1;d0||Y&&typeof Y=="number"&&d.length>=Y||(B=h[F],/^-/.test(B)&&!j.test(B)&&!He(B)));F++)r=F,d.push(be(Z,B,i))}return typeof Y=="number"&&(Y&&d.length1&&a["dot-notation"]&&(u.aliases[d[0]]||[]).forEach(function(B){let Y=B.split(".");const F=[].concat(d);F.shift(),Y=Y.concat(F),(u.aliases[r]||[]).includes(Y.join("."))||z(K,Y,m)}),A(r,u.normalize)&&!A(r,u.arrays)&&[r].concat(u.aliases[r]||[]).forEach(function(Y){Object.defineProperty(ie,Y,{enumerable:!0,get(){return Z},set(F){Z=typeof F=="string"?Re.normalize(F):F}})})}function v(r,Z){u.aliases[r]&&u.aliases[r].length||(u.aliases[r]=[Z],W[Z]=!0),u.aliases[Z]&&u.aliases[Z].length||v(Z,r)}function be(r,Z,h){h&&(Z=Rc(Z)),(A(r,u.bools)||A(r,u.counts))&&typeof Z=="string"&&(Z=Z==="true");let m=Array.isArray(Z)?Z.map(function(d){return C(r,d)}):C(r,Z);return A(r,u.counts)&&(fe(m)||typeof m=="boolean")&&(m=yt()),A(r,u.normalize)&&A(r,u.arrays)&&(Array.isArray(Z)?m=Z.map(d=>Re.normalize(d)):m=Re.normalize(Z)),m}function C(r,Z){return!a["parse-positional-numbers"]&&r==="_"||!A(r,u.strings)&&!A(r,u.bools)&&!Array.isArray(Z)&&(Zn(Z)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${Z}`)))||!fe(Z)&&A(r,u.numbers))&&(Z=Number(Z)),Z}function f(r){const Z=Object.create(null);Q(Z,u.aliases,o),Object.keys(u.configs).forEach(function(h){const m=r[h]||Z[h];if(m)try{let d=null;const B=Re.resolve(Re.cwd(),m),Y=u.configs[h];if(typeof Y=="function"){try{d=Y(B)}catch(F){d=F}if(d instanceof Error){E=d;return}}else d=Re.require(B);V(d)}catch(d){d.name==="PermissionDenied"?E=d:r[h]&&(E=Error(L("Invalid JSON config file: %s",m)))}})}function V(r,Z){Object.keys(r).forEach(function(h){const m=r[h],d=Z?Z+"."+h:h;typeof m=="object"&&m!==null&&!Array.isArray(m)&&a["dot-notation"]?V(m,d):(!S(K,d.split("."))||A(d,u.arrays)&&a["combine-arrays"])&&R(d,m)})}function H(){typeof g<"u"&&g.forEach(function(r){V(r)})}function N(r,Z){if(typeof b>"u")return;const h=typeof b=="string"?b:"",m=Re.env();Object.keys(m).forEach(function(d){if(h===""||d.lastIndexOf(h,0)===0){const B=d.split("__").map(function(Y,F){return F===0&&(Y=Y.substring(h.length)),Te(Y)});(Z&&u.configs[B.join(".")]||!Z)&&!S(r,B)&&R(B.join("."),m[d])}})}function y(r){let Z;const h=new Set;Object.keys(r).forEach(function(m){if(!h.has(m)&&(Z=A(m,u.coercions),typeof Z=="function"))try{const d=C(m,Z(r[m]));[].concat(u.aliases[m]||[],m).forEach(B=>{h.add(B),r[B]=d})}catch(d){E=d}})}function k(r){return u.keys.forEach(Z=>{~Z.indexOf(".")||typeof r[Z]>"u"&&(r[Z]=void 0)}),r}function Q(r,Z,h,m=!1){Object.keys(h).forEach(function(d){S(r,d.split("."))||(z(r,d.split("."),h[d]),m&&(x[d]=!0),(Z[d]||[]).forEach(function(B){S(r,B.split("."))||z(r,B.split("."),h[d])}))})}function S(r,Z){let h=r;a["dot-notation"]||(Z=[Z.join(".")]),Z.slice(0,-1).forEach(function(d){h=h[d]||{}});const m=Z[Z.length-1];return typeof h!="object"?!1:m in h}function z(r,Z,h){let m=r;a["dot-notation"]||(Z=[Z.join(".")]),Z.slice(0,-1).forEach(function(D){D=pl(D),typeof m=="object"&&m[D]===void 0&&(m[D]={}),typeof m[D]!="object"||Array.isArray(m[D])?(Array.isArray(m[D])?m[D].push({}):m[D]=[m[D],{}],m=m[D][m[D].length-1]):m=m[D]});const d=pl(Z[Z.length-1]),B=A(Z.join("."),u.arrays),Y=Array.isArray(h);let F=a["duplicate-arguments-array"];!F&&A(d,u.nargs)&&(F=!0,(!fe(m[d])&&u.nargs[d]===1||Array.isArray(m[d])&&m[d].length===u.nargs[d])&&(m[d]=void 0)),h===yt()?m[d]=yt(m[d]):Array.isArray(m[d])?F&&B&&Y?m[d]=a["flatten-duplicate-arrays"]?m[d].concat(h):(Array.isArray(m[d][0])?m[d]:[m[d]]).concat([h]):!F&&!!B==!!Y?m[d]=h:m[d]=m[d].concat([h]):m[d]===void 0&&B?m[d]=Y?h:[h]:F&&!(m[d]===void 0||A(d,u.counts)||A(d,u.bools))?m[d]=[m[d],h]:m[d]=h}function _(...r){r.forEach(function(Z){Object.keys(Z||{}).forEach(function(h){u.aliases[h]||(u.aliases[h]=[].concat(s[h]||[]),u.aliases[h].concat(h).forEach(function(m){if(/-/.test(m)&&a["camel-case-expansion"]){const d=Te(m);d!==h&&u.aliases[h].indexOf(d)===-1&&(u.aliases[h].push(d),W[d]=!0)}}),u.aliases[h].concat(h).forEach(function(m){if(m.length>1&&/[A-Z]/.test(m)&&a["camel-case-expansion"]){const d=bn(m,"-");d!==h&&u.aliases[h].indexOf(d)===-1&&(u.aliases[h].push(d),W[d]=!0)}}),u.aliases[h].forEach(function(m){u.aliases[m]=[h].concat(u.aliases[h].filter(function(d){return m!==d}))}))})})}function A(r,Z){const h=[].concat(u.aliases[r]||[],r),m=Object.keys(Z),d=h.find(B=>m.includes(B));return d?Z[d]:!1}function Ze(r){const Z=Object.keys(u);return[].concat(Z.map(m=>u[m])).some(function(m){return Array.isArray(m)?m.includes(r):m[r]})}function le(r,...Z){return[].concat(...Z).some(function(m){const d=r.match(m);return d&&Ze(d[1])})}function Xe(r){if(r.match(j)||!r.match(/^-[^-]+/))return!1;let Z=!0,h;const m=r.slice(1).split("");for(let d=0;dA(r,u.arrays)?(E=Error(L("Invalid configuration: %s, opts.count excludes opts.array.",r)),!0):A(r,u.nargs)?(E=Error(L("Invalid configuration: %s, opts.count excludes opts.narg.",r)),!0):!1)}return{aliases:Object.assign({},u.aliases),argv:Object.assign(ie,K),configuration:a,defaulted:Object.assign({},x),error:E,newAliases:Object.assign({},W)}}}function fc(e){const l=[],t=Object.create(null);let n=!0;for(Object.keys(e).forEach(function(c){l.push([].concat(e[c],c))});n;){n=!1;for(let c=0;c{typeof g=="number"&&(b.nargs[o]=g,b.keys.push(o))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([o,g])=>{typeof g=="function"&&(b.coercions[o]=g,b.keys.push(o))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(o){b.configs[o]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([o,g])=>{(typeof g=="boolean"||typeof g=="function")&&(b.configs[o]=g)})),te(n.key,s,n.default,b.arrays),Object.keys(r).forEach(function(o){(b.aliases[o]||[]).forEach(function(g){r[g]=r[o]})});let z=null;ec();let $=[];const w=Object.assign(Object.create(null),{_:[]}),be={};for(let o=0;o=3&&(V(A[1],b.arrays)?o=f(o,A[1],c,A[2]):V(A[1],b.nargs)!==!1?o=p(o,A[1],c,A[2]):R(A[1],A[2],!0));else if(g.match(k)&&a["boolean-negation"])A=g.match(k),A!==null&&Array.isArray(A)&&A.length>=2&&(d=A[1],R(d,V(d,b.arrays)?[!1]:!1));else if(g.match(/^--.+/)||!a["short-option-groups"]&&g.match(/^-[^-]+/))A=g.match(/^--?(.+)/),A!==null&&Array.isArray(A)&&A.length>=2&&(d=A[1],V(d,b.arrays)?o=f(o,d,c):V(d,b.nargs)!==!1?o=p(o,d,c):(J=c[o+1],J!==void 0&&(!J.match(/^-/)||J.match(j))&&!V(d,b.bools)&&!V(d,b.counts)||/^(true|false)$/.test(J)?(R(d,J),o++):R(d,ze(d))));else if(g.match(/^-.\..+=/))A=g.match(/^-([^=]+)=([\s\S]*)$/),A!==null&&Array.isArray(A)&&A.length>=3&&R(A[1],A[2]);else if(g.match(/^-.\..+/)&&!g.match(j))J=c[o+1],A=g.match(/^-(.\..+)/),A!==null&&Array.isArray(A)&&A.length>=2&&(d=A[1],J!==void 0&&!J.match(/^-/)&&!V(d,b.bools)&&!V(d,b.counts)?(R(d,J),o++):R(d,ze(d)));else if(g.match(/^-[^-]+/)&&!g.match(j)){y=g.slice(1,-1).split(""),Z=!1;for(let ae=0;aeo!=="--"&&o.includes("-")).forEach(o=>{delete w[o]}),a["strip-aliased"]&&[].concat(...Object.keys(s).map(o=>s[o])).forEach(o=>{a["camel-case-expansion"]&&o.includes("-")&&delete w[o.split(".").map(g=>ct(g)).join(".")],delete w[o]});function Ze(o){const g=I("_",o);(typeof g=="string"||typeof g=="number")&&w._.push(g)}function p(o,g,W,Z){let d,y=V(g,b.nargs);if(y=typeof y!="number"||isNaN(y)?1:y,y===0)return Ae(Z)||(z=Error(O("Argument unexpected for: %s",g))),R(g,ze(g)),o;let A=Ae(Z)?0:1;if(a["nargs-eats-options"])W.length-(o+1)+A0&&(R(g,Z),J--),d=o+1;d0||A&&typeof A=="number"&&d.length>=A||(y=W[J],/^-/.test(y)&&!j.test(y)&&!Qe(y)));J++)o=J,d.push(_(g,y,i))}return typeof A=="number"&&(A&&d.length1&&a["dot-notation"]&&(b.aliases[d[0]]||[]).forEach(function(y){let A=y.split(".");const J=[].concat(d);J.shift(),A=A.concat(J),(b.aliases[o]||[]).includes(A.join("."))||K(w,A,Z)}),V(o,b.normalize)&&!V(o,b.arrays)&&[o].concat(b.aliases[o]||[]).forEach(function(A){Object.defineProperty(be,A,{enumerable:!0,get(){return g},set(J){g=typeof J=="string"?Ye.normalize(J):J}})})}function N(o,g){b.aliases[o]&&b.aliases[o].length||(b.aliases[o]=[g],X[g]=!0),b.aliases[g]&&b.aliases[g].length||N(g,o)}function _(o,g,W){W&&(g=Uc(g)),(V(o,b.bools)||V(o,b.counts))&&typeof g=="string"&&(g=g==="true");let Z=Array.isArray(g)?g.map(function(d){return I(o,d)}):I(o,g);return V(o,b.counts)&&(Ae(Z)||typeof Z=="boolean")&&(Z=Lt()),V(o,b.normalize)&&V(o,b.arrays)&&(Array.isArray(g)?Z=g.map(d=>Ye.normalize(d)):Z=Ye.normalize(g)),Z}function I(o,g){return!a["parse-positional-numbers"]&&o==="_"||!V(o,b.strings)&&!V(o,b.bools)&&!Array.isArray(g)&&(Fn(g)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${g}`)))||!Ae(g)&&V(o,b.numbers))&&(g=Number(g)),g}function m(o){const g=Object.create(null);E(g,b.aliases,r),Object.keys(b.configs).forEach(function(W){const Z=o[W]||g[W];if(Z)try{let d=null;const y=Ye.resolve(Ye.cwd(),Z),A=b.configs[W];if(typeof A=="function"){try{d=A(y)}catch(J){d=J}if(d instanceof Error){z=d;return}}else d=Ye.require(y);H(d)}catch(d){d.name==="PermissionDenied"?z=d:o[W]&&(z=Error(O("Invalid JSON config file: %s",Z)))}})}function H(o,g){Object.keys(o).forEach(function(W){const Z=o[W],d=g?g+"."+W:W;typeof Z=="object"&&Z!==null&&!Array.isArray(Z)&&a["dot-notation"]?H(Z,d):(!S(w,d.split("."))||V(d,b.arrays)&&a["combine-arrays"])&&R(d,Z)})}function B(){typeof C<"u"&&C.forEach(function(o){H(o)})}function F(o,g){if(typeof u>"u")return;const W=typeof u=="string"?u:"",Z=Ye.env();Object.keys(Z).forEach(function(d){if(W===""||d.lastIndexOf(W,0)===0){const y=d.split("__").map(function(A,J){return J===0&&(A=A.substring(W.length)),ct(A)});(g&&b.configs[y.join(".")]||!g)&&!S(o,y)&&R(y.join("."),Z[d])}})}function x(o){let g;const W=new Set;Object.keys(o).forEach(function(Z){if(!W.has(Z)&&(g=V(Z,b.coercions),typeof g=="function"))try{const d=I(Z,g(o[Z]));[].concat(b.aliases[Z]||[],Z).forEach(y=>{W.add(y),o[y]=d})}catch(d){z=d}})}function v(o){return b.keys.forEach(g=>{~g.indexOf(".")||typeof o[g]>"u"&&(o[g]=void 0)}),o}function E(o,g,W,Z=!1){Object.keys(W).forEach(function(d){S(o,d.split("."))||(K(o,d.split("."),W[d]),Z&&(M[d]=!0),(g[d]||[]).forEach(function(y){S(o,y.split("."))||K(o,y.split("."),W[d])}))})}function S(o,g){let W=o;a["dot-notation"]||(g=[g.join(".")]),g.slice(0,-1).forEach(function(d){W=W[d]||{}});const Z=g[g.length-1];return typeof W!="object"?!1:Z in W}function K(o,g,W){let Z=o;a["dot-notation"]||(g=[g.join(".")]),g.slice(0,-1).forEach(function(q){q=kl(q),typeof Z=="object"&&Z[q]===void 0&&(Z[q]={}),typeof Z[q]!="object"||Array.isArray(Z[q])?(Array.isArray(Z[q])?Z[q].push({}):Z[q]=[Z[q],{}],Z=Z[q][Z[q].length-1]):Z=Z[q]});const d=kl(g[g.length-1]),y=V(g.join("."),b.arrays),A=Array.isArray(W);let J=a["duplicate-arguments-array"];!J&&V(d,b.nargs)&&(J=!0,(!Ae(Z[d])&&b.nargs[d]===1||Array.isArray(Z[d])&&Z[d].length===b.nargs[d])&&(Z[d]=void 0)),W===Lt()?Z[d]=Lt(Z[d]):Array.isArray(Z[d])?J&&y&&A?Z[d]=a["flatten-duplicate-arrays"]?Z[d].concat(W):(Array.isArray(Z[d][0])?Z[d]:[Z[d]]).concat([W]):!J&&!!y==!!A?Z[d]=W:Z[d]=Z[d].concat([W]):Z[d]===void 0&&y?Z[d]=A?W:[W]:J&&!(Z[d]===void 0||V(d,b.counts)||V(d,b.bools))?Z[d]=[Z[d],W]:Z[d]=W}function te(...o){o.forEach(function(g){Object.keys(g||{}).forEach(function(W){b.aliases[W]||(b.aliases[W]=[].concat(s[W]||[]),b.aliases[W].concat(W).forEach(function(Z){if(/-/.test(Z)&&a["camel-case-expansion"]){const d=ct(Z);d!==W&&b.aliases[W].indexOf(d)===-1&&(b.aliases[W].push(d),X[d]=!0)}}),b.aliases[W].concat(W).forEach(function(Z){if(Z.length>1&&/[A-Z]/.test(Z)&&a["camel-case-expansion"]){const d=Bn(Z,"-");d!==W&&b.aliases[W].indexOf(d)===-1&&(b.aliases[W].push(d),X[d]=!0)}}),b.aliases[W].forEach(function(Z){b.aliases[Z]=[W].concat(b.aliases[W].filter(function(d){return Z!==d}))}))})})}function V(o,g){const W=[].concat(b.aliases[o]||[],o),Z=Object.keys(g),d=W.find(y=>Z.includes(y));return d?g[d]:!1}function Ge(o){const g=Object.keys(b);return[].concat(g.map(Z=>b[Z])).some(function(Z){return Array.isArray(Z)?Z.includes(o):Z[o]})}function ce(o,...g){return[].concat(...g).some(function(Z){const d=o.match(Z);return d&&Ge(d[1])})}function Ve(o){if(o.match(j)||!o.match(/^-[^-]+/))return!1;let g=!0,W;const Z=o.slice(1).split("");for(let d=0;dV(o,b.arrays)?(z=Error(O("Invalid configuration: %s, opts.count excludes opts.array.",o)),!0):V(o,b.nargs)?(z=Error(O("Invalid configuration: %s, opts.count excludes opts.narg.",o)),!0):!1)}return{aliases:Object.assign({},b.aliases),argv:Object.assign(be,w),configuration:a,defaulted:Object.assign({},M),error:z,newAliases:Object.assign({},X)}}}function zc(e){const t=[],l=Object.create(null);let n=!0;for(Object.keys(e).forEach(function(c){t.push([].concat(e[c],c))});n;){n=!1;for(let c=0;cVc,format:Sn.format,normalize:oe.normalize,resolve:oe.resolve,require:e=>{if(typeof require<"u")return require(e);if(e.match(/\.json$/))return JSON.parse(Pl.readFileSync(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),lt=function(l,t){return un.parse(l.slice(),t).argv};lt.detailed=function(e,l){return un.parse(e.slice(),l)};lt.camelCase=Te;lt.decamelize=bn;lt.looksLikeNumber=Zn;const Ac={exportToOo:"导出为......",exportWithPrevious:"使用上一次设置导出",exportSuccessNotice:T`导出文件 ${0} 成功!`,exportCommandOutputMessage:T`命令:${0}`,exportErrorOutputMessage:T`命令 ${0},错误:${1}`,pleaseOpenFile:"请打开一个文件先。",preparing:T`正在生成 "${0}" ......`,exportDialog:{fileName:"文件名",type:"类型",exportTo:"导出到",title:T`导出为 ${0}`,export:"导出",selectExportFolder:"请选择导出文件夹",overwriteConfirmation:"覆盖提示"},messageBox:{yes:"是",no:"否",ok:"确认",cancel:"取消"},overwriteConfirmationDialog:{replace:"替换",title:T`"${0}" 已经存在。您要替换它吗?`,message:T`"${0}" 文件夹中已有相同的文件或文件夹,若替换,则会覆盖其当前内容。`},settingTab:{title:"导出设置",general:"通用",name:"名称",customLocation:"自定义",pandocVersion:T`版本: ${0}`,pandocVersionWithWarning:T`Version: ${0}, 请升级版本到 ${1}`,pandocNotFound:"找不到 Pandoc,请填写 Pandoc 文件路径,或者将其添加到系统环境变量中。",pandocPath:"Pandoc 路径",defaultFolderForExportedFile:"默认的导出文件夹",openExportedFileLocation:"打开导出文件所在目录",sameFolderWithCurrentFile:"与原文件同一目录下",openExportedFile:"打开导出文件",pandocPathPlaceholder:"(自动检测)",editCommandTemplate:"编辑命令模板",chooseCommandTemplate:"选择模板",afterExport:"导出后",command:"命令",arguments:"参数",auto:"自动",reset:"重置",add:"添加",remove:"移除",rename:"重命名",targetFileExtensions:"目标文件扩展名",targetFileExtensionsTip:"(用空格分开)",showCommandOutput:"显示命令行输出",runCommand:"运行自定义命令",extraArguments:"自定义参数",save:"保存",new:"新建",template:"模板",advanced:"高级",environmentVariables:"环境变量",environmentVariablesDesc:"定义导出的环境变量.",ShowExportProgressBar:"显示导出进度条"}},Yc={exportToOo:"Export to...",exportSuccessNotice:T`Export file ${0} success!`,exportCommandOutputMessage:T`Command: ${0}`,exportErrorOutputMessage:T`Command: ${0},Error:${1}`,exportWithPrevious:"Export with Previous",pleaseOpenFile:"Please open a file first.",preparing:T`generating "${0}"...`,exportDialog:{exportTo:"Export to",fileName:"File Name",title:T`Export to ${0}`,export:"Export",selectExportFolder:"Please select an export folder.",overwriteConfirmation:"Overwrite confirmation",type:"Type"},messageBox:{yes:"Yes",no:"No",ok:"Ok",cancel:"Cancel"},overwriteConfirmationDialog:{replace:"Replace",title:T`"${0}" already exists. Do you want to replace it?`,message:T`A file or folder with the same name already exists in the folder "${0}". Replacing it will overwrite its current contents.`},settingTab:{general:"General",name:"Name",title:"Export Settings",pandocVersion:T`Version: ${0}`,pandocVersionWithWarning:T`Version: ${0}, please upgrade version to ${1}`,pandocNotFound:"Pandoc not found, please fill in the Pandoc file path, or add it to the system environment variables.",defaultFolderForExportedFile:"Default Folder for Exported File",openExportedFileLocation:"Open exported file location",ShowExportProgressBar:"Show export progress bar",openExportedFile:"Open exported file",pandocPath:"Pandoc path",pandocPathPlaceholder:"(Auto Detect)",editCommandTemplate:"Edit Command Template",chooseCommandTemplate:"Choose template",customLocation:"Custom location",template:"Template",command:"Command",reset:"Reset",auto:"Auto",add:"Add",remove:"Remove",rename:"Rename",sameFolderWithCurrentFile:"Same folder with current file",afterExport:"After Export",targetFileExtensions:"Target file extensions",targetFileExtensionsTip:"(Separated by whitespace)",showCommandOutput:"Show command output",runCommand:"Run command",extraArguments:"Extra arguments",save:"Save",new:"New",arguments:"Arguments",advanced:"Advanced",environmentVariables:"Environment Variables",environmentVariablesDesc:"Define the Environment Variables for exporting."}},xc={exportToOo:"Export to...",exportSuccessNotice:T`Export der Datei ${0} erfolgreich!`,exportCommandOutputMessage:T`Command: ${0}`,exportErrorOutputMessage:T`Command: ${0},Fehler:${1}`,exportWithPrevious:"Exportiere mit Vorherigem",pleaseOpenFile:"Bitte öffne zunächst eine Datei.",preparing:T`generating "${0}"...`,exportDialog:{exportTo:"Exportiere nach",fileName:"Dateiname",title:T`Export to ${0}`,export:"Export",selectExportFolder:"Zielordner auswählen",overwriteConfirmation:"Überschreibe den Zielordner",type:"Typ"},messageBox:{yes:"Ja",no:"Nein",ok:"Ok",cancel:"Abbrechen"},overwriteConfirmationDialog:{replace:"Ersetze",title:T`"${0}" existiert bereits. Soll er ersetzt werden?`,message:T`Eine Datei oder ein Ordner mit dem gleichen Namen existiert bereits im Ordner "${0}". Das Ersetzen wird die jetzigen Inhalte überschreiben.`},settingTab:{general:"Allgemein",name:"Name",title:"Export-Einstellungen",pandocVersion:T`Version: ${0}`,pandocVersionWithWarning:T`Version: ${0}, please upgrade version to ${1}`,pandocNotFound:"Pandoc.exe wurde nicht gefunden. Bitte geben Sie den Pfad zur Pandoc.exe ein oder fügen Sie ihn den Window Systemumgebungsvariablen hinzu.",defaultFolderForExportedFile:"Standardordner für exportierte Dateien",openExportedFileLocation:"Speicherort der exportierten Datei öffnen",openExportedFile:"Exportierte Datei öffnen",pandocPath:"Pfad zur Datei Pandoc.exe",pandocPathPlaceholder:"(Automatische Erkennung)",editCommandTemplate:"‘Befehlsvorlage bearbeiten",chooseCommandTemplate:"Vorlage auswählen",customLocation:"Benutzerdefinierter Speicherort",template:"Vorlage",command:"Befehl",reset:"Zurücksetzen",auto:"Auto",add:"Hinzufügen",remove:"Entfernen",rename:"Umbenennen",sameFolderWithCurrentFile:"Der gleiche Ordner mit der aktuellen Datei",afterExport:"Nach dem Export",targetFileExtensions:"Dateinamenserweiterung der Zieldatei",targetFileExtensionsTip:"(Mit Leerzeichen getrennt)",showCommandOutput:"Zeige die Ausgabe des Befehls",runCommand:"Starte den Befehl",extraArguments:"Zusätzliche Parameter",save:"Speichern",new:"Neu",arguments:"Parameter",advanced:"Advanced",environmentVariables:"Environment Variables",environmentVariablesDesc:"Define the Environment Variables for exporting.",ShowExportProgressBar:"Show export progressBar"}},mn={"de-DE":xc,"en-US":Yc,"zh-CN":Ac,get current(){const e=Object.keys(this),l=Ge.moment.locale().toLowerCase();let t=e.find(c=>c.toLowerCase()===l.toLowerCase());if(t)return this[t];const n=l.split("-")[0];return t=e.find(c=>c.toLowerCase().startsWith(n)),t?this[t]:this["en-US"]}};class Rl extends Ge.Modal{constructor(l,t,n){super(l),this.options=typeof t=="string"?{message:t,buttons:"Ok",title:n}:t,this.lang=mn.current}onOpen(){const{titleEl:l,contentEl:t,lang:n,options:{message:c,title:i,buttons:s,callback:a,buttonsLabel:o,buttonsClass:g}}=this;switch(i&&l.setText(i),t.createDiv({text:c}),s){case"Yes":t.createEl("div",{cls:["modal-button-container"],parent:t},b=>{b.createEl("button",{text:(o==null?void 0:o.yes)??n.messageBox.yes,cls:["mod-cta",g==null?void 0:g.yes],parent:b}).onclick=()=>this.call(a==null?void 0:a.yes)});break;case"YesNo":t.createEl("div",{cls:["modal-button-container"],parent:t},b=>{b.createEl("button",{text:(o==null?void 0:o.yes)??n.messageBox.yes,cls:["mod-cta",g==null?void 0:g.yes],parent:b}).onclick=()=>this.call(a==null?void 0:a.yes),b.createEl("button",{text:(o==null?void 0:o.no)??n.messageBox.no,cls:["mod-cta",g==null?void 0:g.no],parent:b}).onclick=()=>this.call(a==null?void 0:a.no)});break;case"Ok":t.createEl("div",{cls:["modal-button-container"],parent:t},b=>{b.createEl("button",{text:(o==null?void 0:o.ok)??n.messageBox.ok,cls:["mod-cta",g==null?void 0:g.no],parent:b}).onclick=()=>this.call(a==null?void 0:a.ok)});break;case"OkCancel":t.createEl("div",{cls:["modal-button-container"],parent:t},b=>{b.createEl("button",{text:(o==null?void 0:o.ok)??n.messageBox.ok,cls:["mod-cta",g==null?void 0:g.ok],parent:b}).onclick=()=>this.call(a==null?void 0:a.ok),b.createEl("button",{text:(o==null?void 0:o.cancel)??n.messageBox.cancel,cls:["mod-cta",g==null?void 0:g.cancel],parent:b}).onclick=()=>this.call(a==null?void 0:a.cancel)});break}}call(l){l&&l(),this.close()}onClose(){const{contentEl:l}=this;l.empty()}}function Jc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $t={exports:{}};const Bc="2.0.0",Gn=256,yc=Number.MAX_SAFE_INTEGER||9007199254740991,Fc=16,Hc=Gn-6,Nc=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Rt={MAX_LENGTH:Gn,MAX_SAFE_COMPONENT_LENGTH:Fc,MAX_SAFE_BUILD_LENGTH:Hc,MAX_SAFE_INTEGER:yc,RELEASE_TYPES:Nc,SEMVER_SPEC_VERSION:Bc,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const vc=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Vt=vc;(function(e,l){const{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:c}=Rt,i=Vt;l=e.exports={};const s=l.re=[],a=l.safeRe=[],o=l.src=[],g=l.t={};let b=0;const G="[a-zA-Z0-9-]",J=[["\\s",1],["\\d",c],[G,n]],W=L=>{for(const[u,j]of J)L=L.split(`${u}*`).join(`${u}{0,${j}}`).split(`${u}+`).join(`${u}{1,${j}}`);return L},x=(L,u,j)=>{const w=W(u),E=b++;i(L,E,u),g[L]=E,o[E]=u,s[E]=new RegExp(u,j?"g":void 0),a[E]=new RegExp(w,j?"g":void 0)};x("NUMERICIDENTIFIER","0|[1-9]\\d*"),x("NUMERICIDENTIFIERLOOSE","\\d+"),x("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${G}*`),x("MAINVERSION",`(${o[g.NUMERICIDENTIFIER]})\\.(${o[g.NUMERICIDENTIFIER]})\\.(${o[g.NUMERICIDENTIFIER]})`),x("MAINVERSIONLOOSE",`(${o[g.NUMERICIDENTIFIERLOOSE]})\\.(${o[g.NUMERICIDENTIFIERLOOSE]})\\.(${o[g.NUMERICIDENTIFIERLOOSE]})`),x("PRERELEASEIDENTIFIER",`(?:${o[g.NUMERICIDENTIFIER]}|${o[g.NONNUMERICIDENTIFIER]})`),x("PRERELEASEIDENTIFIERLOOSE",`(?:${o[g.NUMERICIDENTIFIERLOOSE]}|${o[g.NONNUMERICIDENTIFIER]})`),x("PRERELEASE",`(?:-(${o[g.PRERELEASEIDENTIFIER]}(?:\\.${o[g.PRERELEASEIDENTIFIER]})*))`),x("PRERELEASELOOSE",`(?:-?(${o[g.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[g.PRERELEASEIDENTIFIERLOOSE]})*))`),x("BUILDIDENTIFIER",`${G}+`),x("BUILD",`(?:\\+(${o[g.BUILDIDENTIFIER]}(?:\\.${o[g.BUILDIDENTIFIER]})*))`),x("FULLPLAIN",`v?${o[g.MAINVERSION]}${o[g.PRERELEASE]}?${o[g.BUILD]}?`),x("FULL",`^${o[g.FULLPLAIN]}$`),x("LOOSEPLAIN",`[v=\\s]*${o[g.MAINVERSIONLOOSE]}${o[g.PRERELEASELOOSE]}?${o[g.BUILD]}?`),x("LOOSE",`^${o[g.LOOSEPLAIN]}$`),x("GTLT","((?:<|>)?=?)"),x("XRANGEIDENTIFIERLOOSE",`${o[g.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),x("XRANGEIDENTIFIER",`${o[g.NUMERICIDENTIFIER]}|x|X|\\*`),x("XRANGEPLAIN",`[v=\\s]*(${o[g.XRANGEIDENTIFIER]})(?:\\.(${o[g.XRANGEIDENTIFIER]})(?:\\.(${o[g.XRANGEIDENTIFIER]})(?:${o[g.PRERELEASE]})?${o[g.BUILD]}?)?)?`),x("XRANGEPLAINLOOSE",`[v=\\s]*(${o[g.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[g.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[g.XRANGEIDENTIFIERLOOSE]})(?:${o[g.PRERELEASELOOSE]})?${o[g.BUILD]}?)?)?`),x("XRANGE",`^${o[g.GTLT]}\\s*${o[g.XRANGEPLAIN]}$`),x("XRANGELOOSE",`^${o[g.GTLT]}\\s*${o[g.XRANGEPLAINLOOSE]}$`),x("COERCEPLAIN",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`),x("COERCE",`${o[g.COERCEPLAIN]}(?:$|[^\\d])`),x("COERCEFULL",o[g.COERCEPLAIN]+`(?:${o[g.PRERELEASE]})?(?:${o[g.BUILD]})?(?:$|[^\\d])`),x("COERCERTL",o[g.COERCE],!0),x("COERCERTLFULL",o[g.COERCEFULL],!0),x("LONETILDE","(?:~>?)"),x("TILDETRIM",`(\\s*)${o[g.LONETILDE]}\\s+`,!0),l.tildeTrimReplace="$1~",x("TILDE",`^${o[g.LONETILDE]}${o[g.XRANGEPLAIN]}$`),x("TILDELOOSE",`^${o[g.LONETILDE]}${o[g.XRANGEPLAINLOOSE]}$`),x("LONECARET","(?:\\^)"),x("CARETTRIM",`(\\s*)${o[g.LONECARET]}\\s+`,!0),l.caretTrimReplace="$1^",x("CARET",`^${o[g.LONECARET]}${o[g.XRANGEPLAIN]}$`),x("CARETLOOSE",`^${o[g.LONECARET]}${o[g.XRANGEPLAINLOOSE]}$`),x("COMPARATORLOOSE",`^${o[g.GTLT]}\\s*(${o[g.LOOSEPLAIN]})$|^$`),x("COMPARATOR",`^${o[g.GTLT]}\\s*(${o[g.FULLPLAIN]})$|^$`),x("COMPARATORTRIM",`(\\s*)${o[g.GTLT]}\\s*(${o[g.LOOSEPLAIN]}|${o[g.XRANGEPLAIN]})`,!0),l.comparatorTrimReplace="$1$2$3",x("HYPHENRANGE",`^\\s*(${o[g.XRANGEPLAIN]})\\s+-\\s+(${o[g.XRANGEPLAIN]})\\s*$`),x("HYPHENRANGELOOSE",`^\\s*(${o[g.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[g.XRANGEPLAINLOOSE]})\\s*$`),x("STAR","(<|>)?=?\\s*\\*"),x("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),x("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})($t,$t.exports);var nt=$t.exports;const kc=Object.freeze({loose:!0}),Sc=Object.freeze({}),wc=e=>e?typeof e!="object"?kc:e:Sc;var ll=wc;const Vl=/^[0-9]+$/,In=(e,l)=>{const t=Vl.test(e),n=Vl.test(l);return t&&n&&(e=+e,l=+l),e===l?0:t&&!n?-1:n&&!t?1:eIn(l,e);var Cn={compareIdentifiers:In,rcompareIdentifiers:Ec};const it=Vt,{MAX_LENGTH:Al,MAX_SAFE_INTEGER:at}=Rt,{safeRe:Yl,t:xl}=nt,Kc=ll,{compareIdentifiers:ke}=Cn;let Qc=class We{constructor(l,t){if(t=Kc(t),l instanceof We){if(l.loose===!!t.loose&&l.includePrerelease===!!t.includePrerelease)return l;l=l.version}else if(typeof l!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof l}".`);if(l.length>Al)throw new TypeError(`version is longer than ${Al} characters`);it("SemVer",l,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=l.trim().match(t.loose?Yl[xl.LOOSE]:Yl[xl.FULL]);if(!n)throw new TypeError(`Invalid Version: ${l}`);if(this.raw=l,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>at||this.major<0)throw new TypeError("Invalid major version");if(this.minor>at||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>at||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(c=>{if(/^[0-9]+$/.test(c)){const i=+c;if(i>=0&&i=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(t===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(c)}}if(t){let i=[t,c];n===!1&&(i=[t]),ke(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${l}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var ce=Qc;const Jl=ce,zc=(e,l,t=!1)=>{if(e instanceof Jl)return e;try{return new Jl(e,l)}catch(n){if(!t)return null;throw n}};var Ue=zc;const Uc=Ue,jc=(e,l)=>{const t=Uc(e,l);return t?t.version:null};var Lc=jc;const Tc=Ue,$c=(e,l)=>{const t=Tc(e.trim().replace(/^[=v]+/,""),l);return t?t.version:null};var Mc=$c;const Bl=ce,Oc=(e,l,t,n,c)=>{typeof t=="string"&&(c=n,n=t,t=void 0);try{return new Bl(e instanceof Bl?e.version:e,t).inc(l,n,c).version}catch{return null}};var Pc=Oc;const yl=Ue,Dc=(e,l)=>{const t=yl(e,null,!0),n=yl(l,null,!0),c=t.compare(n);if(c===0)return null;const i=c>0,s=i?t:n,a=i?n:t,o=!!s.prerelease.length;if(!!a.prerelease.length&&!o)return!a.patch&&!a.minor?"major":s.patch?"patch":s.minor?"minor":"major";const b=o?"pre":"";return t.major!==n.major?b+"major":t.minor!==n.minor?b+"minor":t.patch!==n.patch?b+"patch":"prerelease"};var _c=Dc;const qc=ce,ei=(e,l)=>new qc(e,l).major;var ti=ei;const li=ce,ni=(e,l)=>new li(e,l).minor;var ci=ni;const ii=ce,ai=(e,l)=>new ii(e,l).patch;var si=ai;const oi=Ue,ri=(e,l)=>{const t=oi(e,l);return t&&t.prerelease.length?t.prerelease:null};var di=ri;const Fl=ce,gi=(e,l,t)=>new Fl(e,t).compare(new Fl(l,t));var Ce=gi;const bi=Ce,Zi=(e,l,t)=>bi(l,e,t);var ui=Zi;const mi=Ce,Gi=(e,l)=>mi(e,l,!0);var Ii=Gi;const Hl=ce,Ci=(e,l,t)=>{const n=new Hl(e,t),c=new Hl(l,t);return n.compare(c)||n.compareBuild(c)};var nl=Ci;const hi=nl,Wi=(e,l)=>e.sort((t,n)=>hi(t,n,l));var pi=Wi;const Xi=nl,fi=(e,l)=>e.sort((t,n)=>Xi(n,t,l));var Ri=fi;const Vi=Ce,Ai=(e,l,t)=>Vi(e,l,t)>0;var At=Ai;const Yi=Ce,xi=(e,l,t)=>Yi(e,l,t)<0;var cl=xi;const Ji=Ce,Bi=(e,l,t)=>Ji(e,l,t)===0;var hn=Bi;const yi=Ce,Fi=(e,l,t)=>yi(e,l,t)!==0;var Wn=Fi;const Hi=Ce,Ni=(e,l,t)=>Hi(e,l,t)>=0;var il=Ni;const vi=Ce,ki=(e,l,t)=>vi(e,l,t)<=0;var al=ki;const Si=hn,wi=Wn,Ei=At,Ki=il,Qi=cl,zi=al,Ui=(e,l,t,n)=>{switch(l){case"===":return typeof e=="object"&&(e=e.version),typeof t=="object"&&(t=t.version),e===t;case"!==":return typeof e=="object"&&(e=e.version),typeof t=="object"&&(t=t.version),e!==t;case"":case"=":case"==":return Si(e,t,n);case"!=":return wi(e,t,n);case">":return Ei(e,t,n);case">=":return Ki(e,t,n);case"<":return Qi(e,t,n);case"<=":return zi(e,t,n);default:throw new TypeError(`Invalid operator: ${l}`)}};var pn=Ui;const ji=ce,Li=Ue,{safeRe:st,t:ot}=nt,Ti=(e,l)=>{if(e instanceof ji)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;l=l||{};let t=null;if(!l.rtl)t=e.match(l.includePrerelease?st[ot.COERCEFULL]:st[ot.COERCE]);else{const o=l.includePrerelease?st[ot.COERCERTLFULL]:st[ot.COERCERTL];let g;for(;(g=o.exec(e))&&(!t||t.index+t[0].length!==e.length);)(!t||g.index+g[0].length!==t.index+t[0].length)&&(t=g),o.lastIndex=g.index+g[1].length+g[2].length;o.lastIndex=-1}if(t===null)return null;const n=t[2],c=t[3]||"0",i=t[4]||"0",s=l.includePrerelease&&t[5]?`-${t[5]}`:"",a=l.includePrerelease&&t[6]?`+${t[6]}`:"";return Li(`${n}.${c}.${i}${s}${a}`,l)};var $i=Ti;class Mi{constructor(){this.max=1e3,this.map=new Map}get(l){const t=this.map.get(l);if(t!==void 0)return this.map.delete(l),this.map.set(l,t),t}delete(l){return this.map.delete(l)}set(l,t){if(!this.delete(l)&&t!==void 0){if(this.map.size>=this.max){const c=this.map.keys().next().value;this.delete(c)}this.map.set(l,t)}return this}}var Oi=Mi,vt,Nl;function he(){if(Nl)return vt;Nl=1;class e{constructor(f,V){if(V=n(V),f instanceof e)return f.loose===!!V.loose&&f.includePrerelease===!!V.includePrerelease?f:new e(f.raw,V);if(f instanceof c)return this.raw=f.value,this.set=[[f]],this.format(),this;if(this.options=V,this.loose=!!V.loose,this.includePrerelease=!!V.includePrerelease,this.raw=f.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(H=>this.parseRange(H.trim())).filter(H=>H.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const H=this.set[0];if(this.set=this.set.filter(N=>!x(N[0])),this.set.length===0)this.set=[H];else if(this.set.length>1){for(const N of this.set)if(N.length===1&&L(N[0])){this.set=[N];break}}}this.format()}format(){return this.range=this.set.map(f=>f.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(f){const H=((this.options.includePrerelease&&J)|(this.options.loose&&W))+":"+f,N=t.get(H);if(N)return N;const y=this.options.loose,k=y?a[o.HYPHENRANGELOOSE]:a[o.HYPHENRANGE];f=f.replace(k,v(this.options.includePrerelease)),i("hyphen replace",f),f=f.replace(a[o.COMPARATORTRIM],g),i("comparator trim",f),f=f.replace(a[o.TILDETRIM],b),i("tilde trim",f),f=f.replace(a[o.CARETTRIM],G),i("caret trim",f);let Q=f.split(" ").map(A=>j(A,this.options)).join(" ").split(/\s+/).map(A=>R(A,this.options));y&&(Q=Q.filter(A=>(i("loose invalid filter",A,this.options),!!A.match(a[o.COMPARATORLOOSE])))),i("range list",Q);const S=new Map,z=Q.map(A=>new c(A,this.options));for(const A of z){if(x(A))return[A];S.set(A.value,A)}S.size>1&&S.has("")&&S.delete("");const _=[...S.values()];return t.set(H,_),_}intersects(f,V){if(!(f instanceof e))throw new TypeError("a Range is required");return this.set.some(H=>u(H,V)&&f.set.some(N=>u(N,V)&&H.every(y=>N.every(k=>y.intersects(k,V)))))}test(f){if(!f)return!1;if(typeof f=="string")try{f=new s(f,this.options)}catch{return!1}for(let V=0;VC.value==="<0.0.0-0",L=C=>C.value==="",u=(C,f)=>{let V=!0;const H=C.slice();let N=H.pop();for(;V&&H.length;)V=H.every(y=>N.intersects(y,f)),N=H.pop();return V},j=(C,f)=>(i("comp",C,f),C=K(C,f),i("caret",C),C=E(C,f),i("tildes",C),C=ge(C,f),i("xrange",C),C=X(C,f),i("stars",C),C),w=C=>!C||C.toLowerCase()==="x"||C==="*",E=(C,f)=>C.trim().split(/\s+/).map(V=>M(V,f)).join(" "),M=(C,f)=>{const V=f.loose?a[o.TILDELOOSE]:a[o.TILDE];return C.replace(V,(H,N,y,k,Q)=>{i("tilde",C,H,N,y,k,Q);let S;return w(N)?S="":w(y)?S=`>=${N}.0.0 <${+N+1}.0.0-0`:w(k)?S=`>=${N}.${y}.0 <${N}.${+y+1}.0-0`:Q?(i("replaceTilde pr",Q),S=`>=${N}.${y}.${k}-${Q} <${N}.${+y+1}.0-0`):S=`>=${N}.${y}.${k} <${N}.${+y+1}.0-0`,i("tilde return",S),S})},K=(C,f)=>C.trim().split(/\s+/).map(V=>ie(V,f)).join(" "),ie=(C,f)=>{i("caret",C,f);const V=f.loose?a[o.CARETLOOSE]:a[o.CARET],H=f.includePrerelease?"-0":"";return C.replace(V,(N,y,k,Q,S)=>{i("caret",C,N,y,k,Q,S);let z;return w(y)?z="":w(k)?z=`>=${y}.0.0${H} <${+y+1}.0.0-0`:w(Q)?y==="0"?z=`>=${y}.${k}.0${H} <${y}.${+k+1}.0-0`:z=`>=${y}.${k}.0${H} <${+y+1}.0.0-0`:S?(i("replaceCaret pr",S),y==="0"?k==="0"?z=`>=${y}.${k}.${Q}-${S} <${y}.${k}.${+Q+1}-0`:z=`>=${y}.${k}.${Q}-${S} <${y}.${+k+1}.0-0`:z=`>=${y}.${k}.${Q}-${S} <${+y+1}.0.0-0`):(i("no pr"),y==="0"?k==="0"?z=`>=${y}.${k}.${Q}${H} <${y}.${k}.${+Q+1}-0`:z=`>=${y}.${k}.${Q}${H} <${y}.${+k+1}.0-0`:z=`>=${y}.${k}.${Q} <${+y+1}.0.0-0`),i("caret return",z),z})},ge=(C,f)=>(i("replaceXRanges",C,f),C.split(/\s+/).map(V=>p(V,f)).join(" ")),p=(C,f)=>{C=C.trim();const V=f.loose?a[o.XRANGELOOSE]:a[o.XRANGE];return C.replace(V,(H,N,y,k,Q,S)=>{i("xRange",C,H,N,y,k,Q,S);const z=w(y),_=z||w(k),A=_||w(Q),Ze=A;return N==="="&&Ze&&(N=""),S=f.includePrerelease?"-0":"",z?N===">"||N==="<"?H="<0.0.0-0":H="*":N&&Ze?(_&&(k=0),Q=0,N===">"?(N=">=",_?(y=+y+1,k=0,Q=0):(k=+k+1,Q=0)):N==="<="&&(N="<",_?y=+y+1:k=+k+1),N==="<"&&(S="-0"),H=`${N+y}.${k}.${Q}${S}`):_?H=`>=${y}.0.0${S} <${+y+1}.0.0-0`:A&&(H=`>=${y}.${k}.0${S} <${y}.${+k+1}.0-0`),i("xRange return",H),H})},X=(C,f)=>(i("replaceStars",C,f),C.trim().replace(a[o.STAR],"")),R=(C,f)=>(i("replaceGTE0",C,f),C.trim().replace(a[f.includePrerelease?o.GTE0PRE:o.GTE0],"")),v=C=>(f,V,H,N,y,k,Q,S,z,_,A,Ze)=>(w(H)?V="":w(N)?V=`>=${H}.0.0${C?"-0":""}`:w(y)?V=`>=${H}.${N}.0${C?"-0":""}`:k?V=`>=${V}`:V=`>=${V}${C?"-0":""}`,w(z)?S="":w(_)?S=`<${+z+1}.0.0-0`:w(A)?S=`<${z}.${+_+1}.0-0`:Ze?S=`<=${z}.${_}.${A}-${Ze}`:C?S=`<${z}.${_}.${+A+1}-0`:S=`<=${S}`,`${V} ${S}`.trim()),be=(C,f,V)=>{for(let H=0;H0){const N=C[H].semver;if(N.major===f.major&&N.minor===f.minor&&N.patch===f.patch)return!0}return!1}return!0};return vt}var kt,vl;function Yt(){if(vl)return kt;vl=1;const e=Symbol("SemVer ANY");class l{static get ANY(){return e}constructor(b,G){if(G=t(G),b instanceof l){if(b.loose===!!G.loose)return b;b=b.value}b=b.trim().split(/\s+/).join(" "),s("comparator",b,G),this.options=G,this.loose=!!G.loose,this.parse(b),this.semver===e?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(b){const G=this.options.loose?n[c.COMPARATORLOOSE]:n[c.COMPARATOR],J=b.match(G);if(!J)throw new TypeError(`Invalid comparator: ${b}`);this.operator=J[1]!==void 0?J[1]:"",this.operator==="="&&(this.operator=""),J[2]?this.semver=new a(J[2],this.options.loose):this.semver=e}toString(){return this.value}test(b){if(s("Comparator.test",b,this.options.loose),this.semver===e||b===e)return!0;if(typeof b=="string")try{b=new a(b,this.options)}catch{return!1}return i(b,this.operator,this.semver,this.options)}intersects(b,G){if(!(b instanceof l))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new o(b.value,G).test(this.value):b.operator===""?b.value===""?!0:new o(this.value,G).test(b.semver):(G=t(G),G.includePrerelease&&(this.value==="<0.0.0-0"||b.value==="<0.0.0-0")||!G.includePrerelease&&(this.value.startsWith("<0.0.0")||b.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&b.operator.startsWith(">")||this.operator.startsWith("<")&&b.operator.startsWith("<")||this.semver.version===b.semver.version&&this.operator.includes("=")&&b.operator.includes("=")||i(this.semver,"<",b.semver,G)&&this.operator.startsWith(">")&&b.operator.startsWith("<")||i(this.semver,">",b.semver,G)&&this.operator.startsWith("<")&&b.operator.startsWith(">")))}}kt=l;const t=ll,{safeRe:n,t:c}=nt,i=pn,s=Vt,a=ce,o=he();return kt}const Pi=he(),Di=(e,l,t)=>{try{l=new Pi(l,t)}catch{return!1}return l.test(e)};var xt=Di;const _i=he(),qi=(e,l)=>new _i(e,l).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));var ea=qi;const ta=ce,la=he(),na=(e,l,t)=>{let n=null,c=null,i=null;try{i=new la(l,t)}catch{return null}return e.forEach(s=>{i.test(s)&&(!n||c.compare(s)===-1)&&(n=s,c=new ta(n,t))}),n};var ca=na;const ia=ce,aa=he(),sa=(e,l,t)=>{let n=null,c=null,i=null;try{i=new aa(l,t)}catch{return null}return e.forEach(s=>{i.test(s)&&(!n||c.compare(s)===1)&&(n=s,c=new ia(n,t))}),n};var oa=sa;const St=ce,ra=he(),kl=At,da=(e,l)=>{e=new ra(e,l);let t=new St("0.0.0");if(e.test(t)||(t=new St("0.0.0-0"),e.test(t)))return t;t=null;for(let n=0;n{const a=new St(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||kl(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),i&&(!t||kl(t,i))&&(t=i)}return t&&e.test(t)?t:null};var ga=da;const ba=he(),Za=(e,l)=>{try{return new ba(e,l).range||"*"}catch{return null}};var ua=Za;const ma=ce,Xn=Yt(),{ANY:Ga}=Xn,Ia=he(),Ca=xt,Sl=At,wl=cl,ha=al,Wa=il,pa=(e,l,t,n)=>{e=new ma(e,n),l=new Ia(l,n);let c,i,s,a,o;switch(t){case">":c=Sl,i=ha,s=wl,a=">",o=">=";break;case"<":c=wl,i=Wa,s=Sl,a="<",o="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ca(e,l,n))return!1;for(let g=0;g{W.semver===Ga&&(W=new Xn(">=0.0.0")),G=G||W,J=J||W,c(W.semver,G.semver,n)?G=W:s(W.semver,J.semver,n)&&(J=W)}),G.operator===a||G.operator===o||(!J.operator||J.operator===a)&&i(e,J.semver))return!1;if(J.operator===o&&s(e,J.semver))return!1}return!0};var sl=pa;const Xa=sl,fa=(e,l,t)=>Xa(e,l,">",t);var Ra=fa;const Va=sl,Aa=(e,l,t)=>Va(e,l,"<",t);var Ya=Aa;const El=he(),xa=(e,l,t)=>(e=new El(e,t),l=new El(l,t),e.intersects(l,t));var Ja=xa;const Ba=xt,ya=Ce;var Fa=(e,l,t)=>{const n=[];let c=null,i=null;const s=e.sort((b,G)=>ya(b,G,t));for(const b of s)Ba(b,l,t)?(i=b,c||(c=b)):(i&&n.push([c,i]),i=null,c=null);c&&n.push([c,null]);const a=[];for(const[b,G]of n)b===G?a.push(b):!G&&b===s[0]?a.push("*"):G?b===s[0]?a.push(`<=${G}`):a.push(`${b} - ${G}`):a.push(`>=${b}`);const o=a.join(" || "),g=typeof l.raw=="string"?l.raw:String(l);return o.length{if(e===l)return!0;e=new Kl(e,t),l=new Kl(l,t);let n=!1;e:for(const c of e.set){for(const i of l.set){const s=va(c,i,t);if(n=n||s!==null,s)continue e}if(n)return!1}return!0},Na=[new ol(">=0.0.0-0")],Ql=[new ol(">=0.0.0")],va=(e,l,t)=>{if(e===l)return!0;if(e.length===1&&e[0].semver===wt){if(l.length===1&&l[0].semver===wt)return!0;t.includePrerelease?e=Na:e=Ql}if(l.length===1&&l[0].semver===wt){if(t.includePrerelease)return!0;l=Ql}const n=new Set;let c,i;for(const W of e)W.operator===">"||W.operator===">="?c=zl(c,W,t):W.operator==="<"||W.operator==="<="?i=Ul(i,W,t):n.add(W.semver);if(n.size>1)return null;let s;if(c&&i){if(s=rl(c.semver,i.semver,t),s>0)return null;if(s===0&&(c.operator!==">="||i.operator!=="<="))return null}for(const W of n){if(c&&!Le(W,String(c),t)||i&&!Le(W,String(i),t))return null;for(const x of l)if(!Le(W,String(x),t))return!1;return!0}let a,o,g,b,G=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,J=c&&!t.includePrerelease&&c.semver.prerelease.length?c.semver:!1;G&&G.prerelease.length===1&&i.operator==="<"&&G.prerelease[0]===0&&(G=!1);for(const W of l){if(b=b||W.operator===">"||W.operator===">=",g=g||W.operator==="<"||W.operator==="<=",c){if(J&&W.semver.prerelease&&W.semver.prerelease.length&&W.semver.major===J.major&&W.semver.minor===J.minor&&W.semver.patch===J.patch&&(J=!1),W.operator===">"||W.operator===">="){if(a=zl(c,W,t),a===W&&a!==c)return!1}else if(c.operator===">="&&!Le(c.semver,String(W),t))return!1}if(i){if(G&&W.semver.prerelease&&W.semver.prerelease.length&&W.semver.major===G.major&&W.semver.minor===G.minor&&W.semver.patch===G.patch&&(G=!1),W.operator==="<"||W.operator==="<="){if(o=Ul(i,W,t),o===W&&o!==i)return!1}else if(i.operator==="<="&&!Le(i.semver,String(W),t))return!1}if(!W.operator&&(i||c)&&s!==0)return!1}return!(c&&g&&!i&&s!==0||i&&b&&!c&&s!==0||J||G)},zl=(e,l,t)=>{if(!e)return l;const n=rl(e.semver,l.semver,t);return n>0?e:n<0||l.operator===">"&&e.operator===">="?l:e},Ul=(e,l,t)=>{if(!e)return l;const n=rl(e.semver,l.semver,t);return n<0?e:n>0||l.operator==="<"&&e.operator==="<="?l:e};var ka=Ha;const Et=nt,jl=Rt,Sa=ce,Ll=Cn,wa=Ue,Ea=Lc,Ka=Mc,Qa=Pc,za=_c,Ua=ti,ja=ci,La=si,Ta=di,$a=Ce,Ma=ui,Oa=Ii,Pa=nl,Da=pi,_a=Ri,qa=At,es=cl,ts=hn,ls=Wn,ns=il,cs=al,is=pn,as=$i,ss=Yt(),os=he(),rs=xt,ds=ea,gs=ca,bs=oa,Zs=ga,us=ua,ms=sl,Gs=Ra,Is=Ya,Cs=Ja,hs=Fa,Ws=ka;var ps={parse:wa,valid:Ea,clean:Ka,inc:Qa,diff:za,major:Ua,minor:ja,patch:La,prerelease:Ta,compare:$a,rcompare:Ma,compareLoose:Oa,compareBuild:Pa,sort:Da,rsort:_a,gt:qa,lt:es,eq:ts,neq:ls,gte:ns,lte:cs,cmp:is,coerce:as,Comparator:ss,Range:os,satisfies:rs,toComparators:ds,maxSatisfying:gs,minSatisfying:bs,minVersion:Zs,validRange:us,outside:ms,gtr:Gs,ltr:Is,intersects:Cs,simplifyRange:hs,subset:Ws,SemVer:Sa,re:Et.re,src:Et.src,tokens:Et.t,SEMVER_SPEC_VERSION:jl.SEMVER_SPEC_VERSION,RELEASE_TYPES:jl.RELEASE_TYPES,compareIdentifiers:Ll.compareIdentifiers,rcompareIdentifiers:Ll.rcompareIdentifiers},Xs=ps;const fs=Jc(Xs),fn=e=>e!=null&&e.includes(" ")?`"${e}"`:`${e??"pandoc"}`;async function Rs(e,l){e=fn(e);let t=await Qt(`${e} --version`,{env:l});t=t.substring(0,t.indexOf(` -`)).replace("pandoc.exe","").replace("pandoc","").trim();let n=[...t].filter(c=>c===".").length;for(;n>2;)t=t.substring(0,t.lastIndexOf(".")),n-=1;return fs.parse(t)}const Vs="3.1.7",Zt={normalizePath:fn,getVersion:Rs,requiredVersion:Vs};async function Rn(e,l,t,n,c,i,s,a,o,g){const{settings:b,lang:G,manifest:J,app:{vault:{adapter:W,config:x},loadProgress:L,metadataCache:u}}=e;if(!n){const le=Dl(c);n=`${l.basename}${le}`}i==null&&(i=b.showOverwriteConfirmation);const j=b.showExportProgressBar,w=W.getBasePath(),E=`${w}/${J.dir}`,M=`${E}/lua`,K=t,ie=`${K}/${n}`,ge=n.substring(0,n.lastIndexOf(".")),p=n,X=W.getFullPath(l.path),R=oe.dirname(X),v=l.basename,be=l.name;let C=x.attachmentFolderPath??"/";C==="/"?C=w:C.startsWith(".")?C=oe.join(R,C.substring(1)):C=oe.join(w,C);let f=null;try{f=u.getCache(l.path).frontmatter}catch(le){console.error(le)}const V={pluginDir:E,luaDir:M,outputDir:K,outputPath:ie,outputFileName:ge,outputFileFullName:p,currentDir:R,currentPath:X,currentFileName:v,currentFileFullName:be,attachmentFolderPath:C,vaultDir:w,metadata:f,options:s,fromFormat:app.vault.config.useMarkdownLinks?"markdown":"markdown+wikilinks_title_after_pipe"},H=c.type==="custom"&&c.showCommandOutput,N=c.openExportedFileLocation??b.openExportedFileLocation,y=c.openExportedFile??b.openExportedFile;if(i&&Jt.existsSync(ie)){const le=await ye.remote.dialog.showSaveDialog({title:G.overwriteConfirmationDialog.title(p),defaultPath:ie,properties:["showOverwriteConfirmation","createDirectory"]});if(le.canceled)return;V.outputPath=le.filePath,V.outputDir=oe.dirname(V.outputPath),V.outputFileFullName=oe.basename(V.outputPath),V.outputFileName=oe.basename(V.outputFileFullName,oe.extname(V.outputFileFullName))}j&&(L.setMessage(G.preparing(V.outputFileFullName)),g==null||g(),L.show());const k=V.env=_l(de(b.env)??{},V);let Q=Zt.normalizePath(de(b.pandocPath));if(pt.platform==="win32"){Q=Q.replaceAll("\\","/");const le=["pluginDir","luaDir","outputDir","outputPath","currentDir","currentPath","attachmentFolderPath","vaultDir"];for(const Xe of le){const He=V[Xe];V[Xe]=He.replaceAll("\\","/")}}const S=c.type==="pandoc"?`${Q} "\${currentPath}" ${c.arguments??""} ${c.customArguments??""}`:c.command,z=zt(S,V),_=lt(z.match(/(?:[^\s"]+|"[^"]*")+/g),{alias:{output:["o"]}}),A=oe.normalize(En(_.output)),Ze=oe.dirname(A);Jt.existsSync(Ze)||Jt.mkdirSync(Ze);try{console.log(`[${e.manifest.name}]: export command and options:`,{cmd:z,options:{cwd:V.currentDir,env:k}}),await Qt(z,{cwd:V.currentDir,env:k}),j&&L.hide();const le=async()=>{if(N&&setTimeout(()=>{ye.remote.shell.showItemInFolder(A)},1e3),y&&await ye.remote.shell.openPath(A),c.type==="pandoc"&&c.runCommand===!0&&c.command){const Xe=zt(c.command,V);await Qt(Xe,{cwd:V.currentDir,env:k})}a&&a()};if(H){const Xe=new Rl(app,G.exportCommandOutputMessage(z));Xe.onClose=le,Xe.open()}else new Ge.Notice(G.exportSuccessNotice(V.outputFileFullName),1500),await le()}catch(le){L.hide(),new Rl(app,G.exportErrorOutputMessage(z,le)).open(),o&&o()}}const Mt=e=>{const l=new Ge.Modal(e.app);let t=[],n=!1;return Ye(()=>{se(l.titleEl,()=>e.title)}),Ye(()=>{se(l.contentEl,()=>e.children)}),Ye(()=>{const c=Object.entries(e.classList??{}).filter(([,i])=>i).map(([i])=>i);t.length>0&&l.containerEl.removeClasses(t),c.length>0&&l.containerEl.addClasses(c),t=c}),Ye(()=>{l.containerEl.style.display=e.hidden?"None":""}),l.onClose=()=>{n||(n=!0,e.onClose())},tn(()=>l.open()),et(()=>{n||l.close()}),document.createTextNode("")};var As=Ie("