embedoc 0.14.4 → 0.14.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,45 +1,45 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'module';
3
3
  const require = createRequire(import.meta.url);
4
- var gf=Object.create;var Fr=Object.defineProperty;var _f=Object.getOwnPropertyDescriptor;var yf=Object.getOwnPropertyNames;var bf=Object.getPrototypeOf,wf=Object.prototype.hasOwnProperty;var $e=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var fe=(i,e,t)=>()=>{if(t)throw t[0];try{return i&&(e=i(i=0)),e}catch(n){throw t=[n],n}};var W=(i,e)=>()=>{try{return e||i((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},vf=(i,e)=>{for(var t in e)Fr(i,t,{get:e[t],enumerable:!0})},Sf=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of yf(e))!wf.call(i,r)&&r!==t&&Fr(i,r,{get:()=>e[r],enumerable:!(n=_f(e,r))||n.enumerable});return i};var Br=(i,e,t)=>(t=i!=null?gf(bf(i)):{},Sf(e||!i||!i.__esModule?Fr(t,"default",{value:i,enumerable:!0}):t,i));var ml=W((kb,ls)=>{var ui=process||{},dl=ui.argv||[],ci=ui.env||{},Pf=!(ci.NO_COLOR||dl.includes("--no-color"))&&(!!ci.FORCE_COLOR||dl.includes("--color")||ui.platform==="win32"||(ui.stdout||{}).isTTY&&ci.TERM!=="dumb"||!!ci.CI),Rf=(i,e,t=i)=>n=>{let r=""+n,s=r.indexOf(e,i.length);return~s?i+If(r,e,t,s)+e:i+r+e},If=(i,e,t,n)=>{let r="",s=0;do r+=i.substring(s,n)+t,s=n+e.length,n=i.indexOf(e,s);while(~n);return r+i.substring(s)},pl=(i=Pf)=>{let e=i?Rf:()=>String;return{isColorSupported:i,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};ls.exports=pl();ls.exports.createColors=pl});var pn=W(vs=>{var bi=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},ws=class extends bi{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};vs.CommanderError=bi;vs.InvalidArgumentError=ws});var wi=W(xs=>{var{InvalidArgumentError:Cd}=pn(),Ss=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new Cd(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function kd(i){let e=i.name()+(i.variadic===!0?"...":"");return i.required?"<"+e+">":"["+e+"]"}xs.Argument=Ss;xs.humanReadableArgName=kd});var ks=W(Cs=>{var{humanReadableArgName:Ad}=wi(),Es=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(r=>!r._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((r,s)=>r.name().localeCompare(s.name())),t}compareOptions(e,t){let n=r=>r.short?r.short.replace(/^-/,""):r.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(r=>!r.hidden),n=e._getHelpOption();if(n&&!n.hidden){let r=n.short&&e._findOption(n.short),s=n.long&&e._findOption(n.long);!r&&!s?t.push(n):n.long&&!s?t.push(e.createOption(n.long,n.description)):n.short&&!r&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let r=n.options.filter(s=>!s.hidden);t.push(...r)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(n=>Ad(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((n,r)=>Math.max(n,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(r)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((n,r)=>Math.max(n,this.displayWidth(t.styleOptionTerm(t.optionTerm(r)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((n,r)=>Math.max(n,this.displayWidth(t.styleOptionTerm(t.optionTerm(r)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((n,r)=>Math.max(n,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(r)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let r=e.parent;r;r=r.parent)n=r.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){let n=t.padWidth(e,t),r=t.helpWidth??80;function s(h,p){return t.formatItem(h,n,p,t)}let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],a=t.commandDescription(e);a.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(a),r),""]));let c=t.visibleArguments(e).map(h=>s(t.styleArgumentTerm(t.argumentTerm(h)),t.styleArgumentDescription(t.argumentDescription(h))));c.length>0&&(o=o.concat([t.styleTitle("Arguments:"),...c,""]));let l=t.visibleOptions(e).map(h=>s(t.styleOptionTerm(t.optionTerm(h)),t.styleOptionDescription(t.optionDescription(h))));if(l.length>0&&(o=o.concat([t.styleTitle("Options:"),...l,""])),t.showGlobalOptions){let h=t.visibleGlobalOptions(e).map(p=>s(t.styleOptionTerm(t.optionTerm(p)),t.styleOptionDescription(t.optionDescription(p))));h.length>0&&(o=o.concat([t.styleTitle("Global Options:"),...h,""]))}let f=t.visibleCommands(e).map(h=>s(t.styleSubcommandTerm(t.subcommandTerm(h)),t.styleSubcommandDescription(t.subcommandDescription(h))));return f.length>0&&(o=o.concat([t.styleTitle("Commands:"),...f,""])),o.join(`
5
- `)}displayWidth(e){return Fl(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,r){let o=" ".repeat(2);if(!n)return o+e;let a=e.padEnd(t+e.length-r.displayWidth(e)),c=2,f=(this.helpWidth??80)-t-c-2,h;return f<this.minWidthToWrap||r.preformatted(n)?h=n:h=r.boxWrap(n,f).replace(/\n/g,`
6
- `+" ".repeat(t+c)),o+a+" ".repeat(c)+h.replace(/\n/g,`
7
- ${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,s=[];return n.forEach(o=>{let a=o.match(r);if(a===null){s.push("");return}let c=[a.shift()],l=this.displayWidth(c[0]);a.forEach(f=>{let h=this.displayWidth(f);if(l+h<=t){c.push(f),l+=h;return}s.push(c.join(""));let p=f.trimStart();c=[p],l=this.displayWidth(p)}),s.push(c.join(""))}),s.join(`
4
+ var gf=Object.create;var Fr=Object.defineProperty;var _f=Object.getOwnPropertyDescriptor;var yf=Object.getOwnPropertyNames;var bf=Object.getPrototypeOf,wf=Object.prototype.hasOwnProperty;var $e=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});var fe=(i,e,t)=>()=>{if(t)throw t[0];try{return i&&(e=i(i=0)),e}catch(n){throw t=[n],n}};var W=(i,e)=>()=>{try{return e||i((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}},vf=(i,e)=>{for(var t in e)Fr(i,t,{get:e[t],enumerable:!0})},Sf=(i,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of yf(e))!wf.call(i,r)&&r!==t&&Fr(i,r,{get:()=>e[r],enumerable:!(n=_f(e,r))||n.enumerable});return i};var Br=(i,e,t)=>(t=i!=null?gf(bf(i)):{},Sf(e||!i||!i.__esModule?Fr(t,"default",{value:i,enumerable:!0}):t,i));var ml=W((kb,ls)=>{var ui=process||{},dl=ui.argv||[],ci=ui.env||{},Pf=!(ci.NO_COLOR||dl.includes("--no-color"))&&(!!ci.FORCE_COLOR||dl.includes("--color")||ui.platform==="win32"||(ui.stdout||{}).isTTY&&ci.TERM!=="dumb"||!!ci.CI),Rf=(i,e,t=i)=>n=>{let r=""+n,s=r.indexOf(e,i.length);return~s?i+If(r,e,t,s)+e:i+r+e},If=(i,e,t,n)=>{let r="",s=0;do r+=i.substring(s,n)+t,s=n+e.length,n=i.indexOf(e,s);while(~n);return r+i.substring(s)},pl=(i=Pf)=>{let e=i?Rf:()=>String;return{isColorSupported:i,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};ls.exports=pl();ls.exports.createColors=pl});var pn=W(vs=>{var bi=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},ws=class extends bi{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};vs.CommanderError=bi;vs.InvalidArgumentError=ws});var wi=W(xs=>{var{InvalidArgumentError:Cd}=pn(),Ss=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new Cd(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function kd(i){let e=i.name()+(i.variadic===!0?"...":"");return i.required?"<"+e+">":"["+e+"]"}xs.Argument=Ss;xs.humanReadableArgName=kd});var ks=W(Cs=>{var{humanReadableArgName:Ad}=wi(),Es=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(r=>!r._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((r,s)=>r.name().localeCompare(s.name())),t}compareOptions(e,t){let n=r=>r.short?r.short.replace(/^-/,""):r.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(r=>!r.hidden),n=e._getHelpOption();if(n&&!n.hidden){let r=n.short&&e._findOption(n.short),s=n.long&&e._findOption(n.long);!r&&!s?t.push(n):n.long&&!s?t.push(e.createOption(n.long,n.description)):n.short&&!r&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let r=n.options.filter(s=>!s.hidden);t.push(...r)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(n=>Ad(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((n,r)=>Math.max(n,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(r)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((n,r)=>Math.max(n,this.displayWidth(t.styleOptionTerm(t.optionTerm(r)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((n,r)=>Math.max(n,this.displayWidth(t.styleOptionTerm(t.optionTerm(r)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((n,r)=>Math.max(n,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(r)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let r=e.parent;r;r=r.parent)n=r.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){let n=t.padWidth(e,t),r=t.helpWidth??80;function s(h,p){return t.formatItem(h,n,p,t)}let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],a=t.commandDescription(e);a.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(a),r),""]));let l=t.visibleArguments(e).map(h=>s(t.styleArgumentTerm(t.argumentTerm(h)),t.styleArgumentDescription(t.argumentDescription(h))));l.length>0&&(o=o.concat([t.styleTitle("Arguments:"),...l,""]));let c=t.visibleOptions(e).map(h=>s(t.styleOptionTerm(t.optionTerm(h)),t.styleOptionDescription(t.optionDescription(h))));if(c.length>0&&(o=o.concat([t.styleTitle("Options:"),...c,""])),t.showGlobalOptions){let h=t.visibleGlobalOptions(e).map(p=>s(t.styleOptionTerm(t.optionTerm(p)),t.styleOptionDescription(t.optionDescription(p))));h.length>0&&(o=o.concat([t.styleTitle("Global Options:"),...h,""]))}let f=t.visibleCommands(e).map(h=>s(t.styleSubcommandTerm(t.subcommandTerm(h)),t.styleSubcommandDescription(t.subcommandDescription(h))));return f.length>0&&(o=o.concat([t.styleTitle("Commands:"),...f,""])),o.join(`
5
+ `)}displayWidth(e){return Fl(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,r){let o=" ".repeat(2);if(!n)return o+e;let a=e.padEnd(t+e.length-r.displayWidth(e)),l=2,f=(this.helpWidth??80)-t-l-2,h;return f<this.minWidthToWrap||r.preformatted(n)?h=n:h=r.boxWrap(n,f).replace(/\n/g,`
6
+ `+" ".repeat(t+l)),o+a+" ".repeat(l)+h.replace(/\n/g,`
7
+ ${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,s=[];return n.forEach(o=>{let a=o.match(r);if(a===null){s.push("");return}let l=[a.shift()],c=this.displayWidth(l[0]);a.forEach(f=>{let h=this.displayWidth(f);if(c+h<=t){l.push(f),c+=h;return}s.push(l.join(""));let p=f.trimStart();l=[p],c=this.displayWidth(p)}),s.push(l.join(""))}),s.join(`
8
8
  `)}};function Fl(i){let e=/\x1b\[\d*(;\d*)*m/g;return i.replace(e,"")}Cs.Help=Es;Cs.stripColor=Fl});var Rs=W(Ps=>{var{InvalidArgumentError:Od}=pn(),As=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=Pd(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new Od(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Bl(this.name().replace(/^no-/,"")):Bl(this.name())}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Os=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let r=this.negativeOptions.get(n).presetArg,s=r!==void 0?r:!1;return t.negate===(s===e)}};function Bl(i){return i.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Pd(i){let e,t,n=/^-[^-]$/,r=/^--[^-]/,s=i.split(/[ |,]+/).concat("guard");if(n.test(s[0])&&(e=s.shift()),r.test(s[0])&&(t=s.shift()),!e&&n.test(s[0])&&(e=s.shift()),!e&&r.test(s[0])&&(e=t,t=s.shift()),s[0].startsWith("-")){let o=s[0],a=`option creation failed due to '${o}' in option flags '${i}'`;throw/^-[^-][^-]/.test(o)?new Error(`${a}
9
9
  - a short flag is a single dash and a single character
10
10
  - either use a single dash and a single character (for a short flag)
11
11
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):n.test(o)?new Error(`${a}
12
12
  - too many short flags`):r.test(o)?new Error(`${a}
13
13
  - too many long flags`):new Error(`${a}
14
- - unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${i}'.`);return{shortFlag:e,longFlag:t}}Ps.Option=As;Ps.DualOptions=Os});var Hl=W(ql=>{function Rd(i,e){if(Math.abs(i.length-e.length)>3)return Math.max(i.length,e.length);let t=[];for(let n=0;n<=i.length;n++)t[n]=[n];for(let n=0;n<=e.length;n++)t[0][n]=n;for(let n=1;n<=e.length;n++)for(let r=1;r<=i.length;r++){let s=1;i[r-1]===e[n-1]?s=0:s=1,t[r][n]=Math.min(t[r-1][n]+1,t[r][n-1]+1,t[r-1][n-1]+s),r>1&&n>1&&i[r-1]===e[n-2]&&i[r-2]===e[n-1]&&(t[r][n]=Math.min(t[r][n],t[r-2][n-2]+1))}return t[i.length][e.length]}function Id(i,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=i.startsWith("--");t&&(i=i.slice(2),e=e.map(o=>o.slice(2)));let n=[],r=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=Rd(i,o),c=Math.max(i.length,o.length);(c-a)/c>s&&(a<r?(r=a,n=[o]):a===r&&n.push(o))}),n.sort((o,a)=>o.localeCompare(a)),t&&(n=n.map(o=>`--${o}`)),n.length>1?`
14
+ - unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${i}'.`);return{shortFlag:e,longFlag:t}}Ps.Option=As;Ps.DualOptions=Os});var Hl=W(ql=>{function Rd(i,e){if(Math.abs(i.length-e.length)>3)return Math.max(i.length,e.length);let t=[];for(let n=0;n<=i.length;n++)t[n]=[n];for(let n=0;n<=e.length;n++)t[0][n]=n;for(let n=1;n<=e.length;n++)for(let r=1;r<=i.length;r++){let s=1;i[r-1]===e[n-1]?s=0:s=1,t[r][n]=Math.min(t[r-1][n]+1,t[r][n-1]+1,t[r-1][n-1]+s),r>1&&n>1&&i[r-1]===e[n-2]&&i[r-2]===e[n-1]&&(t[r][n]=Math.min(t[r][n],t[r-2][n-2]+1))}return t[i.length][e.length]}function Id(i,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=i.startsWith("--");t&&(i=i.slice(2),e=e.map(o=>o.slice(2)));let n=[],r=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=Rd(i,o),l=Math.max(i.length,o.length);(l-a)/l>s&&(a<r?(r=a,n=[o]):a===r&&n.push(o))}),n.sort((o,a)=>o.localeCompare(a)),t&&(n=n.map(o=>`--${o}`)),n.length>1?`
15
15
  (Did you mean one of ${n.join(", ")}?)`:n.length===1?`
16
- (Did you mean ${n[0]}?)`:""}ql.suggestSimilar=Id});var Ul=W(Ns=>{var Ld=$e("node:events").EventEmitter,Is=$e("node:child_process"),ct=$e("node:path"),vi=$e("node:fs"),Q=$e("node:process"),{Argument:Dd,humanReadableArgName:Td}=wi(),{CommanderError:Ls}=pn(),{Help:Nd,stripColor:Md}=ks(),{Option:Wl,DualOptions:Fd}=Rs(),{suggestSimilar:jl}=Hl(),Ds=class i extends Ld{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:t=>Q.stdout.write(t),writeErr:t=>Q.stderr.write(t),outputError:(t,n)=>n(t),getOutHelpWidth:()=>Q.stdout.isTTY?Q.stdout.columns:void 0,getErrHelpWidth:()=>Q.stderr.isTTY?Q.stderr.columns:void 0,getOutHasColors:()=>Ts()??(Q.stdout.isTTY&&Q.stdout.hasColors?.()),getErrHasColors:()=>Ts()??(Q.stderr.isTTY&&Q.stderr.hasColors?.()),stripColor:t=>Md(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let r=t,s=n;typeof r=="object"&&r!==null&&(s=r,r=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),c=this.createCommand(o);return r&&(c.description(r),c._executableHandler=!0),s.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(s.noHelp||s.hidden),c._executableFile=s.executableFile||null,a&&c.arguments(a),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),r?this:c}createCommand(e){return new i(e)}createHelp(){return Object.assign(new Nd,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
16
+ (Did you mean ${n[0]}?)`:""}ql.suggestSimilar=Id});var Ul=W(Ns=>{var Ld=$e("node:events").EventEmitter,Is=$e("node:child_process"),ct=$e("node:path"),vi=$e("node:fs"),Q=$e("node:process"),{Argument:Dd,humanReadableArgName:Td}=wi(),{CommanderError:Ls}=pn(),{Help:Nd,stripColor:Md}=ks(),{Option:Wl,DualOptions:Fd}=Rs(),{suggestSimilar:jl}=Hl(),Ds=class i extends Ld{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:t=>Q.stdout.write(t),writeErr:t=>Q.stderr.write(t),outputError:(t,n)=>n(t),getOutHelpWidth:()=>Q.stdout.isTTY?Q.stdout.columns:void 0,getErrHelpWidth:()=>Q.stderr.isTTY?Q.stderr.columns:void 0,getOutHasColors:()=>Ts()??(Q.stdout.isTTY&&Q.stdout.hasColors?.()),getErrHasColors:()=>Ts()??(Q.stderr.isTTY&&Q.stderr.hasColors?.()),stripColor:t=>Md(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let r=t,s=n;typeof r=="object"&&r!==null&&(s=r,r=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(o);return r&&(l.description(r),l._executableHandler=!0),s.isDefault&&(this._defaultCommandName=l._name),l._hidden=!!(s.noHelp||s.hidden),l._executableFile=s.executableFile||null,a&&l.arguments(a),this._registerCommand(l),l.parent=this,l.copyInheritedSettings(this),r?this:l}createCommand(e){return new i(e)}createHelp(){return Object.assign(new Nd,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
17
17
  - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new Dd(e,t)}argument(e,t,n,r){let s=this.createArgument(e,t);return typeof n=="function"?s.default(r).argParser(n):s.default(n),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,n,r]=e.match(/([^ ]+) *(.*)/),s=t??"display help for command",o=this.createCommand(n);return o.helpOption(!1),r&&o.arguments(r),s&&o.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
18
18
  Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new Ls(e,t,n)),Q.exit(e)}action(e){let t=n=>{let r=this.registeredArguments.length,s=n.slice(0,r);return this._storeOptionsAsProperties?s[r]=this:s[r]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new Wl(e,t)}_callParseArg(e,t,n,r){try{return e.parseArg(t,n)}catch(s){if(s.code==="commander.invalidArgument"){let o=`${r} ${s.message}`;this.error(o,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
19
- - already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=r=>[r.name()].concat(r.aliases()),n=t(e).find(r=>this._findCommand(r));if(n){let r=t(this._findCommand(n)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${r}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let r=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let c=this.getOptionValue(n);s!==null&&e.parseArg?s=this._callParseArg(e,s,c,o):s!==null&&e.variadic&&(s=e._concatValue(s,c)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(n,s,a)};return this.on("option:"+t,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;r(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;r(s,o,"env")}),this}_optionEx(e,t,n,r,s){if(typeof t=="object"&&t instanceof Wl)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,n);if(o.makeOptionMandatory(!!e.mandatory),typeof r=="function")o.default(s).argParser(r);else if(r instanceof RegExp){let a=r;r=(c,l)=>{let f=a.exec(c);return f?f[0]:l},o.default(s).argParser(r)}else o.default(r);return this.addOption(o)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:!0},e,t,n,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){Q.versions?.electron&&(t.from="electron");let r=Q.execArgv??[];(r.includes("-e")||r.includes("--eval")||r.includes("-p")||r.includes("--print"))&&(t.from="eval")}e===void 0&&(e=Q.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":Q.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
19
+ - already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=r=>[r.name()].concat(r.aliases()),n=t(e).find(r=>this._findCommand(r));if(n){let r=t(this._findCommand(n)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${r}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let r=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let l=this.getOptionValue(n);s!==null&&e.parseArg?s=this._callParseArg(e,s,l,o):s!==null&&e.variadic&&(s=e._concatValue(s,l)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(n,s,a)};return this.on("option:"+t,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;r(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;r(s,o,"env")}),this}_optionEx(e,t,n,r,s){if(typeof t=="object"&&t instanceof Wl)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,n);if(o.makeOptionMandatory(!!e.mandatory),typeof r=="function")o.default(s).argParser(r);else if(r instanceof RegExp){let a=r;r=(l,c)=>{let f=a.exec(l);return f?f[0]:c},o.default(s).argParser(r)}else o.default(r);return this.addOption(o)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:!0},e,t,n,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){Q.versions?.electron&&(t.from="electron");let r=Q.execArgv??[];(r.includes("-e")||r.includes("--eval")||r.includes("-p")||r.includes("--print"))&&(t.from="eval")}e===void 0&&(e=Q.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":Q.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
20
20
  - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(e,t,n){if(vi.existsSync(e))return;let r=t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",s=`'${e}' does not exist
21
21
  - if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
22
22
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
23
- - ${r}`;throw new Error(s)}_executeSubCommand(e,t){t=t.slice();let n=!1,r=[".js",".ts",".tsx",".mjs",".cjs"];function s(f,h){let p=ct.resolve(f,h);if(vi.existsSync(p))return p;if(r.includes(ct.extname(h)))return;let m=r.find(_=>vi.existsSync(`${p}${_}`));if(m)return`${p}${m}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let f;try{f=vi.realpathSync(this._scriptPath)}catch{f=this._scriptPath}a=ct.resolve(ct.dirname(f),a)}if(a){let f=s(a,o);if(!f&&!e._executableFile&&this._scriptPath){let h=ct.basename(this._scriptPath,ct.extname(this._scriptPath));h!==this._name&&(f=s(a,`${h}-${e._name}`))}o=f||o}n=r.includes(ct.extname(o));let c;Q.platform!=="win32"?n?(t.unshift(o),t=Vl(Q.execArgv).concat(t),c=Is.spawn(Q.argv[0],t,{stdio:"inherit"})):c=Is.spawn(o,t,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),t.unshift(o),t=Vl(Q.execArgv).concat(t),c=Is.spawn(Q.execPath,t,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(h=>{Q.on(h,()=>{c.killed===!1&&c.exitCode===null&&c.kill(h)})});let l=this._exitCallback;c.on("close",f=>{f=f??1,l?l(new Ls(f,"commander.executeSubCommandAsync","(close)")):Q.exit(f)}),c.on("error",f=>{if(f.code==="ENOENT")this._checkForMissingExecutable(o,a,e._name);else if(f.code==="EACCES")throw new Error(`'${o}' not executable`);if(!l)Q.exit(1);else{let h=new Ls(1,"commander.executeSubCommandAsync","(error)");h.nestedError=f,l(h)}}),this.runningCommand=c}_dispatchSubcommand(e,t,n){let r=this._findCommand(e);r||this.help({error:!0}),r._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,r,"preSubcommand"),s=this._chainOrCall(s,()=>{if(r._executableHandler)this._executeSubCommand(r,t.concat(n));else return r._parseCommand(t,n)}),s}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,r,s)=>{let o=r;if(r!==null&&n.parseArg){let a=`error: command-argument value '${r}' is invalid for argument '${n.name()}'.`;o=this._callParseArg(n,r,s,a)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,r)=>{let s=n.defaultValue;n.variadic?r<this.args.length?(s=this.args.slice(r),n.parseArg&&(s=s.reduce((o,a)=>e(n,a,o),n.defaultValue))):s===void 0&&(s=[]):r<this.args.length&&(s=this.args[r],n.parseArg&&(s=e(n,s,n.defaultValue))),t[r]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,r=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(o=>{r.push({hookedCommand:s,callback:o})})}),t==="postAction"&&r.reverse(),r.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let r=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(s=>{r=this._chainOrCall(r,()=>s(this,t))}),r}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(s,e,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(s))r(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let r=n.attributeName();return this.getOptionValue(r)===void 0?!1:this.getOptionValueSource(r)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let r=e.find(s=>n.conflictsWith.includes(s.attributeName()));r&&this._conflictingOption(n,r)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],r=t,s=e.slice();function o(c){return c.length>1&&c[0]==="-"}let a=null;for(;s.length;){let c=s.shift();if(c==="--"){r===n&&r.push(c),r.push(...s);break}if(a&&!o(c)){this.emit(`option:${a.name()}`,c);continue}if(a=null,o(c)){let l=this._findOption(c);if(l){if(l.required){let f=s.shift();f===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,f)}else if(l.optional){let f=null;s.length>0&&!o(s[0])&&(f=s.shift()),this.emit(`option:${l.name()}`,f)}else this.emit(`option:${l.name()}`);a=l.variadic?l:null;continue}}if(c.length>2&&c[0]==="-"&&c[1]!=="-"){let l=this._findOption(`-${c[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,c.slice(2)):(this.emit(`option:${l.name()}`),s.unshift(`-${c.slice(2)}`));continue}}if(/^--[^=]+=/.test(c)){let l=c.indexOf("="),f=this._findOption(c.slice(0,l));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,c.slice(l+1));continue}}if(o(c)&&(r=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(c)){t.push(c),s.length>0&&n.push(...s);break}else if(this._getHelpCommand()&&c===this._getHelpCommand().name()){t.push(c),s.length>0&&t.push(...s);break}else if(this._defaultCommandName){n.push(c),s.length>0&&n.push(...s);break}}if(this._passThroughOptions){r.push(c),s.length>0&&r.push(...s);break}r.push(c)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let r=this.options[n].attributeName();e[r]=r===this._versionOptionName?this._version:this[r]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
23
+ - ${r}`;throw new Error(s)}_executeSubCommand(e,t){t=t.slice();let n=!1,r=[".js",".ts",".tsx",".mjs",".cjs"];function s(f,h){let p=ct.resolve(f,h);if(vi.existsSync(p))return p;if(r.includes(ct.extname(h)))return;let m=r.find(_=>vi.existsSync(`${p}${_}`));if(m)return`${p}${m}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let f;try{f=vi.realpathSync(this._scriptPath)}catch{f=this._scriptPath}a=ct.resolve(ct.dirname(f),a)}if(a){let f=s(a,o);if(!f&&!e._executableFile&&this._scriptPath){let h=ct.basename(this._scriptPath,ct.extname(this._scriptPath));h!==this._name&&(f=s(a,`${h}-${e._name}`))}o=f||o}n=r.includes(ct.extname(o));let l;Q.platform!=="win32"?n?(t.unshift(o),t=Vl(Q.execArgv).concat(t),l=Is.spawn(Q.argv[0],t,{stdio:"inherit"})):l=Is.spawn(o,t,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),t.unshift(o),t=Vl(Q.execArgv).concat(t),l=Is.spawn(Q.execPath,t,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(h=>{Q.on(h,()=>{l.killed===!1&&l.exitCode===null&&l.kill(h)})});let c=this._exitCallback;l.on("close",f=>{f=f??1,c?c(new Ls(f,"commander.executeSubCommandAsync","(close)")):Q.exit(f)}),l.on("error",f=>{if(f.code==="ENOENT")this._checkForMissingExecutable(o,a,e._name);else if(f.code==="EACCES")throw new Error(`'${o}' not executable`);if(!c)Q.exit(1);else{let h=new Ls(1,"commander.executeSubCommandAsync","(error)");h.nestedError=f,c(h)}}),this.runningCommand=l}_dispatchSubcommand(e,t,n){let r=this._findCommand(e);r||this.help({error:!0}),r._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,r,"preSubcommand"),s=this._chainOrCall(s,()=>{if(r._executableHandler)this._executeSubCommand(r,t.concat(n));else return r._parseCommand(t,n)}),s}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,r,s)=>{let o=r;if(r!==null&&n.parseArg){let a=`error: command-argument value '${r}' is invalid for argument '${n.name()}'.`;o=this._callParseArg(n,r,s,a)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,r)=>{let s=n.defaultValue;n.variadic?r<this.args.length?(s=this.args.slice(r),n.parseArg&&(s=s.reduce((o,a)=>e(n,a,o),n.defaultValue))):s===void 0&&(s=[]):r<this.args.length&&(s=this.args[r],n.parseArg&&(s=e(n,s,n.defaultValue))),t[r]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,r=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(o=>{r.push({hookedCommand:s,callback:o})})}),t==="postAction"&&r.reverse(),r.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let r=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(s=>{r=this._chainOrCall(r,()=>s(this,t))}),r}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(s,e,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(s))r(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let r=n.attributeName();return this.getOptionValue(r)===void 0?!1:this.getOptionValueSource(r)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let r=e.find(s=>n.conflictsWith.includes(s.attributeName()));r&&this._conflictingOption(n,r)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],r=t,s=e.slice();function o(l){return l.length>1&&l[0]==="-"}let a=null;for(;s.length;){let l=s.shift();if(l==="--"){r===n&&r.push(l),r.push(...s);break}if(a&&!o(l)){this.emit(`option:${a.name()}`,l);continue}if(a=null,o(l)){let c=this._findOption(l);if(c){if(c.required){let f=s.shift();f===void 0&&this.optionMissingArgument(c),this.emit(`option:${c.name()}`,f)}else if(c.optional){let f=null;s.length>0&&!o(s[0])&&(f=s.shift()),this.emit(`option:${c.name()}`,f)}else this.emit(`option:${c.name()}`);a=c.variadic?c:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let c=this._findOption(`-${l[1]}`);if(c){c.required||c.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${c.name()}`,l.slice(2)):(this.emit(`option:${c.name()}`),s.unshift(`-${l.slice(2)}`));continue}}if(/^--[^=]+=/.test(l)){let c=l.indexOf("="),f=this._findOption(l.slice(0,c));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,l.slice(c+1));continue}}if(o(l)&&(r=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(l)){t.push(l),s.length>0&&n.push(...s);break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){t.push(l),s.length>0&&t.push(...s);break}else if(this._defaultCommandName){n.push(l),s.length>0&&n.push(...s);break}}if(this._passThroughOptions){r.push(l),s.length>0&&r.push(...s);break}r.push(l)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let r=this.options[n].attributeName();e[r]=r===this._versionOptionName?this._version:this[r]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
24
24
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
25
25
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
26
- `),this.outputHelp({error:!0}));let n=t||{},r=n.exitCode||1,s=n.code||"commander.error";this._exit(r,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in Q.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,Q.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Fd(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(r=>!t(r)).forEach(r=>{this.setOptionValueWithSource(r,n.implied[r],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let n=o=>{let a=o.attributeName(),c=this.getOptionValue(a),l=this.options.find(h=>h.negate&&a===h.attributeName()),f=this.options.find(h=>!h.negate&&a===h.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:f||o},r=o=>{let a=n(o),c=a.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let r=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);r=r.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);t=jl(e,r)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let r=[];this.createHelp().visibleCommands(this).forEach(s=>{r.push(s.name()),s.alias()&&r.push(s.alias())}),t=jl(e,r)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let r=this.createOption(t,n);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on("option:"+r.name(),()=>{this._outputConfiguration.writeOut(`${e}
26
+ `),this.outputHelp({error:!0}));let n=t||{},r=n.exitCode||1,s=n.code||"commander.error";this._exit(r,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in Q.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,Q.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Fd(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(r=>!t(r)).forEach(r=>{this.setOptionValueWithSource(r,n.implied[r],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let n=o=>{let a=o.attributeName(),l=this.getOptionValue(a),c=this.options.find(h=>h.negate&&a===h.attributeName()),f=this.options.find(h=>!h.negate&&a===h.attributeName());return c&&(c.presetArg===void 0&&l===!1||c.presetArg!==void 0&&l===c.presetArg)?c:f||o},r=o=>{let a=n(o),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let r=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);r=r.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);t=jl(e,r)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let r=[];this.createHelp().visibleCommands(this).forEach(s=>{r.push(s.name()),s.alias()&&r.push(s.alias())}),t=jl(e,r)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let r=this.createOption(t,n);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on("option:"+r.name(),()=>{this._outputConfiguration.writeOut(`${e}
27
27
  `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let r=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${r}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(n=>Td(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=ct.basename(e,ct.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let r=t.formatHelp(this,t);return n.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(e){e=e||{};let t=!!e.error,n,r,s;return t?(n=a=>this._outputConfiguration.writeErr(a),r=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(n=a=>this._outputConfiguration.writeOut(a),r=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:t,write:a=>(r||(a=this._outputConfiguration.stripColor(a)),n(a)),hasColors:r,helpWidth:s}}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let n=this._getOutputContext(e),r={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let s=this.helpInformation({error:n.error});if(t&&(s=t(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",r),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",r))}helpOption(e,t){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=Number(Q.exitCode??0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
28
28
  Expecting one of '${n.join("', '")}'`);let r=`${e}Help`;return this.on(r,s=>{let o;typeof t=="function"?o=t({error:s.error,command:s.command}):o=t,o&&s.write(`${o}
29
- `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(r=>t.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Vl(i){return i.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",r="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?r=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],n=s[3],r=s[4]),t&&r!=="0"?`${t}=${n}:${parseInt(r)+1}`:e})}function Ts(){if(Q.env.NO_COLOR||Q.env.FORCE_COLOR==="0"||Q.env.FORCE_COLOR==="false")return!1;if(Q.env.FORCE_COLOR||Q.env.CLICOLOR_FORCE!==void 0)return!0}Ns.Command=Ds;Ns.useColor=Ts});var Yl=W(qe=>{var{Argument:Gl}=wi(),{Command:Ms}=Ul(),{CommanderError:Bd,InvalidArgumentError:zl}=pn(),{Help:qd}=ks(),{Option:$l}=Rs();qe.program=new Ms;qe.createCommand=i=>new Ms(i);qe.createOption=(i,e)=>new $l(i,e);qe.createArgument=(i,e)=>new Gl(i,e);qe.Command=Ms;qe.Option=$l;qe.Argument=Gl;qe.Help=qd;qe.CommanderError=Bd;qe.InvalidArgumentError=zl;qe.InvalidOptionArgumentError=zl});var Us,oc,Qd,ac=fe(()=>{Us=(i,e,t)=>{let n=i instanceof RegExp?oc(i,t):i,r=e instanceof RegExp?oc(e,t):e,s=n!==null&&r!=null&&Qd(n,r,t);return s&&{start:s[0],end:s[1],pre:t.slice(0,s[0]),body:t.slice(s[0]+n.length,s[1]),post:t.slice(s[1]+r.length)}},oc=(i,e)=>{let t=e.match(i);return t?t[0]:null},Qd=(i,e,t)=>{let n,r,s,o,a,c=t.indexOf(i),l=t.indexOf(e,c+1),f=c;if(c>=0&&l>0){if(i===e)return[c,l];for(n=[],s=t.length;f>=0&&!a;){if(f===c)n.push(f),c=t.indexOf(i,f+1);else if(n.length===1){let h=n.pop();h!==void 0&&(a=[h,l])}else r=n.pop(),r!==void 0&&r<s&&(s=r,o=l),l=t.indexOf(e,f+1);f=c<l&&c>=0?c:l}n.length&&o!==void 0&&(a=[s,o])}return a}});function Gs(i){return isNaN(i)?i.charCodeAt(0):parseInt(i,10)}function up(i){return i.replace(ip,lc).replace(rp,cc).replace(sp,$s).replace(op,uc).replace(ap,hc)}function hp(i){return i.replace(Xd,"\\").replace(Zd,"{").replace(ep,"}").replace(tp,",").replace(np,".")}function fc(i){if(!i)return[""];let e=[],t=Us("{","}",i);if(!t)return i.split(",");let{pre:n,body:r,post:s}=t,o=n.split(",");o[o.length-1]+="{"+r+"}";let a=fc(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function dc(i,e={}){if(!i)return[];let{max:t=lp,maxLength:n=cp}=e;return i.slice(0,2)==="{}"&&(i="\\{\\}"+i.slice(2)),zs(up(i),t,n,!0).map(hp)}function fp(i){return"{"+i+"}"}function dp(i){return/^-?0\d/.test(i)}function pp(i,e){return i<=e}function mp(i,e){return i>=e}function mn(i,e,t,n,r,s){let o=[],a=0;for(let c=0;c<i.length;c++)for(let l=0;l<t.length;l++){if(o.length>=n)return o;let f=i[c]+e+t[l];if(!(s&&!f)){if(a+f.length>r)return o;o.push(f),a+=f.length}}return o}function gp(i,e,t){let n=i.split(/\.\./),r=[];if(n[0]===void 0||n[1]===void 0)return r;let s=Gs(n[0]),o=Gs(n[1]),a=Math.max(n[0].length,n[1].length),c=n.length===3&&n[2]!==void 0?Math.max(Math.abs(Gs(n[2])),1):1,l=pp;o<s&&(c*=-1,l=mp);let h=n.some(dp);for(let p=s;l(p,o)&&r.length<t;p+=c){let m;if(e)m=String.fromCharCode(p),m==="\\"&&(m="");else if(m=String(p),h){let _=a-m.length;if(_>0){let g=new Array(_+1).join("0");p<0?m="-"+g+m.slice(1):m=g+m}}r.push(m)}return r}function zs(i,e,t,n){let r=[""],s=!1,o=!0;for(;;){let a=Us("{","}",i);if(!a)return mn(r,i,[""],e,t,s);let c=a.pre;if(/\$$/.test(c)){if(r=mn(r,c+"{"+a.body+"}",[""],e,t,s&&!a.post.length),o=!1,!a.post.length)break;i=a.post;continue}let l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),f=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),h=l||f,p=a.body.indexOf(",")>=0;if(!h&&!p){if(a.post.match(/,(?!,).*\}/)){i=a.pre+"{"+a.body+$s+a.post,n=!0;continue}return mn(r,c+"{"+a.body+"}"+a.post,[""],e,t,s)}o&&(s=n&&!h,o=!1);let m;if(h)m=gp(a.body,f,e);else{let _=fc(a.body);if(_.length===1&&_[0]!==void 0&&(_=zs(_[0],e,t,!1).map(fp),_.length===1)){if(r=mn(r,c+_[0],[""],e,t,s&&!a.post.length),!a.post.length)break;i=a.post;continue}m=[];for(let g=0;g<_.length;g++)m.push.apply(m,zs(_[g],e,t,!1))}if(r=mn(r,c,m,e,t,s&&!a.post.length),!a.post.length)break;i=a.post}return r}var lc,cc,$s,uc,hc,Xd,Zd,ep,tp,np,ip,rp,sp,op,ap,lp,cp,pc=fe(()=>{ac();lc="\0SLASH"+Math.random()+"\0",cc="\0OPEN"+Math.random()+"\0",$s="\0CLOSE"+Math.random()+"\0",uc="\0COMMA"+Math.random()+"\0",hc="\0PERIOD"+Math.random()+"\0",Xd=new RegExp(lc,"g"),Zd=new RegExp(cc,"g"),ep=new RegExp($s,"g"),tp=new RegExp(uc,"g"),np=new RegExp(hc,"g"),ip=/\\\\/g,rp=/\\{/g,sp=/\\}/g,op=/\\,/g,ap=/\\\./g,lp=1e5,cp=4e6});var gn,mc=fe(()=>{gn=i=>{if(typeof i!="string")throw new TypeError("invalid pattern");if(i.length>65536)throw new TypeError("pattern is too long")}});var _p,_n,yp,gc,_c,yc=fe(()=>{_p={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},_n=i=>i.replace(/[[\]\\-]/g,"\\$&"),yp=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),gc=i=>i.join(""),_c=(i,e)=>{let t=e;if(i.charAt(t)!=="[")throw new Error("not in a brace expression");let n=[],r=[],s=t+1,o=!1,a=!1,c=!1,l=!1,f=t,h="";e:for(;s<i.length;){let g=i.charAt(s);if((g==="!"||g==="^")&&s===t+1){l=!0,s++;continue}if(g==="]"&&o&&!c){f=s+1;break}if(o=!0,g==="\\"&&!c){c=!0,s++;continue}if(g==="["&&!c){for(let[k,[w,S,P]]of Object.entries(_p))if(i.startsWith(k,s)){if(h)return["$.",!1,i.length-t,!0];s+=k.length,P?r.push(w):n.push(w),a=a||S;continue e}}if(c=!1,h){g>h?n.push(_n(h)+"-"+_n(g)):g===h&&n.push(_n(g)),h="",s++;continue}if(i.startsWith("-]",s+1)){n.push(_n(g+"-")),s+=2;continue}if(i.startsWith("-",s+1)){h=g,s+=2;continue}n.push(_n(g)),s++}if(f<s)return["",!1,0,!1];if(!n.length&&!r.length)return["$.",!1,i.length-t,!0];if(r.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!l){let g=n[0].length===2?n[0].slice(-1):n[0];return[yp(g),!1,f-t,!1]}let p="["+(l?"^":"")+gc(n)+"]",m="["+(l?"":"^")+gc(r)+"]";return[n.length&&r.length?"("+p+"|"+m+")":n.length?p:m,a,f-t,!0]}});var He,Ai=fe(()=>{He=(i,{windowsPathsNoEscape:e=!1,magicalBraces:t=!0}={})=>t?e?i.replace(/\[([^/\\])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?i.replace(/\[([^/\\{}])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1")});var Re,bp,Ys,bc,wp,vp,Sp,wc,xp,Oi,Ep,Cp,kp,Ap,Js,vc,Sc,Op,At,Ks=fe(()=>{yc();Ai();bp=new Set(["!","?","+","*","@"]),Ys=i=>bp.has(i),bc=i=>Ys(i.type),wp=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),vp=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),Sp=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),wc=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),xp="(?!(?:^|/)\\.\\.?(?:$|/))",Oi="(?!\\.)",Ep=new Set(["[","."]),Cp=new Set(["..","."]),kp=new Set("().*{}+?[]^$\\!"),Ap=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Js="[^/]",vc=Js+"*?",Sc=Js+"+?",Op=0,At=class{type;#e;#i;#r=!1;#t=[];#o;#x;#y;#h=!1;#a;#f;#u=!1;id=++Op;get depth(){return(this.#o?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#o?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(e,t,n={}){this.type=e,e&&(this.#i=!0),this.#o=t,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?n:this.#e.#a,this.#y=this.#e===this?[]:this.#e.#y,e==="!"&&!this.#e.#h&&this.#y.push(this),this.#x=this.#o?this.#o.#t.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let e of this.#t)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#f!==void 0?this.#f:this.type?this.#f=this.type+"("+this.#t.map(e=>String(e)).join("|")+")":this.#f=this.#t.map(e=>String(e)).join("")}#c(){if(this!==this.#e)throw new Error("should only call on root");if(this.#h)return this;this.toString(),this.#h=!0;let e;for(;e=this.#y.pop();){if(e.type!=="!")continue;let t=e,n=t.#o;for(;n;){for(let r=t.#x+1;!n.type&&r<n.#t.length;r++)for(let s of e.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#t[r])}t=n,n=t.#o}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof Re&&t.#o===this))throw new Error("invalid part: "+t);this.#t.push(t)}}toJSON(){let e=this.type===null?this.#t.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#t.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#h&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#x===0)return!0;let e=this.#o;for(let t=0;t<this.#x;t++){let n=e.#t[t];if(!(n instanceof Re&&n.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#t.length:0;return this.#x===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new Re(this.type,e);for(let n of this.#t)t.copyIn(n);return t}static#s(e,t,n,r,s){let o=r.maxExtglobRecursion??2,a=!1,c=!1,l=-1,f=!1;if(t.type===null){let g=n,k="";for(;g<e.length;){let w=e.charAt(g++);if(a||w==="\\"){a=!a,k+=w;continue}if(c){g===l+1?(w==="^"||w==="!")&&(f=!0):w==="]"&&!(g===l+2&&f)&&(c=!1),k+=w;continue}else if(w==="["){c=!0,l=g,f=!1,k+=w;continue}if(!r.noext&&Ys(w)&&e.charAt(g)==="("&&s<=o){t.push(k),k="";let P=new Re(w,t);g=Re.#s(e,P,g,r,s+1),t.push(P);continue}k+=w}return t.push(k),g}let h=n+1,p=new Re(null,t),m=[],_="";for(;h<e.length;){let g=e.charAt(h++);if(a||g==="\\"){a=!a,_+=g;continue}if(c){h===l+1?(g==="^"||g==="!")&&(f=!0):g==="]"&&!(h===l+2&&f)&&(c=!1),_+=g;continue}else if(g==="["){c=!0,l=h,f=!1,_+=g;continue}if(!r.noext&&Ys(g)&&e.charAt(h)==="("&&(s<=o||t&&t.#p(g))){let w=t&&t.#p(g)?0:1;p.push(_),_="";let S=new Re(g,p);p.push(S),h=Re.#s(e,S,h,r,s+w);continue}if(g==="|"){p.push(_),_="",m.push(p),p=new Re(null,t);continue}if(g===")")return _===""&&t.#t.length===0&&(t.#u=!0),p.push(_),_="",t.push(...m,p),h;_+=g}return t.type=null,t.#i=void 0,t.#t=[e.substring(n-1)],h}#b(e){return this.#v(e,vp)}#v(e,t=wp){if(!e||typeof e!="object"||e.type!==null||e.#t.length!==1||this.type===null)return!1;let n=e.#t[0];return!n||typeof n!="object"||n.type===null?!1:this.#p(n.type,t)}#p(e,t=Sp){return!!t.get(this.type)?.includes(e)}#m(e,t){let n=e.#t[0],r=new Re(null,n,this.options);r.#t.push(""),n.push(r),this.#k(e,t)}#k(e,t){let n=e.#t[0];this.#t.splice(t,1,...n.#t);for(let r of n.#t)typeof r=="object"&&(r.#o=this);this.#f=void 0}#g(e){return!!wc.get(this.type)?.has(e)}#S(e){if(!e||typeof e!="object"||e.type!==null||e.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let t=e.#t[0];return!t||typeof t!="object"||t.type===null?!1:this.#g(t.type)}#E(e){let t=wc.get(this.type),n=e.#t[0],r=t?.get(n.type);if(!r)return!1;this.#t=n.#t;for(let s of this.#t)typeof s=="object"&&(s.#o=this);this.type=r,this.#f=void 0,this.#u=!1}static fromGlob(e,t={}){let n=new Re(null,void 0,t);return Re.#s(e,n,0,t,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,s]=this.toRegExpSource();if(!(r||this.#i||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#a}toRegExpSource(e){let t=e??!!this.#a.dot;if(this.#e===this&&(this.#d(),this.#c()),!bc(this)){let c=this.isStart()&&this.isEnd()&&!this.#t.some(m=>typeof m!="string"),l=this.#t.map(m=>{let[_,g,k,w]=typeof m=="string"?Re.#w(m,this.#i,c):m.toRegExpSource(e);return this.#i=this.#i||k,this.#r=this.#r||w,_}).join(""),f="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&Cp.has(this.#t[0]))){let _=Ep,g=t&&_.has(l.charAt(0))||l.startsWith("\\.")&&_.has(l.charAt(2))||l.startsWith("\\.\\.")&&_.has(l.charAt(4)),k=!t&&!e&&_.has(l.charAt(0));f=g?xp:k?Oi:""}let h="";return this.isEnd()&&this.#e.#h&&this.#o?.type==="!"&&(h="(?:$|\\/)"),[f+l+h,He(l),this.#i=!!this.#i,this.#r]}let n=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#_(t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let c=this.toString(),l=this;return l.#t=[c],l.type=null,l.#i=void 0,[c,He(this.toString()),!1,!1]}let o=!n||e||t||!Oi?"":this.#_(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#u)a=(this.isStart()&&!t?Oi:"")+Sc;else{let c=this.type==="!"?"))"+(this.isStart()&&!t&&!e?Oi:"")+vc+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=r+s+c}return[a,He(s),this.#i=!!this.#i,this.#r]}#d(){if(bc(this)){let e=0,t=!1;do{t=!0;for(let n=0;n<this.#t.length;n++){let r=this.#t[n];typeof r=="object"&&(r.#d(),this.#v(r)?(t=!1,this.#k(r,n)):this.#b(r)?(t=!1,this.#m(r,n)):this.#S(r)&&(t=!1,this.#E(r)))}}while(!t&&++e<10)}else for(let e of this.#t)typeof e=="object"&&e.#d();this.#f=void 0}#_(e){return this.#t.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[n,r,s,o]=t.toRegExpSource(e);return this.#r=this.#r||o,n}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#w(e,t,n=!1){let r=!1,s="",o=!1,a=!1;for(let c=0;c<e.length;c++){let l=e.charAt(c);if(r){r=!1,s+=(kp.has(l)?"\\":"")+l;continue}if(l==="*"){if(a)continue;a=!0,s+=n&&/^[*]+$/.test(e)?Sc:vc,t=!0;continue}else a=!1;if(l==="\\"){c===e.length-1?s+="\\\\":r=!0;continue}if(l==="["){let[f,h,p,m]=_c(e,c);if(p){s+=f,o=o||h,c+=p-1,t=t||m;continue}}if(l==="?"){s+=Js,t=!0;continue}s+=Ap(l)}return[s,He(e),!!t,o]}};Re=At});var Ot,Qs=fe(()=>{Ot=(i,{windowsPathsNoEscape:e=!1,magicalBraces:t=!1}={})=>t?e?i.replace(/[?*()[\]{}]/g,"[$&]"):i.replace(/[?*()[\]\\{}]/g,"\\$&"):e?i.replace(/[?*()[\]]/g,"[$&]"):i.replace(/[?*()[\]\\]/g,"\\$&")});var ke,Pp,Rp,Ip,Lp,Dp,Tp,Np,Mp,Fp,Bp,qp,Hp,Wp,jp,Vp,Up,Gp,zp,Cc,kc,Ac,xc,$p,oe,Yp,Jp,Kp,Qp,Xp,We,Zp,Oc,em,tm,Ec,nm,Te,wt=fe(()=>{pc();mc();Ks();Qs();Ai();Ks();Qs();Ai();ke=(i,e,t={})=>(gn(e),!t.nocomment&&e.charAt(0)==="#"?!1:new Te(e,t).match(i)),Pp=/^\*+([^+@!?*[(]*)$/,Rp=i=>e=>!e.startsWith(".")&&e.endsWith(i),Ip=i=>e=>e.endsWith(i),Lp=i=>(i=i.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(i)),Dp=i=>(i=i.toLowerCase(),e=>e.toLowerCase().endsWith(i)),Tp=/^\*+\.\*+$/,Np=i=>!i.startsWith(".")&&i.includes("."),Mp=i=>i!=="."&&i!==".."&&i.includes("."),Fp=/^\.\*+$/,Bp=i=>i!=="."&&i!==".."&&i.startsWith("."),qp=/^\*+$/,Hp=i=>i.length!==0&&!i.startsWith("."),Wp=i=>i.length!==0&&i!=="."&&i!=="..",jp=/^\?+([^+@!?*[(]*)?$/,Vp=([i,e=""])=>{let t=Cc([i]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},Up=([i,e=""])=>{let t=kc([i]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},Gp=([i,e=""])=>{let t=kc([i]);return e?n=>t(n)&&n.endsWith(e):t},zp=([i,e=""])=>{let t=Cc([i]);return e?n=>t(n)&&n.endsWith(e):t},Cc=([i])=>{let e=i.length;return t=>t.length===e&&!t.startsWith(".")},kc=([i])=>{let e=i.length;return t=>t.length===e&&t!=="."&&t!==".."},Ac=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",xc={win32:{sep:"\\"},posix:{sep:"/"}},$p=Ac==="win32"?xc.win32.sep:xc.posix.sep;ke.sep=$p;oe=Symbol("globstar **");ke.GLOBSTAR=oe;Yp="[^/]",Jp=Yp+"*?",Kp="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Qp="(?:(?!(?:\\/|^)\\.).)*?",Xp=(i,e={})=>t=>ke(t,i,e);ke.filter=Xp;We=(i,e={})=>Object.assign({},i,e),Zp=i=>{if(!i||typeof i!="object"||!Object.keys(i).length)return ke;let e=ke;return Object.assign((n,r,s={})=>e(n,r,We(i,s)),{Minimatch:class extends e.Minimatch{constructor(r,s={}){super(r,We(i,s))}static defaults(r){return e.defaults(We(i,r)).Minimatch}},AST:class extends e.AST{constructor(r,s,o={}){super(r,s,We(i,o))}static fromGlob(r,s={}){return e.AST.fromGlob(r,We(i,s))}},unescape:(n,r={})=>e.unescape(n,We(i,r)),escape:(n,r={})=>e.escape(n,We(i,r)),filter:(n,r={})=>e.filter(n,We(i,r)),defaults:n=>e.defaults(We(i,n)),makeRe:(n,r={})=>e.makeRe(n,We(i,r)),braceExpand:(n,r={})=>e.braceExpand(n,We(i,r)),match:(n,r,s={})=>e.match(n,r,We(i,s)),sep:e.sep,GLOBSTAR:oe})};ke.defaults=Zp;Oc=(i,e={})=>(gn(i),e.nobrace||!/\{(?:(?!\{).)*\}/.test(i)?[i]:dc(i,{max:e.braceExpandMax}));ke.braceExpand=Oc;em=(i,e={})=>new Te(i,e).makeRe();ke.makeRe=em;tm=(i,e,t={})=>{let n=new Te(e,t);return i=i.filter(r=>n.match(r)),n.options.nonull&&!i.length&&i.push(e),i};ke.match=tm;Ec=/[?*]|[+@!]\(.*?\)|\[|\]/,nm=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Te=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){gn(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||Ac,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((s,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=s[0]===""&&s[1]===""&&(s[2]==="?"||!Ec.test(s[2]))&&!Ec.test(s[3]),l=/^[a-z]:/i.test(s[0]);if(c)return[...s.slice(0,4),...s.slice(4).map(f=>this.parse(f))];if(l)return[s[0],...s.slice(1).map(f=>this.parse(f))]}return s.map(c=>this.parse(c))});if(this.debug(this.pattern,r),this.set=r.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n of e)for(let r=0;r<n.length;r++)n[r]==="**"&&(n[r]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let n=-1;for(;(n=t.indexOf("**",n+1))!==-1;){let r=n;for(;t[r+1]==="**";)r++;r!==n&&t.splice(n,r-n)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((n,r)=>{let s=n[n.length-1];return r==="**"&&s==="**"?n:r===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(r),n)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let r=1;r<e.length-1;r++){let s=e[r];r===1&&s===""&&e[0]===""||(s==="."||s==="")&&(t=!0,e.splice(r,1),r--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let r=e[n-1];r&&r!=="."&&r!==".."&&r!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(r))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let o=r;for(;n[o+1]==="**";)o++;o>r&&n.splice(r+1,o-r);let a=n[r+1],c=n[r+2],l=n[r+3];if(a!==".."||!c||c==="."||c===".."||!l||l==="."||l==="..")continue;t=!0,n.splice(r,1);let f=n.slice(0);f[r]="**",e.push(f),r--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){let a=n[o];o===1&&a===""&&n[0]===""||(a==="."||a==="")&&(t=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(t=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){let o=n[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let c=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...c),n.length===0&&n.push(""),s-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(t=>t.length)}partsMatch(e,t,n=!1){let r=0,s=0,o=[],a="";for(;r<e.length&&s<t.length;)if(e[r]===t[s])o.push(a==="b"?t[s]:e[r]),r++,s++;else if(n&&e[r]==="**"&&t[s]===e[r+1])o.push(e[r]),r++;else if(n&&t[s]==="**"&&e[r]===t[s+1])o.push(t[s]),s++;else if(e[r]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(a==="b")return!1;a="a",o.push(e[r]),r++,s++}else if(t[s]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(a==="a")return!1;a="b",o.push(t[s]),r++,s++}else return!1;return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)==="!";r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let r=0,s=0;if(this.isWindows){let a=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),c=!a&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),l=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),f=!l&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),h=c?3:a?0:void 0,p=f?3:l?0:void 0;if(typeof h=="number"&&typeof p=="number"){let[m,_]=[e[h],t[p]];m.toLowerCase()===_.toLowerCase()&&(t[p]=m,s=p,r=h)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(oe)?this.#e(e,t,n,r,s):this.#r(e,t,n,r,s)}#e(e,t,n,r,s){let o=t.indexOf(oe,s),a=t.lastIndexOf(oe),[c,l,f]=n?[t.slice(s,o),t.slice(o+1),[]]:[t.slice(s,o),t.slice(o+1,a),t.slice(a+1)];if(c.length){let S=e.slice(r,r+c.length);if(!this.#r(S,c,n,0,0))return!1;r+=c.length,s+=c.length}let h=0;if(f.length){if(f.length+r>e.length)return!1;let S=e.length-f.length;if(this.#r(e,f,n,S,0))h=f.length;else{if(e[e.length-1]!==""||r+f.length===e.length||(S--,!this.#r(e,f,n,S,0)))return!1;h=f.length+1}}if(!l.length){let S=!!h;for(let P=r;P<e.length-h;P++){let D=String(e[P]);if(S=!0,D==="."||D===".."||!this.options.dot&&D.startsWith("."))return!1}return n||S}let p=[[[],0]],m=p[0],_=0,g=[0];for(let S of l)S===oe?(g.push(_),m=[[],0],p.push(m)):(m[0].push(S),_++);let k=p.length-1,w=e.length-h;for(let S of p)S[1]=w-(g[k--]+S[0].length);return!!this.#i(e,p,r,0,n,0,!!h)}#i(e,t,n,r,s,o,a){let c=t[r];if(!c){for(let h=n;h<e.length;h++){a=!0;let p=e[h];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return a}let[l,f]=c;for(;n<=f;){if(this.#r(e.slice(0,n+l.length),l,s,n,0)&&o<this.maxGlobstarRecursion){let m=this.#i(e,t,n+l.length,r+1,s,o+1,a);if(m!==!1)return m}let p=e[n];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;n++}return s||null}#r(e,t,n,r,s){let o,a,c,l;for(o=r,a=s,l=e.length,c=t.length;o<l&&a<c;o++,a++){this.debug("matchOne loop");let f=t[a],h=e[o];if(this.debug(t,f,h),f===!1||f===oe)return!1;let p;if(typeof f=="string"?(p=h===f,this.debug("string match",f,h,p)):(p=f.test(h),this.debug("pattern match",f,h,p)),!p)return!1}if(o===l&&a===c)return!0;if(o===l)return n;if(a===c)return o===l-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return Oc(this.pattern,this.options)}parse(e){gn(e);let t=this.options;if(e==="**")return oe;if(e==="")return"";let n,r=null;(n=e.match(qp))?r=t.dot?Wp:Hp:(n=e.match(Pp))?r=(t.nocase?t.dot?Dp:Lp:t.dot?Ip:Rp)(n[1]):(n=e.match(jp))?r=(t.nocase?t.dot?Up:Vp:t.dot?Gp:zp)(n):(n=e.match(Tp))?r=t.dot?Mp:Np:(n=e.match(Fp))&&(r=Bp);let s=At.fromGlob(e,this.options).toMMPattern();return r&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:r}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?Jp:t.dot?Kp:Qp,r=new Set(t.nocase?["i"]:[]),s=e.map(c=>{let l=c.map(h=>{if(h instanceof RegExp)for(let p of h.flags.split(""))r.add(p);return typeof h=="string"?nm(h):h===oe?oe:h._src});l.forEach((h,p)=>{let m=l[p+1],_=l[p-1];h!==oe||_===oe||(_===void 0?m!==void 0&&m!==oe?l[p+1]="(?:\\/|"+n+"\\/)?"+m:l[p]=n:m===void 0?l[p-1]=_+"(?:\\/|\\/"+n+")?":m!==oe&&(l[p-1]=_+"(?:\\/|\\/"+n+"\\/)"+m,l[p+1]=oe))});let f=l.filter(h=>h!==oe);if(this.partial&&f.length>=1){let h=[];for(let p=1;p<=f.length;p++)h.push(f.slice(0,p).join("/"));return"(?:"+h.join("|")+")"}return f.join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+a+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let r=this.slashSplit(e);this.debug(this.pattern,"split",r);let s=this.set;this.debug(this.pattern,"set",s);let o=r[r.length-1];if(!o)for(let a=r.length-2;!o&&a>=0;a--)o=r[a];for(let a of s){let c=r;if(n.matchBase&&a.length===1&&(c=[o]),this.matchOne(c,a,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return ke.defaults(e).Minimatch}};ke.AST=At;ke.Minimatch=Te;ke.escape=Ot;ke.unescape=He});import{tracingChannel as im,channel as rm}from"node:diagnostics_channel";var ye,yn,sm,Xs,Rc,Pc,om,am,vt,Ic,Pi,lm,wn,Dc=fe(()=>{ye=rm("lru-cache:metrics"),yn=im("lru-cache"),sm=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Xs=()=>ye.hasSubscribers||yn.hasSubscribers,Rc=new Set,Pc=typeof process=="object"&&process?process:{},om=(i,e,t,n)=>{typeof Pc.emitWarning=="function"?Pc.emitWarning(i,e,t,n):console.error(`[${t}] ${e}: ${i}`)},am=i=>!Rc.has(i),vt=i=>!!i&&i===Math.floor(i)&&i>0&&isFinite(i),Ic=i=>vt(i)?i<=Math.pow(2,8)?Uint8Array:i<=Math.pow(2,16)?Uint16Array:i<=Math.pow(2,32)?Uint32Array:i<=Number.MAX_SAFE_INTEGER?Pi:null:null,Pi=class extends Array{constructor(i){super(i),this.fill(0)}},lm=class bn{heap;length;static#e=!1;static create(e){let t=Ic(e);if(!t)return[];bn.#e=!0;let n=new bn(e,t);return bn.#e=!1,n}constructor(e,t){if(!bn.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},wn=class Lc{#e;#i;#r;#t;#o;#x;#y;#h;get perf(){return this.#h}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#a;#f;#u;#c;#s;#b;#v;#p;#m;#k;#g;#S;#E;#d;#_;#w;#O;#n;#I;static unsafeExposeInternals(e){return{starts:e.#E,ttls:e.#d,autopurgeTimers:e.#_,sizes:e.#S,keyMap:e.#u,keyList:e.#c,valList:e.#s,next:e.#b,prev:e.#v,get head(){return e.#p},get tail(){return e.#m},free:e.#k,isBackgroundFetch:t=>e.#l(t),backgroundFetch:(t,n,r,s)=>e.#F(t,n,r,s),moveToTail:t=>e.#Y(t),indexes:t=>e.#P(t),rindexes:t=>e.#R(t),isStale:t=>e.#C(t)}}get max(){return this.#e}get maxSize(){return this.#i}get calculatedSize(){return this.#f}get size(){return this.#a}get fetchMethod(){return this.#x}get memoMethod(){return this.#y}get dispose(){return this.#r}get onInsert(){return this.#t}get disposeAfter(){return this.#o}constructor(e){let{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:l,onInsert:f,disposeAfter:h,noDisposeOnSet:p,noUpdateTTL:m,maxSize:_=0,maxEntrySize:g=0,sizeCalculation:k,fetchMethod:w,memoMethod:S,noDeleteOnFetchRejection:P,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:B,allowStaleOnFetchAbort:U,ignoreFetchAbort:J,backgroundFetchSize:he=1,perf:le}=e;if(this.backgroundFetchSize=he,le!==void 0&&typeof le?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#h=le??sm,t!==0&&!vt(t))throw new TypeError("max option must be a nonnegative integer");let se=t?Ic(t):Array;if(!se)throw new Error("invalid max value: "+t);if(this.#e=t,this.#i=_,this.maxEntrySize=g||this.#i,this.sizeCalculation=k,this.sizeCalculation){if(!this.#i&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#y=S,w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#x=w,this.#O=!!w,this.#u=new Map,this.#c=Array.from({length:t}).fill(void 0),this.#s=Array.from({length:t}).fill(void 0),this.#b=new se(t),this.#v=new se(t),this.#p=0,this.#m=0,this.#k=lm.create(t),this.#a=0,this.#f=0,typeof l=="function"&&(this.#r=l),typeof f=="function"&&(this.#t=f),typeof h=="function"?(this.#o=h,this.#g=[]):(this.#o=void 0,this.#g=void 0),this.#w=!!this.#r,this.#I=!!this.#t,this.#n=!!this.#o,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!P,this.allowStaleOnFetchRejection=!!B,this.allowStaleOnFetchAbort=!!U,this.ignoreFetchAbort=!!J,this.maxEntrySize!==0){if(this.#i!==0&&!vt(this.#i))throw new TypeError("maxSize must be a positive integer if specified");if(!vt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#U()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=vt(r)||r===0?r:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!vt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(this.#e===0&&this.ttl===0&&this.#i===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#i){let G="LRU_CACHE_UNBOUNDED";am(G)&&(Rc.add(G),om("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",G,Lc))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#L(){let e=new Pi(this.#e),t=new Pi(this.#e);this.#d=e,this.#E=t;let n=this.ttlAutopurge?Array.from({length:this.#e}):void 0;this.#_=n,this.#q=(a,c,l=this.#h.now())=>{t[a]=c!==0?l:0,e[a]=c,r(a,c)},this.#A=a=>{t[a]=e[a]!==0?this.#h.now():0,r(a,e[a])};let r=this.ttlAutopurge?(a,c)=>{if(n?.[a]&&(clearTimeout(n[a]),n[a]=void 0),c&&c!==0&&n){let l=setTimeout(()=>{this.#C(a)&&this.#B(this.#c[a],"expire")},c+1);l.unref&&l.unref(),n[a]=l}}:()=>{};this.#D=(a,c)=>{if(e[c]){let l=e[c],f=t[c];if(!l||!f)return;a.ttl=l,a.start=f,a.now=s||o();let h=a.now-f;a.remainingTTL=l-h}};let s=0,o=()=>{let a=this.#h.now();if(this.ttlResolution>0){s=a;let c=setTimeout(()=>s=0,this.ttlResolution);c.unref&&c.unref()}return a};this.getRemainingTTL=a=>{let c=this.#u.get(a);if(c===void 0)return 0;let l=e[c],f=t[c];if(!l||!f)return 1/0;let h=(s||o())-f;return l-h},this.#C=a=>{let c=t[a],l=e[a];return!!l&&!!c&&(s||o())-c>l}}#A=()=>{};#D=()=>{};#q=()=>{};#C=()=>!1;#U(){let e=new Pi(this.#e);this.#f=0,this.#S=e,this.#N=t=>{this.#f-=e[t],e[t]=0},this.#H=(t,n,r,s)=>{if(!vt(r)){if(this.#l(n))return this.backgroundFetchSize;if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(r=s(n,t),!vt(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return r},this.#T=(t,n,r)=>{if(e[t]=n,this.#i){let s=this.#i-e[t];for(;this.#f>s;)this.#V(!0)}this.#f+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#f)}}#N=e=>{};#T=(e,t,n)=>{};#H=(e,t,n,r)=>{if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#P({allowStale:e=this.allowStale}={}){if(this.#a)for(let t=this.#m;this.#W(t)&&((e||!this.#C(t))&&(yield t),t!==this.#p);)t=this.#v[t]}*#R({allowStale:e=this.allowStale}={}){if(this.#a)for(let t=this.#p;this.#W(t)&&((e||!this.#C(t))&&(yield t),t!==this.#m);)t=this.#b[t]}#W(e){return e!==void 0&&this.#u.get(this.#c[e])===e}*entries(){for(let e of this.#P())this.#s[e]!==void 0&&this.#c[e]!==void 0&&!this.#l(this.#s[e])&&(yield[this.#c[e],this.#s[e]])}*rentries(){for(let e of this.#R())this.#s[e]!==void 0&&this.#c[e]!==void 0&&!this.#l(this.#s[e])&&(yield[this.#c[e],this.#s[e]])}*keys(){for(let e of this.#P()){let t=this.#c[e];t!==void 0&&!this.#l(this.#s[e])&&(yield t)}}*rkeys(){for(let e of this.#R()){let t=this.#c[e];t!==void 0&&!this.#l(this.#s[e])&&(yield t)}}*values(){for(let e of this.#P())this.#s[e]!==void 0&&!this.#l(this.#s[e])&&(yield this.#s[e])}*rvalues(){for(let e of this.#R())this.#s[e]!==void 0&&!this.#l(this.#s[e])&&(yield this.#s[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let n of this.#P()){let r=this.#s[n],s=this.#l(r)?r.__staleWhileFetching:r;if(s!==void 0&&e(s,this.#c[n],this))return this.#$(this.#c[n],t)}}forEach(e,t=this){for(let n of this.#P()){let r=this.#s[n],s=this.#l(r)?r.__staleWhileFetching:r;s!==void 0&&e.call(t,s,this.#c[n],this)}}rforEach(e,t=this){for(let n of this.#R()){let r=this.#s[n],s=this.#l(r)?r.__staleWhileFetching:r;s!==void 0&&e.call(t,s,this.#c[n],this)}}purgeStale(){let e=!1;for(let t of this.#R({allowStale:!0}))this.#C(t)&&(this.#B(this.#c[t],"expire"),e=!0);return e}info(e){let t=this.#u.get(e);if(t===void 0)return;let n=this.#s[t],r=this.#l(n)?n.__staleWhileFetching:n;if(r===void 0)return;let s={value:r};if(this.#d&&this.#E){let o=this.#d[t],a=this.#E[t];if(o&&a){let c=o-(this.#h.now()-a);s.ttl=c,s.start=Date.now()}}return this.#S&&(s.size=this.#S[t]),s}dump(){let e=[];for(let t of this.#P({allowStale:!0})){let n=this.#c[t],r=this.#s[t],s=this.#l(r)?r.__staleWhileFetching:r;if(s===void 0||n===void 0)continue;let o={value:s};if(this.#d&&this.#E){o.ttl=this.#d[t];let a=this.#h.now()-this.#E[t];o.start=Math.floor(Date.now()-a)}this.#S&&(o.size=this.#S[t]),e.unshift([n,o])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let r=Date.now()-n.start;n.start=this.#h.now()-r}this.#M(t,n.value,n)}}set(e,t,n={}){let{status:r=ye.hasSubscribers?{}:void 0}=n;n.status=r,r&&(r.op="set",r.key=e,t!==void 0&&(r.value=t),r.cache=this);let s=this.#M(e,t,n);return r&&ye.hasSubscribers&&ye.publish(r),s}#M(e,t,n,r){let{ttl:s=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:c=this.sizeCalculation,status:l}=n,f=this.#l(t);if(t===void 0)return l&&(l.set="deleted"),this.delete(e),this;let{noUpdateTTL:h=this.noUpdateTTL}=n;l&&!f&&(l.value=t);let p=this.#H(e,t,n.size||0,c,l);if(this.maxEntrySize&&p>this.maxEntrySize)return this.#B(e,"set"),l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this;let m=this.#a===0?void 0:this.#u.get(e);if(m===void 0)m=this.#a===0?this.#m:this.#k.length!==0?this.#k.pop():this.#a===this.#e?this.#V(!1):this.#a,this.#c[m]=e,this.#s[m]=t,this.#u.set(e,m),this.#b[this.#m]=m,this.#v[m]=this.#m,this.#m=m,this.#a++,this.#T(m,p,l),l&&(l.set="add"),h=!1,this.#I&&!f&&this.#t?.(t,e,"add");else{this.#Y(m);let _=this.#s[m];if(t!==_){if(!a)if(this.#l(_)){_!==r&&_.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:g}=_;g!==void 0&&g!==t&&(this.#w&&this.#r?.(g,e,"set"),this.#n&&this.#g?.push([g,e,"set"]))}else this.#w&&this.#r?.(_,e,"set"),this.#n&&this.#g?.push([_,e,"set"]);if(this.#N(m),this.#T(m,p,l),this.#s[m]=t,!f){let g=_&&this.#l(_)?_.__staleWhileFetching:_,k=g===void 0?"add":t!==g?"replace":"update";l&&(l.set=k,g!==void 0&&(l.oldValue=g)),this.#I&&this.onInsert?.(t,e,k)}}else f||(l&&(l.set="update"),this.#I&&this.onInsert?.(t,e,"update"))}if(s!==0&&!this.#d&&this.#L(),this.#d&&(h||this.#q(m,s,o),l&&this.#D(l,m)),!a&&this.#n&&this.#g){let _=this.#g,g;for(;g=_?.shift();)this.#o?.(...g)}return this}pop(){try{for(;this.#a;){let e=this.#s[this.#p];if(this.#V(!0),this.#l(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#n&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#o?.(...t)}}}#V(e){let t=this.#p,n=this.#c[t],r=this.#s[t],s=this.#l(r);s&&r.__abortController.abort(new Error("evicted"));let o=s?r.__staleWhileFetching:r;return(this.#w||this.#n)&&o!==void 0&&(this.#w&&this.#r?.(o,n,"evict"),this.#n&&this.#g?.push([o,n,"evict"])),this.#N(t),this.#_?.[t]&&(clearTimeout(this.#_[t]),this.#_[t]=void 0),e&&(this.#c[t]=void 0,this.#s[t]=void 0,this.#k.push(t)),this.#a===1?(this.#p=this.#m=0,this.#k.length=0):this.#p=this.#b[t],this.#u.delete(n),this.#a--,t}has(e,t={}){let{status:n=ye.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="has",n.key=e,n.cache=this);let r=this.#J(e,t);return ye.hasSubscribers&&ye.publish(n),r}#J(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,s=this.#u.get(e);if(s!==void 0){let o=this.#s[s];if(this.#l(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#C(s))r&&(r.has="stale",this.#D(r,s));else return n&&this.#A(s),r&&(r.has="hit",this.#D(r,s)),!0}else r&&(r.has="miss");return!1}peek(e,t={}){let{status:n=Xs()?{}:void 0}=t;n&&(n.op="peek",n.key=e,n.cache=this),t.status=n;let r=this.#G(e,t);return ye.hasSubscribers&&ye.publish(n),r}#G(e,t){let{status:n,allowStale:r=this.allowStale}=t,s=this.#u.get(e);if(s===void 0||!r&&this.#C(s)){n&&(n.peek=s===void 0?"miss":"stale");return}let o=this.#s[s],a=this.#l(o)?o.__staleWhileFetching:o;return n&&(a!==void 0?(n.peek="hit",n.value=a):n.peek="miss"),a}#F(e,t,n,r){let s=t===void 0?void 0:this.#s[t];if(this.#l(s))return s;let o=new AbortController,{signal:a}=n;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let c={signal:o.signal,options:n,context:r},l=(g,k=!1)=>{let{aborted:w}=o.signal,S=n.ignoreFetchAbort&&g!==void 0,P=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&g!==void 0);if(n.status&&(w&&!k?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,S&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),w&&!S&&!k)return h(o.signal.reason,P);let D=m,B=this.#s[t];return(B===m||B===void 0&&S&&k)&&(g===void 0?D.__staleWhileFetching!==void 0?this.#s[t]=D.__staleWhileFetching:this.#B(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#M(e,g,c.options,D))),g},f=g=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=g),h(g,!1)),h=(g,k)=>{let{aborted:w}=o.signal,S=w&&n.allowStaleOnFetchAbort,P=S||n.allowStaleOnFetchRejection,D=P||n.noDeleteOnFetchRejection,B=m;if(this.#s[t]===m&&(!D||!k&&B.__staleWhileFetching===void 0?this.#B(e,"fetch"):S||(this.#s[t]=B.__staleWhileFetching)),P)return n.status&&B.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),B.__staleWhileFetching;if(B.__returned===B)throw g},p=(g,k)=>{let w=this.#x?.(e,s,c);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(g(void 0),n.allowStaleOnFetchAbort&&(g=S=>l(S,!0)))}),w&&w instanceof Promise?w.then(S=>g(S===void 0?void 0:S),k):w!==void 0&&g(w)};n.status&&(n.status.fetchDispatched=!0);let m=new Promise(p).then(l,f),_=Object.assign(m,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return t===void 0?(this.#M(e,_,{...c.options,status:void 0}),t=this.#u.get(e)):this.#s[t]=_,_}#l(e){if(!this.#O)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let n=yn.hasSubscribers,{status:r=Xs()?{}:void 0}=t;t.status=r,r&&t.context&&(r.context=t.context);let s=this.#z(e,t);return r&&n&&(r.trace=!0,yn.tracePromise(()=>s,r).catch(()=>{})),s}async#z(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:g,forceRefresh:k=!1,status:w,signal:S}=t;if(w&&(w.op="fetch",w.key=e,k&&(w.forceRefresh=!0),w.cache=this),!this.#O)return w&&(w.fetch="get"),this.#$(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,status:w});let P={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:a,size:c,sizeCalculation:l,noUpdateTTL:f,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:_,ignoreFetchAbort:m,status:w,signal:S},D=this.#u.get(e);if(D===void 0){w&&(w.fetch="miss");let B=this.#F(e,D,P,g);return B.__returned=B}else{let B=this.#s[D];if(this.#l(B)){let le=n&&B.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",le&&(w.returnedStale=!0)),le?B.__staleWhileFetching:B.__returned=B}let U=this.#C(D);if(!k&&!U)return w&&(w.fetch="hit"),this.#Y(D),r&&this.#A(D),w&&this.#D(w,D),B;let J=this.#F(e,D,P,g),he=J.__staleWhileFetching!==void 0&&n;return w&&(w.fetch=U?"stale":"refresh",he&&U&&(w.returnedStale=!0)),he?J.__staleWhileFetching:J.__returned=J}}forceFetch(e,t={}){let n=yn.hasSubscribers,{status:r=Xs()?{}:void 0}=t;t.status=r,r&&t.context&&(r.context=t.context);let s=this.#j(e,t);return r&&n&&(r.trace=!0,yn.tracePromise(()=>s,r).catch(()=>{})),s}async#j(e,t={}){let n=await this.#z(e,t);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,t={}){let{status:n=ye.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="memo",n.key=e,t.context&&(n.context=t.context),n.cache=this);let r=this.#X(e,t);return n&&(n.value=r),ye.hasSubscribers&&ye.publish(n),r}#X(e,t={}){let n=this.#y;if(!n)throw new Error("no memoMethod provided to constructor");let{context:r,status:s,forceRefresh:o,...a}=t;s&&o&&(s.forceRefresh=!0);let c=this.#$(e,a),l=o||c===void 0;if(s&&(s.memo=l?"miss":"hit",l||(s.value=c)),!l)return c;let f=n(e,c,{options:a,context:r});return s&&(s.value=f),this.#M(e,f,a),f}get(e,t={}){let{status:n=ye.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="get",n.key=e,n.cache=this);let r=this.#$(e,t);return n&&(r!==void 0&&(n.value=r),ye.hasSubscribers&&ye.publish(n)),r}#$(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=t,a=this.#u.get(e);if(a===void 0){o&&(o.get="miss");return}let c=this.#s[a],l=this.#l(c);return o&&this.#D(o,a),this.#C(a)?l?(o&&(o.get="stale-fetching"),n&&c.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),c.__staleWhileFetching):void 0):(s||this.#B(e,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),c):void 0):(o&&(o.get=l?"fetching":"hit"),this.#Y(a),r&&this.#A(a),l?c.__staleWhileFetching:c)}#K(e,t){this.#v[t]=e,this.#b[e]=t}#Y(e){e!==this.#m&&(e===this.#p?this.#p=this.#b[e]:this.#K(this.#v[e],this.#b[e]),this.#K(this.#m,e),this.#m=e)}delete(e){return this.#B(e,"delete")}#B(e,t){ye.hasSubscribers&&ye.publish({op:"delete",delete:t,key:e,cache:this});let n=!1;if(this.#a!==0){let r=this.#u.get(e);if(r!==void 0)if(this.#_?.[r]&&(clearTimeout(this.#_?.[r]),this.#_[r]=void 0),n=!0,this.#a===1)this.#Q(t);else{this.#N(r);let s=this.#s[r];if(this.#l(s)?s.__abortController.abort(new Error("deleted")):(this.#w||this.#n)&&(this.#w&&this.#r?.(s,e,t),this.#n&&this.#g?.push([s,e,t])),this.#u.delete(e),this.#c[r]=void 0,this.#s[r]=void 0,r===this.#m)this.#m=this.#v[r];else if(r===this.#p)this.#p=this.#b[r];else{let o=this.#v[r];this.#b[o]=this.#b[r];let a=this.#b[r];this.#v[a]=this.#v[r]}this.#a--,this.#k.push(r)}}if(this.#n&&this.#g?.length){let r=this.#g,s;for(;s=r?.shift();)this.#o?.(...s)}return n}clear(){return this.#Q("delete")}#Q(e){for(let t of this.#R({allowStale:!0})){let n=this.#s[t];if(this.#l(n))n.__abortController.abort(new Error("deleted"));else{let r=this.#c[t];this.#w&&this.#r?.(n,r,e),this.#n&&this.#g?.push([n,r,e])}}if(this.#u.clear(),this.#s.fill(void 0),this.#c.fill(void 0),this.#d&&this.#E){this.#d.fill(0),this.#E.fill(0);for(let t of this.#_??[])t!==void 0&&clearTimeout(t);this.#_?.fill(void 0)}if(this.#S&&this.#S.fill(0),this.#p=0,this.#m=0,this.#k.length=0,this.#f=0,this.#a=0,this.#n&&this.#g){let t=this.#g,n;for(;n=t?.shift();)this.#o?.(...n)}}}});import{EventEmitter as so}from"node:events";import Bc from"node:stream";import{StringDecoder as cm}from"node:string_decoder";var Tc,um,hm,fm,ut,ht,St,Ri,vn,Ii,Nc,Li,Mc,Je,Vt,de,Sn,Ut,pe,Ae,me,Zs,Di,ve,ae,eo,to,Fc,no,Ze,io,Ti,xn,Pt,Ne,En,dm,pm,mm,gm,Ni,ro,_m,ym,xt,oo=fe(()=>{Tc=typeof process=="object"&&process?process:{stdout:null,stderr:null},um=i=>!!i&&typeof i=="object"&&(i instanceof xt||i instanceof Bc||hm(i)||fm(i)),hm=i=>!!i&&typeof i=="object"&&i instanceof so&&typeof i.pipe=="function"&&i.pipe!==Bc.Writable.prototype.pipe,fm=i=>!!i&&typeof i=="object"&&i instanceof so&&typeof i.write=="function"&&typeof i.end=="function",ut=Symbol("EOF"),ht=Symbol("maybeEmitEnd"),St=Symbol("emittedEnd"),Ri=Symbol("emittingEnd"),vn=Symbol("emittedError"),Ii=Symbol("closed"),Nc=Symbol("read"),Li=Symbol("flush"),Mc=Symbol("flushChunk"),Je=Symbol("encoding"),Vt=Symbol("decoder"),de=Symbol("flowing"),Sn=Symbol("paused"),Ut=Symbol("resume"),pe=Symbol("buffer"),Ae=Symbol("pipes"),me=Symbol("bufferLength"),Zs=Symbol("bufferPush"),Di=Symbol("bufferShift"),ve=Symbol("objectMode"),ae=Symbol("destroyed"),eo=Symbol("error"),to=Symbol("emitData"),Fc=Symbol("emitEnd"),no=Symbol("emitEnd2"),Ze=Symbol("async"),io=Symbol("abort"),Ti=Symbol("aborted"),xn=Symbol("signal"),Pt=Symbol("dataListeners"),Ne=Symbol("discarded"),En=i=>Promise.resolve().then(i),dm=i=>i(),pm=i=>i==="end"||i==="finish"||i==="prefinish",mm=i=>i instanceof ArrayBuffer||!!i&&typeof i=="object"&&i.constructor&&i.constructor.name==="ArrayBuffer"&&i.byteLength>=0,gm=i=>!Buffer.isBuffer(i)&&ArrayBuffer.isView(i),Ni=class{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[Ut](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},ro=class extends Ni{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=r=>this.dest.emit("error",r),e.on("error",this.proxyErrors)}},_m=i=>!!i.objectMode,ym=i=>!i.objectMode&&!!i.encoding&&i.encoding!=="buffer",xt=class extends so{[de]=!1;[Sn]=!1;[Ae]=[];[pe]=[];[ve];[Je];[Ze];[Vt];[ut]=!1;[St]=!1;[Ri]=!1;[Ii]=!1;[vn]=null;[me]=0;[ae]=!1;[xn];[Ti]=!1;[Pt]=0;[Ne]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");_m(t)?(this[ve]=!0,this[Je]=null):ym(t)?(this[Je]=t.encoding,this[ve]=!1):(this[ve]=!1,this[Je]=null),this[Ze]=!!t.async,this[Vt]=this[Je]?new cm(this[Je]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[pe]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Ae]});let{signal:n}=t;n&&(this[xn]=n,n.aborted?this[io]():n.addEventListener("abort",()=>this[io]()))}get bufferLength(){return this[me]}get encoding(){return this[Je]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[ve]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Ze]}set async(e){this[Ze]=this[Ze]||!!e}[io](){this[Ti]=!0,this.emit("abort",this[xn]?.reason),this.destroy(this[xn]?.reason)}get aborted(){return this[Ti]}set aborted(e){}write(e,t,n){if(this[Ti])return!1;if(this[ut])throw new Error("write after end");if(this[ae])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(n=t,t="utf8"),t||(t="utf8");let r=this[Ze]?En:dm;if(!this[ve]&&!Buffer.isBuffer(e)){if(gm(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(mm(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[ve]?(this[de]&&this[me]!==0&&this[Li](!0),this[de]?this.emit("data",e):this[Zs](e),this[me]!==0&&this.emit("readable"),n&&r(n),this[de]):e.length?(typeof e=="string"&&!(t===this[Je]&&!this[Vt]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Je]&&(e=this[Vt].write(e)),this[de]&&this[me]!==0&&this[Li](!0),this[de]?this.emit("data",e):this[Zs](e),this[me]!==0&&this.emit("readable"),n&&r(n),this[de]):(this[me]!==0&&this.emit("readable"),n&&r(n),this[de])}read(e){if(this[ae])return null;if(this[Ne]=!1,this[me]===0||e===0||e&&e>this[me])return this[ht](),null;this[ve]&&(e=null),this[pe].length>1&&!this[ve]&&(this[pe]=[this[Je]?this[pe].join(""):Buffer.concat(this[pe],this[me])]);let t=this[Nc](e||null,this[pe][0]);return this[ht](),t}[Nc](e,t){if(this[ve])this[Di]();else{let n=t;e===n.length||e===null?this[Di]():typeof n=="string"?(this[pe][0]=n.slice(e),t=n.slice(0,e),this[me]-=e):(this[pe][0]=n.subarray(e),t=n.subarray(0,e),this[me]-=e)}return this.emit("data",t),!this[pe].length&&!this[ut]&&this.emit("drain"),t}end(e,t,n){return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t="utf8"),e!==void 0&&this.write(e,t),n&&this.once("end",n),this[ut]=!0,this.writable=!1,(this[de]||!this[Sn])&&this[ht](),this}[Ut](){this[ae]||(!this[Pt]&&!this[Ae].length&&(this[Ne]=!0),this[Sn]=!1,this[de]=!0,this.emit("resume"),this[pe].length?this[Li]():this[ut]?this[ht]():this.emit("drain"))}resume(){return this[Ut]()}pause(){this[de]=!1,this[Sn]=!0,this[Ne]=!1}get destroyed(){return this[ae]}get flowing(){return this[de]}get paused(){return this[Sn]}[Zs](e){this[ve]?this[me]+=1:this[me]+=e.length,this[pe].push(e)}[Di](){return this[ve]?this[me]-=1:this[me]-=this[pe][0].length,this[pe].shift()}[Li](e=!1){do;while(this[Mc](this[Di]())&&this[pe].length);!e&&!this[pe].length&&!this[ut]&&this.emit("drain")}[Mc](e){return this.emit("data",e),this[de]}pipe(e,t){if(this[ae])return e;this[Ne]=!1;let n=this[St];return t=t||{},e===Tc.stdout||e===Tc.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[Ae].push(t.proxyErrors?new ro(this,e,t):new Ni(this,e,t)),this[Ze]?En(()=>this[Ut]()):this[Ut]()),e}unpipe(e){let t=this[Ae].find(n=>n.dest===e);t&&(this[Ae].length===1?(this[de]&&this[Pt]===0&&(this[de]=!1),this[Ae]=[]):this[Ae].splice(this[Ae].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e==="data")this[Ne]=!1,this[Pt]++,!this[Ae].length&&!this[de]&&this[Ut]();else if(e==="readable"&&this[me]!==0)super.emit("readable");else if(pm(e)&&this[St])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[vn]){let r=t;this[Ze]?En(()=>r.call(this,this[vn])):r.call(this,this[vn])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e==="data"&&(this[Pt]=this.listeners("data").length,this[Pt]===0&&!this[Ne]&&!this[Ae].length&&(this[de]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Pt]=0,!this[Ne]&&!this[Ae].length&&(this[de]=!1)),t}get emittedEnd(){return this[St]}[ht](){!this[Ri]&&!this[St]&&!this[ae]&&this[pe].length===0&&this[ut]&&(this[Ri]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ii]&&this.emit("close"),this[Ri]=!1)}emit(e,...t){let n=t[0];if(e!=="error"&&e!=="close"&&e!==ae&&this[ae])return!1;if(e==="data")return!this[ve]&&!n?!1:this[Ze]?(En(()=>this[to](n)),!0):this[to](n);if(e==="end")return this[Fc]();if(e==="close"){if(this[Ii]=!0,!this[St]&&!this[ae])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[vn]=n,super.emit(eo,n);let s=!this[xn]||this.listeners("error").length?super.emit("error",n):!1;return this[ht](),s}else if(e==="resume"){let s=super.emit("resume");return this[ht](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let r=super.emit(e,...t);return this[ht](),r}[to](e){for(let n of this[Ae])n.dest.write(e)===!1&&this.pause();let t=this[Ne]?!1:super.emit("data",e);return this[ht](),t}[Fc](){return this[St]?!1:(this[St]=!0,this.readable=!1,this[Ze]?(En(()=>this[no]()),!0):this[no]())}[no](){if(this[Vt]){let t=this[Vt].end();if(t){for(let n of this[Ae])n.dest.write(t);this[Ne]||super.emit("data",t)}}for(let t of this[Ae])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[ve]||(e.dataLength=0);let t=this.promise();return this.on("data",n=>{e.push(n),this[ve]||(e.dataLength+=n.length)}),await t,e}async concat(){if(this[ve])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Je]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(ae,()=>t(new Error("stream destroyed"))),this.on("error",n=>t(n)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Ne]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[ut])return t();let s,o,a=h=>{this.off("data",c),this.off("end",l),this.off(ae,f),t(),o(h)},c=h=>{this.off("error",a),this.off("end",l),this.off(ae,f),this.pause(),s({value:h,done:!!this[ut]})},l=()=>{this.off("error",a),this.off("data",c),this.off(ae,f),t(),s({done:!0,value:void 0})},f=()=>a(new Error("stream destroyed"));return new Promise((h,p)=>{o=p,s=h,this.once(ae,f),this.once("error",a),this.once("end",l),this.once("data",c)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[Ne]=!1;let e=!1,t=()=>(this.pause(),this.off(eo,t),this.off(ae,t),this.off("end",t),e=!0,{done:!0,value:void 0}),n=()=>{if(e)return t();let r=this.read();return r===null?t():{done:!1,value:r}};return this.once("end",t),this.once(eo,t),this.once(ae,t),{next:n,throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[ae])return e?this.emit("error",e):this.emit(ae),this;this[ae]=!0,this[Ne]=!0,this[pe].length=0,this[me]=0;let t=this;return typeof t.close=="function"&&!this[Ii]&&t.close(),e?this.emit("error",e):this.emit(ae),this}static get isStream(){return um}}});import{posix as bm,win32 as co}from"node:path";import{fileURLToPath as wm}from"node:url";import{lstatSync as vm,readdir as Sm,readdirSync as xm,readlinkSync as Em,realpathSync as Cm}from"fs";import*as km from"node:fs";import{lstat as Om,readdir as Pm,readlink as Rm,realpath as Im}from"node:fs/promises";var Am,kn,Vc,Uc,Lm,Dm,Ve,Gc,zc,et,$c,Yc,Rt,Jc,je,Cn,ao,qc,An,Ke,Mi,Bi,Hc,Tm,lo,Wc,On,jc,Fi,qi,uo,Kc,Se,Hi,Wi,ji,Gt,zt,Pn,b1,Qc,Xc=fe(()=>{Dc();oo();Am=Cm.native,kn={lstatSync:vm,readdir:Sm,readdirSync:xm,readlinkSync:Em,realpathSync:Am,promises:{lstat:Om,readdir:Pm,readlink:Rm,realpath:Im}},Vc=i=>!i||i===kn||i===km?kn:{...kn,...i,promises:{...kn.promises,...i.promises||{}}},Uc=/^\\\\\?\\([a-z]:)\\?$/i,Lm=i=>i.replace(/\//g,"\\").replace(Uc,"$1\\"),Dm=/[\\\/]/,Ve=0,Gc=1,zc=2,et=4,$c=6,Yc=8,Rt=10,Jc=12,je=15,Cn=~je,ao=16,qc=32,An=64,Ke=128,Mi=256,Bi=512,Hc=An|Ke|Bi,Tm=1023,lo=i=>i.isFile()?Yc:i.isDirectory()?et:i.isSymbolicLink()?Rt:i.isCharacterDevice()?zc:i.isBlockDevice()?$c:i.isSocket()?Jc:i.isFIFO()?Gc:Ve,Wc=new wn({max:2**12}),On=i=>{let e=Wc.get(i);if(e)return e;let t=i.normalize("NFKD");return Wc.set(i,t),t},jc=new wn({max:2**12}),Fi=i=>{let e=jc.get(i);if(e)return e;let t=On(i.toLowerCase());return jc.set(i,t),t},qi=class extends wn{constructor(){super({max:256})}},uo=class extends wn{constructor(e=16*1024){super({maxSize:e,sizeCalculation:t=>t.length+1})}},Kc=Symbol("PathScurry setAsCwd"),Se=class{name;root;roots;parent;nocase;isCWD=!1;#e;#i;get dev(){return this.#i}#r;get mode(){return this.#r}#t;get nlink(){return this.#t}#o;get uid(){return this.#o}#x;get gid(){return this.#x}#y;get rdev(){return this.#y}#h;get blksize(){return this.#h}#a;get ino(){return this.#a}#f;get size(){return this.#f}#u;get blocks(){return this.#u}#c;get atimeMs(){return this.#c}#s;get mtimeMs(){return this.#s}#b;get ctimeMs(){return this.#b}#v;get birthtimeMs(){return this.#v}#p;get atime(){return this.#p}#m;get mtime(){return this.#m}#k;get ctime(){return this.#k}#g;get birthtime(){return this.#g}#S;#E;#d;#_;#w;#O;#n;#I;#L;#A;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Ve,n,r,s,o,a){this.name=e,this.#S=s?Fi(e):On(e),this.#n=t&Tm,this.nocase=s,this.roots=r,this.root=n||this,this.#I=o,this.#d=a.fullpath,this.#w=a.relative,this.#O=a.relativePosix,this.parent=a.parent,this.parent?this.#e=this.parent.#e:this.#e=Vc(a.fs)}depth(){return this.#E!==void 0?this.#E:this.parent?this.#E=this.parent.depth()+1:this.#E=0}childrenCache(){return this.#I}resolve(e){if(!e)return this;let t=this.getRootString(e),r=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#D(r):this.#D(r)}#D(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#I.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#I.set(this,t),this.#n&=~ao,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let n=this.children(),r=this.nocase?Fi(e):On(e);for(let c of n)if(c.#S===r)return c;let s=this.parent?this.sep:"",o=this.#d?this.#d+s+e:void 0,a=this.newChild(e,Ve,{...t,parent:this,fullpath:o});return this.canReaddir()||(a.#n|=Ke),n.push(a),a}relative(){if(this.isCWD)return"";if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.name;let n=t.relative();return n+(!n||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#O!==void 0)return this.#O;let e=this.name,t=this.parent;if(!t)return this.#O=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?"":"/")+e}fullpath(){if(this.#d!==void 0)return this.#d;let e=this.name,t=this.parent;if(!t)return this.#d=this.name;let r=t.fullpath()+(t.parent?this.sep:"")+e;return this.#d=r}fullpathPosix(){if(this.#_!==void 0)return this.#_;if(this.sep==="/")return this.#_=this.fullpath();if(!this.parent){let r=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(r)?this.#_=`//?/${r}`:this.#_=r}let e=this.parent,t=e.fullpathPosix(),n=t+(!t||!e.parent?"":"/")+this.name;return this.#_=n}isUnknown(){return(this.#n&je)===Ve}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#n&je)===Yc}isDirectory(){return(this.#n&je)===et}isCharacterDevice(){return(this.#n&je)===zc}isBlockDevice(){return(this.#n&je)===$c}isFIFO(){return(this.#n&je)===Gc}isSocket(){return(this.#n&je)===Jc}isSymbolicLink(){return(this.#n&Rt)===Rt}lstatCached(){return this.#n&qc?this:void 0}readlinkCached(){return this.#L}realpathCached(){return this.#A}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#L)return!0;if(!this.parent)return!1;let e=this.#n&je;return!(e!==Ve&&e!==Rt||this.#n&Mi||this.#n&Ke)}calledReaddir(){return!!(this.#n&ao)}isENOENT(){return!!(this.#n&Ke)}isNamed(e){return this.nocase?this.#S===Fi(e):this.#S===On(e)}async readlink(){let e=this.#L;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=await this.#e.promises.readlink(this.fullpath()),n=(await this.parent.realpath())?.resolve(t);if(n)return this.#L=n}catch(t){this.#R(t.code);return}}readlinkSync(){let e=this.#L;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=this.#e.readlinkSync(this.fullpath()),n=this.parent.realpathSync()?.resolve(t);if(n)return this.#L=n}catch(t){this.#R(t.code);return}}#q(e){this.#n|=ao;for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&n.#C()}}#C(){this.#n&Ke||(this.#n=(this.#n|Ke)&Cn,this.#U())}#U(){let e=this.children();e.provisional=0;for(let t of e)t.#C()}#N(){this.#n|=Bi,this.#T()}#T(){if(this.#n&An)return;let e=this.#n;(e&je)===et&&(e&=Cn),this.#n=e|An,this.#U()}#H(e=""){e==="ENOTDIR"||e==="EPERM"?this.#T():e==="ENOENT"?this.#C():this.children().provisional=0}#P(e=""){e==="ENOTDIR"?this.parent.#T():e==="ENOENT"&&this.#C()}#R(e=""){let t=this.#n;t|=Mi,e==="ENOENT"&&(t|=Ke),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Cn),this.#n=t,e==="ENOTDIR"&&this.parent&&this.parent.#T()}#W(e,t){return this.#V(e,t)||this.#M(e,t)}#M(e,t){let n=lo(e),r=this.newChild(e.name,n,{parent:this}),s=r.#n&je;return s!==et&&s!==Rt&&s!==Ve&&(r.#n|=An),t.unshift(r),t.provisional++,r}#V(e,t){for(let n=t.provisional;n<t.length;n++){let r=t[n];if((this.nocase?Fi(e.name):On(e.name))===r.#S)return this.#J(e,r,n,t)}}#J(e,t,n,r){let s=t.name;return t.#n=t.#n&Cn|lo(e),s!==e.name&&(t.name=e.name),n!==r.provisional&&(n===r.length-1?r.pop():r.splice(n,1),r.unshift(t)),r.provisional++,t}async lstat(){if((this.#n&Ke)===0)try{return this.#G(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#P(e.code)}}lstatSync(){if((this.#n&Ke)===0)try{return this.#G(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#P(e.code)}}#G(e){let{atime:t,atimeMs:n,birthtime:r,birthtimeMs:s,blksize:o,blocks:a,ctime:c,ctimeMs:l,dev:f,gid:h,ino:p,mode:m,mtime:_,mtimeMs:g,nlink:k,rdev:w,size:S,uid:P}=e;this.#p=t,this.#c=n,this.#g=r,this.#v=s,this.#h=o,this.#u=a,this.#k=c,this.#b=l,this.#i=f,this.#x=h,this.#a=p,this.#r=m,this.#m=_,this.#s=g,this.#t=k,this.#y=w,this.#f=S,this.#o=P;let D=lo(e);this.#n=this.#n&Cn|D|qc,D!==Ve&&D!==et&&D!==Rt&&(this.#n|=An)}#F=[];#l=!1;#z(e){this.#l=!1;let t=this.#F.slice();this.#F.length=0,t.forEach(n=>n(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let s=n.slice(0,n.provisional);t?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#F.push(e),this.#l)return;this.#l=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(s,o)=>{if(s)this.#H(s.code),n.provisional=0;else{for(let a of o)this.#W(a,n);this.#q(n)}this.#z(n.slice(0,n.provisional))})}#j;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#j)await this.#j;else{let n=()=>{};this.#j=new Promise(r=>n=r);try{for(let r of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#W(r,e);this.#q(e)}catch(r){this.#H(r.code),e.provisional=0}this.#j=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#e.readdirSync(t,{withFileTypes:!0}))this.#W(n,e);this.#q(e)}catch(n){this.#H(n.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#n&Hc)return!1;let e=je&this.#n;return e===Ve||e===et||e===Rt}shouldWalk(e,t){return(this.#n&et)===et&&!(this.#n&Hc)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#A)return this.#A;if(!((Bi|Mi|Ke)&this.#n))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#A=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#A)return this.#A;if(!((Bi|Mi|Ke)&this.#n))try{let e=this.#e.realpathSync(this.fullpath());return this.#A=this.resolve(e)}catch{this.#N()}}[Kc](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],r=this;for(;r&&r.parent;)t.add(r),r.#w=n.join(this.sep),r.#O=n.join("/"),r=r.parent,n.push("..");for(r=e;r&&r.parent&&!t.has(r);)r.#w=void 0,r.#O=void 0,r=r.parent}},Hi=class i extends Se{sep="\\";splitSep=Dm;constructor(e,t=Ve,n,r,s,o,a){super(e,t,n,r,s,o,a)}newChild(e,t=Ve,n={}){return new i(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return co.parse(e).root}getRoot(e){if(e=Lm(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new Gt(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Uc,"$1\\"),e===t}},Wi=class i extends Se{splitSep="/";sep="/";constructor(e,t=Ve,n,r,s,o,a){super(e,t,n,r,s,o,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Ve,n={}){return new i(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}},ji=class{root;rootPath;roots;cwd;#e;#i;#r;nocase;#t;constructor(e=process.cwd(),t,n,{nocase:r,childrenCacheSize:s=16*1024,fs:o=kn}={}){this.#t=Vc(o),(e instanceof URL||e.startsWith("file://"))&&(e=wm(e));let a=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#e=new qi,this.#i=new qi,this.#r=new uo(s);let c=a.substring(this.rootPath.length).split(n);if(c.length===1&&!c[0]&&c.pop(),r===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=r,this.root=this.newRoot(this.#t),this.roots[this.rootPath]=this.root;let l=this.root,f=c.length-1,h=t.sep,p=this.rootPath,m=!1;for(let _ of c){let g=f--;l=l.child(_,{relative:new Array(g).fill("..").join(h),relativePosix:new Array(g).fill("..").join("/"),fullpath:p+=(m?"":h)+_}),m=!0}this.cwd=l}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#r}resolve(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#e.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpath();return this.#e.set(t,r),r}resolvePosix(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#i.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpathPosix();return this.#i.set(t,r),r}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let r=await e.readdir();return n?r:r.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(r=>r.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=[];(!s||s(e))&&a.push(n?e:e.fullpath());let c=new Set,l=(h,p)=>{c.add(h),h.readdirCB((m,_)=>{if(m)return p(m);let g=_.length;if(!g)return p();let k=()=>{--g===0&&p()};for(let w of _)(!s||s(w))&&a.push(n?w:w.fullpath()),r&&w.isSymbolicLink()?w.realpath().then(S=>S?.isUnknown()?S.lstat():S).then(S=>S?.shouldWalk(c,o)?l(S,k):k()):w.shouldWalk(c,o)?l(w,k):k()},!0)},f=e;return new Promise((h,p)=>{l(f,m=>{if(m)return p(m);h(a)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=[];(!s||s(e))&&a.push(n?e:e.fullpath());let c=new Set([e]);for(let l of c){let f=l.readdirSync();for(let h of f){(!s||s(h))&&a.push(n?h:h.fullpath());let p=h;if(h.isSymbolicLink()){if(!(r&&(p=h.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(c,o)&&c.add(p)}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t;(!s||s(e))&&(yield n?e:e.fullpath());let a=new Set([e]);for(let c of a){let l=c.readdirSync();for(let f of l){(!s||s(f))&&(yield n?f:f.fullpath());let h=f;if(f.isSymbolicLink()){if(!(r&&(h=f.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(a,o)&&a.add(h)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=new xt({objectMode:!0});(!s||s(e))&&a.write(n?e:e.fullpath());let c=new Set,l=[e],f=0,h=()=>{let p=!1;for(;!p;){let m=l.shift();if(!m){f===0&&a.end();return}f++,c.add(m);let _=(k,w,S=!1)=>{if(k)return a.emit("error",k);if(r&&!S){let P=[];for(let D of w)D.isSymbolicLink()&&P.push(D.realpath().then(B=>B?.isUnknown()?B.lstat():B));if(P.length){Promise.all(P).then(()=>_(null,w,!0));return}}for(let P of w)P&&(!s||s(P))&&(a.write(n?P:P.fullpath())||(p=!0));f--;for(let P of w){let D=P.realpathCached()||P;D.shouldWalk(c,o)&&l.push(D)}p&&!a.flowing?a.once("drain",h):g||h()},g=!0;m.readdirCB(_,!0),g=!1}};return h(),a}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=new xt({objectMode:!0}),c=new Set;(!s||s(e))&&a.write(n?e:e.fullpath());let l=[e],f=0,h=()=>{let p=!1;for(;!p;){let m=l.shift();if(!m){f===0&&a.end();return}f++,c.add(m);let _=m.readdirSync();for(let g of _)(!s||s(g))&&(a.write(n?g:g.fullpath())||(p=!0));f--;for(let g of _){let k=g;if(g.isSymbolicLink()){if(!(r&&(k=g.realpathSync())))continue;k.isUnknown()&&k.lstatSync()}k.shouldWalk(c,o)&&l.push(k)}}p&&!a.flowing&&a.once("drain",h)};return h(),a}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Kc](t)}},Gt=class extends ji{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,co,"\\",{...t,nocase:n}),this.nocase=n;for(let r=this.cwd;r;r=r.parent)r.nocase=this.nocase}parseRootPath(e){return co.parse(e).root.toUpperCase()}newRoot(e){return new Hi(this.rootPath,et,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},zt=class extends ji{sep="/";constructor(e=process.cwd(),t={}){let{nocase:n=!1}=t;super(e,bm,"/",{...t,nocase:n}),this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new Wi(this.rootPath,et,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Pn=class extends zt{constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}},b1=process.platform==="win32"?Hi:Wi,Qc=process.platform==="win32"?Gt:process.platform==="darwin"?Pn:zt});var Nm,Mm,$t,ho=fe(()=>{wt();Nm=i=>i.length>=1,Mm=i=>i.length>=1,$t=class i{#e;#i;#r;length;#t;#o;#x;#y;#h;#a;#f=!0;constructor(e,t,n,r){if(!Nm(e))throw new TypeError("empty pattern list");if(!Mm(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#i=t,this.#r=n,this.#t=r,this.#r===0){if(this.isUNC()){let[s,o,a,c,...l]=this.#e,[f,h,p,m,..._]=this.#i;l[0]===""&&(l.shift(),_.shift());let g=[s,o,a,c,""].join("/"),k=[f,h,p,m,""].join("/");this.#e=[g,...l],this.#i=[k,..._],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...o]=this.#e,[a,...c]=this.#i;o[0]===""&&(o.shift(),c.shift());let l=s+"/",f=a+"/";this.#e=[l,...o],this.#i=[f,...c],this.length=this.#e.length}}}pattern(){return this.#e[this.#r]}isString(){return typeof this.#e[this.#r]=="string"}isGlobstar(){return this.#e[this.#r]===oe}isRegExp(){return this.#e[this.#r]instanceof RegExp}globString(){return this.#x=this.#x||(this.#r===0?this.isAbsolute()?this.#i[0]+this.#i.slice(1).join("/"):this.#i.join("/"):this.#i.slice(this.#r).join("/"))}hasMore(){return this.length>this.#r+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new i(this.#e,this.#i,this.#r+1,this.#t),this.#o.#a=this.#a,this.#o.#h=this.#h,this.#o.#y=this.#y,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#t==="win32"&&this.#r===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#y!==void 0?this.#y:this.#y=this.#t==="win32"&&this.#r===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#r===0?e:""}checkFollowGlobstar(){return!(this.#r===0||!this.isGlobstar()||!this.#f)}markFollowGlobstar(){return this.#r===0||!this.isGlobstar()||!this.#f?!1:(this.#f=!1,!0)}}});var Fm,It,fo=fe(()=>{wt();ho();Fm=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",It=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:r,noglobstar:s,platform:o=Fm}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:r,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let a of e)this.add(a)}add(e){let t=new Te(e,this.mmopts);for(let n=0;n<t.set.length;n++){let r=t.set[n],s=t.globParts[n];if(!r||!s)throw new Error("invalid pattern object");for(;r[0]==="."&&s[0]===".";)r.shift(),s.shift();let o=new $t(r,s,0,this.platform),a=new Te(o.globString(),this.mmopts),c=s[s.length-1]==="**",l=o.isAbsolute();l?this.absolute.push(a):this.relative.push(a),c&&(l?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let t=e.fullpath(),n=`${t}/`,r=e.relative()||".",s=`${r}/`;for(let o of this.relative)if(o.match(r)||o.match(s))return!0;for(let o of this.absolute)if(o.match(t)||o.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",n=(e.relative()||".")+"/";for(let r of this.relativeChildren)if(r.match(n))return!0;for(let r of this.absoluteChildren)if(r.match(t))return!0;return!1}}});var po,mo,go,Rn,Zc=fe(()=>{wt();po=class i{store;constructor(e=new Map){this.store=e}copy(){return new i(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),r=this.store.get(n);r?r.add(t.globString()):this.store.set(n,new Set([t.globString()]))}},mo=class{store=new Map;add(e,t,n){let r=(t?2:0)|(n?1:0),s=this.store.get(e);this.store.set(e,s===void 0?r:r&s)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},go=class{store=new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(r=>r.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Rn=class i{hasWalkedCache;matches=new mo;subwalks=new go;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new po}processPatterns(e,t){this.patterns=t;let n=t.map(r=>[e,r]);for(let[r,s]of n){this.hasWalkedCache.storeWalked(r,s);let o=s.root(),a=s.isAbsolute()&&this.opts.absolute!==!1;if(o){r=r.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let h=s.rest();if(h)s=h;else{this.matches.add(r,!0,!1);continue}}if(r.isENOENT())continue;let c,l,f=!1;for(;typeof(c=s.pattern())=="string"&&(l=s.rest());)r=r.resolve(c),s=l,f=!0;if(c=s.pattern(),l=s.rest(),f){if(this.hasWalkedCache.hasWalked(r,s))continue;this.hasWalkedCache.storeWalked(r,s)}if(typeof c=="string"){let h=c===".."||c===""||c===".";this.matches.add(r.resolve(c),a,h);continue}else if(c===oe){(!r.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(r,s);let h=l?.pattern(),p=l?.rest();if(!l||(h===""||h===".")&&!p)this.matches.add(r,a,h===""||h===".");else if(h===".."){let m=r.parent||r;p?this.hasWalkedCache.hasWalked(m,p)||this.subwalks.add(m,p):this.matches.add(m,a,!0)}}else c instanceof RegExp&&this.subwalks.add(r,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new i(this.opts,this.hasWalkedCache)}filterEntries(e,t){let n=this.subwalks.get(e),r=this.child();for(let s of t)for(let o of n){let a=o.isAbsolute(),c=o.pattern(),l=o.rest();c===oe?r.testGlobstar(s,o,l,a):c instanceof RegExp?r.testRegExp(s,c,l,a):r.testString(s,c,l,a)}return r}testGlobstar(e,t,n,r){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let s=n.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,n.rest(),r);else if(s===".."){let o=e.parent||e;this.subwalks.add(o,n)}else s instanceof RegExp&&this.testRegExp(e,s,n.rest(),r)}}testRegExp(e,t,n,r){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}testString(e,t,n,r){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}}});var Bm,Vi,In,Ln,eu=fe(()=>{oo();fo();Zc();Bm=(i,e)=>typeof i=="string"?new It([i],e):Array.isArray(i)?new It(i,e):i,Vi=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#i;#r;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#r=!n.posix&&n.platform==="win32"?"\\":"/",this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#i=Bm(n.ignore??[],n),!this.includeChildMatches&&typeof this.#i.add!="function")){let r="cannot ignore child matches, ignore lacks add() method.";throw new Error(r)}this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#t(e){return this.seen.has(e)||!!this.#i?.ignored?.(e)}#o(e){return!!this.#i?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=await s.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(s,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#t(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=s.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(s,t)}matchFinish(e,t){if(this.#t(e))return;if(!this.includeChildMatches&&this.#i?.add){let s=`${e.relativePosix()}/**`;this.#i.add(s)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#r:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+r)}else{let s=this.opts.posix?e.relativePosix():e.relative(),o=this.opts.dotRelative&&!s.startsWith(".."+this.#r)?"."+this.#r:"";this.matchEmit(s?o+s+r:"."+r)}}async match(e,t,n){let r=await this.matchCheck(e,n);r&&this.matchFinish(r,t)}matchSync(e,t,n){let r=this.matchCheckSync(e,n);r&&this.matchFinish(r,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new Rn(this.opts),n)}walkCB2(e,t,n,r){if(this.#o(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,r));return}n.processPatterns(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,c,l]of n.matches.entries())this.#t(a)||(s++,this.match(a,c,l).then(()=>o()));for(let a of n.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let c=a.readdirCached();a.calledReaddir()?this.walkCB3(a,c,n,o):a.readdirCB((l,f)=>this.walkCB3(a,f,n,o),!0)}o()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,c,l]of n.matches.entries())this.#t(a)||(s++,this.match(a,c,l).then(()=>o()));for(let[a,c]of n.subwalks.entries())s++,this.walkCB2(a,c,n.child(),o);o()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new Rn(this.opts),n)}walkCB2Sync(e,t,n,r){if(this.#o(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,r));return}n.processPatterns(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,c,l]of n.matches.entries())this.#t(a)||this.matchSync(a,c,l);for(let a of n.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let c=a.readdirSync();this.walkCB3Sync(a,c,n,o)}o()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,c,l]of n.matches.entries())this.#t(a)||this.matchSync(a,c,l);for(let[a,c]of n.subwalks.entries())s++,this.walkCB2Sync(a,c,n.child(),o);o()}},In=class extends Vi{matches=new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Ln=class extends Vi{results;constructor(e,t,n){super(e,t,n),this.results=new xt({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}});import{fileURLToPath as qm}from"node:url";var Hm,Ue,_o=fe(()=>{wt();Xc();ho();eu();Hm=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ue=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=qm(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(c=>c.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(c=>c.includes("/")?c:`./**/${c}`)}if(this.pattern=e,this.platform=t.platform||Hm,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let c=t.platform==="win32"?Gt:t.platform==="darwin"?Pn:t.platform?zt:Qc;this.scurry=new c(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",r={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(c=>new Te(c,r)),[o,a]=s.reduce((c,l)=>(c[0].push(...l.set),c[1].push(...l.globParts),c),[[],[]]);this.patterns=o.map((c,l)=>{let f=a[l];if(!f)throw new Error("invalid pattern object");return new $t(c,f,0,this.platform)})}async walk(){return[...await new In(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new In(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Ln(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Ln(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}});var Ui,yo=fe(()=>{wt();Ui=(i,e={})=>{Array.isArray(i)||(i=[i]);for(let t of i)if(new Te(t,e).hasMagic())return!0;return!1}});var au={};vf(au,{Glob:()=>Ue,Ignore:()=>It,escape:()=>Ot,glob:()=>ft,globIterate:()=>vo,globIterateSync:()=>Tn,globStream:()=>bo,globStreamSync:()=>Dn,globSync:()=>wo,hasMagic:()=>Ui,iterate:()=>su,iterateSync:()=>ru,stream:()=>iu,streamSync:()=>nu,sync:()=>ou,unescape:()=>He});function Dn(i,e={}){return new Ue(i,e).streamSync()}function bo(i,e={}){return new Ue(i,e).stream()}function wo(i,e={}){return new Ue(i,e).walkSync()}async function tu(i,e={}){return new Ue(i,e).walk()}function Tn(i,e={}){return new Ue(i,e).iterateSync()}function vo(i,e={}){return new Ue(i,e).iterate()}var nu,iu,ru,su,ou,ft,Nn=fe(()=>{wt();_o();yo();wt();_o();yo();fo();nu=Dn,iu=Object.assign(bo,{sync:Dn}),ru=Tn,su=Object.assign(vo,{sync:Tn}),ou=Object.assign(wo,{stream:Dn,iterate:Tn}),ft=Object.assign(tu,{glob:tu,globSync:wo,sync:ou,globStream:bo,stream:iu,globStreamSync:Dn,streamSync:nu,globIterate:vo,iterate:su,globIterateSync:Tn,iterateSync:ru,Glob:Ue,hasMagic:Ui,escape:Ot,unescape:He});ft.glob=ft});var Oe=W(Me=>{"use strict";Me.__esModule=!0;Me.extend=bu;Me.indexOf=og;Me.escapeExpression=ag;Me.isEmpty=lg;Me.createFrame=cg;Me.blockParams=ug;Me.appendContextPath=hg;var ng={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},ig=/[&<>"'`=]/g,rg=/[&<>"'`=]/;function sg(i){return ng[i]}function bu(i){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&(i[t]=arguments[e][t]);return i}var Oo=Object.prototype.toString;Me.toString=Oo;var Ao=function(e){return typeof e=="function"};Ao(/x/)&&(Me.isFunction=Ao=function(i){return typeof i=="function"&&Oo.call(i)==="[object Function]"});Me.isFunction=Ao;var wu=Array.isArray||function(i){return i&&typeof i=="object"?Oo.call(i)==="[object Array]":!1};Me.isArray=wu;function og(i,e){for(var t=0,n=i.length;t<n;t++)if(i[t]===e)return t;return-1}function ag(i){if(typeof i!="string"){if(i&&i.toHTML)return i.toHTML();if(i==null)return"";if(!i)return i+"";i=""+i}return rg.test(i)?i.replace(ig,sg):i}function lg(i){return!i&&i!==0?!0:!!(wu(i)&&i.length===0)}function cg(i){var e=bu({},i);return e._parent=i,e}function ug(i,e){return i.path=e,i}function hg(i,e){return(i?i+".":"")+e}});var Fe=W((Ki,vu)=>{"use strict";Ki.__esModule=!0;var Po=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Ro(i,e){var t=e&&e.loc,n=void 0,r=void 0,s=void 0,o=void 0;t&&(n=t.start.line,r=t.end.line,s=t.start.column,o=t.end.column,i+=" - "+n+":"+s);for(var a=Error.prototype.constructor.call(this,i),c=0;c<Po.length;c++)this[Po[c]]=a[Po[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Ro);try{t&&(this.lineNumber=n,this.endLineNumber=r,Object.defineProperty?(Object.defineProperty(this,"column",{value:s,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:o,enumerable:!0})):(this.column=s,this.endColumn=o))}catch{}}Ro.prototype=new Error;Ki.default=Ro;vu.exports=Ki.default});var xu=W((Qi,Su)=>{"use strict";Qi.__esModule=!0;var Io=Oe();Qi.default=function(i){i.registerHelper("blockHelperMissing",function(e,t){var n=t.inverse,r=t.fn;if(e===!0)return r(this);if(e===!1||e==null)return n(this);if(Io.isArray(e))return e.length>0?(t.ids&&(t.ids=[t.name]),i.helpers.each(e,t)):n(this);if(t.data&&t.ids){var s=Io.createFrame(t.data);s.contextPath=Io.appendContextPath(t.data.contextPath,t.name),t={data:s}}return r(e,t)})};Su.exports=Qi.default});var Cu=W((Xi,Eu)=>{"use strict";Xi.__esModule=!0;function fg(i){return i&&i.__esModule?i:{default:i}}var Bn=Oe(),dg=Fe(),pg=fg(dg);Xi.default=function(i){i.registerHelper("each",function(e,t){if(!t)throw new pg.default("Must pass iterator to #each");var n=t.fn,r=t.inverse,s=0,o="",a=void 0,c=void 0;t.data&&t.ids&&(c=Bn.appendContextPath(t.data.contextPath,t.ids[0])+"."),Bn.isFunction(e)&&(e=e.call(this)),t.data&&(a=Bn.createFrame(t.data));function l(_,g,k){a&&(a.key=_,a.index=g,a.first=g===0,a.last=!!k,c&&(a.contextPath=c+_)),o=o+n(e[_],{data:a,blockParams:Bn.blockParams([e[_],_],[c+_,null])})}if(e&&typeof e=="object")if(Bn.isArray(e))for(var f=e.length;s<f;s++)s in e&&l(s,s,s===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var h=[],p=e[Symbol.iterator](),m=p.next();!m.done;m=p.next())h.push(m.value);e=h;for(var f=e.length;s<f;s++)l(s,s,s===e.length-1)}else(function(){var _=void 0;Object.keys(e).forEach(function(g){_!==void 0&&l(_,s-1),_=g,s++}),_!==void 0&&l(_,s-1,!0)})();return s===0&&(o=r(this)),o})};Eu.exports=Xi.default});var Au=W((Zi,ku)=>{"use strict";Zi.__esModule=!0;function mg(i){return i&&i.__esModule?i:{default:i}}var gg=Fe(),_g=mg(gg);Zi.default=function(i){i.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new _g.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};ku.exports=Zi.default});var Iu=W((er,Ru)=>{"use strict";er.__esModule=!0;function yg(i){return i&&i.__esModule?i:{default:i}}var Ou=Oe(),bg=Fe(),Pu=yg(bg);er.default=function(i){i.registerHelper("if",function(e,t){if(arguments.length!=2)throw new Pu.default("#if requires exactly one argument");return Ou.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||Ou.isEmpty(e)?t.inverse(this):t.fn(this)}),i.registerHelper("unless",function(e,t){if(arguments.length!=2)throw new Pu.default("#unless requires exactly one argument");return i.helpers.if.call(this,e,{fn:t.inverse,inverse:t.fn,hash:t.hash})})};Ru.exports=er.default});var Du=W((tr,Lu)=>{"use strict";tr.__esModule=!0;tr.default=function(i){i.registerHelper("log",function(){for(var e=[void 0],t=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var r=1;t.hash.level!=null?r=t.hash.level:t.data&&t.data.level!=null&&(r=t.data.level),e[0]=r,i.log.apply(i,e)})};Lu.exports=tr.default});var Nu=W((nr,Tu)=>{"use strict";nr.__esModule=!0;nr.default=function(i){i.registerHelper("lookup",function(e,t,n){return e&&n.lookupProperty(e,t)})};Tu.exports=nr.default});var Fu=W((ir,Mu)=>{"use strict";ir.__esModule=!0;function wg(i){return i&&i.__esModule?i:{default:i}}var qn=Oe(),vg=Fe(),Sg=wg(vg);ir.default=function(i){i.registerHelper("with",function(e,t){if(arguments.length!=2)throw new Sg.default("#with requires exactly one argument");qn.isFunction(e)&&(e=e.call(this));var n=t.fn;if(qn.isEmpty(e))return t.inverse(this);var r=t.data;return t.data&&t.ids&&(r=qn.createFrame(t.data),r.contextPath=qn.appendContextPath(t.data.contextPath,t.ids[0])),n(e,{data:r,blockParams:qn.blockParams([e],[r&&r.contextPath])})})};Mu.exports=ir.default});var Lo=W(rr=>{"use strict";rr.__esModule=!0;rr.registerDefaultHelpers=Fg;rr.moveHelperToHooks=Bg;function Lt(i){return i&&i.__esModule?i:{default:i}}var xg=xu(),Eg=Lt(xg),Cg=Cu(),kg=Lt(Cg),Ag=Au(),Og=Lt(Ag),Pg=Iu(),Rg=Lt(Pg),Ig=Du(),Lg=Lt(Ig),Dg=Nu(),Tg=Lt(Dg),Ng=Fu(),Mg=Lt(Ng);function Fg(i){Eg.default(i),kg.default(i),Og.default(i),Rg.default(i),Lg.default(i),Tg.default(i),Mg.default(i)}function Bg(i,e,t){i.helpers[e]&&(i.hooks[e]=i.helpers[e],t||(i.helpers[e]=void 0))}});var qu=W((sr,Bu)=>{"use strict";sr.__esModule=!0;var qg=Oe();sr.default=function(i){i.registerDecorator("inline",function(e,t,n,r){var s=e;return t.partials||(t.partials={},s=function(o,a){var c=n.partials;n.partials=qg.extend({},c,t.partials);var l=e(o,a);return n.partials=c,l}),t.partials[r.args[0]]=r.fn,s})};Bu.exports=sr.default});var Hu=W(Do=>{"use strict";Do.__esModule=!0;Do.registerDefaultDecorators=Vg;function Hg(i){return i&&i.__esModule?i:{default:i}}var Wg=qu(),jg=Hg(Wg);function Vg(i){jg.default(i)}});var To=W((or,Wu)=>{"use strict";or.__esModule=!0;var Ug=Oe(),Yt={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var t=Ug.indexOf(Yt.methodMap,e.toLowerCase());t>=0?e=t:e=parseInt(e,10)}return e},log:function(e){if(e=Yt.lookupLevel(e),typeof console<"u"&&Yt.lookupLevel(Yt.level)<=e){var t=Yt.methodMap[e];console[t]||(t="log");for(var n=arguments.length,r=Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];console[t].apply(console,r)}}};or.default=Yt;Wu.exports=or.default});var No=W(Hn=>{"use strict";Hn.__esModule=!0;Hn.createProtoAccessControl=Yg;Hn.resultIsAllowed=Jg;Hn.resetLoggedProperties=Qg;function Gg(i){return i&&i.__esModule?i:{default:i}}var ju=Oe(),zg=To(),$g=Gg(zg),ar=Object.create(null);function Yg(i){var e=Object.create(null);e.__proto__=!1,ju.extend(e,i.allowedProtoProperties);var t=Object.create(null);return t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1,t.__lookupSetter__=!1,ju.extend(t,i.allowedProtoMethods),{properties:{whitelist:e,defaultValue:i.allowProtoPropertiesByDefault},methods:{whitelist:t,defaultValue:i.allowProtoMethodsByDefault}}}function Jg(i,e,t){return Vu(typeof i=="function"?e.methods:e.properties,t)}function Vu(i,e){return i.whitelist[e]!==void 0?i.whitelist[e]===!0:i.defaultValue!==void 0?i.defaultValue:(Kg(e),!1)}function Kg(i){ar[i]!==!0&&(ar[i]=!0,$g.default.log("error",'Handlebars: Access has been denied to resolve the property "'+i+`" because it is not an "own property" of its parent.
29
+ `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(r=>t.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Vl(i){return i.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",r="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?r=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],n=s[3],r=s[4]),t&&r!=="0"?`${t}=${n}:${parseInt(r)+1}`:e})}function Ts(){if(Q.env.NO_COLOR||Q.env.FORCE_COLOR==="0"||Q.env.FORCE_COLOR==="false")return!1;if(Q.env.FORCE_COLOR||Q.env.CLICOLOR_FORCE!==void 0)return!0}Ns.Command=Ds;Ns.useColor=Ts});var Yl=W(qe=>{var{Argument:Gl}=wi(),{Command:Ms}=Ul(),{CommanderError:Bd,InvalidArgumentError:zl}=pn(),{Help:qd}=ks(),{Option:$l}=Rs();qe.program=new Ms;qe.createCommand=i=>new Ms(i);qe.createOption=(i,e)=>new $l(i,e);qe.createArgument=(i,e)=>new Gl(i,e);qe.Command=Ms;qe.Option=$l;qe.Argument=Gl;qe.Help=qd;qe.CommanderError=Bd;qe.InvalidArgumentError=zl;qe.InvalidOptionArgumentError=zl});var Us,oc,Qd,ac=fe(()=>{Us=(i,e,t)=>{let n=i instanceof RegExp?oc(i,t):i,r=e instanceof RegExp?oc(e,t):e,s=n!==null&&r!=null&&Qd(n,r,t);return s&&{start:s[0],end:s[1],pre:t.slice(0,s[0]),body:t.slice(s[0]+n.length,s[1]),post:t.slice(s[1]+r.length)}},oc=(i,e)=>{let t=e.match(i);return t?t[0]:null},Qd=(i,e,t)=>{let n,r,s,o,a,l=t.indexOf(i),c=t.indexOf(e,l+1),f=l;if(l>=0&&c>0){if(i===e)return[l,c];for(n=[],s=t.length;f>=0&&!a;){if(f===l)n.push(f),l=t.indexOf(i,f+1);else if(n.length===1){let h=n.pop();h!==void 0&&(a=[h,c])}else r=n.pop(),r!==void 0&&r<s&&(s=r,o=c),c=t.indexOf(e,f+1);f=l<c&&l>=0?l:c}n.length&&o!==void 0&&(a=[s,o])}return a}});function Gs(i){return isNaN(i)?i.charCodeAt(0):parseInt(i,10)}function up(i){return i.replace(ip,lc).replace(rp,cc).replace(sp,$s).replace(op,uc).replace(ap,hc)}function hp(i){return i.replace(Xd,"\\").replace(Zd,"{").replace(ep,"}").replace(tp,",").replace(np,".")}function fc(i){if(!i)return[""];let e=[],t=Us("{","}",i);if(!t)return i.split(",");let{pre:n,body:r,post:s}=t,o=n.split(",");o[o.length-1]+="{"+r+"}";let a=fc(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function dc(i,e={}){if(!i)return[];let{max:t=lp,maxLength:n=cp}=e;return i.slice(0,2)==="{}"&&(i="\\{\\}"+i.slice(2)),zs(up(i),t,n,!0).map(hp)}function fp(i){return"{"+i+"}"}function dp(i){return/^-?0\d/.test(i)}function pp(i,e){return i<=e}function mp(i,e){return i>=e}function mn(i,e,t,n,r,s){let o=[],a=0;for(let l=0;l<i.length;l++)for(let c=0;c<t.length;c++){if(o.length>=n)return o;let f=i[l]+e+t[c];if(!(s&&!f)){if(a+f.length>r)return o;o.push(f),a+=f.length}}return o}function gp(i,e,t){let n=i.split(/\.\./),r=[];if(n[0]===void 0||n[1]===void 0)return r;let s=Gs(n[0]),o=Gs(n[1]),a=Math.max(n[0].length,n[1].length),l=n.length===3&&n[2]!==void 0?Math.max(Math.abs(Gs(n[2])),1):1,c=pp;o<s&&(l*=-1,c=mp);let h=n.some(dp);for(let p=s;c(p,o)&&r.length<t;p+=l){let m;if(e)m=String.fromCharCode(p),m==="\\"&&(m="");else if(m=String(p),h){let _=a-m.length;if(_>0){let g=new Array(_+1).join("0");p<0?m="-"+g+m.slice(1):m=g+m}}r.push(m)}return r}function zs(i,e,t,n){let r=[""],s=!1,o=!0;for(;;){let a=Us("{","}",i);if(!a)return mn(r,i,[""],e,t,s);let l=a.pre;if(/\$$/.test(l)){if(r=mn(r,l+"{"+a.body+"}",[""],e,t,s&&!a.post.length),o=!1,!a.post.length)break;i=a.post;continue}let c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),f=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),h=c||f,p=a.body.indexOf(",")>=0;if(!h&&!p){if(a.post.match(/,(?!,).*\}/)){i=a.pre+"{"+a.body+$s+a.post,n=!0;continue}return mn(r,l+"{"+a.body+"}"+a.post,[""],e,t,s)}o&&(s=n&&!h,o=!1);let m;if(h)m=gp(a.body,f,e);else{let _=fc(a.body);if(_.length===1&&_[0]!==void 0&&(_=zs(_[0],e,t,!1).map(fp),_.length===1)){if(r=mn(r,l+_[0],[""],e,t,s&&!a.post.length),!a.post.length)break;i=a.post;continue}m=[];for(let g=0;g<_.length;g++)m.push.apply(m,zs(_[g],e,t,!1))}if(r=mn(r,l,m,e,t,s&&!a.post.length),!a.post.length)break;i=a.post}return r}var lc,cc,$s,uc,hc,Xd,Zd,ep,tp,np,ip,rp,sp,op,ap,lp,cp,pc=fe(()=>{ac();lc="\0SLASH"+Math.random()+"\0",cc="\0OPEN"+Math.random()+"\0",$s="\0CLOSE"+Math.random()+"\0",uc="\0COMMA"+Math.random()+"\0",hc="\0PERIOD"+Math.random()+"\0",Xd=new RegExp(lc,"g"),Zd=new RegExp(cc,"g"),ep=new RegExp($s,"g"),tp=new RegExp(uc,"g"),np=new RegExp(hc,"g"),ip=/\\\\/g,rp=/\\{/g,sp=/\\}/g,op=/\\,/g,ap=/\\\./g,lp=1e5,cp=4e6});var gn,mc=fe(()=>{gn=i=>{if(typeof i!="string")throw new TypeError("invalid pattern");if(i.length>65536)throw new TypeError("pattern is too long")}});var _p,_n,yp,gc,_c,yc=fe(()=>{_p={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},_n=i=>i.replace(/[[\]\\-]/g,"\\$&"),yp=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),gc=i=>i.join(""),_c=(i,e)=>{let t=e;if(i.charAt(t)!=="[")throw new Error("not in a brace expression");let n=[],r=[],s=t+1,o=!1,a=!1,l=!1,c=!1,f=t,h="";e:for(;s<i.length;){let g=i.charAt(s);if((g==="!"||g==="^")&&s===t+1){c=!0,s++;continue}if(g==="]"&&o&&!l){f=s+1;break}if(o=!0,g==="\\"&&!l){l=!0,s++;continue}if(g==="["&&!l){for(let[k,[w,S,P]]of Object.entries(_p))if(i.startsWith(k,s)){if(h)return["$.",!1,i.length-t,!0];s+=k.length,P?r.push(w):n.push(w),a=a||S;continue e}}if(l=!1,h){g>h?n.push(_n(h)+"-"+_n(g)):g===h&&n.push(_n(g)),h="",s++;continue}if(i.startsWith("-]",s+1)){n.push(_n(g+"-")),s+=2;continue}if(i.startsWith("-",s+1)){h=g,s+=2;continue}n.push(_n(g)),s++}if(f<s)return["",!1,0,!1];if(!n.length&&!r.length)return["$.",!1,i.length-t,!0];if(r.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!c){let g=n[0].length===2?n[0].slice(-1):n[0];return[yp(g),!1,f-t,!1]}let p="["+(c?"^":"")+gc(n)+"]",m="["+(c?"":"^")+gc(r)+"]";return[n.length&&r.length?"("+p+"|"+m+")":n.length?p:m,a,f-t,!0]}});var He,Ai=fe(()=>{He=(i,{windowsPathsNoEscape:e=!1,magicalBraces:t=!0}={})=>t?e?i.replace(/\[([^/\\])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?i.replace(/\[([^/\\{}])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1")});var Re,bp,Ys,bc,wp,vp,Sp,wc,xp,Oi,Ep,Cp,kp,Ap,Js,vc,Sc,Op,At,Ks=fe(()=>{yc();Ai();bp=new Set(["!","?","+","*","@"]),Ys=i=>bp.has(i),bc=i=>Ys(i.type),wp=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),vp=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),Sp=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),wc=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),xp="(?!(?:^|/)\\.\\.?(?:$|/))",Oi="(?!\\.)",Ep=new Set(["[","."]),Cp=new Set(["..","."]),kp=new Set("().*{}+?[]^$\\!"),Ap=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Js="[^/]",vc=Js+"*?",Sc=Js+"+?",Op=0,At=class{type;#e;#i;#r=!1;#t=[];#o;#x;#y;#h=!1;#a;#f;#u=!1;id=++Op;get depth(){return(this.#o?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#o?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(e,t,n={}){this.type=e,e&&(this.#i=!0),this.#o=t,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?n:this.#e.#a,this.#y=this.#e===this?[]:this.#e.#y,e==="!"&&!this.#e.#h&&this.#y.push(this),this.#x=this.#o?this.#o.#t.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let e of this.#t)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#f!==void 0?this.#f:this.type?this.#f=this.type+"("+this.#t.map(e=>String(e)).join("|")+")":this.#f=this.#t.map(e=>String(e)).join("")}#c(){if(this!==this.#e)throw new Error("should only call on root");if(this.#h)return this;this.toString(),this.#h=!0;let e;for(;e=this.#y.pop();){if(e.type!=="!")continue;let t=e,n=t.#o;for(;n;){for(let r=t.#x+1;!n.type&&r<n.#t.length;r++)for(let s of e.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#t[r])}t=n,n=t.#o}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof Re&&t.#o===this))throw new Error("invalid part: "+t);this.#t.push(t)}}toJSON(){let e=this.type===null?this.#t.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#t.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#h&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#x===0)return!0;let e=this.#o;for(let t=0;t<this.#x;t++){let n=e.#t[t];if(!(n instanceof Re&&n.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#t.length:0;return this.#x===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new Re(this.type,e);for(let n of this.#t)t.copyIn(n);return t}static#s(e,t,n,r,s){let o=r.maxExtglobRecursion??2,a=!1,l=!1,c=-1,f=!1;if(t.type===null){let g=n,k="";for(;g<e.length;){let w=e.charAt(g++);if(a||w==="\\"){a=!a,k+=w;continue}if(l){g===c+1?(w==="^"||w==="!")&&(f=!0):w==="]"&&!(g===c+2&&f)&&(l=!1),k+=w;continue}else if(w==="["){l=!0,c=g,f=!1,k+=w;continue}if(!r.noext&&Ys(w)&&e.charAt(g)==="("&&s<=o){t.push(k),k="";let P=new Re(w,t);g=Re.#s(e,P,g,r,s+1),t.push(P);continue}k+=w}return t.push(k),g}let h=n+1,p=new Re(null,t),m=[],_="";for(;h<e.length;){let g=e.charAt(h++);if(a||g==="\\"){a=!a,_+=g;continue}if(l){h===c+1?(g==="^"||g==="!")&&(f=!0):g==="]"&&!(h===c+2&&f)&&(l=!1),_+=g;continue}else if(g==="["){l=!0,c=h,f=!1,_+=g;continue}if(!r.noext&&Ys(g)&&e.charAt(h)==="("&&(s<=o||t&&t.#p(g))){let w=t&&t.#p(g)?0:1;p.push(_),_="";let S=new Re(g,p);p.push(S),h=Re.#s(e,S,h,r,s+w);continue}if(g==="|"){p.push(_),_="",m.push(p),p=new Re(null,t);continue}if(g===")")return _===""&&t.#t.length===0&&(t.#u=!0),p.push(_),_="",t.push(...m,p),h;_+=g}return t.type=null,t.#i=void 0,t.#t=[e.substring(n-1)],h}#b(e){return this.#v(e,vp)}#v(e,t=wp){if(!e||typeof e!="object"||e.type!==null||e.#t.length!==1||this.type===null)return!1;let n=e.#t[0];return!n||typeof n!="object"||n.type===null?!1:this.#p(n.type,t)}#p(e,t=Sp){return!!t.get(this.type)?.includes(e)}#m(e,t){let n=e.#t[0],r=new Re(null,n,this.options);r.#t.push(""),n.push(r),this.#k(e,t)}#k(e,t){let n=e.#t[0];this.#t.splice(t,1,...n.#t);for(let r of n.#t)typeof r=="object"&&(r.#o=this);this.#f=void 0}#g(e){return!!wc.get(this.type)?.has(e)}#S(e){if(!e||typeof e!="object"||e.type!==null||e.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let t=e.#t[0];return!t||typeof t!="object"||t.type===null?!1:this.#g(t.type)}#E(e){let t=wc.get(this.type),n=e.#t[0],r=t?.get(n.type);if(!r)return!1;this.#t=n.#t;for(let s of this.#t)typeof s=="object"&&(s.#o=this);this.type=r,this.#f=void 0,this.#u=!1}static fromGlob(e,t={}){let n=new Re(null,void 0,t);return Re.#s(e,n,0,t,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,s]=this.toRegExpSource();if(!(r||this.#i||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#a}toRegExpSource(e){let t=e??!!this.#a.dot;if(this.#e===this&&(this.#d(),this.#c()),!bc(this)){let l=this.isStart()&&this.isEnd()&&!this.#t.some(m=>typeof m!="string"),c=this.#t.map(m=>{let[_,g,k,w]=typeof m=="string"?Re.#w(m,this.#i,l):m.toRegExpSource(e);return this.#i=this.#i||k,this.#r=this.#r||w,_}).join(""),f="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&Cp.has(this.#t[0]))){let _=Ep,g=t&&_.has(c.charAt(0))||c.startsWith("\\.")&&_.has(c.charAt(2))||c.startsWith("\\.\\.")&&_.has(c.charAt(4)),k=!t&&!e&&_.has(c.charAt(0));f=g?xp:k?Oi:""}let h="";return this.isEnd()&&this.#e.#h&&this.#o?.type==="!"&&(h="(?:$|\\/)"),[f+c+h,He(c),this.#i=!!this.#i,this.#r]}let n=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#_(t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString(),c=this;return c.#t=[l],c.type=null,c.#i=void 0,[l,He(this.toString()),!1,!1]}let o=!n||e||t||!Oi?"":this.#_(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#u)a=(this.isStart()&&!t?Oi:"")+Sc;else{let l=this.type==="!"?"))"+(this.isStart()&&!t&&!e?Oi:"")+vc+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=r+s+l}return[a,He(s),this.#i=!!this.#i,this.#r]}#d(){if(bc(this)){let e=0,t=!1;do{t=!0;for(let n=0;n<this.#t.length;n++){let r=this.#t[n];typeof r=="object"&&(r.#d(),this.#v(r)?(t=!1,this.#k(r,n)):this.#b(r)?(t=!1,this.#m(r,n)):this.#S(r)&&(t=!1,this.#E(r)))}}while(!t&&++e<10)}else for(let e of this.#t)typeof e=="object"&&e.#d();this.#f=void 0}#_(e){return this.#t.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[n,r,s,o]=t.toRegExpSource(e);return this.#r=this.#r||o,n}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#w(e,t,n=!1){let r=!1,s="",o=!1,a=!1;for(let l=0;l<e.length;l++){let c=e.charAt(l);if(r){r=!1,s+=(kp.has(c)?"\\":"")+c;continue}if(c==="*"){if(a)continue;a=!0,s+=n&&/^[*]+$/.test(e)?Sc:vc,t=!0;continue}else a=!1;if(c==="\\"){l===e.length-1?s+="\\\\":r=!0;continue}if(c==="["){let[f,h,p,m]=_c(e,l);if(p){s+=f,o=o||h,l+=p-1,t=t||m;continue}}if(c==="?"){s+=Js,t=!0;continue}s+=Ap(c)}return[s,He(e),!!t,o]}};Re=At});var Ot,Qs=fe(()=>{Ot=(i,{windowsPathsNoEscape:e=!1,magicalBraces:t=!1}={})=>t?e?i.replace(/[?*()[\]{}]/g,"[$&]"):i.replace(/[?*()[\]\\{}]/g,"\\$&"):e?i.replace(/[?*()[\]]/g,"[$&]"):i.replace(/[?*()[\]\\]/g,"\\$&")});var ke,Pp,Rp,Ip,Lp,Dp,Tp,Np,Mp,Fp,Bp,qp,Hp,Wp,jp,Vp,Up,Gp,zp,Cc,kc,Ac,xc,$p,oe,Yp,Jp,Kp,Qp,Xp,We,Zp,Oc,em,tm,Ec,nm,Te,wt=fe(()=>{pc();mc();Ks();Qs();Ai();Ks();Qs();Ai();ke=(i,e,t={})=>(gn(e),!t.nocomment&&e.charAt(0)==="#"?!1:new Te(e,t).match(i)),Pp=/^\*+([^+@!?*[(]*)$/,Rp=i=>e=>!e.startsWith(".")&&e.endsWith(i),Ip=i=>e=>e.endsWith(i),Lp=i=>(i=i.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(i)),Dp=i=>(i=i.toLowerCase(),e=>e.toLowerCase().endsWith(i)),Tp=/^\*+\.\*+$/,Np=i=>!i.startsWith(".")&&i.includes("."),Mp=i=>i!=="."&&i!==".."&&i.includes("."),Fp=/^\.\*+$/,Bp=i=>i!=="."&&i!==".."&&i.startsWith("."),qp=/^\*+$/,Hp=i=>i.length!==0&&!i.startsWith("."),Wp=i=>i.length!==0&&i!=="."&&i!=="..",jp=/^\?+([^+@!?*[(]*)?$/,Vp=([i,e=""])=>{let t=Cc([i]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},Up=([i,e=""])=>{let t=kc([i]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},Gp=([i,e=""])=>{let t=kc([i]);return e?n=>t(n)&&n.endsWith(e):t},zp=([i,e=""])=>{let t=Cc([i]);return e?n=>t(n)&&n.endsWith(e):t},Cc=([i])=>{let e=i.length;return t=>t.length===e&&!t.startsWith(".")},kc=([i])=>{let e=i.length;return t=>t.length===e&&t!=="."&&t!==".."},Ac=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",xc={win32:{sep:"\\"},posix:{sep:"/"}},$p=Ac==="win32"?xc.win32.sep:xc.posix.sep;ke.sep=$p;oe=Symbol("globstar **");ke.GLOBSTAR=oe;Yp="[^/]",Jp=Yp+"*?",Kp="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Qp="(?:(?!(?:\\/|^)\\.).)*?",Xp=(i,e={})=>t=>ke(t,i,e);ke.filter=Xp;We=(i,e={})=>Object.assign({},i,e),Zp=i=>{if(!i||typeof i!="object"||!Object.keys(i).length)return ke;let e=ke;return Object.assign((n,r,s={})=>e(n,r,We(i,s)),{Minimatch:class extends e.Minimatch{constructor(r,s={}){super(r,We(i,s))}static defaults(r){return e.defaults(We(i,r)).Minimatch}},AST:class extends e.AST{constructor(r,s,o={}){super(r,s,We(i,o))}static fromGlob(r,s={}){return e.AST.fromGlob(r,We(i,s))}},unescape:(n,r={})=>e.unescape(n,We(i,r)),escape:(n,r={})=>e.escape(n,We(i,r)),filter:(n,r={})=>e.filter(n,We(i,r)),defaults:n=>e.defaults(We(i,n)),makeRe:(n,r={})=>e.makeRe(n,We(i,r)),braceExpand:(n,r={})=>e.braceExpand(n,We(i,r)),match:(n,r,s={})=>e.match(n,r,We(i,s)),sep:e.sep,GLOBSTAR:oe})};ke.defaults=Zp;Oc=(i,e={})=>(gn(i),e.nobrace||!/\{(?:(?!\{).)*\}/.test(i)?[i]:dc(i,{max:e.braceExpandMax}));ke.braceExpand=Oc;em=(i,e={})=>new Te(i,e).makeRe();ke.makeRe=em;tm=(i,e,t={})=>{let n=new Te(e,t);return i=i.filter(r=>n.match(r)),n.options.nonull&&!i.length&&i.push(e),i};ke.match=tm;Ec=/[?*]|[+@!]\(.*?\)|\[|\]/,nm=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Te=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){gn(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||Ac,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((s,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!Ec.test(s[2]))&&!Ec.test(s[3]),c=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(f=>this.parse(f))];if(c)return[s[0],...s.slice(1).map(f=>this.parse(f))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,r),this.set=r.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n of e)for(let r=0;r<n.length;r++)n[r]==="**"&&(n[r]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let n=-1;for(;(n=t.indexOf("**",n+1))!==-1;){let r=n;for(;t[r+1]==="**";)r++;r!==n&&t.splice(n,r-n)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((n,r)=>{let s=n[n.length-1];return r==="**"&&s==="**"?n:r===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(r),n)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let r=1;r<e.length-1;r++){let s=e[r];r===1&&s===""&&e[0]===""||(s==="."||s==="")&&(t=!0,e.splice(r,1),r--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let r=e[n-1];r&&r!=="."&&r!==".."&&r!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(r))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let o=r;for(;n[o+1]==="**";)o++;o>r&&n.splice(r+1,o-r);let a=n[r+1],l=n[r+2],c=n[r+3];if(a!==".."||!l||l==="."||l===".."||!c||c==="."||c==="..")continue;t=!0,n.splice(r,1);let f=n.slice(0);f[r]="**",e.push(f),r--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){let a=n[o];o===1&&a===""&&n[0]===""||(a==="."||a==="")&&(t=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(t=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){let o=n[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let l=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...l),n.length===0&&n.push(""),s-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(t=>t.length)}partsMatch(e,t,n=!1){let r=0,s=0,o=[],a="";for(;r<e.length&&s<t.length;)if(e[r]===t[s])o.push(a==="b"?t[s]:e[r]),r++,s++;else if(n&&e[r]==="**"&&t[s]===e[r+1])o.push(e[r]),r++;else if(n&&t[s]==="**"&&e[r]===t[s+1])o.push(t[s]),s++;else if(e[r]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(a==="b")return!1;a="a",o.push(e[r]),r++,s++}else if(t[s]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(a==="a")return!1;a="b",o.push(t[s]),r++,s++}else return!1;return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)==="!";r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let r=0,s=0;if(this.isWindows){let a=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),l=!a&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),f=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),h=l?3:a?0:void 0,p=f?3:c?0:void 0;if(typeof h=="number"&&typeof p=="number"){let[m,_]=[e[h],t[p]];m.toLowerCase()===_.toLowerCase()&&(t[p]=m,s=p,r=h)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(oe)?this.#e(e,t,n,r,s):this.#r(e,t,n,r,s)}#e(e,t,n,r,s){let o=t.indexOf(oe,s),a=t.lastIndexOf(oe),[l,c,f]=n?[t.slice(s,o),t.slice(o+1),[]]:[t.slice(s,o),t.slice(o+1,a),t.slice(a+1)];if(l.length){let S=e.slice(r,r+l.length);if(!this.#r(S,l,n,0,0))return!1;r+=l.length,s+=l.length}let h=0;if(f.length){if(f.length+r>e.length)return!1;let S=e.length-f.length;if(this.#r(e,f,n,S,0))h=f.length;else{if(e[e.length-1]!==""||r+f.length===e.length||(S--,!this.#r(e,f,n,S,0)))return!1;h=f.length+1}}if(!c.length){let S=!!h;for(let P=r;P<e.length-h;P++){let D=String(e[P]);if(S=!0,D==="."||D===".."||!this.options.dot&&D.startsWith("."))return!1}return n||S}let p=[[[],0]],m=p[0],_=0,g=[0];for(let S of c)S===oe?(g.push(_),m=[[],0],p.push(m)):(m[0].push(S),_++);let k=p.length-1,w=e.length-h;for(let S of p)S[1]=w-(g[k--]+S[0].length);return!!this.#i(e,p,r,0,n,0,!!h)}#i(e,t,n,r,s,o,a){let l=t[r];if(!l){for(let h=n;h<e.length;h++){a=!0;let p=e[h];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return a}let[c,f]=l;for(;n<=f;){if(this.#r(e.slice(0,n+c.length),c,s,n,0)&&o<this.maxGlobstarRecursion){let m=this.#i(e,t,n+c.length,r+1,s,o+1,a);if(m!==!1)return m}let p=e[n];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;n++}return s||null}#r(e,t,n,r,s){let o,a,l,c;for(o=r,a=s,c=e.length,l=t.length;o<c&&a<l;o++,a++){this.debug("matchOne loop");let f=t[a],h=e[o];if(this.debug(t,f,h),f===!1||f===oe)return!1;let p;if(typeof f=="string"?(p=h===f,this.debug("string match",f,h,p)):(p=f.test(h),this.debug("pattern match",f,h,p)),!p)return!1}if(o===c&&a===l)return!0;if(o===c)return n;if(a===l)return o===c-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return Oc(this.pattern,this.options)}parse(e){gn(e);let t=this.options;if(e==="**")return oe;if(e==="")return"";let n,r=null;(n=e.match(qp))?r=t.dot?Wp:Hp:(n=e.match(Pp))?r=(t.nocase?t.dot?Dp:Lp:t.dot?Ip:Rp)(n[1]):(n=e.match(jp))?r=(t.nocase?t.dot?Up:Vp:t.dot?Gp:zp)(n):(n=e.match(Tp))?r=t.dot?Mp:Np:(n=e.match(Fp))&&(r=Bp);let s=At.fromGlob(e,this.options).toMMPattern();return r&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:r}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?Jp:t.dot?Kp:Qp,r=new Set(t.nocase?["i"]:[]),s=e.map(l=>{let c=l.map(h=>{if(h instanceof RegExp)for(let p of h.flags.split(""))r.add(p);return typeof h=="string"?nm(h):h===oe?oe:h._src});c.forEach((h,p)=>{let m=c[p+1],_=c[p-1];h!==oe||_===oe||(_===void 0?m!==void 0&&m!==oe?c[p+1]="(?:\\/|"+n+"\\/)?"+m:c[p]=n:m===void 0?c[p-1]=_+"(?:\\/|\\/"+n+")?":m!==oe&&(c[p-1]=_+"(?:\\/|\\/"+n+"\\/)"+m,c[p+1]=oe))});let f=c.filter(h=>h!==oe);if(this.partial&&f.length>=1){let h=[];for(let p=1;p<=f.length;p++)h.push(f.slice(0,p).join("/"));return"(?:"+h.join("|")+")"}return f.join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+a+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let r=this.slashSplit(e);this.debug(this.pattern,"split",r);let s=this.set;this.debug(this.pattern,"set",s);let o=r[r.length-1];if(!o)for(let a=r.length-2;!o&&a>=0;a--)o=r[a];for(let a of s){let l=r;if(n.matchBase&&a.length===1&&(l=[o]),this.matchOne(l,a,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return ke.defaults(e).Minimatch}};ke.AST=At;ke.Minimatch=Te;ke.escape=Ot;ke.unescape=He});import{tracingChannel as im,channel as rm}from"node:diagnostics_channel";var ye,yn,sm,Xs,Rc,Pc,om,am,vt,Ic,Pi,lm,wn,Dc=fe(()=>{ye=rm("lru-cache:metrics"),yn=im("lru-cache"),sm=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Xs=()=>ye.hasSubscribers||yn.hasSubscribers,Rc=new Set,Pc=typeof process=="object"&&process?process:{},om=(i,e,t,n)=>{typeof Pc.emitWarning=="function"?Pc.emitWarning(i,e,t,n):console.error(`[${t}] ${e}: ${i}`)},am=i=>!Rc.has(i),vt=i=>!!i&&i===Math.floor(i)&&i>0&&isFinite(i),Ic=i=>vt(i)?i<=Math.pow(2,8)?Uint8Array:i<=Math.pow(2,16)?Uint16Array:i<=Math.pow(2,32)?Uint32Array:i<=Number.MAX_SAFE_INTEGER?Pi:null:null,Pi=class extends Array{constructor(i){super(i),this.fill(0)}},lm=class bn{heap;length;static#e=!1;static create(e){let t=Ic(e);if(!t)return[];bn.#e=!0;let n=new bn(e,t);return bn.#e=!1,n}constructor(e,t){if(!bn.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},wn=class Lc{#e;#i;#r;#t;#o;#x;#y;#h;get perf(){return this.#h}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#a;#f;#u;#c;#s;#b;#v;#p;#m;#k;#g;#S;#E;#d;#_;#w;#O;#n;#I;static unsafeExposeInternals(e){return{starts:e.#E,ttls:e.#d,autopurgeTimers:e.#_,sizes:e.#S,keyMap:e.#u,keyList:e.#c,valList:e.#s,next:e.#b,prev:e.#v,get head(){return e.#p},get tail(){return e.#m},free:e.#k,isBackgroundFetch:t=>e.#l(t),backgroundFetch:(t,n,r,s)=>e.#F(t,n,r,s),moveToTail:t=>e.#Y(t),indexes:t=>e.#P(t),rindexes:t=>e.#R(t),isStale:t=>e.#C(t)}}get max(){return this.#e}get maxSize(){return this.#i}get calculatedSize(){return this.#f}get size(){return this.#a}get fetchMethod(){return this.#x}get memoMethod(){return this.#y}get dispose(){return this.#r}get onInsert(){return this.#t}get disposeAfter(){return this.#o}constructor(e){let{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:c,onInsert:f,disposeAfter:h,noDisposeOnSet:p,noUpdateTTL:m,maxSize:_=0,maxEntrySize:g=0,sizeCalculation:k,fetchMethod:w,memoMethod:S,noDeleteOnFetchRejection:P,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:B,allowStaleOnFetchAbort:U,ignoreFetchAbort:J,backgroundFetchSize:he=1,perf:le}=e;if(this.backgroundFetchSize=he,le!==void 0&&typeof le?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#h=le??sm,t!==0&&!vt(t))throw new TypeError("max option must be a nonnegative integer");let se=t?Ic(t):Array;if(!se)throw new Error("invalid max value: "+t);if(this.#e=t,this.#i=_,this.maxEntrySize=g||this.#i,this.sizeCalculation=k,this.sizeCalculation){if(!this.#i&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#y=S,w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#x=w,this.#O=!!w,this.#u=new Map,this.#c=Array.from({length:t}).fill(void 0),this.#s=Array.from({length:t}).fill(void 0),this.#b=new se(t),this.#v=new se(t),this.#p=0,this.#m=0,this.#k=lm.create(t),this.#a=0,this.#f=0,typeof c=="function"&&(this.#r=c),typeof f=="function"&&(this.#t=f),typeof h=="function"?(this.#o=h,this.#g=[]):(this.#o=void 0,this.#g=void 0),this.#w=!!this.#r,this.#I=!!this.#t,this.#n=!!this.#o,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!P,this.allowStaleOnFetchRejection=!!B,this.allowStaleOnFetchAbort=!!U,this.ignoreFetchAbort=!!J,this.maxEntrySize!==0){if(this.#i!==0&&!vt(this.#i))throw new TypeError("maxSize must be a positive integer if specified");if(!vt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#U()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=vt(r)||r===0?r:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!vt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(this.#e===0&&this.ttl===0&&this.#i===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#i){let G="LRU_CACHE_UNBOUNDED";am(G)&&(Rc.add(G),om("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",G,Lc))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#L(){let e=new Pi(this.#e),t=new Pi(this.#e);this.#d=e,this.#E=t;let n=this.ttlAutopurge?Array.from({length:this.#e}):void 0;this.#_=n,this.#q=(a,l,c=this.#h.now())=>{t[a]=l!==0?c:0,e[a]=l,r(a,l)},this.#A=a=>{t[a]=e[a]!==0?this.#h.now():0,r(a,e[a])};let r=this.ttlAutopurge?(a,l)=>{if(n?.[a]&&(clearTimeout(n[a]),n[a]=void 0),l&&l!==0&&n){let c=setTimeout(()=>{this.#C(a)&&this.#B(this.#c[a],"expire")},l+1);c.unref&&c.unref(),n[a]=c}}:()=>{};this.#D=(a,l)=>{if(e[l]){let c=e[l],f=t[l];if(!c||!f)return;a.ttl=c,a.start=f,a.now=s||o();let h=a.now-f;a.remainingTTL=c-h}};let s=0,o=()=>{let a=this.#h.now();if(this.ttlResolution>0){s=a;let l=setTimeout(()=>s=0,this.ttlResolution);l.unref&&l.unref()}return a};this.getRemainingTTL=a=>{let l=this.#u.get(a);if(l===void 0)return 0;let c=e[l],f=t[l];if(!c||!f)return 1/0;let h=(s||o())-f;return c-h},this.#C=a=>{let l=t[a],c=e[a];return!!c&&!!l&&(s||o())-l>c}}#A=()=>{};#D=()=>{};#q=()=>{};#C=()=>!1;#U(){let e=new Pi(this.#e);this.#f=0,this.#S=e,this.#N=t=>{this.#f-=e[t],e[t]=0},this.#H=(t,n,r,s)=>{if(!vt(r)){if(this.#l(n))return this.backgroundFetchSize;if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(r=s(n,t),!vt(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return r},this.#T=(t,n,r)=>{if(e[t]=n,this.#i){let s=this.#i-e[t];for(;this.#f>s;)this.#V(!0)}this.#f+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#f)}}#N=e=>{};#T=(e,t,n)=>{};#H=(e,t,n,r)=>{if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#P({allowStale:e=this.allowStale}={}){if(this.#a)for(let t=this.#m;this.#W(t)&&((e||!this.#C(t))&&(yield t),t!==this.#p);)t=this.#v[t]}*#R({allowStale:e=this.allowStale}={}){if(this.#a)for(let t=this.#p;this.#W(t)&&((e||!this.#C(t))&&(yield t),t!==this.#m);)t=this.#b[t]}#W(e){return e!==void 0&&this.#u.get(this.#c[e])===e}*entries(){for(let e of this.#P())this.#s[e]!==void 0&&this.#c[e]!==void 0&&!this.#l(this.#s[e])&&(yield[this.#c[e],this.#s[e]])}*rentries(){for(let e of this.#R())this.#s[e]!==void 0&&this.#c[e]!==void 0&&!this.#l(this.#s[e])&&(yield[this.#c[e],this.#s[e]])}*keys(){for(let e of this.#P()){let t=this.#c[e];t!==void 0&&!this.#l(this.#s[e])&&(yield t)}}*rkeys(){for(let e of this.#R()){let t=this.#c[e];t!==void 0&&!this.#l(this.#s[e])&&(yield t)}}*values(){for(let e of this.#P())this.#s[e]!==void 0&&!this.#l(this.#s[e])&&(yield this.#s[e])}*rvalues(){for(let e of this.#R())this.#s[e]!==void 0&&!this.#l(this.#s[e])&&(yield this.#s[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let n of this.#P()){let r=this.#s[n],s=this.#l(r)?r.__staleWhileFetching:r;if(s!==void 0&&e(s,this.#c[n],this))return this.#$(this.#c[n],t)}}forEach(e,t=this){for(let n of this.#P()){let r=this.#s[n],s=this.#l(r)?r.__staleWhileFetching:r;s!==void 0&&e.call(t,s,this.#c[n],this)}}rforEach(e,t=this){for(let n of this.#R()){let r=this.#s[n],s=this.#l(r)?r.__staleWhileFetching:r;s!==void 0&&e.call(t,s,this.#c[n],this)}}purgeStale(){let e=!1;for(let t of this.#R({allowStale:!0}))this.#C(t)&&(this.#B(this.#c[t],"expire"),e=!0);return e}info(e){let t=this.#u.get(e);if(t===void 0)return;let n=this.#s[t],r=this.#l(n)?n.__staleWhileFetching:n;if(r===void 0)return;let s={value:r};if(this.#d&&this.#E){let o=this.#d[t],a=this.#E[t];if(o&&a){let l=o-(this.#h.now()-a);s.ttl=l,s.start=Date.now()}}return this.#S&&(s.size=this.#S[t]),s}dump(){let e=[];for(let t of this.#P({allowStale:!0})){let n=this.#c[t],r=this.#s[t],s=this.#l(r)?r.__staleWhileFetching:r;if(s===void 0||n===void 0)continue;let o={value:s};if(this.#d&&this.#E){o.ttl=this.#d[t];let a=this.#h.now()-this.#E[t];o.start=Math.floor(Date.now()-a)}this.#S&&(o.size=this.#S[t]),e.unshift([n,o])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let r=Date.now()-n.start;n.start=this.#h.now()-r}this.#M(t,n.value,n)}}set(e,t,n={}){let{status:r=ye.hasSubscribers?{}:void 0}=n;n.status=r,r&&(r.op="set",r.key=e,t!==void 0&&(r.value=t),r.cache=this);let s=this.#M(e,t,n);return r&&ye.hasSubscribers&&ye.publish(r),s}#M(e,t,n,r){let{ttl:s=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:c}=n,f=this.#l(t);if(t===void 0)return c&&(c.set="deleted"),this.delete(e),this;let{noUpdateTTL:h=this.noUpdateTTL}=n;c&&!f&&(c.value=t);let p=this.#H(e,t,n.size||0,l,c);if(this.maxEntrySize&&p>this.maxEntrySize)return this.#B(e,"set"),c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this;let m=this.#a===0?void 0:this.#u.get(e);if(m===void 0)m=this.#a===0?this.#m:this.#k.length!==0?this.#k.pop():this.#a===this.#e?this.#V(!1):this.#a,this.#c[m]=e,this.#s[m]=t,this.#u.set(e,m),this.#b[this.#m]=m,this.#v[m]=this.#m,this.#m=m,this.#a++,this.#T(m,p,c),c&&(c.set="add"),h=!1,this.#I&&!f&&this.#t?.(t,e,"add");else{this.#Y(m);let _=this.#s[m];if(t!==_){if(!a)if(this.#l(_)){_!==r&&_.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:g}=_;g!==void 0&&g!==t&&(this.#w&&this.#r?.(g,e,"set"),this.#n&&this.#g?.push([g,e,"set"]))}else this.#w&&this.#r?.(_,e,"set"),this.#n&&this.#g?.push([_,e,"set"]);if(this.#N(m),this.#T(m,p,c),this.#s[m]=t,!f){let g=_&&this.#l(_)?_.__staleWhileFetching:_,k=g===void 0?"add":t!==g?"replace":"update";c&&(c.set=k,g!==void 0&&(c.oldValue=g)),this.#I&&this.onInsert?.(t,e,k)}}else f||(c&&(c.set="update"),this.#I&&this.onInsert?.(t,e,"update"))}if(s!==0&&!this.#d&&this.#L(),this.#d&&(h||this.#q(m,s,o),c&&this.#D(c,m)),!a&&this.#n&&this.#g){let _=this.#g,g;for(;g=_?.shift();)this.#o?.(...g)}return this}pop(){try{for(;this.#a;){let e=this.#s[this.#p];if(this.#V(!0),this.#l(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#n&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#o?.(...t)}}}#V(e){let t=this.#p,n=this.#c[t],r=this.#s[t],s=this.#l(r);s&&r.__abortController.abort(new Error("evicted"));let o=s?r.__staleWhileFetching:r;return(this.#w||this.#n)&&o!==void 0&&(this.#w&&this.#r?.(o,n,"evict"),this.#n&&this.#g?.push([o,n,"evict"])),this.#N(t),this.#_?.[t]&&(clearTimeout(this.#_[t]),this.#_[t]=void 0),e&&(this.#c[t]=void 0,this.#s[t]=void 0,this.#k.push(t)),this.#a===1?(this.#p=this.#m=0,this.#k.length=0):this.#p=this.#b[t],this.#u.delete(n),this.#a--,t}has(e,t={}){let{status:n=ye.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="has",n.key=e,n.cache=this);let r=this.#J(e,t);return ye.hasSubscribers&&ye.publish(n),r}#J(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,s=this.#u.get(e);if(s!==void 0){let o=this.#s[s];if(this.#l(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#C(s))r&&(r.has="stale",this.#D(r,s));else return n&&this.#A(s),r&&(r.has="hit",this.#D(r,s)),!0}else r&&(r.has="miss");return!1}peek(e,t={}){let{status:n=Xs()?{}:void 0}=t;n&&(n.op="peek",n.key=e,n.cache=this),t.status=n;let r=this.#G(e,t);return ye.hasSubscribers&&ye.publish(n),r}#G(e,t){let{status:n,allowStale:r=this.allowStale}=t,s=this.#u.get(e);if(s===void 0||!r&&this.#C(s)){n&&(n.peek=s===void 0?"miss":"stale");return}let o=this.#s[s],a=this.#l(o)?o.__staleWhileFetching:o;return n&&(a!==void 0?(n.peek="hit",n.value=a):n.peek="miss"),a}#F(e,t,n,r){let s=t===void 0?void 0:this.#s[t];if(this.#l(s))return s;let o=new AbortController,{signal:a}=n;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:n,context:r},c=(g,k=!1)=>{let{aborted:w}=o.signal,S=n.ignoreFetchAbort&&g!==void 0,P=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&g!==void 0);if(n.status&&(w&&!k?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,S&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),w&&!S&&!k)return h(o.signal.reason,P);let D=m,B=this.#s[t];return(B===m||B===void 0&&S&&k)&&(g===void 0?D.__staleWhileFetching!==void 0?this.#s[t]=D.__staleWhileFetching:this.#B(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#M(e,g,l.options,D))),g},f=g=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=g),h(g,!1)),h=(g,k)=>{let{aborted:w}=o.signal,S=w&&n.allowStaleOnFetchAbort,P=S||n.allowStaleOnFetchRejection,D=P||n.noDeleteOnFetchRejection,B=m;if(this.#s[t]===m&&(!D||!k&&B.__staleWhileFetching===void 0?this.#B(e,"fetch"):S||(this.#s[t]=B.__staleWhileFetching)),P)return n.status&&B.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),B.__staleWhileFetching;if(B.__returned===B)throw g},p=(g,k)=>{let w=this.#x?.(e,s,l);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(g(void 0),n.allowStaleOnFetchAbort&&(g=S=>c(S,!0)))}),w&&w instanceof Promise?w.then(S=>g(S===void 0?void 0:S),k):w!==void 0&&g(w)};n.status&&(n.status.fetchDispatched=!0);let m=new Promise(p).then(c,f),_=Object.assign(m,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return t===void 0?(this.#M(e,_,{...l.options,status:void 0}),t=this.#u.get(e)):this.#s[t]=_,_}#l(e){if(!this.#O)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let n=yn.hasSubscribers,{status:r=Xs()?{}:void 0}=t;t.status=r,r&&t.context&&(r.context=t.context);let s=this.#z(e,t);return r&&n&&(r.trace=!0,yn.tracePromise(()=>s,r).catch(()=>{})),s}async#z(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:g,forceRefresh:k=!1,status:w,signal:S}=t;if(w&&(w.op="fetch",w.key=e,k&&(w.forceRefresh=!0),w.cache=this),!this.#O)return w&&(w.fetch="get"),this.#$(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,status:w});let P={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:c,noUpdateTTL:f,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:_,ignoreFetchAbort:m,status:w,signal:S},D=this.#u.get(e);if(D===void 0){w&&(w.fetch="miss");let B=this.#F(e,D,P,g);return B.__returned=B}else{let B=this.#s[D];if(this.#l(B)){let le=n&&B.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",le&&(w.returnedStale=!0)),le?B.__staleWhileFetching:B.__returned=B}let U=this.#C(D);if(!k&&!U)return w&&(w.fetch="hit"),this.#Y(D),r&&this.#A(D),w&&this.#D(w,D),B;let J=this.#F(e,D,P,g),he=J.__staleWhileFetching!==void 0&&n;return w&&(w.fetch=U?"stale":"refresh",he&&U&&(w.returnedStale=!0)),he?J.__staleWhileFetching:J.__returned=J}}forceFetch(e,t={}){let n=yn.hasSubscribers,{status:r=Xs()?{}:void 0}=t;t.status=r,r&&t.context&&(r.context=t.context);let s=this.#j(e,t);return r&&n&&(r.trace=!0,yn.tracePromise(()=>s,r).catch(()=>{})),s}async#j(e,t={}){let n=await this.#z(e,t);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,t={}){let{status:n=ye.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="memo",n.key=e,t.context&&(n.context=t.context),n.cache=this);let r=this.#X(e,t);return n&&(n.value=r),ye.hasSubscribers&&ye.publish(n),r}#X(e,t={}){let n=this.#y;if(!n)throw new Error("no memoMethod provided to constructor");let{context:r,status:s,forceRefresh:o,...a}=t;s&&o&&(s.forceRefresh=!0);let l=this.#$(e,a),c=o||l===void 0;if(s&&(s.memo=c?"miss":"hit",c||(s.value=l)),!c)return l;let f=n(e,l,{options:a,context:r});return s&&(s.value=f),this.#M(e,f,a),f}get(e,t={}){let{status:n=ye.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="get",n.key=e,n.cache=this);let r=this.#$(e,t);return n&&(r!==void 0&&(n.value=r),ye.hasSubscribers&&ye.publish(n)),r}#$(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=t,a=this.#u.get(e);if(a===void 0){o&&(o.get="miss");return}let l=this.#s[a],c=this.#l(l);return o&&this.#D(o,a),this.#C(a)?c?(o&&(o.get="stale-fetching"),n&&l.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),l.__staleWhileFetching):void 0):(s||this.#B(e,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),l):void 0):(o&&(o.get=c?"fetching":"hit"),this.#Y(a),r&&this.#A(a),c?l.__staleWhileFetching:l)}#K(e,t){this.#v[t]=e,this.#b[e]=t}#Y(e){e!==this.#m&&(e===this.#p?this.#p=this.#b[e]:this.#K(this.#v[e],this.#b[e]),this.#K(this.#m,e),this.#m=e)}delete(e){return this.#B(e,"delete")}#B(e,t){ye.hasSubscribers&&ye.publish({op:"delete",delete:t,key:e,cache:this});let n=!1;if(this.#a!==0){let r=this.#u.get(e);if(r!==void 0)if(this.#_?.[r]&&(clearTimeout(this.#_?.[r]),this.#_[r]=void 0),n=!0,this.#a===1)this.#Q(t);else{this.#N(r);let s=this.#s[r];if(this.#l(s)?s.__abortController.abort(new Error("deleted")):(this.#w||this.#n)&&(this.#w&&this.#r?.(s,e,t),this.#n&&this.#g?.push([s,e,t])),this.#u.delete(e),this.#c[r]=void 0,this.#s[r]=void 0,r===this.#m)this.#m=this.#v[r];else if(r===this.#p)this.#p=this.#b[r];else{let o=this.#v[r];this.#b[o]=this.#b[r];let a=this.#b[r];this.#v[a]=this.#v[r]}this.#a--,this.#k.push(r)}}if(this.#n&&this.#g?.length){let r=this.#g,s;for(;s=r?.shift();)this.#o?.(...s)}return n}clear(){return this.#Q("delete")}#Q(e){for(let t of this.#R({allowStale:!0})){let n=this.#s[t];if(this.#l(n))n.__abortController.abort(new Error("deleted"));else{let r=this.#c[t];this.#w&&this.#r?.(n,r,e),this.#n&&this.#g?.push([n,r,e])}}if(this.#u.clear(),this.#s.fill(void 0),this.#c.fill(void 0),this.#d&&this.#E){this.#d.fill(0),this.#E.fill(0);for(let t of this.#_??[])t!==void 0&&clearTimeout(t);this.#_?.fill(void 0)}if(this.#S&&this.#S.fill(0),this.#p=0,this.#m=0,this.#k.length=0,this.#f=0,this.#a=0,this.#n&&this.#g){let t=this.#g,n;for(;n=t?.shift();)this.#o?.(...n)}}}});import{EventEmitter as so}from"node:events";import Bc from"node:stream";import{StringDecoder as cm}from"node:string_decoder";var Tc,um,hm,fm,ut,ht,St,Ri,vn,Ii,Nc,Li,Mc,Je,Vt,de,Sn,Ut,pe,Ae,me,Zs,Di,ve,ae,eo,to,Fc,no,Ze,io,Ti,xn,Pt,Ne,En,dm,pm,mm,gm,Ni,ro,_m,ym,xt,oo=fe(()=>{Tc=typeof process=="object"&&process?process:{stdout:null,stderr:null},um=i=>!!i&&typeof i=="object"&&(i instanceof xt||i instanceof Bc||hm(i)||fm(i)),hm=i=>!!i&&typeof i=="object"&&i instanceof so&&typeof i.pipe=="function"&&i.pipe!==Bc.Writable.prototype.pipe,fm=i=>!!i&&typeof i=="object"&&i instanceof so&&typeof i.write=="function"&&typeof i.end=="function",ut=Symbol("EOF"),ht=Symbol("maybeEmitEnd"),St=Symbol("emittedEnd"),Ri=Symbol("emittingEnd"),vn=Symbol("emittedError"),Ii=Symbol("closed"),Nc=Symbol("read"),Li=Symbol("flush"),Mc=Symbol("flushChunk"),Je=Symbol("encoding"),Vt=Symbol("decoder"),de=Symbol("flowing"),Sn=Symbol("paused"),Ut=Symbol("resume"),pe=Symbol("buffer"),Ae=Symbol("pipes"),me=Symbol("bufferLength"),Zs=Symbol("bufferPush"),Di=Symbol("bufferShift"),ve=Symbol("objectMode"),ae=Symbol("destroyed"),eo=Symbol("error"),to=Symbol("emitData"),Fc=Symbol("emitEnd"),no=Symbol("emitEnd2"),Ze=Symbol("async"),io=Symbol("abort"),Ti=Symbol("aborted"),xn=Symbol("signal"),Pt=Symbol("dataListeners"),Ne=Symbol("discarded"),En=i=>Promise.resolve().then(i),dm=i=>i(),pm=i=>i==="end"||i==="finish"||i==="prefinish",mm=i=>i instanceof ArrayBuffer||!!i&&typeof i=="object"&&i.constructor&&i.constructor.name==="ArrayBuffer"&&i.byteLength>=0,gm=i=>!Buffer.isBuffer(i)&&ArrayBuffer.isView(i),Ni=class{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[Ut](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},ro=class extends Ni{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=r=>this.dest.emit("error",r),e.on("error",this.proxyErrors)}},_m=i=>!!i.objectMode,ym=i=>!i.objectMode&&!!i.encoding&&i.encoding!=="buffer",xt=class extends so{[de]=!1;[Sn]=!1;[Ae]=[];[pe]=[];[ve];[Je];[Ze];[Vt];[ut]=!1;[St]=!1;[Ri]=!1;[Ii]=!1;[vn]=null;[me]=0;[ae]=!1;[xn];[Ti]=!1;[Pt]=0;[Ne]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");_m(t)?(this[ve]=!0,this[Je]=null):ym(t)?(this[Je]=t.encoding,this[ve]=!1):(this[ve]=!1,this[Je]=null),this[Ze]=!!t.async,this[Vt]=this[Je]?new cm(this[Je]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[pe]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Ae]});let{signal:n}=t;n&&(this[xn]=n,n.aborted?this[io]():n.addEventListener("abort",()=>this[io]()))}get bufferLength(){return this[me]}get encoding(){return this[Je]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[ve]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Ze]}set async(e){this[Ze]=this[Ze]||!!e}[io](){this[Ti]=!0,this.emit("abort",this[xn]?.reason),this.destroy(this[xn]?.reason)}get aborted(){return this[Ti]}set aborted(e){}write(e,t,n){if(this[Ti])return!1;if(this[ut])throw new Error("write after end");if(this[ae])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(n=t,t="utf8"),t||(t="utf8");let r=this[Ze]?En:dm;if(!this[ve]&&!Buffer.isBuffer(e)){if(gm(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(mm(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[ve]?(this[de]&&this[me]!==0&&this[Li](!0),this[de]?this.emit("data",e):this[Zs](e),this[me]!==0&&this.emit("readable"),n&&r(n),this[de]):e.length?(typeof e=="string"&&!(t===this[Je]&&!this[Vt]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Je]&&(e=this[Vt].write(e)),this[de]&&this[me]!==0&&this[Li](!0),this[de]?this.emit("data",e):this[Zs](e),this[me]!==0&&this.emit("readable"),n&&r(n),this[de]):(this[me]!==0&&this.emit("readable"),n&&r(n),this[de])}read(e){if(this[ae])return null;if(this[Ne]=!1,this[me]===0||e===0||e&&e>this[me])return this[ht](),null;this[ve]&&(e=null),this[pe].length>1&&!this[ve]&&(this[pe]=[this[Je]?this[pe].join(""):Buffer.concat(this[pe],this[me])]);let t=this[Nc](e||null,this[pe][0]);return this[ht](),t}[Nc](e,t){if(this[ve])this[Di]();else{let n=t;e===n.length||e===null?this[Di]():typeof n=="string"?(this[pe][0]=n.slice(e),t=n.slice(0,e),this[me]-=e):(this[pe][0]=n.subarray(e),t=n.subarray(0,e),this[me]-=e)}return this.emit("data",t),!this[pe].length&&!this[ut]&&this.emit("drain"),t}end(e,t,n){return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t="utf8"),e!==void 0&&this.write(e,t),n&&this.once("end",n),this[ut]=!0,this.writable=!1,(this[de]||!this[Sn])&&this[ht](),this}[Ut](){this[ae]||(!this[Pt]&&!this[Ae].length&&(this[Ne]=!0),this[Sn]=!1,this[de]=!0,this.emit("resume"),this[pe].length?this[Li]():this[ut]?this[ht]():this.emit("drain"))}resume(){return this[Ut]()}pause(){this[de]=!1,this[Sn]=!0,this[Ne]=!1}get destroyed(){return this[ae]}get flowing(){return this[de]}get paused(){return this[Sn]}[Zs](e){this[ve]?this[me]+=1:this[me]+=e.length,this[pe].push(e)}[Di](){return this[ve]?this[me]-=1:this[me]-=this[pe][0].length,this[pe].shift()}[Li](e=!1){do;while(this[Mc](this[Di]())&&this[pe].length);!e&&!this[pe].length&&!this[ut]&&this.emit("drain")}[Mc](e){return this.emit("data",e),this[de]}pipe(e,t){if(this[ae])return e;this[Ne]=!1;let n=this[St];return t=t||{},e===Tc.stdout||e===Tc.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[Ae].push(t.proxyErrors?new ro(this,e,t):new Ni(this,e,t)),this[Ze]?En(()=>this[Ut]()):this[Ut]()),e}unpipe(e){let t=this[Ae].find(n=>n.dest===e);t&&(this[Ae].length===1?(this[de]&&this[Pt]===0&&(this[de]=!1),this[Ae]=[]):this[Ae].splice(this[Ae].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e==="data")this[Ne]=!1,this[Pt]++,!this[Ae].length&&!this[de]&&this[Ut]();else if(e==="readable"&&this[me]!==0)super.emit("readable");else if(pm(e)&&this[St])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[vn]){let r=t;this[Ze]?En(()=>r.call(this,this[vn])):r.call(this,this[vn])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e==="data"&&(this[Pt]=this.listeners("data").length,this[Pt]===0&&!this[Ne]&&!this[Ae].length&&(this[de]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Pt]=0,!this[Ne]&&!this[Ae].length&&(this[de]=!1)),t}get emittedEnd(){return this[St]}[ht](){!this[Ri]&&!this[St]&&!this[ae]&&this[pe].length===0&&this[ut]&&(this[Ri]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ii]&&this.emit("close"),this[Ri]=!1)}emit(e,...t){let n=t[0];if(e!=="error"&&e!=="close"&&e!==ae&&this[ae])return!1;if(e==="data")return!this[ve]&&!n?!1:this[Ze]?(En(()=>this[to](n)),!0):this[to](n);if(e==="end")return this[Fc]();if(e==="close"){if(this[Ii]=!0,!this[St]&&!this[ae])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[vn]=n,super.emit(eo,n);let s=!this[xn]||this.listeners("error").length?super.emit("error",n):!1;return this[ht](),s}else if(e==="resume"){let s=super.emit("resume");return this[ht](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let r=super.emit(e,...t);return this[ht](),r}[to](e){for(let n of this[Ae])n.dest.write(e)===!1&&this.pause();let t=this[Ne]?!1:super.emit("data",e);return this[ht](),t}[Fc](){return this[St]?!1:(this[St]=!0,this.readable=!1,this[Ze]?(En(()=>this[no]()),!0):this[no]())}[no](){if(this[Vt]){let t=this[Vt].end();if(t){for(let n of this[Ae])n.dest.write(t);this[Ne]||super.emit("data",t)}}for(let t of this[Ae])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[ve]||(e.dataLength=0);let t=this.promise();return this.on("data",n=>{e.push(n),this[ve]||(e.dataLength+=n.length)}),await t,e}async concat(){if(this[ve])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Je]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(ae,()=>t(new Error("stream destroyed"))),this.on("error",n=>t(n)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Ne]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[ut])return t();let s,o,a=h=>{this.off("data",l),this.off("end",c),this.off(ae,f),t(),o(h)},l=h=>{this.off("error",a),this.off("end",c),this.off(ae,f),this.pause(),s({value:h,done:!!this[ut]})},c=()=>{this.off("error",a),this.off("data",l),this.off(ae,f),t(),s({done:!0,value:void 0})},f=()=>a(new Error("stream destroyed"));return new Promise((h,p)=>{o=p,s=h,this.once(ae,f),this.once("error",a),this.once("end",c),this.once("data",l)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[Ne]=!1;let e=!1,t=()=>(this.pause(),this.off(eo,t),this.off(ae,t),this.off("end",t),e=!0,{done:!0,value:void 0}),n=()=>{if(e)return t();let r=this.read();return r===null?t():{done:!1,value:r}};return this.once("end",t),this.once(eo,t),this.once(ae,t),{next:n,throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[ae])return e?this.emit("error",e):this.emit(ae),this;this[ae]=!0,this[Ne]=!0,this[pe].length=0,this[me]=0;let t=this;return typeof t.close=="function"&&!this[Ii]&&t.close(),e?this.emit("error",e):this.emit(ae),this}static get isStream(){return um}}});import{posix as bm,win32 as co}from"node:path";import{fileURLToPath as wm}from"node:url";import{lstatSync as vm,readdir as Sm,readdirSync as xm,readlinkSync as Em,realpathSync as Cm}from"fs";import*as km from"node:fs";import{lstat as Om,readdir as Pm,readlink as Rm,realpath as Im}from"node:fs/promises";var Am,kn,Vc,Uc,Lm,Dm,Ve,Gc,zc,et,$c,Yc,Rt,Jc,je,Cn,ao,qc,An,Ke,Mi,Bi,Hc,Tm,lo,Wc,On,jc,Fi,qi,uo,Kc,Se,Hi,Wi,ji,Gt,zt,Pn,b1,Qc,Xc=fe(()=>{Dc();oo();Am=Cm.native,kn={lstatSync:vm,readdir:Sm,readdirSync:xm,readlinkSync:Em,realpathSync:Am,promises:{lstat:Om,readdir:Pm,readlink:Rm,realpath:Im}},Vc=i=>!i||i===kn||i===km?kn:{...kn,...i,promises:{...kn.promises,...i.promises||{}}},Uc=/^\\\\\?\\([a-z]:)\\?$/i,Lm=i=>i.replace(/\//g,"\\").replace(Uc,"$1\\"),Dm=/[\\\/]/,Ve=0,Gc=1,zc=2,et=4,$c=6,Yc=8,Rt=10,Jc=12,je=15,Cn=~je,ao=16,qc=32,An=64,Ke=128,Mi=256,Bi=512,Hc=An|Ke|Bi,Tm=1023,lo=i=>i.isFile()?Yc:i.isDirectory()?et:i.isSymbolicLink()?Rt:i.isCharacterDevice()?zc:i.isBlockDevice()?$c:i.isSocket()?Jc:i.isFIFO()?Gc:Ve,Wc=new wn({max:2**12}),On=i=>{let e=Wc.get(i);if(e)return e;let t=i.normalize("NFKD");return Wc.set(i,t),t},jc=new wn({max:2**12}),Fi=i=>{let e=jc.get(i);if(e)return e;let t=On(i.toLowerCase());return jc.set(i,t),t},qi=class extends wn{constructor(){super({max:256})}},uo=class extends wn{constructor(e=16*1024){super({maxSize:e,sizeCalculation:t=>t.length+1})}},Kc=Symbol("PathScurry setAsCwd"),Se=class{name;root;roots;parent;nocase;isCWD=!1;#e;#i;get dev(){return this.#i}#r;get mode(){return this.#r}#t;get nlink(){return this.#t}#o;get uid(){return this.#o}#x;get gid(){return this.#x}#y;get rdev(){return this.#y}#h;get blksize(){return this.#h}#a;get ino(){return this.#a}#f;get size(){return this.#f}#u;get blocks(){return this.#u}#c;get atimeMs(){return this.#c}#s;get mtimeMs(){return this.#s}#b;get ctimeMs(){return this.#b}#v;get birthtimeMs(){return this.#v}#p;get atime(){return this.#p}#m;get mtime(){return this.#m}#k;get ctime(){return this.#k}#g;get birthtime(){return this.#g}#S;#E;#d;#_;#w;#O;#n;#I;#L;#A;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Ve,n,r,s,o,a){this.name=e,this.#S=s?Fi(e):On(e),this.#n=t&Tm,this.nocase=s,this.roots=r,this.root=n||this,this.#I=o,this.#d=a.fullpath,this.#w=a.relative,this.#O=a.relativePosix,this.parent=a.parent,this.parent?this.#e=this.parent.#e:this.#e=Vc(a.fs)}depth(){return this.#E!==void 0?this.#E:this.parent?this.#E=this.parent.depth()+1:this.#E=0}childrenCache(){return this.#I}resolve(e){if(!e)return this;let t=this.getRootString(e),r=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#D(r):this.#D(r)}#D(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#I.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#I.set(this,t),this.#n&=~ao,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let n=this.children(),r=this.nocase?Fi(e):On(e);for(let l of n)if(l.#S===r)return l;let s=this.parent?this.sep:"",o=this.#d?this.#d+s+e:void 0,a=this.newChild(e,Ve,{...t,parent:this,fullpath:o});return this.canReaddir()||(a.#n|=Ke),n.push(a),a}relative(){if(this.isCWD)return"";if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.name;let n=t.relative();return n+(!n||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#O!==void 0)return this.#O;let e=this.name,t=this.parent;if(!t)return this.#O=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?"":"/")+e}fullpath(){if(this.#d!==void 0)return this.#d;let e=this.name,t=this.parent;if(!t)return this.#d=this.name;let r=t.fullpath()+(t.parent?this.sep:"")+e;return this.#d=r}fullpathPosix(){if(this.#_!==void 0)return this.#_;if(this.sep==="/")return this.#_=this.fullpath();if(!this.parent){let r=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(r)?this.#_=`//?/${r}`:this.#_=r}let e=this.parent,t=e.fullpathPosix(),n=t+(!t||!e.parent?"":"/")+this.name;return this.#_=n}isUnknown(){return(this.#n&je)===Ve}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#n&je)===Yc}isDirectory(){return(this.#n&je)===et}isCharacterDevice(){return(this.#n&je)===zc}isBlockDevice(){return(this.#n&je)===$c}isFIFO(){return(this.#n&je)===Gc}isSocket(){return(this.#n&je)===Jc}isSymbolicLink(){return(this.#n&Rt)===Rt}lstatCached(){return this.#n&qc?this:void 0}readlinkCached(){return this.#L}realpathCached(){return this.#A}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#L)return!0;if(!this.parent)return!1;let e=this.#n&je;return!(e!==Ve&&e!==Rt||this.#n&Mi||this.#n&Ke)}calledReaddir(){return!!(this.#n&ao)}isENOENT(){return!!(this.#n&Ke)}isNamed(e){return this.nocase?this.#S===Fi(e):this.#S===On(e)}async readlink(){let e=this.#L;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=await this.#e.promises.readlink(this.fullpath()),n=(await this.parent.realpath())?.resolve(t);if(n)return this.#L=n}catch(t){this.#R(t.code);return}}readlinkSync(){let e=this.#L;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=this.#e.readlinkSync(this.fullpath()),n=this.parent.realpathSync()?.resolve(t);if(n)return this.#L=n}catch(t){this.#R(t.code);return}}#q(e){this.#n|=ao;for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&n.#C()}}#C(){this.#n&Ke||(this.#n=(this.#n|Ke)&Cn,this.#U())}#U(){let e=this.children();e.provisional=0;for(let t of e)t.#C()}#N(){this.#n|=Bi,this.#T()}#T(){if(this.#n&An)return;let e=this.#n;(e&je)===et&&(e&=Cn),this.#n=e|An,this.#U()}#H(e=""){e==="ENOTDIR"||e==="EPERM"?this.#T():e==="ENOENT"?this.#C():this.children().provisional=0}#P(e=""){e==="ENOTDIR"?this.parent.#T():e==="ENOENT"&&this.#C()}#R(e=""){let t=this.#n;t|=Mi,e==="ENOENT"&&(t|=Ke),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Cn),this.#n=t,e==="ENOTDIR"&&this.parent&&this.parent.#T()}#W(e,t){return this.#V(e,t)||this.#M(e,t)}#M(e,t){let n=lo(e),r=this.newChild(e.name,n,{parent:this}),s=r.#n&je;return s!==et&&s!==Rt&&s!==Ve&&(r.#n|=An),t.unshift(r),t.provisional++,r}#V(e,t){for(let n=t.provisional;n<t.length;n++){let r=t[n];if((this.nocase?Fi(e.name):On(e.name))===r.#S)return this.#J(e,r,n,t)}}#J(e,t,n,r){let s=t.name;return t.#n=t.#n&Cn|lo(e),s!==e.name&&(t.name=e.name),n!==r.provisional&&(n===r.length-1?r.pop():r.splice(n,1),r.unshift(t)),r.provisional++,t}async lstat(){if((this.#n&Ke)===0)try{return this.#G(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#P(e.code)}}lstatSync(){if((this.#n&Ke)===0)try{return this.#G(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#P(e.code)}}#G(e){let{atime:t,atimeMs:n,birthtime:r,birthtimeMs:s,blksize:o,blocks:a,ctime:l,ctimeMs:c,dev:f,gid:h,ino:p,mode:m,mtime:_,mtimeMs:g,nlink:k,rdev:w,size:S,uid:P}=e;this.#p=t,this.#c=n,this.#g=r,this.#v=s,this.#h=o,this.#u=a,this.#k=l,this.#b=c,this.#i=f,this.#x=h,this.#a=p,this.#r=m,this.#m=_,this.#s=g,this.#t=k,this.#y=w,this.#f=S,this.#o=P;let D=lo(e);this.#n=this.#n&Cn|D|qc,D!==Ve&&D!==et&&D!==Rt&&(this.#n|=An)}#F=[];#l=!1;#z(e){this.#l=!1;let t=this.#F.slice();this.#F.length=0,t.forEach(n=>n(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let s=n.slice(0,n.provisional);t?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#F.push(e),this.#l)return;this.#l=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(s,o)=>{if(s)this.#H(s.code),n.provisional=0;else{for(let a of o)this.#W(a,n);this.#q(n)}this.#z(n.slice(0,n.provisional))})}#j;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#j)await this.#j;else{let n=()=>{};this.#j=new Promise(r=>n=r);try{for(let r of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#W(r,e);this.#q(e)}catch(r){this.#H(r.code),e.provisional=0}this.#j=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#e.readdirSync(t,{withFileTypes:!0}))this.#W(n,e);this.#q(e)}catch(n){this.#H(n.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#n&Hc)return!1;let e=je&this.#n;return e===Ve||e===et||e===Rt}shouldWalk(e,t){return(this.#n&et)===et&&!(this.#n&Hc)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#A)return this.#A;if(!((Bi|Mi|Ke)&this.#n))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#A=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#A)return this.#A;if(!((Bi|Mi|Ke)&this.#n))try{let e=this.#e.realpathSync(this.fullpath());return this.#A=this.resolve(e)}catch{this.#N()}}[Kc](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],r=this;for(;r&&r.parent;)t.add(r),r.#w=n.join(this.sep),r.#O=n.join("/"),r=r.parent,n.push("..");for(r=e;r&&r.parent&&!t.has(r);)r.#w=void 0,r.#O=void 0,r=r.parent}},Hi=class i extends Se{sep="\\";splitSep=Dm;constructor(e,t=Ve,n,r,s,o,a){super(e,t,n,r,s,o,a)}newChild(e,t=Ve,n={}){return new i(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return co.parse(e).root}getRoot(e){if(e=Lm(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new Gt(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Uc,"$1\\"),e===t}},Wi=class i extends Se{splitSep="/";sep="/";constructor(e,t=Ve,n,r,s,o,a){super(e,t,n,r,s,o,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Ve,n={}){return new i(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}},ji=class{root;rootPath;roots;cwd;#e;#i;#r;nocase;#t;constructor(e=process.cwd(),t,n,{nocase:r,childrenCacheSize:s=16*1024,fs:o=kn}={}){this.#t=Vc(o),(e instanceof URL||e.startsWith("file://"))&&(e=wm(e));let a=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#e=new qi,this.#i=new qi,this.#r=new uo(s);let l=a.substring(this.rootPath.length).split(n);if(l.length===1&&!l[0]&&l.pop(),r===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=r,this.root=this.newRoot(this.#t),this.roots[this.rootPath]=this.root;let c=this.root,f=l.length-1,h=t.sep,p=this.rootPath,m=!1;for(let _ of l){let g=f--;c=c.child(_,{relative:new Array(g).fill("..").join(h),relativePosix:new Array(g).fill("..").join("/"),fullpath:p+=(m?"":h)+_}),m=!0}this.cwd=c}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#r}resolve(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#e.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpath();return this.#e.set(t,r),r}resolvePosix(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#i.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpathPosix();return this.#i.set(t,r),r}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let r=await e.readdir();return n?r:r.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(r=>r.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=[];(!s||s(e))&&a.push(n?e:e.fullpath());let l=new Set,c=(h,p)=>{l.add(h),h.readdirCB((m,_)=>{if(m)return p(m);let g=_.length;if(!g)return p();let k=()=>{--g===0&&p()};for(let w of _)(!s||s(w))&&a.push(n?w:w.fullpath()),r&&w.isSymbolicLink()?w.realpath().then(S=>S?.isUnknown()?S.lstat():S).then(S=>S?.shouldWalk(l,o)?c(S,k):k()):w.shouldWalk(l,o)?c(w,k):k()},!0)},f=e;return new Promise((h,p)=>{c(f,m=>{if(m)return p(m);h(a)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=[];(!s||s(e))&&a.push(n?e:e.fullpath());let l=new Set([e]);for(let c of l){let f=c.readdirSync();for(let h of f){(!s||s(h))&&a.push(n?h:h.fullpath());let p=h;if(h.isSymbolicLink()){if(!(r&&(p=h.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(l,o)&&l.add(p)}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t;(!s||s(e))&&(yield n?e:e.fullpath());let a=new Set([e]);for(let l of a){let c=l.readdirSync();for(let f of c){(!s||s(f))&&(yield n?f:f.fullpath());let h=f;if(f.isSymbolicLink()){if(!(r&&(h=f.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(a,o)&&a.add(h)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=new xt({objectMode:!0});(!s||s(e))&&a.write(n?e:e.fullpath());let l=new Set,c=[e],f=0,h=()=>{let p=!1;for(;!p;){let m=c.shift();if(!m){f===0&&a.end();return}f++,l.add(m);let _=(k,w,S=!1)=>{if(k)return a.emit("error",k);if(r&&!S){let P=[];for(let D of w)D.isSymbolicLink()&&P.push(D.realpath().then(B=>B?.isUnknown()?B.lstat():B));if(P.length){Promise.all(P).then(()=>_(null,w,!0));return}}for(let P of w)P&&(!s||s(P))&&(a.write(n?P:P.fullpath())||(p=!0));f--;for(let P of w){let D=P.realpathCached()||P;D.shouldWalk(l,o)&&c.push(D)}p&&!a.flowing?a.once("drain",h):g||h()},g=!0;m.readdirCB(_,!0),g=!1}};return h(),a}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Se||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=new xt({objectMode:!0}),l=new Set;(!s||s(e))&&a.write(n?e:e.fullpath());let c=[e],f=0,h=()=>{let p=!1;for(;!p;){let m=c.shift();if(!m){f===0&&a.end();return}f++,l.add(m);let _=m.readdirSync();for(let g of _)(!s||s(g))&&(a.write(n?g:g.fullpath())||(p=!0));f--;for(let g of _){let k=g;if(g.isSymbolicLink()){if(!(r&&(k=g.realpathSync())))continue;k.isUnknown()&&k.lstatSync()}k.shouldWalk(l,o)&&c.push(k)}}p&&!a.flowing&&a.once("drain",h)};return h(),a}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Kc](t)}},Gt=class extends ji{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,co,"\\",{...t,nocase:n}),this.nocase=n;for(let r=this.cwd;r;r=r.parent)r.nocase=this.nocase}parseRootPath(e){return co.parse(e).root.toUpperCase()}newRoot(e){return new Hi(this.rootPath,et,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},zt=class extends ji{sep="/";constructor(e=process.cwd(),t={}){let{nocase:n=!1}=t;super(e,bm,"/",{...t,nocase:n}),this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new Wi(this.rootPath,et,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Pn=class extends zt{constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}},b1=process.platform==="win32"?Hi:Wi,Qc=process.platform==="win32"?Gt:process.platform==="darwin"?Pn:zt});var Nm,Mm,$t,ho=fe(()=>{wt();Nm=i=>i.length>=1,Mm=i=>i.length>=1,$t=class i{#e;#i;#r;length;#t;#o;#x;#y;#h;#a;#f=!0;constructor(e,t,n,r){if(!Nm(e))throw new TypeError("empty pattern list");if(!Mm(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#i=t,this.#r=n,this.#t=r,this.#r===0){if(this.isUNC()){let[s,o,a,l,...c]=this.#e,[f,h,p,m,..._]=this.#i;c[0]===""&&(c.shift(),_.shift());let g=[s,o,a,l,""].join("/"),k=[f,h,p,m,""].join("/");this.#e=[g,...c],this.#i=[k,..._],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...o]=this.#e,[a,...l]=this.#i;o[0]===""&&(o.shift(),l.shift());let c=s+"/",f=a+"/";this.#e=[c,...o],this.#i=[f,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#r]}isString(){return typeof this.#e[this.#r]=="string"}isGlobstar(){return this.#e[this.#r]===oe}isRegExp(){return this.#e[this.#r]instanceof RegExp}globString(){return this.#x=this.#x||(this.#r===0?this.isAbsolute()?this.#i[0]+this.#i.slice(1).join("/"):this.#i.join("/"):this.#i.slice(this.#r).join("/"))}hasMore(){return this.length>this.#r+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new i(this.#e,this.#i,this.#r+1,this.#t),this.#o.#a=this.#a,this.#o.#h=this.#h,this.#o.#y=this.#y,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#t==="win32"&&this.#r===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#y!==void 0?this.#y:this.#y=this.#t==="win32"&&this.#r===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#r===0?e:""}checkFollowGlobstar(){return!(this.#r===0||!this.isGlobstar()||!this.#f)}markFollowGlobstar(){return this.#r===0||!this.isGlobstar()||!this.#f?!1:(this.#f=!1,!0)}}});var Fm,It,fo=fe(()=>{wt();ho();Fm=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",It=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:r,noglobstar:s,platform:o=Fm}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:r,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let a of e)this.add(a)}add(e){let t=new Te(e,this.mmopts);for(let n=0;n<t.set.length;n++){let r=t.set[n],s=t.globParts[n];if(!r||!s)throw new Error("invalid pattern object");for(;r[0]==="."&&s[0]===".";)r.shift(),s.shift();let o=new $t(r,s,0,this.platform),a=new Te(o.globString(),this.mmopts),l=s[s.length-1]==="**",c=o.isAbsolute();c?this.absolute.push(a):this.relative.push(a),l&&(c?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let t=e.fullpath(),n=`${t}/`,r=e.relative()||".",s=`${r}/`;for(let o of this.relative)if(o.match(r)||o.match(s))return!0;for(let o of this.absolute)if(o.match(t)||o.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",n=(e.relative()||".")+"/";for(let r of this.relativeChildren)if(r.match(n))return!0;for(let r of this.absoluteChildren)if(r.match(t))return!0;return!1}}});var po,mo,go,Rn,Zc=fe(()=>{wt();po=class i{store;constructor(e=new Map){this.store=e}copy(){return new i(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),r=this.store.get(n);r?r.add(t.globString()):this.store.set(n,new Set([t.globString()]))}},mo=class{store=new Map;add(e,t,n){let r=(t?2:0)|(n?1:0),s=this.store.get(e);this.store.set(e,s===void 0?r:r&s)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},go=class{store=new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(r=>r.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Rn=class i{hasWalkedCache;matches=new mo;subwalks=new go;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new po}processPatterns(e,t){this.patterns=t;let n=t.map(r=>[e,r]);for(let[r,s]of n){this.hasWalkedCache.storeWalked(r,s);let o=s.root(),a=s.isAbsolute()&&this.opts.absolute!==!1;if(o){r=r.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let h=s.rest();if(h)s=h;else{this.matches.add(r,!0,!1);continue}}if(r.isENOENT())continue;let l,c,f=!1;for(;typeof(l=s.pattern())=="string"&&(c=s.rest());)r=r.resolve(l),s=c,f=!0;if(l=s.pattern(),c=s.rest(),f){if(this.hasWalkedCache.hasWalked(r,s))continue;this.hasWalkedCache.storeWalked(r,s)}if(typeof l=="string"){let h=l===".."||l===""||l===".";this.matches.add(r.resolve(l),a,h);continue}else if(l===oe){(!r.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(r,s);let h=c?.pattern(),p=c?.rest();if(!c||(h===""||h===".")&&!p)this.matches.add(r,a,h===""||h===".");else if(h===".."){let m=r.parent||r;p?this.hasWalkedCache.hasWalked(m,p)||this.subwalks.add(m,p):this.matches.add(m,a,!0)}}else l instanceof RegExp&&this.subwalks.add(r,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new i(this.opts,this.hasWalkedCache)}filterEntries(e,t){let n=this.subwalks.get(e),r=this.child();for(let s of t)for(let o of n){let a=o.isAbsolute(),l=o.pattern(),c=o.rest();l===oe?r.testGlobstar(s,o,c,a):l instanceof RegExp?r.testRegExp(s,l,c,a):r.testString(s,l,c,a)}return r}testGlobstar(e,t,n,r){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let s=n.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,n.rest(),r);else if(s===".."){let o=e.parent||e;this.subwalks.add(o,n)}else s instanceof RegExp&&this.testRegExp(e,s,n.rest(),r)}}testRegExp(e,t,n,r){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}testString(e,t,n,r){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}}});var Bm,Vi,In,Ln,eu=fe(()=>{oo();fo();Zc();Bm=(i,e)=>typeof i=="string"?new It([i],e):Array.isArray(i)?new It(i,e):i,Vi=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#i;#r;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#r=!n.posix&&n.platform==="win32"?"\\":"/",this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#i=Bm(n.ignore??[],n),!this.includeChildMatches&&typeof this.#i.add!="function")){let r="cannot ignore child matches, ignore lacks add() method.";throw new Error(r)}this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#t(e){return this.seen.has(e)||!!this.#i?.ignored?.(e)}#o(e){return!!this.#i?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=await s.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(s,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#t(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=s.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(s,t)}matchFinish(e,t){if(this.#t(e))return;if(!this.includeChildMatches&&this.#i?.add){let s=`${e.relativePosix()}/**`;this.#i.add(s)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#r:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+r)}else{let s=this.opts.posix?e.relativePosix():e.relative(),o=this.opts.dotRelative&&!s.startsWith(".."+this.#r)?"."+this.#r:"";this.matchEmit(s?o+s+r:"."+r)}}async match(e,t,n){let r=await this.matchCheck(e,n);r&&this.matchFinish(r,t)}matchSync(e,t,n){let r=this.matchCheckSync(e,n);r&&this.matchFinish(r,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new Rn(this.opts),n)}walkCB2(e,t,n,r){if(this.#o(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,r));return}n.processPatterns(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,l,c]of n.matches.entries())this.#t(a)||(s++,this.match(a,l,c).then(()=>o()));for(let a of n.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let l=a.readdirCached();a.calledReaddir()?this.walkCB3(a,l,n,o):a.readdirCB((c,f)=>this.walkCB3(a,f,n,o),!0)}o()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,l,c]of n.matches.entries())this.#t(a)||(s++,this.match(a,l,c).then(()=>o()));for(let[a,l]of n.subwalks.entries())s++,this.walkCB2(a,l,n.child(),o);o()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new Rn(this.opts),n)}walkCB2Sync(e,t,n,r){if(this.#o(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,r));return}n.processPatterns(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,l,c]of n.matches.entries())this.#t(a)||this.matchSync(a,l,c);for(let a of n.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let l=a.readdirSync();this.walkCB3Sync(a,l,n,o)}o()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,l,c]of n.matches.entries())this.#t(a)||this.matchSync(a,l,c);for(let[a,l]of n.subwalks.entries())s++,this.walkCB2Sync(a,l,n.child(),o);o()}},In=class extends Vi{matches=new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Ln=class extends Vi{results;constructor(e,t,n){super(e,t,n),this.results=new xt({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}});import{fileURLToPath as qm}from"node:url";var Hm,Ue,_o=fe(()=>{wt();Xc();ho();eu();Hm=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ue=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=qm(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=t.platform||Hm,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=t.platform==="win32"?Gt:t.platform==="darwin"?Pn:t.platform?zt:Qc;this.scurry=new l(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",r={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new Te(l,r)),[o,a]=s.reduce((l,c)=>(l[0].push(...c.set),l[1].push(...c.globParts),l),[[],[]]);this.patterns=o.map((l,c)=>{let f=a[c];if(!f)throw new Error("invalid pattern object");return new $t(l,f,0,this.platform)})}async walk(){return[...await new In(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new In(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Ln(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Ln(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}});var Ui,yo=fe(()=>{wt();Ui=(i,e={})=>{Array.isArray(i)||(i=[i]);for(let t of i)if(new Te(t,e).hasMagic())return!0;return!1}});var au={};vf(au,{Glob:()=>Ue,Ignore:()=>It,escape:()=>Ot,glob:()=>ft,globIterate:()=>vo,globIterateSync:()=>Tn,globStream:()=>bo,globStreamSync:()=>Dn,globSync:()=>wo,hasMagic:()=>Ui,iterate:()=>su,iterateSync:()=>ru,stream:()=>iu,streamSync:()=>nu,sync:()=>ou,unescape:()=>He});function Dn(i,e={}){return new Ue(i,e).streamSync()}function bo(i,e={}){return new Ue(i,e).stream()}function wo(i,e={}){return new Ue(i,e).walkSync()}async function tu(i,e={}){return new Ue(i,e).walk()}function Tn(i,e={}){return new Ue(i,e).iterateSync()}function vo(i,e={}){return new Ue(i,e).iterate()}var nu,iu,ru,su,ou,ft,Nn=fe(()=>{wt();_o();yo();wt();_o();yo();fo();nu=Dn,iu=Object.assign(bo,{sync:Dn}),ru=Tn,su=Object.assign(vo,{sync:Tn}),ou=Object.assign(wo,{stream:Dn,iterate:Tn}),ft=Object.assign(tu,{glob:tu,globSync:wo,sync:ou,globStream:bo,stream:iu,globStreamSync:Dn,streamSync:nu,globIterate:vo,iterate:su,globIterateSync:Tn,iterateSync:ru,Glob:Ue,hasMagic:Ui,escape:Ot,unescape:He});ft.glob=ft});var Oe=W(Me=>{"use strict";Me.__esModule=!0;Me.extend=bu;Me.indexOf=og;Me.escapeExpression=ag;Me.isEmpty=lg;Me.createFrame=cg;Me.blockParams=ug;Me.appendContextPath=hg;var ng={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},ig=/[&<>"'`=]/g,rg=/[&<>"'`=]/;function sg(i){return ng[i]}function bu(i){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&(i[t]=arguments[e][t]);return i}var Oo=Object.prototype.toString;Me.toString=Oo;var Ao=function(e){return typeof e=="function"};Ao(/x/)&&(Me.isFunction=Ao=function(i){return typeof i=="function"&&Oo.call(i)==="[object Function]"});Me.isFunction=Ao;var wu=Array.isArray||function(i){return i&&typeof i=="object"?Oo.call(i)==="[object Array]":!1};Me.isArray=wu;function og(i,e){for(var t=0,n=i.length;t<n;t++)if(i[t]===e)return t;return-1}function ag(i){if(typeof i!="string"){if(i&&i.toHTML)return i.toHTML();if(i==null)return"";if(!i)return i+"";i=""+i}return rg.test(i)?i.replace(ig,sg):i}function lg(i){return!i&&i!==0?!0:!!(wu(i)&&i.length===0)}function cg(i){var e=bu({},i);return e._parent=i,e}function ug(i,e){return i.path=e,i}function hg(i,e){return(i?i+".":"")+e}});var Fe=W((Ki,vu)=>{"use strict";Ki.__esModule=!0;var Po=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Ro(i,e){var t=e&&e.loc,n=void 0,r=void 0,s=void 0,o=void 0;t&&(n=t.start.line,r=t.end.line,s=t.start.column,o=t.end.column,i+=" - "+n+":"+s);for(var a=Error.prototype.constructor.call(this,i),l=0;l<Po.length;l++)this[Po[l]]=a[Po[l]];Error.captureStackTrace&&Error.captureStackTrace(this,Ro);try{t&&(this.lineNumber=n,this.endLineNumber=r,Object.defineProperty?(Object.defineProperty(this,"column",{value:s,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:o,enumerable:!0})):(this.column=s,this.endColumn=o))}catch{}}Ro.prototype=new Error;Ki.default=Ro;vu.exports=Ki.default});var xu=W((Qi,Su)=>{"use strict";Qi.__esModule=!0;var Io=Oe();Qi.default=function(i){i.registerHelper("blockHelperMissing",function(e,t){var n=t.inverse,r=t.fn;if(e===!0)return r(this);if(e===!1||e==null)return n(this);if(Io.isArray(e))return e.length>0?(t.ids&&(t.ids=[t.name]),i.helpers.each(e,t)):n(this);if(t.data&&t.ids){var s=Io.createFrame(t.data);s.contextPath=Io.appendContextPath(t.data.contextPath,t.name),t={data:s}}return r(e,t)})};Su.exports=Qi.default});var Cu=W((Xi,Eu)=>{"use strict";Xi.__esModule=!0;function fg(i){return i&&i.__esModule?i:{default:i}}var Bn=Oe(),dg=Fe(),pg=fg(dg);Xi.default=function(i){i.registerHelper("each",function(e,t){if(!t)throw new pg.default("Must pass iterator to #each");var n=t.fn,r=t.inverse,s=0,o="",a=void 0,l=void 0;t.data&&t.ids&&(l=Bn.appendContextPath(t.data.contextPath,t.ids[0])+"."),Bn.isFunction(e)&&(e=e.call(this)),t.data&&(a=Bn.createFrame(t.data));function c(_,g,k){a&&(a.key=_,a.index=g,a.first=g===0,a.last=!!k,l&&(a.contextPath=l+_)),o=o+n(e[_],{data:a,blockParams:Bn.blockParams([e[_],_],[l+_,null])})}if(e&&typeof e=="object")if(Bn.isArray(e))for(var f=e.length;s<f;s++)s in e&&c(s,s,s===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var h=[],p=e[Symbol.iterator](),m=p.next();!m.done;m=p.next())h.push(m.value);e=h;for(var f=e.length;s<f;s++)c(s,s,s===e.length-1)}else(function(){var _=void 0;Object.keys(e).forEach(function(g){_!==void 0&&c(_,s-1),_=g,s++}),_!==void 0&&c(_,s-1,!0)})();return s===0&&(o=r(this)),o})};Eu.exports=Xi.default});var Au=W((Zi,ku)=>{"use strict";Zi.__esModule=!0;function mg(i){return i&&i.__esModule?i:{default:i}}var gg=Fe(),_g=mg(gg);Zi.default=function(i){i.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new _g.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};ku.exports=Zi.default});var Iu=W((er,Ru)=>{"use strict";er.__esModule=!0;function yg(i){return i&&i.__esModule?i:{default:i}}var Ou=Oe(),bg=Fe(),Pu=yg(bg);er.default=function(i){i.registerHelper("if",function(e,t){if(arguments.length!=2)throw new Pu.default("#if requires exactly one argument");return Ou.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||Ou.isEmpty(e)?t.inverse(this):t.fn(this)}),i.registerHelper("unless",function(e,t){if(arguments.length!=2)throw new Pu.default("#unless requires exactly one argument");return i.helpers.if.call(this,e,{fn:t.inverse,inverse:t.fn,hash:t.hash})})};Ru.exports=er.default});var Du=W((tr,Lu)=>{"use strict";tr.__esModule=!0;tr.default=function(i){i.registerHelper("log",function(){for(var e=[void 0],t=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var r=1;t.hash.level!=null?r=t.hash.level:t.data&&t.data.level!=null&&(r=t.data.level),e[0]=r,i.log.apply(i,e)})};Lu.exports=tr.default});var Nu=W((nr,Tu)=>{"use strict";nr.__esModule=!0;nr.default=function(i){i.registerHelper("lookup",function(e,t,n){return e&&n.lookupProperty(e,t)})};Tu.exports=nr.default});var Fu=W((ir,Mu)=>{"use strict";ir.__esModule=!0;function wg(i){return i&&i.__esModule?i:{default:i}}var qn=Oe(),vg=Fe(),Sg=wg(vg);ir.default=function(i){i.registerHelper("with",function(e,t){if(arguments.length!=2)throw new Sg.default("#with requires exactly one argument");qn.isFunction(e)&&(e=e.call(this));var n=t.fn;if(qn.isEmpty(e))return t.inverse(this);var r=t.data;return t.data&&t.ids&&(r=qn.createFrame(t.data),r.contextPath=qn.appendContextPath(t.data.contextPath,t.ids[0])),n(e,{data:r,blockParams:qn.blockParams([e],[r&&r.contextPath])})})};Mu.exports=ir.default});var Lo=W(rr=>{"use strict";rr.__esModule=!0;rr.registerDefaultHelpers=Fg;rr.moveHelperToHooks=Bg;function Lt(i){return i&&i.__esModule?i:{default:i}}var xg=xu(),Eg=Lt(xg),Cg=Cu(),kg=Lt(Cg),Ag=Au(),Og=Lt(Ag),Pg=Iu(),Rg=Lt(Pg),Ig=Du(),Lg=Lt(Ig),Dg=Nu(),Tg=Lt(Dg),Ng=Fu(),Mg=Lt(Ng);function Fg(i){Eg.default(i),kg.default(i),Og.default(i),Rg.default(i),Lg.default(i),Tg.default(i),Mg.default(i)}function Bg(i,e,t){i.helpers[e]&&(i.hooks[e]=i.helpers[e],t||(i.helpers[e]=void 0))}});var qu=W((sr,Bu)=>{"use strict";sr.__esModule=!0;var qg=Oe();sr.default=function(i){i.registerDecorator("inline",function(e,t,n,r){var s=e;return t.partials||(t.partials={},s=function(o,a){var l=n.partials;n.partials=qg.extend({},l,t.partials);var c=e(o,a);return n.partials=l,c}),t.partials[r.args[0]]=r.fn,s})};Bu.exports=sr.default});var Hu=W(Do=>{"use strict";Do.__esModule=!0;Do.registerDefaultDecorators=Vg;function Hg(i){return i&&i.__esModule?i:{default:i}}var Wg=qu(),jg=Hg(Wg);function Vg(i){jg.default(i)}});var To=W((or,Wu)=>{"use strict";or.__esModule=!0;var Ug=Oe(),Yt={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var t=Ug.indexOf(Yt.methodMap,e.toLowerCase());t>=0?e=t:e=parseInt(e,10)}return e},log:function(e){if(e=Yt.lookupLevel(e),typeof console<"u"&&Yt.lookupLevel(Yt.level)<=e){var t=Yt.methodMap[e];console[t]||(t="log");for(var n=arguments.length,r=Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];console[t].apply(console,r)}}};or.default=Yt;Wu.exports=or.default});var No=W(Hn=>{"use strict";Hn.__esModule=!0;Hn.createProtoAccessControl=Yg;Hn.resultIsAllowed=Jg;Hn.resetLoggedProperties=Qg;function Gg(i){return i&&i.__esModule?i:{default:i}}var ju=Oe(),zg=To(),$g=Gg(zg),ar=Object.create(null);function Yg(i){var e=Object.create(null);e.__proto__=!1,ju.extend(e,i.allowedProtoProperties);var t=Object.create(null);return t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1,t.__lookupSetter__=!1,ju.extend(t,i.allowedProtoMethods),{properties:{whitelist:e,defaultValue:i.allowProtoPropertiesByDefault},methods:{whitelist:t,defaultValue:i.allowProtoMethodsByDefault}}}function Jg(i,e,t){return Vu(typeof i=="function"?e.methods:e.properties,t)}function Vu(i,e){return i.whitelist[e]!==void 0?i.whitelist[e]===!0:i.defaultValue!==void 0?i.defaultValue:(Kg(e),!1)}function Kg(i){ar[i]!==!0&&(ar[i]=!0,$g.default.log("error",'Handlebars: Access has been denied to resolve the property "'+i+`" because it is not an "own property" of its parent.
30
30
  You can add a runtime option to disable the check or this warning:
31
- See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function Qg(){Object.keys(ar).forEach(function(i){delete ar[i]})}});var cr=W(tt=>{"use strict";tt.__esModule=!0;tt.HandlebarsEnvironment=Bo;function Uu(i){return i&&i.__esModule?i:{default:i}}var Dt=Oe(),Xg=Fe(),Mo=Uu(Xg),Zg=Lo(),e_=Hu(),t_=To(),lr=Uu(t_),n_=No(),i_="4.7.9";tt.VERSION=i_;var r_=8;tt.COMPILER_REVISION=r_;var s_=7;tt.LAST_COMPATIBLE_COMPILER_REVISION=s_;var o_={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};tt.REVISION_CHANGES=o_;var Fo="[object Object]";function Bo(i,e,t){this.helpers=i||{},this.partials=e||{},this.decorators=t||{},Zg.registerDefaultHelpers(this),e_.registerDefaultDecorators(this)}Bo.prototype={constructor:Bo,logger:lr.default,log:lr.default.log,registerHelper:function(e,t){if(Dt.toString.call(e)===Fo){if(t)throw new Mo.default("Arg not supported with multiple helpers");Dt.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(Dt.toString.call(e)===Fo)Dt.extend(this.partials,e);else{if(typeof t>"u")throw new Mo.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(Dt.toString.call(e)===Fo){if(t)throw new Mo.default("Arg not supported with multiple decorators");Dt.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){n_.resetLoggedProperties()}};var a_=lr.default.log;tt.log=a_;tt.createFrame=Dt.createFrame;tt.logger=lr.default});var zu=W((ur,Gu)=>{"use strict";ur.__esModule=!0;function qo(i){this.string=i}qo.prototype.toString=qo.prototype.toHTML=function(){return""+this.string};ur.default=qo;Gu.exports=ur.default});var $u=W(Ho=>{"use strict";Ho.__esModule=!0;Ho.wrapHelper=l_;function l_(i,e){if(typeof i!="function")return i;var t=function(){var r=arguments[arguments.length-1];return arguments[arguments.length-1]=e(r),i.apply(this,arguments)};return t}});var Zu=W(Et=>{"use strict";Et.__esModule=!0;Et.checkRevision=p_;Et.template=m_;Et.wrapProgram=hr;Et.resolvePartial=g_;Et.invokePartial=__;Et.noop=Qu;function c_(i){return i&&i.__esModule?i:{default:i}}function u_(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t]);return e.default=i,e}var h_=Oe(),Jt=u_(h_),f_=Fe(),dt=c_(f_),pt=cr(),Yu=Lo(),d_=$u(),Ju=No();function p_(i){var e=i&&i[0]||1,t=pt.COMPILER_REVISION;if(!(e>=pt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=pt.COMPILER_REVISION))if(e<pt.LAST_COMPATIBLE_COMPILER_REVISION){var n=pt.REVISION_CHANGES[t],r=pt.REVISION_CHANGES[e];throw new dt.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+r+").")}else throw new dt.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+i[1]+").")}function m_(i,e){if(!e)throw new dt.default("No environment passed to template");if(!i||!i.main)throw new dt.default("Unknown template object: "+typeof i);i.main.decorator=i.main_d,e.VM.checkRevision(i.compiler);var t=i.compiler&&i.compiler[0]===7;function n(o,a,c){c.hash&&(a=Jt.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),o=e.VM.resolvePartial.call(this,o,a,c),c.hooks=this.hooks,c.protoAccessControl=this.protoAccessControl;var l=e.VM.invokePartial.call(this,o,a,c);if(l==null&&e.compile&&(c.partials[c.name]=e.compile(o,i.compilerOptions,e),l=c.partials[c.name](a,c)),l!=null){if(c.indent){for(var f=l.split(`
32
- `),h=0,p=f.length;h<p&&!(!f[h]&&h+1===p);h++)f[h]=c.indent+f[h];l=f.join(`
33
- `)}return l}else throw new dt.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}var r={strict:function(a,c,l){if(!a||!(c in a))throw new dt.default('"'+c+'" not defined in '+a,{loc:l});return r.lookupProperty(a,c)},lookupProperty:function(a,c){var l=a[c];if(l==null||Object.prototype.hasOwnProperty.call(a,c)||Ju.resultIsAllowed(l,r.protoAccessControl,c))return l},lookup:function(a,c){for(var l=a.length,f=0;f<l;f++){var h=a[f]&&r.lookupProperty(a[f],c);if(h!=null)return h}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:Jt.escapeExpression,invokePartial:n,fn:function(a){var c=i[a];return c.decorator=i[a+"_d"],c},programs:[],program:function(a,c,l,f,h){var p=this.programs[a],m=this.fn(a);return c||h||f||l?p=hr(this,a,m,c,l,f,h):p||(p=this.programs[a]=hr(this,a,m)),p},data:function(a,c){for(;a&&c--;)a=a._parent;return a},mergeIfNeeded:function(a,c){var l=a||c;return a&&c&&a!==c&&(l=Jt.extend({},c,a)),l},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:i.compiler};function s(o){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=a.data;s._setup(a),!a.partial&&i.useData&&(c=y_(o,c));var l=void 0,f=i.useBlockParams?[]:void 0;i.useDepths&&(a.depths?l=o!=a.depths[0]?[o].concat(a.depths):a.depths:l=[o]);function h(p){return""+i.main(r,p,r.helpers,r.partials,c,f,l)}return h=Xu(i.main,h,r,a.depths||[],c,f),h(o,a)}return s.isTop=!0,s._setup=function(o){if(o.partial)r.protoAccessControl=o.protoAccessControl,r.helpers=o.helpers,r.partials=o.partials,r.decorators=o.decorators,r.hooks=o.hooks;else{var a={};Ku(a,e.helpers,r),Ku(a,o.helpers,r),r.helpers=a,i.usePartial&&(r.partials=r.mergeIfNeeded(o.partials,e.partials)),(i.usePartial||i.useDecorators)&&(r.decorators=Jt.extend({},e.decorators,o.decorators)),r.hooks={},r.protoAccessControl=Ju.createProtoAccessControl(o);var c=o.allowCallsToHelperMissing||t;Yu.moveHelperToHooks(r,"helperMissing",c),Yu.moveHelperToHooks(r,"blockHelperMissing",c)}},s._child=function(o,a,c,l){if(i.useBlockParams&&!c)throw new dt.default("must pass block params");if(i.useDepths&&!l)throw new dt.default("must pass parent depths");return hr(r,o,i[o],a,0,c,l)},s}function hr(i,e,t,n,r,s,o){function a(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],f=o;return o&&c!=o[0]&&!(c===i.nullContext&&o[0]===null)&&(f=[c].concat(o)),t(i,c,i.helpers,i.partials,l.data||n,s&&[l.blockParams].concat(s),f)}return a=Xu(t,a,i,o,n,s),a.program=e,a.depth=o?o.length:0,a.blockParams=r||0,a}function g_(i,e,t){return i?!i.call&&!t.name&&(t.name=i,i=fr(t.partials,i)):t.name==="@partial-block"?i=fr(t.data,"partial-block"):i=fr(t.partials,t.name),i}function __(i,e,t){var n=fr(t.data,"partial-block");t.partial=!0,t.ids&&(t.data.contextPath=t.ids[0]||t.data.contextPath);var r=void 0;if(t.fn&&t.fn!==Qu&&(function(){t.data=pt.createFrame(t.data);var s=t.fn;r=t.data["partial-block"]=function(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=pt.createFrame(c.data),c.data["partial-block"]=n,s(a,c)},s.partials&&(t.partials=Jt.extend({},t.partials,s.partials))})(),i===void 0&&r&&(i=r),i===void 0)throw new dt.default("The partial "+t.name+" could not be found");if(i instanceof Function)return i(e,t)}function Qu(){return""}function fr(i,e){if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e]}function y_(i,e){return(!e||!("root"in e))&&(e=e?pt.createFrame(e):{},e.root=i),e}function Xu(i,e,t,n,r,s){if(i.decorator){var o={};e=i.decorator(e,o,t,n&&n[0],r,s,n),Jt.extend(e,o)}return e}function Ku(i,e,t){e&&Object.keys(e).forEach(function(n){var r=e[n];i[n]=b_(r,t)})}function b_(i,e){var t=e.lookupProperty;return d_.wrapHelper(i,function(n){return n.lookupProperty=t,n})}});var Wo=W((dr,eh)=>{"use strict";dr.__esModule=!0;dr.default=function(i){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;i.noConflict=function(){return globalThis.Handlebars===i&&(globalThis.Handlebars=e),i}};eh.exports=dr.default});var sh=W((pr,rh)=>{"use strict";pr.__esModule=!0;function Vo(i){return i&&i.__esModule?i:{default:i}}function Uo(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t]);return e.default=i,e}var w_=cr(),th=Uo(w_),v_=zu(),S_=Vo(v_),x_=Fe(),E_=Vo(x_),C_=Oe(),jo=Uo(C_),k_=Zu(),nh=Uo(k_),A_=Wo(),O_=Vo(A_);function ih(){var i=new th.HandlebarsEnvironment;return jo.extend(i,th),i.SafeString=S_.default,i.Exception=E_.default,i.Utils=jo,i.escapeExpression=jo.escapeExpression,i.VM=nh,i.template=function(e){return nh.template(e,i)},i}var Wn=ih();Wn.create=ih;O_.default(Wn);Wn.default=Wn;pr.default=Wn;rh.exports=pr.default});var Go=W((mr,ah)=>{"use strict";mr.__esModule=!0;var oh={helpers:{helperExpression:function(e){return e.type==="SubExpression"||(e.type==="MustacheStatement"||e.type==="BlockStatement")&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return e.parts.length===1&&!oh.helpers.scopedId(e)&&!e.depth}}};mr.default=oh;ah.exports=mr.default});var ch=W((gr,lh)=>{"use strict";gr.__esModule=!0;var P_=(function(){var i={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(r,s,o,a,c,l,f){var h=l.length-1;switch(c){case 1:return l[h-1];case 2:this.$=a.prepareProgram(l[h]);break;case 3:this.$=l[h];break;case 4:this.$=l[h];break;case 5:this.$=l[h];break;case 6:this.$=l[h];break;case 7:this.$=l[h];break;case 8:this.$=l[h];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(l[h]),strip:a.stripFlags(l[h],l[h]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[h],value:l[h],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(l[h-2],l[h-1],l[h],this._$);break;case 12:this.$={path:l[h-3],params:l[h-2],hash:l[h-1]};break;case 13:this.$=a.prepareBlock(l[h-3],l[h-2],l[h-1],l[h],!1,this._$);break;case 14:this.$=a.prepareBlock(l[h-3],l[h-2],l[h-1],l[h],!0,this._$);break;case 15:this.$={open:l[h-5],path:l[h-4],params:l[h-3],hash:l[h-2],blockParams:l[h-1],strip:a.stripFlags(l[h-5],l[h])};break;case 16:this.$={path:l[h-4],params:l[h-3],hash:l[h-2],blockParams:l[h-1],strip:a.stripFlags(l[h-5],l[h])};break;case 17:this.$={path:l[h-4],params:l[h-3],hash:l[h-2],blockParams:l[h-1],strip:a.stripFlags(l[h-5],l[h])};break;case 18:this.$={strip:a.stripFlags(l[h-1],l[h-1]),program:l[h]};break;case 19:var p=a.prepareBlock(l[h-2],l[h-1],l[h],l[h],!1,this._$),m=a.prepareProgram([p],l[h-1].loc);m.chained=!0,this.$={strip:l[h-2].strip,program:m,chain:!0};break;case 20:this.$=l[h];break;case 21:this.$={path:l[h-1],strip:a.stripFlags(l[h-2],l[h])};break;case 22:this.$=a.prepareMustache(l[h-3],l[h-2],l[h-1],l[h-4],a.stripFlags(l[h-4],l[h]),this._$);break;case 23:this.$=a.prepareMustache(l[h-3],l[h-2],l[h-1],l[h-4],a.stripFlags(l[h-4],l[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[h-3],params:l[h-2],hash:l[h-1],indent:"",strip:a.stripFlags(l[h-4],l[h]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(l[h-2],l[h-1],l[h],this._$);break;case 26:this.$={path:l[h-3],params:l[h-2],hash:l[h-1],strip:a.stripFlags(l[h-4],l[h])};break;case 27:this.$=l[h];break;case 28:this.$=l[h];break;case 29:this.$={type:"SubExpression",path:l[h-3],params:l[h-2],hash:l[h-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[h],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(l[h-2]),value:l[h],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(l[h-1]);break;case 33:this.$=l[h];break;case 34:this.$=l[h];break;case 35:this.$={type:"StringLiteral",value:l[h],original:l[h],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[h]),original:Number(l[h]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[h]==="true",original:l[h]==="true",loc:a.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:a.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:a.locInfo(this._$)};break;case 40:this.$=l[h];break;case 41:this.$=l[h];break;case 42:this.$=a.preparePath(!0,l[h],this._$);break;case 43:this.$=a.preparePath(!1,l[h],this._$);break;case 44:l[h-2].push({part:a.id(l[h]),original:l[h],separator:l[h-1]}),this.$=l[h-2];break;case 45:this.$=[{part:a.id(l[h]),original:l[h]}];break;case 46:this.$=[];break;case 47:l[h-1].push(l[h]);break;case 48:this.$=[];break;case 49:l[h-1].push(l[h]);break;case 50:this.$=[];break;case 51:l[h-1].push(l[h]);break;case 58:this.$=[];break;case 59:l[h-1].push(l[h]);break;case 64:this.$=[];break;case 65:l[h-1].push(l[h]);break;case 70:this.$=[];break;case 71:l[h-1].push(l[h]);break;case 78:this.$=[];break;case 79:l[h-1].push(l[h]);break;case 82:this.$=[];break;case 83:l[h-1].push(l[h]);break;case 86:this.$=[];break;case 87:l[h-1].push(l[h]);break;case 90:this.$=[];break;case 91:l[h-1].push(l[h]);break;case 94:this.$=[];break;case 95:l[h-1].push(l[h]);break;case 98:this.$=[l[h]];break;case 99:l[h-1].push(l[h]);break;case 100:this.$=[l[h]];break;case 101:l[h-1].push(l[h]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(r,s){throw new Error(r)},parse:function(r){var s=this,o=[0],a=[null],c=[],l=this.table,f="",h=0,p=0,m=0,_=2,g=1;this.lexer.setInput(r),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var k=this.lexer.yylloc;c.push(k);var w=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function S(T){o.length=o.length-2*T,a.length=a.length-T,c.length=c.length-T}function P(){var T;return T=s.lexer.lex()||1,typeof T!="number"&&(T=s.symbols_[T]||T),T}for(var D,B,U,J,he,le,se={},G,ce,V,z;;){if(U=o[o.length-1],this.defaultActions[U]?J=this.defaultActions[U]:((D===null||typeof D>"u")&&(D=P()),J=l[U]&&l[U][D]),typeof J>"u"||!J.length||!J[0]){var ge="";if(!m){z=[];for(G in l[U])this.terminals_[G]&&G>2&&z.push("'"+this.terminals_[G]+"'");this.lexer.showPosition?ge="Parse error on line "+(h+1)+`:
31
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function Qg(){Object.keys(ar).forEach(function(i){delete ar[i]})}});var cr=W(tt=>{"use strict";tt.__esModule=!0;tt.HandlebarsEnvironment=Bo;function Uu(i){return i&&i.__esModule?i:{default:i}}var Dt=Oe(),Xg=Fe(),Mo=Uu(Xg),Zg=Lo(),e_=Hu(),t_=To(),lr=Uu(t_),n_=No(),i_="4.7.9";tt.VERSION=i_;var r_=8;tt.COMPILER_REVISION=r_;var s_=7;tt.LAST_COMPATIBLE_COMPILER_REVISION=s_;var o_={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};tt.REVISION_CHANGES=o_;var Fo="[object Object]";function Bo(i,e,t){this.helpers=i||{},this.partials=e||{},this.decorators=t||{},Zg.registerDefaultHelpers(this),e_.registerDefaultDecorators(this)}Bo.prototype={constructor:Bo,logger:lr.default,log:lr.default.log,registerHelper:function(e,t){if(Dt.toString.call(e)===Fo){if(t)throw new Mo.default("Arg not supported with multiple helpers");Dt.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(Dt.toString.call(e)===Fo)Dt.extend(this.partials,e);else{if(typeof t>"u")throw new Mo.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(Dt.toString.call(e)===Fo){if(t)throw new Mo.default("Arg not supported with multiple decorators");Dt.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){n_.resetLoggedProperties()}};var a_=lr.default.log;tt.log=a_;tt.createFrame=Dt.createFrame;tt.logger=lr.default});var zu=W((ur,Gu)=>{"use strict";ur.__esModule=!0;function qo(i){this.string=i}qo.prototype.toString=qo.prototype.toHTML=function(){return""+this.string};ur.default=qo;Gu.exports=ur.default});var $u=W(Ho=>{"use strict";Ho.__esModule=!0;Ho.wrapHelper=l_;function l_(i,e){if(typeof i!="function")return i;var t=function(){var r=arguments[arguments.length-1];return arguments[arguments.length-1]=e(r),i.apply(this,arguments)};return t}});var Zu=W(Et=>{"use strict";Et.__esModule=!0;Et.checkRevision=p_;Et.template=m_;Et.wrapProgram=hr;Et.resolvePartial=g_;Et.invokePartial=__;Et.noop=Qu;function c_(i){return i&&i.__esModule?i:{default:i}}function u_(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t]);return e.default=i,e}var h_=Oe(),Jt=u_(h_),f_=Fe(),dt=c_(f_),pt=cr(),Yu=Lo(),d_=$u(),Ju=No();function p_(i){var e=i&&i[0]||1,t=pt.COMPILER_REVISION;if(!(e>=pt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=pt.COMPILER_REVISION))if(e<pt.LAST_COMPATIBLE_COMPILER_REVISION){var n=pt.REVISION_CHANGES[t],r=pt.REVISION_CHANGES[e];throw new dt.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+r+").")}else throw new dt.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+i[1]+").")}function m_(i,e){if(!e)throw new dt.default("No environment passed to template");if(!i||!i.main)throw new dt.default("Unknown template object: "+typeof i);i.main.decorator=i.main_d,e.VM.checkRevision(i.compiler);var t=i.compiler&&i.compiler[0]===7;function n(o,a,l){l.hash&&(a=Jt.extend({},a,l.hash),l.ids&&(l.ids[0]=!0)),o=e.VM.resolvePartial.call(this,o,a,l),l.hooks=this.hooks,l.protoAccessControl=this.protoAccessControl;var c=e.VM.invokePartial.call(this,o,a,l);if(c==null&&e.compile&&(l.partials[l.name]=e.compile(o,i.compilerOptions,e),c=l.partials[l.name](a,l)),c!=null){if(l.indent){for(var f=c.split(`
32
+ `),h=0,p=f.length;h<p&&!(!f[h]&&h+1===p);h++)f[h]=l.indent+f[h];c=f.join(`
33
+ `)}return c}else throw new dt.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}var r={strict:function(a,l,c){if(!a||!(l in a))throw new dt.default('"'+l+'" not defined in '+a,{loc:c});return r.lookupProperty(a,l)},lookupProperty:function(a,l){var c=a[l];if(c==null||Object.prototype.hasOwnProperty.call(a,l)||Ju.resultIsAllowed(c,r.protoAccessControl,l))return c},lookup:function(a,l){for(var c=a.length,f=0;f<c;f++){var h=a[f]&&r.lookupProperty(a[f],l);if(h!=null)return h}},lambda:function(a,l){return typeof a=="function"?a.call(l):a},escapeExpression:Jt.escapeExpression,invokePartial:n,fn:function(a){var l=i[a];return l.decorator=i[a+"_d"],l},programs:[],program:function(a,l,c,f,h){var p=this.programs[a],m=this.fn(a);return l||h||f||c?p=hr(this,a,m,l,c,f,h):p||(p=this.programs[a]=hr(this,a,m)),p},data:function(a,l){for(;a&&l--;)a=a._parent;return a},mergeIfNeeded:function(a,l){var c=a||l;return a&&l&&a!==l&&(c=Jt.extend({},l,a)),c},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:i.compiler};function s(o){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=a.data;s._setup(a),!a.partial&&i.useData&&(l=y_(o,l));var c=void 0,f=i.useBlockParams?[]:void 0;i.useDepths&&(a.depths?c=o!=a.depths[0]?[o].concat(a.depths):a.depths:c=[o]);function h(p){return""+i.main(r,p,r.helpers,r.partials,l,f,c)}return h=Xu(i.main,h,r,a.depths||[],l,f),h(o,a)}return s.isTop=!0,s._setup=function(o){if(o.partial)r.protoAccessControl=o.protoAccessControl,r.helpers=o.helpers,r.partials=o.partials,r.decorators=o.decorators,r.hooks=o.hooks;else{var a={};Ku(a,e.helpers,r),Ku(a,o.helpers,r),r.helpers=a,i.usePartial&&(r.partials=r.mergeIfNeeded(o.partials,e.partials)),(i.usePartial||i.useDecorators)&&(r.decorators=Jt.extend({},e.decorators,o.decorators)),r.hooks={},r.protoAccessControl=Ju.createProtoAccessControl(o);var l=o.allowCallsToHelperMissing||t;Yu.moveHelperToHooks(r,"helperMissing",l),Yu.moveHelperToHooks(r,"blockHelperMissing",l)}},s._child=function(o,a,l,c){if(i.useBlockParams&&!l)throw new dt.default("must pass block params");if(i.useDepths&&!c)throw new dt.default("must pass parent depths");return hr(r,o,i[o],a,0,l,c)},s}function hr(i,e,t,n,r,s,o){function a(l){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],f=o;return o&&l!=o[0]&&!(l===i.nullContext&&o[0]===null)&&(f=[l].concat(o)),t(i,l,i.helpers,i.partials,c.data||n,s&&[c.blockParams].concat(s),f)}return a=Xu(t,a,i,o,n,s),a.program=e,a.depth=o?o.length:0,a.blockParams=r||0,a}function g_(i,e,t){return i?!i.call&&!t.name&&(t.name=i,i=fr(t.partials,i)):t.name==="@partial-block"?i=fr(t.data,"partial-block"):i=fr(t.partials,t.name),i}function __(i,e,t){var n=fr(t.data,"partial-block");t.partial=!0,t.ids&&(t.data.contextPath=t.ids[0]||t.data.contextPath);var r=void 0;if(t.fn&&t.fn!==Qu&&(function(){t.data=pt.createFrame(t.data);var s=t.fn;r=t.data["partial-block"]=function(a){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=pt.createFrame(l.data),l.data["partial-block"]=n,s(a,l)},s.partials&&(t.partials=Jt.extend({},t.partials,s.partials))})(),i===void 0&&r&&(i=r),i===void 0)throw new dt.default("The partial "+t.name+" could not be found");if(i instanceof Function)return i(e,t)}function Qu(){return""}function fr(i,e){if(i&&Object.prototype.hasOwnProperty.call(i,e))return i[e]}function y_(i,e){return(!e||!("root"in e))&&(e=e?pt.createFrame(e):{},e.root=i),e}function Xu(i,e,t,n,r,s){if(i.decorator){var o={};e=i.decorator(e,o,t,n&&n[0],r,s,n),Jt.extend(e,o)}return e}function Ku(i,e,t){e&&Object.keys(e).forEach(function(n){var r=e[n];i[n]=b_(r,t)})}function b_(i,e){var t=e.lookupProperty;return d_.wrapHelper(i,function(n){return n.lookupProperty=t,n})}});var Wo=W((dr,eh)=>{"use strict";dr.__esModule=!0;dr.default=function(i){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;i.noConflict=function(){return globalThis.Handlebars===i&&(globalThis.Handlebars=e),i}};eh.exports=dr.default});var sh=W((pr,rh)=>{"use strict";pr.__esModule=!0;function Vo(i){return i&&i.__esModule?i:{default:i}}function Uo(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t]);return e.default=i,e}var w_=cr(),th=Uo(w_),v_=zu(),S_=Vo(v_),x_=Fe(),E_=Vo(x_),C_=Oe(),jo=Uo(C_),k_=Zu(),nh=Uo(k_),A_=Wo(),O_=Vo(A_);function ih(){var i=new th.HandlebarsEnvironment;return jo.extend(i,th),i.SafeString=S_.default,i.Exception=E_.default,i.Utils=jo,i.escapeExpression=jo.escapeExpression,i.VM=nh,i.template=function(e){return nh.template(e,i)},i}var Wn=ih();Wn.create=ih;O_.default(Wn);Wn.default=Wn;pr.default=Wn;rh.exports=pr.default});var Go=W((mr,ah)=>{"use strict";mr.__esModule=!0;var oh={helpers:{helperExpression:function(e){return e.type==="SubExpression"||(e.type==="MustacheStatement"||e.type==="BlockStatement")&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return e.parts.length===1&&!oh.helpers.scopedId(e)&&!e.depth}}};mr.default=oh;ah.exports=mr.default});var ch=W((gr,lh)=>{"use strict";gr.__esModule=!0;var P_=(function(){var i={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(r,s,o,a,l,c,f){var h=c.length-1;switch(l){case 1:return c[h-1];case 2:this.$=a.prepareProgram(c[h]);break;case 3:this.$=c[h];break;case 4:this.$=c[h];break;case 5:this.$=c[h];break;case 6:this.$=c[h];break;case 7:this.$=c[h];break;case 8:this.$=c[h];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(c[h]),strip:a.stripFlags(c[h],c[h]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:c[h],value:c[h],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(c[h-2],c[h-1],c[h],this._$);break;case 12:this.$={path:c[h-3],params:c[h-2],hash:c[h-1]};break;case 13:this.$=a.prepareBlock(c[h-3],c[h-2],c[h-1],c[h],!1,this._$);break;case 14:this.$=a.prepareBlock(c[h-3],c[h-2],c[h-1],c[h],!0,this._$);break;case 15:this.$={open:c[h-5],path:c[h-4],params:c[h-3],hash:c[h-2],blockParams:c[h-1],strip:a.stripFlags(c[h-5],c[h])};break;case 16:this.$={path:c[h-4],params:c[h-3],hash:c[h-2],blockParams:c[h-1],strip:a.stripFlags(c[h-5],c[h])};break;case 17:this.$={path:c[h-4],params:c[h-3],hash:c[h-2],blockParams:c[h-1],strip:a.stripFlags(c[h-5],c[h])};break;case 18:this.$={strip:a.stripFlags(c[h-1],c[h-1]),program:c[h]};break;case 19:var p=a.prepareBlock(c[h-2],c[h-1],c[h],c[h],!1,this._$),m=a.prepareProgram([p],c[h-1].loc);m.chained=!0,this.$={strip:c[h-2].strip,program:m,chain:!0};break;case 20:this.$=c[h];break;case 21:this.$={path:c[h-1],strip:a.stripFlags(c[h-2],c[h])};break;case 22:this.$=a.prepareMustache(c[h-3],c[h-2],c[h-1],c[h-4],a.stripFlags(c[h-4],c[h]),this._$);break;case 23:this.$=a.prepareMustache(c[h-3],c[h-2],c[h-1],c[h-4],a.stripFlags(c[h-4],c[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:c[h-3],params:c[h-2],hash:c[h-1],indent:"",strip:a.stripFlags(c[h-4],c[h]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(c[h-2],c[h-1],c[h],this._$);break;case 26:this.$={path:c[h-3],params:c[h-2],hash:c[h-1],strip:a.stripFlags(c[h-4],c[h])};break;case 27:this.$=c[h];break;case 28:this.$=c[h];break;case 29:this.$={type:"SubExpression",path:c[h-3],params:c[h-2],hash:c[h-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:c[h],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(c[h-2]),value:c[h],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(c[h-1]);break;case 33:this.$=c[h];break;case 34:this.$=c[h];break;case 35:this.$={type:"StringLiteral",value:c[h],original:c[h],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(c[h]),original:Number(c[h]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:c[h]==="true",original:c[h]==="true",loc:a.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:a.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:a.locInfo(this._$)};break;case 40:this.$=c[h];break;case 41:this.$=c[h];break;case 42:this.$=a.preparePath(!0,c[h],this._$);break;case 43:this.$=a.preparePath(!1,c[h],this._$);break;case 44:c[h-2].push({part:a.id(c[h]),original:c[h],separator:c[h-1]}),this.$=c[h-2];break;case 45:this.$=[{part:a.id(c[h]),original:c[h]}];break;case 46:this.$=[];break;case 47:c[h-1].push(c[h]);break;case 48:this.$=[];break;case 49:c[h-1].push(c[h]);break;case 50:this.$=[];break;case 51:c[h-1].push(c[h]);break;case 58:this.$=[];break;case 59:c[h-1].push(c[h]);break;case 64:this.$=[];break;case 65:c[h-1].push(c[h]);break;case 70:this.$=[];break;case 71:c[h-1].push(c[h]);break;case 78:this.$=[];break;case 79:c[h-1].push(c[h]);break;case 82:this.$=[];break;case 83:c[h-1].push(c[h]);break;case 86:this.$=[];break;case 87:c[h-1].push(c[h]);break;case 90:this.$=[];break;case 91:c[h-1].push(c[h]);break;case 94:this.$=[];break;case 95:c[h-1].push(c[h]);break;case 98:this.$=[c[h]];break;case 99:c[h-1].push(c[h]);break;case 100:this.$=[c[h]];break;case 101:c[h-1].push(c[h]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(r,s){throw new Error(r)},parse:function(r){var s=this,o=[0],a=[null],l=[],c=this.table,f="",h=0,p=0,m=0,_=2,g=1;this.lexer.setInput(r),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var k=this.lexer.yylloc;l.push(k);var w=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function S(T){o.length=o.length-2*T,a.length=a.length-T,l.length=l.length-T}function P(){var T;return T=s.lexer.lex()||1,typeof T!="number"&&(T=s.symbols_[T]||T),T}for(var D,B,U,J,he,le,se={},G,ce,V,z;;){if(U=o[o.length-1],this.defaultActions[U]?J=this.defaultActions[U]:((D===null||typeof D>"u")&&(D=P()),J=c[U]&&c[U][D]),typeof J>"u"||!J.length||!J[0]){var ge="";if(!m){z=[];for(G in c[U])this.terminals_[G]&&G>2&&z.push("'"+this.terminals_[G]+"'");this.lexer.showPosition?ge="Parse error on line "+(h+1)+`:
34
34
  `+this.lexer.showPosition()+`
35
- Expecting `+z.join(", ")+", got '"+(this.terminals_[D]||D)+"'":ge="Parse error on line "+(h+1)+": Unexpected "+(D==1?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(ge,{text:this.lexer.match,token:this.terminals_[D]||D,line:this.lexer.yylineno,loc:k,expected:z})}}if(J[0]instanceof Array&&J.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+D);switch(J[0]){case 1:o.push(D),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),o.push(J[1]),D=null,B?(D=B,B=null):(p=this.lexer.yyleng,f=this.lexer.yytext,h=this.lexer.yylineno,k=this.lexer.yylloc,m>0&&m--);break;case 2:if(ce=this.productions_[J[1]][1],se.$=a[a.length-ce],se._$={first_line:c[c.length-(ce||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(ce||1)].first_column,last_column:c[c.length-1].last_column},w&&(se._$.range=[c[c.length-(ce||1)].range[0],c[c.length-1].range[1]]),le=this.performAction.call(se,f,p,h,this.yy,J[1],a,c),typeof le<"u")return le;ce&&(o=o.slice(0,-1*ce*2),a=a.slice(0,-1*ce),c=c.slice(0,-1*ce)),o.push(this.productions_[J[1]][0]),a.push(se.$),c.push(se._$),V=l[o[o.length-2]][o[o.length-1]],o.push(V);break;case 3:return!0}}return!0}},e=(function(){var n={EOF:1,parseError:function(s,o){if(this.yy.parser)this.yy.parser.parseError(s,o);else throw new Error(s)},setInput:function(s){return this._input=s,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},unput:function(s){var o=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o-1),this.offset-=o;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var l=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[l[0],l[0]+this.yyleng-o]),this},more:function(){return this._more=!0,this},less:function(s){this.unput(this.match.slice(s))},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
36
- `+o+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,o,a,c,l,f;this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),p=0;p<h.length&&(a=this._input.match(this.rules[h[p]]),!(a&&(!o||a[0].length>o[0].length)&&(o=a,c=p,!this.options.flex)));p++);return o?(f=o[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],s=this.performAction.call(this,this.yy,this,h[c],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
37
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return typeof s<"u"?s:this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(s){this.begin(s)}};return n.options={},n.performAction=function(s,o,a,c){function l(h,p){return o.yytext=o.yytext.substring(h,o.yyleng-p+h)}var f=c;switch(a){case 0:if(o.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):o.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),o.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(o.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return o.yytext=l(1,2).replace(/\\"/g,'"'),80;break;case 32:return o.yytext=l(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return o.yytext=o.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();i.lexer=e;function t(){this.yy={}}return t.prototype=i,i.Parser=t,new t})();gr.default=P_;lh.exports=gr.default});var wr=W((br,fh)=>{"use strict";br.__esModule=!0;function R_(i){return i&&i.__esModule?i:{default:i}}var I_=Fe(),zo=R_(I_);function _r(){this.parents=[]}_r.prototype={constructor:_r,mutating:!1,acceptKey:function(e,t){var n=this.accept(e[t]);if(this.mutating){if(n&&!_r.prototype[n.type])throw new zo.default('Unexpected node type "'+n.type+'" found when accepting '+t+" on "+e.type);e[t]=n}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new zo.default(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,n=e.length;t<n;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,n--)},accept:function(e){if(e){if(!this[e.type])throw new zo.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||t)return t;if(t!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:yr,Decorator:yr,BlockStatement:uh,DecoratorBlock:uh,PartialStatement:hh,PartialBlockStatement:function(e){hh.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:yr,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,"value")}};function yr(i){this.acceptRequired(i,"path"),this.acceptArray(i.params),this.acceptKey(i,"hash")}function uh(i){yr.call(this,i),this.acceptKey(i,"program"),this.acceptKey(i,"inverse")}function hh(i){this.acceptRequired(i,"name"),this.acceptArray(i.params),this.acceptKey(i,"hash")}br.default=_r;fh.exports=br.default});var ph=W((vr,dh)=>{"use strict";vr.__esModule=!0;function L_(i){return i&&i.__esModule?i:{default:i}}var D_=wr(),T_=L_(D_);function nt(){var i=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=i}nt.prototype=new T_.default;nt.prototype.Program=function(i){var e=!this.options.ignoreStandalone,t=!this.isRootSeen;this.isRootSeen=!0;for(var n=i.body,r=0,s=n.length;r<s;r++){var o=n[r],a=this.accept(o);if(a){var c=$o(n,r,t),l=Yo(n,r,t),f=a.openStandalone&&c,h=a.closeStandalone&&l,p=a.inlineStandalone&&c&&l;a.close&&Tt(n,r,!0),a.open&&Ct(n,r,!0),e&&p&&(Tt(n,r),Ct(n,r)&&o.type==="PartialStatement"&&(o.indent=/([ \t]+$)/.exec(n[r-1].original)[1])),e&&f&&(Tt((o.program||o.inverse).body),Ct(n,r)),e&&h&&(Tt(n,r),Ct((o.inverse||o.program).body))}}return i};nt.prototype.BlockStatement=nt.prototype.DecoratorBlock=nt.prototype.PartialBlockStatement=function(i){this.accept(i.program),this.accept(i.inverse);var e=i.program||i.inverse,t=i.program&&i.inverse,n=t,r=t;if(t&&t.chained)for(n=t.body[0].program;r.chained;)r=r.body[r.body.length-1].program;var s={open:i.openStrip.open,close:i.closeStrip.close,openStandalone:Yo(e.body),closeStandalone:$o((n||e).body)};if(i.openStrip.close&&Tt(e.body,null,!0),t){var o=i.inverseStrip;o.open&&Ct(e.body,null,!0),o.close&&Tt(n.body,null,!0),i.closeStrip.open&&Ct(r.body,null,!0),!this.options.ignoreStandalone&&$o(e.body)&&Yo(n.body)&&(Ct(e.body),Tt(n.body))}else i.closeStrip.open&&Ct(e.body,null,!0);return s};nt.prototype.Decorator=nt.prototype.MustacheStatement=function(i){return i.strip};nt.prototype.PartialStatement=nt.prototype.CommentStatement=function(i){var e=i.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function $o(i,e,t){e===void 0&&(e=i.length);var n=i[e-1],r=i[e-2];if(!n)return t;if(n.type==="ContentStatement")return(r||!t?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function Yo(i,e,t){e===void 0&&(e=-1);var n=i[e+1],r=i[e+2];if(!n)return t;if(n.type==="ContentStatement")return(r||!t?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function Tt(i,e,t){var n=i[e==null?0:e+1];if(!(!n||n.type!=="ContentStatement"||!t&&n.rightStripped)){var r=n.value;n.value=n.value.replace(t?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==r}}function Ct(i,e,t){var n=i[e==null?i.length-1:e-1];if(!(!n||n.type!=="ContentStatement"||!t&&n.leftStripped)){var r=n.value;return n.value=n.value.replace(t?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==r,n.leftStripped}}vr.default=nt;dh.exports=vr.default});var mh=W(Ge=>{"use strict";Ge.__esModule=!0;Ge.SourceLocation=F_;Ge.id=B_;Ge.stripFlags=q_;Ge.stripComment=H_;Ge.preparePath=W_;Ge.prepareMustache=j_;Ge.prepareRawBlock=V_;Ge.prepareBlock=U_;Ge.prepareProgram=G_;Ge.preparePartialBlock=z_;function N_(i){return i&&i.__esModule?i:{default:i}}var M_=Fe(),Jo=N_(M_);function Ko(i,e){if(e=e.path?e.path.original:e,i.path.original!==e){var t={loc:i.path.loc};throw new Jo.default(i.path.original+" doesn't match "+e,t)}}function F_(i,e){this.source=i,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function B_(i){return/^\[.*\]$/.test(i)?i.substring(1,i.length-1):i}function q_(i,e){return{open:i.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function H_(i){return i.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function W_(i,e,t){t=this.locInfo(t);for(var n=i?"@":"",r=[],s=0,o=0,a=e.length;o<a;o++){var c=e[o].part,l=e[o].original!==c;if(n+=(e[o].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(r.length>0)throw new Jo.default("Invalid path: "+n,{loc:t});c===".."&&s++}else r.push(c)}return{type:"PathExpression",data:i,depth:s,parts:r,original:n,loc:t}}function j_(i,e,t,n,r,s){var o=n.charAt(3)||n.charAt(2),a=o!=="{"&&o!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:i,params:e,hash:t,escaped:a,strip:r,loc:this.locInfo(s)}}function V_(i,e,t,n){Ko(i,t),n=this.locInfo(n);var r={type:"Program",body:e,strip:{},loc:n};return{type:"BlockStatement",path:i.path,params:i.params,hash:i.hash,program:r,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function U_(i,e,t,n,r,s){n&&n.path&&Ko(i,n);var o=/\*/.test(i.open);e.blockParams=i.blockParams;var a=void 0,c=void 0;if(t){if(o)throw new Jo.default("Unexpected inverse block on decorator",t);t.chain&&(t.program.body[0].closeStrip=n.strip),c=t.strip,a=t.program}return r&&(r=a,a=e,e=r),{type:o?"DecoratorBlock":"BlockStatement",path:i.path,params:i.params,hash:i.hash,program:e,inverse:a,openStrip:i.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(s)}}function G_(i,e){if(!e&&i.length){var t=i[0].loc,n=i[i.length-1].loc;t&&n&&(e={source:t.source,start:{line:t.start.line,column:t.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:i,strip:{},loc:e}}function z_(i,e,t,n){return Ko(i,t),{type:"PartialBlockStatement",name:i.path,params:i.params,hash:i.hash,program:e,openStrip:i.strip,closeStrip:t&&t.strip,loc:this.locInfo(n)}}});var _h=W(Vn=>{"use strict";Vn.__esModule=!0;Vn.parseWithoutProcessing=gh;Vn.parse=ty;function $_(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t]);return e.default=i,e}function Zo(i){return i&&i.__esModule?i:{default:i}}var Y_=ch(),Qo=Zo(Y_),J_=ph(),K_=Zo(J_),Q_=mh(),X_=$_(Q_),Z_=Fe(),jn=Zo(Z_),ey=Oe();Vn.parser=Qo.default;var Sr={};ey.extend(Sr,X_);function gh(i,e){if(i.type==="Program")return ny(i),i;Qo.default.yy=Sr,Sr.locInfo=function(n){return new Sr.SourceLocation(e&&e.srcName,n)};var t=Qo.default.parse(i);return t}function ty(i,e){var t=gh(i,e),n=new K_.default(e);return n.accept(t)}function ny(i){Xo(i)}function Xo(i){if(i!=null){if(Array.isArray(i)){i.forEach(Xo);return}if(typeof i=="object"){if(i.type==="PathExpression"){if(!iy(i.depth))throw new jn.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(i.parts))throw new jn.default("Invalid AST: PathExpression.parts must be an array");for(var e=0;e<i.parts.length;e++)if(typeof i.parts[e]!="string")throw new jn.default("Invalid AST: PathExpression.parts must only contain strings")}else if(i.type==="NumberLiteral"){if(typeof i.value!="number"||!isFinite(i.value))throw new jn.default("Invalid AST: NumberLiteral.value must be a number")}else if(i.type==="BooleanLiteral"&&typeof i.value!="boolean")throw new jn.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(i).forEach(function(t){t!=="loc"&&Xo(i[t])})}}}function iy(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i&&i>=0}});var vh=W($n=>{"use strict";$n.__esModule=!0;$n.Compiler=ea;$n.precompile=ay;$n.compile=ly;function bh(i){return i&&i.__esModule?i:{default:i}}var ry=Fe(),Gn=bh(ry),zn=Oe(),sy=Go(),Un=bh(sy),oy=[].slice;function ea(){}ea.prototype={compiler:ea,equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var n=0;n<t;n++){var r=this.opcodes[n],s=e.opcodes[n];if(r.opcode!==s.opcode||!wh(r.args,s.args))return!1}t=this.children.length;for(var n=0;n<t;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,t){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[],t.knownHelpers=zn.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},t.knownHelpers),this.accept(e)},compileProgram:function(e){var t=new this.compiler,n=t.compile(e,this.options),r=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[r]=n,this.useDepths=this.useDepths||n.useDepths,r},accept:function(e){if(!this[e.type])throw new Gn.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var t=e.body,n=t.length,r=0;r<n;r++)this.accept(t[r]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){yh(e);var t=e.program,n=e.inverse;t=t&&this.compileProgram(t),n=n&&this.compileProgram(n);var r=this.classifySexpr(e);r==="helper"?this.helperSexpr(e,t,n):r==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",t),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,t,n),this.opcode("pushProgram",t),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var t=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,t,void 0),r=e.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,r.original)},PartialStatement:function(e){this.usePartial=!0;var t=e.program;t&&(t=this.compileProgram(e.program));var n=e.params;if(n.length>1)throw new Gn.default("Unsupported number of partial arguments: "+n.length,e);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var r=e.name.original,s=e.name.type==="SubExpression";s&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var o=e.indent||"";this.options.preventIndent&&o&&(this.opcode("appendContent",o),o=""),this.opcode("invokePartial",s,r,o),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){yh(e);var t=this.classifySexpr(e);t==="simple"?this.simpleSexpr(e):t==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,n){var r=e.path,s=r.parts[0],o=t!=null||n!=null;this.opcode("getContext",r.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",n),r.strict=!0,this.accept(r),this.opcode("invokeAmbiguous",s,o)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,t,n){var r=this.setupFullMustacheParams(e,t,n),s=e.path,o=s.parts[0];if(this.options.knownHelpers[o])this.opcode("invokeKnownHelper",r.length,o);else{if(this.options.knownHelpersOnly)throw new Gn.default("You specified knownHelpersOnly, but used the unknown helper "+o,e);s.strict=!0,s.falsy=!0,this.accept(s),this.opcode("invokeHelper",r.length,s.original,Un.default.helpers.simpleId(s))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0],n=Un.default.helpers.scopedId(e),r=!e.depth&&!n&&this.blockParamIndex(t);r?this.opcode("lookupBlockParam",r,e.parts):t?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,n):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var t=e.pairs,n=0,r=t.length;for(this.opcode("pushHash");n<r;n++)this.pushParam(t[n].value);for(;n--;)this.opcode("assignToHash",t[n].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:oy.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var t=Un.default.helpers.simpleId(e.path),n=t&&!!this.blockParamIndex(e.path.parts[0]),r=!n&&Un.default.helpers.helperExpression(e),s=!n&&(r||t);if(s&&!r){var o=e.path.parts[0],a=this.options;a.knownHelpers[o]?r=!0:a.knownHelpersOnly&&(s=!1)}return r?"helper":s?"ambiguous":"simple"},pushParams:function(e){for(var t=0,n=e.length;t<n;t++)this.pushParam(e[t])},pushParam:function(e){var t=e.value!=null?e.value:e.original||"";if(this.stringParams)t.replace&&(t=t.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",t,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var n=void 0;if(e.parts&&!Un.default.helpers.scopedId(e)&&!e.depth&&(n=this.blockParamIndex(e.parts[0])),n){var r=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,r)}else t=e.original||t,t.replace&&(t=t.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,t)}this.accept(e)}},setupFullMustacheParams:function(e,t,n,r){var s=e.params;return this.pushParams(s),this.opcode("pushProgram",t),this.opcode("pushProgram",n),e.hash?this.accept(e.hash):this.opcode("emptyHash",r),s},blockParamIndex:function(e){for(var t=0,n=this.options.blockParams.length;t<n;t++){var r=this.options.blockParams[t],s=r&&zn.indexOf(r,e);if(r&&s>=0)return[t,s]}}};function ay(i,e,t){if(i==null||typeof i!="string"&&i.type!=="Program")throw new Gn.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+i);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=t.parse(i,e),r=new t.Compiler().compile(n,e);return new t.JavaScriptCompiler().compile(r,e)}function ly(i,e,t){if(e===void 0&&(e={}),i==null||typeof i!="string"&&i.type!=="Program")throw new Gn.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+i);e=zn.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=void 0;function r(){var o=t.parse(i,e),a=new t.Compiler().compile(o,e),c=new t.JavaScriptCompiler().compile(a,e,void 0,!0);return t.template(c)}function s(o,a){return n||(n=r()),n.call(this,o,a)}return s._setup=function(o){return n||(n=r()),n._setup(o)},s._child=function(o,a,c,l){return n||(n=r()),n._child(o,a,c,l)},s}function wh(i,e){if(i===e)return!0;if(zn.isArray(i)&&zn.isArray(e)&&i.length===e.length){for(var t=0;t<i.length;t++)if(!wh(i[t],e[t]))return!1;return!0}}function yh(i){if(!i.path.parts){var e=i.path;i.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}});var xh=W(ta=>{var Sh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ta.encode=function(i){if(0<=i&&i<Sh.length)return Sh[i];throw new TypeError("Must be between 0 and 63: "+i)};ta.decode=function(i){var e=65,t=90,n=97,r=122,s=48,o=57,a=43,c=47,l=26,f=52;return e<=i&&i<=t?i-e:n<=i&&i<=r?i-n+l:s<=i&&i<=o?i-s+f:i==a?62:i==c?63:-1}});var ra=W(ia=>{var Eh=xh(),na=5,Ch=1<<na,kh=Ch-1,Ah=Ch;function cy(i){return i<0?(-i<<1)+1:(i<<1)+0}function uy(i){var e=(i&1)===1,t=i>>1;return e?-t:t}ia.encode=function(e){var t="",n,r=cy(e);do n=r&kh,r>>>=na,r>0&&(n|=Ah),t+=Eh.encode(n);while(r>0);return t};ia.decode=function(e,t,n){var r=e.length,s=0,o=0,a,c;do{if(t>=r)throw new Error("Expected more digits in base 64 VLQ value.");if(c=Eh.decode(e.charCodeAt(t++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));a=!!(c&Ah),c&=kh,s=s+(c<<o),o+=na}while(a);n.value=uy(s),n.rest=t}});var Xt=W(xe=>{function hy(i,e,t){if(e in i)return i[e];if(arguments.length===3)return t;throw new Error('"'+e+'" is a required argument.')}xe.getArg=hy;var Oh=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,fy=/^data:.+\,.+$/;function Yn(i){var e=i.match(Oh);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}xe.urlParse=Yn;function Kt(i){var e="";return i.scheme&&(e+=i.scheme+":"),e+="//",i.auth&&(e+=i.auth+"@"),i.host&&(e+=i.host),i.port&&(e+=":"+i.port),i.path&&(e+=i.path),e}xe.urlGenerate=Kt;function sa(i){var e=i,t=Yn(i);if(t){if(!t.path)return i;e=t.path}for(var n=xe.isAbsolute(e),r=e.split(/\/+/),s,o=0,a=r.length-1;a>=0;a--)s=r[a],s==="."?r.splice(a,1):s===".."?o++:o>0&&(s===""?(r.splice(a+1,o),o=0):(r.splice(a,2),o--));return e=r.join("/"),e===""&&(e=n?"/":"."),t?(t.path=e,Kt(t)):e}xe.normalize=sa;function Ph(i,e){i===""&&(i="."),e===""&&(e=".");var t=Yn(e),n=Yn(i);if(n&&(i=n.path||"/"),t&&!t.scheme)return n&&(t.scheme=n.scheme),Kt(t);if(t||e.match(fy))return e;if(n&&!n.host&&!n.path)return n.host=e,Kt(n);var r=e.charAt(0)==="/"?e:sa(i.replace(/\/+$/,"")+"/"+e);return n?(n.path=r,Kt(n)):r}xe.join=Ph;xe.isAbsolute=function(i){return i.charAt(0)==="/"||Oh.test(i)};function dy(i,e){i===""&&(i="."),i=i.replace(/\/$/,"");for(var t=0;e.indexOf(i+"/")!==0;){var n=i.lastIndexOf("/");if(n<0||(i=i.slice(0,n),i.match(/^([^\/]+:\/)?\/*$/)))return e;++t}return Array(t+1).join("../")+e.substr(i.length+1)}xe.relative=dy;var Rh=(function(){var i=Object.create(null);return!("__proto__"in i)})();function Ih(i){return i}function py(i){return Lh(i)?"$"+i:i}xe.toSetString=Rh?Ih:py;function my(i){return Lh(i)?i.slice(1):i}xe.fromSetString=Rh?Ih:my;function Lh(i){if(!i)return!1;var e=i.length;if(e<9||i.charCodeAt(e-1)!==95||i.charCodeAt(e-2)!==95||i.charCodeAt(e-3)!==111||i.charCodeAt(e-4)!==116||i.charCodeAt(e-5)!==111||i.charCodeAt(e-6)!==114||i.charCodeAt(e-7)!==112||i.charCodeAt(e-8)!==95||i.charCodeAt(e-9)!==95)return!1;for(var t=e-10;t>=0;t--)if(i.charCodeAt(t)!==36)return!1;return!0}function gy(i,e,t){var n=Qt(i.source,e.source);return n!==0||(n=i.originalLine-e.originalLine,n!==0)||(n=i.originalColumn-e.originalColumn,n!==0||t)||(n=i.generatedColumn-e.generatedColumn,n!==0)||(n=i.generatedLine-e.generatedLine,n!==0)?n:Qt(i.name,e.name)}xe.compareByOriginalPositions=gy;function _y(i,e,t){var n=i.generatedLine-e.generatedLine;return n!==0||(n=i.generatedColumn-e.generatedColumn,n!==0||t)||(n=Qt(i.source,e.source),n!==0)||(n=i.originalLine-e.originalLine,n!==0)||(n=i.originalColumn-e.originalColumn,n!==0)?n:Qt(i.name,e.name)}xe.compareByGeneratedPositionsDeflated=_y;function Qt(i,e){return i===e?0:i===null?1:e===null?-1:i>e?1:-1}function yy(i,e){var t=i.generatedLine-e.generatedLine;return t!==0||(t=i.generatedColumn-e.generatedColumn,t!==0)||(t=Qt(i.source,e.source),t!==0)||(t=i.originalLine-e.originalLine,t!==0)||(t=i.originalColumn-e.originalColumn,t!==0)?t:Qt(i.name,e.name)}xe.compareByGeneratedPositionsInflated=yy;function by(i){return JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}xe.parseSourceMapInput=by;function wy(i,e,t){if(e=e||"",i&&(i[i.length-1]!=="/"&&e[0]!=="/"&&(i+="/"),e=i+e),t){var n=Yn(t);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var r=n.path.lastIndexOf("/");r>=0&&(n.path=n.path.substring(0,r+1))}e=Ph(Kt(n),e)}return sa(e)}xe.computeSourceURL=wy});var la=W(Dh=>{var oa=Xt(),aa=Object.prototype.hasOwnProperty,Nt=typeof Map<"u";function mt(){this._array=[],this._set=Nt?new Map:Object.create(null)}mt.fromArray=function(e,t){for(var n=new mt,r=0,s=e.length;r<s;r++)n.add(e[r],t);return n};mt.prototype.size=function(){return Nt?this._set.size:Object.getOwnPropertyNames(this._set).length};mt.prototype.add=function(e,t){var n=Nt?e:oa.toSetString(e),r=Nt?this.has(e):aa.call(this._set,n),s=this._array.length;(!r||t)&&this._array.push(e),r||(Nt?this._set.set(e,s):this._set[n]=s)};mt.prototype.has=function(e){if(Nt)return this._set.has(e);var t=oa.toSetString(e);return aa.call(this._set,t)};mt.prototype.indexOf=function(e){if(Nt){var t=this._set.get(e);if(t>=0)return t}else{var n=oa.toSetString(e);if(aa.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};mt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};mt.prototype.toArray=function(){return this._array.slice()};Dh.ArraySet=mt});var Mh=W(Nh=>{var Th=Xt();function vy(i,e){var t=i.generatedLine,n=e.generatedLine,r=i.generatedColumn,s=e.generatedColumn;return n>t||n==t&&s>=r||Th.compareByGeneratedPositionsInflated(i,e)<=0}function xr(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}xr.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)};xr.prototype.add=function(e){vy(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};xr.prototype.toArray=function(){return this._sorted||(this._array.sort(Th.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Nh.MappingList=xr});var ca=W(Fh=>{var Jn=ra(),ue=Xt(),Er=la().ArraySet,Sy=Mh().MappingList;function ze(i){i||(i={}),this._file=ue.getArg(i,"file",null),this._sourceRoot=ue.getArg(i,"sourceRoot",null),this._skipValidation=ue.getArg(i,"skipValidation",!1),this._sources=new Er,this._names=new Er,this._mappings=new Sy,this._sourcesContents=null}ze.prototype._version=3;ze.fromSourceMap=function(e){var t=e.sourceRoot,n=new ze({file:e.file,sourceRoot:t});return e.eachMapping(function(r){var s={generated:{line:r.generatedLine,column:r.generatedColumn}};r.source!=null&&(s.source=r.source,t!=null&&(s.source=ue.relative(t,s.source)),s.original={line:r.originalLine,column:r.originalColumn},r.name!=null&&(s.name=r.name)),n.addMapping(s)}),e.sources.forEach(function(r){var s=r;t!==null&&(s=ue.relative(t,r)),n._sources.has(s)||n._sources.add(s);var o=e.sourceContentFor(r);o!=null&&n.setSourceContent(r,o)}),n};ze.prototype.addMapping=function(e){var t=ue.getArg(e,"generated"),n=ue.getArg(e,"original",null),r=ue.getArg(e,"source",null),s=ue.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,s),r!=null&&(r=String(r),this._sources.has(r)||this._sources.add(r)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:r,name:s})};ze.prototype.setSourceContent=function(e,t){var n=e;this._sourceRoot!=null&&(n=ue.relative(this._sourceRoot,n)),t!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ue.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[ue.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};ze.prototype.applySourceMap=function(e,t,n){var r=t;if(t==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);r=e.file}var s=this._sourceRoot;s!=null&&(r=ue.relative(s,r));var o=new Er,a=new Er;this._mappings.unsortedForEach(function(c){if(c.source===r&&c.originalLine!=null){var l=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,n!=null&&(c.source=ue.join(n,c.source)),s!=null&&(c.source=ue.relative(s,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var f=c.source;f!=null&&!o.has(f)&&o.add(f);var h=c.name;h!=null&&!a.has(h)&&a.add(h)},this),this._sources=o,this._names=a,e.sources.forEach(function(c){var l=e.sourceContentFor(c);l!=null&&(n!=null&&(c=ue.join(n,c)),s!=null&&(c=ue.relative(s,c)),this.setSourceContent(c,l))},this)};ze.prototype._validateMapping=function(e,t,n,r){if(t&&typeof t.line!="number"&&typeof t.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!n&&!r)){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))}};ze.prototype._serializeMappings=function(){for(var e=0,t=1,n=0,r=0,s=0,o=0,a="",c,l,f,h,p=this._mappings.toArray(),m=0,_=p.length;m<_;m++){if(l=p[m],c="",l.generatedLine!==t)for(e=0;l.generatedLine!==t;)c+=";",t++;else if(m>0){if(!ue.compareByGeneratedPositionsInflated(l,p[m-1]))continue;c+=","}c+=Jn.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(h=this._sources.indexOf(l.source),c+=Jn.encode(h-o),o=h,c+=Jn.encode(l.originalLine-1-r),r=l.originalLine-1,c+=Jn.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(f=this._names.indexOf(l.name),c+=Jn.encode(f-s),s=f)),a+=c}return a};ze.prototype._generateSourcesContent=function(e,t){return e.map(function(n){if(!this._sourcesContents)return null;t!=null&&(n=ue.relative(t,n));var r=ue.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)};ze.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};ze.prototype.toString=function(){return JSON.stringify(this.toJSON())};Fh.SourceMapGenerator=ze});var Bh=W(Mt=>{Mt.GREATEST_LOWER_BOUND=1;Mt.LEAST_UPPER_BOUND=2;function ua(i,e,t,n,r,s){var o=Math.floor((e-i)/2)+i,a=r(t,n[o],!0);return a===0?o:a>0?e-o>1?ua(o,e,t,n,r,s):s==Mt.LEAST_UPPER_BOUND?e<n.length?e:-1:o:o-i>1?ua(i,o,t,n,r,s):s==Mt.LEAST_UPPER_BOUND?o:i<0?-1:i}Mt.search=function(e,t,n,r){if(t.length===0)return-1;var s=ua(-1,t.length,e,t,n,r||Mt.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(t[s],t[s-1],!0)===0;)--s;return s}});var Hh=W(qh=>{function ha(i,e,t){var n=i[e];i[e]=i[t],i[t]=n}function xy(i,e){return Math.round(i+Math.random()*(e-i))}function fa(i,e,t,n){if(t<n){var r=xy(t,n),s=t-1;ha(i,r,n);for(var o=i[n],a=t;a<n;a++)e(i[a],o)<=0&&(s+=1,ha(i,s,a));ha(i,s+1,a);var c=s+1;fa(i,e,t,c-1),fa(i,e,c+1,n)}}qh.quickSort=function(i,e){fa(i,e,0,i.length-1)}});var jh=W(Cr=>{var F=Xt(),da=Bh(),Zt=la().ArraySet,Ey=ra(),Kn=Hh().quickSort;function Z(i,e){var t=i;return typeof i=="string"&&(t=F.parseSourceMapInput(i)),t.sections!=null?new Qe(t,e):new be(t,e)}Z.fromSourceMap=function(i,e){return be.fromSourceMap(i,e)};Z.prototype._version=3;Z.prototype.__generatedMappings=null;Object.defineProperty(Z.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});Z.prototype.__originalMappings=null;Object.defineProperty(Z.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});Z.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return n===";"||n===","};Z.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")};Z.GENERATED_ORDER=1;Z.ORIGINAL_ORDER=2;Z.GREATEST_LOWER_BOUND=1;Z.LEAST_UPPER_BOUND=2;Z.prototype.eachMapping=function(e,t,n){var r=t||null,s=n||Z.GENERATED_ORDER,o;switch(s){case Z.GENERATED_ORDER:o=this._generatedMappings;break;case Z.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;o.map(function(c){var l=c.source===null?null:this._sources.at(c.source);return l=F.computeSourceURL(a,l,this._sourceMapURL),{source:l,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(e,r)};Z.prototype.allGeneratedPositionsFor=function(e){var t=F.getArg(e,"line"),n={source:F.getArg(e,"source"),originalLine:t,originalColumn:F.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var r=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,da.LEAST_UPPER_BOUND);if(s>=0){var o=this._originalMappings[s];if(e.column===void 0)for(var a=o.originalLine;o&&o.originalLine===a;)r.push({line:F.getArg(o,"generatedLine",null),column:F.getArg(o,"generatedColumn",null),lastColumn:F.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var c=o.originalColumn;o&&o.originalLine===t&&o.originalColumn==c;)r.push({line:F.getArg(o,"generatedLine",null),column:F.getArg(o,"generatedColumn",null),lastColumn:F.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return r};Cr.SourceMapConsumer=Z;function be(i,e){var t=i;typeof i=="string"&&(t=F.parseSourceMapInput(i));var n=F.getArg(t,"version"),r=F.getArg(t,"sources"),s=F.getArg(t,"names",[]),o=F.getArg(t,"sourceRoot",null),a=F.getArg(t,"sourcesContent",null),c=F.getArg(t,"mappings"),l=F.getArg(t,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=F.normalize(o)),r=r.map(String).map(F.normalize).map(function(f){return o&&F.isAbsolute(o)&&F.isAbsolute(f)?F.relative(o,f):f}),this._names=Zt.fromArray(s.map(String),!0),this._sources=Zt.fromArray(r,!0),this._absoluteSources=this._sources.toArray().map(function(f){return F.computeSourceURL(o,f,e)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=l}be.prototype=Object.create(Z.prototype);be.prototype.consumer=Z;be.prototype._findSourceIndex=function(i){var e=i;if(this.sourceRoot!=null&&(e=F.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var t;for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==i)return t;return-1};be.fromSourceMap=function(e,t){var n=Object.create(be.prototype),r=n._names=Zt.fromArray(e._names.toArray(),!0),s=n._sources=Zt.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=t,n._absoluteSources=n._sources.toArray().map(function(m){return F.computeSourceURL(n.sourceRoot,m,t)});for(var o=e._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],l=0,f=o.length;l<f;l++){var h=o[l],p=new Wh;p.generatedLine=h.generatedLine,p.generatedColumn=h.generatedColumn,h.source&&(p.source=s.indexOf(h.source),p.originalLine=h.originalLine,p.originalColumn=h.originalColumn,h.name&&(p.name=r.indexOf(h.name)),c.push(p)),a.push(p)}return Kn(n.__originalMappings,F.compareByOriginalPositions),n};be.prototype._version=3;Object.defineProperty(be.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Wh(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}be.prototype._parseMappings=function(e,t){for(var n=1,r=0,s=0,o=0,a=0,c=0,l=e.length,f=0,h={},p={},m=[],_=[],g,k,w,S,P;f<l;)if(e.charAt(f)===";")n++,f++,r=0;else if(e.charAt(f)===",")f++;else{for(g=new Wh,g.generatedLine=n,S=f;S<l&&!this._charIsMappingSeparator(e,S);S++);if(k=e.slice(f,S),w=h[k],w)f+=k.length;else{for(w=[];f<S;)Ey.decode(e,f,p),P=p.value,f=p.rest,w.push(P);if(w.length===2)throw new Error("Found a source, but no line and column");if(w.length===3)throw new Error("Found a source and line, but no column");h[k]=w}g.generatedColumn=r+w[0],r=g.generatedColumn,w.length>1&&(g.source=a+w[1],a+=w[1],g.originalLine=s+w[2],s=g.originalLine,g.originalLine+=1,g.originalColumn=o+w[3],o=g.originalColumn,w.length>4&&(g.name=c+w[4],c+=w[4])),_.push(g),typeof g.originalLine=="number"&&m.push(g)}Kn(_,F.compareByGeneratedPositionsDeflated),this.__generatedMappings=_,Kn(m,F.compareByOriginalPositions),this.__originalMappings=m};be.prototype._findMapping=function(e,t,n,r,s,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return da.search(e,t,s,o)};be.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}};be.prototype.originalPositionFor=function(e){var t={generatedLine:F.getArg(e,"line"),generatedColumn:F.getArg(e,"column")},n=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",F.compareByGeneratedPositionsDeflated,F.getArg(e,"bias",Z.GREATEST_LOWER_BOUND));if(n>=0){var r=this._generatedMappings[n];if(r.generatedLine===t.generatedLine){var s=F.getArg(r,"source",null);s!==null&&(s=this._sources.at(s),s=F.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=F.getArg(r,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:F.getArg(r,"originalLine",null),column:F.getArg(r,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};be.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};be.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var r=e;this.sourceRoot!=null&&(r=F.relative(this.sourceRoot,r));var s;if(this.sourceRoot!=null&&(s=F.urlParse(this.sourceRoot))){var o=r.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!s.path||s.path=="/")&&this._sources.has("/"+r))return this.sourcesContent[this._sources.indexOf("/"+r)]}if(t)return null;throw new Error('"'+r+'" is not in the SourceMap.')};be.prototype.generatedPositionFor=function(e){var t=F.getArg(e,"source");if(t=this._findSourceIndex(t),t<0)return{line:null,column:null,lastColumn:null};var n={source:t,originalLine:F.getArg(e,"line"),originalColumn:F.getArg(e,"column")},r=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,F.getArg(e,"bias",Z.GREATEST_LOWER_BOUND));if(r>=0){var s=this._originalMappings[r];if(s.source===n.source)return{line:F.getArg(s,"generatedLine",null),column:F.getArg(s,"generatedColumn",null),lastColumn:F.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Cr.BasicSourceMapConsumer=be;function Qe(i,e){var t=i;typeof i=="string"&&(t=F.parseSourceMapInput(i));var n=F.getArg(t,"version"),r=F.getArg(t,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Zt,this._names=new Zt;var s={line:-1,column:0};this._sections=r.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var a=F.getArg(o,"offset"),c=F.getArg(a,"line"),l=F.getArg(a,"column");if(c<s.line||c===s.line&&l<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=a,{generatedOffset:{generatedLine:c+1,generatedColumn:l+1},consumer:new Z(F.getArg(o,"map"),e)}})}Qe.prototype=Object.create(Z.prototype);Qe.prototype.constructor=Z;Qe.prototype._version=3;Object.defineProperty(Qe.prototype,"sources",{get:function(){for(var i=[],e=0;e<this._sections.length;e++)for(var t=0;t<this._sections[e].consumer.sources.length;t++)i.push(this._sections[e].consumer.sources[t]);return i}});Qe.prototype.originalPositionFor=function(e){var t={generatedLine:F.getArg(e,"line"),generatedColumn:F.getArg(e,"column")},n=da.search(t,this._sections,function(s,o){var a=s.generatedLine-o.generatedOffset.generatedLine;return a||s.generatedColumn-o.generatedOffset.generatedColumn}),r=this._sections[n];return r?r.consumer.originalPositionFor({line:t.generatedLine-(r.generatedOffset.generatedLine-1),column:t.generatedColumn-(r.generatedOffset.generatedLine===t.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};Qe.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};Qe.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n],s=r.consumer.sourceContentFor(e,!0);if(s)return s}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')};Qe.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var n=this._sections[t];if(n.consumer._findSourceIndex(F.getArg(e,"source"))!==-1){var r=n.consumer.generatedPositionFor(e);if(r){var s={line:r.line+(n.generatedOffset.generatedLine-1),column:r.column+(n.generatedOffset.generatedLine===r.line?n.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};Qe.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var r=this._sections[n],s=r.consumer._generatedMappings,o=0;o<s.length;o++){var a=s[o],c=r.consumer._sources.at(a.source);c=F.computeSourceURL(r.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var l=null;a.name&&(l=r.consumer._names.at(a.name),this._names.add(l),l=this._names.indexOf(l));var f={source:c,generatedLine:a.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(r.generatedOffset.generatedLine===a.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:l};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}Kn(this.__generatedMappings,F.compareByGeneratedPositionsDeflated),Kn(this.__originalMappings,F.compareByOriginalPositions)};Cr.IndexedSourceMapConsumer=Qe});var Uh=W(Vh=>{var Cy=ca().SourceMapGenerator,kr=Xt(),ky=/(\r?\n)/,Ay=10,en="$$$isSourceNode$$$";function Be(i,e,t,n,r){this.children=[],this.sourceContents={},this.line=i??null,this.column=e??null,this.source=t??null,this.name=r??null,this[en]=!0,n!=null&&this.add(n)}Be.fromStringWithSourceMap=function(e,t,n){var r=new Be,s=e.split(ky),o=0,a=function(){var p=_(),m=_()||"";return p+m;function _(){return o<s.length?s[o++]:void 0}},c=1,l=0,f=null;return t.eachMapping(function(p){if(f!==null)if(c<p.generatedLine)h(f,a()),c++,l=0;else{var m=s[o]||"",_=m.substr(0,p.generatedColumn-l);s[o]=m.substr(p.generatedColumn-l),l=p.generatedColumn,h(f,_),f=p;return}for(;c<p.generatedLine;)r.add(a()),c++;if(l<p.generatedColumn){var m=s[o]||"";r.add(m.substr(0,p.generatedColumn)),s[o]=m.substr(p.generatedColumn),l=p.generatedColumn}f=p},this),o<s.length&&(f&&h(f,a()),r.add(s.splice(o).join(""))),t.sources.forEach(function(p){var m=t.sourceContentFor(p);m!=null&&(n!=null&&(p=kr.join(n,p)),r.setSourceContent(p,m))}),r;function h(p,m){if(p===null||p.source===void 0)r.add(m);else{var _=n?kr.join(n,p.source):p.source;r.add(new Be(p.originalLine,p.originalColumn,_,m,p.name))}}};Be.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(t){this.add(t)},this);else if(e[en]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Be.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[en]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Be.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)t=this.children[n],t[en]?t.walk(e):t!==""&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})};Be.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this};Be.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[en]?n.replaceRight(e,t):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this};Be.prototype.setSourceContent=function(e,t){this.sourceContents[kr.toSetString(e)]=t};Be.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;t<n;t++)this.children[t][en]&&this.children[t].walkSourceContents(e);for(var r=Object.keys(this.sourceContents),t=0,n=r.length;t<n;t++)e(kr.fromSetString(r[t]),this.sourceContents[r[t]])};Be.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e};Be.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},n=new Cy(e),r=!1,s=null,o=null,a=null,c=null;return this.walk(function(l,f){t.code+=l,f.source!==null&&f.line!==null&&f.column!==null?((s!==f.source||o!==f.line||a!==f.column||c!==f.name)&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:t.line,column:t.column},name:f.name}),s=f.source,o=f.line,a=f.column,c=f.name,r=!0):r&&(n.addMapping({generated:{line:t.line,column:t.column}}),s=null,r=!1);for(var h=0,p=l.length;h<p;h++)l.charCodeAt(h)===Ay?(t.line++,t.column=0,h+1===p?(s=null,r=!1):r&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:t.line,column:t.column},name:f.name})):t.column++}),this.walkSourceContents(function(l,f){n.setSourceContent(l,f)}),{code:t.code,map:n}};Vh.SourceNode=Be});var Gh=W(Ar=>{Ar.SourceMapGenerator=ca().SourceMapGenerator;Ar.SourceMapConsumer=jh().SourceMapConsumer;Ar.SourceNode=Uh().SourceNode});var Jh=W((Or,Yh)=>{"use strict";Or.__esModule=!0;var ma=Oe(),Ft=void 0;try{(typeof define!="function"||!define.amd)&&(zh=Gh(),Ft=zh.SourceNode)}catch{}var zh;Ft||(Ft=function(i,e,t,n){this.src="",n&&this.add(n)},Ft.prototype={add:function(e){ma.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){ma.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function pa(i,e,t){if(ma.isArray(i)){for(var n=[],r=0,s=i.length;r<s;r++)n.push(e.wrap(i[r],t));return n}else if(typeof i=="boolean"||typeof i=="number")return i+"";return i}function $h(i){this.srcFile=i,this.source=[]}$h.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,t){this.source.unshift(this.wrap(e,t))},push:function(e,t){this.source.push(this.wrap(e,t))},merge:function(){var e=this.empty();return this.each(function(t){e.add([" ",t,`
38
- `])}),e},each:function(e){for(var t=0,n=this.source.length;t<n;t++)e(this.source[t])},empty:function(){var e=this.currentLocation||{start:{}};return new Ft(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var t=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Ft?e:(e=pa(e,this,t),new Ft(t.start.line,t.start.column,this.srcFile,e))},functionCall:function(e,t,n){return n=this.generateList(n),this.wrap([e,t?"."+t+"(":"(",n,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var t=this,n=[];Object.keys(e).forEach(function(s){var o=pa(e[s],t);o!=="undefined"&&n.push([t.quotedString(s),":",o])});var r=this.generateList(n);return r.prepend("{"),r.add("}"),r},generateList:function(e){for(var t=this.empty(),n=0,r=e.length;n<r;n++)n&&t.add(","),t.add(pa(e[n],this));return t},generateArray:function(e){var t=this.generateList(e);return t.prepend("["),t.add("]"),t}};Or.default=$h;Yh.exports=Or.default});var ef=W((Pr,Zh)=>{"use strict";Pr.__esModule=!0;function Xh(i){return i&&i.__esModule?i:{default:i}}var Kh=cr(),Oy=Fe(),ga=Xh(Oy),Py=Oe(),Ry=Jh(),Qh=Xh(Ry);function tn(i){this.value=i}function nn(){}nn.prototype={nameLookup:function(e,t){return this.internalNameLookup(e,t)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=Kh.COMPILER_REVISION,t=Kh.REVISION_CHANGES[e];return[e,t]},appendToBuffer:function(e,t,n){return Py.isArray(e)||(e=[e]),e=this.source.wrap(e,t),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,t){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(t),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,t,n,r){this.environment=e,this.options=t,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!r,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,t),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var s=e.opcodes,o=void 0,a=void 0,c=void 0,l=void 0;for(c=0,l=s.length;c<l;c++)o=s[c],this.source.currentLocation=o.loc,a=a||o.loc,this[o.opcode].apply(this,o.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new ga.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
35
+ Expecting `+z.join(", ")+", got '"+(this.terminals_[D]||D)+"'":ge="Parse error on line "+(h+1)+": Unexpected "+(D==1?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(ge,{text:this.lexer.match,token:this.terminals_[D]||D,line:this.lexer.yylineno,loc:k,expected:z})}}if(J[0]instanceof Array&&J.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+D);switch(J[0]){case 1:o.push(D),a.push(this.lexer.yytext),l.push(this.lexer.yylloc),o.push(J[1]),D=null,B?(D=B,B=null):(p=this.lexer.yyleng,f=this.lexer.yytext,h=this.lexer.yylineno,k=this.lexer.yylloc,m>0&&m--);break;case 2:if(ce=this.productions_[J[1]][1],se.$=a[a.length-ce],se._$={first_line:l[l.length-(ce||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(ce||1)].first_column,last_column:l[l.length-1].last_column},w&&(se._$.range=[l[l.length-(ce||1)].range[0],l[l.length-1].range[1]]),le=this.performAction.call(se,f,p,h,this.yy,J[1],a,l),typeof le<"u")return le;ce&&(o=o.slice(0,-1*ce*2),a=a.slice(0,-1*ce),l=l.slice(0,-1*ce)),o.push(this.productions_[J[1]][0]),a.push(se.$),l.push(se._$),V=c[o[o.length-2]][o[o.length-1]],o.push(V);break;case 3:return!0}}return!0}},e=(function(){var n={EOF:1,parseError:function(s,o){if(this.yy.parser)this.yy.parser.parseError(s,o);else throw new Error(s)},setInput:function(s){return this._input=s,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},unput:function(s){var o=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o-1),this.offset-=o;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var c=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===l.length?this.yylloc.first_column:0)+l[l.length-a.length].length-a[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[c[0],c[0]+this.yyleng-o]),this},more:function(){return this._more=!0,this},less:function(s){this.unput(this.match.slice(s))},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
36
+ `+o+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,o,a,l,c,f;this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),p=0;p<h.length&&(a=this._input.match(this.rules[h[p]]),!(a&&(!o||a[0].length>o[0].length)&&(o=a,l=p,!this.options.flex)));p++);return o?(f=o[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],s=this.performAction.call(this,this.yy,this,h[l],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
37
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return typeof s<"u"?s:this.lex()},begin:function(s){this.conditionStack.push(s)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(s){this.begin(s)}};return n.options={},n.performAction=function(s,o,a,l){function c(h,p){return o.yytext=o.yytext.substring(h,o.yyleng-p+h)}var f=l;switch(a){case 0:if(o.yytext.slice(-2)==="\\\\"?(c(0,1),this.begin("mu")):o.yytext.slice(-1)==="\\"?(c(0,1),this.begin("emu")):this.begin("mu"),o.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(c(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(o.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return o.yytext=c(1,2).replace(/\\"/g,'"'),80;break;case 32:return o.yytext=c(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return o.yytext=o.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();i.lexer=e;function t(){this.yy={}}return t.prototype=i,i.Parser=t,new t})();gr.default=P_;lh.exports=gr.default});var wr=W((br,fh)=>{"use strict";br.__esModule=!0;function R_(i){return i&&i.__esModule?i:{default:i}}var I_=Fe(),zo=R_(I_);function _r(){this.parents=[]}_r.prototype={constructor:_r,mutating:!1,acceptKey:function(e,t){var n=this.accept(e[t]);if(this.mutating){if(n&&!_r.prototype[n.type])throw new zo.default('Unexpected node type "'+n.type+'" found when accepting '+t+" on "+e.type);e[t]=n}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new zo.default(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,n=e.length;t<n;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,n--)},accept:function(e){if(e){if(!this[e.type])throw new zo.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var t=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||t)return t;if(t!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:yr,Decorator:yr,BlockStatement:uh,DecoratorBlock:uh,PartialStatement:hh,PartialBlockStatement:function(e){hh.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:yr,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,"value")}};function yr(i){this.acceptRequired(i,"path"),this.acceptArray(i.params),this.acceptKey(i,"hash")}function uh(i){yr.call(this,i),this.acceptKey(i,"program"),this.acceptKey(i,"inverse")}function hh(i){this.acceptRequired(i,"name"),this.acceptArray(i.params),this.acceptKey(i,"hash")}br.default=_r;fh.exports=br.default});var ph=W((vr,dh)=>{"use strict";vr.__esModule=!0;function L_(i){return i&&i.__esModule?i:{default:i}}var D_=wr(),T_=L_(D_);function nt(){var i=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=i}nt.prototype=new T_.default;nt.prototype.Program=function(i){var e=!this.options.ignoreStandalone,t=!this.isRootSeen;this.isRootSeen=!0;for(var n=i.body,r=0,s=n.length;r<s;r++){var o=n[r],a=this.accept(o);if(a){var l=$o(n,r,t),c=Yo(n,r,t),f=a.openStandalone&&l,h=a.closeStandalone&&c,p=a.inlineStandalone&&l&&c;a.close&&Tt(n,r,!0),a.open&&Ct(n,r,!0),e&&p&&(Tt(n,r),Ct(n,r)&&o.type==="PartialStatement"&&(o.indent=/([ \t]+$)/.exec(n[r-1].original)[1])),e&&f&&(Tt((o.program||o.inverse).body),Ct(n,r)),e&&h&&(Tt(n,r),Ct((o.inverse||o.program).body))}}return i};nt.prototype.BlockStatement=nt.prototype.DecoratorBlock=nt.prototype.PartialBlockStatement=function(i){this.accept(i.program),this.accept(i.inverse);var e=i.program||i.inverse,t=i.program&&i.inverse,n=t,r=t;if(t&&t.chained)for(n=t.body[0].program;r.chained;)r=r.body[r.body.length-1].program;var s={open:i.openStrip.open,close:i.closeStrip.close,openStandalone:Yo(e.body),closeStandalone:$o((n||e).body)};if(i.openStrip.close&&Tt(e.body,null,!0),t){var o=i.inverseStrip;o.open&&Ct(e.body,null,!0),o.close&&Tt(n.body,null,!0),i.closeStrip.open&&Ct(r.body,null,!0),!this.options.ignoreStandalone&&$o(e.body)&&Yo(n.body)&&(Ct(e.body),Tt(n.body))}else i.closeStrip.open&&Ct(e.body,null,!0);return s};nt.prototype.Decorator=nt.prototype.MustacheStatement=function(i){return i.strip};nt.prototype.PartialStatement=nt.prototype.CommentStatement=function(i){var e=i.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function $o(i,e,t){e===void 0&&(e=i.length);var n=i[e-1],r=i[e-2];if(!n)return t;if(n.type==="ContentStatement")return(r||!t?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function Yo(i,e,t){e===void 0&&(e=-1);var n=i[e+1],r=i[e+2];if(!n)return t;if(n.type==="ContentStatement")return(r||!t?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function Tt(i,e,t){var n=i[e==null?0:e+1];if(!(!n||n.type!=="ContentStatement"||!t&&n.rightStripped)){var r=n.value;n.value=n.value.replace(t?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==r}}function Ct(i,e,t){var n=i[e==null?i.length-1:e-1];if(!(!n||n.type!=="ContentStatement"||!t&&n.leftStripped)){var r=n.value;return n.value=n.value.replace(t?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==r,n.leftStripped}}vr.default=nt;dh.exports=vr.default});var mh=W(Ge=>{"use strict";Ge.__esModule=!0;Ge.SourceLocation=F_;Ge.id=B_;Ge.stripFlags=q_;Ge.stripComment=H_;Ge.preparePath=W_;Ge.prepareMustache=j_;Ge.prepareRawBlock=V_;Ge.prepareBlock=U_;Ge.prepareProgram=G_;Ge.preparePartialBlock=z_;function N_(i){return i&&i.__esModule?i:{default:i}}var M_=Fe(),Jo=N_(M_);function Ko(i,e){if(e=e.path?e.path.original:e,i.path.original!==e){var t={loc:i.path.loc};throw new Jo.default(i.path.original+" doesn't match "+e,t)}}function F_(i,e){this.source=i,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function B_(i){return/^\[.*\]$/.test(i)?i.substring(1,i.length-1):i}function q_(i,e){return{open:i.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function H_(i){return i.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function W_(i,e,t){t=this.locInfo(t);for(var n=i?"@":"",r=[],s=0,o=0,a=e.length;o<a;o++){var l=e[o].part,c=e[o].original!==l;if(n+=(e[o].separator||"")+l,!c&&(l===".."||l==="."||l==="this")){if(r.length>0)throw new Jo.default("Invalid path: "+n,{loc:t});l===".."&&s++}else r.push(l)}return{type:"PathExpression",data:i,depth:s,parts:r,original:n,loc:t}}function j_(i,e,t,n,r,s){var o=n.charAt(3)||n.charAt(2),a=o!=="{"&&o!=="&",l=/\*/.test(n);return{type:l?"Decorator":"MustacheStatement",path:i,params:e,hash:t,escaped:a,strip:r,loc:this.locInfo(s)}}function V_(i,e,t,n){Ko(i,t),n=this.locInfo(n);var r={type:"Program",body:e,strip:{},loc:n};return{type:"BlockStatement",path:i.path,params:i.params,hash:i.hash,program:r,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function U_(i,e,t,n,r,s){n&&n.path&&Ko(i,n);var o=/\*/.test(i.open);e.blockParams=i.blockParams;var a=void 0,l=void 0;if(t){if(o)throw new Jo.default("Unexpected inverse block on decorator",t);t.chain&&(t.program.body[0].closeStrip=n.strip),l=t.strip,a=t.program}return r&&(r=a,a=e,e=r),{type:o?"DecoratorBlock":"BlockStatement",path:i.path,params:i.params,hash:i.hash,program:e,inverse:a,openStrip:i.strip,inverseStrip:l,closeStrip:n&&n.strip,loc:this.locInfo(s)}}function G_(i,e){if(!e&&i.length){var t=i[0].loc,n=i[i.length-1].loc;t&&n&&(e={source:t.source,start:{line:t.start.line,column:t.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:i,strip:{},loc:e}}function z_(i,e,t,n){return Ko(i,t),{type:"PartialBlockStatement",name:i.path,params:i.params,hash:i.hash,program:e,openStrip:i.strip,closeStrip:t&&t.strip,loc:this.locInfo(n)}}});var _h=W(Vn=>{"use strict";Vn.__esModule=!0;Vn.parseWithoutProcessing=gh;Vn.parse=ty;function $_(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t]);return e.default=i,e}function Zo(i){return i&&i.__esModule?i:{default:i}}var Y_=ch(),Qo=Zo(Y_),J_=ph(),K_=Zo(J_),Q_=mh(),X_=$_(Q_),Z_=Fe(),jn=Zo(Z_),ey=Oe();Vn.parser=Qo.default;var Sr={};ey.extend(Sr,X_);function gh(i,e){if(i.type==="Program")return ny(i),i;Qo.default.yy=Sr,Sr.locInfo=function(n){return new Sr.SourceLocation(e&&e.srcName,n)};var t=Qo.default.parse(i);return t}function ty(i,e){var t=gh(i,e),n=new K_.default(e);return n.accept(t)}function ny(i){Xo(i)}function Xo(i){if(i!=null){if(Array.isArray(i)){i.forEach(Xo);return}if(typeof i=="object"){if(i.type==="PathExpression"){if(!iy(i.depth))throw new jn.default("Invalid AST: PathExpression.depth must be an integer");if(!Array.isArray(i.parts))throw new jn.default("Invalid AST: PathExpression.parts must be an array");for(var e=0;e<i.parts.length;e++)if(typeof i.parts[e]!="string")throw new jn.default("Invalid AST: PathExpression.parts must only contain strings")}else if(i.type==="NumberLiteral"){if(typeof i.value!="number"||!isFinite(i.value))throw new jn.default("Invalid AST: NumberLiteral.value must be a number")}else if(i.type==="BooleanLiteral"&&typeof i.value!="boolean")throw new jn.default("Invalid AST: BooleanLiteral.value must be a boolean");Object.keys(i).forEach(function(t){t!=="loc"&&Xo(i[t])})}}}function iy(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i&&i>=0}});var vh=W($n=>{"use strict";$n.__esModule=!0;$n.Compiler=ea;$n.precompile=ay;$n.compile=ly;function bh(i){return i&&i.__esModule?i:{default:i}}var ry=Fe(),Gn=bh(ry),zn=Oe(),sy=Go(),Un=bh(sy),oy=[].slice;function ea(){}ea.prototype={compiler:ea,equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var n=0;n<t;n++){var r=this.opcodes[n],s=e.opcodes[n];if(r.opcode!==s.opcode||!wh(r.args,s.args))return!1}t=this.children.length;for(var n=0;n<t;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,t){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[],t.knownHelpers=zn.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},t.knownHelpers),this.accept(e)},compileProgram:function(e){var t=new this.compiler,n=t.compile(e,this.options),r=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[r]=n,this.useDepths=this.useDepths||n.useDepths,r},accept:function(e){if(!this[e.type])throw new Gn.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var t=e.body,n=t.length,r=0;r<n;r++)this.accept(t[r]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){yh(e);var t=e.program,n=e.inverse;t=t&&this.compileProgram(t),n=n&&this.compileProgram(n);var r=this.classifySexpr(e);r==="helper"?this.helperSexpr(e,t,n):r==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",t),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,t,n),this.opcode("pushProgram",t),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var t=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,t,void 0),r=e.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,r.original)},PartialStatement:function(e){this.usePartial=!0;var t=e.program;t&&(t=this.compileProgram(e.program));var n=e.params;if(n.length>1)throw new Gn.default("Unsupported number of partial arguments: "+n.length,e);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var r=e.name.original,s=e.name.type==="SubExpression";s&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);var o=e.indent||"";this.options.preventIndent&&o&&(this.opcode("appendContent",o),o=""),this.opcode("invokePartial",s,r,o),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){yh(e);var t=this.classifySexpr(e);t==="simple"?this.simpleSexpr(e):t==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,n){var r=e.path,s=r.parts[0],o=t!=null||n!=null;this.opcode("getContext",r.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",n),r.strict=!0,this.accept(r),this.opcode("invokeAmbiguous",s,o)},simpleSexpr:function(e){var t=e.path;t.strict=!0,this.accept(t),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,t,n){var r=this.setupFullMustacheParams(e,t,n),s=e.path,o=s.parts[0];if(this.options.knownHelpers[o])this.opcode("invokeKnownHelper",r.length,o);else{if(this.options.knownHelpersOnly)throw new Gn.default("You specified knownHelpersOnly, but used the unknown helper "+o,e);s.strict=!0,s.falsy=!0,this.accept(s),this.opcode("invokeHelper",r.length,s.original,Un.default.helpers.simpleId(s))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var t=e.parts[0],n=Un.default.helpers.scopedId(e),r=!e.depth&&!n&&this.blockParamIndex(t);r?this.opcode("lookupBlockParam",r,e.parts):t?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,n):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var t=e.pairs,n=0,r=t.length;for(this.opcode("pushHash");n<r;n++)this.pushParam(t[n].value);for(;n--;)this.opcode("assignToHash",t[n].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:oy.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var t=Un.default.helpers.simpleId(e.path),n=t&&!!this.blockParamIndex(e.path.parts[0]),r=!n&&Un.default.helpers.helperExpression(e),s=!n&&(r||t);if(s&&!r){var o=e.path.parts[0],a=this.options;a.knownHelpers[o]?r=!0:a.knownHelpersOnly&&(s=!1)}return r?"helper":s?"ambiguous":"simple"},pushParams:function(e){for(var t=0,n=e.length;t<n;t++)this.pushParam(e[t])},pushParam:function(e){var t=e.value!=null?e.value:e.original||"";if(this.stringParams)t.replace&&(t=t.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",t,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var n=void 0;if(e.parts&&!Un.default.helpers.scopedId(e)&&!e.depth&&(n=this.blockParamIndex(e.parts[0])),n){var r=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,r)}else t=e.original||t,t.replace&&(t=t.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,t)}this.accept(e)}},setupFullMustacheParams:function(e,t,n,r){var s=e.params;return this.pushParams(s),this.opcode("pushProgram",t),this.opcode("pushProgram",n),e.hash?this.accept(e.hash):this.opcode("emptyHash",r),s},blockParamIndex:function(e){for(var t=0,n=this.options.blockParams.length;t<n;t++){var r=this.options.blockParams[t],s=r&&zn.indexOf(r,e);if(r&&s>=0)return[t,s]}}};function ay(i,e,t){if(i==null||typeof i!="string"&&i.type!=="Program")throw new Gn.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+i);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=t.parse(i,e),r=new t.Compiler().compile(n,e);return new t.JavaScriptCompiler().compile(r,e)}function ly(i,e,t){if(e===void 0&&(e={}),i==null||typeof i!="string"&&i.type!=="Program")throw new Gn.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+i);e=zn.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=void 0;function r(){var o=t.parse(i,e),a=new t.Compiler().compile(o,e),l=new t.JavaScriptCompiler().compile(a,e,void 0,!0);return t.template(l)}function s(o,a){return n||(n=r()),n.call(this,o,a)}return s._setup=function(o){return n||(n=r()),n._setup(o)},s._child=function(o,a,l,c){return n||(n=r()),n._child(o,a,l,c)},s}function wh(i,e){if(i===e)return!0;if(zn.isArray(i)&&zn.isArray(e)&&i.length===e.length){for(var t=0;t<i.length;t++)if(!wh(i[t],e[t]))return!1;return!0}}function yh(i){if(!i.path.parts){var e=i.path;i.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}});var xh=W(ta=>{var Sh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ta.encode=function(i){if(0<=i&&i<Sh.length)return Sh[i];throw new TypeError("Must be between 0 and 63: "+i)};ta.decode=function(i){var e=65,t=90,n=97,r=122,s=48,o=57,a=43,l=47,c=26,f=52;return e<=i&&i<=t?i-e:n<=i&&i<=r?i-n+c:s<=i&&i<=o?i-s+f:i==a?62:i==l?63:-1}});var ra=W(ia=>{var Eh=xh(),na=5,Ch=1<<na,kh=Ch-1,Ah=Ch;function cy(i){return i<0?(-i<<1)+1:(i<<1)+0}function uy(i){var e=(i&1)===1,t=i>>1;return e?-t:t}ia.encode=function(e){var t="",n,r=cy(e);do n=r&kh,r>>>=na,r>0&&(n|=Ah),t+=Eh.encode(n);while(r>0);return t};ia.decode=function(e,t,n){var r=e.length,s=0,o=0,a,l;do{if(t>=r)throw new Error("Expected more digits in base 64 VLQ value.");if(l=Eh.decode(e.charCodeAt(t++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));a=!!(l&Ah),l&=kh,s=s+(l<<o),o+=na}while(a);n.value=uy(s),n.rest=t}});var Xt=W(xe=>{function hy(i,e,t){if(e in i)return i[e];if(arguments.length===3)return t;throw new Error('"'+e+'" is a required argument.')}xe.getArg=hy;var Oh=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,fy=/^data:.+\,.+$/;function Yn(i){var e=i.match(Oh);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}xe.urlParse=Yn;function Kt(i){var e="";return i.scheme&&(e+=i.scheme+":"),e+="//",i.auth&&(e+=i.auth+"@"),i.host&&(e+=i.host),i.port&&(e+=":"+i.port),i.path&&(e+=i.path),e}xe.urlGenerate=Kt;function sa(i){var e=i,t=Yn(i);if(t){if(!t.path)return i;e=t.path}for(var n=xe.isAbsolute(e),r=e.split(/\/+/),s,o=0,a=r.length-1;a>=0;a--)s=r[a],s==="."?r.splice(a,1):s===".."?o++:o>0&&(s===""?(r.splice(a+1,o),o=0):(r.splice(a,2),o--));return e=r.join("/"),e===""&&(e=n?"/":"."),t?(t.path=e,Kt(t)):e}xe.normalize=sa;function Ph(i,e){i===""&&(i="."),e===""&&(e=".");var t=Yn(e),n=Yn(i);if(n&&(i=n.path||"/"),t&&!t.scheme)return n&&(t.scheme=n.scheme),Kt(t);if(t||e.match(fy))return e;if(n&&!n.host&&!n.path)return n.host=e,Kt(n);var r=e.charAt(0)==="/"?e:sa(i.replace(/\/+$/,"")+"/"+e);return n?(n.path=r,Kt(n)):r}xe.join=Ph;xe.isAbsolute=function(i){return i.charAt(0)==="/"||Oh.test(i)};function dy(i,e){i===""&&(i="."),i=i.replace(/\/$/,"");for(var t=0;e.indexOf(i+"/")!==0;){var n=i.lastIndexOf("/");if(n<0||(i=i.slice(0,n),i.match(/^([^\/]+:\/)?\/*$/)))return e;++t}return Array(t+1).join("../")+e.substr(i.length+1)}xe.relative=dy;var Rh=(function(){var i=Object.create(null);return!("__proto__"in i)})();function Ih(i){return i}function py(i){return Lh(i)?"$"+i:i}xe.toSetString=Rh?Ih:py;function my(i){return Lh(i)?i.slice(1):i}xe.fromSetString=Rh?Ih:my;function Lh(i){if(!i)return!1;var e=i.length;if(e<9||i.charCodeAt(e-1)!==95||i.charCodeAt(e-2)!==95||i.charCodeAt(e-3)!==111||i.charCodeAt(e-4)!==116||i.charCodeAt(e-5)!==111||i.charCodeAt(e-6)!==114||i.charCodeAt(e-7)!==112||i.charCodeAt(e-8)!==95||i.charCodeAt(e-9)!==95)return!1;for(var t=e-10;t>=0;t--)if(i.charCodeAt(t)!==36)return!1;return!0}function gy(i,e,t){var n=Qt(i.source,e.source);return n!==0||(n=i.originalLine-e.originalLine,n!==0)||(n=i.originalColumn-e.originalColumn,n!==0||t)||(n=i.generatedColumn-e.generatedColumn,n!==0)||(n=i.generatedLine-e.generatedLine,n!==0)?n:Qt(i.name,e.name)}xe.compareByOriginalPositions=gy;function _y(i,e,t){var n=i.generatedLine-e.generatedLine;return n!==0||(n=i.generatedColumn-e.generatedColumn,n!==0||t)||(n=Qt(i.source,e.source),n!==0)||(n=i.originalLine-e.originalLine,n!==0)||(n=i.originalColumn-e.originalColumn,n!==0)?n:Qt(i.name,e.name)}xe.compareByGeneratedPositionsDeflated=_y;function Qt(i,e){return i===e?0:i===null?1:e===null?-1:i>e?1:-1}function yy(i,e){var t=i.generatedLine-e.generatedLine;return t!==0||(t=i.generatedColumn-e.generatedColumn,t!==0)||(t=Qt(i.source,e.source),t!==0)||(t=i.originalLine-e.originalLine,t!==0)||(t=i.originalColumn-e.originalColumn,t!==0)?t:Qt(i.name,e.name)}xe.compareByGeneratedPositionsInflated=yy;function by(i){return JSON.parse(i.replace(/^\)]}'[^\n]*\n/,""))}xe.parseSourceMapInput=by;function wy(i,e,t){if(e=e||"",i&&(i[i.length-1]!=="/"&&e[0]!=="/"&&(i+="/"),e=i+e),t){var n=Yn(t);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var r=n.path.lastIndexOf("/");r>=0&&(n.path=n.path.substring(0,r+1))}e=Ph(Kt(n),e)}return sa(e)}xe.computeSourceURL=wy});var la=W(Dh=>{var oa=Xt(),aa=Object.prototype.hasOwnProperty,Nt=typeof Map<"u";function mt(){this._array=[],this._set=Nt?new Map:Object.create(null)}mt.fromArray=function(e,t){for(var n=new mt,r=0,s=e.length;r<s;r++)n.add(e[r],t);return n};mt.prototype.size=function(){return Nt?this._set.size:Object.getOwnPropertyNames(this._set).length};mt.prototype.add=function(e,t){var n=Nt?e:oa.toSetString(e),r=Nt?this.has(e):aa.call(this._set,n),s=this._array.length;(!r||t)&&this._array.push(e),r||(Nt?this._set.set(e,s):this._set[n]=s)};mt.prototype.has=function(e){if(Nt)return this._set.has(e);var t=oa.toSetString(e);return aa.call(this._set,t)};mt.prototype.indexOf=function(e){if(Nt){var t=this._set.get(e);if(t>=0)return t}else{var n=oa.toSetString(e);if(aa.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};mt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};mt.prototype.toArray=function(){return this._array.slice()};Dh.ArraySet=mt});var Mh=W(Nh=>{var Th=Xt();function vy(i,e){var t=i.generatedLine,n=e.generatedLine,r=i.generatedColumn,s=e.generatedColumn;return n>t||n==t&&s>=r||Th.compareByGeneratedPositionsInflated(i,e)<=0}function xr(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}xr.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)};xr.prototype.add=function(e){vy(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};xr.prototype.toArray=function(){return this._sorted||(this._array.sort(Th.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Nh.MappingList=xr});var ca=W(Fh=>{var Jn=ra(),ue=Xt(),Er=la().ArraySet,Sy=Mh().MappingList;function ze(i){i||(i={}),this._file=ue.getArg(i,"file",null),this._sourceRoot=ue.getArg(i,"sourceRoot",null),this._skipValidation=ue.getArg(i,"skipValidation",!1),this._sources=new Er,this._names=new Er,this._mappings=new Sy,this._sourcesContents=null}ze.prototype._version=3;ze.fromSourceMap=function(e){var t=e.sourceRoot,n=new ze({file:e.file,sourceRoot:t});return e.eachMapping(function(r){var s={generated:{line:r.generatedLine,column:r.generatedColumn}};r.source!=null&&(s.source=r.source,t!=null&&(s.source=ue.relative(t,s.source)),s.original={line:r.originalLine,column:r.originalColumn},r.name!=null&&(s.name=r.name)),n.addMapping(s)}),e.sources.forEach(function(r){var s=r;t!==null&&(s=ue.relative(t,r)),n._sources.has(s)||n._sources.add(s);var o=e.sourceContentFor(r);o!=null&&n.setSourceContent(r,o)}),n};ze.prototype.addMapping=function(e){var t=ue.getArg(e,"generated"),n=ue.getArg(e,"original",null),r=ue.getArg(e,"source",null),s=ue.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,s),r!=null&&(r=String(r),this._sources.has(r)||this._sources.add(r)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:r,name:s})};ze.prototype.setSourceContent=function(e,t){var n=e;this._sourceRoot!=null&&(n=ue.relative(this._sourceRoot,n)),t!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ue.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[ue.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};ze.prototype.applySourceMap=function(e,t,n){var r=t;if(t==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);r=e.file}var s=this._sourceRoot;s!=null&&(r=ue.relative(s,r));var o=new Er,a=new Er;this._mappings.unsortedForEach(function(l){if(l.source===r&&l.originalLine!=null){var c=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});c.source!=null&&(l.source=c.source,n!=null&&(l.source=ue.join(n,l.source)),s!=null&&(l.source=ue.relative(s,l.source)),l.originalLine=c.line,l.originalColumn=c.column,c.name!=null&&(l.name=c.name))}var f=l.source;f!=null&&!o.has(f)&&o.add(f);var h=l.name;h!=null&&!a.has(h)&&a.add(h)},this),this._sources=o,this._names=a,e.sources.forEach(function(l){var c=e.sourceContentFor(l);c!=null&&(n!=null&&(l=ue.join(n,l)),s!=null&&(l=ue.relative(s,l)),this.setSourceContent(l,c))},this)};ze.prototype._validateMapping=function(e,t,n,r){if(t&&typeof t.line!="number"&&typeof t.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!n&&!r)){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))}};ze.prototype._serializeMappings=function(){for(var e=0,t=1,n=0,r=0,s=0,o=0,a="",l,c,f,h,p=this._mappings.toArray(),m=0,_=p.length;m<_;m++){if(c=p[m],l="",c.generatedLine!==t)for(e=0;c.generatedLine!==t;)l+=";",t++;else if(m>0){if(!ue.compareByGeneratedPositionsInflated(c,p[m-1]))continue;l+=","}l+=Jn.encode(c.generatedColumn-e),e=c.generatedColumn,c.source!=null&&(h=this._sources.indexOf(c.source),l+=Jn.encode(h-o),o=h,l+=Jn.encode(c.originalLine-1-r),r=c.originalLine-1,l+=Jn.encode(c.originalColumn-n),n=c.originalColumn,c.name!=null&&(f=this._names.indexOf(c.name),l+=Jn.encode(f-s),s=f)),a+=l}return a};ze.prototype._generateSourcesContent=function(e,t){return e.map(function(n){if(!this._sourcesContents)return null;t!=null&&(n=ue.relative(t,n));var r=ue.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)};ze.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};ze.prototype.toString=function(){return JSON.stringify(this.toJSON())};Fh.SourceMapGenerator=ze});var Bh=W(Mt=>{Mt.GREATEST_LOWER_BOUND=1;Mt.LEAST_UPPER_BOUND=2;function ua(i,e,t,n,r,s){var o=Math.floor((e-i)/2)+i,a=r(t,n[o],!0);return a===0?o:a>0?e-o>1?ua(o,e,t,n,r,s):s==Mt.LEAST_UPPER_BOUND?e<n.length?e:-1:o:o-i>1?ua(i,o,t,n,r,s):s==Mt.LEAST_UPPER_BOUND?o:i<0?-1:i}Mt.search=function(e,t,n,r){if(t.length===0)return-1;var s=ua(-1,t.length,e,t,n,r||Mt.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(t[s],t[s-1],!0)===0;)--s;return s}});var Hh=W(qh=>{function ha(i,e,t){var n=i[e];i[e]=i[t],i[t]=n}function xy(i,e){return Math.round(i+Math.random()*(e-i))}function fa(i,e,t,n){if(t<n){var r=xy(t,n),s=t-1;ha(i,r,n);for(var o=i[n],a=t;a<n;a++)e(i[a],o)<=0&&(s+=1,ha(i,s,a));ha(i,s+1,a);var l=s+1;fa(i,e,t,l-1),fa(i,e,l+1,n)}}qh.quickSort=function(i,e){fa(i,e,0,i.length-1)}});var jh=W(Cr=>{var F=Xt(),da=Bh(),Zt=la().ArraySet,Ey=ra(),Kn=Hh().quickSort;function Z(i,e){var t=i;return typeof i=="string"&&(t=F.parseSourceMapInput(i)),t.sections!=null?new Qe(t,e):new be(t,e)}Z.fromSourceMap=function(i,e){return be.fromSourceMap(i,e)};Z.prototype._version=3;Z.prototype.__generatedMappings=null;Object.defineProperty(Z.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});Z.prototype.__originalMappings=null;Object.defineProperty(Z.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});Z.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return n===";"||n===","};Z.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")};Z.GENERATED_ORDER=1;Z.ORIGINAL_ORDER=2;Z.GREATEST_LOWER_BOUND=1;Z.LEAST_UPPER_BOUND=2;Z.prototype.eachMapping=function(e,t,n){var r=t||null,s=n||Z.GENERATED_ORDER,o;switch(s){case Z.GENERATED_ORDER:o=this._generatedMappings;break;case Z.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;o.map(function(l){var c=l.source===null?null:this._sources.at(l.source);return c=F.computeSourceURL(a,c,this._sourceMapURL),{source:c,generatedLine:l.generatedLine,generatedColumn:l.generatedColumn,originalLine:l.originalLine,originalColumn:l.originalColumn,name:l.name===null?null:this._names.at(l.name)}},this).forEach(e,r)};Z.prototype.allGeneratedPositionsFor=function(e){var t=F.getArg(e,"line"),n={source:F.getArg(e,"source"),originalLine:t,originalColumn:F.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var r=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,da.LEAST_UPPER_BOUND);if(s>=0){var o=this._originalMappings[s];if(e.column===void 0)for(var a=o.originalLine;o&&o.originalLine===a;)r.push({line:F.getArg(o,"generatedLine",null),column:F.getArg(o,"generatedColumn",null),lastColumn:F.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var l=o.originalColumn;o&&o.originalLine===t&&o.originalColumn==l;)r.push({line:F.getArg(o,"generatedLine",null),column:F.getArg(o,"generatedColumn",null),lastColumn:F.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return r};Cr.SourceMapConsumer=Z;function be(i,e){var t=i;typeof i=="string"&&(t=F.parseSourceMapInput(i));var n=F.getArg(t,"version"),r=F.getArg(t,"sources"),s=F.getArg(t,"names",[]),o=F.getArg(t,"sourceRoot",null),a=F.getArg(t,"sourcesContent",null),l=F.getArg(t,"mappings"),c=F.getArg(t,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=F.normalize(o)),r=r.map(String).map(F.normalize).map(function(f){return o&&F.isAbsolute(o)&&F.isAbsolute(f)?F.relative(o,f):f}),this._names=Zt.fromArray(s.map(String),!0),this._sources=Zt.fromArray(r,!0),this._absoluteSources=this._sources.toArray().map(function(f){return F.computeSourceURL(o,f,e)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=l,this._sourceMapURL=e,this.file=c}be.prototype=Object.create(Z.prototype);be.prototype.consumer=Z;be.prototype._findSourceIndex=function(i){var e=i;if(this.sourceRoot!=null&&(e=F.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var t;for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==i)return t;return-1};be.fromSourceMap=function(e,t){var n=Object.create(be.prototype),r=n._names=Zt.fromArray(e._names.toArray(),!0),s=n._sources=Zt.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=t,n._absoluteSources=n._sources.toArray().map(function(m){return F.computeSourceURL(n.sourceRoot,m,t)});for(var o=e._mappings.toArray().slice(),a=n.__generatedMappings=[],l=n.__originalMappings=[],c=0,f=o.length;c<f;c++){var h=o[c],p=new Wh;p.generatedLine=h.generatedLine,p.generatedColumn=h.generatedColumn,h.source&&(p.source=s.indexOf(h.source),p.originalLine=h.originalLine,p.originalColumn=h.originalColumn,h.name&&(p.name=r.indexOf(h.name)),l.push(p)),a.push(p)}return Kn(n.__originalMappings,F.compareByOriginalPositions),n};be.prototype._version=3;Object.defineProperty(be.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Wh(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}be.prototype._parseMappings=function(e,t){for(var n=1,r=0,s=0,o=0,a=0,l=0,c=e.length,f=0,h={},p={},m=[],_=[],g,k,w,S,P;f<c;)if(e.charAt(f)===";")n++,f++,r=0;else if(e.charAt(f)===",")f++;else{for(g=new Wh,g.generatedLine=n,S=f;S<c&&!this._charIsMappingSeparator(e,S);S++);if(k=e.slice(f,S),w=h[k],w)f+=k.length;else{for(w=[];f<S;)Ey.decode(e,f,p),P=p.value,f=p.rest,w.push(P);if(w.length===2)throw new Error("Found a source, but no line and column");if(w.length===3)throw new Error("Found a source and line, but no column");h[k]=w}g.generatedColumn=r+w[0],r=g.generatedColumn,w.length>1&&(g.source=a+w[1],a+=w[1],g.originalLine=s+w[2],s=g.originalLine,g.originalLine+=1,g.originalColumn=o+w[3],o=g.originalColumn,w.length>4&&(g.name=l+w[4],l+=w[4])),_.push(g),typeof g.originalLine=="number"&&m.push(g)}Kn(_,F.compareByGeneratedPositionsDeflated),this.__generatedMappings=_,Kn(m,F.compareByOriginalPositions),this.__originalMappings=m};be.prototype._findMapping=function(e,t,n,r,s,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return da.search(e,t,s,o)};be.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}};be.prototype.originalPositionFor=function(e){var t={generatedLine:F.getArg(e,"line"),generatedColumn:F.getArg(e,"column")},n=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",F.compareByGeneratedPositionsDeflated,F.getArg(e,"bias",Z.GREATEST_LOWER_BOUND));if(n>=0){var r=this._generatedMappings[n];if(r.generatedLine===t.generatedLine){var s=F.getArg(r,"source",null);s!==null&&(s=this._sources.at(s),s=F.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=F.getArg(r,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:F.getArg(r,"originalLine",null),column:F.getArg(r,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};be.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};be.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var r=e;this.sourceRoot!=null&&(r=F.relative(this.sourceRoot,r));var s;if(this.sourceRoot!=null&&(s=F.urlParse(this.sourceRoot))){var o=r.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!s.path||s.path=="/")&&this._sources.has("/"+r))return this.sourcesContent[this._sources.indexOf("/"+r)]}if(t)return null;throw new Error('"'+r+'" is not in the SourceMap.')};be.prototype.generatedPositionFor=function(e){var t=F.getArg(e,"source");if(t=this._findSourceIndex(t),t<0)return{line:null,column:null,lastColumn:null};var n={source:t,originalLine:F.getArg(e,"line"),originalColumn:F.getArg(e,"column")},r=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,F.getArg(e,"bias",Z.GREATEST_LOWER_BOUND));if(r>=0){var s=this._originalMappings[r];if(s.source===n.source)return{line:F.getArg(s,"generatedLine",null),column:F.getArg(s,"generatedColumn",null),lastColumn:F.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Cr.BasicSourceMapConsumer=be;function Qe(i,e){var t=i;typeof i=="string"&&(t=F.parseSourceMapInput(i));var n=F.getArg(t,"version"),r=F.getArg(t,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Zt,this._names=new Zt;var s={line:-1,column:0};this._sections=r.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var a=F.getArg(o,"offset"),l=F.getArg(a,"line"),c=F.getArg(a,"column");if(l<s.line||l===s.line&&c<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=a,{generatedOffset:{generatedLine:l+1,generatedColumn:c+1},consumer:new Z(F.getArg(o,"map"),e)}})}Qe.prototype=Object.create(Z.prototype);Qe.prototype.constructor=Z;Qe.prototype._version=3;Object.defineProperty(Qe.prototype,"sources",{get:function(){for(var i=[],e=0;e<this._sections.length;e++)for(var t=0;t<this._sections[e].consumer.sources.length;t++)i.push(this._sections[e].consumer.sources[t]);return i}});Qe.prototype.originalPositionFor=function(e){var t={generatedLine:F.getArg(e,"line"),generatedColumn:F.getArg(e,"column")},n=da.search(t,this._sections,function(s,o){var a=s.generatedLine-o.generatedOffset.generatedLine;return a||s.generatedColumn-o.generatedOffset.generatedColumn}),r=this._sections[n];return r?r.consumer.originalPositionFor({line:t.generatedLine-(r.generatedOffset.generatedLine-1),column:t.generatedColumn-(r.generatedOffset.generatedLine===t.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};Qe.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};Qe.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n],s=r.consumer.sourceContentFor(e,!0);if(s)return s}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')};Qe.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var n=this._sections[t];if(n.consumer._findSourceIndex(F.getArg(e,"source"))!==-1){var r=n.consumer.generatedPositionFor(e);if(r){var s={line:r.line+(n.generatedOffset.generatedLine-1),column:r.column+(n.generatedOffset.generatedLine===r.line?n.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};Qe.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var r=this._sections[n],s=r.consumer._generatedMappings,o=0;o<s.length;o++){var a=s[o],l=r.consumer._sources.at(a.source);l=F.computeSourceURL(r.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var c=null;a.name&&(c=r.consumer._names.at(a.name),this._names.add(c),c=this._names.indexOf(c));var f={source:l,generatedLine:a.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(r.generatedOffset.generatedLine===a.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:c};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}Kn(this.__generatedMappings,F.compareByGeneratedPositionsDeflated),Kn(this.__originalMappings,F.compareByOriginalPositions)};Cr.IndexedSourceMapConsumer=Qe});var Uh=W(Vh=>{var Cy=ca().SourceMapGenerator,kr=Xt(),ky=/(\r?\n)/,Ay=10,en="$$$isSourceNode$$$";function Be(i,e,t,n,r){this.children=[],this.sourceContents={},this.line=i??null,this.column=e??null,this.source=t??null,this.name=r??null,this[en]=!0,n!=null&&this.add(n)}Be.fromStringWithSourceMap=function(e,t,n){var r=new Be,s=e.split(ky),o=0,a=function(){var p=_(),m=_()||"";return p+m;function _(){return o<s.length?s[o++]:void 0}},l=1,c=0,f=null;return t.eachMapping(function(p){if(f!==null)if(l<p.generatedLine)h(f,a()),l++,c=0;else{var m=s[o]||"",_=m.substr(0,p.generatedColumn-c);s[o]=m.substr(p.generatedColumn-c),c=p.generatedColumn,h(f,_),f=p;return}for(;l<p.generatedLine;)r.add(a()),l++;if(c<p.generatedColumn){var m=s[o]||"";r.add(m.substr(0,p.generatedColumn)),s[o]=m.substr(p.generatedColumn),c=p.generatedColumn}f=p},this),o<s.length&&(f&&h(f,a()),r.add(s.splice(o).join(""))),t.sources.forEach(function(p){var m=t.sourceContentFor(p);m!=null&&(n!=null&&(p=kr.join(n,p)),r.setSourceContent(p,m))}),r;function h(p,m){if(p===null||p.source===void 0)r.add(m);else{var _=n?kr.join(n,p.source):p.source;r.add(new Be(p.originalLine,p.originalColumn,_,m,p.name))}}};Be.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(t){this.add(t)},this);else if(e[en]||typeof e=="string")e&&this.children.push(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Be.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[en]||typeof e=="string")this.children.unshift(e);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this};Be.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)t=this.children[n],t[en]?t.walk(e):t!==""&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})};Be.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this};Be.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[en]?n.replaceRight(e,t):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this};Be.prototype.setSourceContent=function(e,t){this.sourceContents[kr.toSetString(e)]=t};Be.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;t<n;t++)this.children[t][en]&&this.children[t].walkSourceContents(e);for(var r=Object.keys(this.sourceContents),t=0,n=r.length;t<n;t++)e(kr.fromSetString(r[t]),this.sourceContents[r[t]])};Be.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e};Be.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},n=new Cy(e),r=!1,s=null,o=null,a=null,l=null;return this.walk(function(c,f){t.code+=c,f.source!==null&&f.line!==null&&f.column!==null?((s!==f.source||o!==f.line||a!==f.column||l!==f.name)&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:t.line,column:t.column},name:f.name}),s=f.source,o=f.line,a=f.column,l=f.name,r=!0):r&&(n.addMapping({generated:{line:t.line,column:t.column}}),s=null,r=!1);for(var h=0,p=c.length;h<p;h++)c.charCodeAt(h)===Ay?(t.line++,t.column=0,h+1===p?(s=null,r=!1):r&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:t.line,column:t.column},name:f.name})):t.column++}),this.walkSourceContents(function(c,f){n.setSourceContent(c,f)}),{code:t.code,map:n}};Vh.SourceNode=Be});var Gh=W(Ar=>{Ar.SourceMapGenerator=ca().SourceMapGenerator;Ar.SourceMapConsumer=jh().SourceMapConsumer;Ar.SourceNode=Uh().SourceNode});var Jh=W((Or,Yh)=>{"use strict";Or.__esModule=!0;var ma=Oe(),Ft=void 0;try{(typeof define!="function"||!define.amd)&&(zh=Gh(),Ft=zh.SourceNode)}catch{}var zh;Ft||(Ft=function(i,e,t,n){this.src="",n&&this.add(n)},Ft.prototype={add:function(e){ma.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){ma.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function pa(i,e,t){if(ma.isArray(i)){for(var n=[],r=0,s=i.length;r<s;r++)n.push(e.wrap(i[r],t));return n}else if(typeof i=="boolean"||typeof i=="number")return i+"";return i}function $h(i){this.srcFile=i,this.source=[]}$h.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,t){this.source.unshift(this.wrap(e,t))},push:function(e,t){this.source.push(this.wrap(e,t))},merge:function(){var e=this.empty();return this.each(function(t){e.add([" ",t,`
38
+ `])}),e},each:function(e){for(var t=0,n=this.source.length;t<n;t++)e(this.source[t])},empty:function(){var e=this.currentLocation||{start:{}};return new Ft(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var t=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Ft?e:(e=pa(e,this,t),new Ft(t.start.line,t.start.column,this.srcFile,e))},functionCall:function(e,t,n){return n=this.generateList(n),this.wrap([e,t?"."+t+"(":"(",n,")"])},quotedString:function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(e){var t=this,n=[];Object.keys(e).forEach(function(s){var o=pa(e[s],t);o!=="undefined"&&n.push([t.quotedString(s),":",o])});var r=this.generateList(n);return r.prepend("{"),r.add("}"),r},generateList:function(e){for(var t=this.empty(),n=0,r=e.length;n<r;n++)n&&t.add(","),t.add(pa(e[n],this));return t},generateArray:function(e){var t=this.generateList(e);return t.prepend("["),t.add("]"),t}};Or.default=$h;Yh.exports=Or.default});var ef=W((Pr,Zh)=>{"use strict";Pr.__esModule=!0;function Xh(i){return i&&i.__esModule?i:{default:i}}var Kh=cr(),Oy=Fe(),ga=Xh(Oy),Py=Oe(),Ry=Jh(),Qh=Xh(Ry);function tn(i){this.value=i}function nn(){}nn.prototype={nameLookup:function(e,t){return this.internalNameLookup(e,t)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},compilerInfo:function(){var e=Kh.COMPILER_REVISION,t=Kh.REVISION_CHANGES[e];return[e,t]},appendToBuffer:function(e,t,n){return Py.isArray(e)||(e=[e]),e=this.source.wrap(e,t),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,t){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(t),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,t,n,r){this.environment=e,this.options=t,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!r,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,t),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var s=e.opcodes,o=void 0,a=void 0,l=void 0,c=void 0;for(l=0,c=s.length;l<c;l++)o=s[l],this.source.currentLocation=o.loc,a=a||o.loc,this[o.opcode].apply(this,o.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new ga.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
39
39
  `]),this.decorators.push("return fn;"),r?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
40
40
  `),this.decorators.push(`}
41
- `),this.decorators=this.decorators.merge()));var f=this.createFunctionContext(r);if(this.isChild)return f;var h={compiler:this.compilerInfo(),main:f};this.decorators&&(h.main_d=this.decorators,h.useDecorators=!0);var p=this.context,m=p.programs,_=p.decorators;for(c=0,l=m.length;c<l;c++)h[c]=m[c],_[c]&&(h[c+"_d"]=_[c],h.useDecorators=!0);return this.environment.usePartial&&(h.usePartial=!0),this.options.data&&(h.useData=!0),this.useDepths&&(h.useDepths=!0),this.useBlockParams&&(h.useBlockParams=!0),this.options.compat&&(h.compat=!0),r?h.compilerOptions=this.options:(h.compiler=JSON.stringify(h.compiler),this.source.currentLocation={start:{line:1,column:0}},h=this.objectLiteral(h),t.srcName?(h=h.toStringWithSourceMap({file:t.destName}),h.map=h.map&&h.map.toString()):h=h.toString()),h},preamble:function(){this.lastContext=0,this.source=new Qh.default(this.options.srcName),this.decorators=new Qh.default(this.options.srcName)},createFunctionContext:function(e){var t=this,n="",r=this.stackVars.concat(this.registers.list);r.length>0&&(n+=", "+r.join(", "));var s=0;Object.keys(this.aliases).forEach(function(c){var l=t.aliases[c];l.children&&l.referenceCount>1&&(n+=", alias"+ ++s+"="+c,l.children[0]="alias"+s)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var o=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&o.push("blockParams"),this.useDepths&&o.push("depths");var a=this.mergeSource(n);return e?(o.push(a),Function.apply(this,o)):this.source.wrap(["function(",o.join(","),`) {
42
- `,a,"}"])},mergeSource:function(e){var t=this.environment.isSimple,n=!this.forceBuffer,r=void 0,s=void 0,o=void 0,a=void 0;return this.source.each(function(c){c.appendToBuffer?(o?c.prepend(" + "):o=c,a=c):(o&&(s?o.prepend("buffer += "):r=!0,a.add(";"),o=a=void 0),s=!0,t||(n=!1))}),n?o?(o.prepend("return "),a.add(";")):s||this.source.push('return "";'):(e+=", buffer = "+(r?"":this.initializeBuffer()),o?(o.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(r?"":`;
41
+ `),this.decorators=this.decorators.merge()));var f=this.createFunctionContext(r);if(this.isChild)return f;var h={compiler:this.compilerInfo(),main:f};this.decorators&&(h.main_d=this.decorators,h.useDecorators=!0);var p=this.context,m=p.programs,_=p.decorators;for(l=0,c=m.length;l<c;l++)h[l]=m[l],_[l]&&(h[l+"_d"]=_[l],h.useDecorators=!0);return this.environment.usePartial&&(h.usePartial=!0),this.options.data&&(h.useData=!0),this.useDepths&&(h.useDepths=!0),this.useBlockParams&&(h.useBlockParams=!0),this.options.compat&&(h.compat=!0),r?h.compilerOptions=this.options:(h.compiler=JSON.stringify(h.compiler),this.source.currentLocation={start:{line:1,column:0}},h=this.objectLiteral(h),t.srcName?(h=h.toStringWithSourceMap({file:t.destName}),h.map=h.map&&h.map.toString()):h=h.toString()),h},preamble:function(){this.lastContext=0,this.source=new Qh.default(this.options.srcName),this.decorators=new Qh.default(this.options.srcName)},createFunctionContext:function(e){var t=this,n="",r=this.stackVars.concat(this.registers.list);r.length>0&&(n+=", "+r.join(", "));var s=0;Object.keys(this.aliases).forEach(function(l){var c=t.aliases[l];c.children&&c.referenceCount>1&&(n+=", alias"+ ++s+"="+l,c.children[0]="alias"+s)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var o=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&o.push("blockParams"),this.useDepths&&o.push("depths");var a=this.mergeSource(n);return e?(o.push(a),Function.apply(this,o)):this.source.wrap(["function(",o.join(","),`) {
42
+ `,a,"}"])},mergeSource:function(e){var t=this.environment.isSimple,n=!this.forceBuffer,r=void 0,s=void 0,o=void 0,a=void 0;return this.source.each(function(l){l.appendToBuffer?(o?l.prepend(" + "):o=l,a=l):(o&&(s?o.prepend("buffer += "):r=!0,a.add(";"),o=a=void 0),s=!0,t||(n=!1))}),n?o?(o.prepend("return "),a.add(";")):s||this.source.push('return "";'):(e+=", buffer = "+(r?"":this.initializeBuffer()),o?(o.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(r?"":`;
43
43
  `)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
44
44
  lookupProperty = container.lookupProperty || function(parent, propertyName) {
45
45
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -47,27 +47,27 @@ Expecting `+z.join(", ")+", got '"+(this.terminals_[D]||D)+"'":ge="Parse error o
47
47
  }
48
48
  return undefined
49
49
  }
50
- `.trim()},blockValue:function(e){var t=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var r=this.popStack();n.splice(1,0,r),this.push(this.source.functionCall(t,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),t=[this.contextName(0)];this.setupHelperArgs("",0,t,!0),this.flushInline();var n=this.topStack();t.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",t),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(t){return[" != null ? ",t,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,t,n,r){var s=0;!r&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[s++])):this.pushContext(),this.resolvePath("context",e,s,t,n)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",t,1)},lookupData:function(e,t,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",t,0,!0,n)},resolvePath:function(e,t,n,r,s){var o=this;if(this.options.strict||this.options.assumeObjects){this.push(Iy(this.options.strict&&s,this,t,n,e));return}for(var a=t.length,c=function(f){o.replaceStack(function(h){var p=o.nameLookup(h,t[f],e);return r?[" && ",p]:[" != null ? ",p," : ",h]})},l=n;l<a;l++)c(l)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,t){this.pushContext(),this.pushString(t),t!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,t){var n=this.nameLookup("decorators",t,"decorator"),r=this.setupHelperArgs(t,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+t+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",r])," || fn;"])},invokeHelper:function(e,t,n){var r=this.popStack(),s=this.setupHelper(e,t),o=[];n&&o.push(s.name),o.push(r),this.options.strict||o.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(o,"||"),")"],c=this.source.functionCall(a,"call",s.callParams);this.push(c)},itemsSeparatedBy:function(e,t){var n=[];n.push(e[0]);for(var r=1;r<e.length;r++)n.push(t,e[r]);return n},invokeKnownHelper:function(e,t){var n=this.setupHelper(e,t);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,t){this.useRegister("helper");var n=this.popStack();this.emptyHash();var r=this.setupHelper(0,e,t),s=this.lastHelper=this.nameLookup("helpers",e,"helper"),o=["(","(helper = ",s," || ",n,")"];this.options.strict||(o[0]="(helper = ",o.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",o,r.paramsInit?["),(",r.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",r.callParams)," : helper))"])},invokePartial:function(e,t,n){var r=[],s=this.setupParams(t,1,r);e&&(t=this.popStack(),delete s.name),n&&(s.indent=JSON.stringify(n)),s.helpers="helpers",s.partials="partials",s.decorators="container.decorators",e?r.unshift(t):r.unshift(this.nameLookup("partials",t,"partial")),this.options.compat&&(s.depths="depths"),s=this.objectLiteral(s),r.push(s),this.push(this.source.functionCall("container.invokePartial","",r))},assignToHash:function(e){var t=this.popStack(),n=void 0,r=void 0,s=void 0;this.trackIds&&(s=this.popStack()),this.stringParams&&(r=this.popStack(),n=this.popStack());var o=this.hash;n&&(o.contexts[e]=n),r&&(o.types[e]=r),s&&(o.ids[e]=s),o.values[e]=t},pushId:function(e,t,n){e==="BlockParam"?this.pushStackLiteral("blockParams["+t[0]+"].path["+t[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):e==="PathExpression"?this.pushString(t):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:nn,compileChildren:function(e,t){for(var n=e.children,r=void 0,s=void 0,o=0,a=n.length;o<a;o++){r=n[o],s=new this.compiler;var c=this.matchExistingProgram(r);if(c==null){var l=this.context.programs.push("")-1;r.index=l,r.name="program"+l,this.context.programs[l]=s.compile(r,t,this.context,!this.precompile),this.context.decorators[l]=s.decorators,this.context.environments[l]=r,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams,r.useDepths=this.useDepths,r.useBlockParams=this.useBlockParams}else r.index=c.index,r.name="program"+c.index,this.useDepths=this.useDepths||c.useDepths,this.useBlockParams=this.useBlockParams||c.useBlockParams}},matchExistingProgram:function(e){for(var t=0,n=this.context.environments.length;t<n;t++){var r=this.context.environments[t];if(r&&r.equals(e))return r}},programExpression:function(e){var t=this.environment.children[e],n=[t.index,"data",t.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof tn||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new tn(e))},pushSource:function(e){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),e&&this.source.push(e)},replaceStack:function(e){var t=["("],n=void 0,r=void 0,s=void 0;if(!this.isInline())throw new ga.default("replaceStack on non-inline");var o=this.popStack(!0);if(o instanceof tn)n=[o.value],t=["(",n],s=!0;else{r=!0;var a=this.incrStack();t=["((",this.push(a)," = ",o,")"],n=this.topStack()}var c=e.call(this,n);s||this.popStack(),r&&this.stackSlot--,this.push(t.concat(c,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var t=0,n=e.length;t<n;t++){var r=e[t];if(r instanceof tn)this.compileStack.push(r);else{var s=this.incrStack();this.pushSource([s," = ",r,";"]),this.compileStack.push(s)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),n=(t?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof tn)return n.value;if(!t){if(!this.stackSlot)throw new ga.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,t=e[e.length-1];return t instanceof tn?t.value:t},contextName:function(e){return this.useDepths&&e?"depths["+e+"]":"depth"+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var t=this.aliases[e];return t?(t.referenceCount++,t):(t=this.aliases[e]=this.source.wrap(e),t.aliasable=!0,t.referenceCount=1,t)},setupHelper:function(e,t,n){var r=[],s=this.setupHelperArgs(t,e,r,n),o=this.nameLookup("helpers",t,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:r,paramsInit:s,name:o,callParams:[a].concat(r)}},setupParams:function(e,t,n){var r={},s=[],o=[],a=[],c=!n,l=void 0;c&&(n=[]),r.name=this.quotedString(e),r.hash=this.popStack(),this.trackIds&&(r.hashIds=this.popStack()),this.stringParams&&(r.hashTypes=this.popStack(),r.hashContexts=this.popStack());var f=this.popStack(),h=this.popStack();(h||f)&&(r.fn=h||"container.noop",r.inverse=f||"container.noop");for(var p=t;p--;)l=this.popStack(),n[p]=l,this.trackIds&&(a[p]=this.popStack()),this.stringParams&&(o[p]=this.popStack(),s[p]=this.popStack());return c&&(r.args=this.source.generateArray(n)),this.trackIds&&(r.ids=this.source.generateArray(a)),this.stringParams&&(r.types=this.source.generateArray(o),r.contexts=this.source.generateArray(s)),this.options.data&&(r.data="data"),this.useBlockParams&&(r.blockParams="blockParams"),r},setupHelperArgs:function(e,t,n,r){var s=this.setupParams(e,t,n);return s.loc=JSON.stringify(this.source.currentLocation),s=this.objectLiteral(s),r?(this.useRegister("options"),n.push("options"),["options=",s]):n?(n.push(s),""):s}};(function(){for(var i="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),e=nn.RESERVED_WORDS={},t=0,n=i.length;t<n;t++)e[i[t]]=!0})();nn.isValidJavaScriptVariableName=function(i){return!nn.RESERVED_WORDS[i]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(i)};function Iy(i,e,t,n,r){var s=e.popStack(),o=t.length;i&&o--;for(var a=n;a<o;a++)s=e.nameLookup(s,t[a],r);return i?[e.aliasable("container.strict"),"(",s,", ",e.quotedString(t[o]),", ",JSON.stringify(e.source.currentLocation)," )"]:s}Pr.default=nn;Zh.exports=Pr.default});var rf=W((Rr,nf)=>{"use strict";Rr.__esModule=!0;function Qn(i){return i&&i.__esModule?i:{default:i}}var Ly=sh(),Dy=Qn(Ly),Ty=Go(),Ny=Qn(Ty),_a=_h(),ya=vh(),My=ef(),Fy=Qn(My),By=wr(),qy=Qn(By),Hy=Wo(),Wy=Qn(Hy),jy=Dy.default.create;function tf(){var i=jy();return i.compile=function(e,t){return ya.compile(e,t,i)},i.precompile=function(e,t){return ya.precompile(e,t,i)},i.AST=Ny.default,i.Compiler=ya.Compiler,i.JavaScriptCompiler=Fy.default,i.Parser=_a.parser,i.parse=_a.parse,i.parseWithoutProcessing=_a.parseWithoutProcessing,i}var rn=tf();rn.create=tf;Wy.default(rn);rn.Visitor=qy.default;rn.default=rn;Rr.default=rn;nf.exports=Rr.default});var sf=W(Ir=>{"use strict";Ir.__esModule=!0;Ir.print=zy;Ir.PrintVisitor=re;function Vy(i){return i&&i.__esModule?i:{default:i}}var Uy=wr(),Gy=Vy(Uy);function zy(i){return new re().accept(i)}function re(){this.padding=0}re.prototype=new Gy.default;re.prototype.pad=function(i){for(var e="",t=0,n=this.padding;t<n;t++)e+=" ";return e+=i+`
51
- `,e};re.prototype.Program=function(i){var e="",t=i.body,n=void 0,r=void 0;if(i.blockParams){var s="BLOCK PARAMS: [";for(n=0,r=i.blockParams.length;n<r;n++)s+=" "+i.blockParams[n];s+=" ]",e+=this.pad(s)}for(n=0,r=t.length;n<r;n++)e+=this.accept(t[n]);return this.padding--,e};re.prototype.MustacheStatement=function(i){return this.pad("{{ "+this.SubExpression(i)+" }}")};re.prototype.Decorator=function(i){return this.pad("{{ DIRECTIVE "+this.SubExpression(i)+" }}")};re.prototype.BlockStatement=re.prototype.DecoratorBlock=function(i){var e="";return e+=this.pad((i.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(i)),i.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(i.program),this.padding--),i.inverse&&(i.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(i.inverse),this.padding--,i.program&&this.padding--),this.padding--,e};re.prototype.PartialStatement=function(i){var e="PARTIAL:"+i.name.original;return i.params[0]&&(e+=" "+this.accept(i.params[0])),i.hash&&(e+=" "+this.accept(i.hash)),this.pad("{{> "+e+" }}")};re.prototype.PartialBlockStatement=function(i){var e="PARTIAL BLOCK:"+i.name.original;return i.params[0]&&(e+=" "+this.accept(i.params[0])),i.hash&&(e+=" "+this.accept(i.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(i.program),this.padding--,this.pad("{{> "+e+" }}")};re.prototype.ContentStatement=function(i){return this.pad("CONTENT[ '"+i.value+"' ]")};re.prototype.CommentStatement=function(i){return this.pad("{{! '"+i.value+"' }}")};re.prototype.SubExpression=function(i){for(var e=i.params,t=[],n=void 0,r=0,s=e.length;r<s;r++)t.push(this.accept(e[r]));return e="["+t.join(", ")+"]",n=i.hash?" "+this.accept(i.hash):"",this.accept(i.path)+" "+e+n};re.prototype.PathExpression=function(i){var e=i.parts.join("/");return(i.data?"@":"")+"PATH:"+e};re.prototype.StringLiteral=function(i){return'"'+i.value+'"'};re.prototype.NumberLiteral=function(i){return"NUMBER{"+i.value+"}"};re.prototype.BooleanLiteral=function(i){return"BOOLEAN{"+i.value+"}"};re.prototype.UndefinedLiteral=function(){return"UNDEFINED"};re.prototype.NullLiteral=function(){return"NULL"};re.prototype.Hash=function(i){for(var e=i.pairs,t=[],n=0,r=e.length;n<r;n++)t.push(this.accept(e[n]));return"HASH{"+t.join(", ")+"}"};re.prototype.HashPair=function(i){return i.key+"="+this.accept(i.value)}});var cf=W((V2,lf)=>{var Lr=rf().default,af=sf();Lr.PrintVisitor=af.PrintVisitor;Lr.print=af.print;lf.exports=Lr;function of(i,e){var t=$e("fs"),n=t.readFileSync(e,"utf8");i.exports=Lr.compile(n)}typeof $e<"u"&&$e.extensions&&($e.extensions[".handlebars"]=of,$e.extensions[".hbs"]=of)});import{readFile as df,writeFile as hf,access as ob,mkdir as ab}from"node:fs/promises";import{resolve as rt,relative as wa}from"node:path";import{pathToFileURL as pf}from"node:url";function xf(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var we={},li={},bt={},Ca;function un(){if(Ca)return bt;Ca=1;function i(o){return typeof o>"u"||o===null}function e(o){return typeof o=="object"&&o!==null}function t(o){return Array.isArray(o)?o:i(o)?[]:[o]}function n(o,a){if(a){let c=Object.keys(a);for(let l=0,f=c.length;l<f;l+=1){let h=c[l];o[h]=a[h]}}return o}function r(o,a){let c="";for(let l=0;l<a;l+=1)c+=o;return c}function s(o){return o===0&&Number.NEGATIVE_INFINITY===1/o}return bt.isNothing=i,bt.isObject=e,bt.toArray=t,bt.repeat=r,bt.isNegativeZero=s,bt.extend=n,bt}var qr,ka;function hn(){if(ka)return qr;ka=1;function i(t,n){let r="",s=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!n&&t.mark.snippet&&(r+=`
50
+ `.trim()},blockValue:function(e){var t=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var r=this.popStack();n.splice(1,0,r),this.push(this.source.functionCall(t,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),t=[this.contextName(0)];this.setupHelperArgs("",0,t,!0),this.flushInline();var n=this.topStack();t.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",t),"}"])},appendContent:function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},append:function(){if(this.isInline())this.replaceStack(function(t){return[" != null ? ",t,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(e){this.lastContext=e},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(e,t,n,r){var s=0;!r&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[s++])):this.pushContext(),this.resolvePath("context",e,s,t,n)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",t,1)},lookupData:function(e,t,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",t,0,!0,n)},resolvePath:function(e,t,n,r,s){var o=this;if(this.options.strict||this.options.assumeObjects){this.push(Iy(this.options.strict&&s,this,t,n,e));return}for(var a=t.length,l=function(f){o.replaceStack(function(h){var p=o.nameLookup(h,t[f],e);return r?[" && ",p]:[" != null ? ",p," : ",h]})},c=n;c<a;c++)l(c)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(e,t){this.pushContext(),this.pushString(t),t!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},emptyHash:function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},pushString:function(e){this.pushStackLiteral(this.quotedString(e))},pushLiteral:function(e){this.pushStackLiteral(e)},pushProgram:function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},registerDecorator:function(e,t){var n=this.nameLookup("decorators",t,"decorator"),r=this.setupHelperArgs(t,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+t+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",r])," || fn;"])},invokeHelper:function(e,t,n){var r=this.popStack(),s=this.setupHelper(e,t),o=[];n&&o.push(s.name),o.push(r),this.options.strict||o.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(o,"||"),")"],l=this.source.functionCall(a,"call",s.callParams);this.push(l)},itemsSeparatedBy:function(e,t){var n=[];n.push(e[0]);for(var r=1;r<e.length;r++)n.push(t,e[r]);return n},invokeKnownHelper:function(e,t){var n=this.setupHelper(e,t);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,t){this.useRegister("helper");var n=this.popStack();this.emptyHash();var r=this.setupHelper(0,e,t),s=this.lastHelper=this.nameLookup("helpers",e,"helper"),o=["(","(helper = ",s," || ",n,")"];this.options.strict||(o[0]="(helper = ",o.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",o,r.paramsInit?["),(",r.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",r.callParams)," : helper))"])},invokePartial:function(e,t,n){var r=[],s=this.setupParams(t,1,r);e&&(t=this.popStack(),delete s.name),n&&(s.indent=JSON.stringify(n)),s.helpers="helpers",s.partials="partials",s.decorators="container.decorators",e?r.unshift(t):r.unshift(this.nameLookup("partials",t,"partial")),this.options.compat&&(s.depths="depths"),s=this.objectLiteral(s),r.push(s),this.push(this.source.functionCall("container.invokePartial","",r))},assignToHash:function(e){var t=this.popStack(),n=void 0,r=void 0,s=void 0;this.trackIds&&(s=this.popStack()),this.stringParams&&(r=this.popStack(),n=this.popStack());var o=this.hash;n&&(o.contexts[e]=n),r&&(o.types[e]=r),s&&(o.ids[e]=s),o.values[e]=t},pushId:function(e,t,n){e==="BlockParam"?this.pushStackLiteral("blockParams["+t[0]+"].path["+t[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):e==="PathExpression"?this.pushString(t):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:nn,compileChildren:function(e,t){for(var n=e.children,r=void 0,s=void 0,o=0,a=n.length;o<a;o++){r=n[o],s=new this.compiler;var l=this.matchExistingProgram(r);if(l==null){var c=this.context.programs.push("")-1;r.index=c,r.name="program"+c,this.context.programs[c]=s.compile(r,t,this.context,!this.precompile),this.context.decorators[c]=s.decorators,this.context.environments[c]=r,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams,r.useDepths=this.useDepths,r.useBlockParams=this.useBlockParams}else r.index=l.index,r.name="program"+l.index,this.useDepths=this.useDepths||l.useDepths,this.useBlockParams=this.useBlockParams||l.useBlockParams}},matchExistingProgram:function(e){for(var t=0,n=this.context.environments.length;t<n;t++){var r=this.context.environments[t];if(r&&r.equals(e))return r}},programExpression:function(e){var t=this.environment.children[e],n=[t.index,"data",t.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof tn||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new tn(e))},pushSource:function(e){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),e&&this.source.push(e)},replaceStack:function(e){var t=["("],n=void 0,r=void 0,s=void 0;if(!this.isInline())throw new ga.default("replaceStack on non-inline");var o=this.popStack(!0);if(o instanceof tn)n=[o.value],t=["(",n],s=!0;else{r=!0;var a=this.incrStack();t=["((",this.push(a)," = ",o,")"],n=this.topStack()}var l=e.call(this,n);s||this.popStack(),r&&this.stackSlot--,this.push(t.concat(l,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var e=this.inlineStack;this.inlineStack=[];for(var t=0,n=e.length;t<n;t++){var r=e[t];if(r instanceof tn)this.compileStack.push(r);else{var s=this.incrStack();this.pushSource([s," = ",r,";"]),this.compileStack.push(s)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),n=(t?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof tn)return n.value;if(!t){if(!this.stackSlot)throw new ga.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,t=e[e.length-1];return t instanceof tn?t.value:t},contextName:function(e){return this.useDepths&&e?"depths["+e+"]":"depth"+e},quotedString:function(e){return this.source.quotedString(e)},objectLiteral:function(e){return this.source.objectLiteral(e)},aliasable:function(e){var t=this.aliases[e];return t?(t.referenceCount++,t):(t=this.aliases[e]=this.source.wrap(e),t.aliasable=!0,t.referenceCount=1,t)},setupHelper:function(e,t,n){var r=[],s=this.setupHelperArgs(t,e,r,n),o=this.nameLookup("helpers",t,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:r,paramsInit:s,name:o,callParams:[a].concat(r)}},setupParams:function(e,t,n){var r={},s=[],o=[],a=[],l=!n,c=void 0;l&&(n=[]),r.name=this.quotedString(e),r.hash=this.popStack(),this.trackIds&&(r.hashIds=this.popStack()),this.stringParams&&(r.hashTypes=this.popStack(),r.hashContexts=this.popStack());var f=this.popStack(),h=this.popStack();(h||f)&&(r.fn=h||"container.noop",r.inverse=f||"container.noop");for(var p=t;p--;)c=this.popStack(),n[p]=c,this.trackIds&&(a[p]=this.popStack()),this.stringParams&&(o[p]=this.popStack(),s[p]=this.popStack());return l&&(r.args=this.source.generateArray(n)),this.trackIds&&(r.ids=this.source.generateArray(a)),this.stringParams&&(r.types=this.source.generateArray(o),r.contexts=this.source.generateArray(s)),this.options.data&&(r.data="data"),this.useBlockParams&&(r.blockParams="blockParams"),r},setupHelperArgs:function(e,t,n,r){var s=this.setupParams(e,t,n);return s.loc=JSON.stringify(this.source.currentLocation),s=this.objectLiteral(s),r?(this.useRegister("options"),n.push("options"),["options=",s]):n?(n.push(s),""):s}};(function(){for(var i="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),e=nn.RESERVED_WORDS={},t=0,n=i.length;t<n;t++)e[i[t]]=!0})();nn.isValidJavaScriptVariableName=function(i){return!nn.RESERVED_WORDS[i]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(i)};function Iy(i,e,t,n,r){var s=e.popStack(),o=t.length;i&&o--;for(var a=n;a<o;a++)s=e.nameLookup(s,t[a],r);return i?[e.aliasable("container.strict"),"(",s,", ",e.quotedString(t[o]),", ",JSON.stringify(e.source.currentLocation)," )"]:s}Pr.default=nn;Zh.exports=Pr.default});var rf=W((Rr,nf)=>{"use strict";Rr.__esModule=!0;function Qn(i){return i&&i.__esModule?i:{default:i}}var Ly=sh(),Dy=Qn(Ly),Ty=Go(),Ny=Qn(Ty),_a=_h(),ya=vh(),My=ef(),Fy=Qn(My),By=wr(),qy=Qn(By),Hy=Wo(),Wy=Qn(Hy),jy=Dy.default.create;function tf(){var i=jy();return i.compile=function(e,t){return ya.compile(e,t,i)},i.precompile=function(e,t){return ya.precompile(e,t,i)},i.AST=Ny.default,i.Compiler=ya.Compiler,i.JavaScriptCompiler=Fy.default,i.Parser=_a.parser,i.parse=_a.parse,i.parseWithoutProcessing=_a.parseWithoutProcessing,i}var rn=tf();rn.create=tf;Wy.default(rn);rn.Visitor=qy.default;rn.default=rn;Rr.default=rn;nf.exports=Rr.default});var sf=W(Ir=>{"use strict";Ir.__esModule=!0;Ir.print=zy;Ir.PrintVisitor=re;function Vy(i){return i&&i.__esModule?i:{default:i}}var Uy=wr(),Gy=Vy(Uy);function zy(i){return new re().accept(i)}function re(){this.padding=0}re.prototype=new Gy.default;re.prototype.pad=function(i){for(var e="",t=0,n=this.padding;t<n;t++)e+=" ";return e+=i+`
51
+ `,e};re.prototype.Program=function(i){var e="",t=i.body,n=void 0,r=void 0;if(i.blockParams){var s="BLOCK PARAMS: [";for(n=0,r=i.blockParams.length;n<r;n++)s+=" "+i.blockParams[n];s+=" ]",e+=this.pad(s)}for(n=0,r=t.length;n<r;n++)e+=this.accept(t[n]);return this.padding--,e};re.prototype.MustacheStatement=function(i){return this.pad("{{ "+this.SubExpression(i)+" }}")};re.prototype.Decorator=function(i){return this.pad("{{ DIRECTIVE "+this.SubExpression(i)+" }}")};re.prototype.BlockStatement=re.prototype.DecoratorBlock=function(i){var e="";return e+=this.pad((i.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(i)),i.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(i.program),this.padding--),i.inverse&&(i.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(i.inverse),this.padding--,i.program&&this.padding--),this.padding--,e};re.prototype.PartialStatement=function(i){var e="PARTIAL:"+i.name.original;return i.params[0]&&(e+=" "+this.accept(i.params[0])),i.hash&&(e+=" "+this.accept(i.hash)),this.pad("{{> "+e+" }}")};re.prototype.PartialBlockStatement=function(i){var e="PARTIAL BLOCK:"+i.name.original;return i.params[0]&&(e+=" "+this.accept(i.params[0])),i.hash&&(e+=" "+this.accept(i.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(i.program),this.padding--,this.pad("{{> "+e+" }}")};re.prototype.ContentStatement=function(i){return this.pad("CONTENT[ '"+i.value+"' ]")};re.prototype.CommentStatement=function(i){return this.pad("{{! '"+i.value+"' }}")};re.prototype.SubExpression=function(i){for(var e=i.params,t=[],n=void 0,r=0,s=e.length;r<s;r++)t.push(this.accept(e[r]));return e="["+t.join(", ")+"]",n=i.hash?" "+this.accept(i.hash):"",this.accept(i.path)+" "+e+n};re.prototype.PathExpression=function(i){var e=i.parts.join("/");return(i.data?"@":"")+"PATH:"+e};re.prototype.StringLiteral=function(i){return'"'+i.value+'"'};re.prototype.NumberLiteral=function(i){return"NUMBER{"+i.value+"}"};re.prototype.BooleanLiteral=function(i){return"BOOLEAN{"+i.value+"}"};re.prototype.UndefinedLiteral=function(){return"UNDEFINED"};re.prototype.NullLiteral=function(){return"NULL"};re.prototype.Hash=function(i){for(var e=i.pairs,t=[],n=0,r=e.length;n<r;n++)t.push(this.accept(e[n]));return"HASH{"+t.join(", ")+"}"};re.prototype.HashPair=function(i){return i.key+"="+this.accept(i.value)}});var cf=W((V2,lf)=>{var Lr=rf().default,af=sf();Lr.PrintVisitor=af.PrintVisitor;Lr.print=af.print;lf.exports=Lr;function of(i,e){var t=$e("fs"),n=t.readFileSync(e,"utf8");i.exports=Lr.compile(n)}typeof $e<"u"&&$e.extensions&&($e.extensions[".handlebars"]=of,$e.extensions[".hbs"]=of)});import{readFile as df,writeFile as hf,access as ob,mkdir as ab}from"node:fs/promises";import{resolve as rt,relative as wa}from"node:path";import{pathToFileURL as pf}from"node:url";function xf(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var we={},li={},bt={},Ca;function un(){if(Ca)return bt;Ca=1;function i(o){return typeof o>"u"||o===null}function e(o){return typeof o=="object"&&o!==null}function t(o){return Array.isArray(o)?o:i(o)?[]:[o]}function n(o,a){if(a){let l=Object.keys(a);for(let c=0,f=l.length;c<f;c+=1){let h=l[c];o[h]=a[h]}}return o}function r(o,a){let l="";for(let c=0;c<a;c+=1)l+=o;return l}function s(o){return o===0&&Number.NEGATIVE_INFINITY===1/o}return bt.isNothing=i,bt.isObject=e,bt.toArray=t,bt.repeat=r,bt.isNegativeZero=s,bt.extend=n,bt}var qr,ka;function hn(){if(ka)return qr;ka=1;function i(t,n){let r="",s=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!n&&t.mark.snippet&&(r+=`
52
52
 
53
- `+t.mark.snippet),s+" "+r):s}function e(t,n){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=n,this.message=i(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(n){return this.name+": "+i(this,n)},qr=e,qr}var Hr,Aa;function Ef(){if(Aa)return Hr;Aa=1;let i=un();function e(r,s,o,a,c){let l="",f="",h=Math.floor(c/2)-1;return a-s>h&&(l=" ... ",s=a-h+l.length),o-a>h&&(f=" ...",o=a+h-f.length),{str:l+r.slice(s,o).replace(/\t/g,"\u2192")+f,pos:a-s+l.length}}function t(r,s){return i.repeat(" ",s-r.length)+r}function n(r,s){if(s=Object.create(s||null),!r.buffer)return null;s.maxLength||(s.maxLength=79),typeof s.indent!="number"&&(s.indent=1),typeof s.linesBefore!="number"&&(s.linesBefore=3),typeof s.linesAfter!="number"&&(s.linesAfter=2);let o=/\r?\n|\r|\0/g,a=[0],c=[],l,f=-1;for(;l=o.exec(r.buffer);)c.push(l.index),a.push(l.index+l[0].length),r.position<=l.index&&f<0&&(f=a.length-2);f<0&&(f=a.length-1);let h="",p=Math.min(r.line+s.linesAfter,c.length).toString().length,m=s.maxLength-(s.indent+p+3);for(let g=1;g<=s.linesBefore&&!(f-g<0);g++){let k=e(r.buffer,a[f-g],c[f-g],r.position-(a[f]-a[f-g]),m);h=i.repeat(" ",s.indent)+t((r.line-g+1).toString(),p)+" | "+k.str+`
54
- `+h}let _=e(r.buffer,a[f],c[f],r.position,m);h+=i.repeat(" ",s.indent)+t((r.line+1).toString(),p)+" | "+_.str+`
53
+ `+t.mark.snippet),s+" "+r):s}function e(t,n){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=n,this.message=i(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(n){return this.name+": "+i(this,n)},qr=e,qr}var Hr,Aa;function Ef(){if(Aa)return Hr;Aa=1;let i=un();function e(r,s,o,a,l){let c="",f="",h=Math.floor(l/2)-1;return a-s>h&&(c=" ... ",s=a-h+c.length),o-a>h&&(f=" ...",o=a+h-f.length),{str:c+r.slice(s,o).replace(/\t/g,"\u2192")+f,pos:a-s+c.length}}function t(r,s){return i.repeat(" ",s-r.length)+r}function n(r,s){if(s=Object.create(s||null),!r.buffer)return null;s.maxLength||(s.maxLength=79),typeof s.indent!="number"&&(s.indent=1),typeof s.linesBefore!="number"&&(s.linesBefore=3),typeof s.linesAfter!="number"&&(s.linesAfter=2);let o=/\r?\n|\r|\0/g,a=[0],l=[],c,f=-1;for(;c=o.exec(r.buffer);)l.push(c.index),a.push(c.index+c[0].length),r.position<=c.index&&f<0&&(f=a.length-2);f<0&&(f=a.length-1);let h="",p=Math.min(r.line+s.linesAfter,l.length).toString().length,m=s.maxLength-(s.indent+p+3);for(let g=1;g<=s.linesBefore&&!(f-g<0);g++){let k=e(r.buffer,a[f-g],l[f-g],r.position-(a[f]-a[f-g]),m);h=i.repeat(" ",s.indent)+t((r.line-g+1).toString(),p)+" | "+k.str+`
54
+ `+h}let _=e(r.buffer,a[f],l[f],r.position,m);h+=i.repeat(" ",s.indent)+t((r.line+1).toString(),p)+" | "+_.str+`
55
55
  `,h+=i.repeat("-",s.indent+p+3+_.pos)+`^
56
- `;for(let g=1;g<=s.linesAfter&&!(f+g>=c.length);g++){let k=e(r.buffer,a[f+g],c[f+g],r.position-(a[f]-a[f+g]),m);h+=i.repeat(" ",s.indent)+t((r.line+g+1).toString(),p)+" | "+k.str+`
57
- `}return h.replace(/\n$/,"")}return Hr=n,Hr}var Wr,Oa;function Ce(){if(Oa)return Wr;Oa=1;let i=hn(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],t=["scalar","sequence","mapping"];function n(s){let o={};return s!==null&&Object.keys(s).forEach(function(a){s[a].forEach(function(c){o[String(c)]=a})}),o}function r(s,o){if(o=o||{},Object.keys(o).forEach(function(a){if(e.indexOf(a)===-1)throw new i('Unknown option "'+a+'" is met in definition of "'+s+'" YAML type.')}),this.options=o,this.tag=s,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(a){return a},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=n(o.styleAliases||null),t.indexOf(this.kind)===-1)throw new i('Unknown kind "'+this.kind+'" is specified for "'+s+'" YAML type.')}return Wr=r,Wr}var jr,Pa;function Ka(){if(Pa)return jr;Pa=1;let i=hn(),e=Ce();function t(s,o){let a=[];return s[o].forEach(function(c){let l=a.length;a.forEach(function(f,h){f.tag===c.tag&&f.kind===c.kind&&f.multi===c.multi&&(l=h)}),a[l]=c}),a}function n(){let s={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function o(a){a.multi?(s.multi[a.kind].push(a),s.multi.fallback.push(a)):s[a.kind][a.tag]=s.fallback[a.tag]=a}for(let a=0,c=arguments.length;a<c;a+=1)arguments[a].forEach(o);return s}function r(s){return this.extend(s)}return r.prototype.extend=function(o){let a=[],c=[];if(o instanceof e)c.push(o);else if(Array.isArray(o))c=c.concat(o);else if(o&&(Array.isArray(o.implicit)||Array.isArray(o.explicit)))o.implicit&&(a=a.concat(o.implicit)),o.explicit&&(c=c.concat(o.explicit));else throw new i("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(f){if(!(f instanceof e))throw new i("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.loadKind!=="scalar")throw new i("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(f.multi)throw new i("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),c.forEach(function(f){if(!(f instanceof e))throw new i("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let l=Object.create(r.prototype);return l.implicit=(this.implicit||[]).concat(a),l.explicit=(this.explicit||[]).concat(c),l.compiledImplicit=t(l,"implicit"),l.compiledExplicit=t(l,"explicit"),l.compiledTypeMap=n(l.compiledImplicit,l.compiledExplicit),l},jr=r,jr}var Vr,Ra;function Qa(){if(Ra)return Vr;Ra=1;let i=Ce();return Vr=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Vr}var Ur,Ia;function Xa(){if(Ia)return Ur;Ia=1;let i=Ce();return Ur=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Ur}var Gr,La;function Za(){if(La)return Gr;La=1;let i=Ce();return Gr=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Gr}var zr,Da;function el(){if(Da)return zr;Da=1;let i=Ka();return zr=new i({explicit:[Qa(),Xa(),Za()]}),zr}var $r,Ta;function tl(){if(Ta)return $r;Ta=1;let i=Ce();function e(r){if(r===null)return!0;let s=r.length;return s===1&&r==="~"||s===4&&(r==="null"||r==="Null"||r==="NULL")}function t(){return null}function n(r){return r===null}return $r=new i("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:t,predicate:n,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),$r}var Yr,Na;function nl(){if(Na)return Yr;Na=1;let i=Ce();function e(r){if(r===null)return!1;let s=r.length;return s===4&&(r==="true"||r==="True"||r==="TRUE")||s===5&&(r==="false"||r==="False"||r==="FALSE")}function t(r){return r==="true"||r==="True"||r==="TRUE"}function n(r){return Object.prototype.toString.call(r)==="[object Boolean]"}return Yr=new i("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:t,predicate:n,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"}),Yr}var Jr,Ma;function il(){if(Ma)return Jr;Ma=1;let i=un(),e=Ce();function t(l){return l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102}function n(l){return l>=48&&l<=55}function r(l){return l>=48&&l<=57}function s(l){if(l===null)return!1;let f=l.length,h=0,p=!1;if(!f)return!1;let m=l[h];if((m==="-"||m==="+")&&(m=l[++h]),m==="0"){if(h+1===f)return!0;if(m=l[++h],m==="b"){for(h++;h<f;h++){if(m=l[h],m!=="0"&&m!=="1")return!1;p=!0}return p&&isFinite(o(l))}if(m==="x"){for(h++;h<f;h++){if(!t(l.charCodeAt(h)))return!1;p=!0}return p&&isFinite(o(l))}if(m==="o"){for(h++;h<f;h++){if(!n(l.charCodeAt(h)))return!1;p=!0}return p&&isFinite(o(l))}}for(;h<f;h++){if(!r(l.charCodeAt(h)))return!1;p=!0}return p?isFinite(o(l)):!1}function o(l){let f=l,h=1,p=f[0];if((p==="-"||p==="+")&&(p==="-"&&(h=-1),f=f.slice(1),p=f[0]),f==="0")return 0;if(p==="0"){if(f[1]==="b")return h*parseInt(f.slice(2),2);if(f[1]==="x")return h*parseInt(f.slice(2),16);if(f[1]==="o")return h*parseInt(f.slice(2),8)}return h*parseInt(f,10)}function a(l){return o(l)}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&l%1===0&&!i.isNegativeZero(l)}return Jr=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:s,construct:a,predicate:c,represent:{binary:function(l){return l>=0?"0b"+l.toString(2):"-0b"+l.toString(2).slice(1)},octal:function(l){return l>=0?"0o"+l.toString(8):"-0o"+l.toString(8).slice(1)},decimal:function(l){return l.toString(10)},hexadecimal:function(l){return l>=0?"0x"+l.toString(16).toUpperCase():"-0x"+l.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Jr}var Kr,Fa;function rl(){if(Fa)return Kr;Fa=1;let i=un(),e=Ce(),t=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),n=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function r(l){return l===null||!t.test(l)?!1:isFinite(parseFloat(l,10))?!0:n.test(l)}function s(l){let f=l.toLowerCase(),h=f[0]==="-"?-1:1;return"+-".indexOf(f[0])>=0&&(f=f.slice(1)),f===".inf"?h===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:f===".nan"?NaN:h*parseFloat(f,10)}let o=/^[-+]?[0-9]+e/;function a(l,f){if(isNaN(l))switch(f){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===l)switch(f){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===l)switch(f){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(l))return"-0.0";let h=l.toString(10);return o.test(h)?h.replace("e",".e"):h}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&(l%1!==0||i.isNegativeZero(l))}return Kr=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:r,construct:s,predicate:c,represent:a,defaultStyle:"lowercase"}),Kr}var Qr,Ba;function sl(){return Ba||(Ba=1,Qr=el().extend({implicit:[tl(),nl(),il(),rl()]})),Qr}var Xr,qa;function ol(){return qa||(qa=1,Xr=sl()),Xr}var Zr,Ha;function al(){if(Ha)return Zr;Ha=1;let i=Ce(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function n(o){return o===null?!1:e.exec(o)!==null||t.exec(o)!==null}function r(o){let a=0,c=null,l=e.exec(o);if(l===null&&(l=t.exec(o)),l===null)throw new Error("Date resolve error");let f=+l[1],h=+l[2]-1,p=+l[3];if(!l[4])return new Date(Date.UTC(f,h,p));let m=+l[4],_=+l[5],g=+l[6];if(l[7]){for(a=l[7].slice(0,3);a.length<3;)a+="0";a=+a}if(l[9]){let w=+l[10],S=+(l[11]||0);c=(w*60+S)*6e4,l[9]==="-"&&(c=-c)}let k=new Date(Date.UTC(f,h,p,m,_,g,a));return c&&k.setTime(k.getTime()-c),k}function s(o){return o.toISOString()}return Zr=new i("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n,construct:r,instanceOf:Date,represent:s}),Zr}var es,Wa;function ll(){if(Wa)return es;Wa=1;let i=Ce();function e(t){return t==="<<"||t===null}return es=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),es}var ts,ja;function cl(){if(ja)return ts;ja=1;let i=Ce(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
58
- \r`;function t(o){if(o===null)return!1;let a=0,c=o.length,l=e;for(let f=0;f<c;f++){let h=l.indexOf(o.charAt(f));if(!(h>64)){if(h<0)return!1;a+=6}}return a%8===0}function n(o){let a=o.replace(/[\r\n=]/g,""),c=a.length,l=e,f=0,h=[];for(let m=0;m<c;m++)m%4===0&&m&&(h.push(f>>16&255),h.push(f>>8&255),h.push(f&255)),f=f<<6|l.indexOf(a.charAt(m));let p=c%4*6;return p===0?(h.push(f>>16&255),h.push(f>>8&255),h.push(f&255)):p===18?(h.push(f>>10&255),h.push(f>>2&255)):p===12&&h.push(f>>4&255),new Uint8Array(h)}function r(o){let a="",c=0,l=o.length,f=e;for(let p=0;p<l;p++)p%3===0&&p&&(a+=f[c>>18&63],a+=f[c>>12&63],a+=f[c>>6&63],a+=f[c&63]),c=(c<<8)+o[p];let h=l%3;return h===0?(a+=f[c>>18&63],a+=f[c>>12&63],a+=f[c>>6&63],a+=f[c&63]):h===2?(a+=f[c>>10&63],a+=f[c>>4&63],a+=f[c<<2&63],a+=f[64]):h===1&&(a+=f[c>>2&63],a+=f[c<<4&63],a+=f[64],a+=f[64]),a}function s(o){return Object.prototype.toString.call(o)==="[object Uint8Array]"}return ts=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:t,construct:n,predicate:s,represent:r}),ts}var ns,Va;function ul(){if(Va)return ns;Va=1;let i=Ce(),e=Object.prototype.hasOwnProperty,t=Object.prototype.toString;function n(s){if(s===null)return!0;let o=[],a=s;for(let c=0,l=a.length;c<l;c+=1){let f=a[c],h=!1;if(t.call(f)!=="[object Object]")return!1;let p;for(p in f)if(e.call(f,p))if(!h)h=!0;else return!1;if(!h)return!1;if(o.indexOf(p)===-1)o.push(p);else return!1}return!0}function r(s){return s!==null?s:[]}return ns=new i("tag:yaml.org,2002:omap",{kind:"sequence",resolve:n,construct:r}),ns}var is,Ua;function hl(){if(Ua)return is;Ua=1;let i=Ce(),e=Object.prototype.toString;function t(r){if(r===null)return!0;let s=r,o=new Array(s.length);for(let a=0,c=s.length;a<c;a+=1){let l=s[a];if(e.call(l)!=="[object Object]")return!1;let f=Object.keys(l);if(f.length!==1)return!1;o[a]=[f[0],l[f[0]]]}return!0}function n(r){if(r===null)return[];let s=r,o=new Array(s.length);for(let a=0,c=s.length;a<c;a+=1){let l=s[a],f=Object.keys(l);o[a]=[f[0],l[f[0]]]}return o}return is=new i("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:t,construct:n}),is}var rs,Ga;function fl(){if(Ga)return rs;Ga=1;let i=Ce(),e=Object.prototype.hasOwnProperty;function t(r){if(r===null)return!0;let s=r;for(let o in s)if(e.call(s,o)&&s[o]!==null)return!1;return!0}function n(r){return r!==null?r:{}}return rs=new i("tag:yaml.org,2002:set",{kind:"mapping",resolve:t,construct:n}),rs}var ss,za;function as(){return za||(za=1,ss=ol().extend({implicit:[al(),ll()],explicit:[cl(),ul(),hl(),fl()]})),ss}var $a;function Cf(){if($a)return li;$a=1;let i=un(),e=hn(),t=Ef(),n=as(),r=Object.prototype.hasOwnProperty,s=1,o=2,a=3,c=4,l=1,f=2,h=3,p=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/[\x85\u2028\u2029]/,_=/[,\[\]{}]/,g=/^(?:!|!!|![0-9A-Za-z-]+!)$/,k=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function w(u){return Object.prototype.toString.call(u)}function S(u){return u===10||u===13}function P(u){return u===9||u===32}function D(u){return u===9||u===32||u===10||u===13}function B(u){return u===44||u===91||u===93||u===123||u===125}function U(u){if(u>=48&&u<=57)return u-48;let y=u|32;return y>=97&&y<=102?y-97+10:-1}function J(u){return u===120?2:u===117?4:u===85?8:0}function he(u){return u>=48&&u<=57?u-48:-1}function le(u){switch(u){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
56
+ `;for(let g=1;g<=s.linesAfter&&!(f+g>=l.length);g++){let k=e(r.buffer,a[f+g],l[f+g],r.position-(a[f]-a[f+g]),m);h+=i.repeat(" ",s.indent)+t((r.line+g+1).toString(),p)+" | "+k.str+`
57
+ `}return h.replace(/\n$/,"")}return Hr=n,Hr}var Wr,Oa;function Ce(){if(Oa)return Wr;Oa=1;let i=hn(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],t=["scalar","sequence","mapping"];function n(s){let o={};return s!==null&&Object.keys(s).forEach(function(a){s[a].forEach(function(l){o[String(l)]=a})}),o}function r(s,o){if(o=o||{},Object.keys(o).forEach(function(a){if(e.indexOf(a)===-1)throw new i('Unknown option "'+a+'" is met in definition of "'+s+'" YAML type.')}),this.options=o,this.tag=s,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(a){return a},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=n(o.styleAliases||null),t.indexOf(this.kind)===-1)throw new i('Unknown kind "'+this.kind+'" is specified for "'+s+'" YAML type.')}return Wr=r,Wr}var jr,Pa;function Ka(){if(Pa)return jr;Pa=1;let i=hn(),e=Ce();function t(s,o){let a=[];return s[o].forEach(function(l){let c=a.length;a.forEach(function(f,h){f.tag===l.tag&&f.kind===l.kind&&f.multi===l.multi&&(c=h)}),a[c]=l}),a}function n(){let s={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function o(a){a.multi?(s.multi[a.kind].push(a),s.multi.fallback.push(a)):s[a.kind][a.tag]=s.fallback[a.tag]=a}for(let a=0,l=arguments.length;a<l;a+=1)arguments[a].forEach(o);return s}function r(s){return this.extend(s)}return r.prototype.extend=function(o){let a=[],l=[];if(o instanceof e)l.push(o);else if(Array.isArray(o))l=l.concat(o);else if(o&&(Array.isArray(o.implicit)||Array.isArray(o.explicit)))o.implicit&&(a=a.concat(o.implicit)),o.explicit&&(l=l.concat(o.explicit));else throw new i("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(f){if(!(f instanceof e))throw new i("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.loadKind!=="scalar")throw new i("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(f.multi)throw new i("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(f){if(!(f instanceof e))throw new i("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let c=Object.create(r.prototype);return c.implicit=(this.implicit||[]).concat(a),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=t(c,"implicit"),c.compiledExplicit=t(c,"explicit"),c.compiledTypeMap=n(c.compiledImplicit,c.compiledExplicit),c},jr=r,jr}var Vr,Ra;function Qa(){if(Ra)return Vr;Ra=1;let i=Ce();return Vr=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Vr}var Ur,Ia;function Xa(){if(Ia)return Ur;Ia=1;let i=Ce();return Ur=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Ur}var Gr,La;function Za(){if(La)return Gr;La=1;let i=Ce();return Gr=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Gr}var zr,Da;function el(){if(Da)return zr;Da=1;let i=Ka();return zr=new i({explicit:[Qa(),Xa(),Za()]}),zr}var $r,Ta;function tl(){if(Ta)return $r;Ta=1;let i=Ce();function e(r){if(r===null)return!0;let s=r.length;return s===1&&r==="~"||s===4&&(r==="null"||r==="Null"||r==="NULL")}function t(){return null}function n(r){return r===null}return $r=new i("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:t,predicate:n,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),$r}var Yr,Na;function nl(){if(Na)return Yr;Na=1;let i=Ce();function e(r){if(r===null)return!1;let s=r.length;return s===4&&(r==="true"||r==="True"||r==="TRUE")||s===5&&(r==="false"||r==="False"||r==="FALSE")}function t(r){return r==="true"||r==="True"||r==="TRUE"}function n(r){return Object.prototype.toString.call(r)==="[object Boolean]"}return Yr=new i("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:t,predicate:n,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"}),Yr}var Jr,Ma;function il(){if(Ma)return Jr;Ma=1;let i=un(),e=Ce();function t(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}function n(c){return c>=48&&c<=55}function r(c){return c>=48&&c<=57}function s(c){if(c===null)return!1;let f=c.length,h=0,p=!1;if(!f)return!1;let m=c[h];if((m==="-"||m==="+")&&(m=c[++h]),m==="0"){if(h+1===f)return!0;if(m=c[++h],m==="b"){for(h++;h<f;h++){if(m=c[h],m!=="0"&&m!=="1")return!1;p=!0}return p&&isFinite(o(c))}if(m==="x"){for(h++;h<f;h++){if(!t(c.charCodeAt(h)))return!1;p=!0}return p&&isFinite(o(c))}if(m==="o"){for(h++;h<f;h++){if(!n(c.charCodeAt(h)))return!1;p=!0}return p&&isFinite(o(c))}}for(;h<f;h++){if(!r(c.charCodeAt(h)))return!1;p=!0}return p?isFinite(o(c)):!1}function o(c){let f=c,h=1,p=f[0];if((p==="-"||p==="+")&&(p==="-"&&(h=-1),f=f.slice(1),p=f[0]),f==="0")return 0;if(p==="0"){if(f[1]==="b")return h*parseInt(f.slice(2),2);if(f[1]==="x")return h*parseInt(f.slice(2),16);if(f[1]==="o")return h*parseInt(f.slice(2),8)}return h*parseInt(f,10)}function a(c){return o(c)}function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!i.isNegativeZero(c)}return Jr=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:s,construct:a,predicate:l,represent:{binary:function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},octal:function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},decimal:function(c){return c.toString(10)},hexadecimal:function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Jr}var Kr,Fa;function rl(){if(Fa)return Kr;Fa=1;let i=un(),e=Ce(),t=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),n=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function r(c){return c===null||!t.test(c)?!1:isFinite(parseFloat(c,10))?!0:n.test(c)}function s(c){let f=c.toLowerCase(),h=f[0]==="-"?-1:1;return"+-".indexOf(f[0])>=0&&(f=f.slice(1)),f===".inf"?h===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:f===".nan"?NaN:h*parseFloat(f,10)}let o=/^[-+]?[0-9]+e/;function a(c,f){if(isNaN(c))switch(f){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(f){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(f){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(c))return"-0.0";let h=c.toString(10);return o.test(h)?h.replace("e",".e"):h}function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||i.isNegativeZero(c))}return Kr=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:r,construct:s,predicate:l,represent:a,defaultStyle:"lowercase"}),Kr}var Qr,Ba;function sl(){return Ba||(Ba=1,Qr=el().extend({implicit:[tl(),nl(),il(),rl()]})),Qr}var Xr,qa;function ol(){return qa||(qa=1,Xr=sl()),Xr}var Zr,Ha;function al(){if(Ha)return Zr;Ha=1;let i=Ce(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function n(o){return o===null?!1:e.exec(o)!==null||t.exec(o)!==null}function r(o){let a=0,l=null,c=e.exec(o);if(c===null&&(c=t.exec(o)),c===null)throw new Error("Date resolve error");let f=+c[1],h=+c[2]-1,p=+c[3];if(!c[4])return new Date(Date.UTC(f,h,p));let m=+c[4],_=+c[5],g=+c[6];if(c[7]){for(a=c[7].slice(0,3);a.length<3;)a+="0";a=+a}if(c[9]){let w=+c[10],S=+(c[11]||0);l=(w*60+S)*6e4,c[9]==="-"&&(l=-l)}let k=new Date(Date.UTC(f,h,p,m,_,g,a));return l&&k.setTime(k.getTime()-l),k}function s(o){return o.toISOString()}return Zr=new i("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n,construct:r,instanceOf:Date,represent:s}),Zr}var es,Wa;function ll(){if(Wa)return es;Wa=1;let i=Ce();function e(t){return t==="<<"||t===null}return es=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),es}var ts,ja;function cl(){if(ja)return ts;ja=1;let i=Ce(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
58
+ \r`;function t(o){if(o===null)return!1;let a=0,l=o.length,c=e;for(let f=0;f<l;f++){let h=c.indexOf(o.charAt(f));if(!(h>64)){if(h<0)return!1;a+=6}}return a%8===0}function n(o){let a=o.replace(/[\r\n=]/g,""),l=a.length,c=e,f=0,h=[];for(let m=0;m<l;m++)m%4===0&&m&&(h.push(f>>16&255),h.push(f>>8&255),h.push(f&255)),f=f<<6|c.indexOf(a.charAt(m));let p=l%4*6;return p===0?(h.push(f>>16&255),h.push(f>>8&255),h.push(f&255)):p===18?(h.push(f>>10&255),h.push(f>>2&255)):p===12&&h.push(f>>4&255),new Uint8Array(h)}function r(o){let a="",l=0,c=o.length,f=e;for(let p=0;p<c;p++)p%3===0&&p&&(a+=f[l>>18&63],a+=f[l>>12&63],a+=f[l>>6&63],a+=f[l&63]),l=(l<<8)+o[p];let h=c%3;return h===0?(a+=f[l>>18&63],a+=f[l>>12&63],a+=f[l>>6&63],a+=f[l&63]):h===2?(a+=f[l>>10&63],a+=f[l>>4&63],a+=f[l<<2&63],a+=f[64]):h===1&&(a+=f[l>>2&63],a+=f[l<<4&63],a+=f[64],a+=f[64]),a}function s(o){return Object.prototype.toString.call(o)==="[object Uint8Array]"}return ts=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:t,construct:n,predicate:s,represent:r}),ts}var ns,Va;function ul(){if(Va)return ns;Va=1;let i=Ce(),e=Object.prototype.hasOwnProperty,t=Object.prototype.toString;function n(s){if(s===null)return!0;let o=[],a=s;for(let l=0,c=a.length;l<c;l+=1){let f=a[l],h=!1;if(t.call(f)!=="[object Object]")return!1;let p;for(p in f)if(e.call(f,p))if(!h)h=!0;else return!1;if(!h)return!1;if(o.indexOf(p)===-1)o.push(p);else return!1}return!0}function r(s){return s!==null?s:[]}return ns=new i("tag:yaml.org,2002:omap",{kind:"sequence",resolve:n,construct:r}),ns}var is,Ua;function hl(){if(Ua)return is;Ua=1;let i=Ce(),e=Object.prototype.toString;function t(r){if(r===null)return!0;let s=r,o=new Array(s.length);for(let a=0,l=s.length;a<l;a+=1){let c=s[a];if(e.call(c)!=="[object Object]")return!1;let f=Object.keys(c);if(f.length!==1)return!1;o[a]=[f[0],c[f[0]]]}return!0}function n(r){if(r===null)return[];let s=r,o=new Array(s.length);for(let a=0,l=s.length;a<l;a+=1){let c=s[a],f=Object.keys(c);o[a]=[f[0],c[f[0]]]}return o}return is=new i("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:t,construct:n}),is}var rs,Ga;function fl(){if(Ga)return rs;Ga=1;let i=Ce(),e=Object.prototype.hasOwnProperty;function t(r){if(r===null)return!0;let s=r;for(let o in s)if(e.call(s,o)&&s[o]!==null)return!1;return!0}function n(r){return r!==null?r:{}}return rs=new i("tag:yaml.org,2002:set",{kind:"mapping",resolve:t,construct:n}),rs}var ss,za;function as(){return za||(za=1,ss=ol().extend({implicit:[al(),ll()],explicit:[cl(),ul(),hl(),fl()]})),ss}var $a;function Cf(){if($a)return li;$a=1;let i=un(),e=hn(),t=Ef(),n=as(),r=Object.prototype.hasOwnProperty,s=1,o=2,a=3,l=4,c=1,f=2,h=3,p=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/[\x85\u2028\u2029]/,_=/[,\[\]{}]/,g=/^(?:!|!!|![0-9A-Za-z-]+!)$/,k=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function w(u){return Object.prototype.toString.call(u)}function S(u){return u===10||u===13}function P(u){return u===9||u===32}function D(u){return u===9||u===32||u===10||u===13}function B(u){return u===44||u===91||u===93||u===123||u===125}function U(u){if(u>=48&&u<=57)return u-48;let y=u|32;return y>=97&&y<=102?y-97+10:-1}function J(u){return u===120?2:u===117?4:u===85?8:0}function he(u){return u>=48&&u<=57?u-48:-1}function le(u){switch(u){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
59
59
  `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function se(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function G(u,y,x){y==="__proto__"?Object.defineProperty(u,y,{configurable:!0,enumerable:!0,writable:!0,value:x}):u[y]=x}let ce=new Array(256),V=new Array(256);for(let u=0;u<256;u++)ce[u]=le(u)?1:0,V[u]=le(u);function z(u,y){this.input=u,this.filename=y.filename||null,this.schema=y.schema||n,this.onWarning=y.onWarning||null,this.legacy=y.legacy||!1,this.json=y.json||!1,this.listener=y.listener||null,this.maxDepth=typeof y.maxDepth=="number"?y.maxDepth:100,this.maxTotalMergeKeys=typeof y.maxTotalMergeKeys=="number"?y.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=u.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function ge(u,y){let x={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return x.snippet=t(x),new e(y,x)}function T(u,y){throw ge(u,y)}function te(u,y){u.onWarning&&u.onWarning.call(null,ge(u,y))}function _e(u,y,x){let A=u.anchorMapTransactions;if(A.length!==0){let v=A[A.length-1];r.call(v,y)||(v[y]={existed:r.call(u.anchorMap,y),value:u.anchorMap[y]})}u.anchorMap[y]=x}function Ie(u){u.anchorMapTransactions.push(Object.create(null))}function Ee(u){let y=u.anchorMapTransactions.pop(),x=u.anchorMapTransactions;if(x.length===0)return;let A=x[x.length-1],v=Object.keys(y);for(let L=0,d=v.length;L<d;L+=1){let b=v[L];r.call(A,b)||(A[b]=y[b])}}function gt(u){let y=u.anchorMapTransactions.pop(),x=Object.keys(y);for(let A=x.length-1;A>=0;A-=1){let v=y[x[A]];v.existed?u.anchorMap[x[A]]=v.value:delete u.anchorMap[x[A]]}}function _t(u){return{position:u.position,line:u.line,lineStart:u.lineStart,lineIndent:u.lineIndent,firstTabInLine:u.firstTabInLine,tag:u.tag,anchor:u.anchor,kind:u.kind,result:u.result}}function Bt(u,y){u.position=y.position,u.line=y.line,u.lineStart=y.lineStart,u.lineIndent=y.lineIndent,u.firstTabInLine=y.firstTabInLine,u.tag=y.tag,u.anchor=y.anchor,u.kind=y.kind,u.result=y.result}let Xn={YAML:function(y,x,A){y.version!==null&&T(y,"duplication of %YAML directive"),A.length!==1&&T(y,"YAML directive accepts exactly one argument");let v=/^([0-9]+)\.([0-9]+)$/.exec(A[0]);v===null&&T(y,"ill-formed argument of the YAML directive");let L=parseInt(v[1],10),d=parseInt(v[2],10);L!==1&&T(y,"unacceptable YAML version of the document"),y.version=A[0],y.checkLineBreaks=d<2,d!==1&&d!==2&&te(y,"unsupported YAML version of the document")},TAG:function(y,x,A){let v;A.length!==2&&T(y,"TAG directive accepts exactly two arguments");let L=A[0];v=A[1],g.test(L)||T(y,"ill-formed tag handle (first argument) of the TAG directive"),r.call(y.tagMap,L)&&T(y,'there is a previously declared suffix for "'+L+'" tag handle'),k.test(v)||T(y,"ill-formed tag prefix (second argument) of the TAG directive");try{v=decodeURIComponent(v)}catch{T(y,"tag prefix is malformed: "+v)}y.tagMap[L]=v}};function Le(u,y,x,A){if(y<x){let v=u.input.slice(y,x);if(A)for(let L=0,d=v.length;L<d;L+=1){let b=v.charCodeAt(L);b===9||b>=32&&b<=1114111||T(u,"expected valid JSON character")}else p.test(v)&&T(u,"the stream contains non-printable characters");u.result+=v}}function yt(u,y,x,A){i.isObject(x)||T(u,"cannot merge mappings; the provided source object is unacceptable");let v=Object.keys(x);for(let L=0,d=v.length;L<d;L+=1){let b=v[L];u.maxTotalMergeKeys!==-1&&++u.totalMergeKeys>u.maxTotalMergeKeys&&T(u,"merge keys exceeded maxTotalMergeKeys ("+u.maxTotalMergeKeys+")"),r.call(y,b)||(G(y,b,x[b]),A[b]=!0)}}function st(u,y,x,A,v,L,d,b,R){if(Array.isArray(v)){v=Array.prototype.slice.call(v);for(let E=0,C=v.length;E<C;E+=1)Array.isArray(v[E])&&T(u,"nested arrays are not supported inside keys"),typeof v=="object"&&w(v[E])==="[object Object]"&&(v[E]="[object Object]")}if(typeof v=="object"&&w(v)==="[object Object]"&&(v="[object Object]"),v=String(v),y===null&&(y={}),A==="tag:yaml.org,2002:merge")if(Array.isArray(L))for(let E=0,C=L.length;E<C;E+=1)yt(u,y,L[E],x);else yt(u,y,L,x);else!u.json&&!r.call(x,v)&&r.call(y,v)&&(u.line=d||u.line,u.lineStart=b||u.lineStart,u.position=R||u.position,T(u,"duplicated mapping key")),G(y,v,L),delete x[v];return y}function qt(u){let y=u.input.charCodeAt(u.position);y===10?u.position++:y===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):T(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function ie(u,y,x){let A=0,v=u.input.charCodeAt(u.position);for(;v!==0;){for(;P(v);)v===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),v=u.input.charCodeAt(++u.position);if(y&&v===35)do v=u.input.charCodeAt(++u.position);while(v!==10&&v!==13&&v!==0);if(S(v))for(qt(u),v=u.input.charCodeAt(u.position),A++,u.lineIndent=0;v===32;)u.lineIndent++,v=u.input.charCodeAt(++u.position);else break}return x!==-1&&A!==0&&u.lineIndent<x&&te(u,"deficient indentation"),A}function Ht(u){let y=u.position,x=u.input.charCodeAt(y);return!!((x===45||x===46)&&x===u.input.charCodeAt(y+1)&&x===u.input.charCodeAt(y+2)&&(y+=3,x=u.input.charCodeAt(y),x===0||D(x)))}function ot(u,y){y===1?u.result+=" ":y>1&&(u.result+=i.repeat(`
60
- `,y-1))}function Zn(u,y,x){let A,v,L,d,b,R,E=u.kind,C=u.result,I=u.input.charCodeAt(u.position);if(D(I)||B(I)||I===35||I===38||I===42||I===33||I===124||I===62||I===39||I===34||I===37||I===64||I===96)return!1;if(I===63||I===45){let O=u.input.charCodeAt(u.position+1);if(D(O)||x&&B(O))return!1}for(u.kind="scalar",u.result="",A=v=u.position,L=!1;I!==0;){if(I===58){let O=u.input.charCodeAt(u.position+1);if(D(O)||x&&B(O))break}else if(I===35){let O=u.input.charCodeAt(u.position-1);if(D(O))break}else{if(u.position===u.lineStart&&Ht(u)||x&&B(I))break;if(S(I))if(d=u.line,b=u.lineStart,R=u.lineIndent,ie(u,!1,-1),u.lineIndent>=y){L=!0,I=u.input.charCodeAt(u.position);continue}else{u.position=v,u.line=d,u.lineStart=b,u.lineIndent=R;break}}L&&(Le(u,A,v,!1),ot(u,u.line-d),A=v=u.position,L=!1),P(I)||(v=u.position+1),I=u.input.charCodeAt(++u.position)}return Le(u,A,v,!1),u.result?!0:(u.kind=E,u.result=C,!1)}function ei(u,y){let x,A,v=u.input.charCodeAt(u.position);if(v!==39)return!1;for(u.kind="scalar",u.result="",u.position++,x=A=u.position;(v=u.input.charCodeAt(u.position))!==0;)if(v===39)if(Le(u,x,u.position,!0),v=u.input.charCodeAt(++u.position),v===39)x=u.position,u.position++,A=u.position;else return!0;else S(v)?(Le(u,x,A,!0),ot(u,ie(u,!1,y)),x=A=u.position):u.position===u.lineStart&&Ht(u)?T(u,"unexpected end of the document within a single quoted scalar"):(u.position++,P(v)||(A=u.position));T(u,"unexpected end of the stream within a single quoted scalar")}function an(u,y){let x,A,v,L=u.input.charCodeAt(u.position);if(L!==34)return!1;for(u.kind="scalar",u.result="",u.position++,x=A=u.position;(L=u.input.charCodeAt(u.position))!==0;){if(L===34)return Le(u,x,u.position,!0),u.position++,!0;if(L===92){if(Le(u,x,u.position,!0),L=u.input.charCodeAt(++u.position),S(L))ie(u,!1,y);else if(L<256&&ce[L])u.result+=V[L],u.position++;else if((v=J(L))>0){let d=v,b=0;for(;d>0;d--)L=u.input.charCodeAt(++u.position),(v=U(L))>=0?b=(b<<4)+v:T(u,"expected hexadecimal character");u.result+=se(b),u.position++}else T(u,"unknown escape sequence");x=A=u.position}else S(L)?(Le(u,x,A,!0),ot(u,ie(u,!1,y)),x=A=u.position):u.position===u.lineStart&&Ht(u)?T(u,"unexpected end of the document within a double quoted scalar"):(u.position++,P(L)||(A=u.position))}T(u,"unexpected end of the stream within a double quoted scalar")}function ti(u,y){let x=!0,A,v,L,d=u.tag,b,R=u.anchor,E,C,I,O,M=Object.create(null),N,q,H,Y=u.input.charCodeAt(u.position);if(Y===91)E=93,O=!1,b=[];else if(Y===123)E=125,O=!0,b={};else return!1;for(u.anchor!==null&&_e(u,u.anchor,b),Y=u.input.charCodeAt(++u.position);Y!==0;){if(ie(u,!0,y),Y=u.input.charCodeAt(u.position),Y===E)return u.position++,u.tag=d,u.anchor=R,u.kind=O?"mapping":"sequence",u.result=b,!0;if(x?Y===44&&T(u,"expected the node content, but found ','"):T(u,"missed comma between flow collection entries"),q=N=H=null,C=I=!1,Y===63){let X=u.input.charCodeAt(u.position+1);D(X)&&(C=I=!0,u.position++,ie(u,!0,y))}A=u.line,v=u.lineStart,L=u.position,lt(u,y,s,!1,!0),q=u.tag,N=u.result,ie(u,!0,y),Y=u.input.charCodeAt(u.position),(I||u.line===A)&&Y===58&&(C=!0,Y=u.input.charCodeAt(++u.position),ie(u,!0,y),lt(u,y,s,!1,!0),H=u.result),O?st(u,b,M,q,N,H,A,v,L):C?b.push(st(u,null,M,q,N,H,A,v,L)):b.push(N),ie(u,!0,y),Y=u.input.charCodeAt(u.position),Y===44?(x=!0,Y=u.input.charCodeAt(++u.position)):x=!1}T(u,"unexpected end of the stream within a flow collection")}function ni(u,y){let x,A=l,v=!1,L=!1,d=y,b=0,R=!1,E,C=u.input.charCodeAt(u.position);if(C===124)x=!1;else if(C===62)x=!0;else return!1;for(u.kind="scalar",u.result="";C!==0;)if(C=u.input.charCodeAt(++u.position),C===43||C===45)l===A?A=C===43?h:f:T(u,"repeat of a chomping mode identifier");else if((E=he(C))>=0)E===0?T(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):L?T(u,"repeat of an indentation width identifier"):(d=y+E-1,L=!0);else break;if(P(C)){do C=u.input.charCodeAt(++u.position);while(P(C));if(C===35)do C=u.input.charCodeAt(++u.position);while(!S(C)&&C!==0)}for(;C!==0;){for(qt(u),u.lineIndent=0,C=u.input.charCodeAt(u.position);(!L||u.lineIndent<d)&&C===32;)u.lineIndent++,C=u.input.charCodeAt(++u.position);if(!L&&u.lineIndent>d&&(d=u.lineIndent),S(C)){b++;continue}if(!L&&d===0&&T(u,"missing indentation for block scalar"),u.lineIndent<d){A===h?u.result+=i.repeat(`
61
- `,v?1+b:b):A===l&&v&&(u.result+=`
60
+ `,y-1))}function Zn(u,y,x){let A,v,L,d,b,R,E=u.kind,C=u.result,I=u.input.charCodeAt(u.position);if(D(I)||B(I)||I===35||I===38||I===42||I===33||I===124||I===62||I===39||I===34||I===37||I===64||I===96)return!1;if(I===63||I===45){let O=u.input.charCodeAt(u.position+1);if(D(O)||x&&B(O))return!1}for(u.kind="scalar",u.result="",A=v=u.position,L=!1;I!==0;){if(I===58){let O=u.input.charCodeAt(u.position+1);if(D(O)||x&&B(O))break}else if(I===35){let O=u.input.charCodeAt(u.position-1);if(D(O))break}else{if(u.position===u.lineStart&&Ht(u)||x&&B(I))break;if(S(I))if(d=u.line,b=u.lineStart,R=u.lineIndent,ie(u,!1,-1),u.lineIndent>=y){L=!0,I=u.input.charCodeAt(u.position);continue}else{u.position=v,u.line=d,u.lineStart=b,u.lineIndent=R;break}}L&&(Le(u,A,v,!1),ot(u,u.line-d),A=v=u.position,L=!1),P(I)||(v=u.position+1),I=u.input.charCodeAt(++u.position)}return Le(u,A,v,!1),u.result?!0:(u.kind=E,u.result=C,!1)}function ei(u,y){let x,A,v=u.input.charCodeAt(u.position);if(v!==39)return!1;for(u.kind="scalar",u.result="",u.position++,x=A=u.position;(v=u.input.charCodeAt(u.position))!==0;)if(v===39)if(Le(u,x,u.position,!0),v=u.input.charCodeAt(++u.position),v===39)x=u.position,u.position++,A=u.position;else return!0;else S(v)?(Le(u,x,A,!0),ot(u,ie(u,!1,y)),x=A=u.position):u.position===u.lineStart&&Ht(u)?T(u,"unexpected end of the document within a single quoted scalar"):(u.position++,P(v)||(A=u.position));T(u,"unexpected end of the stream within a single quoted scalar")}function an(u,y){let x,A,v,L=u.input.charCodeAt(u.position);if(L!==34)return!1;for(u.kind="scalar",u.result="",u.position++,x=A=u.position;(L=u.input.charCodeAt(u.position))!==0;){if(L===34)return Le(u,x,u.position,!0),u.position++,!0;if(L===92){if(Le(u,x,u.position,!0),L=u.input.charCodeAt(++u.position),S(L))ie(u,!1,y);else if(L<256&&ce[L])u.result+=V[L],u.position++;else if((v=J(L))>0){let d=v,b=0;for(;d>0;d--)L=u.input.charCodeAt(++u.position),(v=U(L))>=0?b=(b<<4)+v:T(u,"expected hexadecimal character");u.result+=se(b),u.position++}else T(u,"unknown escape sequence");x=A=u.position}else S(L)?(Le(u,x,A,!0),ot(u,ie(u,!1,y)),x=A=u.position):u.position===u.lineStart&&Ht(u)?T(u,"unexpected end of the document within a double quoted scalar"):(u.position++,P(L)||(A=u.position))}T(u,"unexpected end of the stream within a double quoted scalar")}function ti(u,y){let x=!0,A,v,L,d=u.tag,b,R=u.anchor,E,C,I,O,M=Object.create(null),N,q,H,Y=u.input.charCodeAt(u.position);if(Y===91)E=93,O=!1,b=[];else if(Y===123)E=125,O=!0,b={};else return!1;for(u.anchor!==null&&_e(u,u.anchor,b),Y=u.input.charCodeAt(++u.position);Y!==0;){if(ie(u,!0,y),Y=u.input.charCodeAt(u.position),Y===E)return u.position++,u.tag=d,u.anchor=R,u.kind=O?"mapping":"sequence",u.result=b,!0;if(x?Y===44&&T(u,"expected the node content, but found ','"):T(u,"missed comma between flow collection entries"),q=N=H=null,C=I=!1,Y===63){let X=u.input.charCodeAt(u.position+1);D(X)&&(C=I=!0,u.position++,ie(u,!0,y))}A=u.line,v=u.lineStart,L=u.position,lt(u,y,s,!1,!0),q=u.tag,N=u.result,ie(u,!0,y),Y=u.input.charCodeAt(u.position),(I||u.line===A)&&Y===58&&(C=!0,Y=u.input.charCodeAt(++u.position),ie(u,!0,y),lt(u,y,s,!1,!0),H=u.result),O?st(u,b,M,q,N,H,A,v,L):C?b.push(st(u,null,M,q,N,H,A,v,L)):b.push(N),ie(u,!0,y),Y=u.input.charCodeAt(u.position),Y===44?(x=!0,Y=u.input.charCodeAt(++u.position)):x=!1}T(u,"unexpected end of the stream within a flow collection")}function ni(u,y){let x,A=c,v=!1,L=!1,d=y,b=0,R=!1,E,C=u.input.charCodeAt(u.position);if(C===124)x=!1;else if(C===62)x=!0;else return!1;for(u.kind="scalar",u.result="";C!==0;)if(C=u.input.charCodeAt(++u.position),C===43||C===45)c===A?A=C===43?h:f:T(u,"repeat of a chomping mode identifier");else if((E=he(C))>=0)E===0?T(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):L?T(u,"repeat of an indentation width identifier"):(d=y+E-1,L=!0);else break;if(P(C)){do C=u.input.charCodeAt(++u.position);while(P(C));if(C===35)do C=u.input.charCodeAt(++u.position);while(!S(C)&&C!==0)}for(;C!==0;){for(qt(u),u.lineIndent=0,C=u.input.charCodeAt(u.position);(!L||u.lineIndent<d)&&C===32;)u.lineIndent++,C=u.input.charCodeAt(++u.position);if(!L&&u.lineIndent>d&&(d=u.lineIndent),S(C)){b++;continue}if(!L&&d===0&&T(u,"missing indentation for block scalar"),u.lineIndent<d){A===h?u.result+=i.repeat(`
61
+ `,v?1+b:b):A===c&&v&&(u.result+=`
62
62
  `);break}x?P(C)?(R=!0,u.result+=i.repeat(`
63
63
  `,v?1+b:b)):R?(R=!1,u.result+=i.repeat(`
64
64
  `,b+1)):b===0?v&&(u.result+=" "):u.result+=i.repeat(`
65
65
  `,b):u.result+=i.repeat(`
66
- `,v?1+b:b),v=!0,L=!0,b=0;let I=u.position;for(;!S(C)&&C!==0;)C=u.input.charCodeAt(++u.position);Le(u,I,u.position,!1)}return!0}function at(u,y){let x=u.tag,A=u.anchor,v=[],L=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&_e(u,u.anchor,v);let d=u.input.charCodeAt(u.position);for(;d!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,T(u,"tab characters must not be used in indentation")),d===45);){let b=u.input.charCodeAt(u.position+1);if(!D(b))break;if(L=!0,u.position++,ie(u,!0,-1)&&u.lineIndent<=y){v.push(null),d=u.input.charCodeAt(u.position);continue}let R=u.line;if(lt(u,y,a,!1,!0),v.push(u.result),ie(u,!0,-1),d=u.input.charCodeAt(u.position),(u.line===R||u.lineIndent>y)&&d!==0)T(u,"bad indentation of a sequence entry");else if(u.lineIndent<y)break}return L?(u.tag=x,u.anchor=A,u.kind="sequence",u.result=v,!0):!1}function ii(u,y,x){let A,v,L,d,b=u.tag,R=u.anchor,E={},C=Object.create(null),I=null,O=null,M=null,N=!1,q=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&_e(u,u.anchor,E);let H=u.input.charCodeAt(u.position);for(;H!==0;){!N&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,T(u,"tab characters must not be used in indentation"));let Y=u.input.charCodeAt(u.position+1),X=u.line;if((H===63||H===58)&&D(Y))H===63?(N&&(st(u,E,C,I,O,null,v,L,d),I=O=M=null),q=!0,N=!0,A=!0):N?(N=!1,A=!0):T(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,H=Y;else{if(v=u.line,L=u.lineStart,d=u.position,!lt(u,x,o,!1,!0))break;if(u.line===X){for(H=u.input.charCodeAt(u.position);P(H);)H=u.input.charCodeAt(++u.position);if(H===58)H=u.input.charCodeAt(++u.position),D(H)||T(u,"a whitespace character is expected after the key-value separator within a block mapping"),N&&(st(u,E,C,I,O,null,v,L,d),I=O=M=null),q=!0,N=!1,A=!1,I=u.tag,O=u.result;else if(q)T(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=b,u.anchor=R,!0}else if(q)T(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=b,u.anchor=R,!0}if((u.line===X||u.lineIndent>y)&&(N&&(v=u.line,L=u.lineStart,d=u.position),lt(u,y,c,!0,A)&&(N?O=u.result:M=u.result),N||(st(u,E,C,I,O,M,v,L,d),I=O=M=null),ie(u,!0,-1),H=u.input.charCodeAt(u.position)),(u.line===X||u.lineIndent>y)&&H!==0)T(u,"bad indentation of a mapping entry");else if(u.lineIndent<y)break}return N&&st(u,E,C,I,O,null,v,L,d),q&&(u.tag=b,u.anchor=R,u.kind="mapping",u.result=E),q}function Dr(u){let y=!1,x=!1,A,v,L=u.input.charCodeAt(u.position);if(L!==33)return!1;u.tag!==null&&T(u,"duplication of a tag property"),L=u.input.charCodeAt(++u.position),L===60?(y=!0,L=u.input.charCodeAt(++u.position)):L===33?(x=!0,A="!!",L=u.input.charCodeAt(++u.position)):A="!";let d=u.position;if(y){do L=u.input.charCodeAt(++u.position);while(L!==0&&L!==62);u.position<u.length?(v=u.input.slice(d,u.position),L=u.input.charCodeAt(++u.position)):T(u,"unexpected end of the stream within a verbatim tag")}else{for(;L!==0&&!D(L);)L===33&&(x?T(u,"tag suffix cannot contain exclamation marks"):(A=u.input.slice(d-1,u.position+1),g.test(A)||T(u,"named tag handle cannot contain such characters"),x=!0,d=u.position+1)),L=u.input.charCodeAt(++u.position);v=u.input.slice(d,u.position),_.test(v)&&T(u,"tag suffix cannot contain flow indicator characters")}v&&!k.test(v)&&T(u,"tag name cannot contain such characters: "+v);try{v=decodeURIComponent(v)}catch{T(u,"tag name is malformed: "+v)}return y?u.tag=v:r.call(u.tagMap,A)?u.tag=u.tagMap[A]+v:A==="!"?u.tag="!"+v:A==="!!"?u.tag="tag:yaml.org,2002:"+v:T(u,'undeclared tag handle "'+A+'"'),!0}function ri(u){let y=u.input.charCodeAt(u.position);if(y!==38)return!1;u.anchor!==null&&T(u,"duplication of an anchor property"),y=u.input.charCodeAt(++u.position);let x=u.position;for(;y!==0&&!D(y)&&!B(y);)y=u.input.charCodeAt(++u.position);return u.position===x&&T(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(x,u.position),!0}function si(u){let y=u.input.charCodeAt(u.position);if(y!==42)return!1;y=u.input.charCodeAt(++u.position);let x=u.position;for(;y!==0&&!D(y)&&!B(y);)y=u.input.charCodeAt(++u.position);u.position===x&&T(u,"name of an alias node must contain at least one character");let A=u.input.slice(x,u.position);return r.call(u.anchorMap,A)||T(u,'unidentified alias "'+A+'"'),u.result=u.anchorMap[A],ie(u,!0,-1),!0}function Tr(u,y,x,A){let v=_t(u);return Ie(u),Bt(u,y),u.tag=null,u.anchor=null,u.kind=null,u.result=null,ii(u,x,A)&&u.kind==="mapping"?(Ee(u),!0):(gt(u),Bt(u,v),!1)}function lt(u,y,x,A,v){let L,d,b=1,R=!1,E=!1,C=null,I,O,M;u.depth>=u.maxDepth&&T(u,"nesting exceeded maxDepth ("+u.maxDepth+")"),u.depth+=1,u.listener!==null&&u.listener("open",u),u.tag=null,u.anchor=null,u.kind=null,u.result=null;let N=L=d=c===x||a===x;if(A&&ie(u,!0,-1)&&(R=!0,u.lineIndent>y?b=1:u.lineIndent===y?b=0:u.lineIndent<y&&(b=-1)),b===1)for(;;){let q=u.input.charCodeAt(u.position),H=_t(u);if(R&&(q===33&&u.tag!==null||q===38&&u.anchor!==null)||!Dr(u)&&!ri(u))break;C===null&&(C=H),ie(u,!0,-1)?(R=!0,d=N,u.lineIndent>y?b=1:u.lineIndent===y?b=0:u.lineIndent<y&&(b=-1)):d=!1}if(d&&(d=R||v),b===1||c===x)if(s===x||o===x?O=y:O=y+1,M=u.position-u.lineStart,b===1)if(d&&(at(u,M)||ii(u,M,O))||ti(u,O))E=!0;else{let q=u.input.charCodeAt(u.position);C!==null&&N&&!d&&q!==124&&q!==62&&Tr(u,C,C.position-C.lineStart,O)||L&&ni(u,O)||ei(u,O)||an(u,O)?E=!0:si(u)?(E=!0,(u.tag!==null||u.anchor!==null)&&T(u,"alias node should not have any properties")):Zn(u,O,s===x)&&(E=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&_e(u,u.anchor,u.result)}else b===0&&(E=d&&at(u,M));if(u.tag===null)u.anchor!==null&&_e(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&T(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let q=0,H=u.implicitTypes.length;q<H;q+=1)if(I=u.implicitTypes[q],I.resolve(u.result)){u.result=I.construct(u.result),u.tag=I.tag,u.anchor!==null&&_e(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(r.call(u.typeMap[u.kind||"fallback"],u.tag))I=u.typeMap[u.kind||"fallback"][u.tag];else{I=null;let q=u.typeMap.multi[u.kind||"fallback"];for(let H=0,Y=q.length;H<Y;H+=1)if(u.tag.slice(0,q[H].tag.length)===q[H].tag){I=q[H];break}}I||T(u,"unknown tag !<"+u.tag+">"),u.result!==null&&I.kind!==u.kind&&T(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+I.kind+'", not "'+u.kind+'"'),I.resolve(u.result,u.tag)?(u.result=I.construct(u.result,u.tag),u.anchor!==null&&_e(u,u.anchor,u.result)):T(u,"cannot resolve a node with !<"+u.tag+"> explicit tag")}return u.listener!==null&&u.listener("close",u),u.depth-=1,u.tag!==null||u.anchor!==null||E}function Nr(u){let y=u.position,x=!1,A;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(A=u.input.charCodeAt(u.position))!==0&&(ie(u,!0,-1),A=u.input.charCodeAt(u.position),!(u.lineIndent>0||A!==37));){x=!0,A=u.input.charCodeAt(++u.position);let v=u.position;for(;A!==0&&!D(A);)A=u.input.charCodeAt(++u.position);let L=u.input.slice(v,u.position),d=[];for(L.length<1&&T(u,"directive name must not be less than one character in length");A!==0;){for(;P(A);)A=u.input.charCodeAt(++u.position);if(A===35){do A=u.input.charCodeAt(++u.position);while(A!==0&&!S(A));break}if(S(A))break;for(v=u.position;A!==0&&!D(A);)A=u.input.charCodeAt(++u.position);d.push(u.input.slice(v,u.position))}A!==0&&qt(u),r.call(Xn,L)?Xn[L](u,L,d):te(u,'unknown document directive "'+L+'"')}if(ie(u,!0,-1),u.lineIndent===0&&u.input.charCodeAt(u.position)===45&&u.input.charCodeAt(u.position+1)===45&&u.input.charCodeAt(u.position+2)===45?(u.position+=3,ie(u,!0,-1)):x&&T(u,"directives end mark is expected"),lt(u,u.lineIndent-1,c,!1,!0),ie(u,!0,-1),u.checkLineBreaks&&m.test(u.input.slice(y,u.position))&&te(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&Ht(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,ie(u,!0,-1));return}u.position<u.length-1&&T(u,"end of the stream or a document separator is expected")}function oi(u,y){u=String(u),y=y||{},u.length!==0&&(u.charCodeAt(u.length-1)!==10&&u.charCodeAt(u.length-1)!==13&&(u+=`
67
- `),u.charCodeAt(0)===65279&&(u=u.slice(1)));let x=new z(u,y),A=u.indexOf("\0");for(A!==-1&&(x.position=A,T(x,"null byte is not allowed in input")),x.input+="\0";x.input.charCodeAt(x.position)===32;)x.lineIndent+=1,x.position+=1;for(;x.position<x.length-1;)Nr(x);return x.documents}function ai(u,y,x){y!==null&&typeof y=="object"&&typeof x>"u"&&(x=y,y=null);let A=oi(u,x);if(typeof y!="function")return A;for(let v=0,L=A.length;v<L;v+=1)y(A[v])}function Mr(u,y){let x=oi(u,y);if(x.length!==0){if(x.length===1)return x[0];throw new e("expected a single document in the stream, but found more")}}return li.loadAll=ai,li.load=Mr,li}var os={},Ya;function kf(){if(Ya)return os;Ya=1;let i=un(),e=hn(),t=as(),n=Object.prototype.toString,r=Object.prototype.hasOwnProperty,s=65279,o=9,a=10,c=13,l=32,f=33,h=34,p=35,m=37,_=38,g=39,k=42,w=44,S=45,P=58,D=61,B=62,U=63,J=64,he=91,le=93,se=96,G=123,ce=124,V=125,z={};z[0]="\\0",z[7]="\\a",z[8]="\\b",z[9]="\\t",z[10]="\\n",z[11]="\\v",z[12]="\\f",z[13]="\\r",z[27]="\\e",z[34]='\\"',z[92]="\\\\",z[133]="\\N",z[160]="\\_",z[8232]="\\L",z[8233]="\\P";let ge=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],T=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function te(d,b){if(b===null)return{};let R={},E=Object.keys(b);for(let C=0,I=E.length;C<I;C+=1){let O=E[C],M=String(b[O]);O.slice(0,2)==="!!"&&(O="tag:yaml.org,2002:"+O.slice(2));let N=d.compiledTypeMap.fallback[O];N&&r.call(N.styleAliases,M)&&(M=N.styleAliases[M]),R[O]=M}return R}function _e(d){let b,R,E=d.toString(16).toUpperCase();if(d<=255)b="x",R=2;else if(d<=65535)b="u",R=4;else if(d<=4294967295)b="U",R=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+b+i.repeat("0",R-E.length)+E}let Ie=1,Ee=2;function gt(d){this.schema=d.schema||t,this.indent=Math.max(1,d.indent||2),this.noArrayIndent=d.noArrayIndent||!1,this.skipInvalid=d.skipInvalid||!1,this.flowLevel=i.isNothing(d.flowLevel)?-1:d.flowLevel,this.styleMap=te(this.schema,d.styles||null),this.sortKeys=d.sortKeys||!1,this.lineWidth=d.lineWidth||80,this.noRefs=d.noRefs||!1,this.noCompatMode=d.noCompatMode||!1,this.condenseFlow=d.condenseFlow||!1,this.quotingType=d.quotingType==='"'?Ee:Ie,this.forceQuotes=d.forceQuotes||!1,this.replacer=typeof d.replacer=="function"?d.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function _t(d,b){let R=i.repeat(" ",b),E=0,C="",I=d.length;for(;E<I;){let O,M=d.indexOf(`
66
+ `,v?1+b:b),v=!0,L=!0,b=0;let I=u.position;for(;!S(C)&&C!==0;)C=u.input.charCodeAt(++u.position);Le(u,I,u.position,!1)}return!0}function at(u,y){let x=u.tag,A=u.anchor,v=[],L=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&_e(u,u.anchor,v);let d=u.input.charCodeAt(u.position);for(;d!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,T(u,"tab characters must not be used in indentation")),d===45);){let b=u.input.charCodeAt(u.position+1);if(!D(b))break;if(L=!0,u.position++,ie(u,!0,-1)&&u.lineIndent<=y){v.push(null),d=u.input.charCodeAt(u.position);continue}let R=u.line;if(lt(u,y,a,!1,!0),v.push(u.result),ie(u,!0,-1),d=u.input.charCodeAt(u.position),(u.line===R||u.lineIndent>y)&&d!==0)T(u,"bad indentation of a sequence entry");else if(u.lineIndent<y)break}return L?(u.tag=x,u.anchor=A,u.kind="sequence",u.result=v,!0):!1}function ii(u,y,x){let A,v,L,d,b=u.tag,R=u.anchor,E={},C=Object.create(null),I=null,O=null,M=null,N=!1,q=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&_e(u,u.anchor,E);let H=u.input.charCodeAt(u.position);for(;H!==0;){!N&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,T(u,"tab characters must not be used in indentation"));let Y=u.input.charCodeAt(u.position+1),X=u.line;if((H===63||H===58)&&D(Y))H===63?(N&&(st(u,E,C,I,O,null,v,L,d),I=O=M=null),q=!0,N=!0,A=!0):N?(N=!1,A=!0):T(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,H=Y;else{if(v=u.line,L=u.lineStart,d=u.position,!lt(u,x,o,!1,!0))break;if(u.line===X){for(H=u.input.charCodeAt(u.position);P(H);)H=u.input.charCodeAt(++u.position);if(H===58)H=u.input.charCodeAt(++u.position),D(H)||T(u,"a whitespace character is expected after the key-value separator within a block mapping"),N&&(st(u,E,C,I,O,null,v,L,d),I=O=M=null),q=!0,N=!1,A=!1,I=u.tag,O=u.result;else if(q)T(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=b,u.anchor=R,!0}else if(q)T(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=b,u.anchor=R,!0}if((u.line===X||u.lineIndent>y)&&(N&&(v=u.line,L=u.lineStart,d=u.position),lt(u,y,l,!0,A)&&(N?O=u.result:M=u.result),N||(st(u,E,C,I,O,M,v,L,d),I=O=M=null),ie(u,!0,-1),H=u.input.charCodeAt(u.position)),(u.line===X||u.lineIndent>y)&&H!==0)T(u,"bad indentation of a mapping entry");else if(u.lineIndent<y)break}return N&&st(u,E,C,I,O,null,v,L,d),q&&(u.tag=b,u.anchor=R,u.kind="mapping",u.result=E),q}function Dr(u){let y=!1,x=!1,A,v,L=u.input.charCodeAt(u.position);if(L!==33)return!1;u.tag!==null&&T(u,"duplication of a tag property"),L=u.input.charCodeAt(++u.position),L===60?(y=!0,L=u.input.charCodeAt(++u.position)):L===33?(x=!0,A="!!",L=u.input.charCodeAt(++u.position)):A="!";let d=u.position;if(y){do L=u.input.charCodeAt(++u.position);while(L!==0&&L!==62);u.position<u.length?(v=u.input.slice(d,u.position),L=u.input.charCodeAt(++u.position)):T(u,"unexpected end of the stream within a verbatim tag")}else{for(;L!==0&&!D(L);)L===33&&(x?T(u,"tag suffix cannot contain exclamation marks"):(A=u.input.slice(d-1,u.position+1),g.test(A)||T(u,"named tag handle cannot contain such characters"),x=!0,d=u.position+1)),L=u.input.charCodeAt(++u.position);v=u.input.slice(d,u.position),_.test(v)&&T(u,"tag suffix cannot contain flow indicator characters")}v&&!k.test(v)&&T(u,"tag name cannot contain such characters: "+v);try{v=decodeURIComponent(v)}catch{T(u,"tag name is malformed: "+v)}return y?u.tag=v:r.call(u.tagMap,A)?u.tag=u.tagMap[A]+v:A==="!"?u.tag="!"+v:A==="!!"?u.tag="tag:yaml.org,2002:"+v:T(u,'undeclared tag handle "'+A+'"'),!0}function ri(u){let y=u.input.charCodeAt(u.position);if(y!==38)return!1;u.anchor!==null&&T(u,"duplication of an anchor property"),y=u.input.charCodeAt(++u.position);let x=u.position;for(;y!==0&&!D(y)&&!B(y);)y=u.input.charCodeAt(++u.position);return u.position===x&&T(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(x,u.position),!0}function si(u){let y=u.input.charCodeAt(u.position);if(y!==42)return!1;y=u.input.charCodeAt(++u.position);let x=u.position;for(;y!==0&&!D(y)&&!B(y);)y=u.input.charCodeAt(++u.position);u.position===x&&T(u,"name of an alias node must contain at least one character");let A=u.input.slice(x,u.position);return r.call(u.anchorMap,A)||T(u,'unidentified alias "'+A+'"'),u.result=u.anchorMap[A],ie(u,!0,-1),!0}function Tr(u,y,x,A){let v=_t(u);return Ie(u),Bt(u,y),u.tag=null,u.anchor=null,u.kind=null,u.result=null,ii(u,x,A)&&u.kind==="mapping"?(Ee(u),!0):(gt(u),Bt(u,v),!1)}function lt(u,y,x,A,v){let L,d,b=1,R=!1,E=!1,C=null,I,O,M;u.depth>=u.maxDepth&&T(u,"nesting exceeded maxDepth ("+u.maxDepth+")"),u.depth+=1,u.listener!==null&&u.listener("open",u),u.tag=null,u.anchor=null,u.kind=null,u.result=null;let N=L=d=l===x||a===x;if(A&&ie(u,!0,-1)&&(R=!0,u.lineIndent>y?b=1:u.lineIndent===y?b=0:u.lineIndent<y&&(b=-1)),b===1)for(;;){let q=u.input.charCodeAt(u.position),H=_t(u);if(R&&(q===33&&u.tag!==null||q===38&&u.anchor!==null)||!Dr(u)&&!ri(u))break;C===null&&(C=H),ie(u,!0,-1)?(R=!0,d=N,u.lineIndent>y?b=1:u.lineIndent===y?b=0:u.lineIndent<y&&(b=-1)):d=!1}if(d&&(d=R||v),b===1||l===x)if(s===x||o===x?O=y:O=y+1,M=u.position-u.lineStart,b===1)if(d&&(at(u,M)||ii(u,M,O))||ti(u,O))E=!0;else{let q=u.input.charCodeAt(u.position);C!==null&&N&&!d&&q!==124&&q!==62&&Tr(u,C,C.position-C.lineStart,O)||L&&ni(u,O)||ei(u,O)||an(u,O)?E=!0:si(u)?(E=!0,(u.tag!==null||u.anchor!==null)&&T(u,"alias node should not have any properties")):Zn(u,O,s===x)&&(E=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&_e(u,u.anchor,u.result)}else b===0&&(E=d&&at(u,M));if(u.tag===null)u.anchor!==null&&_e(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&T(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let q=0,H=u.implicitTypes.length;q<H;q+=1)if(I=u.implicitTypes[q],I.resolve(u.result)){u.result=I.construct(u.result),u.tag=I.tag,u.anchor!==null&&_e(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(r.call(u.typeMap[u.kind||"fallback"],u.tag))I=u.typeMap[u.kind||"fallback"][u.tag];else{I=null;let q=u.typeMap.multi[u.kind||"fallback"];for(let H=0,Y=q.length;H<Y;H+=1)if(u.tag.slice(0,q[H].tag.length)===q[H].tag){I=q[H];break}}I||T(u,"unknown tag !<"+u.tag+">"),u.result!==null&&I.kind!==u.kind&&T(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+I.kind+'", not "'+u.kind+'"'),I.resolve(u.result,u.tag)?(u.result=I.construct(u.result,u.tag),u.anchor!==null&&_e(u,u.anchor,u.result)):T(u,"cannot resolve a node with !<"+u.tag+"> explicit tag")}return u.listener!==null&&u.listener("close",u),u.depth-=1,u.tag!==null||u.anchor!==null||E}function Nr(u){let y=u.position,x=!1,A;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(A=u.input.charCodeAt(u.position))!==0&&(ie(u,!0,-1),A=u.input.charCodeAt(u.position),!(u.lineIndent>0||A!==37));){x=!0,A=u.input.charCodeAt(++u.position);let v=u.position;for(;A!==0&&!D(A);)A=u.input.charCodeAt(++u.position);let L=u.input.slice(v,u.position),d=[];for(L.length<1&&T(u,"directive name must not be less than one character in length");A!==0;){for(;P(A);)A=u.input.charCodeAt(++u.position);if(A===35){do A=u.input.charCodeAt(++u.position);while(A!==0&&!S(A));break}if(S(A))break;for(v=u.position;A!==0&&!D(A);)A=u.input.charCodeAt(++u.position);d.push(u.input.slice(v,u.position))}A!==0&&qt(u),r.call(Xn,L)?Xn[L](u,L,d):te(u,'unknown document directive "'+L+'"')}if(ie(u,!0,-1),u.lineIndent===0&&u.input.charCodeAt(u.position)===45&&u.input.charCodeAt(u.position+1)===45&&u.input.charCodeAt(u.position+2)===45?(u.position+=3,ie(u,!0,-1)):x&&T(u,"directives end mark is expected"),lt(u,u.lineIndent-1,l,!1,!0),ie(u,!0,-1),u.checkLineBreaks&&m.test(u.input.slice(y,u.position))&&te(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&Ht(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,ie(u,!0,-1));return}u.position<u.length-1&&T(u,"end of the stream or a document separator is expected")}function oi(u,y){u=String(u),y=y||{},u.length!==0&&(u.charCodeAt(u.length-1)!==10&&u.charCodeAt(u.length-1)!==13&&(u+=`
67
+ `),u.charCodeAt(0)===65279&&(u=u.slice(1)));let x=new z(u,y),A=u.indexOf("\0");for(A!==-1&&(x.position=A,T(x,"null byte is not allowed in input")),x.input+="\0";x.input.charCodeAt(x.position)===32;)x.lineIndent+=1,x.position+=1;for(;x.position<x.length-1;)Nr(x);return x.documents}function ai(u,y,x){y!==null&&typeof y=="object"&&typeof x>"u"&&(x=y,y=null);let A=oi(u,x);if(typeof y!="function")return A;for(let v=0,L=A.length;v<L;v+=1)y(A[v])}function Mr(u,y){let x=oi(u,y);if(x.length!==0){if(x.length===1)return x[0];throw new e("expected a single document in the stream, but found more")}}return li.loadAll=ai,li.load=Mr,li}var os={},Ya;function kf(){if(Ya)return os;Ya=1;let i=un(),e=hn(),t=as(),n=Object.prototype.toString,r=Object.prototype.hasOwnProperty,s=65279,o=9,a=10,l=13,c=32,f=33,h=34,p=35,m=37,_=38,g=39,k=42,w=44,S=45,P=58,D=61,B=62,U=63,J=64,he=91,le=93,se=96,G=123,ce=124,V=125,z={};z[0]="\\0",z[7]="\\a",z[8]="\\b",z[9]="\\t",z[10]="\\n",z[11]="\\v",z[12]="\\f",z[13]="\\r",z[27]="\\e",z[34]='\\"',z[92]="\\\\",z[133]="\\N",z[160]="\\_",z[8232]="\\L",z[8233]="\\P";let ge=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],T=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function te(d,b){if(b===null)return{};let R={},E=Object.keys(b);for(let C=0,I=E.length;C<I;C+=1){let O=E[C],M=String(b[O]);O.slice(0,2)==="!!"&&(O="tag:yaml.org,2002:"+O.slice(2));let N=d.compiledTypeMap.fallback[O];N&&r.call(N.styleAliases,M)&&(M=N.styleAliases[M]),R[O]=M}return R}function _e(d){let b,R,E=d.toString(16).toUpperCase();if(d<=255)b="x",R=2;else if(d<=65535)b="u",R=4;else if(d<=4294967295)b="U",R=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+b+i.repeat("0",R-E.length)+E}let Ie=1,Ee=2;function gt(d){this.schema=d.schema||t,this.indent=Math.max(1,d.indent||2),this.noArrayIndent=d.noArrayIndent||!1,this.skipInvalid=d.skipInvalid||!1,this.flowLevel=i.isNothing(d.flowLevel)?-1:d.flowLevel,this.styleMap=te(this.schema,d.styles||null),this.sortKeys=d.sortKeys||!1,this.lineWidth=d.lineWidth||80,this.noRefs=d.noRefs||!1,this.noCompatMode=d.noCompatMode||!1,this.condenseFlow=d.condenseFlow||!1,this.quotingType=d.quotingType==='"'?Ee:Ie,this.forceQuotes=d.forceQuotes||!1,this.replacer=typeof d.replacer=="function"?d.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function _t(d,b){let R=i.repeat(" ",b),E=0,C="",I=d.length;for(;E<I;){let O,M=d.indexOf(`
68
68
  `,E);M===-1?(O=d.slice(E),E=I):(O=d.slice(E,M+1),E=M+1),O.length&&O!==`
69
69
  `&&(C+=R),C+=O}return C}function Bt(d,b){return`
70
- `+i.repeat(" ",d.indent*b)}function Xn(d,b){for(let R=0,E=d.implicitTypes.length;R<E;R+=1)if(d.implicitTypes[R].resolve(b))return!0;return!1}function Le(d){return d===l||d===o}function yt(d){return d>=32&&d<=126||d>=161&&d<=55295&&d!==8232&&d!==8233||d>=57344&&d<=65533&&d!==s||d>=65536&&d<=1114111}function st(d){return yt(d)&&d!==s&&d!==c&&d!==a}function qt(d,b,R){let E=st(d),C=E&&!Le(d);return(R?E:E&&d!==w&&d!==he&&d!==le&&d!==G&&d!==V)&&d!==p&&!(b===P&&!C)||st(b)&&!Le(b)&&d===p||b===P&&C}function ie(d){return yt(d)&&d!==s&&!Le(d)&&d!==S&&d!==U&&d!==P&&d!==w&&d!==he&&d!==le&&d!==G&&d!==V&&d!==p&&d!==_&&d!==k&&d!==f&&d!==ce&&d!==D&&d!==B&&d!==g&&d!==h&&d!==m&&d!==J&&d!==se}function Ht(d){return!Le(d)&&d!==P}function ot(d,b){let R=d.charCodeAt(b),E;return R>=55296&&R<=56319&&b+1<d.length&&(E=d.charCodeAt(b+1),E>=56320&&E<=57343)?(R-55296)*1024+E-56320+65536:R}function Zn(d){return/^\n* /.test(d)}let ei=1,an=2,ti=3,ni=4,at=5;function ii(d,b,R,E,C,I,O,M){let N,q=0,H=null,Y=!1,X=!1,Ea=E!==-1,ln=-1,cn=ie(ot(d,0))&&Ht(ot(d,d.length-1));if(b||O)for(N=0;N<d.length;q>=65536?N+=2:N++){if(q=ot(d,N),!yt(q))return at;cn=cn&&qt(q,H,M),H=q}else{for(N=0;N<d.length;q>=65536?N+=2:N++){if(q=ot(d,N),q===a)Y=!0,Ea&&(X=X||N-ln-1>E&&d[ln+1]!==" ",ln=N);else if(!yt(q))return at;cn=cn&&qt(q,H,M),H=q}X=X||Ea&&N-ln-1>E&&d[ln+1]!==" "}return!Y&&!X?cn&&!O&&!C(d)?ei:I===Ee?at:an:R>9&&Zn(d)?at:O?I===Ee?at:an:X?ni:ti}function Dr(d,b,R,E,C){d.dump=(function(){if(b.length===0)return d.quotingType===Ee?'""':"''";if(!d.noCompatMode&&(ge.indexOf(b)!==-1||T.test(b)))return d.quotingType===Ee?'"'+b+'"':"'"+b+"'";let I=d.indent*Math.max(1,R),O=d.lineWidth===-1?-1:Math.max(Math.min(d.lineWidth,40),d.lineWidth-I),M=E||d.flowLevel>-1&&R>=d.flowLevel;function N(q){return Xn(d,q)}switch(ii(b,M,d.indent,O,N,d.quotingType,d.forceQuotes&&!E,C)){case ei:return b;case an:return"'"+b.replace(/'/g,"''")+"'";case ti:return"|"+ri(b,d.indent)+si(_t(b,I));case ni:return">"+ri(b,d.indent)+si(_t(Tr(b,O),I));case at:return'"'+Nr(b)+'"';default:throw new e("impossible error: invalid scalar style")}})()}function ri(d,b){let R=Zn(d)?String(b):"",E=d[d.length-1]===`
70
+ `+i.repeat(" ",d.indent*b)}function Xn(d,b){for(let R=0,E=d.implicitTypes.length;R<E;R+=1)if(d.implicitTypes[R].resolve(b))return!0;return!1}function Le(d){return d===c||d===o}function yt(d){return d>=32&&d<=126||d>=161&&d<=55295&&d!==8232&&d!==8233||d>=57344&&d<=65533&&d!==s||d>=65536&&d<=1114111}function st(d){return yt(d)&&d!==s&&d!==l&&d!==a}function qt(d,b,R){let E=st(d),C=E&&!Le(d);return(R?E:E&&d!==w&&d!==he&&d!==le&&d!==G&&d!==V)&&d!==p&&!(b===P&&!C)||st(b)&&!Le(b)&&d===p||b===P&&C}function ie(d){return yt(d)&&d!==s&&!Le(d)&&d!==S&&d!==U&&d!==P&&d!==w&&d!==he&&d!==le&&d!==G&&d!==V&&d!==p&&d!==_&&d!==k&&d!==f&&d!==ce&&d!==D&&d!==B&&d!==g&&d!==h&&d!==m&&d!==J&&d!==se}function Ht(d){return!Le(d)&&d!==P}function ot(d,b){let R=d.charCodeAt(b),E;return R>=55296&&R<=56319&&b+1<d.length&&(E=d.charCodeAt(b+1),E>=56320&&E<=57343)?(R-55296)*1024+E-56320+65536:R}function Zn(d){return/^\n* /.test(d)}let ei=1,an=2,ti=3,ni=4,at=5;function ii(d,b,R,E,C,I,O,M){let N,q=0,H=null,Y=!1,X=!1,Ea=E!==-1,ln=-1,cn=ie(ot(d,0))&&Ht(ot(d,d.length-1));if(b||O)for(N=0;N<d.length;q>=65536?N+=2:N++){if(q=ot(d,N),!yt(q))return at;cn=cn&&qt(q,H,M),H=q}else{for(N=0;N<d.length;q>=65536?N+=2:N++){if(q=ot(d,N),q===a)Y=!0,Ea&&(X=X||N-ln-1>E&&d[ln+1]!==" ",ln=N);else if(!yt(q))return at;cn=cn&&qt(q,H,M),H=q}X=X||Ea&&N-ln-1>E&&d[ln+1]!==" "}return!Y&&!X?cn&&!O&&!C(d)?ei:I===Ee?at:an:R>9&&Zn(d)?at:O?I===Ee?at:an:X?ni:ti}function Dr(d,b,R,E,C){d.dump=(function(){if(b.length===0)return d.quotingType===Ee?'""':"''";if(!d.noCompatMode&&(ge.indexOf(b)!==-1||T.test(b)))return d.quotingType===Ee?'"'+b+'"':"'"+b+"'";let I=d.indent*Math.max(1,R),O=d.lineWidth===-1?-1:Math.max(Math.min(d.lineWidth,40),d.lineWidth-I),M=E||d.flowLevel>-1&&R>=d.flowLevel;function N(q){return Xn(d,q)}switch(ii(b,M,d.indent,O,N,d.quotingType,d.forceQuotes&&!E,C)){case ei:return b;case an:return"'"+b.replace(/'/g,"''")+"'";case ti:return"|"+ri(b,d.indent)+si(_t(b,I));case ni:return">"+ri(b,d.indent)+si(_t(Tr(b,O),I));case at:return'"'+Nr(b)+'"';default:throw new e("impossible error: invalid scalar style")}})()}function ri(d,b){let R=Zn(d)?String(b):"",E=d[d.length-1]===`
71
71
  `,I=E&&(d[d.length-2]===`
72
72
  `||d===`
73
73
  `)?"+":E?"":"-";return R+I+`
@@ -79,12 +79,12 @@ Expecting `+z.join(", ")+", got '"+(this.terminals_[D]||D)+"'":ge="Parse error o
79
79
  `+d.slice(C,I),C=I+1),O=M;return N+=`
80
80
  `,d.length-C>b&&O>C?N+=d.slice(C,O)+`
81
81
  `+d.slice(O+1):N+=d.slice(C),N.slice(1)}function Nr(d){let b="",R=0;for(let E=0;E<d.length;R>=65536?E+=2:E++){R=ot(d,E);let C=z[R];!C&&yt(R)?(b+=d[E],R>=65536&&(b+=d[E+1])):b+=C||_e(R)}return b}function oi(d,b,R){let E="",C=d.tag;for(let I=0,O=R.length;I<O;I+=1){let M=R[I];d.replacer&&(M=d.replacer.call(R,String(I),M)),(x(d,b,M,!1,!1)||typeof M>"u"&&x(d,b,null,!1,!1))&&(E!==""&&(E+=","+(d.condenseFlow?"":" ")),E+=d.dump)}d.tag=C,d.dump="["+E+"]"}function ai(d,b,R,E){let C="",I=d.tag;for(let O=0,M=R.length;O<M;O+=1){let N=R[O];d.replacer&&(N=d.replacer.call(R,String(O),N)),(x(d,b+1,N,!0,!0,!1,!0)||typeof N>"u"&&x(d,b+1,null,!0,!0,!1,!0))&&((!E||C!=="")&&(C+=Bt(d,b)),d.dump&&a===d.dump.charCodeAt(0)?C+="-":C+="- ",C+=d.dump)}d.tag=I,d.dump=C||"[]"}function Mr(d,b,R){let E="",C=d.tag,I=Object.keys(R);for(let O=0,M=I.length;O<M;O+=1){let N="";E!==""&&(N+=", "),d.condenseFlow&&(N+='"');let q=I[O],H=R[q];d.replacer&&(H=d.replacer.call(R,q,H)),x(d,b,q,!1,!1)&&(d.dump.length>1024&&(N+="? "),N+=d.dump+(d.condenseFlow?'"':"")+":"+(d.condenseFlow?"":" "),x(d,b,H,!1,!1)&&(N+=d.dump,E+=N))}d.tag=C,d.dump="{"+E+"}"}function u(d,b,R,E){let C="",I=d.tag,O=Object.keys(R);if(d.sortKeys===!0)O.sort();else if(typeof d.sortKeys=="function")O.sort(d.sortKeys);else if(d.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let M=0,N=O.length;M<N;M+=1){let q="";(!E||C!=="")&&(q+=Bt(d,b));let H=O[M],Y=R[H];if(d.replacer&&(Y=d.replacer.call(R,H,Y)),!x(d,b+1,H,!0,!0,!0))continue;let X=d.tag!==null&&d.tag!=="?"||d.dump&&d.dump.length>1024;X&&(d.dump&&a===d.dump.charCodeAt(0)?q+="?":q+="? "),q+=d.dump,X&&(q+=Bt(d,b)),x(d,b+1,Y,!0,X)&&(d.dump&&a===d.dump.charCodeAt(0)?q+=":":q+=": ",q+=d.dump,C+=q)}d.tag=I,d.dump=C||"{}"}function y(d,b,R){let E=R?d.explicitTypes:d.implicitTypes;for(let C=0,I=E.length;C<I;C+=1){let O=E[C];if((O.instanceOf||O.predicate)&&(!O.instanceOf||typeof b=="object"&&b instanceof O.instanceOf)&&(!O.predicate||O.predicate(b))){if(R?O.multi&&O.representName?d.tag=O.representName(b):d.tag=O.tag:d.tag="?",O.represent){let M=d.styleMap[O.tag]||O.defaultStyle,N;if(n.call(O.represent)==="[object Function]")N=O.represent(b,M);else if(r.call(O.represent,M))N=O.represent[M](b,M);else throw new e("!<"+O.tag+'> tag resolver accepts not "'+M+'" style');d.dump=N}return!0}}return!1}function x(d,b,R,E,C,I,O){d.tag=null,d.dump=R,y(d,R,!1)||y(d,R,!0);let M=n.call(d.dump),N=E;E&&(E=d.flowLevel<0||d.flowLevel>b);let q=M==="[object Object]"||M==="[object Array]",H,Y;if(q&&(H=d.duplicates.indexOf(R),Y=H!==-1),(d.tag!==null&&d.tag!=="?"||Y||d.indent!==2&&b>0)&&(C=!1),Y&&d.usedDuplicates[H])d.dump="*ref_"+H;else{if(q&&Y&&!d.usedDuplicates[H]&&(d.usedDuplicates[H]=!0),M==="[object Object]")E&&Object.keys(d.dump).length!==0?(u(d,b,d.dump,C),Y&&(d.dump="&ref_"+H+d.dump)):(Mr(d,b,d.dump),Y&&(d.dump="&ref_"+H+" "+d.dump));else if(M==="[object Array]")E&&d.dump.length!==0?(d.noArrayIndent&&!O&&b>0?ai(d,b-1,d.dump,C):ai(d,b,d.dump,C),Y&&(d.dump="&ref_"+H+d.dump)):(oi(d,b,d.dump),Y&&(d.dump="&ref_"+H+" "+d.dump));else if(M==="[object String]")d.tag!=="?"&&Dr(d,d.dump,b,I,N);else{if(M==="[object Undefined]")return!1;if(d.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+M)}if(d.tag!==null&&d.tag!=="?"){let X=encodeURI(d.tag[0]==="!"?d.tag.slice(1):d.tag).replace(/!/g,"%21");d.tag[0]==="!"?X="!"+X:X.slice(0,18)==="tag:yaml.org,2002:"?X="!!"+X.slice(18):X="!<"+X+">",d.dump=X+" "+d.dump}}return!0}function A(d,b){let R=[],E=[];v(d,R,E);let C=E.length;for(let I=0;I<C;I+=1)b.duplicates.push(R[E[I]]);b.usedDuplicates=new Array(C)}function v(d,b,R){if(d!==null&&typeof d=="object"){let E=b.indexOf(d);if(E!==-1)R.indexOf(E)===-1&&R.push(E);else if(b.push(d),Array.isArray(d))for(let C=0,I=d.length;C<I;C+=1)v(d[C],b,R);else{let C=Object.keys(d);for(let I=0,O=C.length;I<O;I+=1)v(d[C[I]],b,R)}}}function L(d,b){b=b||{};let R=new gt(b);R.noRefs||A(d,R);let E=d;return R.replacer&&(E=R.replacer.call({"":E},"",E)),x(R,0,E,!0,!0)?R.dump+`
82
- `:""}return os.dump=L,os}var Ja;function Af(){if(Ja)return we;Ja=1;let i=Cf(),e=kf();function t(n,r){return function(){throw new Error("Function yaml."+n+" is removed in js-yaml 4. Use yaml."+r+" instead, which is now safe by default.")}}return we.Type=Ce(),we.Schema=Ka(),we.FAILSAFE_SCHEMA=el(),we.JSON_SCHEMA=sl(),we.CORE_SCHEMA=ol(),we.DEFAULT_SCHEMA=as(),we.load=i.load,we.loadAll=i.loadAll,we.dump=e.dump,we.YAMLException=hn(),we.types={binary:cl(),float:rl(),map:Za(),null:tl(),pairs:hl(),set:fl(),timestamp:al(),bool:nl(),int:il(),merge:ll(),omap:ul(),seq:Xa(),str:Qa()},we.safeLoad=t("safeLoad","load"),we.safeLoadAll=t("safeLoadAll","loadAll"),we.safeDump=t("safeDump","dump"),we}var Of=Af(),Xe=xf(Of),{Type:hb,Schema:fb,FAILSAFE_SCHEMA:db,JSON_SCHEMA:pb,CORE_SCHEMA:mb,DEFAULT_SCHEMA:gb,load:_b,loadAll:yb,dump:bb,YAMLException:wb,types:vb,safeLoad:Sb,safeLoadAll:xb,safeDump:Eb}=Xe;var j=Br(ml(),1);import{stat as ad}from"fs";import{stat as ld,readdir as cd}from"fs/promises";import{EventEmitter as ud}from"events";import*as $ from"path";import{stat as Lf,lstat as gl,readdir as Df,realpath as Tf}from"node:fs/promises";import{Readable as Nf}from"node:stream";import{resolve as _l,relative as Mf,join as Ff,sep as Bf}from"node:path";var De={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},cs={root:".",fileFilter:i=>!0,directoryFilter:i=>!0,type:De.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(cs);var vl="READDIRP_RECURSIVE_ERROR",qf=new Set(["ENOENT","EPERM","EACCES","ELOOP",vl]),yl=[De.DIR_TYPE,De.EVERYTHING_TYPE,De.FILE_DIR_TYPE,De.FILE_TYPE],Hf=new Set([De.DIR_TYPE,De.EVERYTHING_TYPE,De.FILE_DIR_TYPE]),Wf=new Set([De.EVERYTHING_TYPE,De.FILE_DIR_TYPE,De.FILE_TYPE]),jf=i=>qf.has(i.code),Vf=process.platform==="win32",bl=i=>!0,wl=i=>{if(i===void 0)return bl;if(typeof i=="function")return i;if(typeof i=="string"){let e=i.trim();return t=>t.basename===e}if(Array.isArray(i)){let e=i.map(t=>t.trim());return t=>e.some(n=>t.basename===n)}return bl},us=class extends Nf{constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark});let t={...cs,...e},{root:n,type:r}=t;this._fileFilter=wl(t.fileFilter),this._directoryFilter=wl(t.directoryFilter);let s=t.lstat?gl:Lf;Vf?this._stat=o=>s(o,{bigint:!0}):this._stat=s,this._maxDepth=t.depth??cs.depth,this._wantsDir=r?Hf.has(r):!1,this._wantsFile=r?Wf.has(r):!1,this._wantsEverything=r===De.EVERYTHING_TYPE,this._root=_l(n),this._isDirent=!t.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(n,1)],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){let t=this.parent,n=t&&t.files;if(n&&n.length>0){let{path:r,depth:s}=t,o=n.splice(0,e).map(c=>this._formatEntry(c,r)),a=await Promise.all(o);for(let c of a){if(!c)continue;if(this.destroyed)return;let l=await this._getEntryType(c);l==="directory"&&this._directoryFilter(c)?(s<=this._maxDepth&&this.parents.push(this._exploreDir(c.fullPath,s+1)),this._wantsDir&&(this.push(c),e--)):(l==="file"||this._includeAsFile(c))&&this._fileFilter(c)&&this._wantsFile&&(this.push(c),e--)}}else{let r=this.parents.pop();if(!r){this.push(null);break}if(this.parent=await r,this.destroyed)return}}}catch(t){this.destroy(t)}finally{this.reading=!1}}}async _exploreDir(e,t){let n;try{n=await Df(e,this._rdOptions)}catch(r){this._onError(r)}return{files:n,depth:t,path:e}}async _formatEntry(e,t){let n,r=this._isDirent?e.name:e;try{let s=_l(Ff(t,r));n={path:Mf(this._root,s),fullPath:s,basename:r},n[this._statsProp]=this._isDirent?e:await this._stat(s)}catch(s){this._onError(s);return}return n}_onError(e){jf(e)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}async _getEntryType(e){if(!e&&this._statsProp in e)return"";let t=e[this._statsProp];if(t.isFile())return"file";if(t.isDirectory())return"directory";if(t&&t.isSymbolicLink()){let n=e.fullPath;try{let r=await Tf(n),s=await gl(r);if(s.isFile())return"file";if(s.isDirectory()){let o=r.length;if(n.startsWith(r)&&n.substr(o,1)===Bf){let a=new Error(`Circular symlink detected: "${n}" points to "${r}"`);return a.code=vl,this._onError(a)}return"directory"}}catch(r){return this._onError(r),""}}}_includeAsFile(e){let t=e&&e[this._statsProp];return t&&this._wantsEverything&&!t.isDirectory()}};function Sl(i,e={}){let t=e.entryType||e.type;if(t==="both"&&(t=De.FILE_DIR_TYPE),t&&(e.type=t),i){if(typeof i!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(t&&!yl.includes(t))throw new Error(`readdirp: Invalid type passed. Use one of ${yl.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=i,new us(e)}import{watchFile as Uf,unwatchFile as xl,watch as Gf}from"fs";import{open as zf,stat as Cl,lstat as $f,realpath as hs}from"fs/promises";import*as ee from"path";import{type as Yf}from"os";var Jf="data",ps="end",kl="close",mi=()=>{};var gi=process.platform,ms=gi==="win32",Kf=gi==="darwin",Qf=gi==="linux",Xf=gi==="freebsd",Al=Yf()==="OS400",ne={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},Ye=ne,Zf="watch",ed={lstat:$f,stat:Cl},kt="listeners",hi="errHandlers",Wt="rawEmitters",td=[kt,hi,Wt],nd=new Set(["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),id=i=>nd.has(ee.extname(i).slice(1).toLowerCase()),ds=(i,e)=>{i instanceof Set?i.forEach(e):e(i)},fn=(i,e,t)=>{let n=i[e];n instanceof Set||(i[e]=n=new Set([n])),n.add(t)},rd=i=>e=>{let t=i[e];t instanceof Set?t.clear():delete i[e]},dn=(i,e,t)=>{let n=i[e];n instanceof Set?n.delete(t):n===t&&delete i[e]},Ol=i=>i instanceof Set?i.size===0:!i,fi=new Map;function El(i,e,t,n,r){let s=(o,a)=>{t(i),r(o,a,{watchedPath:i}),a&&i!==a&&di(ee.resolve(i,a),kt,ee.join(i,a))};try{return Gf(i,{persistent:e.persistent},s)}catch(o){n(o);return}}var di=(i,e,t,n,r)=>{let s=fi.get(i);s&&ds(s[e],o=>{o(t,n,r)})},sd=(i,e,t,n)=>{let{listener:r,errHandler:s,rawEmitter:o}=n,a=fi.get(e),c;if(!t.persistent)return c=El(i,t,r,s,o),c?c.close.bind(c):void 0;if(a)fn(a,kt,r),fn(a,hi,s),fn(a,Wt,o);else{if(c=El(i,t,di.bind(null,e,kt),s,di.bind(null,e,Wt)),!c)return;c.on(Ye.ERROR,async l=>{let f=di.bind(null,e,hi);if(a&&(a.watcherUnusable=!0),ms&&l.code==="EPERM")try{await(await zf(i,"r")).close(),f(l)}catch{}else f(l)}),a={listeners:r,errHandlers:s,rawEmitters:o,watcher:c},fi.set(e,a)}return()=>{dn(a,kt,r),dn(a,hi,s),dn(a,Wt,o),Ol(a.listeners)&&(a.watcher.close(),fi.delete(e),td.forEach(rd(a)),a.watcher=void 0,Object.freeze(a))}},fs=new Map,od=(i,e,t,n)=>{let{listener:r,rawEmitter:s}=n,o=fs.get(e),a=o&&o.options;return a&&(a.persistent<t.persistent||a.interval>t.interval)&&(xl(e),o=void 0),o?(fn(o,kt,r),fn(o,Wt,s)):(o={listeners:r,rawEmitters:s,options:t,watcher:Uf(e,t,(c,l)=>{ds(o.rawEmitters,h=>{h(Ye.CHANGE,e,{curr:c,prev:l})});let f=c.mtimeMs;(c.size!==l.size||f>l.mtimeMs||f===0)&&ds(o.listeners,h=>h(i,c))})},fs.set(e,o)),()=>{dn(o,kt,r),dn(o,Wt,s),Ol(o.listeners)&&(fs.delete(e),xl(e),o.options=o.watcher=void 0,Object.freeze(o))}},pi=class{constructor(e){this.fsw=e,this._boundHandleError=t=>e._handleError(t)}_watchWithNodeFs(e,t){let n=this.fsw.options,r=ee.dirname(e),s=ee.basename(e);this.fsw._getWatchedDir(r).add(s);let a=ee.resolve(e),c={persistent:n.persistent};t||(t=mi);let l;if(n.usePolling){let f=n.interval!==n.binaryInterval;c.interval=f&&id(s)?n.binaryInterval:n.interval,l=od(e,a,c,{listener:t,rawEmitter:this.fsw._emitRaw})}else l=sd(e,a,c,{listener:t,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return l}_handleFile(e,t,n){if(this.fsw.closed)return;let r=ee.dirname(e),s=ee.basename(e),o=this.fsw._getWatchedDir(r),a=t;if(o.has(s))return;let c=async(f,h)=>{if(this.fsw._throttle(Zf,e,5)){if(!h||h.mtimeMs===0)try{let p=await Cl(e);if(this.fsw.closed)return;let m=p.atimeMs,_=p.mtimeMs;if((!m||m<=_||_!==a.mtimeMs)&&this.fsw._emit(Ye.CHANGE,e,p),(Kf||Qf||Xf)&&a.ino!==p.ino){this.fsw._closeFile(f),a=p;let g=this._watchWithNodeFs(e,c);g&&this.fsw._addPathCloser(f,g)}else a=p}catch{this.fsw._remove(r,s)}else if(o.has(s)){let p=h.atimeMs,m=h.mtimeMs;(!p||p<=m||m!==a.mtimeMs)&&this.fsw._emit(Ye.CHANGE,e,h),a=h}}},l=this._watchWithNodeFs(e,c);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(Ye.ADD,e,0))return;this.fsw._emit(Ye.ADD,e,t)}return l}async _handleSymlink(e,t,n,r){if(this.fsw.closed)return;let s=e.fullPath,o=this.fsw._getWatchedDir(t);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let a;try{a=await hs(n)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(o.has(r)?this.fsw._symlinkPaths.get(s)!==a&&(this.fsw._symlinkPaths.set(s,a),this.fsw._emit(Ye.CHANGE,n,e.stats)):(o.add(r),this.fsw._symlinkPaths.set(s,a),this.fsw._emit(Ye.ADD,n,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(s))return!0;this.fsw._symlinkPaths.set(s,!0)}_handleRead(e,t,n,r,s,o,a){if(e=ee.join(e,""),a=this.fsw._throttle("readdir",e,1e3),!a)return;let c=this.fsw._getWatchedDir(n.path),l=new Set,f=this.fsw._readdirp(e,{fileFilter:h=>n.filterPath(h),directoryFilter:h=>n.filterDir(h)});if(f)return f.on(Jf,async h=>{if(this.fsw.closed){f=void 0;return}let p=h.path,m=ee.join(e,p);if(l.add(p),!(h.stats.isSymbolicLink()&&await this._handleSymlink(h,e,m,p))){if(this.fsw.closed){f=void 0;return}(p===r||!r&&!c.has(p))&&(this.fsw._incrReadyCount(),m=ee.join(s,ee.relative(s,m)),this._addToNodeFs(m,t,n,o+1))}}).on(Ye.ERROR,this._boundHandleError),new Promise((h,p)=>{if(!f)return p();f.once(ps,()=>{if(this.fsw.closed){f=void 0;return}let m=a?a.clear():!1;h(void 0),c.getChildren().filter(_=>_!==e&&!l.has(_)).forEach(_=>{this.fsw._remove(e,_)}),f=void 0,m&&this._handleRead(e,!1,n,r,s,o,a)})})}async _handleDir(e,t,n,r,s,o,a){let c=this.fsw._getWatchedDir(ee.dirname(e)),l=c.has(ee.basename(e));!(n&&this.fsw.options.ignoreInitial)&&!s&&!l&&this.fsw._emit(Ye.ADD_DIR,e,t),c.add(ee.basename(e)),this.fsw._getWatchedDir(e);let f,h,p=this.fsw.options.depth;if((p==null||r<=p)&&!this.fsw._symlinkPaths.has(a)){if(!s&&(await this._handleRead(e,n,o,s,e,r,f),this.fsw.closed))return;h=this._watchWithNodeFs(e,(m,_)=>{_&&_.mtimeMs===0||this._handleRead(m,!1,o,s,e,r,f)})}return h}async _addToNodeFs(e,t,n,r,s){let o=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return o(),!1;let a=this.fsw._getWatchHelpers(e);n&&(a.filterPath=c=>n.filterPath(c),a.filterDir=c=>n.filterDir(c));try{let c=await ed[a.statMethod](a.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(a.watchPath,c))return o(),!1;let l=this.fsw.options.followSymlinks,f;if(c.isDirectory()){let h=ee.resolve(e),p=l?await hs(e):e;if(this.fsw.closed||(f=await this._handleDir(a.watchPath,c,t,r,s,a,p),this.fsw.closed))return;h!==p&&p!==void 0&&this.fsw._symlinkPaths.set(h,p)}else if(c.isSymbolicLink()){let h=l?await hs(e):e;if(this.fsw.closed)return;let p=ee.dirname(a.watchPath);if(this.fsw._getWatchedDir(p).add(a.watchPath),this.fsw._emit(Ye.ADD,a.watchPath,c),f=await this._handleDir(p,c,t,r,e,a,h),this.fsw.closed)return;h!==void 0&&this.fsw._symlinkPaths.set(ee.resolve(e),h)}else f=this._handleFile(a.watchPath,c,t);return o(),f&&this.fsw._addPathCloser(e,f),!1}catch(c){if(this.fsw._handleError(c))return o(),e}}};var gs="/",hd="//",Tl=".",fd="..",dd="string",pd=/\\/g,Pl=/\/\//,md=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,gd=/^\.[/\\]/;function _i(i){return Array.isArray(i)?i:[i]}var _s=i=>typeof i=="object"&&i!==null&&!(i instanceof RegExp);function _d(i){return typeof i=="function"?i:typeof i=="string"?e=>i===e:i instanceof RegExp?e=>i.test(e):typeof i=="object"&&i!==null?e=>{if(i.path===e)return!0;if(i.recursive){let t=$.relative(i.path,e);return t?!t.startsWith("..")&&!$.isAbsolute(t):!1}return!1}:()=>!1}function yd(i){if(typeof i!="string")throw new Error("string expected");i=$.normalize(i),i=i.replace(/\\/g,"/");let e=!1;i.startsWith("//")&&(e=!0);let t=/\/\//;for(;i.match(t);)i=i.replace(t,"/");return e&&(i="/"+i),i}function Rl(i,e,t){let n=yd(e);for(let r=0;r<i.length;r++){let s=i[r];if(s(n,t))return!0}return!1}function bd(i,e){if(i==null)throw new TypeError("anymatch: specify first argument");let n=_i(i).map(r=>_d(r));return e==null?(r,s)=>Rl(n,r,s):Rl(n,e)}var Il=i=>{let e=_i(i).flat();if(!e.every(t=>typeof t===dd))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(Nl)},Ll=i=>{let e=i.replace(pd,gs),t=!1;for(e.startsWith(hd)&&(t=!0);e.match(Pl);)e=e.replace(Pl,gs);return t&&(e=gs+e),e},Nl=i=>Ll($.normalize(Ll(i))),Dl=(i="")=>e=>typeof e=="string"?Nl($.isAbsolute(e)?e:$.join(i,e)):e,wd=(i,e)=>$.isAbsolute(i)?i:$.join(e,i),vd=Object.freeze(new Set),ys=class{constructor(e,t){this.path=e,this._removeWatcher=t,this.items=new Set}add(e){let{items:t}=this;t&&e!==Tl&&e!==fd&&t.add(e)}async remove(e){let{items:t}=this;if(!t||(t.delete(e),t.size>0))return;let n=this.path;try{await cd(n)}catch{this._removeWatcher&&this._removeWatcher($.dirname(n),$.basename(n))}}has(e){let{items:t}=this;if(t)return t.has(e)}getChildren(){let{items:e}=this;return e?[...e.values()]:[]}dispose(){this.items.clear(),this.path="",this._removeWatcher=mi,this.items=vd,Object.freeze(this)}},Sd="stat",xd="lstat",bs=class{constructor(e,t,n){this.fsw=n;let r=e;this.path=e=e.replace(gd,""),this.watchPath=r,this.fullWatchPath=$.resolve(r),this.dirParts=[],this.dirParts.forEach(s=>{s.length>1&&s.pop()}),this.followSymlinks=t,this.statMethod=t?Sd:xd}entryPath(e){return $.join(this.watchPath,$.relative(this.watchPath,e.fullPath))}filterPath(e){let{stats:t}=e;if(t&&t.isSymbolicLink())return this.filterDir(e);let n=this.entryPath(e);return this.fsw._isntIgnored(n,t)&&this.fsw._hasReadPermissions(t)}filterDir(e){return this.fsw._isntIgnored(this.entryPath(e),e.stats)}},yi=class extends ud{constructor(e={}){super(),this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;let t=e.awaitWriteFinish,n={stabilityThreshold:2e3,pollInterval:100},r={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...e,ignored:e.ignored?_i(e.ignored):_i([]),awaitWriteFinish:t===!0?n:typeof t=="object"?{...n,...t}:!1};Al&&(r.usePolling=!0),r.atomic===void 0&&(r.atomic=!r.usePolling);let s=process.env.CHOKIDAR_USEPOLLING;if(s!==void 0){let c=s.toLowerCase();c==="false"||c==="0"?r.usePolling=!1:c==="true"||c==="1"?r.usePolling=!0:r.usePolling=!!c}let o=process.env.CHOKIDAR_INTERVAL;o&&(r.interval=Number.parseInt(o,10));let a=0;this._emitReady=()=>{a++,a>=this._readyCount&&(this._emitReady=mi,this._readyEmitted=!0,process.nextTick(()=>this.emit(ne.READY)))},this._emitRaw=(...c)=>this.emit(ne.RAW,...c),this._boundRemove=this._remove.bind(this),this.options=r,this._nodeFsHandler=new pi(this),Object.freeze(r)}_addIgnoredPath(e){if(_s(e)){for(let t of this._ignoredPaths)if(_s(t)&&t.path===e.path&&t.recursive===e.recursive)return}this._ignoredPaths.add(e)}_removeIgnoredPath(e){if(this._ignoredPaths.delete(e),typeof e=="string")for(let t of this._ignoredPaths)_s(t)&&t.path===e&&this._ignoredPaths.delete(t)}add(e,t,n){let{cwd:r}=this.options;this.closed=!1,this._closePromise=void 0;let s=Il(e);return r&&(s=s.map(o=>wd(o,r))),s.forEach(o=>{this._removeIgnoredPath(o)}),this._userIgnored=void 0,this._readyCount||(this._readyCount=0),this._readyCount+=s.length,Promise.all(s.map(async o=>{let a=await this._nodeFsHandler._addToNodeFs(o,!n,void 0,0,t);return a&&this._emitReady(),a})).then(o=>{this.closed||o.forEach(a=>{a&&this.add($.dirname(a),$.basename(t||a))})}),this}unwatch(e){if(this.closed)return this;let t=Il(e),{cwd:n}=this.options;return t.forEach(r=>{!$.isAbsolute(r)&&!this._closers.has(r)&&(n&&(r=$.join(n,r)),r=$.resolve(r)),this._closePath(r),this._addIgnoredPath(r),this._watched.has(r)&&this._addIgnoredPath({path:r,recursive:!0}),this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();let e=[];return this._closers.forEach(t=>t.forEach(n=>{let r=n();r instanceof Promise&&e.push(r)})),this._streams.forEach(t=>t.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(t=>t.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){let e={};return this._watched.forEach((t,n)=>{let s=(this.options.cwd?$.relative(this.options.cwd,n):n)||Tl;e[s]=t.getChildren().sort()}),e}emitWithAll(e,t){this.emit(e,...t),e!==ne.ERROR&&this.emit(ne.ALL,e,...t)}async _emit(e,t,n){if(this.closed)return;let r=this.options;ms&&(t=$.normalize(t)),r.cwd&&(t=$.relative(r.cwd,t));let s=[t];n!=null&&s.push(n);let o=r.awaitWriteFinish,a;if(o&&(a=this._pendingWrites.get(t)))return a.lastChange=new Date,this;if(r.atomic){if(e===ne.UNLINK)return this._pendingUnlinks.set(t,[e,...s]),setTimeout(()=>{this._pendingUnlinks.forEach((c,l)=>{this.emit(...c),this.emit(ne.ALL,...c),this._pendingUnlinks.delete(l)})},typeof r.atomic=="number"?r.atomic:100),this;e===ne.ADD&&this._pendingUnlinks.has(t)&&(e=ne.CHANGE,this._pendingUnlinks.delete(t))}if(o&&(e===ne.ADD||e===ne.CHANGE)&&this._readyEmitted){let c=(l,f)=>{l?(e=ne.ERROR,s[0]=l,this.emitWithAll(e,s)):f&&(s.length>1?s[1]=f:s.push(f),this.emitWithAll(e,s))};return this._awaitWriteFinish(t,o.stabilityThreshold,e,c),this}if(e===ne.CHANGE&&!this._throttle(ne.CHANGE,t,50))return this;if(r.alwaysStat&&n===void 0&&(e===ne.ADD||e===ne.ADD_DIR||e===ne.CHANGE)){let c=r.cwd?$.join(r.cwd,t):t,l;try{l=await ld(c)}catch{}if(!l||this.closed)return;s.push(l)}return this.emitWithAll(e,s),this}_handleError(e){let t=e&&e.code;return e&&t!=="ENOENT"&&t!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||t!=="EPERM"&&t!=="EACCES")&&this.emit(ne.ERROR,e),e||this.closed}_throttle(e,t,n){this._throttled.has(e)||this._throttled.set(e,new Map);let r=this._throttled.get(e);if(!r)throw new Error("invalid throttle");let s=r.get(t);if(s)return s.count++,!1;let o,a=()=>{let l=r.get(t),f=l?l.count:0;return r.delete(t),clearTimeout(o),l&&clearTimeout(l.timeoutObject),f};o=setTimeout(a,n);let c={timeoutObject:o,clear:a,count:0};return r.set(t,c),c}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,t,n,r){let s=this.options.awaitWriteFinish;if(typeof s!="object")return;let o=s.pollInterval,a,c=e;this.options.cwd&&!$.isAbsolute(e)&&(c=$.join(this.options.cwd,e));let l=new Date,f=this._pendingWrites;function h(p){ad(c,(m,_)=>{if(m||!f.has(e)){m&&m.code!=="ENOENT"&&r(m);return}let g=Number(new Date);p&&_.size!==p.size&&(f.get(e).lastChange=g);let k=f.get(e);g-k.lastChange>=t?(f.delete(e),r(void 0,_)):a=setTimeout(h,o,_)})}f.has(e)||(f.set(e,{lastChange:l,cancelWait:()=>(f.delete(e),clearTimeout(a),n)}),a=setTimeout(h,o))}_isIgnored(e,t){if(this.options.atomic&&md.test(e))return!0;if(!this._userIgnored){let{cwd:n}=this.options,s=(this.options.ignored||[]).map(Dl(n)),a=[...[...this._ignoredPaths].map(Dl(n)),...s];this._userIgnored=bd(a,void 0)}return this._userIgnored(e,t)}_isntIgnored(e,t){return!this._isIgnored(e,t)}_getWatchHelpers(e){return new bs(e,this.options.followSymlinks,this)}_getWatchedDir(e){let t=$.resolve(e);return this._watched.has(t)||this._watched.set(t,new ys(t,this._boundRemove)),this._watched.get(t)}_hasReadPermissions(e){return this.options.ignorePermissionErrors?!0:!!(Number(e.mode)&256)}_remove(e,t,n){let r=$.join(e,t),s=$.resolve(r);if(n=n??(this._watched.has(r)||this._watched.has(s)),!this._throttle("remove",r,100))return;!n&&this._watched.size===1&&this.add(e,t,!0),this._getWatchedDir(r).getChildren().forEach(p=>this._remove(r,p));let c=this._getWatchedDir(e),l=c.has(t);c.remove(t),this._symlinkPaths.has(s)&&this._symlinkPaths.delete(s);let f=r;if(this.options.cwd&&(f=$.relative(this.options.cwd,r)),this.options.awaitWriteFinish&&this._pendingWrites.has(f)&&this._pendingWrites.get(f).cancelWait()===ne.ADD)return;this._watched.delete(r),this._watched.delete(s);let h=n?ne.UNLINK_DIR:ne.UNLINK;l&&!this._isIgnored(r)&&this._emit(h,r),this._closePath(r)}_closePath(e){this._closeFile(e);let t=$.dirname(e);this._getWatchedDir(t).remove($.basename(e))}_closeFile(e){let t=this._closers.get(e);t&&(t.forEach(n=>n()),this._closers.delete(e))}_addPathCloser(e,t){if(!t)return;let n=this._closers.get(e);n||(n=[],this._closers.set(e,n)),n.push(t)}_readdirp(e,t){if(this.closed)return;let n={type:ne.ALL,alwaysStat:!0,lstat:!0,...t,depth:0},r=Sl(e,n);return this._streams.add(r),r.once(kl,()=>{r=void 0}),r.once(ps,()=>{r&&(this._streams.delete(r),r=void 0)}),r}};function Ed(i,e={}){let t=new yi(e);return t.add(i),t}var Ml={watch:Ed,FSWatcher:yi};import{tsImport as mf}from"tsx/esm/api";var Jl=Br(Yl(),1),{program:Yb,createCommand:Jb,createArgument:Kb,createOption:Qb,CommanderError:Xb,InvalidArgumentError:Zb,InvalidOptionArgumentError:ew,Command:Kl,Argument:tw,Option:nw,Help:iw}=Jl.default;var Ql=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
82
+ `:""}return os.dump=L,os}var Ja;function Af(){if(Ja)return we;Ja=1;let i=Cf(),e=kf();function t(n,r){return function(){throw new Error("Function yaml."+n+" is removed in js-yaml 4. Use yaml."+r+" instead, which is now safe by default.")}}return we.Type=Ce(),we.Schema=Ka(),we.FAILSAFE_SCHEMA=el(),we.JSON_SCHEMA=sl(),we.CORE_SCHEMA=ol(),we.DEFAULT_SCHEMA=as(),we.load=i.load,we.loadAll=i.loadAll,we.dump=e.dump,we.YAMLException=hn(),we.types={binary:cl(),float:rl(),map:Za(),null:tl(),pairs:hl(),set:fl(),timestamp:al(),bool:nl(),int:il(),merge:ll(),omap:ul(),seq:Xa(),str:Qa()},we.safeLoad=t("safeLoad","load"),we.safeLoadAll=t("safeLoadAll","loadAll"),we.safeDump=t("safeDump","dump"),we}var Of=Af(),Xe=xf(Of),{Type:hb,Schema:fb,FAILSAFE_SCHEMA:db,JSON_SCHEMA:pb,CORE_SCHEMA:mb,DEFAULT_SCHEMA:gb,load:_b,loadAll:yb,dump:bb,YAMLException:wb,types:vb,safeLoad:Sb,safeLoadAll:xb,safeDump:Eb}=Xe;var j=Br(ml(),1);import{stat as ad}from"fs";import{stat as ld,readdir as cd}from"fs/promises";import{EventEmitter as ud}from"events";import*as $ from"path";import{stat as Lf,lstat as gl,readdir as Df,realpath as Tf}from"node:fs/promises";import{Readable as Nf}from"node:stream";import{resolve as _l,relative as Mf,join as Ff,sep as Bf}from"node:path";var De={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},cs={root:".",fileFilter:i=>!0,directoryFilter:i=>!0,type:De.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(cs);var vl="READDIRP_RECURSIVE_ERROR",qf=new Set(["ENOENT","EPERM","EACCES","ELOOP",vl]),yl=[De.DIR_TYPE,De.EVERYTHING_TYPE,De.FILE_DIR_TYPE,De.FILE_TYPE],Hf=new Set([De.DIR_TYPE,De.EVERYTHING_TYPE,De.FILE_DIR_TYPE]),Wf=new Set([De.EVERYTHING_TYPE,De.FILE_DIR_TYPE,De.FILE_TYPE]),jf=i=>qf.has(i.code),Vf=process.platform==="win32",bl=i=>!0,wl=i=>{if(i===void 0)return bl;if(typeof i=="function")return i;if(typeof i=="string"){let e=i.trim();return t=>t.basename===e}if(Array.isArray(i)){let e=i.map(t=>t.trim());return t=>e.some(n=>t.basename===n)}return bl},us=class extends Nf{constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark});let t={...cs,...e},{root:n,type:r}=t;this._fileFilter=wl(t.fileFilter),this._directoryFilter=wl(t.directoryFilter);let s=t.lstat?gl:Lf;Vf?this._stat=o=>s(o,{bigint:!0}):this._stat=s,this._maxDepth=t.depth??cs.depth,this._wantsDir=r?Hf.has(r):!1,this._wantsFile=r?Wf.has(r):!1,this._wantsEverything=r===De.EVERYTHING_TYPE,this._root=_l(n),this._isDirent=!t.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(n,1)],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){let t=this.parent,n=t&&t.files;if(n&&n.length>0){let{path:r,depth:s}=t,o=n.splice(0,e).map(l=>this._formatEntry(l,r)),a=await Promise.all(o);for(let l of a){if(!l)continue;if(this.destroyed)return;let c=await this._getEntryType(l);c==="directory"&&this._directoryFilter(l)?(s<=this._maxDepth&&this.parents.push(this._exploreDir(l.fullPath,s+1)),this._wantsDir&&(this.push(l),e--)):(c==="file"||this._includeAsFile(l))&&this._fileFilter(l)&&this._wantsFile&&(this.push(l),e--)}}else{let r=this.parents.pop();if(!r){this.push(null);break}if(this.parent=await r,this.destroyed)return}}}catch(t){this.destroy(t)}finally{this.reading=!1}}}async _exploreDir(e,t){let n;try{n=await Df(e,this._rdOptions)}catch(r){this._onError(r)}return{files:n,depth:t,path:e}}async _formatEntry(e,t){let n,r=this._isDirent?e.name:e;try{let s=_l(Ff(t,r));n={path:Mf(this._root,s),fullPath:s,basename:r},n[this._statsProp]=this._isDirent?e:await this._stat(s)}catch(s){this._onError(s);return}return n}_onError(e){jf(e)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}async _getEntryType(e){if(!e&&this._statsProp in e)return"";let t=e[this._statsProp];if(t.isFile())return"file";if(t.isDirectory())return"directory";if(t&&t.isSymbolicLink()){let n=e.fullPath;try{let r=await Tf(n),s=await gl(r);if(s.isFile())return"file";if(s.isDirectory()){let o=r.length;if(n.startsWith(r)&&n.substr(o,1)===Bf){let a=new Error(`Circular symlink detected: "${n}" points to "${r}"`);return a.code=vl,this._onError(a)}return"directory"}}catch(r){return this._onError(r),""}}}_includeAsFile(e){let t=e&&e[this._statsProp];return t&&this._wantsEverything&&!t.isDirectory()}};function Sl(i,e={}){let t=e.entryType||e.type;if(t==="both"&&(t=De.FILE_DIR_TYPE),t&&(e.type=t),i){if(typeof i!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(t&&!yl.includes(t))throw new Error(`readdirp: Invalid type passed. Use one of ${yl.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=i,new us(e)}import{watchFile as Uf,unwatchFile as xl,watch as Gf}from"fs";import{open as zf,stat as Cl,lstat as $f,realpath as hs}from"fs/promises";import*as ee from"path";import{type as Yf}from"os";var Jf="data",ps="end",kl="close",mi=()=>{};var gi=process.platform,ms=gi==="win32",Kf=gi==="darwin",Qf=gi==="linux",Xf=gi==="freebsd",Al=Yf()==="OS400",ne={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},Ye=ne,Zf="watch",ed={lstat:$f,stat:Cl},kt="listeners",hi="errHandlers",Wt="rawEmitters",td=[kt,hi,Wt],nd=new Set(["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),id=i=>nd.has(ee.extname(i).slice(1).toLowerCase()),ds=(i,e)=>{i instanceof Set?i.forEach(e):e(i)},fn=(i,e,t)=>{let n=i[e];n instanceof Set||(i[e]=n=new Set([n])),n.add(t)},rd=i=>e=>{let t=i[e];t instanceof Set?t.clear():delete i[e]},dn=(i,e,t)=>{let n=i[e];n instanceof Set?n.delete(t):n===t&&delete i[e]},Ol=i=>i instanceof Set?i.size===0:!i,fi=new Map;function El(i,e,t,n,r){let s=(o,a)=>{t(i),r(o,a,{watchedPath:i}),a&&i!==a&&di(ee.resolve(i,a),kt,ee.join(i,a))};try{return Gf(i,{persistent:e.persistent},s)}catch(o){n(o);return}}var di=(i,e,t,n,r)=>{let s=fi.get(i);s&&ds(s[e],o=>{o(t,n,r)})},sd=(i,e,t,n)=>{let{listener:r,errHandler:s,rawEmitter:o}=n,a=fi.get(e),l;if(!t.persistent)return l=El(i,t,r,s,o),l?l.close.bind(l):void 0;if(a)fn(a,kt,r),fn(a,hi,s),fn(a,Wt,o);else{if(l=El(i,t,di.bind(null,e,kt),s,di.bind(null,e,Wt)),!l)return;l.on(Ye.ERROR,async c=>{let f=di.bind(null,e,hi);if(a&&(a.watcherUnusable=!0),ms&&c.code==="EPERM")try{await(await zf(i,"r")).close(),f(c)}catch{}else f(c)}),a={listeners:r,errHandlers:s,rawEmitters:o,watcher:l},fi.set(e,a)}return()=>{dn(a,kt,r),dn(a,hi,s),dn(a,Wt,o),Ol(a.listeners)&&(a.watcher.close(),fi.delete(e),td.forEach(rd(a)),a.watcher=void 0,Object.freeze(a))}},fs=new Map,od=(i,e,t,n)=>{let{listener:r,rawEmitter:s}=n,o=fs.get(e),a=o&&o.options;return a&&(a.persistent<t.persistent||a.interval>t.interval)&&(xl(e),o=void 0),o?(fn(o,kt,r),fn(o,Wt,s)):(o={listeners:r,rawEmitters:s,options:t,watcher:Uf(e,t,(l,c)=>{ds(o.rawEmitters,h=>{h(Ye.CHANGE,e,{curr:l,prev:c})});let f=l.mtimeMs;(l.size!==c.size||f>c.mtimeMs||f===0)&&ds(o.listeners,h=>h(i,l))})},fs.set(e,o)),()=>{dn(o,kt,r),dn(o,Wt,s),Ol(o.listeners)&&(fs.delete(e),xl(e),o.options=o.watcher=void 0,Object.freeze(o))}},pi=class{constructor(e){this.fsw=e,this._boundHandleError=t=>e._handleError(t)}_watchWithNodeFs(e,t){let n=this.fsw.options,r=ee.dirname(e),s=ee.basename(e);this.fsw._getWatchedDir(r).add(s);let a=ee.resolve(e),l={persistent:n.persistent};t||(t=mi);let c;if(n.usePolling){let f=n.interval!==n.binaryInterval;l.interval=f&&id(s)?n.binaryInterval:n.interval,c=od(e,a,l,{listener:t,rawEmitter:this.fsw._emitRaw})}else c=sd(e,a,l,{listener:t,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return c}_handleFile(e,t,n){if(this.fsw.closed)return;let r=ee.dirname(e),s=ee.basename(e),o=this.fsw._getWatchedDir(r),a=t;if(o.has(s))return;let l=async(f,h)=>{if(this.fsw._throttle(Zf,e,5)){if(!h||h.mtimeMs===0)try{let p=await Cl(e);if(this.fsw.closed)return;let m=p.atimeMs,_=p.mtimeMs;if((!m||m<=_||_!==a.mtimeMs)&&this.fsw._emit(Ye.CHANGE,e,p),(Kf||Qf||Xf)&&a.ino!==p.ino){this.fsw._closeFile(f),a=p;let g=this._watchWithNodeFs(e,l);g&&this.fsw._addPathCloser(f,g)}else a=p}catch{this.fsw._remove(r,s)}else if(o.has(s)){let p=h.atimeMs,m=h.mtimeMs;(!p||p<=m||m!==a.mtimeMs)&&this.fsw._emit(Ye.CHANGE,e,h),a=h}}},c=this._watchWithNodeFs(e,l);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(Ye.ADD,e,0))return;this.fsw._emit(Ye.ADD,e,t)}return c}async _handleSymlink(e,t,n,r){if(this.fsw.closed)return;let s=e.fullPath,o=this.fsw._getWatchedDir(t);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let a;try{a=await hs(n)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(o.has(r)?this.fsw._symlinkPaths.get(s)!==a&&(this.fsw._symlinkPaths.set(s,a),this.fsw._emit(Ye.CHANGE,n,e.stats)):(o.add(r),this.fsw._symlinkPaths.set(s,a),this.fsw._emit(Ye.ADD,n,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(s))return!0;this.fsw._symlinkPaths.set(s,!0)}_handleRead(e,t,n,r,s,o,a){if(e=ee.join(e,""),a=this.fsw._throttle("readdir",e,1e3),!a)return;let l=this.fsw._getWatchedDir(n.path),c=new Set,f=this.fsw._readdirp(e,{fileFilter:h=>n.filterPath(h),directoryFilter:h=>n.filterDir(h)});if(f)return f.on(Jf,async h=>{if(this.fsw.closed){f=void 0;return}let p=h.path,m=ee.join(e,p);if(c.add(p),!(h.stats.isSymbolicLink()&&await this._handleSymlink(h,e,m,p))){if(this.fsw.closed){f=void 0;return}(p===r||!r&&!l.has(p))&&(this.fsw._incrReadyCount(),m=ee.join(s,ee.relative(s,m)),this._addToNodeFs(m,t,n,o+1))}}).on(Ye.ERROR,this._boundHandleError),new Promise((h,p)=>{if(!f)return p();f.once(ps,()=>{if(this.fsw.closed){f=void 0;return}let m=a?a.clear():!1;h(void 0),l.getChildren().filter(_=>_!==e&&!c.has(_)).forEach(_=>{this.fsw._remove(e,_)}),f=void 0,m&&this._handleRead(e,!1,n,r,s,o,a)})})}async _handleDir(e,t,n,r,s,o,a){let l=this.fsw._getWatchedDir(ee.dirname(e)),c=l.has(ee.basename(e));!(n&&this.fsw.options.ignoreInitial)&&!s&&!c&&this.fsw._emit(Ye.ADD_DIR,e,t),l.add(ee.basename(e)),this.fsw._getWatchedDir(e);let f,h,p=this.fsw.options.depth;if((p==null||r<=p)&&!this.fsw._symlinkPaths.has(a)){if(!s&&(await this._handleRead(e,n,o,s,e,r,f),this.fsw.closed))return;h=this._watchWithNodeFs(e,(m,_)=>{_&&_.mtimeMs===0||this._handleRead(m,!1,o,s,e,r,f)})}return h}async _addToNodeFs(e,t,n,r,s){let o=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return o(),!1;let a=this.fsw._getWatchHelpers(e);n&&(a.filterPath=l=>n.filterPath(l),a.filterDir=l=>n.filterDir(l));try{let l=await ed[a.statMethod](a.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(a.watchPath,l))return o(),!1;let c=this.fsw.options.followSymlinks,f;if(l.isDirectory()){let h=ee.resolve(e),p=c?await hs(e):e;if(this.fsw.closed||(f=await this._handleDir(a.watchPath,l,t,r,s,a,p),this.fsw.closed))return;h!==p&&p!==void 0&&this.fsw._symlinkPaths.set(h,p)}else if(l.isSymbolicLink()){let h=c?await hs(e):e;if(this.fsw.closed)return;let p=ee.dirname(a.watchPath);if(this.fsw._getWatchedDir(p).add(a.watchPath),this.fsw._emit(Ye.ADD,a.watchPath,l),f=await this._handleDir(p,l,t,r,e,a,h),this.fsw.closed)return;h!==void 0&&this.fsw._symlinkPaths.set(ee.resolve(e),h)}else f=this._handleFile(a.watchPath,l,t);return o(),f&&this.fsw._addPathCloser(e,f),!1}catch(l){if(this.fsw._handleError(l))return o(),e}}};var gs="/",hd="//",Tl=".",fd="..",dd="string",pd=/\\/g,Pl=/\/\//,md=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,gd=/^\.[/\\]/;function _i(i){return Array.isArray(i)?i:[i]}var _s=i=>typeof i=="object"&&i!==null&&!(i instanceof RegExp);function _d(i){return typeof i=="function"?i:typeof i=="string"?e=>i===e:i instanceof RegExp?e=>i.test(e):typeof i=="object"&&i!==null?e=>{if(i.path===e)return!0;if(i.recursive){let t=$.relative(i.path,e);return t?!t.startsWith("..")&&!$.isAbsolute(t):!1}return!1}:()=>!1}function yd(i){if(typeof i!="string")throw new Error("string expected");i=$.normalize(i),i=i.replace(/\\/g,"/");let e=!1;i.startsWith("//")&&(e=!0);let t=/\/\//;for(;i.match(t);)i=i.replace(t,"/");return e&&(i="/"+i),i}function Rl(i,e,t){let n=yd(e);for(let r=0;r<i.length;r++){let s=i[r];if(s(n,t))return!0}return!1}function bd(i,e){if(i==null)throw new TypeError("anymatch: specify first argument");let n=_i(i).map(r=>_d(r));return e==null?(r,s)=>Rl(n,r,s):Rl(n,e)}var Il=i=>{let e=_i(i).flat();if(!e.every(t=>typeof t===dd))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(Nl)},Ll=i=>{let e=i.replace(pd,gs),t=!1;for(e.startsWith(hd)&&(t=!0);e.match(Pl);)e=e.replace(Pl,gs);return t&&(e=gs+e),e},Nl=i=>Ll($.normalize(Ll(i))),Dl=(i="")=>e=>typeof e=="string"?Nl($.isAbsolute(e)?e:$.join(i,e)):e,wd=(i,e)=>$.isAbsolute(i)?i:$.join(e,i),vd=Object.freeze(new Set),ys=class{constructor(e,t){this.path=e,this._removeWatcher=t,this.items=new Set}add(e){let{items:t}=this;t&&e!==Tl&&e!==fd&&t.add(e)}async remove(e){let{items:t}=this;if(!t||(t.delete(e),t.size>0))return;let n=this.path;try{await cd(n)}catch{this._removeWatcher&&this._removeWatcher($.dirname(n),$.basename(n))}}has(e){let{items:t}=this;if(t)return t.has(e)}getChildren(){let{items:e}=this;return e?[...e.values()]:[]}dispose(){this.items.clear(),this.path="",this._removeWatcher=mi,this.items=vd,Object.freeze(this)}},Sd="stat",xd="lstat",bs=class{constructor(e,t,n){this.fsw=n;let r=e;this.path=e=e.replace(gd,""),this.watchPath=r,this.fullWatchPath=$.resolve(r),this.dirParts=[],this.dirParts.forEach(s=>{s.length>1&&s.pop()}),this.followSymlinks=t,this.statMethod=t?Sd:xd}entryPath(e){return $.join(this.watchPath,$.relative(this.watchPath,e.fullPath))}filterPath(e){let{stats:t}=e;if(t&&t.isSymbolicLink())return this.filterDir(e);let n=this.entryPath(e);return this.fsw._isntIgnored(n,t)&&this.fsw._hasReadPermissions(t)}filterDir(e){return this.fsw._isntIgnored(this.entryPath(e),e.stats)}},yi=class extends ud{constructor(e={}){super(),this.closed=!1,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._streams=new Set,this._symlinkPaths=new Map,this._watched=new Map,this._pendingWrites=new Map,this._pendingUnlinks=new Map,this._readyCount=0,this._readyEmitted=!1;let t=e.awaitWriteFinish,n={stabilityThreshold:2e3,pollInterval:100},r={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...e,ignored:e.ignored?_i(e.ignored):_i([]),awaitWriteFinish:t===!0?n:typeof t=="object"?{...n,...t}:!1};Al&&(r.usePolling=!0),r.atomic===void 0&&(r.atomic=!r.usePolling);let s=process.env.CHOKIDAR_USEPOLLING;if(s!==void 0){let l=s.toLowerCase();l==="false"||l==="0"?r.usePolling=!1:l==="true"||l==="1"?r.usePolling=!0:r.usePolling=!!l}let o=process.env.CHOKIDAR_INTERVAL;o&&(r.interval=Number.parseInt(o,10));let a=0;this._emitReady=()=>{a++,a>=this._readyCount&&(this._emitReady=mi,this._readyEmitted=!0,process.nextTick(()=>this.emit(ne.READY)))},this._emitRaw=(...l)=>this.emit(ne.RAW,...l),this._boundRemove=this._remove.bind(this),this.options=r,this._nodeFsHandler=new pi(this),Object.freeze(r)}_addIgnoredPath(e){if(_s(e)){for(let t of this._ignoredPaths)if(_s(t)&&t.path===e.path&&t.recursive===e.recursive)return}this._ignoredPaths.add(e)}_removeIgnoredPath(e){if(this._ignoredPaths.delete(e),typeof e=="string")for(let t of this._ignoredPaths)_s(t)&&t.path===e&&this._ignoredPaths.delete(t)}add(e,t,n){let{cwd:r}=this.options;this.closed=!1,this._closePromise=void 0;let s=Il(e);return r&&(s=s.map(o=>wd(o,r))),s.forEach(o=>{this._removeIgnoredPath(o)}),this._userIgnored=void 0,this._readyCount||(this._readyCount=0),this._readyCount+=s.length,Promise.all(s.map(async o=>{let a=await this._nodeFsHandler._addToNodeFs(o,!n,void 0,0,t);return a&&this._emitReady(),a})).then(o=>{this.closed||o.forEach(a=>{a&&this.add($.dirname(a),$.basename(t||a))})}),this}unwatch(e){if(this.closed)return this;let t=Il(e),{cwd:n}=this.options;return t.forEach(r=>{!$.isAbsolute(r)&&!this._closers.has(r)&&(n&&(r=$.join(n,r)),r=$.resolve(r)),this._closePath(r),this._addIgnoredPath(r),this._watched.has(r)&&this._addIgnoredPath({path:r,recursive:!0}),this._userIgnored=void 0}),this}close(){if(this._closePromise)return this._closePromise;this.closed=!0,this.removeAllListeners();let e=[];return this._closers.forEach(t=>t.forEach(n=>{let r=n();r instanceof Promise&&e.push(r)})),this._streams.forEach(t=>t.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(t=>t.dispose()),this._closers.clear(),this._watched.clear(),this._streams.clear(),this._symlinkPaths.clear(),this._throttled.clear(),this._closePromise=e.length?Promise.all(e).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){let e={};return this._watched.forEach((t,n)=>{let s=(this.options.cwd?$.relative(this.options.cwd,n):n)||Tl;e[s]=t.getChildren().sort()}),e}emitWithAll(e,t){this.emit(e,...t),e!==ne.ERROR&&this.emit(ne.ALL,e,...t)}async _emit(e,t,n){if(this.closed)return;let r=this.options;ms&&(t=$.normalize(t)),r.cwd&&(t=$.relative(r.cwd,t));let s=[t];n!=null&&s.push(n);let o=r.awaitWriteFinish,a;if(o&&(a=this._pendingWrites.get(t)))return a.lastChange=new Date,this;if(r.atomic){if(e===ne.UNLINK)return this._pendingUnlinks.set(t,[e,...s]),setTimeout(()=>{this._pendingUnlinks.forEach((l,c)=>{this.emit(...l),this.emit(ne.ALL,...l),this._pendingUnlinks.delete(c)})},typeof r.atomic=="number"?r.atomic:100),this;e===ne.ADD&&this._pendingUnlinks.has(t)&&(e=ne.CHANGE,this._pendingUnlinks.delete(t))}if(o&&(e===ne.ADD||e===ne.CHANGE)&&this._readyEmitted){let l=(c,f)=>{c?(e=ne.ERROR,s[0]=c,this.emitWithAll(e,s)):f&&(s.length>1?s[1]=f:s.push(f),this.emitWithAll(e,s))};return this._awaitWriteFinish(t,o.stabilityThreshold,e,l),this}if(e===ne.CHANGE&&!this._throttle(ne.CHANGE,t,50))return this;if(r.alwaysStat&&n===void 0&&(e===ne.ADD||e===ne.ADD_DIR||e===ne.CHANGE)){let l=r.cwd?$.join(r.cwd,t):t,c;try{c=await ld(l)}catch{}if(!c||this.closed)return;s.push(c)}return this.emitWithAll(e,s),this}_handleError(e){let t=e&&e.code;return e&&t!=="ENOENT"&&t!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||t!=="EPERM"&&t!=="EACCES")&&this.emit(ne.ERROR,e),e||this.closed}_throttle(e,t,n){this._throttled.has(e)||this._throttled.set(e,new Map);let r=this._throttled.get(e);if(!r)throw new Error("invalid throttle");let s=r.get(t);if(s)return s.count++,!1;let o,a=()=>{let c=r.get(t),f=c?c.count:0;return r.delete(t),clearTimeout(o),c&&clearTimeout(c.timeoutObject),f};o=setTimeout(a,n);let l={timeoutObject:o,clear:a,count:0};return r.set(t,l),l}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,t,n,r){let s=this.options.awaitWriteFinish;if(typeof s!="object")return;let o=s.pollInterval,a,l=e;this.options.cwd&&!$.isAbsolute(e)&&(l=$.join(this.options.cwd,e));let c=new Date,f=this._pendingWrites;function h(p){ad(l,(m,_)=>{if(m||!f.has(e)){m&&m.code!=="ENOENT"&&r(m);return}let g=Number(new Date);p&&_.size!==p.size&&(f.get(e).lastChange=g);let k=f.get(e);g-k.lastChange>=t?(f.delete(e),r(void 0,_)):a=setTimeout(h,o,_)})}f.has(e)||(f.set(e,{lastChange:c,cancelWait:()=>(f.delete(e),clearTimeout(a),n)}),a=setTimeout(h,o))}_isIgnored(e,t){if(this.options.atomic&&md.test(e))return!0;if(!this._userIgnored){let{cwd:n}=this.options,s=(this.options.ignored||[]).map(Dl(n)),a=[...[...this._ignoredPaths].map(Dl(n)),...s];this._userIgnored=bd(a,void 0)}return this._userIgnored(e,t)}_isntIgnored(e,t){return!this._isIgnored(e,t)}_getWatchHelpers(e){return new bs(e,this.options.followSymlinks,this)}_getWatchedDir(e){let t=$.resolve(e);return this._watched.has(t)||this._watched.set(t,new ys(t,this._boundRemove)),this._watched.get(t)}_hasReadPermissions(e){return this.options.ignorePermissionErrors?!0:!!(Number(e.mode)&256)}_remove(e,t,n){let r=$.join(e,t),s=$.resolve(r);if(n=n??(this._watched.has(r)||this._watched.has(s)),!this._throttle("remove",r,100))return;!n&&this._watched.size===1&&this.add(e,t,!0),this._getWatchedDir(r).getChildren().forEach(p=>this._remove(r,p));let l=this._getWatchedDir(e),c=l.has(t);l.remove(t),this._symlinkPaths.has(s)&&this._symlinkPaths.delete(s);let f=r;if(this.options.cwd&&(f=$.relative(this.options.cwd,r)),this.options.awaitWriteFinish&&this._pendingWrites.has(f)&&this._pendingWrites.get(f).cancelWait()===ne.ADD)return;this._watched.delete(r),this._watched.delete(s);let h=n?ne.UNLINK_DIR:ne.UNLINK;c&&!this._isIgnored(r)&&this._emit(h,r),this._closePath(r)}_closePath(e){this._closeFile(e);let t=$.dirname(e);this._getWatchedDir(t).remove($.basename(e))}_closeFile(e){let t=this._closers.get(e);t&&(t.forEach(n=>n()),this._closers.delete(e))}_addPathCloser(e,t){if(!t)return;let n=this._closers.get(e);n||(n=[],this._closers.set(e,n)),n.push(t)}_readdirp(e,t){if(this.closed)return;let n={type:ne.ALL,alwaysStat:!0,lstat:!0,...t,depth:0},r=Sl(e,n);return this._streams.add(r),r.once(kl,()=>{r=void 0}),r.once(ps,()=>{r&&(this._streams.delete(r),r=void 0)}),r}};function Ed(i,e={}){let t=new yi(e);return t.add(i),t}var Ml={watch:Ed,FSWatcher:yi};import{tsImport as mf}from"tsx/esm/api";var Jl=Br(Yl(),1),{program:Yb,createCommand:Jb,createArgument:Kb,createOption:Qb,CommanderError:Xb,InvalidArgumentError:Zb,InvalidOptionArgumentError:ew,Command:Kl,Argument:tw,Option:nw,Help:iw}=Jl.default;var Ql=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
83
83
  cli_contracts: 0.1.0
84
84
 
85
85
  info:
86
86
  title: embedoc CLI
87
- version: 0.14.1
87
+ version: 0.14.5
88
88
  description: >-
89
89
  In-place document generator that auto-updates marker blocks in documents
90
90
  and source code while preserving manually edited sections. Supports
@@ -427,7 +427,7 @@ command_sets:
427
427
  "cli_contracts": "0.1.0",
428
428
  "info": {
429
429
  "title": "embedoc CLI",
430
- "version": "0.14.1",
430
+ "version": "0.14.5",
431
431
  "description": "In-place document generator that auto-updates marker blocks in documents and source code while preserving manually edited sections. Supports multiple datasources (SQLite, CSV, JSON, YAML, glob), programmable TypeScript renderers, Handlebars file generation, and incremental builds with dependency tracking.",
432
432
  "license": {
433
433
  "name": "MIT"
@@ -850,33 +850,33 @@ command_sets:
850
850
  }
851
851
  }
852
852
  }
853
- }`;function Zl(i,e){let t=new Kl;return t.name("embedoc").version(e,"-V, --version").description("In-place document generator with marker-based embedding."),t.command("init").description("Initialize embedoc in the current project.").option("-f, --force","Overwrite existing files.",!1).action(async(n,r)=>{await i.init(n,r.optsWithGlobals())}),t.command("build").description("Build documents by replacing markers with rendered content.").argument("[files...]","Specific file paths to process. If omitted, processes all targets from config.").option("-c, --config <path>","Path to config file (YAML or JSON).","embedoc.config.yaml").option("-d, --dry-run","Preview changes without writing files.",!1).option("-v, --verbose","Enable verbose output.",!1).action(async(n,r,s)=>{await i.build(n,r,s.optsWithGlobals())}),t.command("generate").description("Generate new files from datasource records using Handlebars templates.").option("-c, --config <path>","Path to config file (YAML or JSON).","embedoc.config.yaml").option("-s, --datasource <name>","Specific datasource to process.").option("-g, --generator <name>","Specific generator template to use.").option("-a, --all","Process all datasources that have generators configured.",!1).option("-d, --dry-run","Preview generation without writing files.",!1).option("-v, --verbose","Enable verbose output.",!1).action(async(n,r)=>{await i.generate(n,r.optsWithGlobals())}),t.command("watch").description("Watch files and rebuild on changes with dependency tracking.").option("-c, --config <path>","Path to config file (YAML or JSON).","embedoc.config.yaml").option("-v, --verbose","Enable verbose rebuild output.",!1).option("--debug-deps","Print dependency graph at startup for debugging.",!1).action(async(n,r)=>{await i.watch(n,r.optsWithGlobals())}),t.command("extract").description("Extract contract specification for this CLI tool.").argument("[commands...]","Command IDs to extract. Use dot notation.").option("-a, --all","Extract all commands.",!1).option("--include-meta","Include extraction metadata.",!0).option("-F, --format <format>","Output format (yaml or json).","yaml").action(async(n,r,s)=>{n.length===0&&!r.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
854
- `),process.exit(2));let o=r.format||"yaml",a=JSON.parse(Xl),c=r.all?[]:n;if(c.length===0)if(o==="json"){let l={};r.includeMeta&&(l._meta={source:"embedded",type:"cli-contracts/extract",extractedAt:new Date().toISOString(),specVersion:a.cli_contracts??"0.1.0",commands:["embedoc.init","embedoc.build","embedoc.generate","embedoc.watch"]}),Object.assign(l,a),process.stdout.write(JSON.stringify(l,null,2)+`
855
- `)}else{let l=[];if(l.push("# embedoc extract"),l.push("# source: embedded"),l.push("# type: cli-contracts/command-extract"),r.includeMeta){l.push("---"),l.push("source: embedded"),l.push("type: cli-contracts/command-extract"),l.push("extractedAt: "+new Date().toISOString()),l.push("spec_version: "+(a.cli_contracts??"0.1.0")),l.push("commands:");for(let f of["embedoc.init","embedoc.build","embedoc.generate","embedoc.watch"])l.push(" - "+f)}l.push("---"),l.push(Ql),process.stdout.write(l.join(`
853
+ }`;function Zl(i,e){let t=new Kl;return t.name("embedoc").version(e,"-V, --version").description("In-place document generator with marker-based embedding."),t.command("init").description("Initialize embedoc in the current project.").option("-f, --force","Overwrite existing files.",!1).action(async(n,r)=>{await i.init(n,r.optsWithGlobals())}),t.command("build").description("Build documents by replacing markers with rendered content.").argument("[files...]","Specific file paths to process. If omitted, processes all targets from config.").option("-c, --config <path>","Path to config file (YAML or JSON).","embedoc.config.yaml").option("-d, --dry-run","Preview changes without writing files.",!1).option("-v, --verbose","Enable verbose output.",!1).action(async(n,r,s)=>{await i.build(n,r,s.optsWithGlobals())}),t.command("generate").description("Generate new files from datasource records using Handlebars templates.").option("-c, --config <path>","Path to config file (YAML or JSON).","embedoc.config.yaml").option("-s, --datasource <name>","Specific datasource to process.").option("-g, --generator <name>","Specific generator template to use.").option("-a, --all","Process all datasources that have generators configured.",!1).option("-d, --dry-run","Preview generation without writing files.",!1).option("-v, --verbose","Enable verbose output.",!1).action(async(n,r)=>{await i.generate(n,r.optsWithGlobals())}),t.command("watch").description("Watch files and rebuild on changes with dependency tracking.").option("-c, --config <path>","Path to config file (YAML or JSON).","embedoc.config.yaml").option("-v, --verbose","Enable verbose rebuild output.",!1).option("--debug-deps","Print dependency graph at startup for debugging.",!1).action(async(n,r)=>{await i.watch(n,r.optsWithGlobals())}),t.command("extract").description("Extract contract specification for this CLI tool.").argument("[commands...]","Command IDs to extract. Use dot notation.").option("-a, --all","Extract all commands.",!1).option("--include-meta","Include extraction metadata.",!0).option("-F, --format <format>","Output format (yaml or json).","yaml").action(async(n,r)=>{n.length===0&&!r.all&&(process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
854
+ `),process.exit(2));let s=r.format||"yaml",o=JSON.parse(Xl),a=r.all?[]:n;if(a.length===0)if(s==="json"){let l={};r.includeMeta&&(l._meta={source:"embedded",type:"cli-contracts/extract",extractedAt:new Date().toISOString(),specVersion:o.cli_contracts??"0.1.0",commands:["embedoc.init","embedoc.build","embedoc.generate","embedoc.watch"]}),Object.assign(l,o),process.stdout.write(JSON.stringify(l,null,2)+`
855
+ `)}else{let l=[];if(l.push("# embedoc extract"),l.push("# source: embedded"),l.push("# type: cli-contracts/command-extract"),r.includeMeta){l.push("---"),l.push("source: embedded"),l.push("type: cli-contracts/command-extract"),l.push("extractedAt: "+new Date().toISOString()),l.push("spec_version: "+(o.cli_contracts??"0.1.0")),l.push("commands:");for(let c of["embedoc.init","embedoc.build","embedoc.generate","embedoc.watch"])l.push(" - "+c)}l.push("---"),l.push(Ql),process.stdout.write(l.join(`
856
856
  `)+`
857
- `)}else{let l={cli_contracts:a.cli_contracts,info:a.info,command_sets:{}},f=l.command_sets;for(let[h,p]of Object.entries(a.command_sets??{})){let m=p.commands;if(!m)continue;let _={};for(let[g,k]of Object.entries(m)){let w=h+"."+g;c.some(S=>S===g||S===w||g.startsWith(S+"."))&&(_[g]=k)}if(Object.keys(_).length>0){let g={...p};g.commands=_,f[h]=g}}a.components&&(l.components=a.components),process.stdout.write(JSON.stringify(l,null,2)+`
858
- `)}process.exit(0)}),t}import Hd from"better-sqlite3";var Si=class{type="sqlite";db;queryString;constructor(e){if(!e.path)throw new Error('SQLite datasource requires "path" configuration');this.db=new Hd(e.path,{readonly:!0}),this.queryString=e.query}async query(e,t=[]){try{return this.db.prepare(e).all(...t)}catch(n){let r=n instanceof Error?n.message:String(n);throw new Error(`SQLite query failed: ${r}`,{cause:n})}}async getAll(){if(!this.queryString)throw new Error("No query defined for this datasource. Use query() method instead.");return this.query(this.queryString)}async close(){this.db.close()}};function Fs(i){return new Si(i)}import{readFile as Yd}from"node:fs/promises";var K=class i extends Error{constructor(e,t,n,...r){Array.isArray(t)&&(t=t.join(" ").trim()),super(t),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,i),this.code=e;for(let s of r)for(let o in s){let a=s[o];this[o]=Buffer.isBuffer(a)?a.toString(n.encoding):a==null?a:JSON.parse(JSON.stringify(a))}}};var ec=function(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)};var xi=function(i){let e=[];for(let t=0,n=i.length;t<n;t++){let r=i[t];if(r==null||r===!1)e[t]={disabled:!0};else if(typeof r=="string")e[t]={name:r};else if(ec(r)){if(typeof r.name!="string")throw new K("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${t}`,"when column is an object literal"]);e[t]=r}else throw new K("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(r)} at position ${t}`])}return e};var Bs=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let t=this.length+e.length;if(t>=this.size&&(this.resize(),t>=this.size))throw Error("INVALID_BUFFER_STATE");let n=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),n.copy(this.buf,e.length),this.length+=e.length}else{let t=this.length++;t===this.size&&this.resize();let n=this.clone();this.buf[0]=e,n.copy(this.buf,1,0,t)}}append(e){let t=this.length++;t===this.size&&this.resize(),this.buf[t]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let t=Buffer.allocUnsafe(this.size);this.buf.copy(t,0,0,e),this.buf=t}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},qs=Bs;var Wd=12,jd=13,Vd=10,Ud=32,Gd=9,tc=function(i){return{bomSkipped:!1,bufBytesStart:0,castField:i.cast_function,commenting:!1,error:void 0,enabled:i.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(i.escape)&&Buffer.isBuffer(i.quote)&&Buffer.compare(i.escape,i.quote)===0,expectedRecordLength:Array.isArray(i.columns)?i.columns.length:void 0,field:new qs(20),firstLineToHeaders:i.cast_first_line_to_header,needMoreDataSize:Math.max(i.comment!==null?i.comment.length:0,...i.delimiter.map(e=>e.length),i.quote!==null?i.quote.length:0),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new qs(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:i.record_delimiter.length===0?0:Math.max(...i.record_delimiter.map(e=>e.length)),trimChars:[Buffer.from(" ",i.encoding)[0],Buffer.from(" ",i.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:[Buffer.from(Buffer.from([jd],"utf8").toString(),i.encoding),Buffer.from(Buffer.from([Vd],"utf8").toString(),i.encoding),Buffer.from(Buffer.from([Wd],"utf8").toString(),i.encoding),Buffer.from(Buffer.from([Ud],"utf8").toString(),i.encoding),Buffer.from(Buffer.from([Gd],"utf8").toString(),i.encoding)]}};var nc=function(i){return i.replace(/([A-Z])/g,function(e,t){return"_"+t.toLowerCase()})};var Hs=function(i){let e={};for(let n in i)e[nc(n)]=i[n];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new K("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new K("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new K("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(n){let r=Date.parse(n);return isNaN(r)?n:new Date(r)};else if(typeof e.cast_date!="function")throw new K("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=null,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=xi(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new K("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new K("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new K("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new K("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new K("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);let t=JSON.stringify(e.delimiter);if(Array.isArray(e.delimiter)||(e.delimiter=[e.delimiter]),e.delimiter.length===0)throw new K("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${t}`],e);if(e.delimiter=e.delimiter.map(function(n){if(n==null||n===!1)return Buffer.from(",",e.encoding);if(typeof n=="string"&&(n=Buffer.from(n,e.encoding)),!Buffer.isBuffer(n)||n.length===0)throw new K("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${t}`],e);return n}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(i.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(i.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(i.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new K("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new K("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new K("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new K("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new K("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(n,r){if(typeof n!="string"&&!Buffer.isBuffer(n))throw new K("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${r},`,`got ${JSON.stringify(n)}`],e);if(n.length===0)throw new K("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${r},`,`got ${JSON.stringify(n)}`],e);return typeof n=="string"&&(n=Buffer.from(n,e.encoding)),n}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&i.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&i.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(i.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(i.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(i.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(i.to_line)}`);return e};var ic=function(i){return i.every(e=>e==null||e.toString&&e.toString().trim()==="")},zd=13,$d=10,jt={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},rc=function(i={}){let e={bytes:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},t=Hs(i);return{info:e,original_options:i,options:t,state:tc(t),__needMoreData:function(n,r,s){if(s)return!1;let{encoding:o,escape:a,quote:c}=this.options,{quoting:l,needMoreDataSize:f,recordDelimiterMaxLength:h}=this.state,p=r-n-1,m=Math.max(f,h===0?Buffer.from(`\r
859
- `,o).length:h,l?(a===null?0:a.length)+c.length:0,l?c.length+h:0);return p<m},parse:function(n,r,s,o){let{bom:a,comment_no_infix:c,encoding:l,from_line:f,ltrim:h,max_record_size:p,raw:m,relax_quotes:_,rtrim:g,skip_empty_lines:k,to:w,to_line:S}=this.options,{comment:P,escape:D,quote:B,record_delimiter:U}=this.options,{bomSkipped:J,previousBuf:he,rawBuffer:le,escapeIsQuote:se}=this.state,G;if(he===void 0)if(n===void 0){o();return}else G=n;else he!==void 0&&n===void 0?G=he:G=Buffer.concat([he,n]);if(J===!1)if(a===!1)this.state.bomSkipped=!0;else if(G.length<3){if(r===!1){this.state.previousBuf=G;return}}else{for(let z in jt)if(jt[z].compare(G,0,jt[z].length)===0){let ge=jt[z].length;this.state.bufBytesStart+=ge,G=G.slice(ge),this.options=Hs({...this.original_options,encoding:z}),{comment:P,escape:D,quote:B}=this.options;break}this.state.bomSkipped=!0}let ce=G.length,V;for(V=0;V<ce&&!this.__needMoreData(V,ce,r);V++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),S!==-1&&this.info.lines>S){this.state.stop=!0,o();return}this.state.quoting===!1&&U.length===0&&this.__autoDiscoverRecordDelimiter(G,V)&&(U=this.options.record_delimiter);let z=G[V];if(m===!0&&le.append(z),(z===zd||z===$d)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(D!==null&&this.state.quoting===!0&&this.__isEscape(G,V,z)&&V+D.length<ce)if(se){if(this.__isQuote(G,V+D.length)){this.state.escaping=!0,V+=D.length-1;continue}}else{this.state.escaping=!0,V+=D.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(G,V))if(this.state.quoting===!0){let te=G[V+B.length],_e=g&&this.__isCharTrimable(G,V+B.length),Ie=P!==null&&this.__compareBytes(P,G,V+B.length,te),Ee=this.__isDelimiter(G,V+B.length,te),gt=U.length===0?this.__autoDiscoverRecordDelimiter(G,V+B.length):this.__isRecordDelimiter(te,G,V+B.length);if(D!==null&&this.__isEscape(G,V,z)&&this.__isQuote(G,V+D.length))V+=D.length-1;else if(!te||Ee||gt||Ie||_e){this.state.quoting=!1,this.state.wasQuoting=!0,V+=B.length-1;continue}else if(_===!1){let _t=this.__error(new K("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(te)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(_t!==void 0)return _t}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(B),V+=B.length-1}else if(this.state.field.length!==0){if(_===!1){let te=this.__infoField(),_e=Object.keys(jt).map(Ee=>jt[Ee].equals(this.state.field.toString())?Ee:!1).filter(Boolean)[0],Ie=this.__error(new K("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(te.column)} at line ${te.lines}, value is ${JSON.stringify(this.state.field.toString(l))}`,_e?`(${_e} bom)`:void 0],this.options,te,{field:this.state.field}));if(Ie!==void 0)return Ie}}else{this.state.quoting=!0,V+=B.length-1;continue}if(this.state.quoting===!1){let te=this.__isRecordDelimiter(z,G,V);if(te!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=f){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),V+=te-1;continue}if(k===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,V+=te-1;continue}this.info.bytes=this.state.bufBytesStart+V;let Ee=this.__onField();if(Ee!==void 0)return Ee;this.info.bytes=this.state.bufBytesStart+V+te;let gt=this.__onRecord(s);if(gt!==void 0)return gt;if(w!==-1&&this.info.records>=w){this.state.stop=!0,o();return}}this.state.commenting=!1,V+=te-1;continue}if(this.state.commenting)continue;if(P!==null&&(c===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(P,G,V,z)!==0){this.state.commenting=!0;continue}let _e=this.__isDelimiter(G,V,z);if(_e!==0){this.info.bytes=this.state.bufBytesStart+V;let Ie=this.__onField();if(Ie!==void 0)return Ie;V+=_e-1;continue}}}if(this.state.commenting===!1&&p!==0&&this.state.record_length+this.state.field.length>p)return this.__error(new K("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${p}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let ge=h===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(G,V),T=g===!1||this.state.wasQuoting===!1;if(ge===!0&&T===!0)this.state.field.append(z);else{if(g===!0&&!this.__isCharTrimable(G,V))return this.__error(new K("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()));ge===!1&&(V+=this.__isCharTrimable(G,V)-1);continue}}if(r===!0)if(this.state.quoting===!0){let z=this.__error(new K("CSV_QUOTE_NOT_CLOSED",["Quote Not Closed:",`the parsing is finished with an opening quote at line ${this.info.lines}`],this.options,this.__infoField()));if(z!==void 0)return z}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+V;let z=this.__onField();if(z!==void 0)return z;let ge=this.__onRecord(s);if(ge!==void 0)return ge}else this.state.wasRowDelimiter===!0?this.info.empty_lines++:this.state.commenting===!0&&this.info.comment_lines++;else this.state.bufBytesStart+=V,this.state.previousBuf=G.slice(V);this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1)},__onRecord:function(n){let{columns:r,group_columns_by_name:s,encoding:o,info:a,from:c,relax_column_count:l,relax_column_count_less:f,relax_column_count_more:h,raw:p,skip_records_with_empty_values:m}=this.options,{enabled:_,record:g}=this.state;if(_===!1)return this.__resetRecord();let k=g.length;if(r===!0){if(m===!0&&ic(g)){this.__resetRecord();return}return this.__firstLineToColumns(g)}if(r===!1&&this.info.records===0&&(this.state.expectedRecordLength=k),k!==this.state.expectedRecordLength){let w=r===!1?new K("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${k} on line ${this.info.lines}`],this.options,this.__infoField(),{record:g}):new K("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${r.length},`,`got ${k} on line ${this.info.lines}`],this.options,this.__infoField(),{record:g});if(l===!0||f===!0&&k<this.state.expectedRecordLength||h===!0&&k>this.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=w;else{let S=this.__error(w);if(S)return S}}if(m===!0&&ic(g)){this.__resetRecord();return}if(this.state.recordHasError===!0){this.__resetRecord(),this.state.recordHasError=!1;return}if(this.info.records++,c===1||this.info.records>=c){let{objname:w}=this.options;if(r!==!1){let S={};for(let P=0,D=g.length;P<D;P++)r[P]===void 0||r[P].disabled||(s===!0&&S[r[P].name]!==void 0?Array.isArray(S[r[P].name])?S[r[P].name]=S[r[P].name].concat(g[P]):S[r[P].name]=[S[r[P].name],g[P]]:S[r[P].name]=g[P]);if(p===!0||a===!0){let P=Object.assign({record:S},p===!0?{raw:this.state.rawBuffer.toString(o)}:{},a===!0?{info:this.__infoRecord()}:{}),D=this.__push(w===void 0?P:[S[w],P],n);if(D)return D}else{let P=this.__push(w===void 0?S:[S[w],S],n);if(P)return P}}else if(p===!0||a===!0){let S=Object.assign({record:g},p===!0?{raw:this.state.rawBuffer.toString(o)}:{},a===!0?{info:this.__infoRecord()}:{}),P=this.__push(w===void 0?S:[g[w],S],n);if(P)return P}else{let S=this.__push(w===void 0?g:[g[w],g],n);if(S)return S}}this.__resetRecord()},__firstLineToColumns:function(n){let{firstLineToHeaders:r}=this.state;try{let s=r===void 0?n:r.call(null,n);if(!Array.isArray(s))return this.__error(new K("CSV_INVALID_COLUMN_MAPPING",["Invalid Column Mapping:","expect an array from column function,",`got ${JSON.stringify(s)}`],this.options,this.__infoField(),{headers:s}));let o=xi(s);this.state.expectedRecordLength=o.length,this.options.columns=o,this.__resetRecord();return}catch(s){return s}},__resetRecord:function(){this.options.raw===!0&&this.state.rawBuffer.reset(),this.state.error=void 0,this.state.record=[],this.state.record_length=0},__onField:function(){let{cast:n,encoding:r,rtrim:s,max_record_size:o}=this.options,{enabled:a,wasQuoting:c}=this.state;if(a===!1)return this.__resetField();let l=this.state.field.toString(r);if(s===!0&&c===!1&&(l=l.trimRight()),n===!0){let[f,h]=this.__cast(l);if(f!==void 0)return f;l=h}this.state.record.push(l),o!==0&&typeof l=="string"&&(this.state.record_length+=l.length),this.__resetField()},__resetField:function(){this.state.field.reset(),this.state.wasQuoting=!1},__push:function(n,r){let{on_record:s}=this.options;if(s!==void 0){let o=this.__infoRecord();try{n=s.call(null,n,o)}catch(a){return a}if(n==null)return}r(n)},__cast:function(n){let{columns:r,relax_column_count:s}=this.options;if(Array.isArray(r)===!0&&s&&this.options.columns.length<=this.state.record.length)return[void 0,void 0];if(this.state.castField!==null)try{let a=this.__infoField();return[void 0,this.state.castField.call(null,n,a)]}catch(a){return[a]}if(this.__isFloat(n))return[void 0,parseFloat(n)];if(this.options.cast_date!==!1){let a=this.__infoField();return[void 0,this.options.cast_date.call(null,n,a)]}return[void 0,n]},__isCharTrimable:function(n,r){return((o,a)=>{let{timchars:c}=this.state;e:for(let l=0;l<c.length;l++){let f=c[l];for(let h=0;h<f.length;h++)if(f[h]!==o[a+h])continue e;return f.length}return 0})(n,r)},__isFloat:function(n){return n-parseFloat(n)+1>=0},__compareBytes:function(n,r,s,o){if(n[0]!==o)return 0;let a=n.length;for(let c=1;c<a;c++)if(n[c]!==r[s+c])return 0;return a},__isDelimiter:function(n,r,s){let{delimiter:o,ignore_last_delimiters:a}=this.options;if(a===!0&&this.state.record.length===this.options.columns.length-1)return 0;if(a!==!1&&typeof a=="number"&&this.state.record.length===a-1)return 0;e:for(let c=0;c<o.length;c++){let l=o[c];if(l[0]===s){for(let f=1;f<l.length;f++)if(l[f]!==n[r+f])continue e;return l.length}}return 0},__isRecordDelimiter:function(n,r,s){let{record_delimiter:o}=this.options,a=o.length;e:for(let c=0;c<a;c++){let l=o[c],f=l.length;if(l[0]===n){for(let h=1;h<f;h++)if(l[h]!==r[s+h])continue e;return l.length}}return 0},__isEscape:function(n,r,s){let{escape:o}=this.options;if(o===null)return!1;let a=o.length;if(o[0]===s){for(let c=0;c<a;c++)if(o[c]!==n[r+c])return!1;return!0}return!1},__isQuote:function(n,r){let{quote:s}=this.options;if(s===null)return!1;let o=s.length;for(let a=0;a<o;a++)if(s[a]!==n[r+a])return!1;return!0},__autoDiscoverRecordDelimiter:function(n,r){let{encoding:s}=this.options,o=[Buffer.from(`\r
857
+ `)}else{let l={cli_contracts:o.cli_contracts,info:o.info,command_sets:{}},c=l.command_sets;for(let[f,h]of Object.entries(o.command_sets??{})){let p=h.commands;if(!p)continue;let m={};for(let[_,g]of Object.entries(p)){let k=f+"."+_;a.some(w=>w===_||w===k||_.startsWith(w+"."))&&(m[_]=g)}if(Object.keys(m).length>0){let _={...h};_.commands=m,c[f]=_}}o.components&&(l.components=o.components),process.stdout.write(JSON.stringify(l,null,2)+`
858
+ `)}process.exit(0)}),t}import Hd from"better-sqlite3";var Si=class{type="sqlite";db;queryString;constructor(e){if(!e.path)throw new Error('SQLite datasource requires "path" configuration');this.db=new Hd(e.path,{readonly:!0}),this.queryString=e.query}async query(e,t=[]){try{return this.db.prepare(e).all(...t)}catch(n){let r=n instanceof Error?n.message:String(n);throw new Error(`SQLite query failed: ${r}`,{cause:n})}}async getAll(){if(!this.queryString)throw new Error("No query defined for this datasource. Use query() method instead.");return this.query(this.queryString)}async close(){this.db.close()}};function Fs(i){return new Si(i)}import{readFile as Yd}from"node:fs/promises";var K=class i extends Error{constructor(e,t,n,...r){Array.isArray(t)&&(t=t.join(" ").trim()),super(t),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,i),this.code=e;for(let s of r)for(let o in s){let a=s[o];this[o]=Buffer.isBuffer(a)?a.toString(n.encoding):a==null?a:JSON.parse(JSON.stringify(a))}}};var ec=function(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)};var xi=function(i){let e=[];for(let t=0,n=i.length;t<n;t++){let r=i[t];if(r==null||r===!1)e[t]={disabled:!0};else if(typeof r=="string")e[t]={name:r};else if(ec(r)){if(typeof r.name!="string")throw new K("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${t}`,"when column is an object literal"]);e[t]=r}else throw new K("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(r)} at position ${t}`])}return e};var Bs=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let t=this.length+e.length;if(t>=this.size&&(this.resize(),t>=this.size))throw Error("INVALID_BUFFER_STATE");let n=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),n.copy(this.buf,e.length),this.length+=e.length}else{let t=this.length++;t===this.size&&this.resize();let n=this.clone();this.buf[0]=e,n.copy(this.buf,1,0,t)}}append(e){let t=this.length++;t===this.size&&this.resize(),this.buf[t]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let t=Buffer.allocUnsafe(this.size);this.buf.copy(t,0,0,e),this.buf=t}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},qs=Bs;var Wd=12,jd=13,Vd=10,Ud=32,Gd=9,tc=function(i){return{bomSkipped:!1,bufBytesStart:0,castField:i.cast_function,commenting:!1,error:void 0,enabled:i.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(i.escape)&&Buffer.isBuffer(i.quote)&&Buffer.compare(i.escape,i.quote)===0,expectedRecordLength:Array.isArray(i.columns)?i.columns.length:void 0,field:new qs(20),firstLineToHeaders:i.cast_first_line_to_header,needMoreDataSize:Math.max(i.comment!==null?i.comment.length:0,...i.delimiter.map(e=>e.length),i.quote!==null?i.quote.length:0),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new qs(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:i.record_delimiter.length===0?0:Math.max(...i.record_delimiter.map(e=>e.length)),trimChars:[Buffer.from(" ",i.encoding)[0],Buffer.from(" ",i.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:[Buffer.from(Buffer.from([jd],"utf8").toString(),i.encoding),Buffer.from(Buffer.from([Vd],"utf8").toString(),i.encoding),Buffer.from(Buffer.from([Wd],"utf8").toString(),i.encoding),Buffer.from(Buffer.from([Ud],"utf8").toString(),i.encoding),Buffer.from(Buffer.from([Gd],"utf8").toString(),i.encoding)]}};var nc=function(i){return i.replace(/([A-Z])/g,function(e,t){return"_"+t.toLowerCase()})};var Hs=function(i){let e={};for(let n in i)e[nc(n)]=i[n];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new K("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new K("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new K("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(n){let r=Date.parse(n);return isNaN(r)?n:new Date(r)};else if(typeof e.cast_date!="function")throw new K("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=null,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=xi(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new K("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new K("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new K("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new K("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new K("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);let t=JSON.stringify(e.delimiter);if(Array.isArray(e.delimiter)||(e.delimiter=[e.delimiter]),e.delimiter.length===0)throw new K("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${t}`],e);if(e.delimiter=e.delimiter.map(function(n){if(n==null||n===!1)return Buffer.from(",",e.encoding);if(typeof n=="string"&&(n=Buffer.from(n,e.encoding)),!Buffer.isBuffer(n)||n.length===0)throw new K("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${t}`],e);return n}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(i.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(i.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(i.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new K("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new K("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new K("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new K("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new K("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(n,r){if(typeof n!="string"&&!Buffer.isBuffer(n))throw new K("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${r},`,`got ${JSON.stringify(n)}`],e);if(n.length===0)throw new K("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${r},`,`got ${JSON.stringify(n)}`],e);return typeof n=="string"&&(n=Buffer.from(n,e.encoding)),n}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&i.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&i.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(i.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(i.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(i.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(i.to_line)}`);return e};var ic=function(i){return i.every(e=>e==null||e.toString&&e.toString().trim()==="")},zd=13,$d=10,jt={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},rc=function(i={}){let e={bytes:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},t=Hs(i);return{info:e,original_options:i,options:t,state:tc(t),__needMoreData:function(n,r,s){if(s)return!1;let{encoding:o,escape:a,quote:l}=this.options,{quoting:c,needMoreDataSize:f,recordDelimiterMaxLength:h}=this.state,p=r-n-1,m=Math.max(f,h===0?Buffer.from(`\r
859
+ `,o).length:h,c?(a===null?0:a.length)+l.length:0,c?l.length+h:0);return p<m},parse:function(n,r,s,o){let{bom:a,comment_no_infix:l,encoding:c,from_line:f,ltrim:h,max_record_size:p,raw:m,relax_quotes:_,rtrim:g,skip_empty_lines:k,to:w,to_line:S}=this.options,{comment:P,escape:D,quote:B,record_delimiter:U}=this.options,{bomSkipped:J,previousBuf:he,rawBuffer:le,escapeIsQuote:se}=this.state,G;if(he===void 0)if(n===void 0){o();return}else G=n;else he!==void 0&&n===void 0?G=he:G=Buffer.concat([he,n]);if(J===!1)if(a===!1)this.state.bomSkipped=!0;else if(G.length<3){if(r===!1){this.state.previousBuf=G;return}}else{for(let z in jt)if(jt[z].compare(G,0,jt[z].length)===0){let ge=jt[z].length;this.state.bufBytesStart+=ge,G=G.slice(ge),this.options=Hs({...this.original_options,encoding:z}),{comment:P,escape:D,quote:B}=this.options;break}this.state.bomSkipped=!0}let ce=G.length,V;for(V=0;V<ce&&!this.__needMoreData(V,ce,r);V++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),S!==-1&&this.info.lines>S){this.state.stop=!0,o();return}this.state.quoting===!1&&U.length===0&&this.__autoDiscoverRecordDelimiter(G,V)&&(U=this.options.record_delimiter);let z=G[V];if(m===!0&&le.append(z),(z===zd||z===$d)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(D!==null&&this.state.quoting===!0&&this.__isEscape(G,V,z)&&V+D.length<ce)if(se){if(this.__isQuote(G,V+D.length)){this.state.escaping=!0,V+=D.length-1;continue}}else{this.state.escaping=!0,V+=D.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(G,V))if(this.state.quoting===!0){let te=G[V+B.length],_e=g&&this.__isCharTrimable(G,V+B.length),Ie=P!==null&&this.__compareBytes(P,G,V+B.length,te),Ee=this.__isDelimiter(G,V+B.length,te),gt=U.length===0?this.__autoDiscoverRecordDelimiter(G,V+B.length):this.__isRecordDelimiter(te,G,V+B.length);if(D!==null&&this.__isEscape(G,V,z)&&this.__isQuote(G,V+D.length))V+=D.length-1;else if(!te||Ee||gt||Ie||_e){this.state.quoting=!1,this.state.wasQuoting=!0,V+=B.length-1;continue}else if(_===!1){let _t=this.__error(new K("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(te)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(_t!==void 0)return _t}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(B),V+=B.length-1}else if(this.state.field.length!==0){if(_===!1){let te=this.__infoField(),_e=Object.keys(jt).map(Ee=>jt[Ee].equals(this.state.field.toString())?Ee:!1).filter(Boolean)[0],Ie=this.__error(new K("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(te.column)} at line ${te.lines}, value is ${JSON.stringify(this.state.field.toString(c))}`,_e?`(${_e} bom)`:void 0],this.options,te,{field:this.state.field}));if(Ie!==void 0)return Ie}}else{this.state.quoting=!0,V+=B.length-1;continue}if(this.state.quoting===!1){let te=this.__isRecordDelimiter(z,G,V);if(te!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=f){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),V+=te-1;continue}if(k===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,V+=te-1;continue}this.info.bytes=this.state.bufBytesStart+V;let Ee=this.__onField();if(Ee!==void 0)return Ee;this.info.bytes=this.state.bufBytesStart+V+te;let gt=this.__onRecord(s);if(gt!==void 0)return gt;if(w!==-1&&this.info.records>=w){this.state.stop=!0,o();return}}this.state.commenting=!1,V+=te-1;continue}if(this.state.commenting)continue;if(P!==null&&(l===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(P,G,V,z)!==0){this.state.commenting=!0;continue}let _e=this.__isDelimiter(G,V,z);if(_e!==0){this.info.bytes=this.state.bufBytesStart+V;let Ie=this.__onField();if(Ie!==void 0)return Ie;V+=_e-1;continue}}}if(this.state.commenting===!1&&p!==0&&this.state.record_length+this.state.field.length>p)return this.__error(new K("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${p}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let ge=h===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(G,V),T=g===!1||this.state.wasQuoting===!1;if(ge===!0&&T===!0)this.state.field.append(z);else{if(g===!0&&!this.__isCharTrimable(G,V))return this.__error(new K("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()));ge===!1&&(V+=this.__isCharTrimable(G,V)-1);continue}}if(r===!0)if(this.state.quoting===!0){let z=this.__error(new K("CSV_QUOTE_NOT_CLOSED",["Quote Not Closed:",`the parsing is finished with an opening quote at line ${this.info.lines}`],this.options,this.__infoField()));if(z!==void 0)return z}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+V;let z=this.__onField();if(z!==void 0)return z;let ge=this.__onRecord(s);if(ge!==void 0)return ge}else this.state.wasRowDelimiter===!0?this.info.empty_lines++:this.state.commenting===!0&&this.info.comment_lines++;else this.state.bufBytesStart+=V,this.state.previousBuf=G.slice(V);this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1)},__onRecord:function(n){let{columns:r,group_columns_by_name:s,encoding:o,info:a,from:l,relax_column_count:c,relax_column_count_less:f,relax_column_count_more:h,raw:p,skip_records_with_empty_values:m}=this.options,{enabled:_,record:g}=this.state;if(_===!1)return this.__resetRecord();let k=g.length;if(r===!0){if(m===!0&&ic(g)){this.__resetRecord();return}return this.__firstLineToColumns(g)}if(r===!1&&this.info.records===0&&(this.state.expectedRecordLength=k),k!==this.state.expectedRecordLength){let w=r===!1?new K("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${k} on line ${this.info.lines}`],this.options,this.__infoField(),{record:g}):new K("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${r.length},`,`got ${k} on line ${this.info.lines}`],this.options,this.__infoField(),{record:g});if(c===!0||f===!0&&k<this.state.expectedRecordLength||h===!0&&k>this.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=w;else{let S=this.__error(w);if(S)return S}}if(m===!0&&ic(g)){this.__resetRecord();return}if(this.state.recordHasError===!0){this.__resetRecord(),this.state.recordHasError=!1;return}if(this.info.records++,l===1||this.info.records>=l){let{objname:w}=this.options;if(r!==!1){let S={};for(let P=0,D=g.length;P<D;P++)r[P]===void 0||r[P].disabled||(s===!0&&S[r[P].name]!==void 0?Array.isArray(S[r[P].name])?S[r[P].name]=S[r[P].name].concat(g[P]):S[r[P].name]=[S[r[P].name],g[P]]:S[r[P].name]=g[P]);if(p===!0||a===!0){let P=Object.assign({record:S},p===!0?{raw:this.state.rawBuffer.toString(o)}:{},a===!0?{info:this.__infoRecord()}:{}),D=this.__push(w===void 0?P:[S[w],P],n);if(D)return D}else{let P=this.__push(w===void 0?S:[S[w],S],n);if(P)return P}}else if(p===!0||a===!0){let S=Object.assign({record:g},p===!0?{raw:this.state.rawBuffer.toString(o)}:{},a===!0?{info:this.__infoRecord()}:{}),P=this.__push(w===void 0?S:[g[w],S],n);if(P)return P}else{let S=this.__push(w===void 0?g:[g[w],g],n);if(S)return S}}this.__resetRecord()},__firstLineToColumns:function(n){let{firstLineToHeaders:r}=this.state;try{let s=r===void 0?n:r.call(null,n);if(!Array.isArray(s))return this.__error(new K("CSV_INVALID_COLUMN_MAPPING",["Invalid Column Mapping:","expect an array from column function,",`got ${JSON.stringify(s)}`],this.options,this.__infoField(),{headers:s}));let o=xi(s);this.state.expectedRecordLength=o.length,this.options.columns=o,this.__resetRecord();return}catch(s){return s}},__resetRecord:function(){this.options.raw===!0&&this.state.rawBuffer.reset(),this.state.error=void 0,this.state.record=[],this.state.record_length=0},__onField:function(){let{cast:n,encoding:r,rtrim:s,max_record_size:o}=this.options,{enabled:a,wasQuoting:l}=this.state;if(a===!1)return this.__resetField();let c=this.state.field.toString(r);if(s===!0&&l===!1&&(c=c.trimRight()),n===!0){let[f,h]=this.__cast(c);if(f!==void 0)return f;c=h}this.state.record.push(c),o!==0&&typeof c=="string"&&(this.state.record_length+=c.length),this.__resetField()},__resetField:function(){this.state.field.reset(),this.state.wasQuoting=!1},__push:function(n,r){let{on_record:s}=this.options;if(s!==void 0){let o=this.__infoRecord();try{n=s.call(null,n,o)}catch(a){return a}if(n==null)return}r(n)},__cast:function(n){let{columns:r,relax_column_count:s}=this.options;if(Array.isArray(r)===!0&&s&&this.options.columns.length<=this.state.record.length)return[void 0,void 0];if(this.state.castField!==null)try{let a=this.__infoField();return[void 0,this.state.castField.call(null,n,a)]}catch(a){return[a]}if(this.__isFloat(n))return[void 0,parseFloat(n)];if(this.options.cast_date!==!1){let a=this.__infoField();return[void 0,this.options.cast_date.call(null,n,a)]}return[void 0,n]},__isCharTrimable:function(n,r){return((o,a)=>{let{timchars:l}=this.state;e:for(let c=0;c<l.length;c++){let f=l[c];for(let h=0;h<f.length;h++)if(f[h]!==o[a+h])continue e;return f.length}return 0})(n,r)},__isFloat:function(n){return n-parseFloat(n)+1>=0},__compareBytes:function(n,r,s,o){if(n[0]!==o)return 0;let a=n.length;for(let l=1;l<a;l++)if(n[l]!==r[s+l])return 0;return a},__isDelimiter:function(n,r,s){let{delimiter:o,ignore_last_delimiters:a}=this.options;if(a===!0&&this.state.record.length===this.options.columns.length-1)return 0;if(a!==!1&&typeof a=="number"&&this.state.record.length===a-1)return 0;e:for(let l=0;l<o.length;l++){let c=o[l];if(c[0]===s){for(let f=1;f<c.length;f++)if(c[f]!==n[r+f])continue e;return c.length}}return 0},__isRecordDelimiter:function(n,r,s){let{record_delimiter:o}=this.options,a=o.length;e:for(let l=0;l<a;l++){let c=o[l],f=c.length;if(c[0]===n){for(let h=1;h<f;h++)if(c[h]!==r[s+h])continue e;return c.length}}return 0},__isEscape:function(n,r,s){let{escape:o}=this.options;if(o===null)return!1;let a=o.length;if(o[0]===s){for(let l=0;l<a;l++)if(o[l]!==n[r+l])return!1;return!0}return!1},__isQuote:function(n,r){let{quote:s}=this.options;if(s===null)return!1;let o=s.length;for(let a=0;a<o;a++)if(s[a]!==n[r+a])return!1;return!0},__autoDiscoverRecordDelimiter:function(n,r){let{encoding:s}=this.options,o=[Buffer.from(`\r
860
860
  `,s),Buffer.from(`
861
- `,s),Buffer.from("\r",s)];e:for(let a=0;a<o.length;a++){let c=o[a].length;for(let l=0;l<c;l++)if(o[a][l]!==n[r+l])continue e;return this.options.record_delimiter.push(o[a]),this.state.recordDelimiterMaxLength=o[a].length,o[a].length}return 0},__error:function(n){let{encoding:r,raw:s,skip_records_with_error:o}=this.options,a=typeof n=="string"?new Error(n):n;if(o){this.state.recordHasError=!0,this.options.on_skip!==void 0&&this.options.on_skip(a,s?this.state.rawBuffer.toString(r):void 0);return}else return a},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){let{columns:n,raw:r,encoding:s}=this.options;return{...this.__infoDataSet(),error:this.state.error,header:n===!0,index:this.state.record.length,raw:r?this.state.rawBuffer.toString(s):void 0}},__infoField:function(){let{columns:n}=this.options,r=Array.isArray(n);return{...this.__infoRecord(),column:r===!0?n.length>this.state.record.length?n[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var sc=function(i,e={}){typeof i=="string"&&(i=Buffer.from(i));let t=e&&e.objname?{}:[],n=rc(e),r=c=>{n.options.objname===void 0?t.push(c):t[c[0]]=c[1]},s=()=>{},o=n.parse(i,!1,r,s);if(o!==void 0)throw o;let a=n.parse(void 0,!0,r,s);if(a!==void 0)throw a;return t};var Ei=class{type="csv";data=null;filePath;encoding;constructor(e){if(!e.path)throw new Error('CSV datasource requires "path" configuration');this.filePath=e.path,this.encoding=e.encoding??"utf-8"}async loadData(){if(this.data!==null)return this.data;let e=await Yd(this.filePath,{encoding:this.encoding}),t=sc(e,{columns:!0,skip_empty_lines:!0,trim:!0});return this.data=t,this.data}async query(e,t=[]){let n=await this.loadData(),r=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(r&&t.length>0){let s=r[1],o=t[0];return n.filter(a=>String(a[s??""])===String(o))}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function Ws(i){return new Ei(i)}import{readFile as Jd}from"node:fs/promises";var Ci=class{type="json";data=null;filePath;constructor(e){if(!e.path)throw new Error('JSON datasource requires "path" configuration');this.filePath=e.path}async loadData(){if(this.data!==null)return this.data;let e=await Jd(this.filePath,{encoding:"utf-8"}),t=JSON.parse(e);if(Array.isArray(t))this.data=t;else if(typeof t=="object"&&t!==null)this.data=[t];else throw new Error("JSON file must contain an array or object");return this.data}async query(e,t=[]){let n=await this.loadData(),r=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(r&&t.length>0){let s=r[1],o=t[0];return n.filter(a=>{let c=a[s??""];return c===o||String(c)===String(o)})}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function js(i){return new Ci(i)}import{readFile as Kd}from"node:fs/promises";var ki=class{type="yaml";data=null;filePath;constructor(e){if(!e.path)throw new Error('YAML datasource requires "path" configuration');this.filePath=e.path}async loadData(){if(this.data!==null)return this.data;let e=await Kd(this.filePath,{encoding:"utf-8"}),t=Xe.load(e);if(Array.isArray(t))this.data=t;else if(typeof t=="object"&&t!==null)this.data=[t];else throw new Error("YAML file must contain an array or object");return this.data}async query(e,t=[]){let n=await this.loadData(),r=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(r&&t.length>0){let s=r[1],o=t[0];return n.filter(a=>{let c=a[s??""];return c===o||String(c)===String(o)})}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function Vs(i){return new ki(i)}Nn();import{stat as Wm}from"node:fs/promises";import{basename as lu,dirname as jm,extname as Vm}from"node:path";var Gi=class{type="glob";data=null;pattern;constructor(e){if(!e.pattern)throw new Error('Glob datasource requires "pattern" configuration');this.pattern=e.pattern}async loadData(){if(this.data!==null)return this.data;let e=await ft(this.pattern,{nodir:!0}),t=[];for(let n of e)try{let r=await Wm(n),s=Vm(n);t.push({path:n,name:lu(n),basename:lu(n,s),ext:s.slice(1),dir:jm(n),size:r.size,mtime:r.mtime.toISOString()})}catch{continue}return this.data=t,this.data}async query(e,t=[]){let n=await this.loadData(),r=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(r&&t.length>0){let s=r[1],o=t[0];return n.filter(a=>{let c=a[s??""];return c===o||String(c)===String(o)})}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function So(i){return new Gi(i)}async function Um(i,e){if(e&&i.type in e)return e[i.type].create(i);switch(i.type){case"sqlite":return Fs(i);case"csv":return Ws(i);case"json":return js(i);case"yaml":return Vs(i);case"glob":return So(i);default:throw new Error(`Unknown datasource type: "${i.type}". Register custom types in datasources_dir.`)}}async function Mn(i,e){let t={};if(i.datasources)for(let[n,r]of Object.entries(i.datasources))t[n]=await Um(r,e);return t}async function Fn(i){for(let e of Object.values(i))await e.close()}Nn();import{readFile as Qm,writeFile as Xm}from"node:fs/promises";var Gm={html:{start:"<!--",end:"-->"},block:{start:"/*",end:"*/"},line:{start:"//",end:""},hash:{start:"#",end:""},sql:{start:"--",end:""}};function uu(i){let e={},t=/(\w+)=["']([^"']*)["']/g,n;for(;(n=t.exec(i))!==null;){let r=n[1],s=n[2];r&&s!==void 0&&(e[r]=s)}return e}function $i(i){let e=i.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);if(!e)return{data:{},content:i,raw:""};let t=e[1]??"",n=Xe.load(t),r=n&&typeof n=="object"&&!Array.isArray(n)?n:{},s=i.slice(e[0].length).replace(/^\n+/,""),o=`---
861
+ `,s),Buffer.from("\r",s)];e:for(let a=0;a<o.length;a++){let l=o[a].length;for(let c=0;c<l;c++)if(o[a][c]!==n[r+c])continue e;return this.options.record_delimiter.push(o[a]),this.state.recordDelimiterMaxLength=o[a].length,o[a].length}return 0},__error:function(n){let{encoding:r,raw:s,skip_records_with_error:o}=this.options,a=typeof n=="string"?new Error(n):n;if(o){this.state.recordHasError=!0,this.options.on_skip!==void 0&&this.options.on_skip(a,s?this.state.rawBuffer.toString(r):void 0);return}else return a},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){let{columns:n,raw:r,encoding:s}=this.options;return{...this.__infoDataSet(),error:this.state.error,header:n===!0,index:this.state.record.length,raw:r?this.state.rawBuffer.toString(s):void 0}},__infoField:function(){let{columns:n}=this.options,r=Array.isArray(n);return{...this.__infoRecord(),column:r===!0?n.length>this.state.record.length?n[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var sc=function(i,e={}){typeof i=="string"&&(i=Buffer.from(i));let t=e&&e.objname?{}:[],n=rc(e),r=l=>{n.options.objname===void 0?t.push(l):t[l[0]]=l[1]},s=()=>{},o=n.parse(i,!1,r,s);if(o!==void 0)throw o;let a=n.parse(void 0,!0,r,s);if(a!==void 0)throw a;return t};var Ei=class{type="csv";data=null;filePath;encoding;constructor(e){if(!e.path)throw new Error('CSV datasource requires "path" configuration');this.filePath=e.path,this.encoding=e.encoding??"utf-8"}async loadData(){if(this.data!==null)return this.data;let e=await Yd(this.filePath,{encoding:this.encoding}),t=sc(e,{columns:!0,skip_empty_lines:!0,trim:!0});return this.data=t,this.data}async query(e,t=[]){let n=await this.loadData(),r=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(r&&t.length>0){let s=r[1],o=t[0];return n.filter(a=>String(a[s??""])===String(o))}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function Ws(i){return new Ei(i)}import{readFile as Jd}from"node:fs/promises";var Ci=class{type="json";data=null;filePath;constructor(e){if(!e.path)throw new Error('JSON datasource requires "path" configuration');this.filePath=e.path}async loadData(){if(this.data!==null)return this.data;let e=await Jd(this.filePath,{encoding:"utf-8"}),t=JSON.parse(e);if(Array.isArray(t))this.data=t;else if(typeof t=="object"&&t!==null)this.data=[t];else throw new Error("JSON file must contain an array or object");return this.data}async query(e,t=[]){let n=await this.loadData(),r=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(r&&t.length>0){let s=r[1],o=t[0];return n.filter(a=>{let l=a[s??""];return l===o||String(l)===String(o)})}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function js(i){return new Ci(i)}import{readFile as Kd}from"node:fs/promises";var ki=class{type="yaml";data=null;filePath;constructor(e){if(!e.path)throw new Error('YAML datasource requires "path" configuration');this.filePath=e.path}async loadData(){if(this.data!==null)return this.data;let e=await Kd(this.filePath,{encoding:"utf-8"}),t=Xe.load(e);if(Array.isArray(t))this.data=t;else if(typeof t=="object"&&t!==null)this.data=[t];else throw new Error("YAML file must contain an array or object");return this.data}async query(e,t=[]){let n=await this.loadData(),r=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(r&&t.length>0){let s=r[1],o=t[0];return n.filter(a=>{let l=a[s??""];return l===o||String(l)===String(o)})}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function Vs(i){return new ki(i)}Nn();import{stat as Wm}from"node:fs/promises";import{basename as lu,dirname as jm,extname as Vm}from"node:path";var Gi=class{type="glob";data=null;pattern;constructor(e){if(!e.pattern)throw new Error('Glob datasource requires "pattern" configuration');this.pattern=e.pattern}async loadData(){if(this.data!==null)return this.data;let e=await ft(this.pattern,{nodir:!0}),t=[];for(let n of e)try{let r=await Wm(n),s=Vm(n);t.push({path:n,name:lu(n),basename:lu(n,s),ext:s.slice(1),dir:jm(n),size:r.size,mtime:r.mtime.toISOString()})}catch{continue}return this.data=t,this.data}async query(e,t=[]){let n=await this.loadData(),r=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(r&&t.length>0){let s=r[1],o=t[0];return n.filter(a=>{let l=a[s??""];return l===o||String(l)===String(o)})}return n}async getAll(){return this.loadData()}async close(){this.data=null}};function So(i){return new Gi(i)}async function Um(i,e){if(e&&i.type in e)return e[i.type].create(i);switch(i.type){case"sqlite":return Fs(i);case"csv":return Ws(i);case"json":return js(i);case"yaml":return Vs(i);case"glob":return So(i);default:throw new Error(`Unknown datasource type: "${i.type}". Register custom types in datasources_dir.`)}}async function Mn(i,e){let t={};if(i.datasources)for(let[n,r]of Object.entries(i.datasources))t[n]=await Um(r,e);return t}async function Fn(i){for(let e of Object.values(i))await e.close()}Nn();import{readFile as Qm,writeFile as Xm}from"node:fs/promises";var Gm={html:{start:"<!--",end:"-->"},block:{start:"/*",end:"*/"},line:{start:"//",end:""},hash:{start:"#",end:""},sql:{start:"--",end:""}};function uu(i){let e={},t=/(\w+)=["']([^"']*)["']/g,n;for(;(n=t.exec(i))!==null;){let r=n[1],s=n[2];r&&s!==void 0&&(e[r]=s)}return e}function $i(i){let e=i.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);if(!e)return{data:{},content:i,raw:""};let t=e[1]??"",n=Xe.load(t),r=n&&typeof n=="object"&&!Array.isArray(n)?n:{},s=i.slice(e[0].length).replace(/^\n+/,""),o=`---
862
862
  ${t.trim()}
863
863
  ---
864
- `;return{data:r,content:s,raw:o}}function Yi(i,e){let t=[],{start:n,end:r}=e,s=zi(n),o=r?zi(r):"",a;r?a=new RegExp(`${s}\\s*@embedoc:(?!end\\b)(\\w+)\\s*([^]*?)\\s*${o}`,"g"):a=new RegExp(`${s}\\s*@embedoc:(?!end\\b)(\\w+)\\s*(.*)$`,"gm");let c;r?c=new RegExp(`${s}\\s*@embedoc:end\\s*${o}`):c=new RegExp(`${s}\\s*@embedoc:end\\s*$`,"m");let l;for(;(l=a.exec(i))!==null;){let f=l.index,h=l[0],p=l[1],m=l[2]?.trim()??"",_=f+h.length,g=i.slice(_),k=c.exec(g);if(k){let w=k[0],S=_+k.index+w.length,P=g.slice(0,k.index);p&&t.push({startIndex:f,endIndex:S,templateName:p,params:uu(m),existingContent:P,startMarkerLine:h,endMarkerLine:w})}}return t}function Ji(i,e){let n={...Gm,...e}[i];if(!n)throw new Error(`Unknown comment style: ${i}`);return n}function cu(i,e){return i.slice(0,e).split(`
865
- `).length}function hu(i,e){let t=[],{start:n,end:r}=e,s=zi(n),o=r?zi(r):"",a,c;r?(a=new RegExp(`${s}\\s*@embedoc-data:(?!end\\s*${o})([\\w.]+)(?:\\s+([^\\n]*?))?\\s*${o}`,"g"),c=new RegExp(`${s}\\s*@embedoc-data:end\\s*${o}`)):(a=new RegExp(`${s}\\s*@embedoc-data:(?!end\\s*$)([\\w.]+)(?:\\s+(.*))?$`,"gm"),c=new RegExp(`${s}\\s*@embedoc-data:end\\s*$`,"m"));let l;for(;(l=a.exec(i))!==null;){let f=l.index,h=l[0],p=l[1],m=l[2]?.trim()??"";if(!p||p==="end")continue;let g=uu(m).format??"yaml",k=f+h.length,w=i.slice(k);c.lastIndex=0;let S=c.exec(w);if(S){let P=w.slice(0,S.index),D=cu(i,f),B=cu(i,k+S.index+S[0].length);t.push({name:p,format:g,content:P,startLine:D,endLine:B,byteSize:Buffer.byteLength(P,"utf-8")})}}return t}function zi(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fu(i){return i==null?"":String(i).replace(/\|/g,"\\|").replace(/\n/g,"<br>")}function du(){return{table(i,e){if(i.length===0)return"";let t=[],n="| "+i.map(fu).join(" | ")+" |";t.push(n);let r="| "+i.map(()=>"---").join(" | ")+" |";t.push(r);for(let s of e){let a="| "+i.map((c,l)=>fu(s[l])).join(" | ")+" |";t.push(a)}return t.join(`
864
+ `;return{data:r,content:s,raw:o}}function Yi(i,e){let t=[],{start:n,end:r}=e,s=zi(n),o=r?zi(r):"",a;r?a=new RegExp(`${s}\\s*@embedoc:(?!end\\b)(\\w+)\\s*([^]*?)\\s*${o}`,"g"):a=new RegExp(`${s}\\s*@embedoc:(?!end\\b)(\\w+)\\s*(.*)$`,"gm");let l;r?l=new RegExp(`${s}\\s*@embedoc:end\\s*${o}`):l=new RegExp(`${s}\\s*@embedoc:end\\s*$`,"m");let c;for(;(c=a.exec(i))!==null;){let f=c.index,h=c[0],p=c[1],m=c[2]?.trim()??"",_=f+h.length,g=i.slice(_),k=l.exec(g);if(k){let w=k[0],S=_+k.index+w.length,P=g.slice(0,k.index);p&&t.push({startIndex:f,endIndex:S,templateName:p,params:uu(m),existingContent:P,startMarkerLine:h,endMarkerLine:w})}}return t}function Ji(i,e){let n={...Gm,...e}[i];if(!n)throw new Error(`Unknown comment style: ${i}`);return n}function cu(i,e){return i.slice(0,e).split(`
865
+ `).length}function hu(i,e){let t=[],{start:n,end:r}=e,s=zi(n),o=r?zi(r):"",a,l;r?(a=new RegExp(`${s}\\s*@embedoc-data:(?!end\\s*${o})([\\w.]+)(?:\\s+([^\\n]*?))?\\s*${o}`,"g"),l=new RegExp(`${s}\\s*@embedoc-data:end\\s*${o}`)):(a=new RegExp(`${s}\\s*@embedoc-data:(?!end\\s*$)([\\w.]+)(?:\\s+(.*))?$`,"gm"),l=new RegExp(`${s}\\s*@embedoc-data:end\\s*$`,"m"));let c;for(;(c=a.exec(i))!==null;){let f=c.index,h=c[0],p=c[1],m=c[2]?.trim()??"";if(!p||p==="end")continue;let g=uu(m).format??"yaml",k=f+h.length,w=i.slice(k);l.lastIndex=0;let S=l.exec(w);if(S){let P=w.slice(0,S.index),D=cu(i,f),B=cu(i,k+S.index+S[0].length);t.push({name:p,format:g,content:P,startLine:D,endLine:B,byteSize:Buffer.byteLength(P,"utf-8")})}}return t}function zi(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fu(i){return i==null?"":String(i).replace(/\|/g,"\\|").replace(/\n/g,"<br>")}function du(){return{table(i,e){if(i.length===0)return"";let t=[],n="| "+i.map(fu).join(" | ")+" |";t.push(n);let r="| "+i.map(()=>"---").join(" | ")+" |";t.push(r);for(let s of e){let a="| "+i.map((l,c)=>fu(s[c])).join(" | ")+" |";t.push(a)}return t.join(`
866
866
  `)},list(i,e=!1){return i.map((t,n)=>`${e?`${n+1}.`:"-"} ${t}`).join(`
867
867
  `)},codeBlock(i,e=""){return"```"+e+`
868
- `+i+"\n```"},link(i,e){return`[${i}](${e})`},heading(i,e=1){return`${"#".repeat(Math.min(Math.max(e,1),6))} ${i}`},bold(i){return`**${i}**`},italic(i){return`*${i}*`},checkbox(i){return i?"\u2714":""}}}import pu from"node:path";var Eo=["^```\\w*\\s*\\n?","\\n?```\\s*$"],zm={enabled:!0,maxBytes:10240,allowedFormats:["yaml","json","js","csv","table","text"],conflictPolicy:"warn",allowAnonymous:!1,stripCodeFences:!0,stripPatterns:Eo};function gu(i){return i.replace(/\[(\d+)\]/g,".$1").split(".").filter(e=>e.length>0).map(e=>/^\d+$/.test(e)?parseInt(e,10):e)}function Co(i,e){let t=gu(e),n=i;for(let r of t){if(n==null)return;n=n[r]}return n}function _u(i,e,t){let n=gu(e);if(n.length===0)return;let r=i;for(let o=0;o<n.length-1;o++){let a=n[o],c=n[o+1];if(typeof a=="number")throw new Error(`Array index in middle of path not supported: ${e}`);a in r||(r[a]=typeof c=="number"?[]:{}),r=r[a]}let s=n[n.length-1];r[s]=t}function $m(i){let e=i.indexOf(".");return e===-1?i:i.slice(0,e)}function Ym(i,e){let t=i.trim();for(let n of e){let r=new RegExp(n);t=t.replace(r,"")}return t.trim()}function mu(i,e,t={},n){let{stripCodeFences:r=!0,stripPatterns:s}=t,o=i;r&&(o=Ym(o,s??Eo));let a=o.trim();switch(e){case"yaml":return Xe.load(a,{schema:Xe.JSON_SCHEMA})??{};case"json":return a?JSON.parse(a):{};case"js":case"javascript":return a?new Function("return ("+a+")")():{};case"csv":return Jm(a);case"table":return Km(a);case"text":return a;default:{let c=n?.[e];return c?c(a):a}}}function Jm(i){let e=i.split(`
869
- `).filter(s=>s.trim().length>0);if(e.length===0)return[];let t=e[0];if(!t)return[];let n=t.split(",").map(s=>s.trim()),r=[];for(let s=1;s<e.length;s++){let o=e[s];if(!o)continue;let a=o.split(",").map(l=>l.trim()),c={};n.forEach((l,f)=>{c[l]=a[f]??""}),r.push(c)}return r}function Km(i){let e=i.split(`
870
- `).map(s=>s.trim()).filter(s=>s.length>0&&!s.match(/^\|[-:| ]+\|$/));if(e.length===0)return[];let t=e[0];if(!t)return[];let n=t.split("|").map(s=>s.trim()).filter(s=>s.length>0),r=[];for(let s=1;s<e.length;s++){let o=e[s];if(!o)continue;let a=o.split("|").map(f=>f.trim()),c=o.startsWith("|")?a.slice(1,-1):a,l={};n.forEach((f,h)=>{l[f]=c[h]??""}),r.push(l)}return r}var xo=class{type="inline";format;documentPath;startLine;endLine;byteSize;data;_isObject;_locations;constructor(e,t,n,r,s,o,a=[]){this.data=e,this.format=t,this.documentPath=n,this.startLine=r,this.endLine=s,this.byteSize=o,this._isObject=!Array.isArray(e)&&typeof e=="object"&&e!==null,this._locations=[...a].sort((c,l)=>c.propertyPath===""?-1:l.propertyPath===""?1:c.propertyPath.localeCompare(l.propertyPath))}async query(e,t){return Array.isArray(this.data)?this.data:[this.data]}async getAll(){return Array.isArray(this.data)?this.data:[this.data]}getRawData(){return this.data}async get(e){return Co(this.data,e)}isObjectType(){return this._isObject}async close(){}merge(e,t){if(!this._isObject)throw new Error("Cannot merge into array datasource");_u(this.data,e,t)}getMeta(e="",t){let n=this._locations.find(r=>r.propertyPath===e);return n?this._buildLocation(n,t):null}getAllMeta(e){return this._locations.map(t=>this._buildLocation(t,e))}get locations(){return this._locations}_buildLocation(e,t){let n=this.documentPath;if(t){let r=pu.dirname(t);n=pu.relative(r,this.documentPath),n=n.replace(/\\/g,"/"),!n.startsWith(".")&&!n.startsWith("/")&&(n="./"+n)}return{propertyPath:e.propertyPath,absolutePath:this.documentPath,relativePath:n,startLine:e.startLine,endLine:e.endLine,contentStartLine:e.startLine+1,contentEndLine:e.endLine-1,format:e.format}}};function yu(i,e,t={},n){let r={...zm,...t},s=new Map,o={stripCodeFences:r.stripCodeFences,stripPatterns:t.stripPatterns??Eo},a=new Map;for(let c of i){if(c.byteSize>r.maxBytes)throw new Error(`Inline datasource "${c.name}" exceeds max size (${c.byteSize} > ${r.maxBytes} bytes)`);if(!(n!=null&&c.format in n)&&!r.allowedFormats.includes(c.format))throw new Error(`Inline datasource "${c.name}" uses disallowed format "${c.format}"`);let f=$m(c.name);a.has(f)||a.set(f,[]),a.get(f).push(c)}for(let[c,l]of a){let f=l.find(w=>w.name===c),h,p="yaml",m=0,_=0,g=0,k=[];f?(h=mu(f.content,f.format,o,n),p=f.format,m=f.startLine,_=f.endLine,g=f.byteSize,k.push({propertyPath:"",startLine:f.startLine,endLine:f.endLine,format:f.format})):h={};for(let w of l)if(w.name!==c&&w.name.startsWith(c+".")){let S=w.name.slice(c.length+1),P=mu(w.content,w.format,o,n);(typeof h!="object"||h===null)&&(h={}),_u(h,S,P),k.push({propertyPath:S,startLine:w.startLine,endLine:w.endLine,format:w.format}),(m===0||w.startLine<m)&&(m=w.startLine),w.endLine>_&&(_=w.endLine),g+=w.byteSize}s.set(c,new xo(h,p,e,m,_,g,k))}return s}function Zm(i,e,t){let n={};for(let[r,s]of Object.entries(i))n[r]=s.replace(/\$\{(\w+(?:\.\w+|\[\d+\])*)\}/g,(o,a)=>{let c=a.split("."),l=c[0];if(!l)return"";let f=t.get(l);if(f){let p=c.slice(1).join(".");if(p){let _=Co(f.data,p);return _!=null?String(_):""}let m=f.data;return m!=null?String(m):""}let h=e;for(let p of c){if(h==null)return"";if(typeof h=="object")h=h[p];else return""}return h!=null?String(h):""});return n}async function eg(i,e,t,n,r,s,o=!1,a){let c={filePath:i,success:!0,markersUpdated:0,changed:!1};try{let l=Ji(t.comment_style,s.comment_styles),{data:f,content:h,raw:p}=$i(e),m=p?p.split(`
871
- `).length-1:0,_=hu(h,l);for(let U of _)U.startLine+=m,U.endLine+=m;let g=yu(_,i,s.inline_datasource,a),k={...r};for(let[U,J]of g){if(U in k){let he=s.inline_datasource?.conflictPolicy??"warn";if(he==="error")throw new Error(`Inline datasource "${U}" conflicts with external datasource (conflict_policy: error)`);if(he==="prefer_external")continue;console.warn(`Warning: Inline datasource "${U}" overrides external datasource in ${i}`)}k[U]=J}let w=Yi(h,l);if(w.length===0&&_.length===0)return c;let S=du(),P=h,D=[...w].sort((U,J)=>J.startIndex-U.startIndex);for(let U of D){let J=n[U.templateName];if(!J){console.warn(`Warning: Unknown embed "${U.templateName}" in ${i}`);continue}let le={params:Zm(U.params,f,g),frontmatter:f,datasources:k,markdown:S,filePath:i,existingContent:U.existingContent},se=await J.render(le);if(se.content===null||se.content===void 0)continue;let ce=U.params.inline==="true"?U.startMarkerLine+se.content+U.endMarkerLine:U.startMarkerLine+`
868
+ `+i+"\n```"},link(i,e){return`[${i}](${e})`},heading(i,e=1){return`${"#".repeat(Math.min(Math.max(e,1),6))} ${i}`},bold(i){return`**${i}**`},italic(i){return`*${i}*`},checkbox(i){return i?"\u2714":""}}}import pu from"node:path";var Eo=["^```\\w*\\s*\\n?","\\n?```\\s*$"],zm={enabled:!0,maxBytes:10240,allowedFormats:["yaml","json","js","csv","table","text"],conflictPolicy:"warn",allowAnonymous:!1,stripCodeFences:!0,stripPatterns:Eo};function gu(i){return i.replace(/\[(\d+)\]/g,".$1").split(".").filter(e=>e.length>0).map(e=>/^\d+$/.test(e)?parseInt(e,10):e)}function Co(i,e){let t=gu(e),n=i;for(let r of t){if(n==null)return;n=n[r]}return n}function _u(i,e,t){let n=gu(e);if(n.length===0)return;let r=i;for(let o=0;o<n.length-1;o++){let a=n[o],l=n[o+1];if(typeof a=="number")throw new Error(`Array index in middle of path not supported: ${e}`);a in r||(r[a]=typeof l=="number"?[]:{}),r=r[a]}let s=n[n.length-1];r[s]=t}function $m(i){let e=i.indexOf(".");return e===-1?i:i.slice(0,e)}function Ym(i,e){let t=i.trim();for(let n of e){let r=new RegExp(n);t=t.replace(r,"")}return t.trim()}function mu(i,e,t={},n){let{stripCodeFences:r=!0,stripPatterns:s}=t,o=i;r&&(o=Ym(o,s??Eo));let a=o.trim();switch(e){case"yaml":return Xe.load(a,{schema:Xe.JSON_SCHEMA})??{};case"json":return a?JSON.parse(a):{};case"js":case"javascript":return a?new Function("return ("+a+")")():{};case"csv":return Jm(a);case"table":return Km(a);case"text":return a;default:{let l=n?.[e];return l?l(a):a}}}function Jm(i){let e=i.split(`
869
+ `).filter(s=>s.trim().length>0);if(e.length===0)return[];let t=e[0];if(!t)return[];let n=t.split(",").map(s=>s.trim()),r=[];for(let s=1;s<e.length;s++){let o=e[s];if(!o)continue;let a=o.split(",").map(c=>c.trim()),l={};n.forEach((c,f)=>{l[c]=a[f]??""}),r.push(l)}return r}function Km(i){let e=i.split(`
870
+ `).map(s=>s.trim()).filter(s=>s.length>0&&!s.match(/^\|[-:| ]+\|$/));if(e.length===0)return[];let t=e[0];if(!t)return[];let n=t.split("|").map(s=>s.trim()).filter(s=>s.length>0),r=[];for(let s=1;s<e.length;s++){let o=e[s];if(!o)continue;let a=o.split("|").map(f=>f.trim()),l=o.startsWith("|")?a.slice(1,-1):a,c={};n.forEach((f,h)=>{c[f]=l[h]??""}),r.push(c)}return r}var xo=class{type="inline";format;documentPath;startLine;endLine;byteSize;data;_isObject;_locations;constructor(e,t,n,r,s,o,a=[]){this.data=e,this.format=t,this.documentPath=n,this.startLine=r,this.endLine=s,this.byteSize=o,this._isObject=!Array.isArray(e)&&typeof e=="object"&&e!==null,this._locations=[...a].sort((l,c)=>l.propertyPath===""?-1:c.propertyPath===""?1:l.propertyPath.localeCompare(c.propertyPath))}async query(e,t){return Array.isArray(this.data)?this.data:[this.data]}async getAll(){return Array.isArray(this.data)?this.data:[this.data]}getRawData(){return this.data}async get(e){return Co(this.data,e)}isObjectType(){return this._isObject}async close(){}merge(e,t){if(!this._isObject)throw new Error("Cannot merge into array datasource");_u(this.data,e,t)}getMeta(e="",t){let n=this._locations.find(r=>r.propertyPath===e);return n?this._buildLocation(n,t):null}getAllMeta(e){return this._locations.map(t=>this._buildLocation(t,e))}get locations(){return this._locations}_buildLocation(e,t){let n=this.documentPath;if(t){let r=pu.dirname(t);n=pu.relative(r,this.documentPath),n=n.replace(/\\/g,"/"),!n.startsWith(".")&&!n.startsWith("/")&&(n="./"+n)}return{propertyPath:e.propertyPath,absolutePath:this.documentPath,relativePath:n,startLine:e.startLine,endLine:e.endLine,contentStartLine:e.startLine+1,contentEndLine:e.endLine-1,format:e.format}}};function yu(i,e,t={},n){let r={...zm,...t},s=new Map,o={stripCodeFences:r.stripCodeFences,stripPatterns:t.stripPatterns??Eo},a=new Map;for(let l of i){if(l.byteSize>r.maxBytes)throw new Error(`Inline datasource "${l.name}" exceeds max size (${l.byteSize} > ${r.maxBytes} bytes)`);if(!(n!=null&&l.format in n)&&!r.allowedFormats.includes(l.format))throw new Error(`Inline datasource "${l.name}" uses disallowed format "${l.format}"`);let f=$m(l.name);a.has(f)||a.set(f,[]),a.get(f).push(l)}for(let[l,c]of a){let f=c.find(w=>w.name===l),h,p="yaml",m=0,_=0,g=0,k=[];f?(h=mu(f.content,f.format,o,n),p=f.format,m=f.startLine,_=f.endLine,g=f.byteSize,k.push({propertyPath:"",startLine:f.startLine,endLine:f.endLine,format:f.format})):h={};for(let w of c)if(w.name!==l&&w.name.startsWith(l+".")){let S=w.name.slice(l.length+1),P=mu(w.content,w.format,o,n);(typeof h!="object"||h===null)&&(h={}),_u(h,S,P),k.push({propertyPath:S,startLine:w.startLine,endLine:w.endLine,format:w.format}),(m===0||w.startLine<m)&&(m=w.startLine),w.endLine>_&&(_=w.endLine),g+=w.byteSize}s.set(l,new xo(h,p,e,m,_,g,k))}return s}function Zm(i,e,t){let n={};for(let[r,s]of Object.entries(i))n[r]=s.replace(/\$\{(\w+(?:\.\w+|\[\d+\])*)\}/g,(o,a)=>{let l=a.split("."),c=l[0];if(!c)return"";let f=t.get(c);if(f){let p=l.slice(1).join(".");if(p){let _=Co(f.data,p);return _!=null?String(_):""}let m=f.data;return m!=null?String(m):""}let h=e;for(let p of l){if(h==null)return"";if(typeof h=="object")h=h[p];else return""}return h!=null?String(h):""});return n}async function eg(i,e,t,n,r,s,o=!1,a){let l={filePath:i,success:!0,markersUpdated:0,changed:!1};try{let c=Ji(t.comment_style,s.comment_styles),{data:f,content:h,raw:p}=$i(e),m=p?p.split(`
871
+ `).length-1:0,_=hu(h,c);for(let U of _)U.startLine+=m,U.endLine+=m;let g=yu(_,i,s.inline_datasource,a),k={...r};for(let[U,J]of g){if(U in k){let he=s.inline_datasource?.conflictPolicy??"warn";if(he==="error")throw new Error(`Inline datasource "${U}" conflicts with external datasource (conflict_policy: error)`);if(he==="prefer_external")continue;console.warn(`Warning: Inline datasource "${U}" overrides external datasource in ${i}`)}k[U]=J}let w=Yi(h,c);if(w.length===0&&_.length===0)return l;let S=du(),P=h,D=[...w].sort((U,J)=>J.startIndex-U.startIndex);for(let U of D){let J=n[U.templateName];if(!J){console.warn(`Warning: Unknown embed "${U.templateName}" in ${i}`);continue}let le={params:Zm(U.params,f,g),frontmatter:f,datasources:k,markdown:S,filePath:i,existingContent:U.existingContent},se=await J.render(le);if(se.content===null||se.content===void 0)continue;let ce=U.params.inline==="true"?U.startMarkerLine+se.content+U.endMarkerLine:U.startMarkerLine+`
872
872
  `+se.content+`
873
- `+U.endMarkerLine;P=P.slice(0,U.startIndex)+ce+P.slice(U.endIndex),c.markersUpdated++}let B=p+P;if(B!==e&&(c.changed=!0,!o)){let J=(s.output?.line_ending??"lf")==="crlf"?B.replace(/\n/g,`\r
874
- `):B;await Xm(i,J,{encoding:s.output?.encoding??"utf-8"})}for(let U of g.values())await U.close()}catch(l){c.success=!1,c.error=l instanceof Error?l:new Error(String(l))}return c}async function tg(i){return await ft(i.pattern,{ignore:i.exclude??[],nodir:!0})}async function ko(i,e,t,n={}){let r=Date.now(),s=[];for(let a of i.targets){let c;n.specificFiles&&n.specificFiles.length>0?c=n.specificFiles.filter(l=>l.endsWith(a.pattern.split("*").pop()??"")):c=await tg(a);for(let l of c){n.verbose&&console.log(`Processing: ${l}`);try{let f=await Qm(l,{encoding:"utf-8"}),h=await eg(l,f,a,e,t,i,n.dryRun,n.customInlineFormats);s.push(h),n.verbose&&h.markersUpdated>0&&console.log(` Updated ${h.markersUpdated} marker(s)${h.changed?" (changed)":" (no changes)"}`)}catch(f){s.push({filePath:l,success:!1,markersUpdated:0,changed:!1,error:f instanceof Error?f:new Error(String(f))}),n.verbose&&console.error(` Error: ${f}`)}}}let o=Date.now()-r;return{totalFiles:s.length,successFiles:s.filter(a=>a.success).length,failedFiles:s.filter(a=>!a.success).length,totalMarkersUpdated:s.reduce((a,c)=>a+c.markersUpdated,0),results:s,duration:o}}var Pe=Br(cf(),1);import{readFile as $y,writeFile as Yy,mkdir as Jy,access as Ky}from"node:fs/promises";import{dirname as Qy,join as Xy}from"node:path";function Zy(){Pe.default.registerHelper("today",()=>new Date().toISOString().split("T")[0]),Pe.default.registerHelper("datetime",()=>new Date().toISOString()),Pe.default.registerHelper("eq",(i,e)=>i===e),Pe.default.registerHelper("ne",(i,e)=>i!==e),Pe.default.registerHelper("gt",(i,e)=>i>e),Pe.default.registerHelper("lt",(i,e)=>i<e),Pe.default.registerHelper("and",(...i)=>(i.pop(),i.every(Boolean))),Pe.default.registerHelper("or",(...i)=>(i.pop(),i.some(Boolean))),Pe.default.registerHelper("json",i=>JSON.stringify(i,null,2)),Pe.default.registerHelper("uppercase",i=>String(i??"").toUpperCase()),Pe.default.registerHelper("lowercase",i=>String(i??"").toLowerCase()),Pe.default.registerHelper("capitalize",i=>{let e=String(i??"");return e.charAt(0).toUpperCase()+e.slice(1)}),Pe.default.registerHelper("replace",(i,e,t)=>String(i??"").replace(new RegExp(e,"g"),t))}Zy();async function eb(i,e){let t=await $y(i,{encoding:"utf-8"});return Pe.default.compile(t)(e)}function tb(i,e){return i.replace(/\{([^}]+)\}/g,(t,n)=>{let r=e[n];return r!=null?String(r):""})}async function nb(i){try{return await Ky(i),!0}catch{return!1}}async function ib(i,e,t,n,r=!1){let s=tb(e.output_path,i),o={filePath:s,success:!0,skipped:!1};try{if(await nb(s)&&!e.overwrite)return o.skipped=!0,o;let c=Xy(t,e.template),l=await eb(c,i);if(!r){await Jy(Qy(s),{recursive:!0});let h=(n.output?.line_ending??"lf")==="crlf"?l.replace(/\n/g,`\r
875
- `):l;await Yy(s,h,{encoding:n.output?.encoding??"utf-8"})}}catch(a){o.success=!1,o.error=a instanceof Error?a:new Error(String(a))}return o}async function rb(i,e,t,n,r={}){let s=[];if(!e.generators||e.generators.length===0)return r.verbose&&console.log(`No generators defined for datasource: ${i}`),s;let o=n.templates_dir??".embedoc/templates",a=await t.getAll();r.verbose&&console.log(`Found ${a.length} records in datasource: ${i}`);for(let c of e.generators)if(!(r.generatorName&&c.template!==r.generatorName)){r.verbose&&console.log(` Generator: ${c.template}`);for(let l of a){let f=await ib(l,c,o,n,r.dryRun);s.push(f),r.verbose&&(f.skipped?console.log(` Skipped (exists): ${f.filePath}`):f.success?console.log(` Generated: ${f.filePath}`):console.log(` Failed: ${f.filePath} - ${f.error?.message}`))}}return s}async function uf(i,e,t={}){let n=[];if(!i.datasources)return n;for(let[r,s]of Object.entries(i.datasources)){if(t.datasourceName&&r!==t.datasourceName||!s.generators||s.generators.length===0)continue;let o=e[r];if(!o){t.verbose&&console.warn(`Datasource not initialized: ${r}`);continue}t.verbose&&console.log(`
876
- Processing datasource: ${r}`);let a=await rb(r,s,o,i,t);n.push(...a)}return n}Nn();import{readFile as sb}from"node:fs/promises";import{resolve as it,relative as ba}from"node:path";var sn=class{nodes=new Map;config;renderersDir;embeds;constructor(e,t){this.config=e,this.embeds=t,this.renderersDir=it(e.renderers_dir??e.embeds_dir??".embedoc/renderers")}getOrCreateNode(e,t){let n=it(t),r=this.nodes.get(n);return r||(r={type:e,path:n,dependsOn:new Set,dependedBy:new Set},this.nodes.set(n,r)),r}addDependency(e,t){let n=this.nodes.get(it(e)),r=this.nodes.get(it(t));n&&r&&(n.dependsOn.add(r.path),r.dependedBy.add(n.path))}async analyzeDocument(e,t){let n=it(e),r=this.getOrCreateNode("document",n);try{let s=await sb(n,{encoding:"utf-8"}),o=Ji(t.comment_style,this.config.comment_styles),{content:a}=$i(s),c=Yi(a,o),l=new Set(c.map(f=>f.templateName));for(let f of l){let h=this.embeds[f];if(h){let p=`embed:${f}`,m=this.getOrCreateNode("embed",p);if(r.dependsOn.add(m.path),m.dependedBy.add(r.path),h.dependsOn)for(let _ of h.dependsOn){let g=this.config.datasources?.[_];if(g?.path){let k=it(g.path),w=this.getOrCreateNode("datasource",k);m.dependsOn.add(w.path),w.dependedBy.add(m.path)}}}}}catch{}}async build(){this.nodes.clear();for(let e of this.config.targets){let t=await ft(e.pattern,{ignore:e.exclude??[],nodir:!0});for(let n of t)await this.analyzeDocument(n,e)}}getAffectedDocuments(e){let t=it(e),n=new Set,r=this.nodes.get(t);if(!r){for(let a of this.nodes.values())if(a.type==="datasource"&&a.path===t){r=a;break}}if(!r&&e.endsWith(".ts")){let a=e.split("/").pop()?.replace(".ts","");if(a&&a!=="index"){let c=`embed:${a}`;if(r=this.nodes.get(it(c)),!r){let l=a.replace(/([A-Z])/g,"_$1").toLowerCase().replace(/^_/,"");r=this.nodes.get(it(`embed:${l}`))}}}if(!r)return this.nodes.get(t)?.type==="document"?[t]:[];let s=new Set,o=[r];for(;o.length>0;){let a=o.shift();if(!s.has(a.path)){s.add(a.path),a.type==="document"&&n.add(a.path);for(let c of a.dependedBy){let l=this.nodes.get(c);l&&!s.has(c)&&o.push(l)}}}return Array.from(n)}getWatchPaths(){let e=[];if(this.config.datasources)for(let t of Object.values(this.config.datasources))t.path&&e.push(it(t.path));return e.push(this.renderersDir),e}dump(){console.log(`
873
+ `+U.endMarkerLine;P=P.slice(0,U.startIndex)+ce+P.slice(U.endIndex),l.markersUpdated++}let B=p+P;if(B!==e&&(l.changed=!0,!o)){let J=(s.output?.line_ending??"lf")==="crlf"?B.replace(/\n/g,`\r
874
+ `):B;await Xm(i,J,{encoding:s.output?.encoding??"utf-8"})}for(let U of g.values())await U.close()}catch(c){l.success=!1,l.error=c instanceof Error?c:new Error(String(c))}return l}async function tg(i){return await ft(i.pattern,{ignore:i.exclude??[],nodir:!0})}async function ko(i,e,t,n={}){let r=Date.now(),s=[];for(let a of i.targets){let l;n.specificFiles&&n.specificFiles.length>0?l=n.specificFiles.filter(c=>c.endsWith(a.pattern.split("*").pop()??"")):l=await tg(a);for(let c of l){n.verbose&&console.log(`Processing: ${c}`);try{let f=await Qm(c,{encoding:"utf-8"}),h=await eg(c,f,a,e,t,i,n.dryRun,n.customInlineFormats);s.push(h),n.verbose&&h.markersUpdated>0&&console.log(` Updated ${h.markersUpdated} marker(s)${h.changed?" (changed)":" (no changes)"}`)}catch(f){s.push({filePath:c,success:!1,markersUpdated:0,changed:!1,error:f instanceof Error?f:new Error(String(f))}),n.verbose&&console.error(` Error: ${f}`)}}}let o=Date.now()-r;return{totalFiles:s.length,successFiles:s.filter(a=>a.success).length,failedFiles:s.filter(a=>!a.success).length,totalMarkersUpdated:s.reduce((a,l)=>a+l.markersUpdated,0),results:s,duration:o}}var Pe=Br(cf(),1);import{readFile as $y,writeFile as Yy,mkdir as Jy,access as Ky}from"node:fs/promises";import{dirname as Qy,join as Xy}from"node:path";function Zy(){Pe.default.registerHelper("today",()=>new Date().toISOString().split("T")[0]),Pe.default.registerHelper("datetime",()=>new Date().toISOString()),Pe.default.registerHelper("eq",(i,e)=>i===e),Pe.default.registerHelper("ne",(i,e)=>i!==e),Pe.default.registerHelper("gt",(i,e)=>i>e),Pe.default.registerHelper("lt",(i,e)=>i<e),Pe.default.registerHelper("and",(...i)=>(i.pop(),i.every(Boolean))),Pe.default.registerHelper("or",(...i)=>(i.pop(),i.some(Boolean))),Pe.default.registerHelper("json",i=>JSON.stringify(i,null,2)),Pe.default.registerHelper("uppercase",i=>String(i??"").toUpperCase()),Pe.default.registerHelper("lowercase",i=>String(i??"").toLowerCase()),Pe.default.registerHelper("capitalize",i=>{let e=String(i??"");return e.charAt(0).toUpperCase()+e.slice(1)}),Pe.default.registerHelper("replace",(i,e,t)=>String(i??"").replace(new RegExp(e,"g"),t))}Zy();async function eb(i,e){let t=await $y(i,{encoding:"utf-8"});return Pe.default.compile(t)(e)}function tb(i,e){return i.replace(/\{([^}]+)\}/g,(t,n)=>{let r=e[n];return r!=null?String(r):""})}async function nb(i){try{return await Ky(i),!0}catch{return!1}}async function ib(i,e,t,n,r=!1){let s=tb(e.output_path,i),o={filePath:s,success:!0,skipped:!1};try{if(await nb(s)&&!e.overwrite)return o.skipped=!0,o;let l=Xy(t,e.template),c=await eb(l,i);if(!r){await Jy(Qy(s),{recursive:!0});let h=(n.output?.line_ending??"lf")==="crlf"?c.replace(/\n/g,`\r
875
+ `):c;await Yy(s,h,{encoding:n.output?.encoding??"utf-8"})}}catch(a){o.success=!1,o.error=a instanceof Error?a:new Error(String(a))}return o}async function rb(i,e,t,n,r={}){let s=[];if(!e.generators||e.generators.length===0)return r.verbose&&console.log(`No generators defined for datasource: ${i}`),s;let o=n.templates_dir??".embedoc/templates",a=await t.getAll();r.verbose&&console.log(`Found ${a.length} records in datasource: ${i}`);for(let l of e.generators)if(!(r.generatorName&&l.template!==r.generatorName)){r.verbose&&console.log(` Generator: ${l.template}`);for(let c of a){let f=await ib(c,l,o,n,r.dryRun);s.push(f),r.verbose&&(f.skipped?console.log(` Skipped (exists): ${f.filePath}`):f.success?console.log(` Generated: ${f.filePath}`):console.log(` Failed: ${f.filePath} - ${f.error?.message}`))}}return s}async function uf(i,e,t={}){let n=[];if(!i.datasources)return n;for(let[r,s]of Object.entries(i.datasources)){if(t.datasourceName&&r!==t.datasourceName||!s.generators||s.generators.length===0)continue;let o=e[r];if(!o){t.verbose&&console.warn(`Datasource not initialized: ${r}`);continue}t.verbose&&console.log(`
876
+ Processing datasource: ${r}`);let a=await rb(r,s,o,i,t);n.push(...a)}return n}Nn();import{readFile as sb}from"node:fs/promises";import{resolve as it,relative as ba}from"node:path";var sn=class{nodes=new Map;config;renderersDir;embeds;constructor(e,t){this.config=e,this.embeds=t,this.renderersDir=it(e.renderers_dir??e.embeds_dir??".embedoc/renderers")}getOrCreateNode(e,t){let n=it(t),r=this.nodes.get(n);return r||(r={type:e,path:n,dependsOn:new Set,dependedBy:new Set},this.nodes.set(n,r)),r}addDependency(e,t){let n=this.nodes.get(it(e)),r=this.nodes.get(it(t));n&&r&&(n.dependsOn.add(r.path),r.dependedBy.add(n.path))}async analyzeDocument(e,t){let n=it(e),r=this.getOrCreateNode("document",n);try{let s=await sb(n,{encoding:"utf-8"}),o=Ji(t.comment_style,this.config.comment_styles),{content:a}=$i(s),l=Yi(a,o),c=new Set(l.map(f=>f.templateName));for(let f of c){let h=this.embeds[f];if(h){let p=`embed:${f}`,m=this.getOrCreateNode("embed",p);if(r.dependsOn.add(m.path),m.dependedBy.add(r.path),h.dependsOn)for(let _ of h.dependsOn){let g=this.config.datasources?.[_];if(g?.path){let k=it(g.path),w=this.getOrCreateNode("datasource",k);m.dependsOn.add(w.path),w.dependedBy.add(m.path)}}}}}catch{}}async build(){this.nodes.clear();for(let e of this.config.targets){let t=await ft(e.pattern,{ignore:e.exclude??[],nodir:!0});for(let n of t)await this.analyzeDocument(n,e)}}getAffectedDocuments(e){let t=it(e),n=new Set,r=this.nodes.get(t);if(!r){for(let a of this.nodes.values())if(a.type==="datasource"&&a.path===t){r=a;break}}if(!r&&e.endsWith(".ts")){let a=e.split("/").pop()?.replace(".ts","");if(a&&a!=="index"){let l=`embed:${a}`;if(r=this.nodes.get(it(l)),!r){let c=a.replace(/([A-Z])/g,"_$1").toLowerCase().replace(/^_/,"");r=this.nodes.get(it(`embed:${c}`))}}}if(!r)return this.nodes.get(t)?.type==="document"?[t]:[];let s=new Set,o=[r];for(;o.length>0;){let a=o.shift();if(!s.has(a.path)){s.add(a.path),a.type==="document"&&n.add(a.path);for(let l of a.dependedBy){let c=this.nodes.get(l);c&&!s.has(l)&&o.push(c)}}}return Array.from(n)}getWatchPaths(){let e=[];if(this.config.datasources)for(let t of Object.values(this.config.datasources))t.path&&e.push(it(t.path));return e.push(this.renderersDir),e}dump(){console.log(`
877
877
  === Dependency Graph ===`);for(let[e,t]of this.nodes){if(console.log(`
878
- [${t.type}] ${ba(process.cwd(),e)}`),t.dependsOn.size>0){console.log(" depends on:");for(let n of t.dependsOn)console.log(` - ${ba(process.cwd(),n)}`)}if(t.dependedBy.size>0){console.log(" depended by:");for(let n of t.dependedBy)console.log(` - ${ba(process.cwd(),n)}`)}}}};var lb={version:"0.14.4"};async function va(i){let e=rt(i),t=await df(e,{encoding:"utf-8"});return i.endsWith(".json")?JSON.parse(t):Xe.load(t)}async function on(i){try{return await ob(i),!0}catch{return!1}}function ff(i){return i.renderers_dir?i.renderers_dir:i.embeds_dir?(console.warn(j.default.yellow('Warning: "embeds_dir" is deprecated. Use "renderers_dir" instead.')),i.embeds_dir):".embedoc/renderers"}async function Sa(i){let e=rt(i,"index.ts"),t=rt(i,"index.js");try{if(await on(e)){let n=await mf(e,import.meta.url);return n.embeds??n.default?.embeds??{}}return await on(t)?(await import(pf(t).href)).embeds??{}:{}}catch(n){let r=n instanceof Error?n.message:String(n);return console.warn(j.default.yellow(`Warning: Could not load renderers from ${i}: ${r}`)),{}}}async function xa(i){let e=rt(i,"index.ts"),t=rt(i,"index.js"),n={datasourceTypes:{},inlineFormats:{}};try{let r;return await on(e)?r=await mf(e,import.meta.url):await on(t)&&(r=await import(pf(t).href)),r?{datasourceTypes:r.datasourceTypes??r.default?.datasourceTypes??{},inlineFormats:r.inlineFormats??r.default?.inlineFormats??{}}:n}catch(r){let s=r instanceof Error?r.message:String(r);return console.warn(j.default.yellow(`Warning: Could not load custom datasources from ${i}: ${s}`)),n}}var cb={init:async i=>{try{console.log(j.default.cyan(`\u{1F4C1} Initializing embedoc...
879
- `));let e=[],t=[],n=async(c,l)=>{let f=rt(c);if(!i.force&&await on(f)){t.push(c);return}let h=f.substring(0,f.lastIndexOf("/"));await ab(h,{recursive:!0}),await hf(f,l,{encoding:"utf-8"}),e.push(c)};await n("embedoc.config.yaml",`version: "1.0"
878
+ [${t.type}] ${ba(process.cwd(),e)}`),t.dependsOn.size>0){console.log(" depends on:");for(let n of t.dependsOn)console.log(` - ${ba(process.cwd(),n)}`)}if(t.dependedBy.size>0){console.log(" depended by:");for(let n of t.dependedBy)console.log(` - ${ba(process.cwd(),n)}`)}}}};var lb={version:"0.14.5"};async function va(i){let e=rt(i),t=await df(e,{encoding:"utf-8"});return i.endsWith(".json")?JSON.parse(t):Xe.load(t)}async function on(i){try{return await ob(i),!0}catch{return!1}}function ff(i){return i.renderers_dir?i.renderers_dir:i.embeds_dir?(console.warn(j.default.yellow('Warning: "embeds_dir" is deprecated. Use "renderers_dir" instead.')),i.embeds_dir):".embedoc/renderers"}async function Sa(i){let e=rt(i,"index.ts"),t=rt(i,"index.js");try{if(await on(e)){let n=await mf(e,import.meta.url);return n.embeds??n.default?.embeds??{}}return await on(t)?(await import(pf(t).href)).embeds??{}:{}}catch(n){let r=n instanceof Error?n.message:String(n);return console.warn(j.default.yellow(`Warning: Could not load renderers from ${i}: ${r}`)),{}}}async function xa(i){let e=rt(i,"index.ts"),t=rt(i,"index.js"),n={datasourceTypes:{},inlineFormats:{}};try{let r;return await on(e)?r=await mf(e,import.meta.url):await on(t)&&(r=await import(pf(t).href)),r?{datasourceTypes:r.datasourceTypes??r.default?.datasourceTypes??{},inlineFormats:r.inlineFormats??r.default?.inlineFormats??{}}:n}catch(r){let s=r instanceof Error?r.message:String(r);return console.warn(j.default.yellow(`Warning: Could not load custom datasources from ${i}: ${s}`)),n}}var cb={init:async i=>{try{console.log(j.default.cyan(`\u{1F4C1} Initializing embedoc...
879
+ `));let e=[],t=[],n=async(l,c)=>{let f=rt(l);if(!i.force&&await on(f)){t.push(l);return}let h=f.substring(0,f.lastIndexOf("/"));await ab(h,{recursive:!0}),await hf(f,c,{encoding:"utf-8"}),e.push(l)};await n("embedoc.config.yaml",`version: "1.0"
880
880
 
881
881
  targets:
882
882
  - pattern: "./docs/**/*.md"
@@ -921,12 +921,12 @@ export const datasourceTypes = {
921
921
  export const inlineFormats = {
922
922
  // toml: (content: string) => parseToml(content),
923
923
  };
924
- `),await n(".embedoc/templates/.gitkeep","");let a=rt("package.json");if(await on(a)){let c=await df(a,{encoding:"utf-8"}),l=JSON.parse(c),f=l.scripts??{},h=!1,p=[["embedoc:build","embedoc build"],["embedoc:watch","embedoc watch"],["embedoc:generate","embedoc generate --all"]];for(let[m,_]of p)m in f||(f[m]=_,h=!0);if(h){l.scripts=f,await hf(a,JSON.stringify(l,null,2)+`
925
- `,{encoding:"utf-8"}),console.log(j.default.green(" Updated package.json scripts:"));for(let[m,_]of p)c.includes(`"${m}"`)||console.log(j.default.gray(` "${m}": "${_}"`));console.log("")}}if(e.length>0){console.log(j.default.green(" Created:"));for(let c of e)console.log(j.default.gray(` ${c}`))}if(t.length>0){console.log(j.default.yellow(" Skipped (already exists):"));for(let c of t)console.log(j.default.gray(` ${c}`))}console.log(""),console.log(j.default.green("\u2705 embedoc initialized!")),console.log(""),console.log(" Next steps:"),console.log(j.default.cyan(" 1. Edit embedoc.config.yaml to configure targets and datasources")),console.log(j.default.cyan(" 2. Add renderers in .embedoc/renderers/")),console.log(j.default.cyan(" 3. Run: npx embedoc build"))}catch(e){console.error(j.default.red("\u274C Init failed:")),console.error(e instanceof Error?e.message:String(e)),process.exit(1)}},build:async(i,e)=>{let t=Date.now();try{console.log(j.default.cyan("\u{1F527} Loading configuration..."));let n=await va(e.config??"embedoc.config.yaml"),r=n.datasources_dir??".embedoc/datasources",s=await xa(r);console.log(j.default.cyan("\u{1F4E6} Initializing datasources..."));let o=await Mn(n,s.datasourceTypes);console.log(j.default.cyan("\u{1F4DD} Loading renderers..."));let a=ff(n),c=await Sa(a);console.log(j.default.cyan("\u{1F504} Processing files..."));let l=await ko(n,c,o,{dryRun:e.dryRun,verbose:e.verbose,specificFiles:i.length>0?i:void 0,customInlineFormats:s.inlineFormats});await Fn(o);let f=Date.now()-t;console.log(""),console.log(j.default.green("\u2705 Build completed!")),console.log(` Files processed: ${l.totalFiles}`),console.log(` Markers updated: ${l.totalMarkersUpdated}`),console.log(` Success: ${l.successFiles}`),l.failedFiles>0&&console.log(j.default.red(` Failed: ${l.failedFiles}`)),console.log(` Duration: ${f}ms`),e.dryRun&&console.log(j.default.yellow(`
926
- (Dry run - no files were modified)`));for(let h of l.results)!h.success&&h.error&&(console.error(j.default.red(`
927
- Error in ${h.filePath}:`)),console.error(` ${h.error.message}`));process.exit(l.failedFiles>0?1:0)}catch(n){console.error(j.default.red("\u274C Build failed:")),console.error(n instanceof Error?n.message:String(n)),process.exit(1)}},generate:async i=>{let e=Date.now();try{!i.datasource&&!i.all&&(console.error(j.default.red("Error: Either --datasource or --all must be specified")),process.exit(1)),console.log(j.default.cyan("\u{1F527} Loading configuration..."));let t=await va(i.config??"embedoc.config.yaml"),n=t.datasources_dir??".embedoc/datasources",r=await xa(n);console.log(j.default.cyan("\u{1F4E6} Initializing datasources..."));let s=await Mn(t,r.datasourceTypes);console.log(j.default.cyan("\u{1F4C4} Generating files..."));let o=await uf(t,s,{dryRun:i.dryRun,verbose:i.verbose,datasourceName:i.datasource,generatorName:i.generator});await Fn(s);let a=Date.now()-e,c=o.filter(h=>h.success&&!h.skipped).length,l=o.filter(h=>h.skipped).length,f=o.filter(h=>!h.success).length;console.log(""),console.log(j.default.green("\u2705 Generation completed!")),console.log(` Generated: ${c}`),console.log(` Skipped (existing): ${l}`),f>0&&console.log(j.default.red(` Failed: ${f}`)),console.log(` Duration: ${a}ms`),i.dryRun&&console.log(j.default.yellow(`
924
+ `),await n(".embedoc/templates/.gitkeep","");let a=rt("package.json");if(await on(a)){let l=await df(a,{encoding:"utf-8"}),c=JSON.parse(l),f=c.scripts??{},h=!1,p=[["embedoc:build","embedoc build"],["embedoc:watch","embedoc watch"],["embedoc:generate","embedoc generate --all"]];for(let[m,_]of p)m in f||(f[m]=_,h=!0);if(h){c.scripts=f,await hf(a,JSON.stringify(c,null,2)+`
925
+ `,{encoding:"utf-8"}),console.log(j.default.green(" Updated package.json scripts:"));for(let[m,_]of p)l.includes(`"${m}"`)||console.log(j.default.gray(` "${m}": "${_}"`));console.log("")}}if(e.length>0){console.log(j.default.green(" Created:"));for(let l of e)console.log(j.default.gray(` ${l}`))}if(t.length>0){console.log(j.default.yellow(" Skipped (already exists):"));for(let l of t)console.log(j.default.gray(` ${l}`))}console.log(""),console.log(j.default.green("\u2705 embedoc initialized!")),console.log(""),console.log(" Next steps:"),console.log(j.default.cyan(" 1. Edit embedoc.config.yaml to configure targets and datasources")),console.log(j.default.cyan(" 2. Add renderers in .embedoc/renderers/")),console.log(j.default.cyan(" 3. Run: npx embedoc build"))}catch(e){console.error(j.default.red("\u274C Init failed:")),console.error(e instanceof Error?e.message:String(e)),process.exit(1)}},build:async(i,e)=>{let t=Date.now();try{console.log(j.default.cyan("\u{1F527} Loading configuration..."));let n=await va(e.config??"embedoc.config.yaml"),r=n.datasources_dir??".embedoc/datasources",s=await xa(r);console.log(j.default.cyan("\u{1F4E6} Initializing datasources..."));let o=await Mn(n,s.datasourceTypes);console.log(j.default.cyan("\u{1F4DD} Loading renderers..."));let a=ff(n),l=await Sa(a);console.log(j.default.cyan("\u{1F504} Processing files..."));let c=await ko(n,l,o,{dryRun:e.dryRun,verbose:e.verbose,specificFiles:i.length>0?i:void 0,customInlineFormats:s.inlineFormats});await Fn(o);let f=Date.now()-t;console.log(""),console.log(j.default.green("\u2705 Build completed!")),console.log(` Files processed: ${c.totalFiles}`),console.log(` Markers updated: ${c.totalMarkersUpdated}`),console.log(` Success: ${c.successFiles}`),c.failedFiles>0&&console.log(j.default.red(` Failed: ${c.failedFiles}`)),console.log(` Duration: ${f}ms`),e.dryRun&&console.log(j.default.yellow(`
926
+ (Dry run - no files were modified)`));for(let h of c.results)!h.success&&h.error&&(console.error(j.default.red(`
927
+ Error in ${h.filePath}:`)),console.error(` ${h.error.message}`));process.exit(c.failedFiles>0?1:0)}catch(n){console.error(j.default.red("\u274C Build failed:")),console.error(n instanceof Error?n.message:String(n)),process.exit(1)}},generate:async i=>{let e=Date.now();try{!i.datasource&&!i.all&&(console.error(j.default.red("Error: Either --datasource or --all must be specified")),process.exit(1)),console.log(j.default.cyan("\u{1F527} Loading configuration..."));let t=await va(i.config??"embedoc.config.yaml"),n=t.datasources_dir??".embedoc/datasources",r=await xa(n);console.log(j.default.cyan("\u{1F4E6} Initializing datasources..."));let s=await Mn(t,r.datasourceTypes);console.log(j.default.cyan("\u{1F4C4} Generating files..."));let o=await uf(t,s,{dryRun:i.dryRun,verbose:i.verbose,datasourceName:i.datasource,generatorName:i.generator});await Fn(s);let a=Date.now()-e,l=o.filter(h=>h.success&&!h.skipped).length,c=o.filter(h=>h.skipped).length,f=o.filter(h=>!h.success).length;console.log(""),console.log(j.default.green("\u2705 Generation completed!")),console.log(` Generated: ${l}`),console.log(` Skipped (existing): ${c}`),f>0&&console.log(j.default.red(` Failed: ${f}`)),console.log(` Duration: ${a}ms`),i.dryRun&&console.log(j.default.yellow(`
928
928
  (Dry run - no files were created)`));for(let h of o)!h.success&&h.error&&(console.error(j.default.red(`
929
- Error for ${h.filePath}:`)),console.error(` ${h.error.message}`));process.exit(f>0?1:0)}catch(t){console.error(j.default.red("\u274C Generation failed:")),console.error(t instanceof Error?t.message:String(t)),process.exit(1)}},watch:async i=>{try{console.log(j.default.cyan("\u{1F527} Loading configuration..."));let e=await va(i.config??"embedoc.config.yaml"),t=e.datasources_dir??".embedoc/datasources",n=await xa(t);console.log(j.default.cyan("\u{1F4E6} Initializing datasources..."));let r=await Mn(e,n.datasourceTypes);console.log(j.default.cyan("\u{1F4DD} Loading renderers..."));let s=rt(ff(e)),o=await Sa(s);console.log(j.default.cyan("\u{1F517} Building dependency graph..."));let a=new sn(e,o);await a.build(),i.debugDeps&&a.dump();let c=e.targets.map(g=>g.pattern),l=a.getWatchPaths();console.log(j.default.cyan("\u{1F440} Watching for changes...")),console.log(` Document patterns: ${c.join(", ")}`),l.length>0&&console.log(` Additional paths: ${l.map(g=>wa(process.cwd(),g)).join(", ")}`);let f=Ml.watch([...c,...l],{ignored:["**/node_modules/**","**/.git/**"],persistent:!0,ignoreInitial:!0}),h=null,p=new Map,m=async()=>{let g=new Map(p);p.clear();let k=!1;for(let[S]of g)if(S.startsWith(s)&&S.endsWith(".ts")){console.log(j.default.yellow(`
929
+ Error for ${h.filePath}:`)),console.error(` ${h.error.message}`));process.exit(f>0?1:0)}catch(t){console.error(j.default.red("\u274C Generation failed:")),console.error(t instanceof Error?t.message:String(t)),process.exit(1)}},watch:async i=>{try{console.log(j.default.cyan("\u{1F527} Loading configuration..."));let e=await va(i.config??"embedoc.config.yaml"),t=e.datasources_dir??".embedoc/datasources",n=await xa(t);console.log(j.default.cyan("\u{1F4E6} Initializing datasources..."));let r=await Mn(e,n.datasourceTypes);console.log(j.default.cyan("\u{1F4DD} Loading renderers..."));let s=rt(ff(e)),o=await Sa(s);console.log(j.default.cyan("\u{1F517} Building dependency graph..."));let a=new sn(e,o);await a.build(),i.debugDeps&&a.dump();let l=e.targets.map(g=>g.pattern),c=a.getWatchPaths();console.log(j.default.cyan("\u{1F440} Watching for changes...")),console.log(` Document patterns: ${l.join(", ")}`),c.length>0&&console.log(` Additional paths: ${c.map(g=>wa(process.cwd(),g)).join(", ")}`);let f=Ml.watch([...l,...c],{ignored:["**/node_modules/**","**/.git/**"],persistent:!0,ignoreInitial:!0}),h=null,p=new Map,m=async()=>{let g=new Map(p);p.clear();let k=!1;for(let[S]of g)if(S.startsWith(s)&&S.endsWith(".ts")){console.log(j.default.yellow(`
930
930
  \u{1F504} Renderer changed: ${wa(process.cwd(),S)}`)),console.log(j.default.cyan(" Reloading renderers..."));try{o=await Sa(s),k=!0}catch(P){console.error(j.default.red(" Failed to reload renderers:"),P);return}}k&&(console.log(j.default.cyan(" Rebuilding dependency graph...")),a=new sn(e,o),await a.build());let w=new Set;for(let[S]of g){let P=a.getAffectedDocuments(S);for(let D of P)w.add(D)}if(w.size===0)for(let[S]of g){let P=rt(S);for(let D of e.targets){let{glob:B}=await Promise.resolve().then(()=>(Nn(),au));if((await B(D.pattern,{absolute:!0})).includes(P)){w.add(P);break}}}if(w.size===0){console.log(j.default.gray(`
931
931
  No affected documents found`));return}console.log(j.default.yellow(`
932
932
  \u{1F4DD} Rebuilding ${w.size} document(s)...`));for(let S of w)console.log(j.default.gray(` - ${wa(process.cwd(),S)}`));try{await Fn(r),r=await Mn(e,n.datasourceTypes);let S=await ko(e,o,r,{verbose:i.verbose,specificFiles:Array.from(w),customInlineFormats:n.inlineFormats});S.totalMarkersUpdated>0?console.log(j.default.green(` \u2705 Updated ${S.totalMarkersUpdated} marker(s)`)):console.log(j.default.gray(" No markers updated")),a=new sn(e,o),await a.build()}catch(S){console.error(j.default.red(" \u274C Error:"),S)}},_=g=>k=>{p.set(rt(k),g),h&&clearTimeout(h),h=setTimeout(m,200)};f.on("change",_("change")),f.on("add",_("add")),process.on("SIGINT",async()=>{console.log(j.default.cyan(`