"use strict";var Zl=e=>{throw TypeError(e)};var bl=(e,l,t)=>l.has(e)||Zl("Cannot "+t);var ml=(e,l,t)=>(bl(e,l,"read from private field"),t?t.call(e):l.get(e)),ul=(e,l,t)=>l.has(e)?Zl("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(e):l.set(e,t),Gl=(e,l,t,n)=>(bl(e,l,"write to private field"),n?n.call(e,t):l.set(e,t),t);/*! 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 ue=require("obsidian"),wn=require("child_process"),Xt=require("process"),_l=require("electron"),ql=require("fs"),ce=require("path"),Sn=require("util");function qt(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 Kn=qt(ue),ye=qt(_l),Ft=qt(ql),gt={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"},"PowerPoint (.pptx)":{name:"PowerPoint (.pptx)",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -o "${outputPath}" -t pptx',extension:".pptx"},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=Xt.platform),{...e??{},[t]:l})}function Ze(e,l){e??(e={});const t=e[l??Xt.platform],n=e["*"];return n&&typeof n=="object"?Object.assign({},n,t):t??n}function M(e,...l){return function(...t){const n=t[t.length-1]||{},c=[e[0]];return l.forEach(function(i,o){const s=Number.isInteger(i)?t[i]:n[i];c.push(s,e[o+1])}),c.join("")}}function jt(e,l){return l=l??{},new Promise((t,n)=>{wn.exec(e,l,(c,i,o)=>{if(c){n(c),console.error(i,c);return}if(o&&o!==""){n(o),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 Lt(e,l={}){for(;;)try{const t=Object.keys(l).filter(Qn),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 Qn=e=>{if(typeof e!="string"||e.trim()!==e)return!1;try{new Function(e,"var "+e)}catch{return!1}return!0},zn={textemplate:{title:"Latex Template",type:"dropdown",options:[{name:"None",value:null},{name:"Dissertation",value:"dissertation.tex"},{name:"Academic Paper",value:"neurips.tex"}]}},_e=(()=>{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})(),Me={items:Object.values(gt).filter(e=>e.type!=="custom"),pandocPath:void 0,defaultExportDirectoryMode:"Auto",openExportedFile:!0,env:_e,showExportProgressBar:!0};function en(e){var l;return e.type==="pandoc"?e.extension:e.type==="custom"?(l=e.targetFileExtensions)==null?void 0:l.split(",")[0]:""}function tn(e,l){return e=Object.assign({},Ze(_e),e),l=Object.assign({HOME:process.env.HOME??process.env.USERPROFILE},process.env,l??{}),Object.fromEntries(Object.entries(e).map(([t,n])=>[t,Lt(n,l)]))}function Un(e){return e?Object.fromEntries(Object.entries(e).map(([l,t])=>[l,typeof t=="string"?zn[t.startsWith("preset:")?t.substring(7):""]:t])):{}}const jn=(e,l)=>e===l,Xe=Symbol("solid-proxy"),Mt=Symbol("solid-track"),ut={equals:jn};let ln=rn;const Fe=1,Gt=2,nn={owned:null,cleanups:null,context:null,owner:null};var $=null;let Ht=null,Ln=null,O=null,ie=null,Je=null,ft=0;function we(e,l){const t=O,n=$,c=e.length===0,i=n,o=c?nn:{owned:null,cleanups:null,context:i?i.context:null,owner:i},s=c?e:()=>e(()=>P(()=>Rt(o)));$=o,O=null;try{return Ue(s,!0)}finally{O=t,$=n}}function de(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)),an(t,c));return[on.bind(t),n]}function ne(e,l,t){const n=el(e,l,!1,Fe);lt(n)}function Ye(e,l,t){ln=Pn;const n=el(e,l,!1,Fe);n.user=!0,Je?Je.push(n):lt(n)}function le(e,l,t){t=t?Object.assign({},ut,t):ut;const n=el(e,l,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=t.equals||void 0,lt(n),on.bind(n)}function Zt(e){return Ue(e,!1)}function P(e){if(O===null)return e();const l=O;O=null;try{return e()}finally{O=l}}function cn(e){Ye(()=>P(e))}function ze(e){return $===null||($.cleanups===null?$.cleanups=[e]:$.cleanups.push(e)),e}function Tt(){return O}function Mn(e,l){const t=Symbol("context");return{id:t,Provider:_n(t),defaultValue:e}}function Tn(e){let l;return $&&$.context&&(l=$.context[e.id])!==void 0?l:e.defaultValue}function sn(e){const l=le(e),t=le(()=>$t(l()));return t.toArray=()=>{const n=t();return Array.isArray(n)?n:n!=null?[n]:[]},t}function on(){if(this.sources&&this.state)if(this.state===Fe)lt(this);else{const e=ie;ie=null,Ue(()=>Ct(this),!1),ie=e}if(O){const e=this.observers?this.observers.length:0;O.sources?(O.sources.push(this),O.sourceSlots.push(e)):(O.sources=[this],O.sourceSlots=[e]),this.observers?(this.observers.push(O),this.observerSlots.push(O.sources.length-1)):(this.observers=[O],this.observerSlots=[O.sources.length-1])}return this.value}function an(e,l,t){let n=e.value;return(!e.comparator||!e.comparator(n,l))&&(e.value=l,e.observers&&e.observers.length&&Ue(()=>{for(let c=0;c1e6)throw ie=[],new Error},!1)),l}function lt(e){if(!e.fn)return;Rt(e);const l=ft;$n(e,e.value,l)}function $n(e,l,t){let n;const c=$,i=O;O=$=e;try{n=e.fn(l)}catch(o){return e.pure&&(e.state=Fe,e.owned&&e.owned.forEach(Rt),e.owned=null),e.updatedAt=t+1,gn(o)}finally{O=i,$=c}(!e.updatedAt||e.updatedAt<=t)&&(e.updatedAt!=null&&"observers"in e?an(e,n):e.value=n,e.updatedAt=t)}function el(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||$!==nn&&($.owned?$.owned.push(i):$.owned=[i]),i}function It(e){if(e.state===0)return;if(e.state===Gt)return Ct(e);if(e.suspense&&P(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)lt(e);else if(e.state===Gt){const n=ie;ie=null,Ue(()=>Ct(e,l[0]),!1),ie=n}}function Ue(e,l){if(ie)return e();let t=!1;l||(ie=[]),Je?t=!0:Je=[],ft++;try{const n=e();return On(t),n}catch(n){t||(Je=null),ie=null,gn(n)}}function On(e){if(ie&&(rn(ie),ie=null),e)return;const l=Je;Je=null,l.length&&Ue(()=>ln(l),!1)}function rn(e){for(let l=0;l=0;l--)Rt(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 Dn(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function gn(e,l=$){throw Dn(e)}function $t(e){if(typeof e=="function"&&!e.length)return $t(e());if(Array.isArray(e)){const l=[];for(let t=0;tc=P(()=>($.context={...$.context,[e]:n.value},sn(()=>n.children))),void 0),c}}const qn=Symbol("fallback");function Il(e){for(let l=0;l1?[]:null;return ze(()=>Il(i)),()=>{let a=e()||[],Z=a.length,u,b;return a[Mt],P(()=>{let f,J,U,m,E,S,K,T,Q;if(Z===0)o!==0&&(Il(i),i=[],n=[],c=[],o=0,s&&(s=[])),t.fallback&&(n=[qn],c[0]=we(be=>(i[0]=be,t.fallback())),o=1);else if(o===0){for(c=new Array(Z),b=0;b=S&&T>=S&&n[K]===a[T];K--,T--)U[T]=c[K],m[T]=i[K],s&&(E[T]=s[K]);for(f=new Map,J=new Array(T+1),b=T;b>=S;b--)Q=a[b],u=f.get(Q),J[b]=u===void 0?-1:u,f.set(Q,b);for(u=S;u<=K;u++)Q=n[u],b=f.get(Q),b!==void 0&&b!==-1?(U[b]=c[u],m[b]=i[u],s&&(E[b]=s[u]),b=J[b],f.set(Q,b)):i[u]();for(b=S;be(l||{}))}function it(){return!0}const Cl={get(e,l,t){return l===Xe?t:e.get(l)},has(e,l){return l===Xe?!0:e.has(l)},set:it,deleteProperty:it,getOwnPropertyDescriptor(e,l){return{configurable:!0,enumerable:!0,get(){return e.get(l)},set:it,deleteProperty:it}},ownKeys(e){return e.keys()}};function tc(e,...l){if(Xe in e){const c=new Set(l.length>1?l.flat():l[0]),i=l.map(o=>new Proxy({get(s){return o.includes(s)?e[s]:void 0},has(s){return o.includes(s)&&s in e},keys(){return o.filter(s=>s in e)}},Cl));return i.push(new Proxy({get(o){return c.has(o)?void 0:e[o]},has(o){return c.has(o)?!1:o in e},keys(){return Object.keys(e).filter(o=>!c.has(o))}},Cl)),i}const t={},n=l.map(()=>({}));for(const c of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,c),o=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let s=!1,a=0;for(const Z of l)Z.includes(c)&&(s=!0,o?n[a][c]=i.value:Object.defineProperty(n[a],c,i)),++a;s||(o?t[c]=i.value:Object.defineProperty(t,c,i))}return[...n,t]}const Zn=e=>`Stale read from <${e}>.`;function bn(e){const l="fallback"in e&&{fallback:()=>e.fallback};return le(ec(()=>e.each,e.children,l||void 0))}function bt(e){const l=e.keyed,t=le(()=>e.when,void 0,{equals:(n,c)=>l?n===c:!n==!c});return le(()=>{const n=t();if(n){const c=e.children;return typeof c=="function"&&c.length>0?P(()=>c(l?n:()=>{if(!P(t))throw Zn("Show");return e.when})):c}return e.fallback},void 0,void 0)}function lc(e){let l=!1;const t=(i,o)=>(l?i[1]===o[1]:!i[1]==!o[1])&&i[2]===o[2],n=sn(()=>e.children),c=le(()=>{let i=n();Array.isArray(i)||(i=[i]);for(let o=0;o{const[i,o,s]=c();if(i<0)return e.fallback;const a=s.children;return typeof a=="function"&&a.length>0?P(()=>a(l?o:()=>{if(P(c)[0]!==i)throw Zn("Match");return s.when})):a},void 0,void 0)}function Wl(e){return e}const nc=["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"],cc=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...nc]),ic=new Set(["innerHTML","textContent","innerText","children"]),sc=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),oc=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,l){const t=oc[e];return typeof t=="object"?t[l]?t.$:void 0:t}const rc=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),dc=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"]),gc={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Zc(e,l,t){let n=t.length,c=l.length,i=n,o=0,s=0,a=l[c-1].nextSibling,Z=null;for(;ou-s){const J=l[o];for(;s{const o=document.createElement("template");return o.innerHTML=e,o.content.firstChild},i=()=>(n||(n=c())).cloneNode(!0);return i.cloneNode=i,i}function tl(e,l=window.document){const t=l[hl]||(l[hl]=new Set);for(let n=0,c=e.length;nc.call(e,t[1],i))}else e.addEventListener(l,t)}function mc(e,l,t={}){const n=Object.keys(l||{}),c=Object.keys(t);let i,o;for(i=0,o=c.length;ic.children=qe(e,l.children,c.children)),ne(()=>typeof l.ref=="function"&&Vt(l.ref,e)),ne(()=>Gc(e,l,t,!0,c,!0)),c}function Vt(e,l,t){return P(()=>e(l,t))}function se(e,l,t,n){if(t!==void 0&&!n&&(n=[]),typeof l!="function")return qe(e,l,n,t);ne(c=>qe(e,l(),c,t),n)}function Gc(e,l,t,n,c={},i=!1){l||(l={});for(const o in c)if(!(o in l)){if(o==="children")continue;c[o]=Xl(e,o,null,c[o],t,i)}for(const o in l){if(o==="children")continue;const s=l[o];c[o]=Xl(e,o,s,c[o],t,i)}}function Ic(e){return e.toLowerCase().replace(/-([a-z])/g,(l,t)=>t.toUpperCase())}function pl(e,l,t){const n=l.trim().split(/\s+/);for(let c=0,i=n.length;c-1&&gc[l.split(":")[0]];b?bc(e,b,l,t):xe(e,sc[l]||l,t)}return t}function Cc(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 qe(e,l,t,n,c){for(;typeof t=="function";)t=t();if(l===t)return t;const i=typeof l,o=n!==void 0;if(e=o&&t[0]&&t[0].parentNode||e,i==="string"||i==="number"){if(i==="number"&&(l=l.toString(),l===t))return t;if(o){let s=t[0];s&&s.nodeType===3?s.data!==l&&(s.data=l):s=document.createTextNode(l),t=ve(e,t,n,s)}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 ne(()=>{let s=l();for(;typeof s=="function";)s=s();t=qe(e,s,t,n)}),()=>t;if(Array.isArray(l)){const s=[],a=t&&Array.isArray(t);if(Ot(s,l,t,c))return ne(()=>t=qe(e,s,t,n,!0)),()=>t;if(s.length===0){if(t=ve(e,t,n),o)return t}else a?t.length===0?fl(e,s,n):Zc(e,t,s):(t&&ve(e),fl(e,s));t=s}else if(l.nodeType){if(Array.isArray(t)){if(o)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 Ot(e,l,t,n){let c=!1;for(let i=0,o=l.length;i=0;o--){const s=l[o];if(c!==s){const a=s.parentNode===e;!i&&!o?a?e.replaceChild(c,s):e.insertBefore(c,t):a&&s.remove()}else i=!0}}else e.insertBefore(c,t);return[c]}const Wc="http://www.w3.org/2000/svg";function hc(e,l=!1){return l?document.createElementNS(Wc,e):document.createElement(e)}function pc(e){const[l,t]=tc(e,["component"]),n=le(()=>l.component);return le(()=>{const c=n();switch(typeof c){case"function":return P(()=>c(t));case"string":const i=dc.has(c),o=hc(c,i);return uc(o,t,i),o}})}/** * @license * Copyright (c) 2016, Contributors * SPDX-License-Identifier: ISC */function $e(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+=o}return n}function Gn(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 Xc(e){if(Array.isArray(e))return e.map(o=>typeof o!="string"?o+"":o);e=e.trim();let l=0,t=null,n=null,c=null;const i=[];for(let o=0;o{typeof g=="number"&&(m.nargs[r]=g,m.keys.push(r))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([r,g])=>{typeof g=="function"&&(m.coercions[r]=g,m.keys.push(r))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(r){m.configs[r]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([r,g])=>{(typeof g=="boolean"||typeof g=="function")&&(m.configs[r]=g)})),D(n.key,o,n.default,m.arrays),Object.keys(a).forEach(function(r){(m.aliases[r]||[]).forEach(function(g){a[g]=a[r]})});let K=null;kn();let T=[];const Q=Object.assign(Object.create(null),{_:[]}),be={};for(let r=0;r=3&&(Y(A[1],m.arrays)?r=W(r,A[1],c,A[2]):Y(A[1],m.nargs)!==!1?r=h(r,A[1],c,A[2]):R(A[1],A[2],!0));else if(g.match(S)&&s["boolean-negation"])A=g.match(S),A!==null&&Array.isArray(A)&&A.length>=2&&(d=A[1],R(d,Y(d,m.arrays)?[!1]:!1));else if(g.match(/^--.+/)||!s["short-option-groups"]&&g.match(/^-[^-]+/))A=g.match(/^--?(.+)/),A!==null&&Array.isArray(A)&&A.length>=2&&(d=A[1],Y(d,m.arrays)?r=W(r,d,c):Y(d,m.nargs)!==!1?r=h(r,d,c):(y=c[r+1],y!==void 0&&(!y.match(/^-/)||y.match(E))&&!Y(d,m.bools)&&!Y(d,m.counts)||/^(true|false)$/.test(y)?(R(d,y),r++):R(d,te(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(E))y=c[r+1],A=g.match(/^-(.\..+)/),A!==null&&Array.isArray(A)&&A.length>=2&&(d=A[1],y!==void 0&&!y.match(/^-/)&&!Y(d,m.bools)&&!Y(d,m.counts)?(R(d,y),r++):R(d,te(d)));else if(g.match(/^-[^-]+/)&&!g.match(E)){x=g.slice(1,-1).split(""),G=!1;for(let oe=0;oer!=="--"&&r.includes("-")).forEach(r=>{delete Q[r]}),s["strip-aliased"]&&[].concat(...Object.keys(o).map(r=>o[r])).forEach(r=>{s["camel-case-expansion"]&&r.includes("-")&&delete Q[r.split(".").map(g=>$e(g)).join(".")],delete Q[r]});function me(r){const g=C("_",r);(typeof g=="string"||typeof g=="number")&&Q._.push(g)}function h(r,g,X,G){let d,x=Y(g,m.nargs);if(x=typeof x!="number"||isNaN(x)?1:x,x===0)return fe(G)||(K=Error(U("Argument unexpected for: %s",g))),R(g,te(g)),r;let A=fe(G)?0:1;if(s["nargs-eats-options"])X.length-(r+1)+A0&&(R(g,G),y--),d=r+1;d0||A&&typeof A=="number"&&d.length>=A||(x=X[y],/^-/.test(x)&&!E.test(x)&&!He(x)));y++)r=y,d.push(q(g,x,i))}return typeof A=="number"&&(A&&d.length1&&s["dot-notation"]&&(m.aliases[d[0]]||[]).forEach(function(x){let A=x.split(".");const y=[].concat(d);y.shift(),A=A.concat(y),(m.aliases[r]||[]).includes(A.join("."))||L(Q,A,G)}),Y(r,m.normalize)&&!Y(r,m.arrays)&&[r].concat(m.aliases[r]||[]).forEach(function(A){Object.defineProperty(be,A,{enumerable:!0,get(){return g},set(y){g=typeof y=="string"?Re.normalize(y):y}})})}function v(r,g){m.aliases[r]&&m.aliases[r].length||(m.aliases[r]=[g],f[g]=!0),m.aliases[g]&&m.aliases[g].length||v(g,r)}function q(r,g,X){X&&(g=Vc(g)),(Y(r,m.bools)||Y(r,m.counts))&&typeof g=="string"&&(g=g==="true");let G=Array.isArray(g)?g.map(function(d){return C(r,d)}):C(r,g);return Y(r,m.counts)&&(fe(G)||typeof G=="boolean")&&(G=Nt()),Y(r,m.normalize)&&Y(r,m.arrays)&&(Array.isArray(g)?G=g.map(d=>Re.normalize(d)):G=Re.normalize(g)),G}function C(r,g){return!s["parse-positional-numbers"]&&r==="_"||!Y(r,m.strings)&&!Y(r,m.bools)&&!Array.isArray(g)&&(Gn(g)&&s["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${g}`)))||!fe(g)&&Y(r,m.numbers))&&(g=Number(g)),g}function p(r){const g=Object.create(null);j(g,m.aliases,a),Object.keys(m.configs).forEach(function(X){const G=r[X]||g[X];if(G)try{let d=null;const x=Re.resolve(Re.cwd(),G),A=m.configs[X];if(typeof A=="function"){try{d=A(x)}catch(y){d=y}if(d instanceof Error){K=d;return}}else d=Re.require(x);F(d)}catch(d){d.name==="PermissionDenied"?K=d:r[X]&&(K=Error(U("Invalid JSON config file: %s",G)))}})}function F(r,g){Object.keys(r).forEach(function(X){const G=r[X],d=g?g+"."+X:X;typeof G=="object"&&G!==null&&!Array.isArray(G)&&s["dot-notation"]?F(G,d):(!k(Q,d.split("."))||Y(d,m.arrays)&&s["combine-arrays"])&&R(d,G)})}function H(){typeof Z<"u"&&Z.forEach(function(r){F(r)})}function V(r,g){if(typeof u>"u")return;const X=typeof u=="string"?u:"",G=Re.env();Object.keys(G).forEach(function(d){if(X===""||d.lastIndexOf(X,0)===0){const x=d.split("__").map(function(A,y){return y===0&&(A=A.substring(X.length)),$e(A)});(g&&m.configs[x.join(".")]||!g)&&!k(r,x)&&R(x.join("."),G[d])}})}function B(r){let g;const X=new Set;Object.keys(r).forEach(function(G){if(!X.has(G)&&(g=Y(G,m.coercions),typeof g=="function"))try{const d=C(G,g(r[G]));[].concat(m.aliases[G]||[],G).forEach(x=>{X.add(x),r[x]=d})}catch(d){K=d}})}function w(r){return m.keys.forEach(g=>{~g.indexOf(".")||typeof r[g]>"u"&&(r[g]=void 0)}),r}function j(r,g,X,G=!1){Object.keys(X).forEach(function(d){k(r,d.split("."))||(L(r,d.split("."),X[d]),G&&(J[d]=!0),(g[d]||[]).forEach(function(x){k(r,x.split("."))||L(r,x.split("."),X[d])}))})}function k(r,g){let X=r;s["dot-notation"]||(g=[g.join(".")]),g.slice(0,-1).forEach(function(d){X=X[d]||{}});const G=g[g.length-1];return typeof X!="object"?!1:G in X}function L(r,g,X){let G=r;s["dot-notation"]||(g=[g.join(".")]),g.slice(0,-1).forEach(function(ee){ee=Rl(ee),typeof G=="object"&&G[ee]===void 0&&(G[ee]={}),typeof G[ee]!="object"||Array.isArray(G[ee])?(Array.isArray(G[ee])?G[ee].push({}):G[ee]=[G[ee],{}],G=G[ee][G[ee].length-1]):G=G[ee]});const d=Rl(g[g.length-1]),x=Y(g.join("."),m.arrays),A=Array.isArray(X);let y=s["duplicate-arguments-array"];!y&&Y(d,m.nargs)&&(y=!0,(!fe(G[d])&&m.nargs[d]===1||Array.isArray(G[d])&&G[d].length===m.nargs[d])&&(G[d]=void 0)),X===Nt()?G[d]=Nt(G[d]):Array.isArray(G[d])?y&&x&&A?G[d]=s["flatten-duplicate-arrays"]?G[d].concat(X):(Array.isArray(G[d][0])?G[d]:[G[d]]).concat([X]):!y&&!!x==!!A?G[d]=X:G[d]=G[d].concat([X]):G[d]===void 0&&x?G[d]=A?X:[X]:y&&!(G[d]===void 0||Y(d,m.counts)||Y(d,m.bools))?G[d]=[G[d],X]:G[d]=X}function D(...r){r.forEach(function(g){Object.keys(g||{}).forEach(function(X){m.aliases[X]||(m.aliases[X]=[].concat(o[X]||[]),m.aliases[X].concat(X).forEach(function(G){if(/-/.test(G)&&s["camel-case-expansion"]){const d=$e(G);d!==X&&m.aliases[X].indexOf(d)===-1&&(m.aliases[X].push(d),f[d]=!0)}}),m.aliases[X].concat(X).forEach(function(G){if(G.length>1&&/[A-Z]/.test(G)&&s["camel-case-expansion"]){const d=un(G,"-");d!==X&&m.aliases[X].indexOf(d)===-1&&(m.aliases[X].push(d),f[d]=!0)}}),m.aliases[X].forEach(function(G){m.aliases[G]=[X].concat(m.aliases[X].filter(function(d){return G!==d}))}))})})}function Y(r,g){const X=[].concat(m.aliases[r]||[],r),G=Object.keys(g),d=X.find(x=>G.includes(x));return d?g[d]:!1}function re(r){const g=Object.keys(m);return[].concat(g.map(G=>m[G])).some(function(G){return Array.isArray(G)?G.includes(r):G[r]})}function yt(r,...g){return[].concat(...g).some(function(G){const d=r.match(G);return d&&re(d[1])})}function Le(r){if(r.match(E)||!r.match(/^-[^-]+/))return!1;let g=!0,X;const G=r.slice(1).split("");for(let d=0;dY(r,m.arrays)?(K=Error(U("Invalid configuration: %s, opts.count excludes opts.array.",r)),!0):Y(r,m.nargs)?(K=Error(U("Invalid configuration: %s, opts.count excludes opts.narg.",r)),!0):!1)}return{aliases:Object.assign({},m.aliases),argv:Object.assign(be,Q),configuration:s,defaulted:Object.assign({},J),error:K,newAliases:Object.assign({},f)}}}function Rc(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;cAc,format:Sn.format,normalize:ce.normalize,resolve:ce.resolve,require:e=>{if(typeof require<"u")return require(e);if(e.match(/\.json$/))return JSON.parse(ql.readFileSync(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),nt=function(l,t){return In.parse(l.slice(),t).argv};nt.detailed=function(e,l){return In.parse(e.slice(),l)};nt.camelCase=$e;nt.decamelize=un;nt.looksLikeNumber=Gn;const Yc={exportToOo:"导出为......",exportWithPrevious:"使用上一次设置导出",exportSuccessNotice:M`导出文件 ${0} 成功!`,exportCommandOutputMessage:M`命令:${0}`,exportErrorOutputMessage:M`命令 ${0},错误:${1}`,pleaseOpenFile:"请打开一个文件先。",preparing:M`正在生成 "${0}" ......`,exportDialog:{fileName:"文件名",type:"类型",exportTo:"导出到",title:M`导出为 ${0}`,export:"导出",selectExportFolder:"请选择导出文件夹",overwriteConfirmation:"覆盖提示"},messageBox:{yes:"是",no:"否",ok:"确认",cancel:"取消"},overwriteConfirmationDialog:{replace:"替换",title:M`"${0}" 已经存在。您要替换它吗?`,message:M`"${0}" 文件夹中已有相同的文件或文件夹,若替换,则会覆盖其当前内容。`},settingTab:{title:"导出设置",general:"通用",name:"名称",customLocation:"自定义",pandocVersion:M`版本: ${0}`,pandocVersionWithWarning:M`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:"显示导出进度条"}},Jc={exportToOo:"Export to...",exportSuccessNotice:M`Export file ${0} success!`,exportCommandOutputMessage:M`Command: ${0}`,exportErrorOutputMessage:M`Command: ${0},Error:${1}`,exportWithPrevious:"Export with Previous",pleaseOpenFile:"Please open a file first.",preparing:M`generating "${0}"...`,exportDialog:{exportTo:"Export to",fileName:"File Name",title:M`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:M`"${0}" already exists. Do you want to replace it?`,message:M`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:M`Version: ${0}`,pandocVersionWithWarning:M`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:M`Export der Datei ${0} erfolgreich!`,exportCommandOutputMessage:M`Command: ${0}`,exportErrorOutputMessage:M`Command: ${0},Fehler:${1}`,exportWithPrevious:"Exportiere mit Vorherigem",pleaseOpenFile:"Bitte öffne zunächst eine Datei.",preparing:M`generating "${0}"...`,exportDialog:{exportTo:"Exportiere nach",fileName:"Dateiname",title:M`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:M`"${0}" existiert bereits. Soll er ersetzt werden?`,message:M`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:M`Version: ${0}`,pandocVersionWithWarning:M`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"}},Cn={"de-DE":xc,"en-US":Jc,"zh-CN":Yc,get current(){const e=Object.keys(this),l=ue.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 Yl extends ue.Modal{constructor(l,t,n){super(l),this.options=typeof t=="string"?{message:t,buttons:"Ok",title:n}:t,this.lang=Cn.current}onOpen(){const{titleEl:l,contentEl:t,lang:n,options:{message:c,title:i,buttons:o,callback:s,buttonsLabel:a,buttonsClass:Z}}=this;switch(i&&l.setText(i),t.createDiv({text:c}),o){case"Yes":t.createEl("div",{cls:["modal-button-container"],parent:t},u=>{u.createEl("button",{text:(a==null?void 0:a.yes)??n.messageBox.yes,cls:["mod-cta",Z==null?void 0:Z.yes],parent:u}).onclick=()=>this.call(s==null?void 0:s.yes)});break;case"YesNo":t.createEl("div",{cls:["modal-button-container"],parent:t},u=>{u.createEl("button",{text:(a==null?void 0:a.yes)??n.messageBox.yes,cls:["mod-cta",Z==null?void 0:Z.yes],parent:u}).onclick=()=>this.call(s==null?void 0:s.yes),u.createEl("button",{text:(a==null?void 0:a.no)??n.messageBox.no,cls:["mod-cta",Z==null?void 0:Z.no],parent:u}).onclick=()=>this.call(s==null?void 0:s.no)});break;case"Ok":t.createEl("div",{cls:["modal-button-container"],parent:t},u=>{u.createEl("button",{text:(a==null?void 0:a.ok)??n.messageBox.ok,cls:["mod-cta",Z==null?void 0:Z.no],parent:u}).onclick=()=>this.call(s==null?void 0:s.ok)});break;case"OkCancel":t.createEl("div",{cls:["modal-button-container"],parent:t},u=>{u.createEl("button",{text:(a==null?void 0:a.ok)??n.messageBox.ok,cls:["mod-cta",Z==null?void 0:Z.ok],parent:u}).onclick=()=>this.call(s==null?void 0:s.ok),u.createEl("button",{text:(a==null?void 0:a.cancel)??n.messageBox.cancel,cls:["mod-cta",Z==null?void 0:Z.cancel],parent:u}).onclick=()=>this.call(s==null?void 0:s.cancel)});break}}call(l){l&&l(),this.close()}onClose(){const{contentEl:l}=this;l.empty()}}var Bc=Ge('
');const yc=e=>(()=>{var l=Bc(),t=l.firstChild,n=e.ref;return typeof n=="function"?Vt(n,l):e.ref=l,se(t,()=>e.message),l})(),Fc=e=>we(l=>{let t=!1;const n=()=>{t||(t=!0,l())};let c;return se(document.body,()=>I(yc,{ref(i){var o=c;typeof o=="function"?o(i):c=i},message:e})),ze(()=>{c instanceof Node&&document.body.contains(c)&&document.body.removeChild(c)}),n}),Hc={show:Fc};function Nc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pt={exports:{}};const vc="2.0.0",Wn=256,kc=Number.MAX_SAFE_INTEGER||9007199254740991,wc=16,Sc=Wn-6,Kc=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var At={MAX_LENGTH:Wn,MAX_SAFE_COMPONENT_LENGTH:wc,MAX_SAFE_BUILD_LENGTH:Sc,MAX_SAFE_INTEGER:kc,RELEASE_TYPES:Kc,SEMVER_SPEC_VERSION:vc,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const Ec=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Yt=Ec;(function(e,l){const{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:c}=At,i=Yt;l=e.exports={};const o=l.re=[],s=l.safeRe=[],a=l.src=[],Z=l.t={};let u=0;const b="[a-zA-Z0-9-]",N=[["\\s",1],["\\d",c],[b,n]],f=U=>{for(const[m,E]of N)U=U.split(`${m}*`).join(`${m}{0,${E}}`).split(`${m}+`).join(`${m}{1,${E}}`);return U},J=(U,m,E)=>{const S=f(m),K=u++;i(U,K,m),Z[U]=K,a[K]=m,o[K]=new RegExp(m,E?"g":void 0),s[K]=new RegExp(S,E?"g":void 0)};J("NUMERICIDENTIFIER","0|[1-9]\\d*"),J("NUMERICIDENTIFIERLOOSE","\\d+"),J("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${b}*`),J("MAINVERSION",`(${a[Z.NUMERICIDENTIFIER]})\\.(${a[Z.NUMERICIDENTIFIER]})\\.(${a[Z.NUMERICIDENTIFIER]})`),J("MAINVERSIONLOOSE",`(${a[Z.NUMERICIDENTIFIERLOOSE]})\\.(${a[Z.NUMERICIDENTIFIERLOOSE]})\\.(${a[Z.NUMERICIDENTIFIERLOOSE]})`),J("PRERELEASEIDENTIFIER",`(?:${a[Z.NUMERICIDENTIFIER]}|${a[Z.NONNUMERICIDENTIFIER]})`),J("PRERELEASEIDENTIFIERLOOSE",`(?:${a[Z.NUMERICIDENTIFIERLOOSE]}|${a[Z.NONNUMERICIDENTIFIER]})`),J("PRERELEASE",`(?:-(${a[Z.PRERELEASEIDENTIFIER]}(?:\\.${a[Z.PRERELEASEIDENTIFIER]})*))`),J("PRERELEASELOOSE",`(?:-?(${a[Z.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[Z.PRERELEASEIDENTIFIERLOOSE]})*))`),J("BUILDIDENTIFIER",`${b}+`),J("BUILD",`(?:\\+(${a[Z.BUILDIDENTIFIER]}(?:\\.${a[Z.BUILDIDENTIFIER]})*))`),J("FULLPLAIN",`v?${a[Z.MAINVERSION]}${a[Z.PRERELEASE]}?${a[Z.BUILD]}?`),J("FULL",`^${a[Z.FULLPLAIN]}$`),J("LOOSEPLAIN",`[v=\\s]*${a[Z.MAINVERSIONLOOSE]}${a[Z.PRERELEASELOOSE]}?${a[Z.BUILD]}?`),J("LOOSE",`^${a[Z.LOOSEPLAIN]}$`),J("GTLT","((?:<|>)?=?)"),J("XRANGEIDENTIFIERLOOSE",`${a[Z.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),J("XRANGEIDENTIFIER",`${a[Z.NUMERICIDENTIFIER]}|x|X|\\*`),J("XRANGEPLAIN",`[v=\\s]*(${a[Z.XRANGEIDENTIFIER]})(?:\\.(${a[Z.XRANGEIDENTIFIER]})(?:\\.(${a[Z.XRANGEIDENTIFIER]})(?:${a[Z.PRERELEASE]})?${a[Z.BUILD]}?)?)?`),J("XRANGEPLAINLOOSE",`[v=\\s]*(${a[Z.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[Z.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[Z.XRANGEIDENTIFIERLOOSE]})(?:${a[Z.PRERELEASELOOSE]})?${a[Z.BUILD]}?)?)?`),J("XRANGE",`^${a[Z.GTLT]}\\s*${a[Z.XRANGEPLAIN]}$`),J("XRANGELOOSE",`^${a[Z.GTLT]}\\s*${a[Z.XRANGEPLAINLOOSE]}$`),J("COERCEPLAIN",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`),J("COERCE",`${a[Z.COERCEPLAIN]}(?:$|[^\\d])`),J("COERCEFULL",a[Z.COERCEPLAIN]+`(?:${a[Z.PRERELEASE]})?(?:${a[Z.BUILD]})?(?:$|[^\\d])`),J("COERCERTL",a[Z.COERCE],!0),J("COERCERTLFULL",a[Z.COERCEFULL],!0),J("LONETILDE","(?:~>?)"),J("TILDETRIM",`(\\s*)${a[Z.LONETILDE]}\\s+`,!0),l.tildeTrimReplace="$1~",J("TILDE",`^${a[Z.LONETILDE]}${a[Z.XRANGEPLAIN]}$`),J("TILDELOOSE",`^${a[Z.LONETILDE]}${a[Z.XRANGEPLAINLOOSE]}$`),J("LONECARET","(?:\\^)"),J("CARETTRIM",`(\\s*)${a[Z.LONECARET]}\\s+`,!0),l.caretTrimReplace="$1^",J("CARET",`^${a[Z.LONECARET]}${a[Z.XRANGEPLAIN]}$`),J("CARETLOOSE",`^${a[Z.LONECARET]}${a[Z.XRANGEPLAINLOOSE]}$`),J("COMPARATORLOOSE",`^${a[Z.GTLT]}\\s*(${a[Z.LOOSEPLAIN]})$|^$`),J("COMPARATOR",`^${a[Z.GTLT]}\\s*(${a[Z.FULLPLAIN]})$|^$`),J("COMPARATORTRIM",`(\\s*)${a[Z.GTLT]}\\s*(${a[Z.LOOSEPLAIN]}|${a[Z.XRANGEPLAIN]})`,!0),l.comparatorTrimReplace="$1$2$3",J("HYPHENRANGE",`^\\s*(${a[Z.XRANGEPLAIN]})\\s+-\\s+(${a[Z.XRANGEPLAIN]})\\s*$`),J("HYPHENRANGELOOSE",`^\\s*(${a[Z.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[Z.XRANGEPLAINLOOSE]})\\s*$`),J("STAR","(<|>)?=?\\s*\\*"),J("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),J("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Pt,Pt.exports);var ct=Pt.exports;const Qc=Object.freeze({loose:!0}),zc=Object.freeze({}),Uc=e=>e?typeof e!="object"?Qc:e:zc;var cl=Uc;const Jl=/^[0-9]+$/,hn=(e,l)=>{const t=Jl.test(e),n=Jl.test(l);return t&&n&&(e=+e,l=+l),e===l?0:t&&!n?-1:n&&!t?1:ehn(l,e);var pn={compareIdentifiers:hn,rcompareIdentifiers:jc};const st=Yt,{MAX_LENGTH:xl,MAX_SAFE_INTEGER:ot}=At,{safeRe:Bl,t:yl}=ct,Lc=cl,{compareIdentifiers:ke}=pn;let Mc=class pe{constructor(l,t){if(t=Lc(t),l instanceof pe){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>xl)throw new TypeError(`version is longer than ${xl} characters`);st("SemVer",l,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=l.trim().match(t.loose?Bl[yl.LOOSE]:Bl[yl.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>ot||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ot||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ot||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 ae=Mc;const Fl=ae,Tc=(e,l,t=!1)=>{if(e instanceof Fl)return e;try{return new Fl(e,l)}catch(n){if(!t)return null;throw n}};var je=Tc;const $c=je,Oc=(e,l)=>{const t=$c(e,l);return t?t.version:null};var Pc=Oc;const Dc=je,_c=(e,l)=>{const t=Dc(e.trim().replace(/^[=v]+/,""),l);return t?t.version:null};var qc=_c;const Hl=ae,ei=(e,l,t,n,c)=>{typeof t=="string"&&(c=n,n=t,t=void 0);try{return new Hl(e instanceof Hl?e.version:e,t).inc(l,n,c).version}catch{return null}};var ti=ei;const Nl=je,li=(e,l)=>{const t=Nl(e,null,!0),n=Nl(l,null,!0),c=t.compare(n);if(c===0)return null;const i=c>0,o=i?t:n,s=i?n:t,a=!!o.prerelease.length;if(!!s.prerelease.length&&!a)return!s.patch&&!s.minor?"major":o.patch?"patch":o.minor?"minor":"major";const u=a?"pre":"";return t.major!==n.major?u+"major":t.minor!==n.minor?u+"minor":t.patch!==n.patch?u+"patch":"prerelease"};var ni=li;const ci=ae,ii=(e,l)=>new ci(e,l).major;var si=ii;const oi=ae,ai=(e,l)=>new oi(e,l).minor;var ri=ai;const di=ae,gi=(e,l)=>new di(e,l).patch;var Zi=gi;const bi=je,mi=(e,l)=>{const t=bi(e,l);return t&&t.prerelease.length?t.prerelease:null};var ui=mi;const vl=ae,Gi=(e,l,t)=>new vl(e,t).compare(new vl(l,t));var We=Gi;const Ii=We,Ci=(e,l,t)=>Ii(l,e,t);var Wi=Ci;const hi=We,pi=(e,l)=>hi(e,l,!0);var Xi=pi;const kl=ae,fi=(e,l,t)=>{const n=new kl(e,t),c=new kl(l,t);return n.compare(c)||n.compareBuild(c)};var il=fi;const Ri=il,Vi=(e,l)=>e.sort((t,n)=>Ri(t,n,l));var Ai=Vi;const Yi=il,Ji=(e,l)=>e.sort((t,n)=>Yi(n,t,l));var xi=Ji;const Bi=We,yi=(e,l,t)=>Bi(e,l,t)>0;var Jt=yi;const Fi=We,Hi=(e,l,t)=>Fi(e,l,t)<0;var sl=Hi;const Ni=We,vi=(e,l,t)=>Ni(e,l,t)===0;var Xn=vi;const ki=We,wi=(e,l,t)=>ki(e,l,t)!==0;var fn=wi;const Si=We,Ki=(e,l,t)=>Si(e,l,t)>=0;var ol=Ki;const Ei=We,Qi=(e,l,t)=>Ei(e,l,t)<=0;var al=Qi;const zi=Xn,Ui=fn,ji=Jt,Li=ol,Mi=sl,Ti=al,$i=(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 zi(e,t,n);case"!=":return Ui(e,t,n);case">":return ji(e,t,n);case">=":return Li(e,t,n);case"<":return Mi(e,t,n);case"<=":return Ti(e,t,n);default:throw new TypeError(`Invalid operator: ${l}`)}};var Rn=$i;const Oi=ae,Pi=je,{safeRe:at,t:rt}=ct,Di=(e,l)=>{if(e instanceof Oi)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?at[rt.COERCEFULL]:at[rt.COERCE]);else{const a=l.includePrerelease?at[rt.COERCERTLFULL]:at[rt.COERCERTL];let Z;for(;(Z=a.exec(e))&&(!t||t.index+t[0].length!==e.length);)(!t||Z.index+Z[0].length!==t.index+t[0].length)&&(t=Z),a.lastIndex=Z.index+Z[1].length+Z[2].length;a.lastIndex=-1}if(t===null)return null;const n=t[2],c=t[3]||"0",i=t[4]||"0",o=l.includePrerelease&&t[5]?`-${t[5]}`:"",s=l.includePrerelease&&t[6]?`+${t[6]}`:"";return Pi(`${n}.${c}.${i}${o}${s}`,l)};var _i=Di;class qi{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 es=qi,St,wl;function he(){if(wl)return St;wl=1;class e{constructor(p,F){if(F=n(F),p instanceof e)return p.loose===!!F.loose&&p.includePrerelease===!!F.includePrerelease?p:new e(p.raw,F);if(p instanceof c)return this.raw=p.value,this.set=[[p]],this.format(),this;if(this.options=F,this.loose=!!F.loose,this.includePrerelease=!!F.includePrerelease,this.raw=p.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(V=>!J(V[0])),this.set.length===0)this.set=[H];else if(this.set.length>1){for(const V of this.set)if(V.length===1&&U(V[0])){this.set=[V];break}}}this.format()}format(){return this.range=this.set.map(p=>p.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(p){const H=((this.options.includePrerelease&&N)|(this.options.loose&&f))+":"+p,V=t.get(H);if(V)return V;const B=this.options.loose,w=B?s[a.HYPHENRANGELOOSE]:s[a.HYPHENRANGE];p=p.replace(w,v(this.options.includePrerelease)),i("hyphen replace",p),p=p.replace(s[a.COMPARATORTRIM],Z),i("comparator trim",p),p=p.replace(s[a.TILDETRIM],u),i("tilde trim",p),p=p.replace(s[a.CARETTRIM],b),i("caret trim",p);let j=p.split(" ").map(Y=>E(Y,this.options)).join(" ").split(/\s+/).map(Y=>R(Y,this.options));B&&(j=j.filter(Y=>(i("loose invalid filter",Y,this.options),!!Y.match(s[a.COMPARATORLOOSE])))),i("range list",j);const k=new Map,L=j.map(Y=>new c(Y,this.options));for(const Y of L){if(J(Y))return[Y];k.set(Y.value,Y)}k.size>1&&k.has("")&&k.delete("");const D=[...k.values()];return t.set(H,D),D}intersects(p,F){if(!(p instanceof e))throw new TypeError("a Range is required");return this.set.some(H=>m(H,F)&&p.set.some(V=>m(V,F)&&H.every(B=>V.every(w=>B.intersects(w,F)))))}test(p){if(!p)return!1;if(typeof p=="string")try{p=new o(p,this.options)}catch{return!1}for(let F=0;FC.value==="<0.0.0-0",U=C=>C.value==="",m=(C,p)=>{let F=!0;const H=C.slice();let V=H.pop();for(;F&&H.length;)F=H.every(B=>V.intersects(B,p)),V=H.pop();return F},E=(C,p)=>(i("comp",C,p),C=Q(C,p),i("caret",C),C=K(C,p),i("tildes",C),C=me(C,p),i("xrange",C),C=W(C,p),i("stars",C),C),S=C=>!C||C.toLowerCase()==="x"||C==="*",K=(C,p)=>C.trim().split(/\s+/).map(F=>T(F,p)).join(" "),T=(C,p)=>{const F=p.loose?s[a.TILDELOOSE]:s[a.TILDE];return C.replace(F,(H,V,B,w,j)=>{i("tilde",C,H,V,B,w,j);let k;return S(V)?k="":S(B)?k=`>=${V}.0.0 <${+V+1}.0.0-0`:S(w)?k=`>=${V}.${B}.0 <${V}.${+B+1}.0-0`:j?(i("replaceTilde pr",j),k=`>=${V}.${B}.${w}-${j} <${V}.${+B+1}.0-0`):k=`>=${V}.${B}.${w} <${V}.${+B+1}.0-0`,i("tilde return",k),k})},Q=(C,p)=>C.trim().split(/\s+/).map(F=>be(F,p)).join(" "),be=(C,p)=>{i("caret",C,p);const F=p.loose?s[a.CARETLOOSE]:s[a.CARET],H=p.includePrerelease?"-0":"";return C.replace(F,(V,B,w,j,k)=>{i("caret",C,V,B,w,j,k);let L;return S(B)?L="":S(w)?L=`>=${B}.0.0${H} <${+B+1}.0.0-0`:S(j)?B==="0"?L=`>=${B}.${w}.0${H} <${B}.${+w+1}.0-0`:L=`>=${B}.${w}.0${H} <${+B+1}.0.0-0`:k?(i("replaceCaret pr",k),B==="0"?w==="0"?L=`>=${B}.${w}.${j}-${k} <${B}.${w}.${+j+1}-0`:L=`>=${B}.${w}.${j}-${k} <${B}.${+w+1}.0-0`:L=`>=${B}.${w}.${j}-${k} <${+B+1}.0.0-0`):(i("no pr"),B==="0"?w==="0"?L=`>=${B}.${w}.${j}${H} <${B}.${w}.${+j+1}-0`:L=`>=${B}.${w}.${j}${H} <${B}.${+w+1}.0-0`:L=`>=${B}.${w}.${j} <${+B+1}.0.0-0`),i("caret return",L),L})},me=(C,p)=>(i("replaceXRanges",C,p),C.split(/\s+/).map(F=>h(F,p)).join(" ")),h=(C,p)=>{C=C.trim();const F=p.loose?s[a.XRANGELOOSE]:s[a.XRANGE];return C.replace(F,(H,V,B,w,j,k)=>{i("xRange",C,H,V,B,w,j,k);const L=S(B),D=L||S(w),Y=D||S(j),re=Y;return V==="="&&re&&(V=""),k=p.includePrerelease?"-0":"",L?V===">"||V==="<"?H="<0.0.0-0":H="*":V&&re?(D&&(w=0),j=0,V===">"?(V=">=",D?(B=+B+1,w=0,j=0):(w=+w+1,j=0)):V==="<="&&(V="<",D?B=+B+1:w=+w+1),V==="<"&&(k="-0"),H=`${V+B}.${w}.${j}${k}`):D?H=`>=${B}.0.0${k} <${+B+1}.0.0-0`:Y&&(H=`>=${B}.${w}.0${k} <${B}.${+w+1}.0-0`),i("xRange return",H),H})},W=(C,p)=>(i("replaceStars",C,p),C.trim().replace(s[a.STAR],"")),R=(C,p)=>(i("replaceGTE0",C,p),C.trim().replace(s[p.includePrerelease?a.GTE0PRE:a.GTE0],"")),v=C=>(p,F,H,V,B,w,j,k,L,D,Y,re)=>(S(H)?F="":S(V)?F=`>=${H}.0.0${C?"-0":""}`:S(B)?F=`>=${H}.${V}.0${C?"-0":""}`:w?F=`>=${F}`:F=`>=${F}${C?"-0":""}`,S(L)?k="":S(D)?k=`<${+L+1}.0.0-0`:S(Y)?k=`<${L}.${+D+1}.0-0`:re?k=`<=${L}.${D}.${Y}-${re}`:C?k=`<${L}.${D}.${+Y+1}-0`:k=`<=${k}`,`${F} ${k}`.trim()),q=(C,p,F)=>{for(let H=0;H0){const V=C[H].semver;if(V.major===p.major&&V.minor===p.minor&&V.patch===p.patch)return!0}return!1}return!0};return St}var Kt,Sl;function xt(){if(Sl)return Kt;Sl=1;const e=Symbol("SemVer ANY");class l{static get ANY(){return e}constructor(u,b){if(b=t(b),u instanceof l){if(u.loose===!!b.loose)return u;u=u.value}u=u.trim().split(/\s+/).join(" "),o("comparator",u,b),this.options=b,this.loose=!!b.loose,this.parse(u),this.semver===e?this.value="":this.value=this.operator+this.semver.version,o("comp",this)}parse(u){const b=this.options.loose?n[c.COMPARATORLOOSE]:n[c.COMPARATOR],N=u.match(b);if(!N)throw new TypeError(`Invalid comparator: ${u}`);this.operator=N[1]!==void 0?N[1]:"",this.operator==="="&&(this.operator=""),N[2]?this.semver=new s(N[2],this.options.loose):this.semver=e}toString(){return this.value}test(u){if(o("Comparator.test",u,this.options.loose),this.semver===e||u===e)return!0;if(typeof u=="string")try{u=new s(u,this.options)}catch{return!1}return i(u,this.operator,this.semver,this.options)}intersects(u,b){if(!(u instanceof l))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new a(u.value,b).test(this.value):u.operator===""?u.value===""?!0:new a(this.value,b).test(u.semver):(b=t(b),b.includePrerelease&&(this.value==="<0.0.0-0"||u.value==="<0.0.0-0")||!b.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||i(this.semver,"<",u.semver,b)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||i(this.semver,">",u.semver,b)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}Kt=l;const t=cl,{safeRe:n,t:c}=ct,i=Rn,o=Yt,s=ae,a=he();return Kt}const ts=he(),ls=(e,l,t)=>{try{l=new ts(l,t)}catch{return!1}return l.test(e)};var Bt=ls;const ns=he(),cs=(e,l)=>new ns(e,l).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));var is=cs;const ss=ae,os=he(),as=(e,l,t)=>{let n=null,c=null,i=null;try{i=new os(l,t)}catch{return null}return e.forEach(o=>{i.test(o)&&(!n||c.compare(o)===-1)&&(n=o,c=new ss(n,t))}),n};var rs=as;const ds=ae,gs=he(),Zs=(e,l,t)=>{let n=null,c=null,i=null;try{i=new gs(l,t)}catch{return null}return e.forEach(o=>{i.test(o)&&(!n||c.compare(o)===1)&&(n=o,c=new ds(n,t))}),n};var bs=Zs;const Et=ae,ms=he(),Kl=Jt,us=(e,l)=>{e=new ms(e,l);let t=new Et("0.0.0");if(e.test(t)||(t=new Et("0.0.0-0"),e.test(t)))return t;t=null;for(let n=0;n{const s=new Et(o.semver.version);switch(o.operator){case">":s.prerelease.length===0?s.patch++:s.prerelease.push(0),s.raw=s.format();case"":case">=":(!i||Kl(s,i))&&(i=s);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!t||Kl(t,i))&&(t=i)}return t&&e.test(t)?t:null};var Gs=us;const Is=he(),Cs=(e,l)=>{try{return new Is(e,l).range||"*"}catch{return null}};var Ws=Cs;const hs=ae,Vn=xt(),{ANY:ps}=Vn,Xs=he(),fs=Bt,El=Jt,Ql=sl,Rs=al,Vs=ol,As=(e,l,t,n)=>{e=new hs(e,n),l=new Xs(l,n);let c,i,o,s,a;switch(t){case">":c=El,i=Rs,o=Ql,s=">",a=">=";break;case"<":c=Ql,i=Vs,o=El,s="<",a="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(fs(e,l,n))return!1;for(let Z=0;Z{f.semver===ps&&(f=new Vn(">=0.0.0")),b=b||f,N=N||f,c(f.semver,b.semver,n)?b=f:o(f.semver,N.semver,n)&&(N=f)}),b.operator===s||b.operator===a||(!N.operator||N.operator===s)&&i(e,N.semver))return!1;if(N.operator===a&&o(e,N.semver))return!1}return!0};var rl=As;const Ys=rl,Js=(e,l,t)=>Ys(e,l,">",t);var xs=Js;const Bs=rl,ys=(e,l,t)=>Bs(e,l,"<",t);var Fs=ys;const zl=he(),Hs=(e,l,t)=>(e=new zl(e,t),l=new zl(l,t),e.intersects(l,t));var Ns=Hs;const vs=Bt,ks=We;var ws=(e,l,t)=>{const n=[];let c=null,i=null;const o=e.sort((u,b)=>ks(u,b,t));for(const u of o)vs(u,l,t)?(i=u,c||(c=u)):(i&&n.push([c,i]),i=null,c=null);c&&n.push([c,null]);const s=[];for(const[u,b]of n)u===b?s.push(u):!b&&u===o[0]?s.push("*"):b?u===o[0]?s.push(`<=${b}`):s.push(`${u} - ${b}`):s.push(`>=${u}`);const a=s.join(" || "),Z=typeof l.raw=="string"?l.raw:String(l);return a.length{if(e===l)return!0;e=new Ul(e,t),l=new Ul(l,t);let n=!1;e:for(const c of e.set){for(const i of l.set){const o=Es(c,i,t);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},Ks=[new dl(">=0.0.0-0")],jl=[new dl(">=0.0.0")],Es=(e,l,t)=>{if(e===l)return!0;if(e.length===1&&e[0].semver===Qt){if(l.length===1&&l[0].semver===Qt)return!0;t.includePrerelease?e=Ks:e=jl}if(l.length===1&&l[0].semver===Qt){if(t.includePrerelease)return!0;l=jl}const n=new Set;let c,i;for(const f of e)f.operator===">"||f.operator===">="?c=Ll(c,f,t):f.operator==="<"||f.operator==="<="?i=Ml(i,f,t):n.add(f.semver);if(n.size>1)return null;let o;if(c&&i){if(o=gl(c.semver,i.semver,t),o>0)return null;if(o===0&&(c.operator!==">="||i.operator!=="<="))return null}for(const f of n){if(c&&!Te(f,String(c),t)||i&&!Te(f,String(i),t))return null;for(const J of l)if(!Te(f,String(J),t))return!1;return!0}let s,a,Z,u,b=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,N=c&&!t.includePrerelease&&c.semver.prerelease.length?c.semver:!1;b&&b.prerelease.length===1&&i.operator==="<"&&b.prerelease[0]===0&&(b=!1);for(const f of l){if(u=u||f.operator===">"||f.operator===">=",Z=Z||f.operator==="<"||f.operator==="<=",c){if(N&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===N.major&&f.semver.minor===N.minor&&f.semver.patch===N.patch&&(N=!1),f.operator===">"||f.operator===">="){if(s=Ll(c,f,t),s===f&&s!==c)return!1}else if(c.operator===">="&&!Te(c.semver,String(f),t))return!1}if(i){if(b&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===b.major&&f.semver.minor===b.minor&&f.semver.patch===b.patch&&(b=!1),f.operator==="<"||f.operator==="<="){if(a=Ml(i,f,t),a===f&&a!==i)return!1}else if(i.operator==="<="&&!Te(i.semver,String(f),t))return!1}if(!f.operator&&(i||c)&&o!==0)return!1}return!(c&&Z&&!i&&o!==0||i&&u&&!c&&o!==0||N||b)},Ll=(e,l,t)=>{if(!e)return l;const n=gl(e.semver,l.semver,t);return n>0?e:n<0||l.operator===">"&&e.operator===">="?l:e},Ml=(e,l,t)=>{if(!e)return l;const n=gl(e.semver,l.semver,t);return n<0?e:n>0||l.operator==="<"&&e.operator==="<="?l:e};var Qs=Ss;const zt=ct,Tl=At,zs=ae,$l=pn,Us=je,js=Pc,Ls=qc,Ms=ti,Ts=ni,$s=si,Os=ri,Ps=Zi,Ds=ui,_s=We,qs=Wi,eo=Xi,to=il,lo=Ai,no=xi,co=Jt,io=sl,so=Xn,oo=fn,ao=ol,ro=al,go=Rn,Zo=_i,bo=xt(),mo=he(),uo=Bt,Go=is,Io=rs,Co=bs,Wo=Gs,ho=Ws,po=rl,Xo=xs,fo=Fs,Ro=Ns,Vo=ws,Ao=Qs;var Yo={parse:Us,valid:js,clean:Ls,inc:Ms,diff:Ts,major:$s,minor:Os,patch:Ps,prerelease:Ds,compare:_s,rcompare:qs,compareLoose:eo,compareBuild:to,sort:lo,rsort:no,gt:co,lt:io,eq:so,neq:oo,gte:ao,lte:ro,cmp:go,coerce:Zo,Comparator:bo,Range:mo,satisfies:uo,toComparators:Go,maxSatisfying:Io,minSatisfying:Co,minVersion:Wo,validRange:ho,outside:po,gtr:Xo,ltr:fo,intersects:Ro,simplifyRange:Vo,subset:Ao,SemVer:zs,re:zt.re,src:zt.src,tokens:zt.t,SEMVER_SPEC_VERSION:Tl.SEMVER_SPEC_VERSION,RELEASE_TYPES:Tl.RELEASE_TYPES,compareIdentifiers:$l.compareIdentifiers,rcompareIdentifiers:$l.rcompareIdentifiers},Jo=Yo;const xo=Nc(Jo),An=e=>e!=null&&e.includes(" ")?`"${e}"`:`${e??"pandoc"}`;async function Bo(e,l){e=An(e);let t=await jt(`${e} --version`,{env:l});t=t.substring(0,t.indexOf(` `)).replace("pandoc.exe","").replace("pandoc","").trim();let n=[...t].filter(c=>c===".").length;if(n===1)t=`${t}.0`;else for(;n>2;)t=t.substring(0,t.lastIndexOf(".")),n-=1;return xo.parse(t,!0)}const yo="3.1.7",mt={normalizePath:An,getVersion:Bo,requiredVersion:yo};async function Yn(e,l,t,n,c,i,o,s,a,Z){const{settings:u,lang:b,manifest:N,app:{vault:{adapter:f,config:J},metadataCache:U}}=e;if(!n){const _=en(c);n=`${l.basename}${_}`}i==null&&(i=u.showOverwriteConfirmation);const m=u.showExportProgressBar,E=f.getBasePath(),S=`${E}/${N.dir}`,K=`${S}/lua`,T=t,Q=`${T}/${n}`,be=n.substring(0,n.lastIndexOf(".")),me=n,h=f.getFullPath(l.path),W=ce.dirname(h),R=l.basename,v=l.name;let q=J.attachmentFolderPath??"/";q==="/"?q=E:q.startsWith(".")?q=ce.join(W,q.substring(1)):q=ce.join(E,q);let C=null;try{C=U.getCache(l.path).frontmatter}catch(_){console.error(_)}let p=null;try{p=U.getCache(l.path).embeds}catch(_){console.error(_)}let F=[];for(const _ of p){const te=_.link,Ne=U.getFirstLinkpathDest(te,l.path);Ne instanceof ue.TFile?F.push(ce.join(E,ce.dirname(Ne.path))):Ne===null&&console.warn(`Could not resolve embedded file: ${te}`)}F=[...new Set(F)];const H=F.join(ce.delimiter),V={pluginDir:S,luaDir:K,outputDir:T,outputPath:Q,outputFileName:be,outputFileFullName:me,currentDir:W,currentPath:h,currentFileName:R,currentFileFullName:v,attachmentFolderPath:q,vaultDir:E,metadata:C,embedDirs:H,options:o,fromFormat:app.vault.config.useMarkdownLinks?"markdown":"markdown+wikilinks_title_after_pipe"},B=c.type==="custom"&&c.showCommandOutput,w=c.openExportedFileLocation??u.openExportedFileLocation,j=c.openExportedFile??u.openExportedFile;if(i&&Ft.existsSync(Q)){const _=await ye.remote.dialog.showSaveDialog({title:b.overwriteConfirmationDialog.title(me),defaultPath:Q,properties:["showOverwriteConfirmation","createDirectory"]});if(_.canceled)return;V.outputPath=_.filePath,V.outputDir=ce.dirname(V.outputPath),V.outputFileFullName=ce.basename(V.outputPath),V.outputFileName=ce.basename(V.outputFileFullName,ce.extname(V.outputFileFullName))}let k;m&&(k=Hc.show(b.preparing(V.outputFileFullName)));const L=V.env=tn(Ze(u.env)??{},V);let D=mt.normalizePath(Ze(u.pandocPath));if(Xt.platform==="win32"){D=D.replaceAll("\\","/");const _=["pluginDir","luaDir","outputDir","outputPath","currentDir","currentPath","attachmentFolderPath","vaultDir","embedDirs"];for(const te of _){const Ne=V[te];V[te]=Ne.replaceAll("\\","/")}}const Y=c.type==="pandoc"?`${D} "\${currentPath}" ${c.arguments??""} ${c.customArguments??""}`:c.command,re=Lt(Y,V),yt=nt(re.match(/(?:[^\s"]+|"[^"]*")+/g),{alias:{output:["o"]}}),Le=ce.normalize(En(yt.output)),He=ce.dirname(Le);Ft.existsSync(He)||Ft.mkdirSync(He);try{console.log(`[${e.manifest.name}]: export command and options:`,{cmd:re,options:{cwd:V.currentDir,env:L}}),await jt(re,{cwd:V.currentDir,env:L}),k==null||k();const _=async()=>{if(w&&setTimeout(()=>{ye.remote.shell.showItemInFolder(Le)},1e3),j&&await ye.remote.shell.openPath(Le),c.type==="pandoc"&&c.runCommand===!0&&c.command){const te=Lt(c.command,V);await jt(te,{cwd:V.currentDir,env:L})}s&&s()};if(B){const te=new Yl(app,b.exportCommandOutputMessage(re));te.onClose=_,te.open()}else new ue.Notice(b.exportSuccessNotice(V.outputFileFullName),1500),await _()}catch(_){k==null||k(),new Yl(app,b.exportErrorOutputMessage(re,_)).open(),a&&a()}}const Dt=e=>{const l=new ue.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())},cn(()=>l.open()),ze(()=>{n||l.close()}),document.createTextNode("")};var Fo=Ge("