embedoc 0.14.15 → 0.14.16

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.
Files changed (44) hide show
  1. package/README.md +24 -4
  2. package/cli-contract.yaml +1 -1
  3. package/dist/core/generator.d.ts.map +1 -1
  4. package/dist/core/generator.js +19 -3
  5. package/dist/core/generator.js.map +1 -1
  6. package/dist/core/inline-datasource.d.ts +3 -1
  7. package/dist/core/inline-datasource.d.ts.map +1 -1
  8. package/dist/core/inline-datasource.js +18 -5
  9. package/dist/core/inline-datasource.js.map +1 -1
  10. package/dist/core/parser.d.ts +2 -1
  11. package/dist/core/parser.d.ts.map +1 -1
  12. package/dist/core/parser.js +6 -3
  13. package/dist/core/parser.js.map +1 -1
  14. package/dist/core/processor.d.ts.map +1 -1
  15. package/dist/core/processor.js +12 -7
  16. package/dist/core/processor.js.map +1 -1
  17. package/dist/datasources/glob.js +2 -2
  18. package/dist/datasources/glob.js.map +1 -1
  19. package/dist/datasources/index.js +1 -1
  20. package/dist/datasources/index.js.map +1 -1
  21. package/dist/datasources/sqlite.d.ts.map +1 -1
  22. package/dist/datasources/sqlite.js +16 -1
  23. package/dist/datasources/sqlite.js.map +1 -1
  24. package/dist/datasources/typescript.js +1 -1
  25. package/dist/datasources/typescript.js.map +1 -1
  26. package/dist/embedoc.bundle.mjs +116 -115
  27. package/dist/embedoc.bundle.mjs.map +4 -4
  28. package/dist/generated/contract.js +2 -2
  29. package/dist/helpers/api-markdown.d.ts.map +1 -1
  30. package/dist/helpers/api-markdown.js +5 -3
  31. package/dist/helpers/api-markdown.js.map +1 -1
  32. package/dist/helpers/markdown.d.ts +5 -0
  33. package/dist/helpers/markdown.d.ts.map +1 -1
  34. package/dist/helpers/markdown.js +10 -1
  35. package/dist/helpers/markdown.js.map +1 -1
  36. package/dist/types/index.d.ts +4 -1
  37. package/dist/types/index.d.ts.map +1 -1
  38. package/dist/utils/glob.d.ts +15 -0
  39. package/dist/utils/glob.d.ts.map +1 -0
  40. package/dist/utils/glob.js +338 -0
  41. package/dist/utils/glob.js.map +1 -0
  42. package/docs/api/README.md +131 -131
  43. package/docs/cli-reference.md +1 -1
  44. package/package.json +11 -7
@@ -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 fd=Object.create;var Va=Object.defineProperty;var dd=Object.getOwnPropertyDescriptor;var pd=Object.getOwnPropertyNames;var md=Object.getPrototypeOf,gd=Object.prototype.hasOwnProperty;var Ve=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var q=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var yd=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of pd(e))!gd.call(t,i)&&i!==r&&Va(t,i,{get:()=>e[i],enumerable:!(n=dd(e,i))||n.enumerable});return t};var zi=(t,e,r)=>(r=t!=null?fd(md(t)):{},yd(e||!t||!t.__esModule?Va(r,"default",{value:t,enumerable:!0}):r,t));var Nl=q((t1,ms)=>{var ln=process||{},Rl=ln.argv||[],an=ln.env||{},Cd=!(an.NO_COLOR||Rl.includes("--no-color"))&&(!!an.FORCE_COLOR||Rl.includes("--color")||ln.platform==="win32"||(ln.stdout||{}).isTTY&&an.TERM!=="dumb"||!!an.CI),Ed=(t,e,r=t)=>n=>{let i=""+n,s=i.indexOf(e,t.length);return~s?t+kd(i,e,r,s)+e:t+i+e},kd=(t,e,r,n)=>{let i="",s=0;do i+=t.substring(s,n)+r,s=n+e.length,n=t.indexOf(e,s);while(~n);return i+t.substring(s)},Ll=(t=Cd)=>{let e=t?Ed:()=>String;return{isColorSupported:t,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")}};ms.exports=Ll();ms.exports.createColors=Ll});var wr=q(Os=>{var yn=class extends Error{constructor(e,r,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=e,this.nestedError=void 0}},As=class extends yn{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Os.CommanderError=yn;Os.InvalidArgumentError=As});var _n=q(Ts=>{var{InvalidArgumentError:wp}=wr(),Ps=class{constructor(e,r){switch(this.description=r||"",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,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}default(e,r){return this.defaultValue=e,this.defaultValueDescription=r,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new wp(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function vp(t){let e=t.name()+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}Ts.Argument=Ps;Ts.humanReadableArgName=vp});var Rs=q(Is=>{var{humanReadableArgName:Sp}=_n(),Ds=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 r=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&r.push(n),this.sortSubcommands&&r.sort((i,s)=>i.name().localeCompare(s.name())),r}compareOptions(e,r){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(r))}visibleOptions(e){let r=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){let i=n.short&&e._findOption(n.short),s=n.long&&e._findOption(n.long);!i&&!s?r.push(n):n.long&&!s?r.push(e.createOption(n.long,n.description)):n.short&&!i&&r.push(e.createOption(n.short,n.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let r=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(s=>!s.hidden);r.push(...i)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(r=>{r.description=r.description||e._argsDescription[r.name()]||""}),e.registeredArguments.find(r=>r.description)?e.registeredArguments:[]}subcommandTerm(e){let r=e.registeredArguments.map(n=>Sp(n)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,r){return r.visibleCommands(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(i)))),0)}longestOptionTermLength(e,r){return r.visibleOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,r){return r.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleOptionTerm(r.optionTerm(i)))),0)}longestArgumentTermLength(e,r){return r.visibleArguments(e).reduce((n,i)=>Math.max(n,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(i)))),0)}commandUsage(e){let r=e._name;e._aliases[0]&&(r=r+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+r+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let r=[];return e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&r.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&r.push(`env: ${e.envVar}`),r.length>0?`${e.description} (${r.join(", ")})`:e.description}argumentDescription(e){let r=[];if(e.argChoices&&r.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&r.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),r.length>0){let n=`(${r.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,r){let n=r.padWidth(e,r),i=r.helpWidth??80;function s(h,p){return r.formatItem(h,n,p,r)}let o=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(e))}`,""],a=r.commandDescription(e);a.length>0&&(o=o.concat([r.boxWrap(r.styleCommandDescription(a),i),""]));let l=r.visibleArguments(e).map(h=>s(r.styleArgumentTerm(r.argumentTerm(h)),r.styleArgumentDescription(r.argumentDescription(h))));l.length>0&&(o=o.concat([r.styleTitle("Arguments:"),...l,""]));let c=r.visibleOptions(e).map(h=>s(r.styleOptionTerm(r.optionTerm(h)),r.styleOptionDescription(r.optionDescription(h))));if(c.length>0&&(o=o.concat([r.styleTitle("Options:"),...c,""])),r.showGlobalOptions){let h=r.visibleGlobalOptions(e).map(p=>s(r.styleOptionTerm(r.optionTerm(p)),r.styleOptionDescription(r.optionDescription(p))));h.length>0&&(o=o.concat([r.styleTitle("Global Options:"),...h,""]))}let f=r.visibleCommands(e).map(h=>s(r.styleSubcommandTerm(r.subcommandTerm(h)),r.styleSubcommandDescription(r.subcommandDescription(h))));return f.length>0&&(o=o.concat([r.styleTitle("Commands:"),...f,""])),o.join(`
5
- `)}displayWidth(e){return nc(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).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(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).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,r){return Math.max(r.longestOptionTermLength(e,r),r.longestGlobalOptionTermLength(e,r),r.longestSubcommandTermLength(e,r),r.longestArgumentTermLength(e,r))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,r,n,i){let o=" ".repeat(2);if(!n)return o+e;let a=e.padEnd(r+e.length-i.displayWidth(e)),l=2,f=(this.helpWidth??80)-r-l-2,h;return f<this.minWidthToWrap||i.preformatted(n)?h=n:h=i.boxWrap(n,f).replace(/\n/g,`
6
- `+" ".repeat(r+l)),o+a+" ".repeat(l)+h.replace(/\n/g,`
7
- ${o}`)}boxWrap(e,r){if(r<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,s=[];return n.forEach(o=>{let a=o.match(i);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<=r){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
- `)}};function nc(t){let e=/\x1b\[\d*(;\d*)*m/g;return t.replace(e,"")}Is.Help=Ds;Is.stripColor=nc});var Fs=q(Ms=>{var{InvalidArgumentError:xp}=wr(),Ls=class{constructor(e,r){this.flags=e,this.description=r||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=Cp(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,r){return this.defaultValue=e,this.defaultValueDescription=r,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let r=e;return typeof e=="string"&&(r={[e]:!0}),this.implied=Object.assign(this.implied||{},r),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,r){return r===this.defaultValue||!Array.isArray(r)?[e]:r.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(r,n)=>{if(!this.argChoices.includes(r))throw new xp(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,n):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?ic(this.name().replace(/^no-/,"")):ic(this.name())}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Ns=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,r){let n=r.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,s=i!==void 0?i:!1;return r.negate===(s===e)}};function ic(t){return t.split("-").reduce((e,r)=>e+r[0].toUpperCase()+r.slice(1))}function Cp(t){let e,r,n=/^-[^-]$/,i=/^--[^-]/,s=t.split(/[ |,]+/).concat("guard");if(n.test(s[0])&&(e=s.shift()),i.test(s[0])&&(r=s.shift()),!e&&n.test(s[0])&&(e=s.shift()),!e&&i.test(s[0])&&(e=r,r=s.shift()),s[0].startsWith("-")){let o=s[0],a=`option creation failed due to '${o}' in option flags '${t}'`;throw/^-[^-][^-]/.test(o)?new Error(`${a}
4
+ var wu=Object.create;var co=Object.defineProperty;var vu=Object.getOwnPropertyDescriptor;var Su=Object.getOwnPropertyNames;var xu=Object.getPrototypeOf,Cu=Object.prototype.hasOwnProperty;var Te=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var B=(n,e)=>()=>{try{return e||n((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var Eu=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Su(e))!Cu.call(n,i)&&i!==t&&co(n,i,{get:()=>e[i],enumerable:!(r=vu(e,i))||r.enumerable});return n};var Fr=(n,e,t)=>(t=n!=null?wu(xu(n)):{},Eu(e||!n||!n.__esModule?co(t,"default",{value:n,enumerable:!0}):t,n));var ta=B((Ag,ai)=>{var yn=process||{},Xo=yn.argv||[],_n=yn.env||{},Du=!(_n.NO_COLOR||Xo.includes("--no-color"))&&(!!_n.FORCE_COLOR||Xo.includes("--color")||yn.platform==="win32"||(yn.stdout||{}).isTTY&&_n.TERM!=="dumb"||!!_n.CI),Lu=(n,e,t=n)=>r=>{let i=""+r,s=i.indexOf(e,n.length);return~s?n+Ru(i,e,t,s)+e:n+i+e},Ru=(n,e,t,r)=>{let i="",s=0;do i+=n.substring(s,r)+t,s=r+e.length,r=n.indexOf(e,s);while(~r);return i+n.substring(s)},ea=(n=Du)=>{let e=n?Lu:()=>String;return{isColorSupported:n,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")}};ai.exports=ea();ai.exports.createColors=ea});var Wt=B(wi=>{var An=class extends Error{constructor(e,t,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},bi=class extends An{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};wi.CommanderError=An;wi.InvalidArgumentError=bi});var Pn=B(Si=>{var{InvalidArgumentError:Of}=Wt(),vi=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,r)=>{if(!this.argChoices.includes(t))throw new Of(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,r):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function If(n){let e=n.name()+(n.variadic===!0?"...":"");return n.required?"<"+e+">":"["+e+"]"}Si.Argument=vi;Si.humanReadableArgName=If});var Ei=B(Ci=>{var{humanReadableArgName:Tf}=Pn(),xi=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(i=>!i._hidden),r=e._getHelpCommand();return r&&!r._hidden&&t.push(r),this.sortSubcommands&&t.sort((i,s)=>i.name().localeCompare(s.name())),t}compareOptions(e,t){let r=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return r(e).localeCompare(r(t))}visibleOptions(e){let t=e.options.filter(i=>!i.hidden),r=e._getHelpOption();if(r&&!r.hidden){let i=r.short&&e._findOption(r.short),s=r.long&&e._findOption(r.long);!i&&!s?t.push(r):r.long&&!s?t.push(e.createOption(r.long,r.description)):r.short&&!i&&t.push(e.createOption(r.short,r.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let r=e.parent;r;r=r.parent){let i=r.options.filter(s=>!s.hidden);t.push(...i)}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(r=>Tf(r)).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((r,i)=>Math.max(r,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(i)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(i)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let r="";for(let i=e.parent;i;i=i.parent)r=i.name()+" "+r;return r+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(r=>JSON.stringify(r)).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(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatHelp(e,t){let r=t.padWidth(e,t),i=t.helpWidth??80;function s(f,p){return t.formatItem(f,r,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),i),""]));let c=t.visibleArguments(e).map(f=>s(t.styleArgumentTerm(t.argumentTerm(f)),t.styleArgumentDescription(t.argumentDescription(f))));c.length>0&&(o=o.concat([t.styleTitle("Arguments:"),...c,""]));let l=t.visibleOptions(e).map(f=>s(t.styleOptionTerm(t.optionTerm(f)),t.styleOptionDescription(t.optionDescription(f))));if(l.length>0&&(o=o.concat([t.styleTitle("Options:"),...l,""])),t.showGlobalOptions){let f=t.visibleGlobalOptions(e).map(p=>s(t.styleOptionTerm(t.optionTerm(p)),t.styleOptionDescription(t.optionDescription(p))));f.length>0&&(o=o.concat([t.styleTitle("Global Options:"),...f,""]))}let d=t.visibleCommands(e).map(f=>s(t.styleSubcommandTerm(t.subcommandTerm(f)),t.styleSubcommandDescription(t.subcommandDescription(f))));return d.length>0&&(o=o.concat([t.styleTitle("Commands:"),...d,""])),o.join(`
5
+ `)}displayWidth(e){return xa(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,r,i){let o=" ".repeat(2);if(!r)return o+e;let a=e.padEnd(t+e.length-i.displayWidth(e)),c=2,d=(this.helpWidth??80)-t-c-2,f;return d<this.minWidthToWrap||i.preformatted(r)?f=r:f=i.boxWrap(r,d).replace(/\n/g,`
6
+ `+" ".repeat(t+c)),o+a+" ".repeat(c)+f.replace(/\n/g,`
7
+ ${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,s=[];return r.forEach(o=>{let a=o.match(i);if(a===null){s.push("");return}let c=[a.shift()],l=this.displayWidth(c[0]);a.forEach(d=>{let f=this.displayWidth(d);if(l+f<=t){c.push(d),l+=f;return}s.push(c.join(""));let p=d.trimStart();c=[p],l=this.displayWidth(p)}),s.push(c.join(""))}),s.join(`
8
+ `)}};function xa(n){let e=/\x1b\[\d*(;\d*)*m/g;return n.replace(e,"")}Ci.Help=xi;Ci.stripColor=xa});var Oi=B(Pi=>{var{InvalidArgumentError:Df}=Wt(),ki=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 r=Lf(e);this.short=r.shortFlag,this.long=r.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,r)=>{if(!this.argChoices.includes(t))throw new Df(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,r):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Ca(this.name().replace(/^no-/,"")):Ca(this.name())}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Ai=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,r)=>{this.positiveOptions.has(r)&&this.dualOptions.add(r)})}valueFromOption(e,t){let r=t.attributeName();if(!this.dualOptions.has(r))return!0;let i=this.negativeOptions.get(r).presetArg,s=i!==void 0?i:!1;return t.negate===(s===e)}};function Ca(n){return n.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Lf(n){let e,t,r=/^-[^-]$/,i=/^--[^-]/,s=n.split(/[ |,]+/).concat("guard");if(r.test(s[0])&&(e=s.shift()),i.test(s[0])&&(t=s.shift()),!e&&r.test(s[0])&&(e=s.shift()),!e&&i.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 '${n}'`;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
- - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):n.test(o)?new Error(`${a}
11
+ - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):r.test(o)?new Error(`${a}
12
12
  - too many short flags`):i.test(o)?new Error(`${a}
13
13
  - too many long flags`):new Error(`${a}
14
- - unrecognised flag format`)}if(e===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${t}'.`);return{shortFlag:e,longFlag:r}}Ms.Option=Ls;Ms.DualOptions=Ns});var oc=q(sc=>{function Ep(t,e){if(Math.abs(t.length-e.length)>3)return Math.max(t.length,e.length);let r=[];for(let n=0;n<=t.length;n++)r[n]=[n];for(let n=0;n<=e.length;n++)r[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=t.length;i++){let s=1;t[i-1]===e[n-1]?s=0:s=1,r[i][n]=Math.min(r[i-1][n]+1,r[i][n-1]+1,r[i-1][n-1]+s),i>1&&n>1&&t[i-1]===e[n-2]&&t[i-2]===e[n-1]&&(r[i][n]=Math.min(r[i][n],r[i-2][n-2]+1))}return r[t.length][e.length]}function kp(t,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let r=t.startsWith("--");r&&(t=t.slice(2),e=e.map(o=>o.slice(2)));let n=[],i=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=Ep(t,o),l=Math.max(t.length,o.length);(l-a)/l>s&&(a<i?(i=a,n=[o]):a===i&&n.push(o))}),n.sort((o,a)=>o.localeCompare(a)),r&&(n=n.map(o=>`--${o}`)),n.length>1?`
15
- (Did you mean one of ${n.join(", ")}?)`:n.length===1?`
16
- (Did you mean ${n[0]}?)`:""}sc.suggestSimilar=kp});var uc=q(js=>{var Ap=Ve("node:events").EventEmitter,Bs=Ve("node:child_process"),at=Ve("node:path"),bn=Ve("node:fs"),Z=Ve("node:process"),{Argument:Op,humanReadableArgName:Pp}=_n(),{CommanderError:qs}=wr(),{Help:Tp,stripColor:Dp}=Rs(),{Option:ac,DualOptions:Ip}=Fs(),{suggestSimilar:lc}=oc(),Hs=class t extends Ap{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:r=>Z.stdout.write(r),writeErr:r=>Z.stderr.write(r),outputError:(r,n)=>n(r),getOutHelpWidth:()=>Z.stdout.isTTY?Z.stdout.columns:void 0,getErrHelpWidth:()=>Z.stderr.isTTY?Z.stderr.columns:void 0,getOutHasColors:()=>$s()??(Z.stdout.isTTY&&Z.stdout.hasColors?.()),getErrHasColors:()=>$s()??(Z.stderr.isTTY&&Z.stderr.hasColors?.()),stripColor:r=>Dp(r)},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 r=this;r;r=r.parent)e.push(r);return e}command(e,r,n){let i=r,s=n;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),l=this.createCommand(o);return i&&(l.description(i),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),i?this:l}createCommand(e){return new t(e)}createHelp(){return Object.assign(new Tp,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,r){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
17
- - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=e._name),(r.noHelp||r.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,r){return new Op(e,r)}argument(e,r,n,i){let s=this.createArgument(e,r);return typeof n=="function"?s.default(i).argParser(n):s.default(n),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(e){let r=this.registeredArguments.slice(-1)[0];if(r&&r.variadic)throw new Error(`only the last argument can be variadic '${r.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,r){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,n,i]=e.match(/([^ ]+) *(.*)/),s=r??"display help for command",o=this.createCommand(n);return o.helpOption(!1),i&&o.arguments(i),s&&o.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(e,r){return typeof e!="object"?(this.helpCommand(e,r),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,r){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
18
- Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(r):this._lifeCycleHooks[e]=[r],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(e,r,n){this._exitCallback&&this._exitCallback(new qs(e,r,n)),Z.exit(e)}action(e){let r=n=>{let i=this.registeredArguments.length,s=n.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=r,this}createOption(e,r){return new ac(e,r)}_callParseArg(e,r,n,i){try{return e.parseArg(r,n)}catch(s){if(s.code==="commander.invalidArgument"){let o=`${i} ${s.message}`;this.error(o,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let r=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(r){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 '${r.flags}'`)}this.options.push(e)}_registerCommand(e){let r=i=>[i.name()].concat(i.aliases()),n=r(e).find(i=>this._findCommand(i));if(n){let i=r(this._findCommand(n)).join("|"),s=r(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${i}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let r=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 i=(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:"+r,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;i(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+r,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;i(s,o,"env")}),this}_optionEx(e,r,n,i,s){if(typeof r=="object"&&r instanceof ac)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(r,n);if(o.makeOptionMandatory(!!e.mandatory),typeof i=="function")o.default(s).argParser(i);else if(i instanceof RegExp){let a=i;i=(l,c)=>{let f=a.exec(l);return f?f[0]:c},o.default(s).argParser(i)}else o.default(i);return this.addOption(o)}option(e,r,n,i){return this._optionEx({},e,r,n,i)}requiredOption(e,r,n,i){return this._optionEx({mandatory:!0},e,r,n,i)}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,r){return this.setOptionValueWithSource(e,r,void 0)}setOptionValueWithSource(e,r,n){return this._storeOptionsAsProperties?this[e]=r:this._optionValues[e]=r,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let r;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(r=n.getOptionValueSource(e))}),r}_prepareUserArgs(e,r){if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},e===void 0&&r.from===void 0){Z.versions?.electron&&(r.from="electron");let i=Z.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(r.from="eval")}e===void 0&&(e=Z.argv),this.rawArgs=e.slice();let n;switch(r.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":Z.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: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,r){this._prepareForParse();let n=this._prepareUserArgs(e,r);return this._parseCommand([],n),this}async parseAsync(e,r){this._prepareForParse();let n=this._prepareUserArgs(e,r);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
- - 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,r,n){if(bn.existsSync(e))return;let i=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",s=`'${e}' does not exist
21
- - if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
14
+ - unrecognised flag format`)}if(e===void 0&&t===void 0)throw new Error(`option creation failed due to no flags found in '${n}'.`);return{shortFlag:e,longFlag:t}}Pi.Option=ki;Pi.DualOptions=Ai});var ka=B(Ea=>{function Rf(n,e){if(Math.abs(n.length-e.length)>3)return Math.max(n.length,e.length);let t=[];for(let r=0;r<=n.length;r++)t[r]=[r];for(let r=0;r<=e.length;r++)t[0][r]=r;for(let r=1;r<=e.length;r++)for(let i=1;i<=n.length;i++){let s=1;n[i-1]===e[r-1]?s=0:s=1,t[i][r]=Math.min(t[i-1][r]+1,t[i][r-1]+1,t[i-1][r-1]+s),i>1&&r>1&&n[i-1]===e[r-2]&&n[i-2]===e[r-1]&&(t[i][r]=Math.min(t[i][r],t[i-2][r-2]+1))}return t[n.length][e.length]}function Nf(n,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=n.startsWith("--");t&&(n=n.slice(2),e=e.map(o=>o.slice(2)));let r=[],i=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=Rf(n,o),c=Math.max(n.length,o.length);(c-a)/c>s&&(a<i?(i=a,r=[o]):a===i&&r.push(o))}),r.sort((o,a)=>o.localeCompare(a)),t&&(r=r.map(o=>`--${o}`)),r.length>1?`
15
+ (Did you mean one of ${r.join(", ")}?)`:r.length===1?`
16
+ (Did you mean ${r[0]}?)`:""}Ea.suggestSimilar=Nf});var Ia=B(Ri=>{var Mf=Te("node:events").EventEmitter,Ii=Te("node:child_process"),We=Te("node:path"),On=Te("node:fs"),Q=Te("node:process"),{Argument:Ff,humanReadableArgName:qf}=Pn(),{CommanderError:Ti}=Wt(),{Help:Bf,stripColor:Hf}=Ei(),{Option:Aa,DualOptions:$f}=Oi(),{suggestSimilar:Pa}=ka(),Di=class n extends Mf{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,r)=>r(t),getOutHelpWidth:()=>Q.stdout.isTTY?Q.stdout.columns:void 0,getErrHelpWidth:()=>Q.stderr.isTTY?Q.stderr.columns:void 0,getOutHasColors:()=>Li()??(Q.stdout.isTTY&&Q.stdout.hasColors?.()),getErrHasColors:()=>Li()??(Q.stderr.isTTY&&Q.stderr.hasColors?.()),stripColor:t=>Hf(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,r){let i=t,s=r;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),c=this.createCommand(o);return i&&(c.description(i),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),i?this:c}createCommand(e){return new n(e)}createHelp(){return Object.assign(new Bf,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
+ - 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 Ff(e,t)}argument(e,t,r,i){let s=this.createArgument(e,t);return typeof r=="function"?s.default(i).argParser(r):s.default(r),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[,r,i]=e.match(/([^ ]+) *(.*)/),s=t??"display help for command",o=this.createCommand(r);return o.helpOption(!1),i&&o.arguments(i),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 r=["preSubcommand","preAction","postAction"];if(!r.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
18
+ Expecting one of '${r.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,r){this._exitCallback&&this._exitCallback(new Ti(e,t,r)),Q.exit(e)}action(e){let t=r=>{let i=this.registeredArguments.length,s=r.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new Aa(e,t)}_callParseArg(e,t,r,i){try{return e.parseArg(t,r)}catch(s){if(s.code==="commander.invalidArgument"){let o=`${i} ${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 r=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 '${r}'
19
+ - already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=i=>[i.name()].concat(i.aliases()),r=t(e).find(i=>this._findCommand(i));if(r){let i=t(this._findCommand(r)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${i}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),r=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(r,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(r,e.defaultValue,"default");let i=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let c=this.getOptionValue(r);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(r,s,a)};return this.on("option:"+t,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;i(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;i(s,o,"env")}),this}_optionEx(e,t,r,i,s){if(typeof t=="object"&&t instanceof Aa)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,r);if(o.makeOptionMandatory(!!e.mandatory),typeof i=="function")o.default(s).argParser(i);else if(i instanceof RegExp){let a=i;i=(c,l)=>{let d=a.exec(c);return d?d[0]:l},o.default(s).argParser(i)}else o.default(i);return this.addOption(o)}option(e,t,r,i){return this._optionEx({},e,t,r,i)}requiredOption(e,t,r,i){return this._optionEx({mandatory:!0},e,t,r,i)}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,r){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=r,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(r=>{r.getOptionValueSource(e)!==void 0&&(t=r.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 i=Q.execArgv??[];(i.includes("-e")||i.includes("--eval")||i.includes("-p")||i.includes("--print"))&&(t.from="eval")}e===void 0&&(e=Q.argv),this.rawArgs=e.slice();let r;switch(t.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":Q.defaultApp?(this._scriptPath=e[1],r=e.slice(2)):r=e.slice(1);break;case"user":r=e.slice(0);break;case"eval":r=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",r}parse(e,t){this._prepareForParse();let r=this._prepareUserArgs(e,t);return this._parseCommand([],r),this}async parseAsync(e,t){this._prepareForParse();let r=this._prepareUserArgs(e,t);return await this._parseCommand([],r),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
+ - 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,r){if(On.existsSync(e))return;let i=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
+ - if '${r}' 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
- - ${i}`;throw new Error(s)}_executeSubCommand(e,r){r=r.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(f,h){let p=at.resolve(f,h);if(bn.existsSync(p))return p;if(i.includes(at.extname(h)))return;let m=i.find(g=>bn.existsSync(`${p}${g}`));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=bn.realpathSync(this._scriptPath)}catch{f=this._scriptPath}a=at.resolve(at.dirname(f),a)}if(a){let f=s(a,o);if(!f&&!e._executableFile&&this._scriptPath){let h=at.basename(this._scriptPath,at.extname(this._scriptPath));h!==this._name&&(f=s(a,`${h}-${e._name}`))}o=f||o}n=i.includes(at.extname(o));let l;Z.platform!=="win32"?n?(r.unshift(o),r=cc(Z.execArgv).concat(r),l=Bs.spawn(Z.argv[0],r,{stdio:"inherit"})):l=Bs.spawn(o,r,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),r.unshift(o),r=cc(Z.execArgv).concat(r),l=Bs.spawn(Z.execPath,r,{stdio:"inherit"})),l.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(h=>{Z.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 qs(f,"commander.executeSubCommandAsync","(close)")):Z.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)Z.exit(1);else{let h=new qs(1,"commander.executeSubCommandAsync","(error)");h.nestedError=f,c(h)}}),this.runningCommand=l}_dispatchSubcommand(e,r,n){let i=this._findCommand(e);i||this.help({error:!0}),i._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,i,"preSubcommand"),s=this._chainOrCall(s,()=>{if(i._executableHandler)this._executeSubCommand(i,r.concat(n));else return i._parseCommand(r,n)}),s}_dispatchHelpCommand(e){e||this.help();let r=this._findCommand(e);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,r)=>{e.required&&this.args[r]==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,i,s)=>{let o=i;if(i!==null&&n.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;o=this._callParseArg(n,i,s,a)}return o};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((n,i)=>{let s=n.defaultValue;n.variadic?i<this.args.length?(s=this.args.slice(i),n.parseArg&&(s=s.reduce((o,a)=>e(n,a,o),n.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],n.parseArg&&(s=e(n,s,n.defaultValue))),r[i]=s}),this.processedArgs=r}_chainOrCall(e,r){return e&&e.then&&typeof e.then=="function"?e.then(()=>r()):r()}_chainOrCallHooks(e,r){let n=e,i=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[r]!==void 0).forEach(s=>{s._lifeCycleHooks[r].forEach(o=>{i.push({hookedCommand:s,callback:o})})}),r==="postAction"&&i.reverse(),i.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,r,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(s=>{i=this._chainOrCall(i,()=>s(this,r))}),i}_parseCommand(e,r){let n=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),r=n.unknown,this.args=e.concat(r),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),r);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,e,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){i(),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,r)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(s))i(),this._processArguments(),this.parent.emit(s,e,r);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,r);this.listenerCount("command:*")?this.emit("command:*",e,r):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(r=>r._name===e||r._aliases.includes(e))}_findOption(e){return this.options.find(r=>r.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(r=>{r.mandatory&&e.getOptionValue(r.attributeName())===void 0&&e.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(s=>n.conflictsWith.includes(s.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let r=[],n=[],i=r,s=e.slice();function o(l){return l.length>1&&l[0]==="-"}let a=null;for(;s.length;){let l=s.shift();if(l==="--"){i===n&&i.push(l),i.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)&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&n.length===0){if(this._findCommand(l)){r.push(l),s.length>0&&n.push(...s);break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){r.push(l),s.length>0&&r.push(...s);break}else if(this._defaultCommandName){n.push(l),s.length>0&&n.push(...s);break}}if(this._passThroughOptions){i.push(l),s.length>0&&i.push(...s);break}i.push(l)}return{operands:r,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},r=this.options.length;for(let n=0;n<r;n++){let i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,r)=>Object.assign(e,r.opts()),{})}error(e,r){this._outputConfiguration.outputError(`${e}
23
+ - ${i}`;throw new Error(s)}_executeSubCommand(e,t){t=t.slice();let r=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(d,f){let p=We.resolve(d,f);if(On.existsSync(p))return p;if(i.includes(We.extname(f)))return;let g=i.find(x=>On.existsSync(`${p}${x}`));if(g)return`${p}${g}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let d;try{d=On.realpathSync(this._scriptPath)}catch{d=this._scriptPath}a=We.resolve(We.dirname(d),a)}if(a){let d=s(a,o);if(!d&&!e._executableFile&&this._scriptPath){let f=We.basename(this._scriptPath,We.extname(this._scriptPath));f!==this._name&&(d=s(a,`${f}-${e._name}`))}o=d||o}r=i.includes(We.extname(o));let c;Q.platform!=="win32"?r?(t.unshift(o),t=Oa(Q.execArgv).concat(t),c=Ii.spawn(Q.argv[0],t,{stdio:"inherit"})):c=Ii.spawn(o,t,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),t.unshift(o),t=Oa(Q.execArgv).concat(t),c=Ii.spawn(Q.execPath,t,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{Q.on(f,()=>{c.killed===!1&&c.exitCode===null&&c.kill(f)})});let l=this._exitCallback;c.on("close",d=>{d=d??1,l?l(new Ti(d,"commander.executeSubCommandAsync","(close)")):Q.exit(d)}),c.on("error",d=>{if(d.code==="ENOENT")this._checkForMissingExecutable(o,a,e._name);else if(d.code==="EACCES")throw new Error(`'${o}' not executable`);if(!l)Q.exit(1);else{let f=new Ti(1,"commander.executeSubCommandAsync","(error)");f.nestedError=d,l(f)}}),this.runningCommand=c}_dispatchSubcommand(e,t,r){let i=this._findCommand(e);i||this.help({error:!0}),i._prepareForParse();let s;return s=this._chainOrCallSubCommandHook(s,i,"preSubcommand"),s=this._chainOrCall(s,()=>{if(i._executableHandler)this._executeSubCommand(i,t.concat(r));else return i._parseCommand(t,r)}),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=(r,i,s)=>{let o=i;if(i!==null&&r.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${r.name()}'.`;o=this._callParseArg(r,i,s,a)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((r,i)=>{let s=r.defaultValue;r.variadic?i<this.args.length?(s=this.args.slice(i),r.parseArg&&(s=s.reduce((o,a)=>e(r,a,o),r.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],r.parseArg&&(s=e(r,s,r.defaultValue))),t[i]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let r=e,i=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(o=>{i.push({hookedCommand:s,callback:o})})}),t==="postAction"&&i.reverse(),i.forEach(s=>{r=this._chainOrCall(r,()=>s.callback(s.hookedCommand,this))}),r}_chainOrCallSubCommandHook(e,t,r){let i=e;return this._lifeCycleHooks[r]!==void 0&&this._lifeCycleHooks[r].forEach(s=>{i=this._chainOrCall(i,()=>s(this,t))}),i}_parseCommand(e,t){let r=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(r.operands),t=r.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(r.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{r.unknown.length>0&&this.unknownOption(r.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){i(),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))i(),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():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),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(r=>{let i=r.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(r=>r.conflictsWith.length>0).forEach(r=>{let i=e.find(s=>r.conflictsWith.includes(s.attributeName()));i&&this._conflictingOption(r,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],r=[],i=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==="--"){i===r&&i.push(c),i.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 d=s.shift();d===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,d)}else if(l.optional){let d=null;s.length>0&&!o(s[0])&&(d=s.shift()),this.emit(`option:${l.name()}`,d)}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("="),d=this._findOption(c.slice(0,l));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,c.slice(l+1));continue}}if(o(c)&&(i=r),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&r.length===0){if(this._findCommand(c)){t.push(c),s.length>0&&r.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){r.push(c),s.length>0&&r.push(...s);break}}if(this._passThroughOptions){i.push(c),s.length>0&&i.push(...s);break}i.push(c)}return{operands:t,unknown:r}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let r=0;r<t;r++){let i=this.options[r].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}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=r||{},i=n.exitCode||1,s=n.code||"commander.error";this._exit(i,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in Z.env){let r=e.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,Z.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Ip(this.options),r=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&r(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!r(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"implied")})})}missingArgument(e){let r=`error: missing required argument '${e}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(e){let r=`error: option '${e.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let r=`error: required option '${e.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,r){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},i=o=>{let a=n(o),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${i(e)} cannot be used with ${i(r)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let r="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);i=i.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);r=lc(e,i)}let n=`error: unknown option '${e}'${r}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,n=r===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],r="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),r=lc(e,i)}let n=`error: unknown command '${e}'${r}`;this.error(n,{code:"commander.unknownCommand"})}version(e,r,n){if(e===void 0)return this._version;this._version=e,r=r||"-V, --version",n=n||"output the version number";let i=this.createOption(r,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
27
- `),this._exit(0,"commander.version",e)}),this}description(e,r){return e===void 0&&r===void 0?this._description:(this._description=e,r&&(this._argsDescription=r),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),e===r._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let i=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}return r._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(r=>this.alias(r)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(n=>Pp(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=at.basename(e,at.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let r=this.createHelp(),n=this._getOutputContext(e);r.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let i=r.formatHelp(this,r);return n.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let r=!!e.error,n,i,s;return r?(n=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(n=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:r,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),n(a)),hasColors:i,helpWidth:s}}outputHelp(e){let r;typeof e=="function"&&(r=e,e=void 0);let n=this._getOutputContext(e),i={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let s=this.helpInformation({error:n.error});if(r&&(s=r(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",i),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",i))}helpOption(e,r){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(e,r),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 r=Number(Z.exitCode??0);r===0&&e&&typeof e!="function"&&e.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(e,r){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
28
- Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,s=>{let o;typeof r=="function"?o=r({error:s.error,command:s.command}):o=r,o&&s.write(`${o}
29
- `)}),this}_outputHelpIfRequested(e){let r=this._getHelpOption();r&&e.find(i=>r.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function cc(t){return t.map(e=>{if(!e.startsWith("--inspect"))return e;let r,n="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?r=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=s[1],/^\d+$/.test(s[3])?i=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=s[1],n=s[3],i=s[4]),r&&i!=="0"?`${r}=${n}:${parseInt(i)+1}`:e})}function $s(){if(Z.env.NO_COLOR||Z.env.FORCE_COLOR==="0"||Z.env.FORCE_COLOR==="false")return!1;if(Z.env.FORCE_COLOR||Z.env.CLICOLOR_FORCE!==void 0)return!0}js.Command=Hs;js.useColor=$s});var pc=q(Me=>{var{Argument:hc}=_n(),{Command:Ws}=uc(),{CommanderError:Rp,InvalidArgumentError:fc}=wr(),{Help:Lp}=Rs(),{Option:dc}=Fs();Me.program=new Ws;Me.createCommand=t=>new Ws(t);Me.createOption=(t,e)=>new dc(t,e);Me.createArgument=(t,e)=>new hc(t,e);Me.Command=Ws;Me.Option=dc;Me.Argument=hc;Me.Help=Lp;Me.CommanderError=Rp;Me.InvalidArgumentError=fc;Me.InvalidOptionArgumentError=fc});var ve=q(Ie=>{"use strict";Ie.__esModule=!0;Ie.extend=ih;Ie.indexOf=fy;Ie.escapeExpression=dy;Ie.isEmpty=py;Ie.createFrame=my;Ie.blockParams=gy;Ie.appendContextPath=yy;var ly={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},cy=/[&<>"'`=]/g,uy=/[&<>"'`=]/;function hy(t){return ly[t]}function ih(t){for(var e=1;e<arguments.length;e++)for(var r in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],r)&&(t[r]=arguments[e][r]);return t}var Ho=Object.prototype.toString;Ie.toString=Ho;var qo=function(e){return typeof e=="function"};qo(/x/)&&(Ie.isFunction=qo=function(t){return typeof t=="function"&&Ho.call(t)==="[object Function]"});Ie.isFunction=qo;var sh=Array.isArray||function(t){return t&&typeof t=="object"?Ho.call(t)==="[object Array]":!1};Ie.isArray=sh;function fy(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function dy(t){if(typeof t!="string"){if(t&&typeof t.toHTML=="function")return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return uy.test(t)?t.replace(cy,hy):t}function py(t){return!t&&t!==0?!0:!!(sh(t)&&t.length===0)}function my(t){var e=ih({},t);return e._parent=t,e}function gy(t,e){return t.path=e,t}function yy(t,e){return(t?t+".":"")+e}});var qe=q((ri,oh)=>{"use strict";ri.__esModule=!0;var $o=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function jo(t,e){var r=e&&e.loc,n=void 0,i=void 0,s=void 0,o=void 0;r&&r.start&&(n=r.start.line,s=r.start.column,r.end&&(i=r.end.line,o=r.end.column),t+=" - "+n+":"+s);for(var a=Error.prototype.constructor.call(this,t),l=0;l<$o.length;l++)this[$o[l]]=a[$o[l]];Error.captureStackTrace&&Error.captureStackTrace(this,jo);try{r&&(this.lineNumber=n,this.endLineNumber=i,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{}}jo.prototype=new Error;ri.default=jo;oh.exports=ri.default});var lh=q((ni,ah)=>{"use strict";ni.__esModule=!0;var Wo=ve();ni.default=function(t){t.registerHelper("blockHelperMissing",function(e,r){var n=r.inverse,i=r.fn;if(e===!0)return i(this);if(e===!1||e==null)return n(this);if(Wo.isArray(e))return e.length>0?(r.ids&&(r.ids=[r.name]),t.helpers.each(e,r)):n(this);if(r.data&&r.ids){var s=Wo.createFrame(r.data);s.contextPath=Wo.appendContextPath(r.data.contextPath,r.name),r={data:s}}return i(e,r)})};ah.exports=ni.default});var uh=q((ii,ch)=>{"use strict";ii.__esModule=!0;function _y(t){return t&&t.__esModule?t:{default:t}}var Jt=ve(),by=qe(),wy=_y(by);function vy(t){try{var e=t.return;Jt.isFunction(e)&&e.call(t)}catch{}}ii.default=function(t){t.registerHelper("each",function(e,r){if(!r)throw new wy.default("Must pass iterator to #each");var n=r.fn,i=r.inverse,s=0,o="",a=void 0,l=void 0;r.data&&r.ids&&(l=Jt.appendContextPath(r.data.contextPath,r.ids[0])+"."),Jt.isFunction(e)&&(e=e.call(this)),r.data&&(a=Jt.createFrame(r.data));function c(g,_,O,b){a&&(a.key=g,a.index=_,a.first=_===0,a.last=!!O,l&&(a.contextPath=l+g)),o=o+n(b,{data:a,blockParams:Jt.blockParams([b,g],[l+g,null])})}if(e&&typeof e=="object")if(Jt.isArray(e))for(var f=e.length;s<f;s++)s in e&&c(s,s,s===e.length-1,e[s]);else if(typeof Symbol=="function"&&e[Symbol.iterator])for(var h=e[Symbol.iterator](),p=h.next();!p.done;){var m=h.next();try{c(s,s,m.done,p.value)}catch(g){throw m.done||vy(h),g}p=m,s++}else(function(){var g=void 0;Object.keys(e).forEach(function(_){g!==void 0&&c(g,s-1,!1,e[g]),g=_,s++}),g!==void 0&&c(g,s-1,!0,e[g])})();return s===0&&(o=i(this)),o})};ch.exports=ii.default});var fh=q((si,hh)=>{"use strict";si.__esModule=!0;function Sy(t){return t&&t.__esModule?t:{default:t}}var xy=qe(),Cy=Sy(xy);si.default=function(t){t.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new Cy.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};hh.exports=si.default});var gh=q((oi,mh)=>{"use strict";oi.__esModule=!0;function Ey(t){return t&&t.__esModule?t:{default:t}}var dh=ve(),ky=qe(),ph=Ey(ky);oi.default=function(t){t.registerHelper("if",function(e,r){if(arguments.length!=2)throw new ph.default("#if requires exactly one argument");return dh.isFunction(e)&&(e=e.call(this)),!r.hash.includeZero&&!e||dh.isEmpty(e)?r.inverse(this):r.fn(this)}),t.registerHelper("unless",function(e,r){if(arguments.length!=2)throw new ph.default("#unless requires exactly one argument");return t.helpers.if.call(this,e,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};mh.exports=oi.default});var _h=q((ai,yh)=>{"use strict";ai.__esModule=!0;ai.default=function(t){t.registerHelper("log",function(){for(var e=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),e[0]=i,t.log.apply(t,e)})};yh.exports=ai.default});var wh=q((li,bh)=>{"use strict";li.__esModule=!0;li.default=function(t){t.registerHelper("lookup",function(e,r,n){return e&&n.lookupProperty(e,r)})};bh.exports=li.default});var Sh=q((ci,vh)=>{"use strict";ci.__esModule=!0;function Ay(t){return t&&t.__esModule?t:{default:t}}var Hr=ve(),Oy=qe(),Py=Ay(Oy);ci.default=function(t){t.registerHelper("with",function(e,r){if(arguments.length!=2)throw new Py.default("#with requires exactly one argument");Hr.isFunction(e)&&(e=e.call(this));var n=r.fn;if(Hr.isEmpty(e))return r.inverse(this);var i=r.data;return r.data&&r.ids&&(i=Hr.createFrame(r.data),i.contextPath=Hr.appendContextPath(r.data.contextPath,r.ids[0])),n(e,{data:i,blockParams:Hr.blockParams([e],[i&&i.contextPath])})})};vh.exports=ci.default});var Vo=q(ui=>{"use strict";ui.__esModule=!0;ui.registerDefaultHelpers=Vy;ui.moveHelperToHooks=zy;function Mt(t){return t&&t.__esModule?t:{default:t}}var Ty=lh(),Dy=Mt(Ty),Iy=uh(),Ry=Mt(Iy),Ly=fh(),Ny=Mt(Ly),My=gh(),Fy=Mt(My),By=_h(),qy=Mt(By),Hy=wh(),$y=Mt(Hy),jy=Sh(),Wy=Mt(jy);function Vy(t){Dy.default(t),Ry.default(t),Ny.default(t),Fy.default(t),qy.default(t),$y.default(t),Wy.default(t)}function zy(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||(t.helpers[e]=void 0))}});var Ch=q((hi,xh)=>{"use strict";hi.__esModule=!0;var Uy=ve();hi.default=function(t){t.registerDecorator("inline",function(e,r,n,i){var s=e;return r.partials||(r.partials={},s=function(o,a){var l=n.partials;n.partials=Uy.extend({},l,r.partials);var c=e(o,a);return n.partials=l,c}),r.partials[i.args[0]]=i.fn,s})};xh.exports=hi.default});var Eh=q(zo=>{"use strict";zo.__esModule=!0;zo.registerDefaultDecorators=Jy;function Gy(t){return t&&t.__esModule?t:{default:t}}var Yy=Ch(),Ky=Gy(Yy);function Jy(t){Ky.default(t)}});var Uo=q((fi,kh)=>{"use strict";fi.__esModule=!0;var Qy=ve(),Qt={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var r=Qy.indexOf(Qt.methodMap,e.toLowerCase());r>=0?e=r:e=parseInt(e,10)}return e},log:function(e){if(e=Qt.lookupLevel(e),typeof console<"u"&&Qt.lookupLevel(Qt.level)<=e){var r=Qt.methodMap[e];console[r]||(r="log");for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];console[r].apply(console,i)}}};fi.default=Qt;kh.exports=fi.default});var Go=q(Zt=>{"use strict";Zt.__esModule=!0;Zt.createProtoAccessControl=t_;Zt.resultIsAllowed=r_;Zt.isPrototypeConstructor=n_;Zt.resetLoggedProperties=s_;function Zy(t){return t&&t.__esModule?t:{default:t}}var Ah=ve(),Xy=Uo(),e_=Zy(Xy),di=Object.create(null);function t_(t){var e=Object.create(null);e.__proto__=!1,Ah.extend(e,t.allowedProtoProperties);var r=Object.create(null);return r.constructor=!1,r.__defineGetter__=!1,r.__defineSetter__=!1,r.__lookupGetter__=!1,r.__lookupSetter__=!1,Ah.extend(r,t.allowedProtoMethods),{properties:{whitelist:e,defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:r,defaultValue:t.allowProtoMethodsByDefault}}}function r_(t,e,r){return Oh(typeof t=="function"?e.methods:e.properties,r)}function n_(t,e,r){return e==="constructor"&&typeof r=="function"&&t===r.prototype}function Oh(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(i_(e),!1)}function i_(t){di[t]!==!0&&(di[t]=!0,e_.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
26
+ `),this.outputHelp({error:!0}));let r=t||{},i=r.exitCode||1,s=r.code||"commander.error";this._exit(i,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 $f(this.options),t=r=>this.getOptionValue(r)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(r));this.options.filter(r=>r.implied!==void 0&&t(r.attributeName())&&e.valueFromOption(this.getOptionValue(r.attributeName()),r)).forEach(r=>{Object.keys(r.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,r.implied[i],"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 r=o=>{let a=o.attributeName(),c=this.getOptionValue(a),l=this.options.find(f=>f.negate&&a===f.attributeName()),d=this.options.find(f=>!f.negate&&a===f.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:d||o},i=o=>{let a=r(o),c=a.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);i=i.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);t=Pa(e,i)}let r=`error: unknown option '${e}'${t}`;this.error(r,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,r=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${r} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),t=Pa(e,i)}let r=`error: unknown command '${e}'${t}`;this.error(r,{code:"commander.unknownCommand"})}version(e,t,r){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",r=r||"output the version number";let i=this.createOption(t,r);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
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 r=this.parent?._findCommand(e);if(r){let i=[r.name()].concat(r.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${i}'`)}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(r=>qf(r));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=We.basename(e,We.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),r=this._getOutputContext(e);t.prepareContext({error:r.error,helpWidth:r.helpWidth,outputHasColors:r.hasColors});let i=t.formatHelp(this,t);return r.hasColors?i:this._outputConfiguration.stripColor(i)}_getOutputContext(e){e=e||{};let t=!!e.error,r,i,s;return t?(r=a=>this._outputConfiguration.writeErr(a),i=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(r=a=>this._outputConfiguration.writeOut(a),i=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:t,write:a=>(i||(a=this._outputConfiguration.stripColor(a)),r(a)),hasColors:i,helpWidth:s}}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let r=this._getOutputContext(e),i={error:r.error,write:r.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",i)),this.emit("beforeHelp",i);let s=this.helpInformation({error:r.error});if(t&&(s=t(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");r.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",i),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",i))}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 r=["beforeAll","before","after","afterAll"];if(!r.includes(e))throw new Error(`Unexpected value for position to addHelpText.
28
+ Expecting one of '${r.join("', '")}'`);let i=`${e}Help`;return this.on(i,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(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Oa(n){return n.map(e=>{if(!e.startsWith("--inspect"))return e;let t,r="127.0.0.1",i="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])?i=s[3]:r=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],r=s[3],i=s[4]),t&&i!=="0"?`${t}=${r}:${parseInt(i)+1}`:e})}function Li(){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}Ri.Command=Di;Ri.useColor=Li});var Ra=B(Ee=>{var{Argument:Ta}=Pn(),{Command:Ni}=Ia(),{CommanderError:Vf,InvalidArgumentError:Da}=Wt(),{Help:jf}=Ei(),{Option:La}=Oi();Ee.program=new Ni;Ee.createCommand=n=>new Ni(n);Ee.createOption=(n,e)=>new La(n,e);Ee.createArgument=(n,e)=>new Ta(n,e);Ee.Command=Ni;Ee.Option=La;Ee.Argument=Ta;Ee.Help=jf;Ee.CommanderError=Vf;Ee.InvalidArgumentError=Da;Ee.InvalidOptionArgumentError=Da});var he=B(Se=>{"use strict";Se.__esModule=!0;Se.extend=hl;Se.indexOf=Nd;Se.escapeExpression=Md;Se.isEmpty=Fd;Se.createFrame=qd;Se.blockParams=Bd;Se.appendContextPath=Hd;var Td={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},Dd=/[&<>"'`=]/g,Ld=/[&<>"'`=]/;function Rd(n){return Td[n]}function hl(n){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&(n[t]=arguments[e][t]);return n}var ss=Object.prototype.toString;Se.toString=ss;var is=function(e){return typeof e=="function"};is(/x/)&&(Se.isFunction=is=function(n){return typeof n=="function"&&ss.call(n)==="[object Function]"});Se.isFunction=is;var pl=Array.isArray||function(n){return n&&typeof n=="object"?ss.call(n)==="[object Array]":!1};Se.isArray=pl;function Nd(n,e){for(var t=0,r=n.length;t<r;t++)if(n[t]===e)return t;return-1}function Md(n){if(typeof n!="string"){if(n&&typeof n.toHTML=="function")return n.toHTML();if(n==null)return"";if(!n)return n+"";n=""+n}return Ld.test(n)?n.replace(Dd,Rd):n}function Fd(n){return!n&&n!==0?!0:!!(pl(n)&&n.length===0)}function qd(n){var e=hl({},n);return e._parent=n,e}function Bd(n,e){return n.path=e,n}function Hd(n,e){return(n?n+".":"")+e}});var ke=B((zn,ml)=>{"use strict";zn.__esModule=!0;var os=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function as(n,e){var t=e&&e.loc,r=void 0,i=void 0,s=void 0,o=void 0;t&&t.start&&(r=t.start.line,s=t.start.column,t.end&&(i=t.end.line,o=t.end.column),n+=" - "+r+":"+s);for(var a=Error.prototype.constructor.call(this,n),c=0;c<os.length;c++)this[os[c]]=a[os[c]];Error.captureStackTrace&&Error.captureStackTrace(this,as);try{t&&(this.lineNumber=r,this.endLineNumber=i,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{}}as.prototype=new Error;zn.default=as;ml.exports=zn.default});var _l=B((Yn,gl)=>{"use strict";Yn.__esModule=!0;var ls=he();Yn.default=function(n){n.registerHelper("blockHelperMissing",function(e,t){var r=t.inverse,i=t.fn;if(e===!0)return i(this);if(e===!1||e==null)return r(this);if(ls.isArray(e))return e.length>0?(t.ids&&(t.ids=[t.name]),n.helpers.each(e,t)):r(this);if(t.data&&t.ids){var s=ls.createFrame(t.data);s.contextPath=ls.appendContextPath(t.data.contextPath,t.name),t={data:s}}return i(e,t)})};gl.exports=Yn.default});var bl=B((Kn,yl)=>{"use strict";Kn.__esModule=!0;function $d(n){return n&&n.__esModule?n:{default:n}}var wt=he(),Vd=ke(),jd=$d(Vd);function Wd(n){try{var e=n.return;wt.isFunction(e)&&e.call(n)}catch{}}Kn.default=function(n){n.registerHelper("each",function(e,t){if(!t)throw new jd.default("Must pass iterator to #each");var r=t.fn,i=t.inverse,s=0,o="",a=void 0,c=void 0;t.data&&t.ids&&(c=wt.appendContextPath(t.data.contextPath,t.ids[0])+"."),wt.isFunction(e)&&(e=e.call(this)),t.data&&(a=wt.createFrame(t.data));function l(x,A,L,O){a&&(a.key=x,a.index=A,a.first=A===0,a.last=!!L,c&&(a.contextPath=c+x)),o=o+r(O,{data:a,blockParams:wt.blockParams([O,x],[c+x,null])})}if(e&&typeof e=="object")if(wt.isArray(e))for(var d=e.length;s<d;s++)s in e&&l(s,s,s===e.length-1,e[s]);else if(typeof Symbol=="function"&&e[Symbol.iterator])for(var f=e[Symbol.iterator](),p=f.next();!p.done;){var g=f.next();try{l(s,s,g.done,p.value)}catch(x){throw g.done||Wd(f),x}p=g,s++}else(function(){var x=void 0;Object.keys(e).forEach(function(A){x!==void 0&&l(x,s-1,!1,e[x]),x=A,s++}),x!==void 0&&l(x,s-1,!0,e[x])})();return s===0&&(o=i(this)),o})};yl.exports=Kn.default});var vl=B((Jn,wl)=>{"use strict";Jn.__esModule=!0;function Ud(n){return n&&n.__esModule?n:{default:n}}var Gd=ke(),zd=Ud(Gd);Jn.default=function(n){n.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new zd.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};wl.exports=Jn.default});var El=B((Qn,Cl)=>{"use strict";Qn.__esModule=!0;function Yd(n){return n&&n.__esModule?n:{default:n}}var Sl=he(),Kd=ke(),xl=Yd(Kd);Qn.default=function(n){n.registerHelper("if",function(e,t){if(arguments.length!=2)throw new xl.default("#if requires exactly one argument");return Sl.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||Sl.isEmpty(e)?t.inverse(this):t.fn(this)}),n.registerHelper("unless",function(e,t){if(arguments.length!=2)throw new xl.default("#unless requires exactly one argument");return n.helpers.if.call(this,e,{fn:t.inverse,inverse:t.fn,hash:t.hash})})};Cl.exports=Qn.default});var Al=B((Zn,kl)=>{"use strict";Zn.__esModule=!0;Zn.default=function(n){n.registerHelper("log",function(){for(var e=[void 0],t=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)e.push(arguments[r]);var i=1;t.hash.level!=null?i=t.hash.level:t.data&&t.data.level!=null&&(i=t.data.level),e[0]=i,n.log.apply(n,e)})};kl.exports=Zn.default});var Ol=B((Xn,Pl)=>{"use strict";Xn.__esModule=!0;Xn.default=function(n){n.registerHelper("lookup",function(e,t,r){return e&&r.lookupProperty(e,t)})};Pl.exports=Xn.default});var Tl=B((er,Il)=>{"use strict";er.__esModule=!0;function Jd(n){return n&&n.__esModule?n:{default:n}}var Jt=he(),Qd=ke(),Zd=Jd(Qd);er.default=function(n){n.registerHelper("with",function(e,t){if(arguments.length!=2)throw new Zd.default("#with requires exactly one argument");Jt.isFunction(e)&&(e=e.call(this));var r=t.fn;if(Jt.isEmpty(e))return t.inverse(this);var i=t.data;return t.data&&t.ids&&(i=Jt.createFrame(t.data),i.contextPath=Jt.appendContextPath(t.data.contextPath,t.ids[0])),r(e,{data:i,blockParams:Jt.blockParams([e],[i&&i.contextPath])})})};Il.exports=er.default});var cs=B(tr=>{"use strict";tr.__esModule=!0;tr.registerDefaultHelpers=hh;tr.moveHelperToHooks=ph;function at(n){return n&&n.__esModule?n:{default:n}}var Xd=_l(),eh=at(Xd),th=bl(),nh=at(th),rh=vl(),ih=at(rh),sh=El(),oh=at(sh),ah=Al(),lh=at(ah),ch=Ol(),uh=at(ch),fh=Tl(),dh=at(fh);function hh(n){eh.default(n),nh.default(n),ih.default(n),oh.default(n),lh.default(n),uh.default(n),dh.default(n)}function ph(n,e,t){n.helpers[e]&&(n.hooks[e]=n.helpers[e],t||(n.helpers[e]=void 0))}});var Ll=B((nr,Dl)=>{"use strict";nr.__esModule=!0;var mh=he();nr.default=function(n){n.registerDecorator("inline",function(e,t,r,i){var s=e;return t.partials||(t.partials={},s=function(o,a){var c=r.partials;r.partials=mh.extend({},c,t.partials);var l=e(o,a);return r.partials=c,l}),t.partials[i.args[0]]=i.fn,s})};Dl.exports=nr.default});var Rl=B(us=>{"use strict";us.__esModule=!0;us.registerDefaultDecorators=bh;function gh(n){return n&&n.__esModule?n:{default:n}}var _h=Ll(),yh=gh(_h);function bh(n){yh.default(n)}});var fs=B((rr,Nl)=>{"use strict";rr.__esModule=!0;var wh=he(),vt={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var t=wh.indexOf(vt.methodMap,e.toLowerCase());t>=0?e=t:e=parseInt(e,10)}return e},log:function(e){if(e=vt.lookupLevel(e),typeof console<"u"&&vt.lookupLevel(vt.level)<=e){var t=vt.methodMap[e];console[t]||(t="log");for(var r=arguments.length,i=Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];console[t].apply(console,i)}}};rr.default=vt;Nl.exports=rr.default});var ds=B(St=>{"use strict";St.__esModule=!0;St.createProtoAccessControl=Ch;St.resultIsAllowed=Eh;St.isPrototypeConstructor=kh;St.resetLoggedProperties=Ph;function vh(n){return n&&n.__esModule?n:{default:n}}var Ml=he(),Sh=fs(),xh=vh(Sh),ir=Object.create(null);function Ch(n){var e=Object.create(null);e.__proto__=!1,Ml.extend(e,n.allowedProtoProperties);var t=Object.create(null);return t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1,t.__lookupSetter__=!1,Ml.extend(t,n.allowedProtoMethods),{properties:{whitelist:e,defaultValue:n.allowProtoPropertiesByDefault},methods:{whitelist:t,defaultValue:n.allowProtoMethodsByDefault}}}function Eh(n,e,t){return Fl(typeof n=="function"?e.methods:e.properties,t)}function kh(n,e,t){return e==="constructor"&&typeof t=="function"&&n===t.prototype}function Fl(n,e){return n.whitelist[e]!==void 0?n.whitelist[e]===!0:n.defaultValue!==void 0?n.defaultValue:(Ah(e),!1)}function Ah(n){ir[n]!==!0&&(ir[n]=!0,xh.default.log("error",'Handlebars: Access has been denied to resolve the property "'+n+`" 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 s_(){Object.keys(di).forEach(function(t){delete di[t]})}});var mi=q(rt=>{"use strict";rt.__esModule=!0;rt.HandlebarsEnvironment=Jo;function Ph(t){return t&&t.__esModule?t:{default:t}}var Ft=ve(),o_=qe(),Yo=Ph(o_),a_=Vo(),l_=Eh(),c_=Uo(),pi=Ph(c_),u_=Go(),h_="4.7.10";rt.VERSION=h_;var f_=8;rt.COMPILER_REVISION=f_;var d_=7;rt.LAST_COMPATIBLE_COMPILER_REVISION=d_;var p_={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"};rt.REVISION_CHANGES=p_;var Ko="[object Object]";function Jo(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},a_.registerDefaultHelpers(this),l_.registerDefaultDecorators(this)}Jo.prototype={constructor:Jo,logger:pi.default,log:pi.default.log,registerHelper:function(e,r){if(Ft.toString.call(e)===Ko){if(r)throw new Yo.default("Arg not supported with multiple helpers");Ft.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(Ft.toString.call(e)===Ko)Ft.extend(this.partials,e);else{if(typeof r>"u")throw new Yo.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,r){if(Ft.toString.call(e)===Ko){if(r)throw new Yo.default("Arg not supported with multiple decorators");Ft.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){u_.resetLoggedProperties()}};var m_=pi.default.log;rt.log=m_;rt.createFrame=Ft.createFrame;rt.logger=pi.default});var Dh=q((gi,Th)=>{"use strict";gi.__esModule=!0;function Qo(t){this.string=t}Qo.prototype.toString=Qo.prototype.toHTML=function(){return""+this.string};gi.default=Qo;Th.exports=gi.default});var Ih=q(Zo=>{"use strict";Zo.__esModule=!0;Zo.wrapHelper=g_;function g_(t,e){if(typeof t!="function")return t;var r=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)};return r}});var Fh=q(kt=>{"use strict";kt.__esModule=!0;kt.checkRevision=S_;kt.template=x_;kt.wrapProgram=yi;kt.resolvePartial=C_;kt.invokePartial=E_;kt.noop=Nh;function y_(t){return t&&t.__esModule?t:{default:t}}function __(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var b_=ve(),Bt=__(b_),w_=qe(),Ye=y_(w_),ht=mi(),Rh=Vo(),v_=Ih(),Xo=Go();function S_(t){var e=t&&t[0]||1,r=ht.COMPILER_REVISION;if(!(e>=ht.LAST_COMPATIBLE_COMPILER_REVISION&&e<=ht.COMPILER_REVISION))if(e<ht.LAST_COMPATIBLE_COMPILER_REVISION){var n=ht.REVISION_CHANGES[r],i=ht.REVISION_CHANGES[e];throw new Ye.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 ("+i+").")}else throw new Ye.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}function x_(t,e){if(!e)throw new Ye.default("No environment passed to template");if(!t||!t.main)throw new Ye.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function n(o,a,l){l.hash&&(a=Bt.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&&Bt.isFunction(o))throw new Ye.default("The partial "+l.name+" returned no output: partials must return a string");if(c==null&&e.compile){if(typeof o!="string")throw new Ye.default("The partial "+l.name+" could not be compiled: partials must be strings or functions returning strings");l.partials[l.name]=e.compile(o,t.compilerOptions,e),c=l.partials[l.name](a,l)}if(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 Ye.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,l,c){if(!a||!(l in a))throw new Ye.default('"'+l+'" not defined in '+a,{loc:c});return i.lookupProperty(a,l)},lookupProperty:function(a,l){var c=a[l];if(c==null||Object.prototype.hasOwnProperty.call(a,l)&&!Xo.isPrototypeConstructor(a,l,c)||Xo.resultIsAllowed(c,i.protoAccessControl,l))return c},lookup:function(a,l){for(var c=a.length,f=0;f<c;f++){var h=a[f]&&i.lookupProperty(a[f],l);if(h!=null)return h}},lambda:function(a,l){return typeof a=="function"?a.call(l):a},escapeExpression:Bt.escapeExpression,invokePartial:n,fn:function(a){var l=t[a];return l.decorator=t[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=yi(this,a,m,l,c,f,h):p||(p=this.programs[a]=yi(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=Bt.extend({},l,a)),c},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function s(o){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=a.data;s._setup(a),!a.partial&&t.useData&&(l=k_(o,l));var c=void 0,f=t.useBlockParams?[]:void 0;t.useDepths&&(a.depths?c=o!=a.depths[0]?[o].concat(a.depths):a.depths:c=[o]);function h(p){return""+t.main(i,p,i.helpers,i.partials,l,f,c)}return h=Mh(t.main,h,i,a.depths||[],l,f),h(o,a)}return s.isTop=!0,s._setup=function(o){if(o.partial)i.protoAccessControl=o.protoAccessControl,i.helpers=o.helpers,i.partials=o.partials,i.decorators=o.decorators,i.hooks=o.hooks;else{var a={};Lh(a,e.helpers,i),Lh(a,o.helpers,i),i.helpers=a,t.usePartial&&(i.partials=i.mergeIfNeeded(o.partials,e.partials)),(t.usePartial||t.useDecorators)&&(i.decorators=Bt.extend({},e.decorators,o.decorators)),i.hooks={},i.protoAccessControl=Xo.createProtoAccessControl(o);var l=o.allowCallsToHelperMissing||r;Rh.moveHelperToHooks(i,"helperMissing",l),Rh.moveHelperToHooks(i,"blockHelperMissing",l)}},s._child=function(o,a,l,c){if(t.useBlockParams&&!l)throw new Ye.default("must pass block params");if(t.useDepths&&!c)throw new Ye.default("must pass parent depths");return yi(i,o,t[o],a,0,l,c)},s}function yi(t,e,r,n,i,s,o){function a(l){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],f=o;return o&&l!=o[0]&&!(l===t.nullContext&&o[0]===null)&&(f=[l].concat(o)),r(t,l,t.helpers,t.partials,c.data||n,s&&[c.blockParams].concat(s),f)}return a=Mh(r,a,t,o,n,s),a.program=e,a.depth=o?o.length:0,a.blockParams=i||0,a}function C_(t,e,r){return t?typeof t!="function"&&!r.name&&(r.name=t,t=_i(r.partials,t)):r.name==="@partial-block"?t=_i(r.data,"partial-block"):t=_i(r.partials,r.name),t}function E_(t,e,r){var n=_i(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var i=void 0;if(r.fn&&r.fn!==Nh&&(function(){r.data=ht.createFrame(r.data);var s=r.fn;i=r.data["partial-block"]=function(a){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=ht.createFrame(l.data),l.data["partial-block"]=n,s(a,l)},s.partials&&(r.partials=Bt.extend({},r.partials,s.partials))})(),t===void 0&&i&&(t=i),t===void 0)throw new Ye.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function Nh(){return""}function _i(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}function k_(t,e){return(!e||!("root"in e))&&(e=e?ht.createFrame(e):{},e.root=t),e}function Mh(t,e,r,n,i,s){if(t.decorator){var o={};e=t.decorator(e,o,r,n&&n[0],i,s,n),Bt.extend(e,o)}return e}function Lh(t,e,r){e&&Object.keys(e).forEach(function(n){var i=e[n];t[n]=A_(i,r)})}function A_(t,e){var r=e.lookupProperty;return v_.wrapHelper(t,function(n){return n.lookupProperty=r,n})}});var ea=q((bi,Bh)=>{"use strict";bi.__esModule=!0;bi.default=function(t){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=e),t}};Bh.exports=bi.default});var Wh=q((wi,jh)=>{"use strict";wi.__esModule=!0;function ra(t){return t&&t.__esModule?t:{default:t}}function na(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var O_=mi(),qh=na(O_),P_=Dh(),T_=ra(P_),D_=qe(),I_=ra(D_),R_=ve(),ta=na(R_),L_=Fh(),Hh=na(L_),N_=ea(),M_=ra(N_);function $h(){var t=new qh.HandlebarsEnvironment;return ta.extend(t,qh),t.SafeString=T_.default,t.Exception=I_.default,t.Utils=ta,t.escapeExpression=ta.escapeExpression,t.VM=Hh,t.template=function(e){return Hh.template(e,t)},t}var $r=$h();$r.create=$h;M_.default($r);$r.default=$r;wi.default=$r;jh.exports=wi.default});var ia=q((vi,zh)=>{"use strict";vi.__esModule=!0;var Vh={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&&!Vh.helpers.scopedId(e)&&!e.depth}}};vi.default=Vh;zh.exports=vi.default});var Gh=q((Si,Uh)=>{"use strict";Si.__esModule=!0;var F_=(function(){var t={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(i,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(i,s){throw new Error(i)},parse:function(i){var s=this,o=[0],a=[null],l=[],c=this.table,f="",h=0,p=0,m=0,g=2,_=1;this.lexer.setInput(i),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var O=this.lexer.yylloc;l.push(O);var b=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function S(E){o.length=o.length-2*E,a.length=a.length-E,l.length=l.length-E}function I(){var E;return E=s.lexer.lex()||1,typeof E!="number"&&(E=s.symbols_[E]||E),E}for(var L,N,z,U,$,Q,ee={},ue,ae,ke,B;;){if(z=o[o.length-1],this.defaultActions[z]?U=this.defaultActions[z]:((L===null||typeof L>"u")&&(L=I()),U=c[z]&&c[z][L]),typeof U>"u"||!U.length||!U[0]){var Ne="";if(!m){B=[];for(ue in c[z])this.terminals_[ue]&&ue>2&&B.push("'"+this.terminals_[ue]+"'");this.lexer.showPosition?Ne="Parse error on line "+(h+1)+`:
31
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function Ph(){Object.keys(ir).forEach(function(n){delete ir[n]})}});var or=B(Be=>{"use strict";Be.__esModule=!0;Be.HandlebarsEnvironment=ms;function ql(n){return n&&n.__esModule?n:{default:n}}var lt=he(),Oh=ke(),hs=ql(Oh),Ih=cs(),Th=Rl(),Dh=fs(),sr=ql(Dh),Lh=ds(),Rh="4.7.10";Be.VERSION=Rh;var Nh=8;Be.COMPILER_REVISION=Nh;var Mh=7;Be.LAST_COMPATIBLE_COMPILER_REVISION=Mh;var Fh={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"};Be.REVISION_CHANGES=Fh;var ps="[object Object]";function ms(n,e,t){this.helpers=n||{},this.partials=e||{},this.decorators=t||{},Ih.registerDefaultHelpers(this),Th.registerDefaultDecorators(this)}ms.prototype={constructor:ms,logger:sr.default,log:sr.default.log,registerHelper:function(e,t){if(lt.toString.call(e)===ps){if(t)throw new hs.default("Arg not supported with multiple helpers");lt.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(lt.toString.call(e)===ps)lt.extend(this.partials,e);else{if(typeof t>"u")throw new hs.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(lt.toString.call(e)===ps){if(t)throw new hs.default("Arg not supported with multiple decorators");lt.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){Lh.resetLoggedProperties()}};var qh=sr.default.log;Be.log=qh;Be.createFrame=lt.createFrame;Be.logger=sr.default});var Hl=B((ar,Bl)=>{"use strict";ar.__esModule=!0;function gs(n){this.string=n}gs.prototype.toString=gs.prototype.toHTML=function(){return""+this.string};ar.default=gs;Bl.exports=ar.default});var $l=B(_s=>{"use strict";_s.__esModule=!0;_s.wrapHelper=Bh;function Bh(n,e){if(typeof n!="function")return n;var t=function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),n.apply(this,arguments)};return t}});var Gl=B(nt=>{"use strict";nt.__esModule=!0;nt.checkRevision=Uh;nt.template=Gh;nt.wrapProgram=lr;nt.resolvePartial=zh;nt.invokePartial=Yh;nt.noop=Wl;function Hh(n){return n&&n.__esModule?n:{default:n}}function $h(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}var Vh=he(),ct=$h(Vh),jh=ke(),Le=Hh(jh),Ue=or(),Vl=cs(),Wh=$l(),ys=ds();function Uh(n){var e=n&&n[0]||1,t=Ue.COMPILER_REVISION;if(!(e>=Ue.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Ue.COMPILER_REVISION))if(e<Ue.LAST_COMPATIBLE_COMPILER_REVISION){var r=Ue.REVISION_CHANGES[t],i=Ue.REVISION_CHANGES[e];throw new Le.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+i+").")}else throw new Le.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+n[1]+").")}function Gh(n,e){if(!e)throw new Le.default("No environment passed to template");if(!n||!n.main)throw new Le.default("Unknown template object: "+typeof n);n.main.decorator=n.main_d,e.VM.checkRevision(n.compiler);var t=n.compiler&&n.compiler[0]===7;function r(o,a,c){c.hash&&(a=ct.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&&ct.isFunction(o))throw new Le.default("The partial "+c.name+" returned no output: partials must return a string");if(l==null&&e.compile){if(typeof o!="string")throw new Le.default("The partial "+c.name+" could not be compiled: partials must be strings or functions returning strings");c.partials[c.name]=e.compile(o,n.compilerOptions,e),l=c.partials[c.name](a,c)}if(l!=null){if(c.indent){for(var d=l.split(`
32
+ `),f=0,p=d.length;f<p&&!(!d[f]&&f+1===p);f++)d[f]=c.indent+d[f];l=d.join(`
33
+ `)}return l}else throw new Le.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}var i={strict:function(a,c,l){if(!a||!(c in a))throw new Le.default('"'+c+'" not defined in '+a,{loc:l});return i.lookupProperty(a,c)},lookupProperty:function(a,c){var l=a[c];if(l==null||Object.prototype.hasOwnProperty.call(a,c)&&!ys.isPrototypeConstructor(a,c,l)||ys.resultIsAllowed(l,i.protoAccessControl,c))return l},lookup:function(a,c){for(var l=a.length,d=0;d<l;d++){var f=a[d]&&i.lookupProperty(a[d],c);if(f!=null)return f}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:ct.escapeExpression,invokePartial:r,fn:function(a){var c=n[a];return c.decorator=n[a+"_d"],c},programs:[],program:function(a,c,l,d,f){var p=this.programs[a],g=this.fn(a);return c||f||d||l?p=lr(this,a,g,c,l,d,f):p||(p=this.programs[a]=lr(this,a,g)),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=ct.extend({},c,a)),l},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:n.compiler};function s(o){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=a.data;s._setup(a),!a.partial&&n.useData&&(c=Kh(o,c));var l=void 0,d=n.useBlockParams?[]:void 0;n.useDepths&&(a.depths?l=o!=a.depths[0]?[o].concat(a.depths):a.depths:l=[o]);function f(p){return""+n.main(i,p,i.helpers,i.partials,c,d,l)}return f=Ul(n.main,f,i,a.depths||[],c,d),f(o,a)}return s.isTop=!0,s._setup=function(o){if(o.partial)i.protoAccessControl=o.protoAccessControl,i.helpers=o.helpers,i.partials=o.partials,i.decorators=o.decorators,i.hooks=o.hooks;else{var a={};jl(a,e.helpers,i),jl(a,o.helpers,i),i.helpers=a,n.usePartial&&(i.partials=i.mergeIfNeeded(o.partials,e.partials)),(n.usePartial||n.useDecorators)&&(i.decorators=ct.extend({},e.decorators,o.decorators)),i.hooks={},i.protoAccessControl=ys.createProtoAccessControl(o);var c=o.allowCallsToHelperMissing||t;Vl.moveHelperToHooks(i,"helperMissing",c),Vl.moveHelperToHooks(i,"blockHelperMissing",c)}},s._child=function(o,a,c,l){if(n.useBlockParams&&!c)throw new Le.default("must pass block params");if(n.useDepths&&!l)throw new Le.default("must pass parent depths");return lr(i,o,n[o],a,0,c,l)},s}function lr(n,e,t,r,i,s,o){function a(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=o;return o&&c!=o[0]&&!(c===n.nullContext&&o[0]===null)&&(d=[c].concat(o)),t(n,c,n.helpers,n.partials,l.data||r,s&&[l.blockParams].concat(s),d)}return a=Ul(t,a,n,o,r,s),a.program=e,a.depth=o?o.length:0,a.blockParams=i||0,a}function zh(n,e,t){return n?typeof n!="function"&&!t.name&&(t.name=n,n=cr(t.partials,n)):t.name==="@partial-block"?n=cr(t.data,"partial-block"):n=cr(t.partials,t.name),n}function Yh(n,e,t){var r=cr(t.data,"partial-block");t.partial=!0,t.ids&&(t.data.contextPath=t.ids[0]||t.data.contextPath);var i=void 0;if(t.fn&&t.fn!==Wl&&(function(){t.data=Ue.createFrame(t.data);var s=t.fn;i=t.data["partial-block"]=function(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=Ue.createFrame(c.data),c.data["partial-block"]=r,s(a,c)},s.partials&&(t.partials=ct.extend({},t.partials,s.partials))})(),n===void 0&&i&&(n=i),n===void 0)throw new Le.default("The partial "+t.name+" could not be found");if(n instanceof Function)return n(e,t)}function Wl(){return""}function cr(n,e){if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e]}function Kh(n,e){return(!e||!("root"in e))&&(e=e?Ue.createFrame(e):{},e.root=n),e}function Ul(n,e,t,r,i,s){if(n.decorator){var o={};e=n.decorator(e,o,t,r&&r[0],i,s,r),ct.extend(e,o)}return e}function jl(n,e,t){e&&Object.keys(e).forEach(function(r){var i=e[r];n[r]=Jh(i,t)})}function Jh(n,e){var t=e.lookupProperty;return Wh.wrapHelper(n,function(r){return r.lookupProperty=t,r})}});var bs=B((ur,zl)=>{"use strict";ur.__esModule=!0;ur.default=function(n){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;n.noConflict=function(){return globalThis.Handlebars===n&&(globalThis.Handlebars=e),n}};zl.exports=ur.default});var Zl=B((fr,Ql)=>{"use strict";fr.__esModule=!0;function vs(n){return n&&n.__esModule?n:{default:n}}function Ss(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}var Qh=or(),Yl=Ss(Qh),Zh=Hl(),Xh=vs(Zh),ep=ke(),tp=vs(ep),np=he(),ws=Ss(np),rp=Gl(),Kl=Ss(rp),ip=bs(),sp=vs(ip);function Jl(){var n=new Yl.HandlebarsEnvironment;return ws.extend(n,Yl),n.SafeString=Xh.default,n.Exception=tp.default,n.Utils=ws,n.escapeExpression=ws.escapeExpression,n.VM=Kl,n.template=function(e){return Kl.template(e,n)},n}var Qt=Jl();Qt.create=Jl;sp.default(Qt);Qt.default=Qt;fr.default=Qt;Ql.exports=fr.default});var xs=B((dr,ec)=>{"use strict";dr.__esModule=!0;var Xl={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&&!Xl.helpers.scopedId(e)&&!e.depth}}};dr.default=Xl;ec.exports=dr.default});var nc=B((hr,tc)=>{"use strict";hr.__esModule=!0;var op=(function(){var n={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(i,s,o,a,c,l,d){var f=l.length-1;switch(c){case 1:return l[f-1];case 2:this.$=a.prepareProgram(l[f]);break;case 3:this.$=l[f];break;case 4:this.$=l[f];break;case 5:this.$=l[f];break;case 6:this.$=l[f];break;case 7:this.$=l[f];break;case 8:this.$=l[f];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(l[f]),strip:a.stripFlags(l[f],l[f]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[f],value:l[f],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(l[f-2],l[f-1],l[f],this._$);break;case 12:this.$={path:l[f-3],params:l[f-2],hash:l[f-1]};break;case 13:this.$=a.prepareBlock(l[f-3],l[f-2],l[f-1],l[f],!1,this._$);break;case 14:this.$=a.prepareBlock(l[f-3],l[f-2],l[f-1],l[f],!0,this._$);break;case 15:this.$={open:l[f-5],path:l[f-4],params:l[f-3],hash:l[f-2],blockParams:l[f-1],strip:a.stripFlags(l[f-5],l[f])};break;case 16:this.$={path:l[f-4],params:l[f-3],hash:l[f-2],blockParams:l[f-1],strip:a.stripFlags(l[f-5],l[f])};break;case 17:this.$={path:l[f-4],params:l[f-3],hash:l[f-2],blockParams:l[f-1],strip:a.stripFlags(l[f-5],l[f])};break;case 18:this.$={strip:a.stripFlags(l[f-1],l[f-1]),program:l[f]};break;case 19:var p=a.prepareBlock(l[f-2],l[f-1],l[f],l[f],!1,this._$),g=a.prepareProgram([p],l[f-1].loc);g.chained=!0,this.$={strip:l[f-2].strip,program:g,chain:!0};break;case 20:this.$=l[f];break;case 21:this.$={path:l[f-1],strip:a.stripFlags(l[f-2],l[f])};break;case 22:this.$=a.prepareMustache(l[f-3],l[f-2],l[f-1],l[f-4],a.stripFlags(l[f-4],l[f]),this._$);break;case 23:this.$=a.prepareMustache(l[f-3],l[f-2],l[f-1],l[f-4],a.stripFlags(l[f-4],l[f]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[f-3],params:l[f-2],hash:l[f-1],indent:"",strip:a.stripFlags(l[f-4],l[f]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(l[f-2],l[f-1],l[f],this._$);break;case 26:this.$={path:l[f-3],params:l[f-2],hash:l[f-1],strip:a.stripFlags(l[f-4],l[f])};break;case 27:this.$=l[f];break;case 28:this.$=l[f];break;case 29:this.$={type:"SubExpression",path:l[f-3],params:l[f-2],hash:l[f-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[f],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(l[f-2]),value:l[f],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(l[f-1]);break;case 33:this.$=l[f];break;case 34:this.$=l[f];break;case 35:this.$={type:"StringLiteral",value:l[f],original:l[f],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[f]),original:Number(l[f]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[f]==="true",original:l[f]==="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[f];break;case 41:this.$=l[f];break;case 42:this.$=a.preparePath(!0,l[f],this._$);break;case 43:this.$=a.preparePath(!1,l[f],this._$);break;case 44:l[f-2].push({part:a.id(l[f]),original:l[f],separator:l[f-1]}),this.$=l[f-2];break;case 45:this.$=[{part:a.id(l[f]),original:l[f]}];break;case 46:this.$=[];break;case 47:l[f-1].push(l[f]);break;case 48:this.$=[];break;case 49:l[f-1].push(l[f]);break;case 50:this.$=[];break;case 51:l[f-1].push(l[f]);break;case 58:this.$=[];break;case 59:l[f-1].push(l[f]);break;case 64:this.$=[];break;case 65:l[f-1].push(l[f]);break;case 70:this.$=[];break;case 71:l[f-1].push(l[f]);break;case 78:this.$=[];break;case 79:l[f-1].push(l[f]);break;case 82:this.$=[];break;case 83:l[f-1].push(l[f]);break;case 86:this.$=[];break;case 87:l[f-1].push(l[f]);break;case 90:this.$=[];break;case 91:l[f-1].push(l[f]);break;case 94:this.$=[];break;case 95:l[f-1].push(l[f]);break;case 98:this.$=[l[f]];break;case 99:l[f-1].push(l[f]);break;case 100:this.$=[l[f]];break;case 101:l[f-1].push(l[f]);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(i,s){throw new Error(i)},parse:function(i){var s=this,o=[0],a=[null],c=[],l=this.table,d="",f=0,p=0,g=0,x=2,A=1;this.lexer.setInput(i),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var L=this.lexer.yylloc;c.push(L);var O=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function T(v){o.length=o.length-2*v,a.length=a.length-v,c.length=c.length-v}function D(){var v;return v=s.lexer.lex()||1,typeof v!="number"&&(v=s.symbols_[v]||v),v}for(var F,M,G,J,W,X,ne={},ye,oe,be,q;;){if(G=o[o.length-1],this.defaultActions[G]?J=this.defaultActions[G]:((F===null||typeof F>"u")&&(F=D()),J=l[G]&&l[G][F]),typeof J>"u"||!J.length||!J[0]){var me="";if(!g){q=[];for(ye in l[G])this.terminals_[ye]&&ye>2&&q.push("'"+this.terminals_[ye]+"'");this.lexer.showPosition?me="Parse error on line "+(f+1)+`:
34
34
  `+this.lexer.showPosition()+`
35
- Expecting `+B.join(", ")+", got '"+(this.terminals_[L]||L)+"'":Ne="Parse error on line "+(h+1)+": Unexpected "+(L==1?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(Ne,{text:this.lexer.match,token:this.terminals_[L]||L,line:this.lexer.yylineno,loc:O,expected:B})}}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+L);switch(U[0]){case 1:o.push(L),a.push(this.lexer.yytext),l.push(this.lexer.yylloc),o.push(U[1]),L=null,N?(L=N,N=null):(p=this.lexer.yyleng,f=this.lexer.yytext,h=this.lexer.yylineno,O=this.lexer.yylloc,m>0&&m--);break;case 2:if(ae=this.productions_[U[1]][1],ee.$=a[a.length-ae],ee._$={first_line:l[l.length-(ae||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(ae||1)].first_column,last_column:l[l.length-1].last_column},b&&(ee._$.range=[l[l.length-(ae||1)].range[0],l[l.length-1].range[1]]),Q=this.performAction.call(ee,f,p,h,this.yy,U[1],a,l),typeof Q<"u")return Q;ae&&(o=o.slice(0,-1*ae*2),a=a.slice(0,-1*ae),l=l.slice(0,-1*ae)),o.push(this.productions_[U[1]][0]),a.push(ee.$),l.push(ee._$),ke=c[o[o.length-2]][o[o.length-1]],o.push(ke);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})();t.lexer=e;function r(){this.yy={}}return r.prototype=t,t.Parser=r,new r})();Si.default=F_;Uh.exports=Si.default});var oa=q(sa=>{"use strict";sa.__esModule=!0;var B_=["Program","BlockStatement","DecoratorBlock","PartialStatement","PartialBlockStatement","Decorator","MustacheStatement","ContentStatement","CommentStatement","SubExpression","PathExpression","StringLiteral","NumberLiteral","BooleanLiteral","UndefinedLiteral","NullLiteral","Hash","HashPair"];sa.NODE_TYPES=B_});var ki=q((Ei,Qh)=>{"use strict";Ei.__esModule=!0;function q_(t){return t&&t.__esModule?t:{default:t}}var H_=qe(),aa=q_(H_),$_=ve(),j_=oa();function Ci(){this.parents=[]}function Yh(t,e){return $_.indexOf(j_.NODE_TYPES,e)!==-1||!(e in Ci.prototype)&&typeof t[e]=="function"}Ci.prototype={constructor:Ci,mutating:!1,acceptKey:function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!Yh(this,n.type))throw new aa.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},acceptRequired:function(e,r){if(this.acceptKey(e,r),!e[r])throw new aa.default(e.type+" requires "+r)},acceptArray:function(e){for(var r=0,n=e.length;r<n;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,n--)},accept:function(e){if(e){if(!Yh(this,e.type)||!this[e.type])throw new aa.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return e}},Program:function(e){this.acceptArray(e.body)},MustacheStatement:xi,Decorator:xi,BlockStatement:Kh,DecoratorBlock:Kh,PartialStatement:Jh,PartialBlockStatement:function(e){Jh.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:xi,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 xi(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function Kh(t){xi.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function Jh(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}Ei.default=Ci;Qh.exports=Ei.default});var Xh=q((Ai,Zh)=>{"use strict";Ai.__esModule=!0;function W_(t){return t&&t.__esModule?t:{default:t}}var V_=ki(),z_=W_(V_);function nt(){var t=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=t}nt.prototype=new z_.default;nt.prototype.Program=function(t){var e=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=t.body,i=0,s=n.length;i<s;i++){var o=n[i],a=this.accept(o);if(a){var l=la(n,i,r),c=ca(n,i,r),f=a.openStandalone&&l,h=a.closeStandalone&&c,p=a.inlineStandalone&&l&&c;a.close&&qt(n,i,!0),a.open&&At(n,i,!0),e&&p&&(qt(n,i),At(n,i)&&o.type==="PartialStatement"&&(o.indent=/(?:^|[^ \t])([ \t]+)$/.exec(n[i-1].original)[1])),e&&f&&(qt((o.program||o.inverse).body),At(n,i)),e&&h&&(qt(n,i),At((o.inverse||o.program).body))}}return t};nt.prototype.BlockStatement=nt.prototype.DecoratorBlock=nt.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,r=t.program&&t.inverse,n=r,i=r;if(r&&r.chained)for(n=r.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var s={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:ca(e.body),closeStandalone:la((n||e).body)};if(t.openStrip.close&&qt(e.body,null,!0),r){var o=t.inverseStrip;o.open&&At(e.body,null,!0),o.close&&qt(n.body,null,!0),t.closeStrip.open&&At(i.body,null,!0),!this.options.ignoreStandalone&&la(e.body)&&ca(n.body)&&(At(e.body),qt(n.body))}else t.closeStrip.open&&At(e.body,null,!0);return s};nt.prototype.Decorator=nt.prototype.MustacheStatement=function(t){return t.strip};nt.prototype.PartialStatement=nt.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function la(t,e,r){e===void 0&&(e=t.length);var n=t[e-1],i=t[e-2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/(?:^|\S)[^\S\n]*\n\s*$/:/^\s*$|(?:^|\S)[^\S\n]*\n\s*$/).test(n.original)}function ca(t,e,r){e===void 0&&(e=-1);var n=t[e+1],i=t[e+2];if(!n)return r;if(n.type==="ContentStatement")return(i||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function qt(t,e,r){var n=t[e==null?0:e+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var i=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==i}}function At(t,e,r){var n=t[e==null?t.length-1:e-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var i=n.value;return n.value=n.value.replace(r?/(^|\S)\s+$/:/(^|[^ \t])[ \t]+$/,"$1"),n.leftStripped=n.value!==i,n.leftStripped}}Ai.default=nt;Zh.exports=Ai.default});var ef=q(He=>{"use strict";He.__esModule=!0;He.SourceLocation=Y_;He.id=K_;He.stripFlags=J_;He.stripComment=Q_;He.preparePath=Z_;He.prepareMustache=X_;He.prepareRawBlock=eb;He.prepareBlock=tb;He.prepareProgram=rb;He.preparePartialBlock=nb;function U_(t){return t&&t.__esModule?t:{default:t}}var G_=qe(),ua=U_(G_);function ha(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new ua.default(t.path.original+" doesn't match "+e,r)}}function Y_(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function K_(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function J_(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function Q_(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function Z_(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",i=[],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(i.length>0)throw new ua.default("Invalid path: "+n,{loc:r});l===".."&&s++}else i.push(l)}return{type:"PathExpression",data:t,depth:s,parts:i,original:n,loc:r}}function X_(t,e,r,n,i,s){var o=n.charAt(3)||n.charAt(2),a=o!=="{"&&o!=="&",l=/\*/.test(n);return{type:l?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:a,strip:i,loc:this.locInfo(s)}}function eb(t,e,r,n){ha(t,r),n=this.locInfo(n);var i={type:"Program",body:e,strip:{},loc:n};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function tb(t,e,r,n,i,s){n&&n.path&&ha(t,n);var o=/\*/.test(t.open);e.blockParams=t.blockParams;var a=void 0,l=void 0;if(r){if(o)throw new ua.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),l=r.strip,a=r.program}return i&&(i=a,a=e,e=i),{type:o?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:a,openStrip:t.strip,inverseStrip:l,closeStrip:n&&n.strip,loc:this.locInfo(s)}}function rb(t,e){if(!e&&t.length){var r=t[0].loc,n=t[t.length-1].loc;r&&n&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function nb(t,e,r,n){return ha(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}});var nf=q(jr=>{"use strict";jr.__esModule=!0;jr.parseWithoutProcessing=rf;jr.parse=hb;function ib(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function tf(t){return t&&t.__esModule?t:{default:t}}var sb=Gh(),fa=tf(sb),ob=Xh(),ab=tf(ob),lb=ef(),cb=ib(lb),ub=ve();jr.parser=fa.default;var Oi={};ub.extend(Oi,cb);function rf(t,e){if(t.type==="Program")return t;fa.default.yy=Oi,Oi.locInfo=function(n){return new Oi.SourceLocation(e&&e.srcName,n)};var r=fa.default.parse(t);return r}function hb(t,e){var r=rf(t,e),n=new ab.default(e);return n.accept(r)}});var cf=q(Vr=>{"use strict";Vr.__esModule=!0;Vr.Compiler=ma;Vr.precompile=gb;Vr.compile=yb;function of(t){return t&&t.__esModule?t:{default:t}}var fb=qe(),Xt=of(fb),Ot=ve(),db=ia(),Wr=of(db),pb=oa(),mb=[].slice;function ma(){}ma.prototype={compiler:ma,equals:function(e){var r=this.opcodes.length;if(e.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var i=this.opcodes[n],s=e.opcodes[n];if(i.opcode!==s.opcode||!lf(i.args,s.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(e.children[n]))return!1;return!0},guid:0,compile:function(e,r){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=r,this.stringParams=r.stringParams,this.trackIds=r.trackIds,r.blockParams=r.blockParams||[],r.knownHelpers=Ot.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(e)},compileProgram:function(e){var r=new this.compiler,n=r.compile(e,this.options),i=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[i]=n,this.useDepths=this.useDepths||n.useDepths,i},accept:function(e){if(Ot.indexOf(pb.NODE_TYPES,e.type)===-1||!this[e.type])throw new Xt.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var r=this[e.type](e);return this.sourceNode.shift(),r},Program:function(e){_b(e),this.options.blockParams.unshift(e.blockParams);for(var r=e.body,n=r.length,i=0;i<n;i++)this.accept(r[i]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){sf(e);var r=e.program,n=e.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,r,n):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var r=e.program&&this.compileProgram(e.program),n=this.setupFullMustacheParams(e,r,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var r=e.program;r&&(r=this.compileProgram(e.program));var n=e.params;if(n.length>1)throw new Xt.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 i=e.name.original,s=e.name.type==="SubExpression";s&&this.accept(e.name),this.setupFullMustacheParams(e,r,void 0,!0);var o=e.indent||"";this.options.preventIndent&&o&&(this.opcode("appendContent",o),o=""),this.opcode("invokePartial",s,i,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){if(e.value!=null&&typeof e.value!="string")throw ft(e,"value must be a string");e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){sf(e);var r=this.classifySexpr(e);r==="simple"?this.simpleSexpr(e):r==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,r,n){var i=e.path,s=i.parts[0],o=r!=null||n!=null;this.opcode("getContext",da(i)),this.opcode("pushProgram",r),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",s,o)},simpleSexpr:function(e){var r=e.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,r,n){var i=this.setupFullMustacheParams(e,r,n),s=e.path,o=s.parts[0];if(this.options.knownHelpers[o])this.opcode("invokeKnownHelper",i.length,o);else{if(this.options.knownHelpersOnly)throw new Xt.default("You specified knownHelpersOnly, but used the unknown helper "+o,e);s.strict=!0,s.falsy=!0,this.accept(s),this.opcode("invokeHelper",i.length,s.original,Wr.default.helpers.simpleId(s))}},PathExpression:function(e){var r=da(e),n=pa(e);this.addDepth(r),this.opcode("getContext",r);var i=n[0],s=Wr.default.helpers.scopedId(e),o=!r&&!s&&this.blockParamIndex(i);o?this.opcode("lookupBlockParam",o,n):i?e.data?(this.options.data=!0,this.opcode("lookupData",r,n,e.strict)):this.opcode("lookupOnContext",n,e.falsy,e.strict,s):this.opcode("pushContext")},StringLiteral:function(e){Pi(e),this.opcode("pushString",e.value)},NumberLiteral:function(e){Pi(e),this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){Pi(e),this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var r=e.pairs,n=0,i=void 0;if(!Ot.isArray(r))throw ft(e,"pairs must be an array");i=r.length;for(var s=0;s<i;s++)if(!r[s]||typeof r[s].key!="string")throw ft(e,"pair keys must be strings");for(this.opcode("pushHash");n<i;n++)this.pushParam(r[n].value);for(;n--;)this.opcode("assignToHash",r[n].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:mb.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){pa(e.path);var r=Wr.default.helpers.simpleId(e.path),n=r&&!!this.blockParamIndex(e.path.parts[0]),i=!n&&Wr.default.helpers.helperExpression(e),s=!n&&(i||r);if(s&&!i){var o=e.path.parts[0],a=this.options;a.knownHelpers[o]?i=!0:a.knownHelpersOnly&&(s=!1)}return i?"helper":s?"ambiguous":"simple"},pushParams:function(e){for(var r=0,n=e.length;r<n;r++)this.pushParam(e[r])},pushParam:function(e){Pi(e);var r=e.value!=null?e.value:e.original||"",n=da(e);if(this.stringParams)typeof r!="number"&&typeof r!="boolean"&&(r=String(r)),r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),n&&this.addDepth(n),this.opcode("getContext",n),this.opcode("pushStringParam",r,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var i=void 0;if(e.parts&&!Wr.default.helpers.scopedId(e)&&!n&&(i=this.blockParamIndex(pa(e)[0])),i){var s=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",i,s)}else r=e.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,r)}this.accept(e)}},setupFullMustacheParams:function(e,r,n,i){var s=e.params;return this.pushParams(s),this.opcode("pushProgram",r),this.opcode("pushProgram",n),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),s},blockParamIndex:function(e){for(var r=0,n=this.options.blockParams.length;r<n;r++){var i=this.options.blockParams[r],s=i&&Ot.indexOf(i,e);if(i&&s>=0)return[r,s]}}};function gb(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new Xt.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=r.parse(t,e),i=new r.Compiler().compile(n,e);return new r.JavaScriptCompiler().compile(i,e)}function yb(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new Xt.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=Ot.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var n=void 0;function i(){var o=r.parse(t,e),a=new r.Compiler().compile(o,e),l=new r.JavaScriptCompiler().compile(a,e,void 0,!0);return r.template(l)}function s(o,a){return n||(n=i()),n.call(this,o,a)}return s._setup=function(o){return n||(n=i()),n._setup(o)},s._child=function(o,a,l,c){return n||(n=i()),n._child(o,a,l,c)},s}function ft(t,e){return new Xt.default("Invalid AST: "+t.type+" "+e,t)}function da(t){var e=t.depth;if(e==null)return 0;if(typeof e!="number"||!isFinite(e)||Math.floor(e)!==e||e<0)throw ft(t,"depth must be a non-negative integer");return e}function Pi(t){var e=t.value;if(t.type==="StringLiteral"&&typeof e!="string")throw ft(t,"value must be a string");if(t.type==="NumberLiteral"&&typeof e!="number")throw ft(t,"value must be a number");if(t.type==="BooleanLiteral"&&typeof e!="boolean")throw ft(t,"value must be a boolean")}function af(t,e,r){if(!Ot.isArray(e))throw ft(t,r+" must be an array");for(var n=0;n<e.length;n++)if(typeof e[n]!="string")throw ft(t,r+" must only contain strings");return e}function pa(t){return af(t,t.parts,"parts")}function _b(t){t.blockParams!=null&&af(t,t.blockParams,"blockParams")}function lf(t,e){if(t===e)return!0;if(Ot.isArray(t)&&Ot.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!lf(t[r],e[r]))return!1;return!0}}function sf(t){if(!t.path.parts){var e=t.path;t.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}});var hf=q(ga=>{var uf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");ga.encode=function(t){if(0<=t&&t<uf.length)return uf[t];throw new TypeError("Must be between 0 and 63: "+t)};ga.decode=function(t){var e=65,r=90,n=97,i=122,s=48,o=57,a=43,l=47,c=26,f=52;return e<=t&&t<=r?t-e:n<=t&&t<=i?t-n+c:s<=t&&t<=o?t-s+f:t==a?62:t==l?63:-1}});var ba=q(_a=>{var ff=hf(),ya=5,df=1<<ya,pf=df-1,mf=df;function bb(t){return t<0?(-t<<1)+1:(t<<1)+0}function wb(t){var e=(t&1)===1,r=t>>1;return e?-r:r}_a.encode=function(e){var r="",n,i=bb(e);do n=i&pf,i>>>=ya,i>0&&(n|=mf),r+=ff.encode(n);while(i>0);return r};_a.decode=function(e,r,n){var i=e.length,s=0,o=0,a,l;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(l=ff.decode(e.charCodeAt(r++)),l===-1)throw new Error("Invalid base64 digit: "+e.charAt(r-1));a=!!(l&mf),l&=pf,s=s+(l<<o),o+=ya}while(a);n.value=wb(s),n.rest=r}});var rr=q(Se=>{function vb(t,e,r){if(e in t)return t[e];if(arguments.length===3)return r;throw new Error('"'+e+'" is a required argument.')}Se.getArg=vb;var gf=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Sb=/^data:.+\,.+$/;function zr(t){var e=t.match(gf);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}Se.urlParse=zr;function er(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}Se.urlGenerate=er;function wa(t){var e=t,r=zr(t);if(r){if(!r.path)return t;e=r.path}for(var n=Se.isAbsolute(e),i=e.split(/\/+/),s,o=0,a=i.length-1;a>=0;a--)s=i[a],s==="."?i.splice(a,1):s===".."?o++:o>0&&(s===""?(i.splice(a+1,o),o=0):(i.splice(a,2),o--));return e=i.join("/"),e===""&&(e=n?"/":"."),r?(r.path=e,er(r)):e}Se.normalize=wa;function yf(t,e){t===""&&(t="."),e===""&&(e=".");var r=zr(e),n=zr(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),er(r);if(r||e.match(Sb))return e;if(n&&!n.host&&!n.path)return n.host=e,er(n);var i=e.charAt(0)==="/"?e:wa(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,er(n)):i}Se.join=yf;Se.isAbsolute=function(t){return t.charAt(0)==="/"||gf.test(t)};function xb(t,e){t===""&&(t="."),t=t.replace(/\/$/,"");for(var r=0;e.indexOf(t+"/")!==0;){var n=t.lastIndexOf("/");if(n<0||(t=t.slice(0,n),t.match(/^([^\/]+:\/)?\/*$/)))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)}Se.relative=xb;var _f=(function(){var t=Object.create(null);return!("__proto__"in t)})();function bf(t){return t}function Cb(t){return wf(t)?"$"+t:t}Se.toSetString=_f?bf:Cb;function Eb(t){return wf(t)?t.slice(1):t}Se.fromSetString=_f?bf:Eb;function wf(t){if(!t)return!1;var e=t.length;if(e<9||t.charCodeAt(e-1)!==95||t.charCodeAt(e-2)!==95||t.charCodeAt(e-3)!==111||t.charCodeAt(e-4)!==116||t.charCodeAt(e-5)!==111||t.charCodeAt(e-6)!==114||t.charCodeAt(e-7)!==112||t.charCodeAt(e-8)!==95||t.charCodeAt(e-9)!==95)return!1;for(var r=e-10;r>=0;r--)if(t.charCodeAt(r)!==36)return!1;return!0}function kb(t,e,r){var n=tr(t.source,e.source);return n!==0||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0||r)||(n=t.generatedColumn-e.generatedColumn,n!==0)||(n=t.generatedLine-e.generatedLine,n!==0)?n:tr(t.name,e.name)}Se.compareByOriginalPositions=kb;function Ab(t,e,r){var n=t.generatedLine-e.generatedLine;return n!==0||(n=t.generatedColumn-e.generatedColumn,n!==0||r)||(n=tr(t.source,e.source),n!==0)||(n=t.originalLine-e.originalLine,n!==0)||(n=t.originalColumn-e.originalColumn,n!==0)?n:tr(t.name,e.name)}Se.compareByGeneratedPositionsDeflated=Ab;function tr(t,e){return t===e?0:t===null?1:e===null?-1:t>e?1:-1}function Ob(t,e){var r=t.generatedLine-e.generatedLine;return r!==0||(r=t.generatedColumn-e.generatedColumn,r!==0)||(r=tr(t.source,e.source),r!==0)||(r=t.originalLine-e.originalLine,r!==0)||(r=t.originalColumn-e.originalColumn,r!==0)?r:tr(t.name,e.name)}Se.compareByGeneratedPositionsInflated=Ob;function Pb(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))}Se.parseSourceMapInput=Pb;function Tb(t,e,r){if(e=e||"",t&&(t[t.length-1]!=="/"&&e[0]!=="/"&&(t+="/"),e=t+e),r){var n=zr(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=yf(er(n),e)}return wa(e)}Se.computeSourceURL=Tb});var xa=q(vf=>{var va=rr(),Sa=Object.prototype.hasOwnProperty,Ht=typeof Map<"u";function dt(){this._array=[],this._set=Ht?new Map:Object.create(null)}dt.fromArray=function(e,r){for(var n=new dt,i=0,s=e.length;i<s;i++)n.add(e[i],r);return n};dt.prototype.size=function(){return Ht?this._set.size:Object.getOwnPropertyNames(this._set).length};dt.prototype.add=function(e,r){var n=Ht?e:va.toSetString(e),i=Ht?this.has(e):Sa.call(this._set,n),s=this._array.length;(!i||r)&&this._array.push(e),i||(Ht?this._set.set(e,s):this._set[n]=s)};dt.prototype.has=function(e){if(Ht)return this._set.has(e);var r=va.toSetString(e);return Sa.call(this._set,r)};dt.prototype.indexOf=function(e){if(Ht){var r=this._set.get(e);if(r>=0)return r}else{var n=va.toSetString(e);if(Sa.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};dt.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};dt.prototype.toArray=function(){return this._array.slice()};vf.ArraySet=dt});var Cf=q(xf=>{var Sf=rr();function Db(t,e){var r=t.generatedLine,n=e.generatedLine,i=t.generatedColumn,s=e.generatedColumn;return n>r||n==r&&s>=i||Sf.compareByGeneratedPositionsInflated(t,e)<=0}function Ti(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Ti.prototype.unsortedForEach=function(e,r){this._array.forEach(e,r)};Ti.prototype.add=function(e){Db(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};Ti.prototype.toArray=function(){return this._sorted||(this._array.sort(Sf.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};xf.MappingList=Ti});var Ca=q(Ef=>{var Ur=ba(),ce=rr(),Di=xa().ArraySet,Ib=Cf().MappingList;function $e(t){t||(t={}),this._file=ce.getArg(t,"file",null),this._sourceRoot=ce.getArg(t,"sourceRoot",null),this._skipValidation=ce.getArg(t,"skipValidation",!1),this._sources=new Di,this._names=new Di,this._mappings=new Ib,this._sourcesContents=null}$e.prototype._version=3;$e.fromSourceMap=function(e){var r=e.sourceRoot,n=new $e({file:e.file,sourceRoot:r});return e.eachMapping(function(i){var s={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(s.source=i.source,r!=null&&(s.source=ce.relative(r,s.source)),s.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(s.name=i.name)),n.addMapping(s)}),e.sources.forEach(function(i){var s=i;r!==null&&(s=ce.relative(r,i)),n._sources.has(s)||n._sources.add(s);var o=e.sourceContentFor(i);o!=null&&n.setSourceContent(i,o)}),n};$e.prototype.addMapping=function(e){var r=ce.getArg(e,"generated"),n=ce.getArg(e,"original",null),i=ce.getArg(e,"source",null),s=ce.getArg(e,"name",null);this._skipValidation||this._validateMapping(r,n,i,s),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:s})};$e.prototype.setSourceContent=function(e,r){var n=e;this._sourceRoot!=null&&(n=ce.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ce.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[ce.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};$e.prototype.applySourceMap=function(e,r,n){var i=r;if(r==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.`);i=e.file}var s=this._sourceRoot;s!=null&&(i=ce.relative(s,i));var o=new Di,a=new Di;this._mappings.unsortedForEach(function(l){if(l.source===i&&l.originalLine!=null){var c=e.originalPositionFor({line:l.originalLine,column:l.originalColumn});c.source!=null&&(l.source=c.source,n!=null&&(l.source=ce.join(n,l.source)),s!=null&&(l.source=ce.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=ce.join(n,l)),s!=null&&(l=ce.relative(s,l)),this.setSourceContent(l,c))},this)};$e.prototype._validateMapping=function(e,r,n,i){if(r&&typeof r.line!="number"&&typeof r.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&&!r&&!n&&!i)){if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:i}))}};$e.prototype._serializeMappings=function(){for(var e=0,r=1,n=0,i=0,s=0,o=0,a="",l,c,f,h,p=this._mappings.toArray(),m=0,g=p.length;m<g;m++){if(c=p[m],l="",c.generatedLine!==r)for(e=0;c.generatedLine!==r;)l+=";",r++;else if(m>0){if(!ce.compareByGeneratedPositionsInflated(c,p[m-1]))continue;l+=","}l+=Ur.encode(c.generatedColumn-e),e=c.generatedColumn,c.source!=null&&(h=this._sources.indexOf(c.source),l+=Ur.encode(h-o),o=h,l+=Ur.encode(c.originalLine-1-i),i=c.originalLine-1,l+=Ur.encode(c.originalColumn-n),n=c.originalColumn,c.name!=null&&(f=this._names.indexOf(c.name),l+=Ur.encode(f-s),s=f)),a+=l}return a};$e.prototype._generateSourcesContent=function(e,r){return e.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=ce.relative(r,n));var i=ce.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};$e.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};$e.prototype.toString=function(){return JSON.stringify(this.toJSON())};Ef.SourceMapGenerator=$e});var kf=q($t=>{$t.GREATEST_LOWER_BOUND=1;$t.LEAST_UPPER_BOUND=2;function Ea(t,e,r,n,i,s){var o=Math.floor((e-t)/2)+t,a=i(r,n[o],!0);return a===0?o:a>0?e-o>1?Ea(o,e,r,n,i,s):s==$t.LEAST_UPPER_BOUND?e<n.length?e:-1:o:o-t>1?Ea(t,o,r,n,i,s):s==$t.LEAST_UPPER_BOUND?o:t<0?-1:t}$t.search=function(e,r,n,i){if(r.length===0)return-1;var s=Ea(-1,r.length,e,r,n,i||$t.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s}});var Of=q(Af=>{function ka(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Rb(t,e){return Math.round(t+Math.random()*(e-t))}function Aa(t,e,r,n){if(r<n){var i=Rb(r,n),s=r-1;ka(t,i,n);for(var o=t[n],a=r;a<n;a++)e(t[a],o)<=0&&(s+=1,ka(t,s,a));ka(t,s+1,a);var l=s+1;Aa(t,e,r,l-1),Aa(t,e,l+1,n)}}Af.quickSort=function(t,e){Aa(t,e,0,t.length-1)}});var Tf=q(Ii=>{var F=rr(),Oa=kf(),nr=xa().ArraySet,Lb=ba(),Gr=Of().quickSort;function te(t,e){var r=t;return typeof t=="string"&&(r=F.parseSourceMapInput(t)),r.sections!=null?new Ke(r,e):new ge(r,e)}te.fromSourceMap=function(t,e){return ge.fromSourceMap(t,e)};te.prototype._version=3;te.prototype.__generatedMappings=null;Object.defineProperty(te.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});te.prototype.__originalMappings=null;Object.defineProperty(te.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});te.prototype._charIsMappingSeparator=function(e,r){var n=e.charAt(r);return n===";"||n===","};te.prototype._parseMappings=function(e,r){throw new Error("Subclasses must implement _parseMappings")};te.GENERATED_ORDER=1;te.ORIGINAL_ORDER=2;te.GREATEST_LOWER_BOUND=1;te.LEAST_UPPER_BOUND=2;te.prototype.eachMapping=function(e,r,n){var i=r||null,s=n||te.GENERATED_ORDER,o;switch(s){case te.GENERATED_ORDER:o=this._generatedMappings;break;case te.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,i)};te.prototype.allGeneratedPositionsFor=function(e){var r=F.getArg(e,"line"),n={source:F.getArg(e,"source"),originalLine:r,originalColumn:F.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,Oa.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;)i.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===r&&o.originalColumn==l;)i.push({line:F.getArg(o,"generatedLine",null),column:F.getArg(o,"generatedColumn",null),lastColumn:F.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return i};Ii.SourceMapConsumer=te;function ge(t,e){var r=t;typeof t=="string"&&(r=F.parseSourceMapInput(t));var n=F.getArg(r,"version"),i=F.getArg(r,"sources"),s=F.getArg(r,"names",[]),o=F.getArg(r,"sourceRoot",null),a=F.getArg(r,"sourcesContent",null),l=F.getArg(r,"mappings"),c=F.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=F.normalize(o)),i=i.map(String).map(F.normalize).map(function(f){return o&&F.isAbsolute(o)&&F.isAbsolute(f)?F.relative(o,f):f}),this._names=nr.fromArray(s.map(String),!0),this._sources=nr.fromArray(i,!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}ge.prototype=Object.create(te.prototype);ge.prototype.consumer=te;ge.prototype._findSourceIndex=function(t){var e=t;if(this.sourceRoot!=null&&(e=F.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==t)return r;return-1};ge.fromSourceMap=function(e,r){var n=Object.create(ge.prototype),i=n._names=nr.fromArray(e._names.toArray(),!0),s=n._sources=nr.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(m){return F.computeSourceURL(n.sourceRoot,m,r)});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 Pf;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=i.indexOf(h.name)),l.push(p)),a.push(p)}return Gr(n.__originalMappings,F.compareByOriginalPositions),n};ge.prototype._version=3;Object.defineProperty(ge.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Pf(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}ge.prototype._parseMappings=function(e,r){for(var n=1,i=0,s=0,o=0,a=0,l=0,c=e.length,f=0,h={},p={},m=[],g=[],_,O,b,S,I;f<c;)if(e.charAt(f)===";")n++,f++,i=0;else if(e.charAt(f)===",")f++;else{for(_=new Pf,_.generatedLine=n,S=f;S<c&&!this._charIsMappingSeparator(e,S);S++);if(O=e.slice(f,S),b=h[O],b)f+=O.length;else{for(b=[];f<S;)Lb.decode(e,f,p),I=p.value,f=p.rest,b.push(I);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");h[O]=b}_.generatedColumn=i+b[0],i=_.generatedColumn,b.length>1&&(_.source=a+b[1],a+=b[1],_.originalLine=s+b[2],s=_.originalLine,_.originalLine+=1,_.originalColumn=o+b[3],o=_.originalColumn,b.length>4&&(_.name=l+b[4],l+=b[4])),g.push(_),typeof _.originalLine=="number"&&m.push(_)}Gr(g,F.compareByGeneratedPositionsDeflated),this.__generatedMappings=g,Gr(m,F.compareByOriginalPositions),this.__originalMappings=m};ge.prototype._findMapping=function(e,r,n,i,s,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return Oa.search(e,r,s,o)};ge.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var r=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};ge.prototype.originalPositionFor=function(e){var r={generatedLine:F.getArg(e,"line"),generatedColumn:F.getArg(e,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",F.compareByGeneratedPositionsDeflated,F.getArg(e,"bias",te.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=F.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=F.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=F.getArg(i,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:F.getArg(i,"originalLine",null),column:F.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};ge.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};ge.prototype.sourceContentFor=function(e,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var i=e;this.sourceRoot!=null&&(i=F.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=F.urlParse(this.sourceRoot))){var o=i.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("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};ge.prototype.generatedPositionFor=function(e){var r=F.getArg(e,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:F.getArg(e,"line"),originalColumn:F.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",F.compareByOriginalPositions,F.getArg(e,"bias",te.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];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}};Ii.BasicSourceMapConsumer=ge;function Ke(t,e){var r=t;typeof t=="string"&&(r=F.parseSourceMapInput(t));var n=F.getArg(r,"version"),i=F.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new nr,this._names=new nr;var s={line:-1,column:0};this._sections=i.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 te(F.getArg(o,"map"),e)}})}Ke.prototype=Object.create(te.prototype);Ke.prototype.constructor=te;Ke.prototype._version=3;Object.defineProperty(Ke.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}});Ke.prototype.originalPositionFor=function(e){var r={generatedLine:F.getArg(e,"line"),generatedColumn:F.getArg(e,"column")},n=Oa.search(r,this._sections,function(s,o){var a=s.generatedLine-o.generatedOffset.generatedLine;return a||s.generatedColumn-o.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};Ke.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};Ke.prototype.sourceContentFor=function(e,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],s=i.consumer.sourceContentFor(e,!0);if(s)return s}if(r)return null;throw new Error('"'+e+'" is not in the SourceMap.')};Ke.prototype.generatedPositionFor=function(e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(F.getArg(e,"source"))!==-1){var i=n.consumer.generatedPositionFor(e);if(i){var s={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};Ke.prototype._parseMappings=function(e,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],s=i.consumer._generatedMappings,o=0;o<s.length;o++){var a=s[o],l=i.consumer._sources.at(a.source);l=F.computeSourceURL(i.consumer.sourceRoot,l,this._sourceMapURL),this._sources.add(l),l=this._sources.indexOf(l);var c=null;a.name&&(c=i.consumer._names.at(a.name),this._names.add(c),c=this._names.indexOf(c));var f={source:l,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:c};this.__generatedMappings.push(f),typeof f.originalLine=="number"&&this.__originalMappings.push(f)}Gr(this.__generatedMappings,F.compareByGeneratedPositionsDeflated),Gr(this.__originalMappings,F.compareByOriginalPositions)};Ii.IndexedSourceMapConsumer=Ke});var If=q(Df=>{var Nb=Ca().SourceMapGenerator,Ri=rr(),Mb=/(\r?\n)/,Fb=10,ir="$$$isSourceNode$$$";function Re(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=t??null,this.column=e??null,this.source=r??null,this.name=i??null,this[ir]=!0,n!=null&&this.add(n)}Re.fromStringWithSourceMap=function(e,r,n){var i=new Re,s=e.split(Mb),o=0,a=function(){var p=g(),m=g()||"";return p+m;function g(){return o<s.length?s[o++]:void 0}},l=1,c=0,f=null;return r.eachMapping(function(p){if(f!==null)if(l<p.generatedLine)h(f,a()),l++,c=0;else{var m=s[o]||"",g=m.substr(0,p.generatedColumn-c);s[o]=m.substr(p.generatedColumn-c),c=p.generatedColumn,h(f,g),f=p;return}for(;l<p.generatedLine;)i.add(a()),l++;if(c<p.generatedColumn){var m=s[o]||"";i.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()),i.add(s.splice(o).join(""))),r.sources.forEach(function(p){var m=r.sourceContentFor(p);m!=null&&(n!=null&&(p=Ri.join(n,p)),i.setSourceContent(p,m))}),i;function h(p,m){if(p===null||p.source===void 0)i.add(m);else{var g=n?Ri.join(n,p.source):p.source;i.add(new Re(p.originalLine,p.originalColumn,g,m,p.name))}}};Re.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(r){this.add(r)},this);else if(e[ir]||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};Re.prototype.prepend=function(e){if(Array.isArray(e))for(var r=e.length-1;r>=0;r--)this.prepend(e[r]);else if(e[ir]||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};Re.prototype.walk=function(e){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[ir]?r.walk(e):r!==""&&e(r,{source:this.source,line:this.line,column:this.column,name:this.name})};Re.prototype.join=function(e){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(e);r.push(this.children[n]),this.children=r}return this};Re.prototype.replaceRight=function(e,r){var n=this.children[this.children.length-1];return n[ir]?n.replaceRight(e,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(e,r):this.children.push("".replace(e,r)),this};Re.prototype.setSourceContent=function(e,r){this.sourceContents[Ri.toSetString(e)]=r};Re.prototype.walkSourceContents=function(e){for(var r=0,n=this.children.length;r<n;r++)this.children[r][ir]&&this.children[r].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)e(Ri.fromSetString(i[r]),this.sourceContents[i[r]])};Re.prototype.toString=function(){var e="";return this.walk(function(r){e+=r}),e};Re.prototype.toStringWithSourceMap=function(e){var r={code:"",line:1,column:0},n=new Nb(e),i=!1,s=null,o=null,a=null,l=null;return this.walk(function(c,f){r.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:r.line,column:r.column},name:f.name}),s=f.source,o=f.line,a=f.column,l=f.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),s=null,i=!1);for(var h=0,p=c.length;h<p;h++)c.charCodeAt(h)===Fb?(r.line++,r.column=0,h+1===p?(s=null,i=!1):i&&n.addMapping({source:f.source,original:{line:f.line,column:f.column},generated:{line:r.line,column:r.column},name:f.name})):r.column++}),this.walkSourceContents(function(c,f){n.setSourceContent(c,f)}),{code:r.code,map:n}};Df.SourceNode=Re});var Rf=q(Li=>{Li.SourceMapGenerator=Ca().SourceMapGenerator;Li.SourceMapConsumer=Tf().SourceMapConsumer;Li.SourceNode=If().SourceNode});var Ff=q(Ni=>{"use strict";Ni.__esModule=!0;Ni.safeJsonLiteral=Nf;var Ta=ve(),Bb=/[\x00-\x1f\\"\u2028\u2029<\ud800-\udfff]/,qb=/<(?=!--|\/?script)/gi;function Hb(t){return t.replace(qb,"\\u003C")}function $b(t){return"\\u"+t.charCodeAt(0).toString(16)}function Nf(t){return Hb(JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/[\ud800-\udfff]/g,$b))}var jt=void 0;try{(typeof define!="function"||!define.amd)&&(Lf=Rf(),jt=Lf.SourceNode)}catch{}var Lf;jt||(jt=function(t,e,r,n){this.src="",n&&this.add(n)},jt.prototype={add:function(e){Ta.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){Ta.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Pa(t,e,r){if(Ta.isArray(t)){for(var n=[],i=0,s=t.length;i<s;i++)n.push(e.wrap(t[i],r));return n}else if(typeof t=="boolean"||typeof t=="number")return t+"";return t}function Mf(t){this.srcFile=t,this.source=[]}Mf.prototype={isEmpty:function(){return!this.source.length},prepend:function(e,r){this.source.unshift(this.wrap(e,r))},push:function(e,r){this.source.push(this.wrap(e,r))},merge:function(){var e=this.empty();return this.each(function(r){e.add([" ",r,`
38
- `])}),e},each:function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},empty:function(){var e=this.currentLocation||{start:{}};return new jt(e.start.line,e.start.column,this.srcFile)},wrap:function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof jt?e:(e=Pa(e,this,r),new jt(r.start.line,r.start.column,this.srcFile,e))},functionCall:function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},quotedString:function(e){return e=e+"",Bb.test(e)?Nf(e):'"'+e+'"'},objectLiteral:function(e){var r=this,n=[];Object.keys(e).forEach(function(s){var o=Pa(e[s],r);o!=="undefined"&&n.push([r.quotedString(s),":",o])});var i=this.generateList(n);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var r=this.empty(),n=0,i=e.length;n<i;n++)n&&r.add(","),r.add(Pa(e[n],this));return r},generateArray:function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r}};Ni.default=Mf});var Vf=q((Mi,Wf)=>{"use strict";Mi.__esModule=!0;function Hf(t){return t&&t.__esModule?t:{default:t}}var Bf=mi(),jb=qe(),Da=Hf(jb),Wb=ve(),$f=Ff(),qf=Hf($f);function sr(t){this.value=t}function or(){}or.prototype={nameLookup:function(e,r){return this.internalNameLookup(e,r)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",this.quotedString(e),")"]},compilerInfo:function(){var e=Bf.COMPILER_REVISION,r=Bf.REVISION_CHANGES[e];return[e,r]},appendToBuffer:function(e,r,n){return Wb.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",this.quotedString(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,r,n,i){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,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,r),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 Da.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 `+q.join(", ")+", got '"+(this.terminals_[F]||F)+"'":me="Parse error on line "+(f+1)+": Unexpected "+(F==1?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(me,{text:this.lexer.match,token:this.terminals_[F]||F,line:this.lexer.yylineno,loc:L,expected:q})}}if(J[0]instanceof Array&&J.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+F);switch(J[0]){case 1:o.push(F),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),o.push(J[1]),F=null,M?(F=M,M=null):(p=this.lexer.yyleng,d=this.lexer.yytext,f=this.lexer.yylineno,L=this.lexer.yylloc,g>0&&g--);break;case 2:if(oe=this.productions_[J[1]][1],ne.$=a[a.length-oe],ne._$={first_line:c[c.length-(oe||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(oe||1)].first_column,last_column:c[c.length-1].last_column},O&&(ne._$.range=[c[c.length-(oe||1)].range[0],c[c.length-1].range[1]]),X=this.performAction.call(ne,d,p,f,this.yy,J[1],a,c),typeof X<"u")return X;oe&&(o=o.slice(0,-1*oe*2),a=a.slice(0,-1*oe),c=c.slice(0,-1*oe)),o.push(this.productions_[J[1]][0]),a.push(ne.$),c.push(ne._$),be=l[o[o.length-2]][o[o.length-1]],o.push(be);break;case 3:return!0}}return!0}},e=(function(){var r={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,d;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),p=0;p<f.length&&(a=this._input.match(this.rules[f[p]]),!(a&&(!o||a[0].length>o[0].length)&&(o=a,c=p,!this.options.flex)));p++);return o?(d=o[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.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,f[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 r.options={},r.performAction=function(s,o,a,c){function l(f,p){return o.yytext=o.yytext.substring(f,o.yyleng-p+f)}var d=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}},r.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\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],r.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}},r})();n.lexer=e;function t(){this.yy={}}return t.prototype=n,n.Parser=t,new t})();hr.default=op;tc.exports=hr.default});var Es=B(Cs=>{"use strict";Cs.__esModule=!0;var ap=["Program","BlockStatement","DecoratorBlock","PartialStatement","PartialBlockStatement","Decorator","MustacheStatement","ContentStatement","CommentStatement","SubExpression","PathExpression","StringLiteral","NumberLiteral","BooleanLiteral","UndefinedLiteral","NullLiteral","Hash","HashPair"];Cs.NODE_TYPES=ap});var _r=B((gr,oc)=>{"use strict";gr.__esModule=!0;function lp(n){return n&&n.__esModule?n:{default:n}}var cp=ke(),ks=lp(cp),up=he(),fp=Es();function mr(){this.parents=[]}function rc(n,e){return up.indexOf(fp.NODE_TYPES,e)!==-1||!(e in mr.prototype)&&typeof n[e]=="function"}mr.prototype={constructor:mr,mutating:!1,acceptKey:function(e,t){var r=this.accept(e[t]);if(this.mutating){if(r&&!rc(this,r.type))throw new ks.default('Unexpected node type "'+r.type+'" found when accepting '+t+" on "+e.type);e[t]=r}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new ks.default(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,r=e.length;t<r;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,r--)},accept:function(e){if(e){if(!rc(this,e.type)||!this[e.type])throw new ks.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:pr,Decorator:pr,BlockStatement:ic,DecoratorBlock:ic,PartialStatement:sc,PartialBlockStatement:function(e){sc.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:pr,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 pr(n){this.acceptRequired(n,"path"),this.acceptArray(n.params),this.acceptKey(n,"hash")}function ic(n){pr.call(this,n),this.acceptKey(n,"program"),this.acceptKey(n,"inverse")}function sc(n){this.acceptRequired(n,"name"),this.acceptArray(n.params),this.acceptKey(n,"hash")}gr.default=mr;oc.exports=gr.default});var lc=B((yr,ac)=>{"use strict";yr.__esModule=!0;function dp(n){return n&&n.__esModule?n:{default:n}}var hp=_r(),pp=dp(hp);function He(){var n=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=n}He.prototype=new pp.default;He.prototype.Program=function(n){var e=!this.options.ignoreStandalone,t=!this.isRootSeen;this.isRootSeen=!0;for(var r=n.body,i=0,s=r.length;i<s;i++){var o=r[i],a=this.accept(o);if(a){var c=As(r,i,t),l=Ps(r,i,t),d=a.openStandalone&&c,f=a.closeStandalone&&l,p=a.inlineStandalone&&c&&l;a.close&&ut(r,i,!0),a.open&&rt(r,i,!0),e&&p&&(ut(r,i),rt(r,i)&&o.type==="PartialStatement"&&(o.indent=/(?:^|[^ \t])([ \t]+)$/.exec(r[i-1].original)[1])),e&&d&&(ut((o.program||o.inverse).body),rt(r,i)),e&&f&&(ut(r,i),rt((o.inverse||o.program).body))}}return n};He.prototype.BlockStatement=He.prototype.DecoratorBlock=He.prototype.PartialBlockStatement=function(n){this.accept(n.program),this.accept(n.inverse);var e=n.program||n.inverse,t=n.program&&n.inverse,r=t,i=t;if(t&&t.chained)for(r=t.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var s={open:n.openStrip.open,close:n.closeStrip.close,openStandalone:Ps(e.body),closeStandalone:As((r||e).body)};if(n.openStrip.close&&ut(e.body,null,!0),t){var o=n.inverseStrip;o.open&&rt(e.body,null,!0),o.close&&ut(r.body,null,!0),n.closeStrip.open&&rt(i.body,null,!0),!this.options.ignoreStandalone&&As(e.body)&&Ps(r.body)&&(rt(e.body),ut(r.body))}else n.closeStrip.open&&rt(e.body,null,!0);return s};He.prototype.Decorator=He.prototype.MustacheStatement=function(n){return n.strip};He.prototype.PartialStatement=He.prototype.CommentStatement=function(n){var e=n.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}};function As(n,e,t){e===void 0&&(e=n.length);var r=n[e-1],i=n[e-2];if(!r)return t;if(r.type==="ContentStatement")return(i||!t?/(?:^|\S)[^\S\n]*\n\s*$/:/^\s*$|(?:^|\S)[^\S\n]*\n\s*$/).test(r.original)}function Ps(n,e,t){e===void 0&&(e=-1);var r=n[e+1],i=n[e+2];if(!r)return t;if(r.type==="ContentStatement")return(i||!t?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original)}function ut(n,e,t){var r=n[e==null?0:e+1];if(!(!r||r.type!=="ContentStatement"||!t&&r.rightStripped)){var i=r.value;r.value=r.value.replace(t?/^\s+/:/^[ \t]*\r?\n?/,""),r.rightStripped=r.value!==i}}function rt(n,e,t){var r=n[e==null?n.length-1:e-1];if(!(!r||r.type!=="ContentStatement"||!t&&r.leftStripped)){var i=r.value;return r.value=r.value.replace(t?/(^|\S)\s+$/:/(^|[^ \t])[ \t]+$/,"$1"),r.leftStripped=r.value!==i,r.leftStripped}}yr.default=He;ac.exports=yr.default});var cc=B(Ae=>{"use strict";Ae.__esModule=!0;Ae.SourceLocation=_p;Ae.id=yp;Ae.stripFlags=bp;Ae.stripComment=wp;Ae.preparePath=vp;Ae.prepareMustache=Sp;Ae.prepareRawBlock=xp;Ae.prepareBlock=Cp;Ae.prepareProgram=Ep;Ae.preparePartialBlock=kp;function mp(n){return n&&n.__esModule?n:{default:n}}var gp=ke(),Os=mp(gp);function Is(n,e){if(e=e.path?e.path.original:e,n.path.original!==e){var t={loc:n.path.loc};throw new Os.default(n.path.original+" doesn't match "+e,t)}}function _p(n,e){this.source=n,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function yp(n){return/^\[.*\]$/.test(n)?n.substring(1,n.length-1):n}function bp(n,e){return{open:n.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function wp(n){return n.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function vp(n,e,t){t=this.locInfo(t);for(var r=n?"@":"",i=[],s=0,o=0,a=e.length;o<a;o++){var c=e[o].part,l=e[o].original!==c;if(r+=(e[o].separator||"")+c,!l&&(c===".."||c==="."||c==="this")){if(i.length>0)throw new Os.default("Invalid path: "+r,{loc:t});c===".."&&s++}else i.push(c)}return{type:"PathExpression",data:n,depth:s,parts:i,original:r,loc:t}}function Sp(n,e,t,r,i,s){var o=r.charAt(3)||r.charAt(2),a=o!=="{"&&o!=="&",c=/\*/.test(r);return{type:c?"Decorator":"MustacheStatement",path:n,params:e,hash:t,escaped:a,strip:i,loc:this.locInfo(s)}}function xp(n,e,t,r){Is(n,t),r=this.locInfo(r);var i={type:"Program",body:e,strip:{},loc:r};return{type:"BlockStatement",path:n.path,params:n.params,hash:n.hash,program:i,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}}function Cp(n,e,t,r,i,s){r&&r.path&&Is(n,r);var o=/\*/.test(n.open);e.blockParams=n.blockParams;var a=void 0,c=void 0;if(t){if(o)throw new Os.default("Unexpected inverse block on decorator",t);t.chain&&(t.program.body[0].closeStrip=r.strip),c=t.strip,a=t.program}return i&&(i=a,a=e,e=i),{type:o?"DecoratorBlock":"BlockStatement",path:n.path,params:n.params,hash:n.hash,program:e,inverse:a,openStrip:n.strip,inverseStrip:c,closeStrip:r&&r.strip,loc:this.locInfo(s)}}function Ep(n,e){if(!e&&n.length){var t=n[0].loc,r=n[n.length-1].loc;t&&r&&(e={source:t.source,start:{line:t.start.line,column:t.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:"Program",body:n,strip:{},loc:e}}function kp(n,e,t,r){return Is(n,t),{type:"PartialBlockStatement",name:n.path,params:n.params,hash:n.hash,program:e,openStrip:n.strip,closeStrip:t&&t.strip,loc:this.locInfo(r)}}});var dc=B(Zt=>{"use strict";Zt.__esModule=!0;Zt.parseWithoutProcessing=fc;Zt.parse=Rp;function Ap(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}function uc(n){return n&&n.__esModule?n:{default:n}}var Pp=nc(),Ts=uc(Pp),Op=lc(),Ip=uc(Op),Tp=cc(),Dp=Ap(Tp),Lp=he();Zt.parser=Ts.default;var br={};Lp.extend(br,Dp);function fc(n,e){if(n.type==="Program")return n;Ts.default.yy=br,br.locInfo=function(r){return new br.SourceLocation(e&&e.srcName,r)};var t=Ts.default.parse(n);return t}function Rp(n,e){var t=fc(n,e),r=new Ip.default(e);return r.accept(t)}});var _c=B(en=>{"use strict";en.__esModule=!0;en.Compiler=Rs;en.precompile=Bp;en.compile=Hp;function pc(n){return n&&n.__esModule?n:{default:n}}var Np=ke(),xt=pc(Np),it=he(),Mp=xs(),Xt=pc(Mp),Fp=Es(),qp=[].slice;function Rs(){}Rs.prototype={compiler:Rs,equals:function(e){var t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(var r=0;r<t;r++){var i=this.opcodes[r],s=e.opcodes[r];if(i.opcode!==s.opcode||!gc(i.args,s.args))return!1}t=this.children.length;for(var r=0;r<t;r++)if(!this.children[r].equals(e.children[r]))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=it.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,r=t.compile(e,this.options),i=this.guid++;return this.usePartial=this.usePartial||r.usePartial,this.children[i]=r,this.useDepths=this.useDepths||r.useDepths,i},accept:function(e){if(it.indexOf(Fp.NODE_TYPES,e.type)===-1||!this[e.type])throw new xt.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){$p(e),this.options.blockParams.unshift(e.blockParams);for(var t=e.body,r=t.length,i=0;i<r;i++)this.accept(t[i]);return this.options.blockParams.shift(),this.isSimple=r===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){hc(e);var t=e.program,r=e.inverse;t=t&&this.compileProgram(t),r=r&&this.compileProgram(r);var i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,t,r):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",t),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,t,r),this.opcode("pushProgram",t),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var t=e.program&&this.compileProgram(e.program),r=this.setupFullMustacheParams(e,t,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",r.length,i.original)},PartialStatement:function(e){this.usePartial=!0;var t=e.program;t&&(t=this.compileProgram(e.program));var r=e.params;if(r.length>1)throw new xt.default("Unsupported number of partial arguments: "+r.length,e);r.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):r.push({type:"PathExpression",parts:[],depth:0}));var i=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,i,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){if(e.value!=null&&typeof e.value!="string")throw Ge(e,"value must be a string");e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){hc(e);var t=this.classifySexpr(e);t==="simple"?this.simpleSexpr(e):t==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,r){var i=e.path,s=i.parts[0],o=t!=null||r!=null;this.opcode("getContext",Ds(i)),this.opcode("pushProgram",t),this.opcode("pushProgram",r),i.strict=!0,this.accept(i),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,r){var i=this.setupFullMustacheParams(e,t,r),s=e.path,o=s.parts[0];if(this.options.knownHelpers[o])this.opcode("invokeKnownHelper",i.length,o);else{if(this.options.knownHelpersOnly)throw new xt.default("You specified knownHelpersOnly, but used the unknown helper "+o,e);s.strict=!0,s.falsy=!0,this.accept(s),this.opcode("invokeHelper",i.length,s.original,Xt.default.helpers.simpleId(s))}},PathExpression:function(e){var t=Ds(e),r=Ls(e);this.addDepth(t),this.opcode("getContext",t);var i=r[0],s=Xt.default.helpers.scopedId(e),o=!t&&!s&&this.blockParamIndex(i);o?this.opcode("lookupBlockParam",o,r):i?e.data?(this.options.data=!0,this.opcode("lookupData",t,r,e.strict)):this.opcode("lookupOnContext",r,e.falsy,e.strict,s):this.opcode("pushContext")},StringLiteral:function(e){wr(e),this.opcode("pushString",e.value)},NumberLiteral:function(e){wr(e),this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){wr(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,r=0,i=void 0;if(!it.isArray(t))throw Ge(e,"pairs must be an array");i=t.length;for(var s=0;s<i;s++)if(!t[s]||typeof t[s].key!="string")throw Ge(e,"pair keys must be strings");for(this.opcode("pushHash");r<i;r++)this.pushParam(t[r].value);for(;r--;)this.opcode("assignToHash",t[r].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:qp.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){Ls(e.path);var t=Xt.default.helpers.simpleId(e.path),r=t&&!!this.blockParamIndex(e.path.parts[0]),i=!r&&Xt.default.helpers.helperExpression(e),s=!r&&(i||t);if(s&&!i){var o=e.path.parts[0],a=this.options;a.knownHelpers[o]?i=!0:a.knownHelpersOnly&&(s=!1)}return i?"helper":s?"ambiguous":"simple"},pushParams:function(e){for(var t=0,r=e.length;t<r;t++)this.pushParam(e[t])},pushParam:function(e){wr(e);var t=e.value!=null?e.value:e.original||"",r=Ds(e);if(this.stringParams)typeof t!="number"&&typeof t!="boolean"&&(t=String(t)),t.replace&&(t=t.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),r&&this.addDepth(r),this.opcode("getContext",r),this.opcode("pushStringParam",t,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var i=void 0;if(e.parts&&!Xt.default.helpers.scopedId(e)&&!r&&(i=this.blockParamIndex(Ls(e)[0])),i){var s=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",i,s)}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,r,i){var s=e.params;return this.pushParams(s),this.opcode("pushProgram",t),this.opcode("pushProgram",r),e.hash?this.accept(e.hash):this.opcode("emptyHash",i),s},blockParamIndex:function(e){for(var t=0,r=this.options.blockParams.length;t<r;t++){var i=this.options.blockParams[t],s=i&&it.indexOf(i,e);if(i&&s>=0)return[t,s]}}};function Bp(n,e,t){if(n==null||typeof n!="string"&&n.type!=="Program")throw new xt.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+n);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=t.parse(n,e),i=new t.Compiler().compile(r,e);return new t.JavaScriptCompiler().compile(i,e)}function Hp(n,e,t){if(e===void 0&&(e={}),n==null||typeof n!="string"&&n.type!=="Program")throw new xt.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+n);e=it.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var r=void 0;function i(){var o=t.parse(n,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 r||(r=i()),r.call(this,o,a)}return s._setup=function(o){return r||(r=i()),r._setup(o)},s._child=function(o,a,c,l){return r||(r=i()),r._child(o,a,c,l)},s}function Ge(n,e){return new xt.default("Invalid AST: "+n.type+" "+e,n)}function Ds(n){var e=n.depth;if(e==null)return 0;if(typeof e!="number"||!isFinite(e)||Math.floor(e)!==e||e<0)throw Ge(n,"depth must be a non-negative integer");return e}function wr(n){var e=n.value;if(n.type==="StringLiteral"&&typeof e!="string")throw Ge(n,"value must be a string");if(n.type==="NumberLiteral"&&typeof e!="number")throw Ge(n,"value must be a number");if(n.type==="BooleanLiteral"&&typeof e!="boolean")throw Ge(n,"value must be a boolean")}function mc(n,e,t){if(!it.isArray(e))throw Ge(n,t+" must be an array");for(var r=0;r<e.length;r++)if(typeof e[r]!="string")throw Ge(n,t+" must only contain strings");return e}function Ls(n){return mc(n,n.parts,"parts")}function $p(n){n.blockParams!=null&&mc(n,n.blockParams,"blockParams")}function gc(n,e){if(n===e)return!0;if(it.isArray(n)&&it.isArray(e)&&n.length===e.length){for(var t=0;t<n.length;t++)if(!gc(n[t],e[t]))return!1;return!0}}function hc(n){if(!n.path.parts){var e=n.path;n.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}});var bc=B(Ns=>{var yc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Ns.encode=function(n){if(0<=n&&n<yc.length)return yc[n];throw new TypeError("Must be between 0 and 63: "+n)};Ns.decode=function(n){var e=65,t=90,r=97,i=122,s=48,o=57,a=43,c=47,l=26,d=52;return e<=n&&n<=t?n-e:r<=n&&n<=i?n-r+l:s<=n&&n<=o?n-s+d:n==a?62:n==c?63:-1}});var qs=B(Fs=>{var wc=bc(),Ms=5,vc=1<<Ms,Sc=vc-1,xc=vc;function Vp(n){return n<0?(-n<<1)+1:(n<<1)+0}function jp(n){var e=(n&1)===1,t=n>>1;return e?-t:t}Fs.encode=function(e){var t="",r,i=Vp(e);do r=i&Sc,i>>>=Ms,i>0&&(r|=xc),t+=wc.encode(r);while(i>0);return t};Fs.decode=function(e,t,r){var i=e.length,s=0,o=0,a,c;do{if(t>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=wc.decode(e.charCodeAt(t++)),c===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));a=!!(c&xc),c&=Sc,s=s+(c<<o),o+=Ms}while(a);r.value=jp(s),r.rest=t}});var kt=B(pe=>{function Wp(n,e,t){if(e in n)return n[e];if(arguments.length===3)return t;throw new Error('"'+e+'" is a required argument.')}pe.getArg=Wp;var Cc=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Up=/^data:.+\,.+$/;function tn(n){var e=n.match(Cc);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}pe.urlParse=tn;function Ct(n){var e="";return n.scheme&&(e+=n.scheme+":"),e+="//",n.auth&&(e+=n.auth+"@"),n.host&&(e+=n.host),n.port&&(e+=":"+n.port),n.path&&(e+=n.path),e}pe.urlGenerate=Ct;function Bs(n){var e=n,t=tn(n);if(t){if(!t.path)return n;e=t.path}for(var r=pe.isAbsolute(e),i=e.split(/\/+/),s,o=0,a=i.length-1;a>=0;a--)s=i[a],s==="."?i.splice(a,1):s===".."?o++:o>0&&(s===""?(i.splice(a+1,o),o=0):(i.splice(a,2),o--));return e=i.join("/"),e===""&&(e=r?"/":"."),t?(t.path=e,Ct(t)):e}pe.normalize=Bs;function Ec(n,e){n===""&&(n="."),e===""&&(e=".");var t=tn(e),r=tn(n);if(r&&(n=r.path||"/"),t&&!t.scheme)return r&&(t.scheme=r.scheme),Ct(t);if(t||e.match(Up))return e;if(r&&!r.host&&!r.path)return r.host=e,Ct(r);var i=e.charAt(0)==="/"?e:Bs(n.replace(/\/+$/,"")+"/"+e);return r?(r.path=i,Ct(r)):i}pe.join=Ec;pe.isAbsolute=function(n){return n.charAt(0)==="/"||Cc.test(n)};function Gp(n,e){n===""&&(n="."),n=n.replace(/\/$/,"");for(var t=0;e.indexOf(n+"/")!==0;){var r=n.lastIndexOf("/");if(r<0||(n=n.slice(0,r),n.match(/^([^\/]+:\/)?\/*$/)))return e;++t}return Array(t+1).join("../")+e.substr(n.length+1)}pe.relative=Gp;var kc=(function(){var n=Object.create(null);return!("__proto__"in n)})();function Ac(n){return n}function zp(n){return Pc(n)?"$"+n:n}pe.toSetString=kc?Ac:zp;function Yp(n){return Pc(n)?n.slice(1):n}pe.fromSetString=kc?Ac:Yp;function Pc(n){if(!n)return!1;var e=n.length;if(e<9||n.charCodeAt(e-1)!==95||n.charCodeAt(e-2)!==95||n.charCodeAt(e-3)!==111||n.charCodeAt(e-4)!==116||n.charCodeAt(e-5)!==111||n.charCodeAt(e-6)!==114||n.charCodeAt(e-7)!==112||n.charCodeAt(e-8)!==95||n.charCodeAt(e-9)!==95)return!1;for(var t=e-10;t>=0;t--)if(n.charCodeAt(t)!==36)return!1;return!0}function Kp(n,e,t){var r=Et(n.source,e.source);return r!==0||(r=n.originalLine-e.originalLine,r!==0)||(r=n.originalColumn-e.originalColumn,r!==0||t)||(r=n.generatedColumn-e.generatedColumn,r!==0)||(r=n.generatedLine-e.generatedLine,r!==0)?r:Et(n.name,e.name)}pe.compareByOriginalPositions=Kp;function Jp(n,e,t){var r=n.generatedLine-e.generatedLine;return r!==0||(r=n.generatedColumn-e.generatedColumn,r!==0||t)||(r=Et(n.source,e.source),r!==0)||(r=n.originalLine-e.originalLine,r!==0)||(r=n.originalColumn-e.originalColumn,r!==0)?r:Et(n.name,e.name)}pe.compareByGeneratedPositionsDeflated=Jp;function Et(n,e){return n===e?0:n===null?1:e===null?-1:n>e?1:-1}function Qp(n,e){var t=n.generatedLine-e.generatedLine;return t!==0||(t=n.generatedColumn-e.generatedColumn,t!==0)||(t=Et(n.source,e.source),t!==0)||(t=n.originalLine-e.originalLine,t!==0)||(t=n.originalColumn-e.originalColumn,t!==0)?t:Et(n.name,e.name)}pe.compareByGeneratedPositionsInflated=Qp;function Zp(n){return JSON.parse(n.replace(/^\)]}'[^\n]*\n/,""))}pe.parseSourceMapInput=Zp;function Xp(n,e,t){if(e=e||"",n&&(n[n.length-1]!=="/"&&e[0]!=="/"&&(n+="/"),e=n+e),t){var r=tn(t);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var i=r.path.lastIndexOf("/");i>=0&&(r.path=r.path.substring(0,i+1))}e=Ec(Ct(r),e)}return Bs(e)}pe.computeSourceURL=Xp});var Vs=B(Oc=>{var Hs=kt(),$s=Object.prototype.hasOwnProperty,ft=typeof Map<"u";function ze(){this._array=[],this._set=ft?new Map:Object.create(null)}ze.fromArray=function(e,t){for(var r=new ze,i=0,s=e.length;i<s;i++)r.add(e[i],t);return r};ze.prototype.size=function(){return ft?this._set.size:Object.getOwnPropertyNames(this._set).length};ze.prototype.add=function(e,t){var r=ft?e:Hs.toSetString(e),i=ft?this.has(e):$s.call(this._set,r),s=this._array.length;(!i||t)&&this._array.push(e),i||(ft?this._set.set(e,s):this._set[r]=s)};ze.prototype.has=function(e){if(ft)return this._set.has(e);var t=Hs.toSetString(e);return $s.call(this._set,t)};ze.prototype.indexOf=function(e){if(ft){var t=this._set.get(e);if(t>=0)return t}else{var r=Hs.toSetString(e);if($s.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')};ze.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};ze.prototype.toArray=function(){return this._array.slice()};Oc.ArraySet=ze});var Dc=B(Tc=>{var Ic=kt();function em(n,e){var t=n.generatedLine,r=e.generatedLine,i=n.generatedColumn,s=e.generatedColumn;return r>t||r==t&&s>=i||Ic.compareByGeneratedPositionsInflated(n,e)<=0}function vr(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}vr.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)};vr.prototype.add=function(e){em(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};vr.prototype.toArray=function(){return this._sorted||(this._array.sort(Ic.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};Tc.MappingList=vr});var js=B(Lc=>{var nn=qs(),ae=kt(),Sr=Vs().ArraySet,tm=Dc().MappingList;function Pe(n){n||(n={}),this._file=ae.getArg(n,"file",null),this._sourceRoot=ae.getArg(n,"sourceRoot",null),this._skipValidation=ae.getArg(n,"skipValidation",!1),this._sources=new Sr,this._names=new Sr,this._mappings=new tm,this._sourcesContents=null}Pe.prototype._version=3;Pe.fromSourceMap=function(e){var t=e.sourceRoot,r=new Pe({file:e.file,sourceRoot:t});return e.eachMapping(function(i){var s={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(s.source=i.source,t!=null&&(s.source=ae.relative(t,s.source)),s.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(s.name=i.name)),r.addMapping(s)}),e.sources.forEach(function(i){var s=i;t!==null&&(s=ae.relative(t,i)),r._sources.has(s)||r._sources.add(s);var o=e.sourceContentFor(i);o!=null&&r.setSourceContent(i,o)}),r};Pe.prototype.addMapping=function(e){var t=ae.getArg(e,"generated"),r=ae.getArg(e,"original",null),i=ae.getArg(e,"source",null),s=ae.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,i,s),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:i,name:s})};Pe.prototype.setSourceContent=function(e,t){var r=e;this._sourceRoot!=null&&(r=ae.relative(this._sourceRoot,r)),t!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[ae.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[ae.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Pe.prototype.applySourceMap=function(e,t,r){var i=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.`);i=e.file}var s=this._sourceRoot;s!=null&&(i=ae.relative(s,i));var o=new Sr,a=new Sr;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var l=e.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,r!=null&&(c.source=ae.join(r,c.source)),s!=null&&(c.source=ae.relative(s,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var d=c.source;d!=null&&!o.has(d)&&o.add(d);var f=c.name;f!=null&&!a.has(f)&&a.add(f)},this),this._sources=o,this._names=a,e.sources.forEach(function(c){var l=e.sourceContentFor(c);l!=null&&(r!=null&&(c=ae.join(r,c)),s!=null&&(c=ae.relative(s,c)),this.setSourceContent(c,l))},this)};Pe.prototype._validateMapping=function(e,t,r,i){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&&!r&&!i)){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&&r)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:i}))}};Pe.prototype._serializeMappings=function(){for(var e=0,t=1,r=0,i=0,s=0,o=0,a="",c,l,d,f,p=this._mappings.toArray(),g=0,x=p.length;g<x;g++){if(l=p[g],c="",l.generatedLine!==t)for(e=0;l.generatedLine!==t;)c+=";",t++;else if(g>0){if(!ae.compareByGeneratedPositionsInflated(l,p[g-1]))continue;c+=","}c+=nn.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(f=this._sources.indexOf(l.source),c+=nn.encode(f-o),o=f,c+=nn.encode(l.originalLine-1-i),i=l.originalLine-1,c+=nn.encode(l.originalColumn-r),r=l.originalColumn,l.name!=null&&(d=this._names.indexOf(l.name),c+=nn.encode(d-s),s=d)),a+=c}return a};Pe.prototype._generateSourcesContent=function(e,t){return e.map(function(r){if(!this._sourcesContents)return null;t!=null&&(r=ae.relative(t,r));var i=ae.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Pe.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};Pe.prototype.toString=function(){return JSON.stringify(this.toJSON())};Lc.SourceMapGenerator=Pe});var Rc=B(dt=>{dt.GREATEST_LOWER_BOUND=1;dt.LEAST_UPPER_BOUND=2;function Ws(n,e,t,r,i,s){var o=Math.floor((e-n)/2)+n,a=i(t,r[o],!0);return a===0?o:a>0?e-o>1?Ws(o,e,t,r,i,s):s==dt.LEAST_UPPER_BOUND?e<r.length?e:-1:o:o-n>1?Ws(n,o,t,r,i,s):s==dt.LEAST_UPPER_BOUND?o:n<0?-1:n}dt.search=function(e,t,r,i){if(t.length===0)return-1;var s=Ws(-1,t.length,e,t,r,i||dt.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&r(t[s],t[s-1],!0)===0;)--s;return s}});var Mc=B(Nc=>{function Us(n,e,t){var r=n[e];n[e]=n[t],n[t]=r}function nm(n,e){return Math.round(n+Math.random()*(e-n))}function Gs(n,e,t,r){if(t<r){var i=nm(t,r),s=t-1;Us(n,i,r);for(var o=n[r],a=t;a<r;a++)e(n[a],o)<=0&&(s+=1,Us(n,s,a));Us(n,s+1,a);var c=s+1;Gs(n,e,t,c-1),Gs(n,e,c+1,r)}}Nc.quickSort=function(n,e){Gs(n,e,0,n.length-1)}});var qc=B(xr=>{var N=kt(),zs=Rc(),At=Vs().ArraySet,rm=qs(),rn=Mc().quickSort;function ee(n,e){var t=n;return typeof n=="string"&&(t=N.parseSourceMapInput(n)),t.sections!=null?new Re(t,e):new ce(t,e)}ee.fromSourceMap=function(n,e){return ce.fromSourceMap(n,e)};ee.prototype._version=3;ee.prototype.__generatedMappings=null;Object.defineProperty(ee.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});ee.prototype.__originalMappings=null;Object.defineProperty(ee.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});ee.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return r===";"||r===","};ee.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")};ee.GENERATED_ORDER=1;ee.ORIGINAL_ORDER=2;ee.GREATEST_LOWER_BOUND=1;ee.LEAST_UPPER_BOUND=2;ee.prototype.eachMapping=function(e,t,r){var i=t||null,s=r||ee.GENERATED_ORDER,o;switch(s){case ee.GENERATED_ORDER:o=this._generatedMappings;break;case ee.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=N.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,i)};ee.prototype.allGeneratedPositionsFor=function(e){var t=N.getArg(e,"line"),r={source:N.getArg(e,"source"),originalLine:t,originalColumn:N.getArg(e,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var i=[],s=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",N.compareByOriginalPositions,zs.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;)i.push({line:N.getArg(o,"generatedLine",null),column:N.getArg(o,"generatedColumn",null),lastColumn:N.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var c=o.originalColumn;o&&o.originalLine===t&&o.originalColumn==c;)i.push({line:N.getArg(o,"generatedLine",null),column:N.getArg(o,"generatedColumn",null),lastColumn:N.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return i};xr.SourceMapConsumer=ee;function ce(n,e){var t=n;typeof n=="string"&&(t=N.parseSourceMapInput(n));var r=N.getArg(t,"version"),i=N.getArg(t,"sources"),s=N.getArg(t,"names",[]),o=N.getArg(t,"sourceRoot",null),a=N.getArg(t,"sourcesContent",null),c=N.getArg(t,"mappings"),l=N.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);o&&(o=N.normalize(o)),i=i.map(String).map(N.normalize).map(function(d){return o&&N.isAbsolute(o)&&N.isAbsolute(d)?N.relative(o,d):d}),this._names=At.fromArray(s.map(String),!0),this._sources=At.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(d){return N.computeSourceURL(o,d,e)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=e,this.file=l}ce.prototype=Object.create(ee.prototype);ce.prototype.consumer=ee;ce.prototype._findSourceIndex=function(n){var e=n;if(this.sourceRoot!=null&&(e=N.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]==n)return t;return-1};ce.fromSourceMap=function(e,t){var r=Object.create(ce.prototype),i=r._names=At.fromArray(e._names.toArray(),!0),s=r._sources=At.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=t,r._absoluteSources=r._sources.toArray().map(function(g){return N.computeSourceURL(r.sourceRoot,g,t)});for(var o=e._mappings.toArray().slice(),a=r.__generatedMappings=[],c=r.__originalMappings=[],l=0,d=o.length;l<d;l++){var f=o[l],p=new Fc;p.generatedLine=f.generatedLine,p.generatedColumn=f.generatedColumn,f.source&&(p.source=s.indexOf(f.source),p.originalLine=f.originalLine,p.originalColumn=f.originalColumn,f.name&&(p.name=i.indexOf(f.name)),c.push(p)),a.push(p)}return rn(r.__originalMappings,N.compareByOriginalPositions),r};ce.prototype._version=3;Object.defineProperty(ce.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Fc(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}ce.prototype._parseMappings=function(e,t){for(var r=1,i=0,s=0,o=0,a=0,c=0,l=e.length,d=0,f={},p={},g=[],x=[],A,L,O,T,D;d<l;)if(e.charAt(d)===";")r++,d++,i=0;else if(e.charAt(d)===",")d++;else{for(A=new Fc,A.generatedLine=r,T=d;T<l&&!this._charIsMappingSeparator(e,T);T++);if(L=e.slice(d,T),O=f[L],O)d+=L.length;else{for(O=[];d<T;)rm.decode(e,d,p),D=p.value,d=p.rest,O.push(D);if(O.length===2)throw new Error("Found a source, but no line and column");if(O.length===3)throw new Error("Found a source and line, but no column");f[L]=O}A.generatedColumn=i+O[0],i=A.generatedColumn,O.length>1&&(A.source=a+O[1],a+=O[1],A.originalLine=s+O[2],s=A.originalLine,A.originalLine+=1,A.originalColumn=o+O[3],o=A.originalColumn,O.length>4&&(A.name=c+O[4],c+=O[4])),x.push(A),typeof A.originalLine=="number"&&g.push(A)}rn(x,N.compareByGeneratedPositionsDeflated),this.__generatedMappings=x,rn(g,N.compareByOriginalPositions),this.__originalMappings=g};ce.prototype._findMapping=function(e,t,r,i,s,o){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[i]);return zs.search(e,t,s,o)};ce.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}};ce.prototype.originalPositionFor=function(e){var t={generatedLine:N.getArg(e,"line"),generatedColumn:N.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",N.compareByGeneratedPositionsDeflated,N.getArg(e,"bias",ee.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var s=N.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=N.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=N.getArg(i,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:N.getArg(i,"originalLine",null),column:N.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};ce.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1};ce.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var i=e;this.sourceRoot!=null&&(i=N.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=N.urlParse(this.sourceRoot))){var o=i.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("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" is not in the SourceMap.')};ce.prototype.generatedPositionFor=function(e){var t=N.getArg(e,"source");if(t=this._findSourceIndex(t),t<0)return{line:null,column:null,lastColumn:null};var r={source:t,originalLine:N.getArg(e,"line"),originalColumn:N.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",N.compareByOriginalPositions,N.getArg(e,"bias",ee.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===r.source)return{line:N.getArg(s,"generatedLine",null),column:N.getArg(s,"generatedColumn",null),lastColumn:N.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};xr.BasicSourceMapConsumer=ce;function Re(n,e){var t=n;typeof n=="string"&&(t=N.parseSourceMapInput(n));var r=N.getArg(t,"version"),i=N.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new At,this._names=new At;var s={line:-1,column:0};this._sections=i.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var a=N.getArg(o,"offset"),c=N.getArg(a,"line"),l=N.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 ee(N.getArg(o,"map"),e)}})}Re.prototype=Object.create(ee.prototype);Re.prototype.constructor=ee;Re.prototype._version=3;Object.defineProperty(Re.prototype,"sources",{get:function(){for(var n=[],e=0;e<this._sections.length;e++)for(var t=0;t<this._sections[e].consumer.sources.length;t++)n.push(this._sections[e].consumer.sources[t]);return n}});Re.prototype.originalPositionFor=function(e){var t={generatedLine:N.getArg(e,"line"),generatedColumn:N.getArg(e,"column")},r=zs.search(t,this._sections,function(s,o){var a=s.generatedLine-o.generatedOffset.generatedLine;return a||s.generatedColumn-o.generatedOffset.generatedColumn}),i=this._sections[r];return i?i.consumer.originalPositionFor({line:t.generatedLine-(i.generatedOffset.generatedLine-1),column:t.generatedColumn-(i.generatedOffset.generatedLine===t.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}};Re.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})};Re.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var i=this._sections[r],s=i.consumer.sourceContentFor(e,!0);if(s)return s}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')};Re.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(r.consumer._findSourceIndex(N.getArg(e,"source"))!==-1){var i=r.consumer.generatedPositionFor(e);if(i){var s={line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};Re.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],s=i.consumer._generatedMappings,o=0;o<s.length;o++){var a=s[o],c=i.consumer._sources.at(a.source);c=N.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var l=null;a.name&&(l=i.consumer._names.at(a.name),this._names.add(l),l=this._names.indexOf(l));var d={source:c,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:l};this.__generatedMappings.push(d),typeof d.originalLine=="number"&&this.__originalMappings.push(d)}rn(this.__generatedMappings,N.compareByGeneratedPositionsDeflated),rn(this.__originalMappings,N.compareByOriginalPositions)};xr.IndexedSourceMapConsumer=Re});var Hc=B(Bc=>{var im=js().SourceMapGenerator,Cr=kt(),sm=/(\r?\n)/,om=10,Pt="$$$isSourceNode$$$";function xe(n,e,t,r,i){this.children=[],this.sourceContents={},this.line=n??null,this.column=e??null,this.source=t??null,this.name=i??null,this[Pt]=!0,r!=null&&this.add(r)}xe.fromStringWithSourceMap=function(e,t,r){var i=new xe,s=e.split(sm),o=0,a=function(){var p=x(),g=x()||"";return p+g;function x(){return o<s.length?s[o++]:void 0}},c=1,l=0,d=null;return t.eachMapping(function(p){if(d!==null)if(c<p.generatedLine)f(d,a()),c++,l=0;else{var g=s[o]||"",x=g.substr(0,p.generatedColumn-l);s[o]=g.substr(p.generatedColumn-l),l=p.generatedColumn,f(d,x),d=p;return}for(;c<p.generatedLine;)i.add(a()),c++;if(l<p.generatedColumn){var g=s[o]||"";i.add(g.substr(0,p.generatedColumn)),s[o]=g.substr(p.generatedColumn),l=p.generatedColumn}d=p},this),o<s.length&&(d&&f(d,a()),i.add(s.splice(o).join(""))),t.sources.forEach(function(p){var g=t.sourceContentFor(p);g!=null&&(r!=null&&(p=Cr.join(r,p)),i.setSourceContent(p,g))}),i;function f(p,g){if(p===null||p.source===void 0)i.add(g);else{var x=r?Cr.join(r,p.source):p.source;i.add(new xe(p.originalLine,p.originalColumn,x,g,p.name))}}};xe.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(t){this.add(t)},this);else if(e[Pt]||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};xe.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[Pt]||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};xe.prototype.walk=function(e){for(var t,r=0,i=this.children.length;r<i;r++)t=this.children[r],t[Pt]?t.walk(e):t!==""&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})};xe.prototype.join=function(e){var t,r,i=this.children.length;if(i>0){for(t=[],r=0;r<i-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this};xe.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[Pt]?r.replaceRight(e,t):typeof r=="string"?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this};xe.prototype.setSourceContent=function(e,t){this.sourceContents[Cr.toSetString(e)]=t};xe.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][Pt]&&this.children[t].walkSourceContents(e);for(var i=Object.keys(this.sourceContents),t=0,r=i.length;t<r;t++)e(Cr.fromSetString(i[t]),this.sourceContents[i[t]])};xe.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e};xe.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new im(e),i=!1,s=null,o=null,a=null,c=null;return this.walk(function(l,d){t.code+=l,d.source!==null&&d.line!==null&&d.column!==null?((s!==d.source||o!==d.line||a!==d.column||c!==d.name)&&r.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:t.line,column:t.column},name:d.name}),s=d.source,o=d.line,a=d.column,c=d.name,i=!0):i&&(r.addMapping({generated:{line:t.line,column:t.column}}),s=null,i=!1);for(var f=0,p=l.length;f<p;f++)l.charCodeAt(f)===om?(t.line++,t.column=0,f+1===p?(s=null,i=!1):i&&r.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:t.line,column:t.column},name:d.name})):t.column++}),this.walkSourceContents(function(l,d){r.setSourceContent(l,d)}),{code:t.code,map:r}};Bc.SourceNode=xe});var $c=B(Er=>{Er.SourceMapGenerator=js().SourceMapGenerator;Er.SourceMapConsumer=qc().SourceMapConsumer;Er.SourceNode=Hc().SourceNode});var Uc=B(kr=>{"use strict";kr.__esModule=!0;kr.safeJsonLiteral=jc;var Ks=he(),am=/[\x00-\x1f\\"\u2028\u2029<\ud800-\udfff]/,lm=/<(?=!--|\/?script)/gi;function cm(n){return n.replace(lm,"\\u003C")}function um(n){return"\\u"+n.charCodeAt(0).toString(16)}function jc(n){return cm(JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/[\ud800-\udfff]/g,um))}var ht=void 0;try{(typeof define!="function"||!define.amd)&&(Vc=$c(),ht=Vc.SourceNode)}catch{}var Vc;ht||(ht=function(n,e,t,r){this.src="",r&&this.add(r)},ht.prototype={add:function(e){Ks.isArray(e)&&(e=e.join("")),this.src+=e},prepend:function(e){Ks.isArray(e)&&(e=e.join("")),this.src=e+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Ys(n,e,t){if(Ks.isArray(n)){for(var r=[],i=0,s=n.length;i<s;i++)r.push(e.wrap(n[i],t));return r}else if(typeof n=="boolean"||typeof n=="number")return n+"";return n}function Wc(n){this.srcFile=n,this.source=[]}Wc.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,r=this.source.length;t<r;t++)e(this.source[t])},empty:function(){var e=this.currentLocation||{start:{}};return new ht(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 ht?e:(e=Ys(e,this,t),new ht(t.start.line,t.start.column,this.srcFile,e))},functionCall:function(e,t,r){return r=this.generateList(r),this.wrap([e,t?"."+t+"(":"(",r,")"])},quotedString:function(e){return e=e+"",am.test(e)?jc(e):'"'+e+'"'},objectLiteral:function(e){var t=this,r=[];Object.keys(e).forEach(function(s){var o=Ys(e[s],t);o!=="undefined"&&r.push([t.quotedString(s),":",o])});var i=this.generateList(r);return i.prepend("{"),i.add("}"),i},generateList:function(e){for(var t=this.empty(),r=0,i=e.length;r<i;r++)r&&t.add(","),t.add(Ys(e[r],this));return t},generateArray:function(e){var t=this.generateList(e);return t.prepend("["),t.add("]"),t}};kr.default=Wc});var Zc=B((Ar,Qc)=>{"use strict";Ar.__esModule=!0;function Yc(n){return n&&n.__esModule?n:{default:n}}var Gc=or(),fm=ke(),Js=Yc(fm),dm=he(),Kc=Uc(),zc=Yc(Kc);function Ot(n){this.value=n}function It(){}It.prototype={nameLookup:function(e,t){return this.internalNameLookup(e,t)},depthedLookup:function(e){return[this.aliasable("container.lookup"),"(depths, ",this.quotedString(e),")"]},compilerInfo:function(){var e=Gc.COMPILER_REVISION,t=Gc.REVISION_CHANGES[e];return[e,t]},appendToBuffer:function(e,t,r){return dm.isArray(e)||(e=[e]),e=this.source.wrap(e,t),this.environment.isSimple?["return ",e,";"]:r?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(e,t){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",this.quotedString(t),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(e,t,r,i){this.environment=e,this.options=t,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!r,this.context=r||{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 Js.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;"),i?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(i);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,g=p.decorators;for(l=0,c=m.length;l<c;l++)h[l]=m[l],g[l]&&(h[l+"_d"]=g[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),i?h.compilerOptions=this.options:(h.compiler=JSON.stringify(h.compiler),this.source.currentLocation={start:{line:1,column:0}},h=this.objectLiteral(h),r.srcName?(h=h.toStringWithSourceMap({file:r.destName}),h.map=h.map&&h.map.toString()):h=h.toString()),h},preamble:function(){this.lastContext=0,this.source=new qf.default(this.options.srcName),this.decorators=new qf.default(this.options.srcName)},createFunctionContext:function(e){var r=this,n="",i=this.stackVars.concat(this.registers.list);i.length>0&&(n+=", "+i.join(", "));var s=0;Object.keys(this.aliases).forEach(function(l){var c=r.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 r=this.environment.isSimple,n=!this.forceBuffer,i=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 += "):i=!0,a.add(";"),o=a=void 0),s=!0,r||(n=!1))}),n?o?(o.prepend("return "),a.add(";")):s||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),o?(o.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":`;
41
+ `),this.decorators=this.decorators.merge()));var d=this.createFunctionContext(i);if(this.isChild)return d;var f={compiler:this.compilerInfo(),main:d};this.decorators&&(f.main_d=this.decorators,f.useDecorators=!0);var p=this.context,g=p.programs,x=p.decorators;for(c=0,l=g.length;c<l;c++)f[c]=g[c],x[c]&&(f[c+"_d"]=x[c],f.useDecorators=!0);return this.environment.usePartial&&(f.usePartial=!0),this.options.data&&(f.useData=!0),this.useDepths&&(f.useDepths=!0),this.useBlockParams&&(f.useBlockParams=!0),this.options.compat&&(f.compat=!0),i?f.compilerOptions=this.options:(f.compiler=JSON.stringify(f.compiler),this.source.currentLocation={start:{line:1,column:0}},f=this.objectLiteral(f),t.srcName?(f=f.toStringWithSourceMap({file:t.destName}),f.map=f.map&&f.map.toString()):f=f.toString()),f},preamble:function(){this.lastContext=0,this.source=new zc.default(this.options.srcName),this.decorators=new zc.default(this.options.srcName)},createFunctionContext:function(e){var t=this,r="",i=this.stackVars.concat(this.registers.list);i.length>0&&(r+=", "+i.join(", "));var s=0;Object.keys(this.aliases).forEach(function(c){var l=t.aliases[c];l.children&&l.referenceCount>1&&(r+=", alias"+ ++s+"="+c,l.children[0]="alias"+s)}),this.lookupPropertyFunctionIsUsed&&(r+=", "+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(r);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,r=!this.forceBuffer,i=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 += "):i=!0,a.add(";"),o=a=void 0),s=!0,t||(r=!1))}),r?o?(o.prepend("return "),a.add(";")):s||this.source.push('return "";'):(e+=", buffer = "+(i?"":this.initializeBuffer()),o?(o.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(i?"":`;
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,44 +47,44 @@ Expecting `+B.join(", ")+", got '"+(this.terminals_[L]||L)+"'":Ne="Parse error o
47
47
  }
48
48
  return undefined
49
49
  }
50
- `.trim()},blockValue:function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",r),"}"])},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(r){return[" != null ? ",r,' : ""']}),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,r,n,i){var s=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[s++])):this.pushContext(),this.resolvePath("context",e,s,r,n)},lookupBlockParam:function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},resolvePath:function(e,r,n,i,s){var o=this;if(this.options.strict||this.options.assumeObjects){this.push(Vb(this.options.strict&&s,this,r,n,e));return}for(var a=r.length,l=function(f){o.replaceStack(function(h){var p=o.nameLookup(h,r[f],e);return i?[" && ",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,r){this.pushContext(),this.pushString(r),r!=="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,r){var n=this.nameLookup("decorators",r,"decorator"),i=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",i])," || fn;"])},invokeHelper:function(e,r,n){var i=this.popStack(),s=this.setupHelper(e,r),o=[];n&&o.push(s.name),o.push(i),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,r){var n=[];n.push(e[0]);for(var i=1;i<e.length;i++)n.push(r,e[i]);return n},invokeKnownHelper:function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,r),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,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,r,n){var i=[],s=this.setupParams(r,1,i);e&&(r=this.popStack(),delete s.name),n&&(s.indent=this.quotedString(n)),s.helpers="helpers",s.partials="partials",s.decorators="container.decorators",e?i.unshift(r):i.unshift(this.nameLookup("partials",r,"partial")),this.options.compat&&(s.depths="depths"),s=this.objectLiteral(s),i.push(s),this.push(this.source.functionCall("container.invokePartial","",i))},assignToHash:function(e){var r=this.popStack(),n=void 0,i=void 0,s=void 0;this.trackIds&&(s=this.popStack()),this.stringParams&&(i=this.popStack(),n=this.popStack());var o=this.hash;n&&(o.contexts[e]=n),i&&(o.types[e]=i),s&&(o.ids[e]=s),o.values[e]=r},pushId:function(e,r,n){e==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+this.quotedString("."+n):"")):e==="PathExpression"?this.pushString(r):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:or,compileChildren:function(e,r){for(var n=e.children,i=void 0,s=void 0,o=0,a=n.length;o<a;o++){i=n[o],s=new this.compiler;var l=this.matchExistingProgram(i);if(l==null){var c=this.context.programs.push("")-1;i.index=c,i.name="program"+c,this.context.programs[c]=s.compile(i,r,this.context,!this.precompile),this.context.decorators[c]=s.decorators,this.context.environments[c]=i,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=l.index,i.name="program"+l.index,this.useDepths=this.useDepths||l.useDepths,this.useBlockParams=this.useBlockParams||l.useBlockParams}},matchExistingProgram:function(e){for(var r=0,n=this.context.environments.length;r<n;r++){var i=this.context.environments[r];if(i&&i.equals(e))return i}},programExpression:function(e){var r=this.environment.children[e],n=[r.index,"data",r.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 sr||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new sr(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 r=["("],n=void 0,i=void 0,s=void 0;if(!this.isInline())throw new Da.default("replaceStack on non-inline");var o=this.popStack(!0);if(o instanceof sr)n=[o.value],r=["(",n],s=!0;else{i=!0;var a=this.incrStack();r=["((",this.push(a)," = ",o,")"],n=this.topStack()}var l=e.call(this,n);s||this.popStack(),i&&this.stackSlot--,this.push(r.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 r=0,n=e.length;r<n;r++){var i=e[r];if(i instanceof sr)this.compileStack.push(i);else{var s=this.incrStack();this.pushSource([s," = ",i,";"]),this.compileStack.push(s)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!e&&n instanceof sr)return n.value;if(!r){if(!this.stackSlot)throw new Da.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,r=e[e.length-1];return r instanceof sr?r.value:r},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 r=this.aliases[e];return r?(r.referenceCount++,r):(r=this.aliases[e]=this.source.wrap(e),r.aliasable=!0,r.referenceCount=1,r)},setupHelper:function(e,r,n){var i=[],s=this.setupHelperArgs(r,e,i,n),o=this.nameLookup("helpers",r,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:i,paramsInit:s,name:o,callParams:[a].concat(i)}},setupParams:function(e,r,n){var i={},s=[],o=[],a=[],l=!n,c=void 0;l&&(n=[]),i.name=this.quotedString(e),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var f=this.popStack(),h=this.popStack();(h||f)&&(i.fn=h||"container.noop",i.inverse=f||"container.noop");for(var p=r;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&&(i.args=this.source.generateArray(n)),this.trackIds&&(i.ids=this.source.generateArray(a)),this.stringParams&&(i.types=this.source.generateArray(o),i.contexts=this.source.generateArray(s)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(e,r,n,i){var s=this.setupParams(e,r,n);return s.loc=jf(this),s=this.objectLiteral(s),i?(this.useRegister("options"),n.push("options"),["options=",s]):n?(n.push(s),""):s}};(function(){for(var t="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=or.RESERVED_WORDS={},r=0,n=t.length;r<n;r++)e[t[r]]=!0})();or.isValidJavaScriptVariableName=function(t){return!or.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)};function jf(t){var e=t.source.currentLocation;return e?$f.safeJsonLiteral(e):"undefined"}function Vb(t,e,r,n,i){var s=e.popStack(),o=r.length;t&&o--;for(var a=n;a<o;a++)s=e.nameLookup(s,r[a],i);return t?[e.aliasable("container.strict"),"(",s,", ",e.quotedString(r[o]),", ",jf(e)," )"]:s}Mi.default=or;Wf.exports=Mi.default});var Gf=q((Fi,Uf)=>{"use strict";Fi.__esModule=!0;function Yr(t){return t&&t.__esModule?t:{default:t}}var zb=Wh(),Ub=Yr(zb),Gb=ia(),Yb=Yr(Gb),Ia=nf(),Ra=cf(),Kb=Vf(),Jb=Yr(Kb),Qb=ki(),Zb=Yr(Qb),Xb=ea(),ew=Yr(Xb),tw=Ub.default.create;function zf(){var t=tw();return t.compile=function(e,r){return Ra.compile(e,r,t)},t.precompile=function(e,r){return Ra.precompile(e,r,t)},t.AST=Yb.default,t.Compiler=Ra.Compiler,t.JavaScriptCompiler=Jb.default,t.Parser=Ia.parser,t.parse=Ia.parse,t.parseWithoutProcessing=Ia.parseWithoutProcessing,t}var ar=zf();ar.create=zf;ew.default(ar);ar.Visitor=Zb.default;ar.default=ar;Fi.default=ar;Uf.exports=Fi.default});var Yf=q(Bi=>{"use strict";Bi.__esModule=!0;Bi.print=sw;Bi.PrintVisitor=oe;function rw(t){return t&&t.__esModule?t:{default:t}}var nw=ki(),iw=rw(nw);function sw(t){return new oe().accept(t)}function oe(){this.padding=0}oe.prototype=new iw.default;oe.prototype.pad=function(t){for(var e="",r=0,n=this.padding;r<n;r++)e+=" ";return e+=t+`
51
- `,e};oe.prototype.Program=function(t){var e="",r=t.body,n=void 0,i=void 0;if(t.blockParams){var s="BLOCK PARAMS: [";for(n=0,i=t.blockParams.length;n<i;n++)s+=" "+t.blockParams[n];s+=" ]",e+=this.pad(s)}for(n=0,i=r.length;n<i;n++)e+=this.accept(r[n]);return this.padding--,e};oe.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};oe.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};oe.prototype.BlockStatement=oe.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e};oe.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")};oe.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};oe.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};oe.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};oe.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,i=0,s=e.length;i<s;i++)r.push(this.accept(e[i]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};oe.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};oe.prototype.StringLiteral=function(t){return'"'+t.value+'"'};oe.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};oe.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};oe.prototype.UndefinedLiteral=function(){return"UNDEFINED"};oe.prototype.NullLiteral=function(){return"NULL"};oe.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,i=e.length;n<i;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};oe.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var Zf=q((cv,Qf)=>{var qi=Gf().default,Jf=Yf();qi.PrintVisitor=Jf.PrintVisitor;qi.print=Jf.print;Qf.exports=qi;function Kf(t,e){var r=Ve("fs"),n=r.readFileSync(e,"utf8");t.exports=qi.compile(n)}typeof Ve<"u"&&Ve.extensions&&(Ve.extensions[".handlebars"]=Kf,Ve.extensions[".hbs"]=Kf)});import{readFile as cd,writeFile as od,access as Rw,mkdir as Lw}from"node:fs/promises";import{resolve as Je,relative as Ha}from"node:path";import{pathToFileURL as ud}from"node:url";function _d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var be={},on={},vt={},za;function gr(){if(za)return vt;za=1;function t(o){return typeof o>"u"||o===null}function e(o){return typeof o=="object"&&o!==null}function r(o){return Array.isArray(o)?o:t(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 i(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 vt.isNothing=t,vt.isObject=e,vt.toArray=r,vt.repeat=i,vt.isNegativeZero=s,vt.extend=n,vt}var Ui,Ua;function yr(){if(Ua)return Ui;Ua=1;function t(r,n){let i="",s=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(i+='in "'+r.mark.name+'" '),i+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!n&&r.mark.snippet&&(i+=`
52
-
53
- `+r.mark.snippet),s+" "+i):s}function e(r,n){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=n,this.message=t(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+": "+t(this,n)},Ui=e,Ui}var Gi,Ga;function bd(){if(Ga)return Gi;Ga=1;let t=gr();function e(i,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+i.slice(s,o).replace(/\t/g,"\u2192")+f,pos:a-s+c.length}}function r(i,s){return t.repeat(" ",s-i.length)+i}function n(i,s){if(s=Object.create(s||null),!i.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(i.buffer);)l.push(c.index),a.push(c.index+c[0].length),i.position<=c.index&&f<0&&(f=a.length-2);f<0&&(f=a.length-1);let h="",p=Math.min(i.line+s.linesAfter,l.length).toString().length,m=s.maxLength-(s.indent+p+3);for(let _=1;_<=s.linesBefore&&!(f-_<0);_++){let O=e(i.buffer,a[f-_],l[f-_],i.position-(a[f]-a[f-_]),m);h=t.repeat(" ",s.indent)+r((i.line-_+1).toString(),p)+" | "+O.str+`
54
- `+h}let g=e(i.buffer,a[f],l[f],i.position,m);h+=t.repeat(" ",s.indent)+r((i.line+1).toString(),p)+" | "+g.str+`
55
- `,h+=t.repeat("-",s.indent+p+3+g.pos)+`^
56
- `;for(let _=1;_<=s.linesAfter&&!(f+_>=l.length);_++){let O=e(i.buffer,a[f+_],l[f+_],i.position-(a[f]-a[f+_]),m);h+=t.repeat(" ",s.indent)+r((i.line+_+1).toString(),p)+" | "+O.str+`
57
- `}return h.replace(/\n$/,"")}return Gi=n,Gi}var Yi,Ya;function Ce(){if(Ya)return Yi;Ya=1;let t=yr(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["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 i(s,o){if(o=o||{},Object.keys(o).forEach(function(a){if(e.indexOf(a)===-1)throw new t('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),r.indexOf(this.kind)===-1)throw new t('Unknown kind "'+this.kind+'" is specified for "'+s+'" YAML type.')}return Yi=i,Yi}var Ki,Ka;function gl(){if(Ka)return Ki;Ka=1;let t=yr(),e=Ce();function r(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 i(s){return this.extend(s)}return i.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 t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(f){if(!(f instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.loadKind!=="scalar")throw new t("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 t("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 t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let c=Object.create(i.prototype);return c.implicit=(this.implicit||[]).concat(a),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=n(c.compiledImplicit,c.compiledExplicit),c},Ki=i,Ki}var Ji,Ja;function yl(){if(Ja)return Ji;Ja=1;let t=Ce();return Ji=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Ji}var Qi,Qa;function _l(){if(Qa)return Qi;Qa=1;let t=Ce();return Qi=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Qi}var Zi,Za;function bl(){if(Za)return Zi;Za=1;let t=Ce();return Zi=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Zi}var Xi,Xa;function wl(){if(Xa)return Xi;Xa=1;let t=gl();return Xi=new t({explicit:[yl(),_l(),bl()]}),Xi}var es,el;function vl(){if(el)return es;el=1;let t=Ce();function e(i){if(i===null)return!0;let s=i.length;return s===1&&i==="~"||s===4&&(i==="null"||i==="Null"||i==="NULL")}function r(){return null}function n(i){return i===null}return es=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:r,predicate:n,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),es}var ts,tl;function Sl(){if(tl)return ts;tl=1;let t=Ce();function e(i){if(i===null)return!1;let s=i.length;return s===4&&(i==="true"||i==="True"||i==="TRUE")||s===5&&(i==="false"||i==="False"||i==="FALSE")}function r(i){return i==="true"||i==="True"||i==="TRUE"}function n(i){return Object.prototype.toString.call(i)==="[object Boolean]"}return ts=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:r,predicate:n,represent:{lowercase:function(i){return i?"true":"false"},uppercase:function(i){return i?"TRUE":"FALSE"},camelcase:function(i){return i?"True":"False"}},defaultStyle:"lowercase"}),ts}var rs,rl;function xl(){if(rl)return rs;rl=1;let t=gr(),e=Ce();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}function n(c){return c>=48&&c<=55}function i(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(!r(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(!i(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&&!t.isNegativeZero(c)}return rs=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"]}}),rs}var ns,nl;function Cl(){if(nl)return ns;nl=1;let t=gr(),e=Ce(),r=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 i(c){return c===null||!r.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(t.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||t.isNegativeZero(c))}return ns=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:s,predicate:l,represent:a,defaultStyle:"lowercase"}),ns}var is,il;function El(){return il||(il=1,is=wl().extend({implicit:[vl(),Sl(),xl(),Cl()]})),is}var ss,sl;function kl(){return sl||(sl=1,ss=El()),ss}var os,ol;function Al(){if(ol)return os;ol=1;let t=Ce(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=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||r.exec(o)!==null}function i(o){let a=0,l=null,c=e.exec(o);if(c===null&&(c=r.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],g=+c[5],_=+c[6];if(c[7]){for(a=c[7].slice(0,3);a.length<3;)a+="0";a=+a}if(c[9]){let b=+c[10],S=+(c[11]||0);l=(b*60+S)*6e4,c[9]==="-"&&(l=-l)}let O=new Date(Date.UTC(f,h,p,m,g,_,a));return l&&O.setTime(O.getTime()-l),O}function s(o){return o.toISOString()}return os=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n,construct:i,instanceOf:Date,represent:s}),os}var as,al;function Ol(){if(al)return as;al=1;let t=Ce();function e(r){return r==="<<"||r===null}return as=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),as}var ls,ll;function Pl(){if(ll)return ls;ll=1;let t=Ce(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
58
- \r`;function r(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 i(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 ls=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:n,predicate:s,represent:i}),ls}var cs,cl;function Tl(){if(cl)return cs;cl=1;let t=Ce(),e=Object.prototype.hasOwnProperty,r=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(r.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||e.call(o,p))return!1;Object.defineProperty(o,p,{value:!0})}return!0}function i(s){return s!==null?s:[]}return cs=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:n,construct:i}),cs}var us,ul;function Dl(){if(ul)return us;ul=1;let t=Ce(),e=Object.prototype.toString;function r(i){if(i===null)return!0;let s=i,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(i){if(i===null)return[];let s=i,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 us=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:n}),us}var hs,hl;function Il(){if(hl)return hs;hl=1;let t=Ce(),e=Object.prototype.hasOwnProperty;function r(i){if(i===null)return!0;let s=i;for(let o in s)if(e.call(s,o)&&s[o]!==null)return!1;return!0}function n(i){return i!==null?i:{}}return hs=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:n}),hs}var fs,fl;function ps(){return fl||(fl=1,fs=kl().extend({implicit:[Al(),Ol()],explicit:[Pl(),Tl(),Dl(),Il()]})),fs}var dl;function wd(){if(dl)return on;dl=1;let t=gr(),e=yr(),r=bd(),n=ps(),i=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-]+!)$/,O=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function b(u){return Object.prototype.toString.call(u)}function S(u){return u===10||u===13}function I(u){return u===9||u===32}function L(u){return u===9||u===32||u===10||u===13}function N(u){return u===44||u===91||u===93||u===123||u===125}function z(u){if(u>=48&&u<=57)return u-48;let y=u|32;return y>=97&&y<=102?y-97+10:-1}function U(u){return u===120?2:u===117?4:u===85?8:0}function $(u){return u>=48&&u<=57?u-48:-1}function Q(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
- `;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 ee(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function ue(u,y,k){y==="__proto__"?Object.defineProperty(u,y,{configurable:!0,enumerable:!0,writable:!0,value:k}):u[y]=k}let ae=new Array(256),ke=new Array(256);for(let u=0;u<256;u++)ae[u]=Q(u)?1:0,ke[u]=Q(u);function B(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 Ne(u,y){let k={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return k.snippet=r(k),new e(y,k)}function E(u,y){throw Ne(u,y)}function J(u,y){u.onWarning&&u.onWarning.call(null,Ne(u,y))}function he(u,y,k){let A=u.anchorMapTransactions;if(A.length!==0){let x=A[A.length-1];i.call(x,y)||(x[y]={existed:i.call(u.anchorMap,y),value:u.anchorMap[y]})}u.anchorMap[y]=k}function gt(u){u.anchorMapTransactions.push(Object.create(null))}function X(u){let y=u.anchorMapTransactions.pop(),k=u.anchorMapTransactions;if(k.length===0)return;let A=k[k.length-1],x=Object.keys(y);for(let d=0,w=x.length;d<w;d+=1){let v=x[d];i.call(A,v)||(A[v]=y[v])}}function We(u){let y=u.anchorMapTransactions.pop(),k=Object.keys(y);for(let A=k.length-1;A>=0;A-=1){let x=y[k[A]];x.existed?u.anchorMap[k[A]]=x.value:delete u.anchorMap[k[A]]}}function xe(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 Ae(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 st={YAML:function(y,k,A){y.version!==null&&E(y,"duplication of %YAML directive"),A.length!==1&&E(y,"YAML directive accepts exactly one argument");let x=/^([0-9]+)\.([0-9]+)$/.exec(A[0]);x===null&&E(y,"ill-formed argument of the YAML directive");let d=parseInt(x[1],10),w=parseInt(x[2],10);d!==1&&E(y,"unacceptable YAML version of the document"),y.version=A[0],y.checkLineBreaks=w<2,w!==1&&w!==2&&J(y,"unsupported YAML version of the document")},TAG:function(y,k,A){let x;A.length!==2&&E(y,"TAG directive accepts exactly two arguments");let d=A[0];x=A[1],_.test(d)||E(y,"ill-formed tag handle (first argument) of the TAG directive"),i.call(y.tagMap,d)&&E(y,'there is a previously declared suffix for "'+d+'" tag handle'),O.test(x)||E(y,"ill-formed tag prefix (second argument) of the TAG directive");try{x=decodeURIComponent(x)}catch{E(y,"tag prefix is malformed: "+x)}y.tagMap[d]=x}};function _e(u,y,k,A){if(y<k){let x=u.input.slice(y,k);if(A)for(let d=0,w=x.length;d<w;d+=1){let v=x.charCodeAt(d);v===9||v>=32&&v<=1114111||E(u,"expected valid JSON character")}else p.test(x)&&E(u,"the stream contains non-printable characters");u.result+=x}}function yt(u){u.totalMergeKeys++,u.maxTotalMergeKeys!==-1&&u.totalMergeKeys>u.maxTotalMergeKeys&&E(u,"merge keys exceeded maxTotalMergeKeys ("+u.maxTotalMergeKeys+")")}function ur(u,y,k,A){t.isObject(k)||E(u,"cannot merge mappings; the provided source object is unacceptable"),yt(u);let x=Object.keys(k);for(let d=0,w=x.length;d<w;d+=1){let v=x[d];yt(u),i.call(y,v)||(ue(y,v,k[v]),A[v]=!0)}}function ot(u,y,k,A,x,d,w,v,P){if(Array.isArray(x)){x=Array.prototype.slice.call(x);for(let T=0,D=x.length;T<D;T+=1)Array.isArray(x[T])&&E(u,"nested arrays are not supported inside keys"),typeof x=="object"&&b(x[T])==="[object Object]"&&(x[T]="[object Object]")}if(typeof x=="object"&&b(x)==="[object Object]"&&(x="[object Object]"),x=String(x),y===null&&(y={}),A==="tag:yaml.org,2002:merge")if(Array.isArray(d)){d.length>100&&E(u,"abnormal merge sequence size");for(let T=0,D=d.length;T<D;T+=1)ur(u,y,d[T],k)}else ur(u,y,d,k);else!u.json&&!i.call(k,x)&&i.call(y,x)&&(u.line=w||u.line,u.lineStart=v||u.lineStart,u.position=P||u.position,E(u,"duplicated mapping key")),ue(y,x,d),delete k[x];return y}function hr(u){let y=u.input.charCodeAt(u.position);y===10?u.position++:y===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):E(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function ie(u,y,k){let A=0,x=u.input.charCodeAt(u.position);for(;x!==0;){for(;I(x);)x===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),x=u.input.charCodeAt(++u.position);if(y&&x===35)do x=u.input.charCodeAt(++u.position);while(x!==10&&x!==13&&x!==0);if(S(x))for(hr(u),x=u.input.charCodeAt(u.position),A++,u.lineIndent=0;x===32;)u.lineIndent++,x=u.input.charCodeAt(++u.position);else break}return k!==-1&&A!==0&&u.lineIndent<k&&J(u,"deficient indentation"),A}function Qe(u){let y=u.position,k=u.input.charCodeAt(y);return!!((k===45||k===46)&&k===u.input.charCodeAt(y+1)&&k===u.input.charCodeAt(y+2)&&(y+=3,k=u.input.charCodeAt(y),k===0||L(k)))}function Wt(u,y){y===1?u.result+=" ":y>1&&(u.result+=t.repeat(`
60
- `,y-1))}function Qr(u,y,k){let A,x,d,w,v,P,T=u.kind,D=u.result,C=u.input.charCodeAt(u.position);if(L(C)||N(C)||C===35||C===38||C===42||C===33||C===124||C===62||C===39||C===34||C===37||C===64||C===96)return!1;if(C===63||C===45){let R=u.input.charCodeAt(u.position+1);if(L(R)||k&&N(R))return!1}for(u.kind="scalar",u.result="",A=x=u.position,d=!1;C!==0;){if(C===58){let R=u.input.charCodeAt(u.position+1);if(L(R)||k&&N(R))break}else if(C===35){let R=u.input.charCodeAt(u.position-1);if(L(R))break}else{if(u.position===u.lineStart&&Qe(u)||k&&N(C))break;if(S(C))if(w=u.line,v=u.lineStart,P=u.lineIndent,ie(u,!1,-1),u.lineIndent>=y){d=!0,C=u.input.charCodeAt(u.position);continue}else{u.position=x,u.line=w,u.lineStart=v,u.lineIndent=P;break}}d&&(_e(u,A,x,!1),Wt(u,u.line-w),A=x=u.position,d=!1),I(C)||(x=u.position+1),C=u.input.charCodeAt(++u.position)}return _e(u,A,x,!1),u.result?!0:(u.kind=T,u.result=D,!1)}function fr(u,y){let k,A,x=u.input.charCodeAt(u.position);if(x!==39)return!1;for(u.kind="scalar",u.result="",u.position++,k=A=u.position;(x=u.input.charCodeAt(u.position))!==0;)if(x===39)if(_e(u,k,u.position,!0),x=u.input.charCodeAt(++u.position),x===39)k=u.position,u.position++,A=u.position;else return!0;else S(x)?(_e(u,k,A,!0),Wt(u,ie(u,!1,y)),k=A=u.position):u.position===u.lineStart&&Qe(u)?E(u,"unexpected end of the document within a single quoted scalar"):(u.position++,I(x)||(A=u.position));E(u,"unexpected end of the stream within a single quoted scalar")}function Zr(u,y){let k,A,x,d=u.input.charCodeAt(u.position);if(d!==34)return!1;for(u.kind="scalar",u.result="",u.position++,k=A=u.position;(d=u.input.charCodeAt(u.position))!==0;){if(d===34)return _e(u,k,u.position,!0),u.position++,!0;if(d===92){if(_e(u,k,u.position,!0),d=u.input.charCodeAt(++u.position),S(d))ie(u,!1,y);else if(d<256&&ae[d])u.result+=ke[d],u.position++;else if((x=U(d))>0){let w=x,v=0;for(;w>0;w--)d=u.input.charCodeAt(++u.position),(x=z(d))>=0?v=(v<<4)+x:E(u,"expected hexadecimal character");u.result+=ee(v),u.position++}else E(u,"unknown escape sequence");k=A=u.position}else S(d)?(_e(u,k,A,!0),Wt(u,ie(u,!1,y)),k=A=u.position):u.position===u.lineStart&&Qe(u)?E(u,"unexpected end of the document within a double quoted scalar"):(u.position++,I(d)||(A=u.position))}E(u,"unexpected end of the stream within a double quoted scalar")}function Xr(u,y){let k=!0,A,x,d,w=u.tag,v,P=u.anchor,T,D,C,R,M=Object.create(null),H,j,V,G=u.input.charCodeAt(u.position);if(G===91)T=93,R=!1,v=[];else if(G===123)T=125,R=!0,v={};else return!1;for(u.anchor!==null&&he(u,u.anchor,v),G=u.input.charCodeAt(++u.position);G!==0;){if(ie(u,!0,y),G=u.input.charCodeAt(u.position),G===T)return u.position++,u.tag=w,u.anchor=P,u.kind=R?"mapping":"sequence",u.result=v,!0;if(k?G===44&&E(u,"expected the node content, but found ','"):E(u,"missed comma between flow collection entries"),j=H=V=null,D=C=!1,G===63){let wt=u.input.charCodeAt(u.position+1);L(wt)&&(D=C=!0,u.position++,ie(u,!0,y))}A=u.line,x=u.lineStart,d=u.position,bt(u,y,s,!1,!0),j=u.tag,H=u.result,ie(u,!0,y),G=u.input.charCodeAt(u.position),(C||u.line===A)&&G===58&&(D=!0,G=u.input.charCodeAt(++u.position),ie(u,!0,y),bt(u,y,s,!1,!0),V=u.result),R?ot(u,v,M,j,H,V,A,x,d):D?v.push(ot(u,null,M,j,H,V,A,x,d)):v.push(H),ie(u,!0,y),G=u.input.charCodeAt(u.position),G===44?(k=!0,G=u.input.charCodeAt(++u.position)):k=!1}E(u,"unexpected end of the stream within a flow collection")}function _t(u,y){let k,A=c,x=!1,d=!1,w=y,v=0,P=!1,T,D=u.input.charCodeAt(u.position);if(D===124)k=!1;else if(D===62)k=!0;else return!1;for(u.kind="scalar",u.result="";D!==0;)if(D=u.input.charCodeAt(++u.position),D===43||D===45)c===A?A=D===43?h:f:E(u,"repeat of a chomping mode identifier");else if((T=$(D))>=0)T===0?E(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):d?E(u,"repeat of an indentation width identifier"):(w=y+T-1,d=!0);else break;if(I(D)){do D=u.input.charCodeAt(++u.position);while(I(D));if(D===35)do D=u.input.charCodeAt(++u.position);while(!S(D)&&D!==0)}for(;D!==0;){for(hr(u),u.lineIndent=0,D=u.input.charCodeAt(u.position);(!d||u.lineIndent<w)&&D===32;)u.lineIndent++,D=u.input.charCodeAt(++u.position);if(!d&&u.lineIndent>w&&(w=u.lineIndent),S(D)){v++;continue}if(!d&&w===0&&E(u,"missing indentation for block scalar"),u.lineIndent<w){A===h?u.result+=t.repeat(`
61
- `,x?1+v:v):A===c&&x&&(u.result+=`
62
- `);break}k?I(D)?(P=!0,u.result+=t.repeat(`
63
- `,x?1+v:v)):P?(P=!1,u.result+=t.repeat(`
64
- `,v+1)):v===0?x&&(u.result+=" "):u.result+=t.repeat(`
65
- `,v):u.result+=t.repeat(`
66
- `,x?1+v:v),x=!0,d=!0,v=0;let C=u.position;for(;!S(D)&&D!==0;)D=u.input.charCodeAt(++u.position);_e(u,C,u.position,!1)}return!0}function en(u,y){let k=u.tag,A=u.anchor,x=[],d=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&he(u,u.anchor,x);let w=u.input.charCodeAt(u.position);for(;w!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,E(u,"tab characters must not be used in indentation")),w===45);){let v=u.input.charCodeAt(u.position+1);if(!L(v))break;if(d=!0,u.position++,ie(u,!0,-1)&&u.lineIndent<=y){x.push(null),w=u.input.charCodeAt(u.position);continue}let P=u.line;if(bt(u,y,a,!1,!0),x.push(u.result),ie(u,!0,-1),w=u.input.charCodeAt(u.position),(u.line===P||u.lineIndent>y)&&w!==0)E(u,"bad indentation of a sequence entry");else if(u.lineIndent<y)break}return d?(u.tag=k,u.anchor=A,u.kind="sequence",u.result=x,!0):!1}function tn(u,y,k){let A,x,d,w,v=u.tag,P=u.anchor,T={},D=Object.create(null),C=null,R=null,M=null,H=!1,j=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&he(u,u.anchor,T);let V=u.input.charCodeAt(u.position);for(;V!==0;){!H&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,E(u,"tab characters must not be used in indentation"));let G=u.input.charCodeAt(u.position+1),wt=u.line;if((V===63||V===58)&&L(G))V===63?(H&&(ot(u,T,D,C,R,null,x,d,w),C=R=M=null),j=!0,H=!0,A=!0):H?(H=!1,A=!0):E(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,V=G;else{if(x=u.line,d=u.lineStart,w=u.position,!bt(u,k,o,!1,!0))break;if(u.line===wt){for(V=u.input.charCodeAt(u.position);I(V);)V=u.input.charCodeAt(++u.position);if(V===58)V=u.input.charCodeAt(++u.position),L(V)||E(u,"a whitespace character is expected after the key-value separator within a block mapping"),H&&(ot(u,T,D,C,R,null,x,d,w),C=R=M=null),j=!0,H=!1,A=!1,C=u.tag,R=u.result;else if(j)E(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=v,u.anchor=P,!0}else if(j)E(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=v,u.anchor=P,!0}if((u.line===wt||u.lineIndent>y)&&(H&&(x=u.line,d=u.lineStart,w=u.position),bt(u,y,l,!0,A)&&(H?R=u.result:M=u.result),H||(ot(u,T,D,C,R,M,x,d,w),C=R=M=null),ie(u,!0,-1),V=u.input.charCodeAt(u.position)),(u.line===wt||u.lineIndent>y)&&V!==0)E(u,"bad indentation of a mapping entry");else if(u.lineIndent<y)break}return H&&ot(u,T,D,C,R,null,x,d,w),j&&(u.tag=v,u.anchor=P,u.kind="mapping",u.result=T),j}function rn(u){let y=!1,k=!1,A,x,d=u.input.charCodeAt(u.position);if(d!==33)return!1;u.tag!==null&&E(u,"duplication of a tag property"),d=u.input.charCodeAt(++u.position),d===60?(y=!0,d=u.input.charCodeAt(++u.position)):d===33?(k=!0,A="!!",d=u.input.charCodeAt(++u.position)):A="!";let w=u.position;if(y){do d=u.input.charCodeAt(++u.position);while(d!==0&&d!==62);u.position<u.length?(x=u.input.slice(w,u.position),d=u.input.charCodeAt(++u.position)):E(u,"unexpected end of the stream within a verbatim tag")}else{for(;d!==0&&!L(d);)d===33&&(k?E(u,"tag suffix cannot contain exclamation marks"):(A=u.input.slice(w-1,u.position+1),_.test(A)||E(u,"named tag handle cannot contain such characters"),k=!0,w=u.position+1)),d=u.input.charCodeAt(++u.position);x=u.input.slice(w,u.position),g.test(x)&&E(u,"tag suffix cannot contain flow indicator characters")}x&&!O.test(x)&&E(u,"tag name cannot contain such characters: "+x);try{x=decodeURIComponent(x)}catch{E(u,"tag name is malformed: "+x)}return y?u.tag=x:i.call(u.tagMap,A)?u.tag=u.tagMap[A]+x:A==="!"?u.tag="!"+x:A==="!!"?u.tag="tag:yaml.org,2002:"+x:E(u,'undeclared tag handle "'+A+'"'),!0}function nn(u){let y=u.input.charCodeAt(u.position);if(y!==38)return!1;u.anchor!==null&&E(u,"duplication of an anchor property"),y=u.input.charCodeAt(++u.position);let k=u.position;for(;y!==0&&!L(y)&&!N(y);)y=u.input.charCodeAt(++u.position);return u.position===k&&E(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(k,u.position),!0}function $i(u){let y=u.input.charCodeAt(u.position);if(y!==42)return!1;y=u.input.charCodeAt(++u.position);let k=u.position;for(;y!==0&&!L(y)&&!N(y);)y=u.input.charCodeAt(++u.position);u.position===k&&E(u,"name of an alias node must contain at least one character");let A=u.input.slice(k,u.position);return i.call(u.anchorMap,A)||E(u,'unidentified alias "'+A+'"'),u.result=u.anchorMap[A],ie(u,!0,-1),!0}function sn(u,y,k,A){let x=xe(u);return gt(u),Ae(u,y),u.tag=null,u.anchor=null,u.kind=null,u.result=null,tn(u,k,A)&&u.kind==="mapping"?(X(u),!0):(We(u),Ae(u,x),!1)}function bt(u,y,k,A,x){let d,w,v=1,P=!1,T=!1,D=null,C,R,M;u.depth>=u.maxDepth&&E(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 H=d=w=l===k||a===k;if(A&&ie(u,!0,-1)&&(P=!0,u.lineIndent>y?v=1:u.lineIndent===y?v=0:u.lineIndent<y&&(v=-1)),v===1)for(;;){let j=u.input.charCodeAt(u.position),V=xe(u);if(P&&(j===33&&u.tag!==null||j===38&&u.anchor!==null)||!rn(u)&&!nn(u))break;D===null&&(D=V),ie(u,!0,-1)?(P=!0,w=H,u.lineIndent>y?v=1:u.lineIndent===y?v=0:u.lineIndent<y&&(v=-1)):w=!1}if(w&&(w=P||x),v===1||l===k)if(s===k||o===k?R=y:R=y+1,M=u.position-u.lineStart,v===1)if(w&&(en(u,M)||tn(u,M,R))||Xr(u,R))T=!0;else{let j=u.input.charCodeAt(u.position);D!==null&&H&&!w&&j!==124&&j!==62&&sn(u,D,D.position-D.lineStart,R)||d&&_t(u,R)||fr(u,R)||Zr(u,R)?T=!0:$i(u)?(T=!0,(u.tag!==null||u.anchor!==null)&&E(u,"alias node should not have any properties")):Qr(u,R,s===k)&&(T=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&he(u,u.anchor,u.result)}else v===0&&(T=w&&en(u,M));if(u.tag===null)u.anchor!==null&&he(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&E(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let j=0,V=u.implicitTypes.length;j<V;j+=1)if(C=u.implicitTypes[j],C.resolve(u.result)){u.result=C.construct(u.result),u.tag=C.tag,u.anchor!==null&&he(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(i.call(u.typeMap[u.kind||"fallback"],u.tag))C=u.typeMap[u.kind||"fallback"][u.tag];else{C=null;let j=u.typeMap.multi[u.kind||"fallback"];for(let V=0,G=j.length;V<G;V+=1)if(u.tag.slice(0,j[V].tag.length)===j[V].tag){C=j[V];break}}C||E(u,"unknown tag !<"+u.tag+">"),u.result!==null&&C.kind!==u.kind&&E(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+C.kind+'", not "'+u.kind+'"'),C.resolve(u.result,u.tag)?(u.result=C.construct(u.result,u.tag),u.anchor!==null&&he(u,u.anchor,u.result)):E(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||T}function ji(u){let y=u.position,k=!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));){k=!0,A=u.input.charCodeAt(++u.position);let x=u.position;for(;A!==0&&!L(A);)A=u.input.charCodeAt(++u.position);let d=u.input.slice(x,u.position),w=[];for(d.length<1&&E(u,"directive name must not be less than one character in length");A!==0;){for(;I(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(x=u.position;A!==0&&!L(A);)A=u.input.charCodeAt(++u.position);w.push(u.input.slice(x,u.position))}A!==0&&hr(u),i.call(st,d)?st[d](u,d,w):J(u,'unknown document directive "'+d+'"')}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)):k&&E(u,"directives end mark is expected"),bt(u,u.lineIndent-1,l,!1,!0),ie(u,!0,-1),u.checkLineBreaks&&m.test(u.input.slice(y,u.position))&&J(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&Qe(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,ie(u,!0,-1));return}u.position<u.length-1&&E(u,"end of the stream or a document separator is expected")}function dr(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 k=new B(u,y),A=u.indexOf("\0");for(A!==-1&&(k.position=A,E(k,"null byte is not allowed in input")),k.input+="\0";k.input.charCodeAt(k.position)===32;)k.lineIndent+=1,k.position+=1;for(;k.position<k.length-1;)ji(k);return k.documents}function Wi(u,y,k){y!==null&&typeof y=="object"&&typeof k>"u"&&(k=y,y=null);let A=dr(u,k);if(typeof y!="function")return A;for(let x=0,d=A.length;x<d;x+=1)y(A[x])}function Vi(u,y){let k=dr(u,y);if(k.length!==0){if(k.length===1)return k[0];throw new e("expected a single document in the stream, but found more")}}return on.loadAll=Wi,on.load=Vi,on}var ds={},pl;function vd(){if(pl)return ds;pl=1;let t=gr(),e=yr(),r=ps(),n=Object.prototype.toString,i=Object.prototype.hasOwnProperty,s=65279,o=9,a=10,l=13,c=32,f=33,h=34,p=35,m=37,g=38,_=39,O=42,b=44,S=45,I=58,L=61,N=62,z=63,U=64,$=91,Q=93,ee=96,ue=123,ae=124,ke=125,B={};B[0]="\\0",B[7]="\\a",B[8]="\\b",B[9]="\\t",B[10]="\\n",B[11]="\\v",B[12]="\\f",B[13]="\\r",B[27]="\\e",B[34]='\\"',B[92]="\\\\",B[133]="\\N",B[160]="\\_",B[8232]="\\L",B[8233]="\\P";let Ne=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],E=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function J(d,w){if(w===null)return{};let v={},P=Object.keys(w);for(let T=0,D=P.length;T<D;T+=1){let C=P[T],R=String(w[C]);C.slice(0,2)==="!!"&&(C="tag:yaml.org,2002:"+C.slice(2));let M=d.compiledTypeMap.fallback[C];M&&i.call(M.styleAliases,R)&&(R=M.styleAliases[R]),v[C]=R}return v}function he(d){let w,v,P=d.toString(16).toUpperCase();if(d<=255)w="x",v=2;else if(d<=65535)w="u",v=4;else if(d<=4294967295)w="U",v=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+w+t.repeat("0",v-P.length)+P}let gt=1,X=2;function We(d){this.schema=d.schema||r,this.indent=Math.max(1,d.indent||2),this.noArrayIndent=d.noArrayIndent||!1,this.skipInvalid=d.skipInvalid||!1,this.flowLevel=t.isNothing(d.flowLevel)?-1:d.flowLevel,this.styleMap=J(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==='"'?X:gt,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 xe(d,w){let v=t.repeat(" ",w),P=0,T="",D=d.length;for(;P<D;){let C,R=d.indexOf(`
68
- `,P);R===-1?(C=d.slice(P),P=D):(C=d.slice(P,R+1),P=R+1),C.length&&C!==`
69
- `&&(T+=v),T+=C}return T}function Ae(d,w){return`
70
- `+t.repeat(" ",d.indent*w)}function st(d,w){for(let v=0,P=d.implicitTypes.length;v<P;v+=1)if(d.implicitTypes[v].resolve(w))return!0;return!1}function _e(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 ur(d){return yt(d)&&d!==s&&d!==l&&d!==a}function ot(d,w,v){let P=ur(d),T=P&&!_e(d);return(v?P:P&&d!==b&&d!==$&&d!==Q&&d!==ue&&d!==ke)&&d!==p&&!(w===I&&!T)||ur(w)&&!_e(w)&&d===p||w===I&&T}function hr(d){return yt(d)&&d!==s&&!_e(d)&&d!==S&&d!==z&&d!==I&&d!==b&&d!==$&&d!==Q&&d!==ue&&d!==ke&&d!==p&&d!==g&&d!==O&&d!==f&&d!==ae&&d!==L&&d!==N&&d!==_&&d!==h&&d!==m&&d!==U&&d!==ee}function ie(d){return!_e(d)&&d!==I}function Qe(d,w){let v=d.charCodeAt(w),P;return v>=55296&&v<=56319&&w+1<d.length&&(P=d.charCodeAt(w+1),P>=56320&&P<=57343)?(v-55296)*1024+P-56320+65536:v}function Wt(d){return/^\n* /.test(d)}let Qr=1,fr=2,Zr=3,Xr=4,_t=5;function en(d,w,v,P,T,D,C,R){let M,H=0,j=null,V=!1,G=!1,wt=P!==-1,pr=-1,mr=hr(Qe(d,0))&&ie(Qe(d,d.length-1));if(w||C)for(M=0;M<d.length;H>=65536?M+=2:M++){if(H=Qe(d,M),!yt(H))return _t;mr=mr&&ot(H,j,R),j=H}else{for(M=0;M<d.length;H>=65536?M+=2:M++){if(H=Qe(d,M),H===a)V=!0,wt&&(G=G||M-pr-1>P&&d[pr+1]!==" ",pr=M);else if(!yt(H))return _t;mr=mr&&ot(H,j,R),j=H}G=G||wt&&M-pr-1>P&&d[pr+1]!==" "}return!V&&!G?mr&&!C&&!T(d)?Qr:D===X?_t:fr:v>9&&Wt(d)?_t:C?D===X?_t:fr:G?Xr:Zr}function tn(d,w,v,P,T){d.dump=(function(){if(w.length===0)return d.quotingType===X?'""':"''";if(!d.noCompatMode&&(Ne.indexOf(w)!==-1||E.test(w)))return d.quotingType===X?'"'+w+'"':"'"+w+"'";let D=d.indent*Math.max(1,v),C=d.lineWidth===-1?-1:Math.max(Math.min(d.lineWidth,40),d.lineWidth-D),R=P||d.flowLevel>-1&&v>=d.flowLevel;function M(H){return st(d,H)}switch(en(w,R,d.indent,C,M,d.quotingType,d.forceQuotes&&!P,T)){case Qr:return w;case fr:return"'"+w.replace(/'/g,"''")+"'";case Zr:return"|"+rn(w,d.indent)+nn(xe(w,D));case Xr:return">"+rn(w,d.indent)+nn(xe($i(w,C),D));case _t:return'"'+bt(w)+'"';default:throw new e("impossible error: invalid scalar style")}})()}function rn(d,w){let v=Wt(d)?String(w):"",P=d[d.length-1]===`
71
- `,D=P&&(d[d.length-2]===`
72
- `||d===`
73
- `)?"+":P?"":"-";return v+D+`
74
- `}function nn(d){return d[d.length-1]===`
75
- `?d.slice(0,-1):d}function $i(d,w){let v=/(\n+)([^\n]*)/g,P=(function(){let R=d.indexOf(`
76
- `);return R=R!==-1?R:d.length,v.lastIndex=R,sn(d.slice(0,R),w)})(),T=d[0]===`
77
- `||d[0]===" ",D,C;for(;C=v.exec(d);){let R=C[1],M=C[2];D=M[0]===" ",P+=R+(!T&&!D&&M!==""?`
78
- `:"")+sn(M,w),T=D}return P}function sn(d,w){if(d===""||d[0]===" ")return d;let v=/ [^ ]/g,P,T=0,D,C=0,R=0,M="";for(;P=v.exec(d);)R=P.index,R-T>w&&(D=C>T?C:R,M+=`
79
- `+d.slice(T,D),T=D+1),C=R;return M+=`
80
- `,d.length-T>w&&C>T?M+=d.slice(T,C)+`
81
- `+d.slice(C+1):M+=d.slice(T),M.slice(1)}function bt(d){let w="",v=0;for(let P=0;P<d.length;v>=65536?P+=2:P++){v=Qe(d,P);let T=B[v];!T&&yt(v)?(w+=d[P],v>=65536&&(w+=d[P+1])):w+=T||he(v)}return w}function ji(d,w,v){let P="",T=d.tag;for(let D=0,C=v.length;D<C;D+=1){let R=v[D];d.replacer&&(R=d.replacer.call(v,String(D),R)),(y(d,w,R,!1,!1)||typeof R>"u"&&y(d,w,null,!1,!1))&&(P!==""&&(P+=","+(d.condenseFlow?"":" ")),P+=d.dump)}d.tag=T,d.dump="["+P+"]"}function dr(d,w,v,P){let T="",D=d.tag;for(let C=0,R=v.length;C<R;C+=1){let M=v[C];d.replacer&&(M=d.replacer.call(v,String(C),M)),(y(d,w+1,M,!0,!0,!1,!0)||typeof M>"u"&&y(d,w+1,null,!0,!0,!1,!0))&&((!P||T!=="")&&(T+=Ae(d,w)),d.dump&&a===d.dump.charCodeAt(0)?T+="-":T+="- ",T+=d.dump)}d.tag=D,d.dump=T||"[]"}function Wi(d,w,v){let P="",T=d.tag,D=Object.keys(v);for(let C=0,R=D.length;C<R;C+=1){let M="";P!==""&&(M+=", "),d.condenseFlow&&(M+='"');let H=D[C],j=v[H];d.replacer&&(j=d.replacer.call(v,H,j)),y(d,w,H,!1,!1)&&(d.dump.length>1024&&(M+="? "),M+=d.dump+(d.condenseFlow?'"':"")+":"+(d.condenseFlow?"":" "),y(d,w,j,!1,!1)&&(M+=d.dump,P+=M))}d.tag=T,d.dump="{"+P+"}"}function Vi(d,w,v,P){let T="",D=d.tag,C=Object.keys(v);if(d.sortKeys===!0)C.sort();else if(typeof d.sortKeys=="function")C.sort(d.sortKeys);else if(d.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let R=0,M=C.length;R<M;R+=1){let H="";(!P||T!=="")&&(H+=Ae(d,w));let j=C[R],V=v[j];if(d.replacer&&(V=d.replacer.call(v,j,V)),!y(d,w+1,j,!0,!0,!0))continue;let G=d.tag!==null&&d.tag!=="?"||d.dump&&d.dump.length>1024;G&&(d.dump&&a===d.dump.charCodeAt(0)?H+="?":H+="? "),H+=d.dump,G&&(H+=Ae(d,w)),y(d,w+1,V,!0,G)&&(d.dump&&a===d.dump.charCodeAt(0)?H+=":":H+=": ",H+=d.dump,T+=H)}d.tag=D,d.dump=T||"{}"}function u(d,w,v){let P=v?d.explicitTypes:d.implicitTypes;for(let T=0,D=P.length;T<D;T+=1){let C=P[T];if((C.instanceOf||C.predicate)&&(!C.instanceOf||typeof w=="object"&&w instanceof C.instanceOf)&&(!C.predicate||C.predicate(w))){if(v?C.multi&&C.representName?d.tag=C.representName(w):d.tag=C.tag:d.tag="?",C.represent){let R=d.styleMap[C.tag]||C.defaultStyle,M;if(n.call(C.represent)==="[object Function]")M=C.represent(w,R);else if(i.call(C.represent,R))M=C.represent[R](w,R);else throw new e("!<"+C.tag+'> tag resolver accepts not "'+R+'" style');d.dump=M}return!0}}return!1}function y(d,w,v,P,T,D,C){d.tag=null,d.dump=v,u(d,v,!1)||u(d,v,!0);let R=n.call(d.dump),M=P;P&&(P=d.flowLevel<0||d.flowLevel>w);let H=R==="[object Object]"||R==="[object Array]",j,V;if(H&&(j=d.duplicates.indexOf(v),V=j!==-1),(d.tag!==null&&d.tag!=="?"||V||d.indent!==2&&w>0)&&(T=!1),V&&d.usedDuplicates[j])d.dump="*ref_"+j;else{if(H&&V&&!d.usedDuplicates[j]&&(d.usedDuplicates[j]=!0),R==="[object Object]")P&&Object.keys(d.dump).length!==0?(Vi(d,w,d.dump,T),V&&(d.dump="&ref_"+j+d.dump)):(Wi(d,w,d.dump),V&&(d.dump="&ref_"+j+" "+d.dump));else if(R==="[object Array]")P&&d.dump.length!==0?(d.noArrayIndent&&!C&&w>0?dr(d,w-1,d.dump,T):dr(d,w,d.dump,T),V&&(d.dump="&ref_"+j+d.dump)):(ji(d,w,d.dump),V&&(d.dump="&ref_"+j+" "+d.dump));else if(R==="[object String]")d.tag!=="?"&&tn(d,d.dump,w,D,M);else{if(R==="[object Undefined]")return!1;if(d.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+R)}if(d.tag!==null&&d.tag!=="?"){let G=encodeURI(d.tag[0]==="!"?d.tag.slice(1):d.tag).replace(/!/g,"%21");d.tag[0]==="!"?G="!"+G:G.slice(0,18)==="tag:yaml.org,2002:"?G="!!"+G.slice(18):G="!<"+G+">",d.dump=G+" "+d.dump}}return!0}function k(d,w){let v=[],P=[];A(d,v,P);let T=P.length;for(let D=0;D<T;D+=1)w.duplicates.push(v[P[D]]);w.usedDuplicates=new Array(T)}function A(d,w,v){if(d!==null&&typeof d=="object"){let P=w.indexOf(d);if(P!==-1)v.indexOf(P)===-1&&v.push(P);else if(w.push(d),Array.isArray(d))for(let T=0,D=d.length;T<D;T+=1)A(d[T],w,v);else{let T=Object.keys(d);for(let D=0,C=T.length;D<C;D+=1)A(d[T[D]],w,v)}}}function x(d,w){w=w||{};let v=new We(w);v.noRefs||k(d,v);let P=d;return v.replacer&&(P=v.replacer.call({"":P},"",P)),y(v,0,P,!0,!0)?v.dump+`
82
- `:""}return ds.dump=x,ds}var ml;function Sd(){if(ml)return be;ml=1;let t=wd(),e=vd();function r(n,i){return function(){throw new Error("Function yaml."+n+" is removed in js-yaml 4. Use yaml."+i+" instead, which is now safe by default.")}}return be.Type=Ce(),be.Schema=gl(),be.FAILSAFE_SCHEMA=wl(),be.JSON_SCHEMA=El(),be.CORE_SCHEMA=kl(),be.DEFAULT_SCHEMA=ps(),be.load=t.load,be.loadAll=t.loadAll,be.dump=e.dump,be.YAMLException=yr(),be.types={binary:Pl(),float:Cl(),map:bl(),null:vl(),pairs:Dl(),set:Il(),timestamp:Al(),bool:Sl(),int:xl(),merge:Ol(),omap:Tl(),seq:_l(),str:yl()},be.safeLoad=r("safeLoad","load"),be.safeLoadAll=r("safeLoadAll","loadAll"),be.safeDump=r("safeDump","dump"),be}var xd=Sd(),Ze=_d(xd),{Type:Hw,Schema:$w,FAILSAFE_SCHEMA:jw,JSON_SCHEMA:Ww,CORE_SCHEMA:Vw,DEFAULT_SCHEMA:zw,load:Uw,loadAll:Gw,dump:Yw,YAMLException:Kw,types:Jw,safeLoad:Qw,safeLoadAll:Zw,safeDump:Xw}=Ze;var W=zi(Nl(),1);import{stat as rp}from"fs";import{stat as np,readdir as ip}from"fs/promises";import{EventEmitter as sp}from"events";import*as Y from"path";import{stat as Ad,lstat as Ml,readdir as Od,realpath as Pd}from"node:fs/promises";import{Readable as Td}from"node:stream";import{resolve as Fl,relative as Dd,join as Id,sep as Rd}from"node:path";var Pe={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},gs={root:".",fileFilter:t=>!0,directoryFilter:t=>!0,type:Pe.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(gs);var $l="READDIRP_RECURSIVE_ERROR",Ld=new Set(["ENOENT","EPERM","EACCES","ELOOP",$l]),Bl=[Pe.DIR_TYPE,Pe.EVERYTHING_TYPE,Pe.FILE_DIR_TYPE,Pe.FILE_TYPE],Nd=new Set([Pe.DIR_TYPE,Pe.EVERYTHING_TYPE,Pe.FILE_DIR_TYPE]),Md=new Set([Pe.EVERYTHING_TYPE,Pe.FILE_DIR_TYPE,Pe.FILE_TYPE]),Fd=t=>Ld.has(t.code),Bd=process.platform==="win32",ql=t=>!0,Hl=t=>{if(t===void 0)return ql;if(typeof t=="function")return t;if(typeof t=="string"){let e=t.trim();return r=>r.basename===e}if(Array.isArray(t)){let e=t.map(r=>r.trim());return r=>e.some(n=>r.basename===n)}return ql},ys=class extends Td{constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark});let r={...gs,...e},{root:n,type:i}=r;this._fileFilter=Hl(r.fileFilter),this._directoryFilter=Hl(r.directoryFilter);let s=r.lstat?Ml:Ad;Bd?this._stat=o=>s(o,{bigint:!0}):this._stat=s,this._maxDepth=r.depth??gs.depth,this._wantsDir=i?Nd.has(i):!1,this._wantsFile=i?Md.has(i):!1,this._wantsEverything=i===Pe.EVERYTHING_TYPE,this._root=Fl(n),this._isDirent=!r.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 r=this.parent,n=r&&r.files;if(n&&n.length>0){let{path:i,depth:s}=r,o=n.splice(0,e).map(l=>this._formatEntry(l,i)),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 i=this.parents.pop();if(!i){this.push(null);break}if(this.parent=await i,this.destroyed)return}}}catch(r){this.destroy(r)}finally{this.reading=!1}}}async _exploreDir(e,r){let n;try{n=await Od(e,this._rdOptions)}catch(i){this._onError(i)}return{files:n,depth:r,path:e}}async _formatEntry(e,r){let n,i=this._isDirent?e.name:e;try{let s=Fl(Id(r,i));n={path:Dd(this._root,s),fullPath:s,basename:i},n[this._statsProp]=this._isDirent?e:await this._stat(s)}catch(s){this._onError(s);return}return n}_onError(e){Fd(e)&&!this.destroyed?this.emit("warn",e):this.destroy(e)}async _getEntryType(e){if(!e&&this._statsProp in e)return"";let r=e[this._statsProp];if(r.isFile())return"file";if(r.isDirectory())return"directory";if(r&&r.isSymbolicLink()){let n=e.fullPath;try{let i=await Pd(n),s=await Ml(i);if(s.isFile())return"file";if(s.isDirectory()){let o=i.length;if(n.startsWith(i)&&n.substr(o,1)===Rd){let a=new Error(`Circular symlink detected: "${n}" points to "${i}"`);return a.code=$l,this._onError(a)}return"directory"}}catch(i){return this._onError(i),""}}}_includeAsFile(e){let r=e&&e[this._statsProp];return r&&this._wantsEverything&&!r.isDirectory()}};function jl(t,e={}){let r=e.entryType||e.type;if(r==="both"&&(r=Pe.FILE_DIR_TYPE),r&&(e.type=r),t){if(typeof t!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(r&&!Bl.includes(r))throw new Error(`readdirp: Invalid type passed. Use one of ${Bl.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=t,new ys(e)}import{watchFile as qd,unwatchFile as Wl,watch as Hd}from"fs";import{open as $d,stat as zl,lstat as jd,realpath as _s}from"fs/promises";import*as re from"path";import{type as Wd}from"os";var Vd="data",vs="end",Ul="close",dn=()=>{};var pn=process.platform,Ss=pn==="win32",zd=pn==="darwin",Ud=pn==="linux",Gd=pn==="freebsd",Gl=Wd()==="OS400",ne={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},ze=ne,Yd="watch",Kd={lstat:jd,stat:zl},Pt="listeners",cn="errHandlers",Vt="rawEmitters",Jd=[Pt,cn,Vt],Qd=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"]),Zd=t=>Qd.has(re.extname(t).slice(1).toLowerCase()),ws=(t,e)=>{t instanceof Set?t.forEach(e):e(t)},_r=(t,e,r)=>{let n=t[e];n instanceof Set||(t[e]=n=new Set([n])),n.add(r)},Xd=t=>e=>{let r=t[e];r instanceof Set?r.clear():delete t[e]},br=(t,e,r)=>{let n=t[e];n instanceof Set?n.delete(r):n===r&&delete t[e]},Yl=t=>t instanceof Set?t.size===0:!t,un=new Map;function Vl(t,e,r,n,i){let s=(o,a)=>{r(t),i(o,a,{watchedPath:t}),a&&t!==a&&hn(re.resolve(t,a),Pt,re.join(t,a))};try{return Hd(t,{persistent:e.persistent},s)}catch(o){n(o);return}}var hn=(t,e,r,n,i)=>{let s=un.get(t);s&&ws(s[e],o=>{o(r,n,i)})},ep=(t,e,r,n)=>{let{listener:i,errHandler:s,rawEmitter:o}=n,a=un.get(e),l;if(!r.persistent)return l=Vl(t,r,i,s,o),l?l.close.bind(l):void 0;if(a)_r(a,Pt,i),_r(a,cn,s),_r(a,Vt,o);else{if(l=Vl(t,r,hn.bind(null,e,Pt),s,hn.bind(null,e,Vt)),!l)return;l.on(ze.ERROR,async c=>{let f=hn.bind(null,e,cn);if(a&&(a.watcherUnusable=!0),Ss&&c.code==="EPERM")try{await(await $d(t,"r")).close(),f(c)}catch{}else f(c)}),a={listeners:i,errHandlers:s,rawEmitters:o,watcher:l},un.set(e,a)}return()=>{br(a,Pt,i),br(a,cn,s),br(a,Vt,o),Yl(a.listeners)&&(a.watcher.close(),un.delete(e),Jd.forEach(Xd(a)),a.watcher=void 0,Object.freeze(a))}},bs=new Map,tp=(t,e,r,n)=>{let{listener:i,rawEmitter:s}=n,o=bs.get(e),a=o&&o.options;return a&&(a.persistent<r.persistent||a.interval>r.interval)&&(Wl(e),o=void 0),o?(_r(o,Pt,i),_r(o,Vt,s)):(o={listeners:i,rawEmitters:s,options:r,watcher:qd(e,r,(l,c)=>{ws(o.rawEmitters,h=>{h(ze.CHANGE,e,{curr:l,prev:c})});let f=l.mtimeMs;(l.size!==c.size||f>c.mtimeMs||f===0)&&ws(o.listeners,h=>h(t,l))})},bs.set(e,o)),()=>{br(o,Pt,i),br(o,Vt,s),Yl(o.listeners)&&(bs.delete(e),Wl(e),o.options=o.watcher=void 0,Object.freeze(o))}},fn=class{constructor(e){this.fsw=e,this._boundHandleError=r=>e._handleError(r)}_watchWithNodeFs(e,r){let n=this.fsw.options,i=re.dirname(e),s=re.basename(e);this.fsw._getWatchedDir(i).add(s);let a=re.resolve(e),l={persistent:n.persistent};r||(r=dn);let c;if(n.usePolling){let f=n.interval!==n.binaryInterval;l.interval=f&&Zd(s)?n.binaryInterval:n.interval,c=tp(e,a,l,{listener:r,rawEmitter:this.fsw._emitRaw})}else c=ep(e,a,l,{listener:r,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return c}_handleFile(e,r,n){if(this.fsw.closed)return;let i=re.dirname(e),s=re.basename(e),o=this.fsw._getWatchedDir(i),a=r;if(o.has(s))return;let l=async(f,h)=>{if(this.fsw._throttle(Yd,e,5)){if(!h||h.mtimeMs===0)try{let p=await zl(e);if(this.fsw.closed)return;let m=p.atimeMs,g=p.mtimeMs;if((!m||m<=g||g!==a.mtimeMs)&&this.fsw._emit(ze.CHANGE,e,p),(zd||Ud||Gd)&&a.ino!==p.ino){this.fsw._closeFile(f),a=p;let _=this._watchWithNodeFs(e,l);_&&this.fsw._addPathCloser(f,_)}else a=p}catch{this.fsw._remove(i,s)}else if(o.has(s)){let p=h.atimeMs,m=h.mtimeMs;(!p||p<=m||m!==a.mtimeMs)&&this.fsw._emit(ze.CHANGE,e,h),a=h}}},c=this._watchWithNodeFs(e,l);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(ze.ADD,e,0))return;this.fsw._emit(ze.ADD,e,r)}return c}async _handleSymlink(e,r,n,i){if(this.fsw.closed)return;let s=e.fullPath,o=this.fsw._getWatchedDir(r);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let a;try{a=await _s(n)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(o.has(i)?this.fsw._symlinkPaths.get(s)!==a&&(this.fsw._symlinkPaths.set(s,a),this.fsw._emit(ze.CHANGE,n,e.stats)):(o.add(i),this.fsw._symlinkPaths.set(s,a),this.fsw._emit(ze.ADD,n,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(s))return!0;this.fsw._symlinkPaths.set(s,!0)}_handleRead(e,r,n,i,s,o,a){if(e=re.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(Vd,async h=>{if(this.fsw.closed){f=void 0;return}let p=h.path,m=re.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===i||!i&&!l.has(p))&&(this.fsw._incrReadyCount(),m=re.join(s,re.relative(s,m)),this._addToNodeFs(m,r,n,o+1))}}).on(ze.ERROR,this._boundHandleError),new Promise((h,p)=>{if(!f)return p();f.once(vs,()=>{if(this.fsw.closed){f=void 0;return}let m=a?a.clear():!1;h(void 0),l.getChildren().filter(g=>g!==e&&!c.has(g)).forEach(g=>{this.fsw._remove(e,g)}),f=void 0,m&&this._handleRead(e,!1,n,i,s,o,a)})})}async _handleDir(e,r,n,i,s,o,a){let l=this.fsw._getWatchedDir(re.dirname(e)),c=l.has(re.basename(e));!(n&&this.fsw.options.ignoreInitial)&&!s&&!c&&this.fsw._emit(ze.ADD_DIR,e,r),l.add(re.basename(e)),this.fsw._getWatchedDir(e);let f,h,p=this.fsw.options.depth;if((p==null||i<=p)&&!this.fsw._symlinkPaths.has(a)){if(!s&&(await this._handleRead(e,n,o,s,e,i,f),this.fsw.closed))return;h=this._watchWithNodeFs(e,(m,g)=>{g&&g.mtimeMs===0||this._handleRead(m,!1,o,s,e,i,f)})}return h}async _addToNodeFs(e,r,n,i,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 Kd[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=re.resolve(e),p=c?await _s(e):e;if(this.fsw.closed||(f=await this._handleDir(a.watchPath,l,r,i,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 _s(e):e;if(this.fsw.closed)return;let p=re.dirname(a.watchPath);if(this.fsw._getWatchedDir(p).add(a.watchPath),this.fsw._emit(ze.ADD,a.watchPath,l),f=await this._handleDir(p,l,r,i,e,a,h),this.fsw.closed)return;h!==void 0&&this.fsw._symlinkPaths.set(re.resolve(e),h)}else f=this._handleFile(a.watchPath,l,r);return o(),f&&this.fsw._addPathCloser(e,f),!1}catch(l){if(this.fsw._handleError(l))return o(),e}}};var xs="/",op="//",ec=".",ap="..",lp="string",cp=/\\/g,Kl=/\/\//,up=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,hp=/^\.[/\\]/;function mn(t){return Array.isArray(t)?t:[t]}var Cs=t=>typeof t=="object"&&t!==null&&!(t instanceof RegExp);function fp(t){return typeof t=="function"?t:typeof t=="string"?e=>t===e:t instanceof RegExp?e=>t.test(e):typeof t=="object"&&t!==null?e=>{if(t.path===e)return!0;if(t.recursive){let r=Y.relative(t.path,e);return r?!r.startsWith("..")&&!Y.isAbsolute(r):!1}return!1}:()=>!1}function dp(t){if(typeof t!="string")throw new Error("string expected");t=Y.normalize(t),t=t.replace(/\\/g,"/");let e=!1;t.startsWith("//")&&(e=!0);let r=/\/\//;for(;t.match(r);)t=t.replace(r,"/");return e&&(t="/"+t),t}function Jl(t,e,r){let n=dp(e);for(let i=0;i<t.length;i++){let s=t[i];if(s(n,r))return!0}return!1}function pp(t,e){if(t==null)throw new TypeError("anymatch: specify first argument");let n=mn(t).map(i=>fp(i));return e==null?(i,s)=>Jl(n,i,s):Jl(n,e)}var Ql=t=>{let e=mn(t).flat();if(!e.every(r=>typeof r===lp))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(tc)},Zl=t=>{let e=t.replace(cp,xs),r=!1;for(e.startsWith(op)&&(r=!0);e.match(Kl);)e=e.replace(Kl,xs);return r&&(e=xs+e),e},tc=t=>Zl(Y.normalize(Zl(t))),Xl=(t="")=>e=>typeof e=="string"?tc(Y.isAbsolute(e)?e:Y.join(t,e)):e,mp=(t,e)=>Y.isAbsolute(t)?t:Y.join(e,t),gp=Object.freeze(new Set),Es=class{constructor(e,r){this.path=e,this._removeWatcher=r,this.items=new Set}add(e){let{items:r}=this;r&&e!==ec&&e!==ap&&r.add(e)}async remove(e){let{items:r}=this;if(!r||(r.delete(e),r.size>0))return;let n=this.path;try{await ip(n)}catch{this._removeWatcher&&this._removeWatcher(Y.dirname(n),Y.basename(n))}}has(e){let{items:r}=this;if(r)return r.has(e)}getChildren(){let{items:e}=this;return e?[...e.values()]:[]}dispose(){this.items.clear(),this.path="",this._removeWatcher=dn,this.items=gp,Object.freeze(this)}},yp="stat",_p="lstat",ks=class{constructor(e,r,n){this.fsw=n;let i=e;this.path=e=e.replace(hp,""),this.watchPath=i,this.fullWatchPath=Y.resolve(i),this.dirParts=[],this.dirParts.forEach(s=>{s.length>1&&s.pop()}),this.followSymlinks=r,this.statMethod=r?yp:_p}entryPath(e){return Y.join(this.watchPath,Y.relative(this.watchPath,e.fullPath))}filterPath(e){let{stats:r}=e;if(r&&r.isSymbolicLink())return this.filterDir(e);let n=this.entryPath(e);return this.fsw._isntIgnored(n,r)&&this.fsw._hasReadPermissions(r)}filterDir(e){return this.fsw._isntIgnored(this.entryPath(e),e.stats)}},gn=class extends sp{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 r=e.awaitWriteFinish,n={stabilityThreshold:2e3,pollInterval:100},i={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...e,ignored:e.ignored?mn(e.ignored):mn([]),awaitWriteFinish:r===!0?n:typeof r=="object"?{...n,...r}:!1};Gl&&(i.usePolling=!0),i.atomic===void 0&&(i.atomic=!i.usePolling);let s=process.env.CHOKIDAR_USEPOLLING;if(s!==void 0){let l=s.toLowerCase();l==="false"||l==="0"?i.usePolling=!1:l==="true"||l==="1"?i.usePolling=!0:i.usePolling=!!l}let o=process.env.CHOKIDAR_INTERVAL;o&&(i.interval=Number.parseInt(o,10));let a=0;this._emitReady=()=>{a++,a>=this._readyCount&&(this._emitReady=dn,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=i,this._nodeFsHandler=new fn(this),Object.freeze(i)}_addIgnoredPath(e){if(Cs(e)){for(let r of this._ignoredPaths)if(Cs(r)&&r.path===e.path&&r.recursive===e.recursive)return}this._ignoredPaths.add(e)}_removeIgnoredPath(e){if(this._ignoredPaths.delete(e),typeof e=="string")for(let r of this._ignoredPaths)Cs(r)&&r.path===e&&this._ignoredPaths.delete(r)}add(e,r,n){let{cwd:i}=this.options;this.closed=!1,this._closePromise=void 0;let s=Ql(e);return i&&(s=s.map(o=>mp(o,i))),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,r);return a&&this._emitReady(),a})).then(o=>{this.closed||o.forEach(a=>{a&&this.add(Y.dirname(a),Y.basename(r||a))})}),this}unwatch(e){if(this.closed)return this;let r=Ql(e),{cwd:n}=this.options;return r.forEach(i=>{!Y.isAbsolute(i)&&!this._closers.has(i)&&(n&&(i=Y.join(n,i)),i=Y.resolve(i)),this._closePath(i),this._addIgnoredPath(i),this._watched.has(i)&&this._addIgnoredPath({path:i,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(r=>r.forEach(n=>{let i=n();i instanceof Promise&&e.push(i)})),this._streams.forEach(r=>r.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(r=>r.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((r,n)=>{let s=(this.options.cwd?Y.relative(this.options.cwd,n):n)||ec;e[s]=r.getChildren().sort()}),e}emitWithAll(e,r){this.emit(e,...r),e!==ne.ERROR&&this.emit(ne.ALL,e,...r)}async _emit(e,r,n){if(this.closed)return;let i=this.options;Ss&&(r=Y.normalize(r)),i.cwd&&(r=Y.relative(i.cwd,r));let s=[r];n!=null&&s.push(n);let o=i.awaitWriteFinish,a;if(o&&(a=this._pendingWrites.get(r)))return a.lastChange=new Date,this;if(i.atomic){if(e===ne.UNLINK)return this._pendingUnlinks.set(r,[e,...s]),setTimeout(()=>{this._pendingUnlinks.forEach((l,c)=>{this.emit(...l),this.emit(ne.ALL,...l),this._pendingUnlinks.delete(c)})},typeof i.atomic=="number"?i.atomic:100),this;e===ne.ADD&&this._pendingUnlinks.has(r)&&(e=ne.CHANGE,this._pendingUnlinks.delete(r))}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(r,o.stabilityThreshold,e,l),this}if(e===ne.CHANGE&&!this._throttle(ne.CHANGE,r,50))return this;if(i.alwaysStat&&n===void 0&&(e===ne.ADD||e===ne.ADD_DIR||e===ne.CHANGE)){let l=i.cwd?Y.join(i.cwd,r):r,c;try{c=await np(l)}catch{}if(!c||this.closed)return;s.push(c)}return this.emitWithAll(e,s),this}_handleError(e){let r=e&&e.code;return e&&r!=="ENOENT"&&r!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||r!=="EPERM"&&r!=="EACCES")&&this.emit(ne.ERROR,e),e||this.closed}_throttle(e,r,n){this._throttled.has(e)||this._throttled.set(e,new Map);let i=this._throttled.get(e);if(!i)throw new Error("invalid throttle");let s=i.get(r);if(s)return s.count++,!1;let o,a=()=>{let c=i.get(r),f=c?c.count:0;return i.delete(r),clearTimeout(o),c&&clearTimeout(c.timeoutObject),f};o=setTimeout(a,n);let l={timeoutObject:o,clear:a,count:0};return i.set(r,l),l}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,r,n,i){let s=this.options.awaitWriteFinish;if(typeof s!="object")return;let o=s.pollInterval,a,l=e;this.options.cwd&&!Y.isAbsolute(e)&&(l=Y.join(this.options.cwd,e));let c=new Date,f=this._pendingWrites;function h(p){rp(l,(m,g)=>{if(m||!f.has(e)){m&&m.code!=="ENOENT"&&i(m);return}let _=Number(new Date);p&&g.size!==p.size&&(f.get(e).lastChange=_);let O=f.get(e);_-O.lastChange>=r?(f.delete(e),i(void 0,g)):a=setTimeout(h,o,g)})}f.has(e)||(f.set(e,{lastChange:c,cancelWait:()=>(f.delete(e),clearTimeout(a),n)}),a=setTimeout(h,o))}_isIgnored(e,r){if(this.options.atomic&&up.test(e))return!0;if(!this._userIgnored){let{cwd:n}=this.options,s=(this.options.ignored||[]).map(Xl(n)),a=[...[...this._ignoredPaths].map(Xl(n)),...s];this._userIgnored=pp(a,void 0)}return this._userIgnored(e,r)}_isntIgnored(e,r){return!this._isIgnored(e,r)}_getWatchHelpers(e){return new ks(e,this.options.followSymlinks,this)}_getWatchedDir(e){let r=Y.resolve(e);return this._watched.has(r)||this._watched.set(r,new Es(r,this._boundRemove)),this._watched.get(r)}_hasReadPermissions(e){return this.options.ignorePermissionErrors?!0:!!(Number(e.mode)&256)}_remove(e,r,n){let i=Y.join(e,r),s=Y.resolve(i);if(n=n??(this._watched.has(i)||this._watched.has(s)),!this._throttle("remove",i,100))return;!n&&this._watched.size===1&&this.add(e,r,!0),this._getWatchedDir(i).getChildren().forEach(p=>this._remove(i,p));let l=this._getWatchedDir(e),c=l.has(r);l.remove(r),this._symlinkPaths.has(s)&&this._symlinkPaths.delete(s);let f=i;if(this.options.cwd&&(f=Y.relative(this.options.cwd,i)),this.options.awaitWriteFinish&&this._pendingWrites.has(f)&&this._pendingWrites.get(f).cancelWait()===ne.ADD)return;this._watched.delete(i),this._watched.delete(s);let h=n?ne.UNLINK_DIR:ne.UNLINK;c&&!this._isIgnored(i)&&this._emit(h,i),this._closePath(i)}_closePath(e){this._closeFile(e);let r=Y.dirname(e);this._getWatchedDir(r).remove(Y.basename(e))}_closeFile(e){let r=this._closers.get(e);r&&(r.forEach(n=>n()),this._closers.delete(e))}_addPathCloser(e,r){if(!r)return;let n=this._closers.get(e);n||(n=[],this._closers.set(e,n)),n.push(r)}_readdirp(e,r){if(this.closed)return;let n={type:ne.ALL,alwaysStat:!0,lstat:!0,...r,depth:0},i=jl(e,n);return this._streams.add(i),i.once(Ul,()=>{i=void 0}),i.once(vs,()=>{i&&(this._streams.delete(i),i=void 0)}),i}};function bp(t,e={}){let r=new gn(e);return r.add(t),r}var rc={watch:bp,FSWatcher:gn};import{tsImport as Nw}from"tsx/esm/api";import{register as Mw}from"tsx/cjs/api";var mc=zi(pc(),1),{program:x1,createCommand:C1,createArgument:E1,createOption:k1,CommanderError:A1,InvalidArgumentError:O1,InvalidOptionArgumentError:P1,Command:gc,Argument:T1,Option:D1,Help:I1}=mc.default;var yc=`# yaml-language-server: $schema=./node_modules/cli-contracts/schemas/cli-contract.schema.json
50
+ `.trim()},blockValue:function(e){var t=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs(e,0,r);var i=this.popStack();r.splice(1,0,i),this.push(this.source.functionCall(t,"call",r))},ambiguousBlockValue:function(){var e=this.aliasable("container.hooks.blockHelperMissing"),t=[this.contextName(0)];this.setupHelperArgs("",0,t,!0),this.flushInline();var r=this.topStack();t.splice(1,0,r),this.pushSource(["if (!",this.lastHelper,") { ",r," = ",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,r,i){var s=0;!i&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[s++])):this.pushContext(),this.resolvePath("context",e,s,t,r)},lookupBlockParam:function(e,t){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",t,1)},lookupData:function(e,t,r){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",t,0,!0,r)},resolvePath:function(e,t,r,i,s){var o=this;if(this.options.strict||this.options.assumeObjects){this.push(hm(this.options.strict&&s,this,t,r,e));return}for(var a=t.length,c=function(d){o.replaceStack(function(f){var p=o.nameLookup(f,t[d],e);return i?[" && ",p]:[" != null ? ",p," : ",f]})},l=r;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 r=this.nameLookup("decorators",t,"decorator"),i=this.setupHelperArgs(t,e);this.decorators.push(["var decorator = ",r,";"]),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",i])," || fn;"])},invokeHelper:function(e,t,r){var i=this.popStack(),s=this.setupHelper(e,t),o=[];r&&o.push(s.name),o.push(i),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 r=[];r.push(e[0]);for(var i=1;i<e.length;i++)r.push(t,e[i]);return r},invokeKnownHelper:function(e,t){var r=this.setupHelper(e,t);this.push(this.source.functionCall(r.name,"call",r.callParams))},invokeAmbiguous:function(e,t){this.useRegister("helper");var r=this.popStack();this.emptyHash();var i=this.setupHelper(0,e,t),s=this.lastHelper=this.nameLookup("helpers",e,"helper"),o=["(","(helper = ",s," || ",r,")"];this.options.strict||(o[0]="(helper = ",o.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",o,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(e,t,r){var i=[],s=this.setupParams(t,1,i);e&&(t=this.popStack(),delete s.name),r&&(s.indent=this.quotedString(r)),s.helpers="helpers",s.partials="partials",s.decorators="container.decorators",e?i.unshift(t):i.unshift(this.nameLookup("partials",t,"partial")),this.options.compat&&(s.depths="depths"),s=this.objectLiteral(s),i.push(s),this.push(this.source.functionCall("container.invokePartial","",i))},assignToHash:function(e){var t=this.popStack(),r=void 0,i=void 0,s=void 0;this.trackIds&&(s=this.popStack()),this.stringParams&&(i=this.popStack(),r=this.popStack());var o=this.hash;r&&(o.contexts[e]=r),i&&(o.types[e]=i),s&&(o.ids[e]=s),o.values[e]=t},pushId:function(e,t,r){e==="BlockParam"?this.pushStackLiteral("blockParams["+t[0]+"].path["+t[1]+"]"+(r?" + "+this.quotedString("."+r):"")):e==="PathExpression"?this.pushString(t):e==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:It,compileChildren:function(e,t){for(var r=e.children,i=void 0,s=void 0,o=0,a=r.length;o<a;o++){i=r[o],s=new this.compiler;var c=this.matchExistingProgram(i);if(c==null){var l=this.context.programs.push("")-1;i.index=l,i.name="program"+l,this.context.programs[l]=s.compile(i,t,this.context,!this.precompile),this.context.decorators[l]=s.decorators,this.context.environments[l]=i,this.useDepths=this.useDepths||s.useDepths,this.useBlockParams=this.useBlockParams||s.useBlockParams,i.useDepths=this.useDepths,i.useBlockParams=this.useBlockParams}else i.index=c.index,i.name="program"+c.index,this.useDepths=this.useDepths||c.useDepths,this.useBlockParams=this.useBlockParams||c.useBlockParams}},matchExistingProgram:function(e){for(var t=0,r=this.context.environments.length;t<r;t++){var i=this.context.environments[t];if(i&&i.equals(e))return i}},programExpression:function(e){var t=this.environment.children[e],r=[t.index,"data",t.blockParams];return(this.useBlockParams||this.useDepths)&&r.push("blockParams"),this.useDepths&&r.push("depths"),"container.program("+r.join(", ")+")"},useRegister:function(e){this.registers[e]||(this.registers[e]=!0,this.registers.list.push(e))},push:function(e){return e instanceof Ot||(e=this.source.wrap(e)),this.inlineStack.push(e),e},pushStackLiteral:function(e){this.push(new Ot(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=["("],r=void 0,i=void 0,s=void 0;if(!this.isInline())throw new Js.default("replaceStack on non-inline");var o=this.popStack(!0);if(o instanceof Ot)r=[o.value],t=["(",r],s=!0;else{i=!0;var a=this.incrStack();t=["((",this.push(a)," = ",o,")"],r=this.topStack()}var c=e.call(this,r);s||this.popStack(),i&&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,r=e.length;t<r;t++){var i=e[t];if(i instanceof Ot)this.compileStack.push(i);else{var s=this.incrStack();this.pushSource([s," = ",i,";"]),this.compileStack.push(s)}}},isInline:function(){return this.inlineStack.length},popStack:function(e){var t=this.isInline(),r=(t?this.inlineStack:this.compileStack).pop();if(!e&&r instanceof Ot)return r.value;if(!t){if(!this.stackSlot)throw new Js.default("Invalid stack pop");this.stackSlot--}return r},topStack:function(){var e=this.isInline()?this.inlineStack:this.compileStack,t=e[e.length-1];return t instanceof Ot?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,r){var i=[],s=this.setupHelperArgs(t,e,i,r),o=this.nameLookup("helpers",t,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:i,paramsInit:s,name:o,callParams:[a].concat(i)}},setupParams:function(e,t,r){var i={},s=[],o=[],a=[],c=!r,l=void 0;c&&(r=[]),i.name=this.quotedString(e),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var d=this.popStack(),f=this.popStack();(f||d)&&(i.fn=f||"container.noop",i.inverse=d||"container.noop");for(var p=t;p--;)l=this.popStack(),r[p]=l,this.trackIds&&(a[p]=this.popStack()),this.stringParams&&(o[p]=this.popStack(),s[p]=this.popStack());return c&&(i.args=this.source.generateArray(r)),this.trackIds&&(i.ids=this.source.generateArray(a)),this.stringParams&&(i.types=this.source.generateArray(o),i.contexts=this.source.generateArray(s)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(e,t,r,i){var s=this.setupParams(e,t,r);return s.loc=Jc(this),s=this.objectLiteral(s),i?(this.useRegister("options"),r.push("options"),["options=",s]):r?(r.push(s),""):s}};(function(){for(var n="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=It.RESERVED_WORDS={},t=0,r=n.length;t<r;t++)e[n[t]]=!0})();It.isValidJavaScriptVariableName=function(n){return!It.RESERVED_WORDS[n]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(n)};function Jc(n){var e=n.source.currentLocation;return e?Kc.safeJsonLiteral(e):"undefined"}function hm(n,e,t,r,i){var s=e.popStack(),o=t.length;n&&o--;for(var a=r;a<o;a++)s=e.nameLookup(s,t[a],i);return n?[e.aliasable("container.strict"),"(",s,", ",e.quotedString(t[o]),", ",Jc(e)," )"]:s}Ar.default=It;Qc.exports=Ar.default});var tu=B((Pr,eu)=>{"use strict";Pr.__esModule=!0;function sn(n){return n&&n.__esModule?n:{default:n}}var pm=Zl(),mm=sn(pm),gm=xs(),_m=sn(gm),Qs=dc(),Zs=_c(),ym=Zc(),bm=sn(ym),wm=_r(),vm=sn(wm),Sm=bs(),xm=sn(Sm),Cm=mm.default.create;function Xc(){var n=Cm();return n.compile=function(e,t){return Zs.compile(e,t,n)},n.precompile=function(e,t){return Zs.precompile(e,t,n)},n.AST=_m.default,n.Compiler=Zs.Compiler,n.JavaScriptCompiler=bm.default,n.Parser=Qs.parser,n.parse=Qs.parse,n.parseWithoutProcessing=Qs.parseWithoutProcessing,n}var Tt=Xc();Tt.create=Xc;xm.default(Tt);Tt.Visitor=vm.default;Tt.default=Tt;Pr.default=Tt;eu.exports=Pr.default});var nu=B(Or=>{"use strict";Or.__esModule=!0;Or.print=Pm;Or.PrintVisitor=se;function Em(n){return n&&n.__esModule?n:{default:n}}var km=_r(),Am=Em(km);function Pm(n){return new se().accept(n)}function se(){this.padding=0}se.prototype=new Am.default;se.prototype.pad=function(n){for(var e="",t=0,r=this.padding;t<r;t++)e+=" ";return e+=n+`
51
+ `,e};se.prototype.Program=function(n){var e="",t=n.body,r=void 0,i=void 0;if(n.blockParams){var s="BLOCK PARAMS: [";for(r=0,i=n.blockParams.length;r<i;r++)s+=" "+n.blockParams[r];s+=" ]",e+=this.pad(s)}for(r=0,i=t.length;r<i;r++)e+=this.accept(t[r]);return this.padding--,e};se.prototype.MustacheStatement=function(n){return this.pad("{{ "+this.SubExpression(n)+" }}")};se.prototype.Decorator=function(n){return this.pad("{{ DIRECTIVE "+this.SubExpression(n)+" }}")};se.prototype.BlockStatement=se.prototype.DecoratorBlock=function(n){var e="";return e+=this.pad((n.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(n)),n.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(n.program),this.padding--),n.inverse&&(n.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(n.inverse),this.padding--,n.program&&this.padding--),this.padding--,e};se.prototype.PartialStatement=function(n){var e="PARTIAL:"+n.name.original;return n.params[0]&&(e+=" "+this.accept(n.params[0])),n.hash&&(e+=" "+this.accept(n.hash)),this.pad("{{> "+e+" }}")};se.prototype.PartialBlockStatement=function(n){var e="PARTIAL BLOCK:"+n.name.original;return n.params[0]&&(e+=" "+this.accept(n.params[0])),n.hash&&(e+=" "+this.accept(n.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(n.program),this.padding--,this.pad("{{> "+e+" }}")};se.prototype.ContentStatement=function(n){return this.pad("CONTENT[ '"+n.value+"' ]")};se.prototype.CommentStatement=function(n){return this.pad("{{! '"+n.value+"' }}")};se.prototype.SubExpression=function(n){for(var e=n.params,t=[],r=void 0,i=0,s=e.length;i<s;i++)t.push(this.accept(e[i]));return e="["+t.join(", ")+"]",r=n.hash?" "+this.accept(n.hash):"",this.accept(n.path)+" "+e+r};se.prototype.PathExpression=function(n){var e=n.parts.join("/");return(n.data?"@":"")+"PATH:"+e};se.prototype.StringLiteral=function(n){return'"'+n.value+'"'};se.prototype.NumberLiteral=function(n){return"NUMBER{"+n.value+"}"};se.prototype.BooleanLiteral=function(n){return"BOOLEAN{"+n.value+"}"};se.prototype.UndefinedLiteral=function(){return"UNDEFINED"};se.prototype.NullLiteral=function(){return"NULL"};se.prototype.Hash=function(n){for(var e=n.pairs,t=[],r=0,i=e.length;r<i;r++)t.push(this.accept(e[r]));return"HASH{"+t.join(", ")+"}"};se.prototype.HashPair=function(n){return n.key+"="+this.accept(n.value)}});var ou=B((ib,su)=>{var Ir=tu().default,iu=nu();Ir.PrintVisitor=iu.PrintVisitor;Ir.print=iu.print;su.exports=Ir;function ru(n,e){var t=Te("fs"),r=t.readFileSync(e,"utf8");n.exports=Ir.compile(r)}typeof Te<"u"&&Te.extensions&&(Te.extensions[".handlebars"]=ru,Te.extensions[".hbs"]=ru)});import{readFile as _u,writeFile as pu,access as sg,mkdir as og}from"node:fs/promises";import{resolve as Ne,relative as so}from"node:path";import{pathToFileURL as yu}from"node:url";function ku(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var de={},gn={},tt={},uo;function Ht(){if(uo)return tt;uo=1;function n(o){return typeof o>"u"||o===null}function e(o){return typeof o=="object"&&o!==null}function t(o){return Array.isArray(o)?o:n(o)?[]:[o]}function r(o,a){if(a){let c=Object.keys(a);for(let l=0,d=c.length;l<d;l+=1){let f=c[l];o[f]=a[f]}}return o}function i(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 tt.isNothing=n,tt.isObject=e,tt.toArray=t,tt.repeat=i,tt.isNegativeZero=s,tt.extend=r,tt}var qr,fo;function $t(){if(fo)return qr;fo=1;function n(t,r){let i="",s=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!r&&t.mark.snippet&&(i+=`
52
+
53
+ `+t.mark.snippet),s+" "+i):s}function e(t,r){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=r,this.message=n(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(r){return this.name+": "+n(this,r)},qr=e,qr}var Br,ho;function Au(){if(ho)return Br;ho=1;let n=Ht();function e(i,s,o,a,c){let l="",d="",f=Math.floor(c/2)-1;return a-s>f&&(l=" ... ",s=a-f+l.length),o-a>f&&(d=" ...",o=a+f-d.length),{str:l+i.slice(s,o).replace(/\t/g,"\u2192")+d,pos:a-s+l.length}}function t(i,s){return n.repeat(" ",s-i.length)+i}function r(i,s){if(s=Object.create(s||null),!i.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,d=-1;for(;l=o.exec(i.buffer);)c.push(l.index),a.push(l.index+l[0].length),i.position<=l.index&&d<0&&(d=a.length-2);d<0&&(d=a.length-1);let f="",p=Math.min(i.line+s.linesAfter,c.length).toString().length,g=s.maxLength-(s.indent+p+3);for(let A=1;A<=s.linesBefore&&!(d-A<0);A++){let L=e(i.buffer,a[d-A],c[d-A],i.position-(a[d]-a[d-A]),g);f=n.repeat(" ",s.indent)+t((i.line-A+1).toString(),p)+" | "+L.str+`
54
+ `+f}let x=e(i.buffer,a[d],c[d],i.position,g);f+=n.repeat(" ",s.indent)+t((i.line+1).toString(),p)+" | "+x.str+`
55
+ `,f+=n.repeat("-",s.indent+p+3+x.pos)+`^
56
+ `;for(let A=1;A<=s.linesAfter&&!(d+A>=c.length);A++){let L=e(i.buffer,a[d+A],c[d+A],i.position-(a[d]-a[d+A]),g);f+=n.repeat(" ",s.indent)+t((i.line+A+1).toString(),p)+" | "+L.str+`
57
+ `}return f.replace(/\n$/,"")}return Br=r,Br}var Hr,po;function _e(){if(po)return Hr;po=1;let n=$t(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],t=["scalar","sequence","mapping"];function r(s){let o={};return s!==null&&Object.keys(s).forEach(function(a){s[a].forEach(function(c){o[String(c)]=a})}),o}function i(s,o){if(o=o||{},Object.keys(o).forEach(function(a){if(e.indexOf(a)===-1)throw new n('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=r(o.styleAliases||null),t.indexOf(this.kind)===-1)throw new n('Unknown kind "'+this.kind+'" is specified for "'+s+'" YAML type.')}return Hr=i,Hr}var $r,mo;function Mo(){if(mo)return $r;mo=1;let n=$t(),e=_e();function t(s,o){let a=[];return s[o].forEach(function(c){let l=a.length;a.forEach(function(d,f){d.tag===c.tag&&d.kind===c.kind&&d.multi===c.multi&&(l=f)}),a[l]=c}),a}function r(){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 i(s){return this.extend(s)}return i.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 n("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(d){if(!(d instanceof e))throw new n("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(d.loadKind&&d.loadKind!=="scalar")throw new n("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(d.multi)throw new n("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),c.forEach(function(d){if(!(d instanceof e))throw new n("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let l=Object.create(i.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=r(l.compiledImplicit,l.compiledExplicit),l},$r=i,$r}var Vr,go;function Fo(){if(go)return Vr;go=1;let n=_e();return Vr=new n("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Vr}var jr,_o;function qo(){if(_o)return jr;_o=1;let n=_e();return jr=new n("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),jr}var Wr,yo;function Bo(){if(yo)return Wr;yo=1;let n=_e();return Wr=new n("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Wr}var Ur,bo;function Ho(){if(bo)return Ur;bo=1;let n=Mo();return Ur=new n({explicit:[Fo(),qo(),Bo()]}),Ur}var Gr,wo;function $o(){if(wo)return Gr;wo=1;let n=_e();function e(i){if(i===null)return!0;let s=i.length;return s===1&&i==="~"||s===4&&(i==="null"||i==="Null"||i==="NULL")}function t(){return null}function r(i){return i===null}return Gr=new n("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:t,predicate:r,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),Gr}var zr,vo;function Vo(){if(vo)return zr;vo=1;let n=_e();function e(i){if(i===null)return!1;let s=i.length;return s===4&&(i==="true"||i==="True"||i==="TRUE")||s===5&&(i==="false"||i==="False"||i==="FALSE")}function t(i){return i==="true"||i==="True"||i==="TRUE"}function r(i){return Object.prototype.toString.call(i)==="[object Boolean]"}return zr=new n("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:t,predicate:r,represent:{lowercase:function(i){return i?"true":"false"},uppercase:function(i){return i?"TRUE":"FALSE"},camelcase:function(i){return i?"True":"False"}},defaultStyle:"lowercase"}),zr}var Yr,So;function jo(){if(So)return Yr;So=1;let n=Ht(),e=_e();function t(l){return l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102}function r(l){return l>=48&&l<=55}function i(l){return l>=48&&l<=57}function s(l){if(l===null)return!1;let d=l.length,f=0,p=!1;if(!d)return!1;let g=l[f];if((g==="-"||g==="+")&&(g=l[++f]),g==="0"){if(f+1===d)return!0;if(g=l[++f],g==="b"){for(f++;f<d;f++){if(g=l[f],g!=="0"&&g!=="1")return!1;p=!0}return p&&isFinite(o(l))}if(g==="x"){for(f++;f<d;f++){if(!t(l.charCodeAt(f)))return!1;p=!0}return p&&isFinite(o(l))}if(g==="o"){for(f++;f<d;f++){if(!r(l.charCodeAt(f)))return!1;p=!0}return p&&isFinite(o(l))}}for(;f<d;f++){if(!i(l.charCodeAt(f)))return!1;p=!0}return p?isFinite(o(l)):!1}function o(l){let d=l,f=1,p=d[0];if((p==="-"||p==="+")&&(p==="-"&&(f=-1),d=d.slice(1),p=d[0]),d==="0")return 0;if(p==="0"){if(d[1]==="b")return f*parseInt(d.slice(2),2);if(d[1]==="x")return f*parseInt(d.slice(2),16);if(d[1]==="o")return f*parseInt(d.slice(2),8)}return f*parseInt(d,10)}function a(l){return o(l)}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&l%1===0&&!n.isNegativeZero(l)}return Yr=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"]}}),Yr}var Kr,xo;function Wo(){if(xo)return Kr;xo=1;let n=Ht(),e=_e(),t=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),r=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function i(l){return l===null||!t.test(l)?!1:isFinite(parseFloat(l,10))?!0:r.test(l)}function s(l){let d=l.toLowerCase(),f=d[0]==="-"?-1:1;return"+-".indexOf(d[0])>=0&&(d=d.slice(1)),d===".inf"?f===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:d===".nan"?NaN:f*parseFloat(d,10)}let o=/^[-+]?[0-9]+e/;function a(l,d){if(isNaN(l))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===l)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===l)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n.isNegativeZero(l))return"-0.0";let f=l.toString(10);return o.test(f)?f.replace("e",".e"):f}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&(l%1!==0||n.isNegativeZero(l))}return Kr=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:s,predicate:c,represent:a,defaultStyle:"lowercase"}),Kr}var Jr,Co;function Uo(){return Co||(Co=1,Jr=Ho().extend({implicit:[$o(),Vo(),jo(),Wo()]})),Jr}var Qr,Eo;function Go(){return Eo||(Eo=1,Qr=Uo()),Qr}var Zr,ko;function zo(){if(ko)return Zr;ko=1;let n=_e(),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 r(o){return o===null?!1:e.exec(o)!==null||t.exec(o)!==null}function i(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 d=+l[1],f=+l[2]-1,p=+l[3];if(!l[4])return new Date(Date.UTC(d,f,p));let g=+l[4],x=+l[5],A=+l[6];if(l[7]){for(a=l[7].slice(0,3);a.length<3;)a+="0";a=+a}if(l[9]){let O=+l[10],T=+(l[11]||0);c=(O*60+T)*6e4,l[9]==="-"&&(c=-c)}let L=new Date(Date.UTC(d,f,p,g,x,A,a));return c&&L.setTime(L.getTime()-c),L}function s(o){return o.toISOString()}return Zr=new n("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:s}),Zr}var Xr,Ao;function Yo(){if(Ao)return Xr;Ao=1;let n=_e();function e(t){return t==="<<"||t===null}return Xr=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),Xr}var ei,Po;function Ko(){if(Po)return ei;Po=1;let n=_e(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
58
+ \r`;function t(o){if(o===null)return!1;let a=0,c=o.length,l=e;for(let d=0;d<c;d++){let f=l.indexOf(o.charAt(d));if(!(f>64)){if(f<0)return!1;a+=6}}return a%8===0}function r(o){let a=o.replace(/[\r\n=]/g,""),c=a.length,l=e,d=0,f=[];for(let g=0;g<c;g++)g%4===0&&g&&(f.push(d>>16&255),f.push(d>>8&255),f.push(d&255)),d=d<<6|l.indexOf(a.charAt(g));let p=c%4*6;return p===0?(f.push(d>>16&255),f.push(d>>8&255),f.push(d&255)):p===18?(f.push(d>>10&255),f.push(d>>2&255)):p===12&&f.push(d>>4&255),new Uint8Array(f)}function i(o){let a="",c=0,l=o.length,d=e;for(let p=0;p<l;p++)p%3===0&&p&&(a+=d[c>>18&63],a+=d[c>>12&63],a+=d[c>>6&63],a+=d[c&63]),c=(c<<8)+o[p];let f=l%3;return f===0?(a+=d[c>>18&63],a+=d[c>>12&63],a+=d[c>>6&63],a+=d[c&63]):f===2?(a+=d[c>>10&63],a+=d[c>>4&63],a+=d[c<<2&63],a+=d[64]):f===1&&(a+=d[c>>2&63],a+=d[c<<4&63],a+=d[64],a+=d[64]),a}function s(o){return Object.prototype.toString.call(o)==="[object Uint8Array]"}return ei=new n("tag:yaml.org,2002:binary",{kind:"scalar",resolve:t,construct:r,predicate:s,represent:i}),ei}var ti,Oo;function Jo(){if(Oo)return ti;Oo=1;let n=_e(),e=Object.prototype.hasOwnProperty,t=Object.prototype.toString;function r(s){if(s===null)return!0;let o={},a=s;for(let c=0,l=a.length;c<l;c+=1){let d=a[c],f=!1;if(t.call(d)!=="[object Object]")return!1;let p;for(p in d)if(e.call(d,p))if(!f)f=!0;else return!1;if(!f||e.call(o,p))return!1;Object.defineProperty(o,p,{value:!0})}return!0}function i(s){return s!==null?s:[]}return ti=new n("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:i}),ti}var ni,Io;function Qo(){if(Io)return ni;Io=1;let n=_e(),e=Object.prototype.toString;function t(i){if(i===null)return!0;let s=i,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 d=Object.keys(l);if(d.length!==1)return!1;o[a]=[d[0],l[d[0]]]}return!0}function r(i){if(i===null)return[];let s=i,o=new Array(s.length);for(let a=0,c=s.length;a<c;a+=1){let l=s[a],d=Object.keys(l);o[a]=[d[0],l[d[0]]]}return o}return ni=new n("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:t,construct:r}),ni}var ri,To;function Zo(){if(To)return ri;To=1;let n=_e(),e=Object.prototype.hasOwnProperty;function t(i){if(i===null)return!0;let s=i;for(let o in s)if(e.call(s,o)&&s[o]!==null)return!1;return!0}function r(i){return i!==null?i:{}}return ri=new n("tag:yaml.org,2002:set",{kind:"mapping",resolve:t,construct:r}),ri}var ii,Do;function oi(){return Do||(Do=1,ii=Go().extend({implicit:[zo(),Yo()],explicit:[Ko(),Jo(),Qo(),Zo()]})),ii}var Lo;function Pu(){if(Lo)return gn;Lo=1;let n=Ht(),e=$t(),t=Au(),r=oi(),i=Object.prototype.hasOwnProperty,s=1,o=2,a=3,c=4,l=1,d=2,f=3,p=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=/[\x85\u2028\u2029]/,x=/[,\[\]{}]/,A=/^(?:!|!!|![0-9A-Za-z-]+!)$/,L=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function O(u){return Object.prototype.toString.call(u)}function T(u){return u===10||u===13}function D(u){return u===9||u===32}function F(u){return u===9||u===32||u===10||u===13}function M(u){return u===44||u===91||u===93||u===123||u===125}function G(u){if(u>=48&&u<=57)return u-48;let m=u|32;return m>=97&&m<=102?m-97+10:-1}function J(u){return u===120?2:u===117?4:u===85?8:0}function W(u){return u>=48&&u<=57?u-48:-1}function X(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
+ `;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 ne(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function ye(u,m,S){m==="__proto__"?Object.defineProperty(u,m,{configurable:!0,enumerable:!0,writable:!0,value:S}):u[m]=S}let oe=new Array(256),be=new Array(256);for(let u=0;u<256;u++)oe[u]=X(u)?1:0,be[u]=X(u);function q(u,m){this.input=u,this.filename=m.filename||null,this.schema=m.schema||r,this.onWarning=m.onWarning||null,this.legacy=m.legacy||!1,this.json=m.json||!1,this.listener=m.listener||null,this.maxDepth=typeof m.maxDepth=="number"?m.maxDepth:100,this.maxTotalMergeKeys=typeof m.maxTotalMergeKeys=="number"?m.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 me(u,m){let S={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return S.snippet=t(S),new e(m,S)}function v(u,m){throw me(u,m)}function K(u,m){u.onWarning&&u.onWarning.call(null,me(u,m))}function le(u,m,S){let C=u.anchorMapTransactions;if(C.length!==0){let b=C[C.length-1];i.call(b,m)||(b[m]={existed:i.call(u.anchorMap,m),value:u.anchorMap[m]})}u.anchorMap[m]=S}function Je(u){u.anchorMapTransactions.push(Object.create(null))}function Z(u){let m=u.anchorMapTransactions.pop(),S=u.anchorMapTransactions;if(S.length===0)return;let C=S[S.length-1],b=Object.keys(m);for(let h=0,_=b.length;h<_;h+=1){let y=b[h];i.call(C,y)||(C[y]=m[y])}}function Ie(u){let m=u.anchorMapTransactions.pop(),S=Object.keys(m);for(let C=S.length-1;C>=0;C-=1){let b=m[S[C]];b.existed?u.anchorMap[S[C]]=b.value:delete u.anchorMap[S[C]]}}function ge(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 we(u,m){u.position=m.position,u.line=m.line,u.lineStart=m.lineStart,u.lineIndent=m.lineIndent,u.firstTabInLine=m.firstTabInLine,u.tag=m.tag,u.anchor=m.anchor,u.kind=m.kind,u.result=m.result}let Ve={YAML:function(m,S,C){m.version!==null&&v(m,"duplication of %YAML directive"),C.length!==1&&v(m,"YAML directive accepts exactly one argument");let b=/^([0-9]+)\.([0-9]+)$/.exec(C[0]);b===null&&v(m,"ill-formed argument of the YAML directive");let h=parseInt(b[1],10),_=parseInt(b[2],10);h!==1&&v(m,"unacceptable YAML version of the document"),m.version=C[0],m.checkLineBreaks=_<2,_!==1&&_!==2&&K(m,"unsupported YAML version of the document")},TAG:function(m,S,C){let b;C.length!==2&&v(m,"TAG directive accepts exactly two arguments");let h=C[0];b=C[1],A.test(h)||v(m,"ill-formed tag handle (first argument) of the TAG directive"),i.call(m.tagMap,h)&&v(m,'there is a previously declared suffix for "'+h+'" tag handle'),L.test(b)||v(m,"ill-formed tag prefix (second argument) of the TAG directive");try{b=decodeURIComponent(b)}catch{v(m,"tag prefix is malformed: "+b)}m.tagMap[h]=b}};function fe(u,m,S,C){if(m<S){let b=u.input.slice(m,S);if(C)for(let h=0,_=b.length;h<_;h+=1){let y=b.charCodeAt(h);y===9||y>=32&&y<=1114111||v(u,"expected valid JSON character")}else p.test(b)&&v(u,"the stream contains non-printable characters");u.result+=b}}function Qe(u){u.totalMergeKeys++,u.maxTotalMergeKeys!==-1&&u.totalMergeKeys>u.maxTotalMergeKeys&&v(u,"merge keys exceeded maxTotalMergeKeys ("+u.maxTotalMergeKeys+")")}function Rt(u,m,S,C){n.isObject(S)||v(u,"cannot merge mappings; the provided source object is unacceptable"),Qe(u);let b=Object.keys(S);for(let h=0,_=b.length;h<_;h+=1){let y=b[h];Qe(u),i.call(m,y)||(ye(m,y,S[y]),C[y]=!0)}}function je(u,m,S,C,b,h,_,y,E){if(Array.isArray(b)){b=Array.prototype.slice.call(b);for(let k=0,P=b.length;k<P;k+=1)Array.isArray(b[k])&&v(u,"nested arrays are not supported inside keys"),typeof b=="object"&&O(b[k])==="[object Object]"&&(b[k]="[object Object]")}if(typeof b=="object"&&O(b)==="[object Object]"&&(b="[object Object]"),b=String(b),m===null&&(m={}),C==="tag:yaml.org,2002:merge")if(Array.isArray(h)){h.length>100&&v(u,"abnormal merge sequence size");for(let k=0,P=h.length;k<P;k+=1)Rt(u,m,h[k],S)}else Rt(u,m,h,S);else!u.json&&!i.call(S,b)&&i.call(m,b)&&(u.line=_||u.line,u.lineStart=y||u.lineStart,u.position=E||u.position,v(u,"duplicated mapping key")),ye(m,b,h),delete S[b];return m}function Nt(u){let m=u.input.charCodeAt(u.position);m===10?u.position++:m===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):v(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function ie(u,m,S){let C=0,b=u.input.charCodeAt(u.position);for(;b!==0;){for(;D(b);)b===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),b=u.input.charCodeAt(++u.position);if(m&&b===35)do b=u.input.charCodeAt(++u.position);while(b!==10&&b!==13&&b!==0);if(T(b))for(Nt(u),b=u.input.charCodeAt(u.position),C++,u.lineIndent=0;b===32;)u.lineIndent++,b=u.input.charCodeAt(++u.position);else break}return S!==-1&&C!==0&&u.lineIndent<S&&K(u,"deficient indentation"),C}function Me(u){let m=u.position,S=u.input.charCodeAt(m);return!!((S===45||S===46)&&S===u.input.charCodeAt(m+1)&&S===u.input.charCodeAt(m+2)&&(m+=3,S=u.input.charCodeAt(m),S===0||F(S)))}function pt(u,m){m===1?u.result+=" ":m>1&&(u.result+=n.repeat(`
60
+ `,m-1))}function ln(u,m,S){let C,b,h,_,y,E,k=u.kind,P=u.result,w=u.input.charCodeAt(u.position);if(F(w)||M(w)||w===35||w===38||w===42||w===33||w===124||w===62||w===39||w===34||w===37||w===64||w===96)return!1;if(w===63||w===45){let I=u.input.charCodeAt(u.position+1);if(F(I)||S&&M(I))return!1}for(u.kind="scalar",u.result="",C=b=u.position,h=!1;w!==0;){if(w===58){let I=u.input.charCodeAt(u.position+1);if(F(I)||S&&M(I))break}else if(w===35){let I=u.input.charCodeAt(u.position-1);if(F(I))break}else{if(u.position===u.lineStart&&Me(u)||S&&M(w))break;if(T(w))if(_=u.line,y=u.lineStart,E=u.lineIndent,ie(u,!1,-1),u.lineIndent>=m){h=!0,w=u.input.charCodeAt(u.position);continue}else{u.position=b,u.line=_,u.lineStart=y,u.lineIndent=E;break}}h&&(fe(u,C,b,!1),pt(u,u.line-_),C=b=u.position,h=!1),D(w)||(b=u.position+1),w=u.input.charCodeAt(++u.position)}return fe(u,C,b,!1),u.result?!0:(u.kind=k,u.result=P,!1)}function Mt(u,m){let S,C,b=u.input.charCodeAt(u.position);if(b!==39)return!1;for(u.kind="scalar",u.result="",u.position++,S=C=u.position;(b=u.input.charCodeAt(u.position))!==0;)if(b===39)if(fe(u,S,u.position,!0),b=u.input.charCodeAt(++u.position),b===39)S=u.position,u.position++,C=u.position;else return!0;else T(b)?(fe(u,S,C,!0),pt(u,ie(u,!1,m)),S=C=u.position):u.position===u.lineStart&&Me(u)?v(u,"unexpected end of the document within a single quoted scalar"):(u.position++,D(b)||(C=u.position));v(u,"unexpected end of the stream within a single quoted scalar")}function cn(u,m){let S,C,b,h=u.input.charCodeAt(u.position);if(h!==34)return!1;for(u.kind="scalar",u.result="",u.position++,S=C=u.position;(h=u.input.charCodeAt(u.position))!==0;){if(h===34)return fe(u,S,u.position,!0),u.position++,!0;if(h===92){if(fe(u,S,u.position,!0),h=u.input.charCodeAt(++u.position),T(h))ie(u,!1,m);else if(h<256&&oe[h])u.result+=be[h],u.position++;else if((b=J(h))>0){let _=b,y=0;for(;_>0;_--)h=u.input.charCodeAt(++u.position),(b=G(h))>=0?y=(y<<4)+b:v(u,"expected hexadecimal character");u.result+=ne(y),u.position++}else v(u,"unknown escape sequence");S=C=u.position}else T(h)?(fe(u,S,C,!0),pt(u,ie(u,!1,m)),S=C=u.position):u.position===u.lineStart&&Me(u)?v(u,"unexpected end of the document within a double quoted scalar"):(u.position++,D(h)||(C=u.position))}v(u,"unexpected end of the stream within a double quoted scalar")}function un(u,m){let S=!0,C,b,h,_=u.tag,y,E=u.anchor,k,P,w,I,R=Object.create(null),H,$,j,U=u.input.charCodeAt(u.position);if(U===91)k=93,I=!1,y=[];else if(U===123)k=125,I=!0,y={};else return!1;for(u.anchor!==null&&le(u,u.anchor,y),U=u.input.charCodeAt(++u.position);U!==0;){if(ie(u,!0,m),U=u.input.charCodeAt(u.position),U===k)return u.position++,u.tag=_,u.anchor=E,u.kind=I?"mapping":"sequence",u.result=y,!0;if(S?U===44&&v(u,"expected the node content, but found ','"):v(u,"missed comma between flow collection entries"),$=H=j=null,P=w=!1,U===63){let et=u.input.charCodeAt(u.position+1);F(et)&&(P=w=!0,u.position++,ie(u,!0,m))}C=u.line,b=u.lineStart,h=u.position,Xe(u,m,s,!1,!0),$=u.tag,H=u.result,ie(u,!0,m),U=u.input.charCodeAt(u.position),(w||u.line===C)&&U===58&&(P=!0,U=u.input.charCodeAt(++u.position),ie(u,!0,m),Xe(u,m,s,!1,!0),j=u.result),I?je(u,y,R,$,H,j,C,b,h):P?y.push(je(u,null,R,$,H,j,C,b,h)):y.push(H),ie(u,!0,m),U=u.input.charCodeAt(u.position),U===44?(S=!0,U=u.input.charCodeAt(++u.position)):S=!1}v(u,"unexpected end of the stream within a flow collection")}function Ze(u,m){let S,C=l,b=!1,h=!1,_=m,y=0,E=!1,k,P=u.input.charCodeAt(u.position);if(P===124)S=!1;else if(P===62)S=!0;else return!1;for(u.kind="scalar",u.result="";P!==0;)if(P=u.input.charCodeAt(++u.position),P===43||P===45)l===C?C=P===43?f:d:v(u,"repeat of a chomping mode identifier");else if((k=W(P))>=0)k===0?v(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):h?v(u,"repeat of an indentation width identifier"):(_=m+k-1,h=!0);else break;if(D(P)){do P=u.input.charCodeAt(++u.position);while(D(P));if(P===35)do P=u.input.charCodeAt(++u.position);while(!T(P)&&P!==0)}for(;P!==0;){for(Nt(u),u.lineIndent=0,P=u.input.charCodeAt(u.position);(!h||u.lineIndent<_)&&P===32;)u.lineIndent++,P=u.input.charCodeAt(++u.position);if(!h&&u.lineIndent>_&&(_=u.lineIndent),T(P)){y++;continue}if(!h&&_===0&&v(u,"missing indentation for block scalar"),u.lineIndent<_){C===f?u.result+=n.repeat(`
61
+ `,b?1+y:y):C===l&&b&&(u.result+=`
62
+ `);break}S?D(P)?(E=!0,u.result+=n.repeat(`
63
+ `,b?1+y:y)):E?(E=!1,u.result+=n.repeat(`
64
+ `,y+1)):y===0?b&&(u.result+=" "):u.result+=n.repeat(`
65
+ `,y):u.result+=n.repeat(`
66
+ `,b?1+y:y),b=!0,h=!0,y=0;let w=u.position;for(;!T(P)&&P!==0;)P=u.input.charCodeAt(++u.position);fe(u,w,u.position,!1)}return!0}function fn(u,m){let S=u.tag,C=u.anchor,b=[],h=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&le(u,u.anchor,b);let _=u.input.charCodeAt(u.position);for(;_!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,v(u,"tab characters must not be used in indentation")),_===45);){let y=u.input.charCodeAt(u.position+1);if(!F(y))break;if(h=!0,u.position++,ie(u,!0,-1)&&u.lineIndent<=m){b.push(null),_=u.input.charCodeAt(u.position);continue}let E=u.line;if(Xe(u,m,a,!1,!0),b.push(u.result),ie(u,!0,-1),_=u.input.charCodeAt(u.position),(u.line===E||u.lineIndent>m)&&_!==0)v(u,"bad indentation of a sequence entry");else if(u.lineIndent<m)break}return h?(u.tag=S,u.anchor=C,u.kind="sequence",u.result=b,!0):!1}function dn(u,m,S){let C,b,h,_,y=u.tag,E=u.anchor,k={},P=Object.create(null),w=null,I=null,R=null,H=!1,$=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&le(u,u.anchor,k);let j=u.input.charCodeAt(u.position);for(;j!==0;){!H&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,v(u,"tab characters must not be used in indentation"));let U=u.input.charCodeAt(u.position+1),et=u.line;if((j===63||j===58)&&F(U))j===63?(H&&(je(u,k,P,w,I,null,b,h,_),w=I=R=null),$=!0,H=!0,C=!0):H?(H=!1,C=!0):v(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,j=U;else{if(b=u.line,h=u.lineStart,_=u.position,!Xe(u,S,o,!1,!0))break;if(u.line===et){for(j=u.input.charCodeAt(u.position);D(j);)j=u.input.charCodeAt(++u.position);if(j===58)j=u.input.charCodeAt(++u.position),F(j)||v(u,"a whitespace character is expected after the key-value separator within a block mapping"),H&&(je(u,k,P,w,I,null,b,h,_),w=I=R=null),$=!0,H=!1,C=!1,w=u.tag,I=u.result;else if($)v(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=y,u.anchor=E,!0}else if($)v(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=y,u.anchor=E,!0}if((u.line===et||u.lineIndent>m)&&(H&&(b=u.line,h=u.lineStart,_=u.position),Xe(u,m,c,!0,C)&&(H?I=u.result:R=u.result),H||(je(u,k,P,w,I,R,b,h,_),w=I=R=null),ie(u,!0,-1),j=u.input.charCodeAt(u.position)),(u.line===et||u.lineIndent>m)&&j!==0)v(u,"bad indentation of a mapping entry");else if(u.lineIndent<m)break}return H&&je(u,k,P,w,I,null,b,h,_),$&&(u.tag=y,u.anchor=E,u.kind="mapping",u.result=k),$}function hn(u){let m=!1,S=!1,C,b,h=u.input.charCodeAt(u.position);if(h!==33)return!1;u.tag!==null&&v(u,"duplication of a tag property"),h=u.input.charCodeAt(++u.position),h===60?(m=!0,h=u.input.charCodeAt(++u.position)):h===33?(S=!0,C="!!",h=u.input.charCodeAt(++u.position)):C="!";let _=u.position;if(m){do h=u.input.charCodeAt(++u.position);while(h!==0&&h!==62);u.position<u.length?(b=u.input.slice(_,u.position),h=u.input.charCodeAt(++u.position)):v(u,"unexpected end of the stream within a verbatim tag")}else{for(;h!==0&&!F(h);)h===33&&(S?v(u,"tag suffix cannot contain exclamation marks"):(C=u.input.slice(_-1,u.position+1),A.test(C)||v(u,"named tag handle cannot contain such characters"),S=!0,_=u.position+1)),h=u.input.charCodeAt(++u.position);b=u.input.slice(_,u.position),x.test(b)&&v(u,"tag suffix cannot contain flow indicator characters")}b&&!L.test(b)&&v(u,"tag name cannot contain such characters: "+b);try{b=decodeURIComponent(b)}catch{v(u,"tag name is malformed: "+b)}return m?u.tag=b:i.call(u.tagMap,C)?u.tag=u.tagMap[C]+b:C==="!"?u.tag="!"+b:C==="!!"?u.tag="tag:yaml.org,2002:"+b:v(u,'undeclared tag handle "'+C+'"'),!0}function pn(u){let m=u.input.charCodeAt(u.position);if(m!==38)return!1;u.anchor!==null&&v(u,"duplication of an anchor property"),m=u.input.charCodeAt(++u.position);let S=u.position;for(;m!==0&&!F(m)&&!M(m);)m=u.input.charCodeAt(++u.position);return u.position===S&&v(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(S,u.position),!0}function Lr(u){let m=u.input.charCodeAt(u.position);if(m!==42)return!1;m=u.input.charCodeAt(++u.position);let S=u.position;for(;m!==0&&!F(m)&&!M(m);)m=u.input.charCodeAt(++u.position);u.position===S&&v(u,"name of an alias node must contain at least one character");let C=u.input.slice(S,u.position);return i.call(u.anchorMap,C)||v(u,'unidentified alias "'+C+'"'),u.result=u.anchorMap[C],ie(u,!0,-1),!0}function mn(u,m,S,C){let b=ge(u);return Je(u),we(u,m),u.tag=null,u.anchor=null,u.kind=null,u.result=null,dn(u,S,C)&&u.kind==="mapping"?(Z(u),!0):(Ie(u),we(u,b),!1)}function Xe(u,m,S,C,b){let h,_,y=1,E=!1,k=!1,P=null,w,I,R;u.depth>=u.maxDepth&&v(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 H=h=_=c===S||a===S;if(C&&ie(u,!0,-1)&&(E=!0,u.lineIndent>m?y=1:u.lineIndent===m?y=0:u.lineIndent<m&&(y=-1)),y===1)for(;;){let $=u.input.charCodeAt(u.position),j=ge(u);if(E&&($===33&&u.tag!==null||$===38&&u.anchor!==null)||!hn(u)&&!pn(u))break;P===null&&(P=j),ie(u,!0,-1)?(E=!0,_=H,u.lineIndent>m?y=1:u.lineIndent===m?y=0:u.lineIndent<m&&(y=-1)):_=!1}if(_&&(_=E||b),y===1||c===S)if(s===S||o===S?I=m:I=m+1,R=u.position-u.lineStart,y===1)if(_&&(fn(u,R)||dn(u,R,I))||un(u,I))k=!0;else{let $=u.input.charCodeAt(u.position);P!==null&&H&&!_&&$!==124&&$!==62&&mn(u,P,P.position-P.lineStart,I)||h&&Ze(u,I)||Mt(u,I)||cn(u,I)?k=!0:Lr(u)?(k=!0,(u.tag!==null||u.anchor!==null)&&v(u,"alias node should not have any properties")):ln(u,I,s===S)&&(k=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&le(u,u.anchor,u.result)}else y===0&&(k=_&&fn(u,R));if(u.tag===null)u.anchor!==null&&le(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&v(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let $=0,j=u.implicitTypes.length;$<j;$+=1)if(w=u.implicitTypes[$],w.resolve(u.result)){u.result=w.construct(u.result),u.tag=w.tag,u.anchor!==null&&le(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(i.call(u.typeMap[u.kind||"fallback"],u.tag))w=u.typeMap[u.kind||"fallback"][u.tag];else{w=null;let $=u.typeMap.multi[u.kind||"fallback"];for(let j=0,U=$.length;j<U;j+=1)if(u.tag.slice(0,$[j].tag.length)===$[j].tag){w=$[j];break}}w||v(u,"unknown tag !<"+u.tag+">"),u.result!==null&&w.kind!==u.kind&&v(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+w.kind+'", not "'+u.kind+'"'),w.resolve(u.result,u.tag)?(u.result=w.construct(u.result,u.tag),u.anchor!==null&&le(u,u.anchor,u.result)):v(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||k}function Rr(u){let m=u.position,S=!1,C;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(C=u.input.charCodeAt(u.position))!==0&&(ie(u,!0,-1),C=u.input.charCodeAt(u.position),!(u.lineIndent>0||C!==37));){S=!0,C=u.input.charCodeAt(++u.position);let b=u.position;for(;C!==0&&!F(C);)C=u.input.charCodeAt(++u.position);let h=u.input.slice(b,u.position),_=[];for(h.length<1&&v(u,"directive name must not be less than one character in length");C!==0;){for(;D(C);)C=u.input.charCodeAt(++u.position);if(C===35){do C=u.input.charCodeAt(++u.position);while(C!==0&&!T(C));break}if(T(C))break;for(b=u.position;C!==0&&!F(C);)C=u.input.charCodeAt(++u.position);_.push(u.input.slice(b,u.position))}C!==0&&Nt(u),i.call(Ve,h)?Ve[h](u,h,_):K(u,'unknown document directive "'+h+'"')}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)):S&&v(u,"directives end mark is expected"),Xe(u,u.lineIndent-1,c,!1,!0),ie(u,!0,-1),u.checkLineBreaks&&g.test(u.input.slice(m,u.position))&&K(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&Me(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,ie(u,!0,-1));return}u.position<u.length-1&&v(u,"end of the stream or a document separator is expected")}function Ft(u,m){u=String(u),m=m||{},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 S=new q(u,m),C=u.indexOf("\0");for(C!==-1&&(S.position=C,v(S,"null byte is not allowed in input")),S.input+="\0";S.input.charCodeAt(S.position)===32;)S.lineIndent+=1,S.position+=1;for(;S.position<S.length-1;)Rr(S);return S.documents}function Nr(u,m,S){m!==null&&typeof m=="object"&&typeof S>"u"&&(S=m,m=null);let C=Ft(u,S);if(typeof m!="function")return C;for(let b=0,h=C.length;b<h;b+=1)m(C[b])}function Mr(u,m){let S=Ft(u,m);if(S.length!==0){if(S.length===1)return S[0];throw new e("expected a single document in the stream, but found more")}}return gn.loadAll=Nr,gn.load=Mr,gn}var si={},Ro;function Ou(){if(Ro)return si;Ro=1;let n=Ht(),e=$t(),t=oi(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,s=65279,o=9,a=10,c=13,l=32,d=33,f=34,p=35,g=37,x=38,A=39,L=42,O=44,T=45,D=58,F=61,M=62,G=63,J=64,W=91,X=93,ne=96,ye=123,oe=124,be=125,q={};q[0]="\\0",q[7]="\\a",q[8]="\\b",q[9]="\\t",q[10]="\\n",q[11]="\\v",q[12]="\\f",q[13]="\\r",q[27]="\\e",q[34]='\\"',q[92]="\\\\",q[133]="\\N",q[160]="\\_",q[8232]="\\L",q[8233]="\\P";let me=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],v=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function K(h,_){if(_===null)return{};let y={},E=Object.keys(_);for(let k=0,P=E.length;k<P;k+=1){let w=E[k],I=String(_[w]);w.slice(0,2)==="!!"&&(w="tag:yaml.org,2002:"+w.slice(2));let R=h.compiledTypeMap.fallback[w];R&&i.call(R.styleAliases,I)&&(I=R.styleAliases[I]),y[w]=I}return y}function le(h){let _,y,E=h.toString(16).toUpperCase();if(h<=255)_="x",y=2;else if(h<=65535)_="u",y=4;else if(h<=4294967295)_="U",y=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+_+n.repeat("0",y-E.length)+E}let Je=1,Z=2;function Ie(h){this.schema=h.schema||t,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=n.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=K(this.schema,h.styles||null),this.sortKeys=h.sortKeys||!1,this.lineWidth=h.lineWidth||80,this.noRefs=h.noRefs||!1,this.noCompatMode=h.noCompatMode||!1,this.condenseFlow=h.condenseFlow||!1,this.quotingType=h.quotingType==='"'?Z:Je,this.forceQuotes=h.forceQuotes||!1,this.replacer=typeof h.replacer=="function"?h.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function ge(h,_){let y=n.repeat(" ",_),E=0,k="",P=h.length;for(;E<P;){let w,I=h.indexOf(`
68
+ `,E);I===-1?(w=h.slice(E),E=P):(w=h.slice(E,I+1),E=I+1),w.length&&w!==`
69
+ `&&(k+=y),k+=w}return k}function we(h,_){return`
70
+ `+n.repeat(" ",h.indent*_)}function Ve(h,_){for(let y=0,E=h.implicitTypes.length;y<E;y+=1)if(h.implicitTypes[y].resolve(_))return!0;return!1}function fe(h){return h===l||h===o}function Qe(h){return h>=32&&h<=126||h>=161&&h<=55295&&h!==8232&&h!==8233||h>=57344&&h<=65533&&h!==s||h>=65536&&h<=1114111}function Rt(h){return Qe(h)&&h!==s&&h!==c&&h!==a}function je(h,_,y){let E=Rt(h),k=E&&!fe(h);return(y?E:E&&h!==O&&h!==W&&h!==X&&h!==ye&&h!==be)&&h!==p&&!(_===D&&!k)||Rt(_)&&!fe(_)&&h===p||_===D&&k}function Nt(h){return Qe(h)&&h!==s&&!fe(h)&&h!==T&&h!==G&&h!==D&&h!==O&&h!==W&&h!==X&&h!==ye&&h!==be&&h!==p&&h!==x&&h!==L&&h!==d&&h!==oe&&h!==F&&h!==M&&h!==A&&h!==f&&h!==g&&h!==J&&h!==ne}function ie(h){return!fe(h)&&h!==D}function Me(h,_){let y=h.charCodeAt(_),E;return y>=55296&&y<=56319&&_+1<h.length&&(E=h.charCodeAt(_+1),E>=56320&&E<=57343)?(y-55296)*1024+E-56320+65536:y}function pt(h){return/^\n* /.test(h)}let ln=1,Mt=2,cn=3,un=4,Ze=5;function fn(h,_,y,E,k,P,w,I){let R,H=0,$=null,j=!1,U=!1,et=E!==-1,qt=-1,Bt=Nt(Me(h,0))&&ie(Me(h,h.length-1));if(_||w)for(R=0;R<h.length;H>=65536?R+=2:R++){if(H=Me(h,R),!Qe(H))return Ze;Bt=Bt&&je(H,$,I),$=H}else{for(R=0;R<h.length;H>=65536?R+=2:R++){if(H=Me(h,R),H===a)j=!0,et&&(U=U||R-qt-1>E&&h[qt+1]!==" ",qt=R);else if(!Qe(H))return Ze;Bt=Bt&&je(H,$,I),$=H}U=U||et&&R-qt-1>E&&h[qt+1]!==" "}return!j&&!U?Bt&&!w&&!k(h)?ln:P===Z?Ze:Mt:y>9&&pt(h)?Ze:w?P===Z?Ze:Mt:U?un:cn}function dn(h,_,y,E,k){h.dump=(function(){if(_.length===0)return h.quotingType===Z?'""':"''";if(!h.noCompatMode&&(me.indexOf(_)!==-1||v.test(_)))return h.quotingType===Z?'"'+_+'"':"'"+_+"'";let P=h.indent*Math.max(1,y),w=h.lineWidth===-1?-1:Math.max(Math.min(h.lineWidth,40),h.lineWidth-P),I=E||h.flowLevel>-1&&y>=h.flowLevel;function R(H){return Ve(h,H)}switch(fn(_,I,h.indent,w,R,h.quotingType,h.forceQuotes&&!E,k)){case ln:return _;case Mt:return"'"+_.replace(/'/g,"''")+"'";case cn:return"|"+hn(_,h.indent)+pn(ge(_,P));case un:return">"+hn(_,h.indent)+pn(ge(Lr(_,w),P));case Ze:return'"'+Xe(_)+'"';default:throw new e("impossible error: invalid scalar style")}})()}function hn(h,_){let y=pt(h)?String(_):"",E=h[h.length-1]===`
71
+ `,P=E&&(h[h.length-2]===`
72
+ `||h===`
73
+ `)?"+":E?"":"-";return y+P+`
74
+ `}function pn(h){return h[h.length-1]===`
75
+ `?h.slice(0,-1):h}function Lr(h,_){let y=/(\n+)([^\n]*)/g,E=(function(){let I=h.indexOf(`
76
+ `);return I=I!==-1?I:h.length,y.lastIndex=I,mn(h.slice(0,I),_)})(),k=h[0]===`
77
+ `||h[0]===" ",P,w;for(;w=y.exec(h);){let I=w[1],R=w[2];P=R[0]===" ",E+=I+(!k&&!P&&R!==""?`
78
+ `:"")+mn(R,_),k=P}return E}function mn(h,_){if(h===""||h[0]===" ")return h;let y=/ [^ ]/g,E,k=0,P,w=0,I=0,R="";for(;E=y.exec(h);)I=E.index,I-k>_&&(P=w>k?w:I,R+=`
79
+ `+h.slice(k,P),k=P+1),w=I;return R+=`
80
+ `,h.length-k>_&&w>k?R+=h.slice(k,w)+`
81
+ `+h.slice(w+1):R+=h.slice(k),R.slice(1)}function Xe(h){let _="",y=0;for(let E=0;E<h.length;y>=65536?E+=2:E++){y=Me(h,E);let k=q[y];!k&&Qe(y)?(_+=h[E],y>=65536&&(_+=h[E+1])):_+=k||le(y)}return _}function Rr(h,_,y){let E="",k=h.tag;for(let P=0,w=y.length;P<w;P+=1){let I=y[P];h.replacer&&(I=h.replacer.call(y,String(P),I)),(m(h,_,I,!1,!1)||typeof I>"u"&&m(h,_,null,!1,!1))&&(E!==""&&(E+=","+(h.condenseFlow?"":" ")),E+=h.dump)}h.tag=k,h.dump="["+E+"]"}function Ft(h,_,y,E){let k="",P=h.tag;for(let w=0,I=y.length;w<I;w+=1){let R=y[w];h.replacer&&(R=h.replacer.call(y,String(w),R)),(m(h,_+1,R,!0,!0,!1,!0)||typeof R>"u"&&m(h,_+1,null,!0,!0,!1,!0))&&((!E||k!=="")&&(k+=we(h,_)),h.dump&&a===h.dump.charCodeAt(0)?k+="-":k+="- ",k+=h.dump)}h.tag=P,h.dump=k||"[]"}function Nr(h,_,y){let E="",k=h.tag,P=Object.keys(y);for(let w=0,I=P.length;w<I;w+=1){let R="";E!==""&&(R+=", "),h.condenseFlow&&(R+='"');let H=P[w],$=y[H];h.replacer&&($=h.replacer.call(y,H,$)),m(h,_,H,!1,!1)&&(h.dump.length>1024&&(R+="? "),R+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),m(h,_,$,!1,!1)&&(R+=h.dump,E+=R))}h.tag=k,h.dump="{"+E+"}"}function Mr(h,_,y,E){let k="",P=h.tag,w=Object.keys(y);if(h.sortKeys===!0)w.sort();else if(typeof h.sortKeys=="function")w.sort(h.sortKeys);else if(h.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let I=0,R=w.length;I<R;I+=1){let H="";(!E||k!=="")&&(H+=we(h,_));let $=w[I],j=y[$];if(h.replacer&&(j=h.replacer.call(y,$,j)),!m(h,_+1,$,!0,!0,!0))continue;let U=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024;U&&(h.dump&&a===h.dump.charCodeAt(0)?H+="?":H+="? "),H+=h.dump,U&&(H+=we(h,_)),m(h,_+1,j,!0,U)&&(h.dump&&a===h.dump.charCodeAt(0)?H+=":":H+=": ",H+=h.dump,k+=H)}h.tag=P,h.dump=k||"{}"}function u(h,_,y){let E=y?h.explicitTypes:h.implicitTypes;for(let k=0,P=E.length;k<P;k+=1){let w=E[k];if((w.instanceOf||w.predicate)&&(!w.instanceOf||typeof _=="object"&&_ instanceof w.instanceOf)&&(!w.predicate||w.predicate(_))){if(y?w.multi&&w.representName?h.tag=w.representName(_):h.tag=w.tag:h.tag="?",w.represent){let I=h.styleMap[w.tag]||w.defaultStyle,R;if(r.call(w.represent)==="[object Function]")R=w.represent(_,I);else if(i.call(w.represent,I))R=w.represent[I](_,I);else throw new e("!<"+w.tag+'> tag resolver accepts not "'+I+'" style');h.dump=R}return!0}}return!1}function m(h,_,y,E,k,P,w){h.tag=null,h.dump=y,u(h,y,!1)||u(h,y,!0);let I=r.call(h.dump),R=E;E&&(E=h.flowLevel<0||h.flowLevel>_);let H=I==="[object Object]"||I==="[object Array]",$,j;if(H&&($=h.duplicates.indexOf(y),j=$!==-1),(h.tag!==null&&h.tag!=="?"||j||h.indent!==2&&_>0)&&(k=!1),j&&h.usedDuplicates[$])h.dump="*ref_"+$;else{if(H&&j&&!h.usedDuplicates[$]&&(h.usedDuplicates[$]=!0),I==="[object Object]")E&&Object.keys(h.dump).length!==0?(Mr(h,_,h.dump,k),j&&(h.dump="&ref_"+$+h.dump)):(Nr(h,_,h.dump),j&&(h.dump="&ref_"+$+" "+h.dump));else if(I==="[object Array]")E&&h.dump.length!==0?(h.noArrayIndent&&!w&&_>0?Ft(h,_-1,h.dump,k):Ft(h,_,h.dump,k),j&&(h.dump="&ref_"+$+h.dump)):(Rr(h,_,h.dump),j&&(h.dump="&ref_"+$+" "+h.dump));else if(I==="[object String]")h.tag!=="?"&&dn(h,h.dump,_,P,R);else{if(I==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+I)}if(h.tag!==null&&h.tag!=="?"){let U=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21");h.tag[0]==="!"?U="!"+U:U.slice(0,18)==="tag:yaml.org,2002:"?U="!!"+U.slice(18):U="!<"+U+">",h.dump=U+" "+h.dump}}return!0}function S(h,_){let y=[],E=[];C(h,y,E);let k=E.length;for(let P=0;P<k;P+=1)_.duplicates.push(y[E[P]]);_.usedDuplicates=new Array(k)}function C(h,_,y){if(h!==null&&typeof h=="object"){let E=_.indexOf(h);if(E!==-1)y.indexOf(E)===-1&&y.push(E);else if(_.push(h),Array.isArray(h))for(let k=0,P=h.length;k<P;k+=1)C(h[k],_,y);else{let k=Object.keys(h);for(let P=0,w=k.length;P<w;P+=1)C(h[k[P]],_,y)}}}function b(h,_){_=_||{};let y=new Ie(_);y.noRefs||S(h,y);let E=h;return y.replacer&&(E=y.replacer.call({"":E},"",E)),m(y,0,E,!0,!0)?y.dump+`
82
+ `:""}return si.dump=b,si}var No;function Iu(){if(No)return de;No=1;let n=Pu(),e=Ou();function t(r,i){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. Use yaml."+i+" instead, which is now safe by default.")}}return de.Type=_e(),de.Schema=Mo(),de.FAILSAFE_SCHEMA=Ho(),de.JSON_SCHEMA=Uo(),de.CORE_SCHEMA=Go(),de.DEFAULT_SCHEMA=oi(),de.load=n.load,de.loadAll=n.loadAll,de.dump=e.dump,de.YAMLException=$t(),de.types={binary:Ko(),float:Wo(),map:Bo(),null:$o(),pairs:Qo(),set:Zo(),timestamp:zo(),bool:Vo(),int:jo(),merge:Yo(),omap:Jo(),seq:qo(),str:Fo()},de.safeLoad=t("safeLoad","load"),de.safeLoadAll=t("safeLoadAll","loadAll"),de.safeDump=t("safeDump","dump"),de}var Tu=Iu(),Fe=ku(Tu),{Type:dg,Schema:hg,FAILSAFE_SCHEMA:pg,JSON_SCHEMA:mg,CORE_SCHEMA:gg,DEFAULT_SCHEMA:_g,load:yg,loadAll:bg,dump:wg,YAMLException:vg,types:Sg,safeLoad:xg,safeLoadAll:Cg,safeDump:Eg}=Fe;var V=Fr(ta(),1);import{stat as ff}from"fs";import{stat as df,readdir as hf}from"fs/promises";import{EventEmitter as pf}from"events";import*as z from"path";import{stat as Nu,lstat as na,readdir as Mu,realpath as Fu}from"node:fs/promises";import{Readable as qu}from"node:stream";import{resolve as ra,relative as Bu,join as Hu,sep as $u}from"node:path";var ve={FILE_TYPE:"files",DIR_TYPE:"directories",FILE_DIR_TYPE:"files_directories",EVERYTHING_TYPE:"all"},li={root:".",fileFilter:n=>!0,directoryFilter:n=>!0,type:ve.FILE_TYPE,lstat:!1,depth:2147483648,alwaysStat:!1,highWaterMark:4096};Object.freeze(li);var aa="READDIRP_RECURSIVE_ERROR",Vu=new Set(["ENOENT","EPERM","EACCES","ELOOP",aa]),ia=[ve.DIR_TYPE,ve.EVERYTHING_TYPE,ve.FILE_DIR_TYPE,ve.FILE_TYPE],ju=new Set([ve.DIR_TYPE,ve.EVERYTHING_TYPE,ve.FILE_DIR_TYPE]),Wu=new Set([ve.EVERYTHING_TYPE,ve.FILE_DIR_TYPE,ve.FILE_TYPE]),Uu=n=>Vu.has(n.code),Gu=process.platform==="win32",sa=n=>!0,oa=n=>{if(n===void 0)return sa;if(typeof n=="function")return n;if(typeof n=="string"){let e=n.trim();return t=>t.basename===e}if(Array.isArray(n)){let e=n.map(t=>t.trim());return t=>e.some(r=>t.basename===r)}return sa},ci=class extends qu{constructor(e={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:e.highWaterMark});let t={...li,...e},{root:r,type:i}=t;this._fileFilter=oa(t.fileFilter),this._directoryFilter=oa(t.directoryFilter);let s=t.lstat?na:Nu;Gu?this._stat=o=>s(o,{bigint:!0}):this._stat=s,this._maxDepth=t.depth??li.depth,this._wantsDir=i?ju.has(i):!1,this._wantsFile=i?Wu.has(i):!1,this._wantsEverything=i===ve.EVERYTHING_TYPE,this._root=ra(r),this._isDirent=!t.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(r,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,r=t&&t.files;if(r&&r.length>0){let{path:i,depth:s}=t,o=r.splice(0,e).map(c=>this._formatEntry(c,i)),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 i=this.parents.pop();if(!i){this.push(null);break}if(this.parent=await i,this.destroyed)return}}}catch(t){this.destroy(t)}finally{this.reading=!1}}}async _exploreDir(e,t){let r;try{r=await Mu(e,this._rdOptions)}catch(i){this._onError(i)}return{files:r,depth:t,path:e}}async _formatEntry(e,t){let r,i=this._isDirent?e.name:e;try{let s=ra(Hu(t,i));r={path:Bu(this._root,s),fullPath:s,basename:i},r[this._statsProp]=this._isDirent?e:await this._stat(s)}catch(s){this._onError(s);return}return r}_onError(e){Uu(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 r=e.fullPath;try{let i=await Fu(r),s=await na(i);if(s.isFile())return"file";if(s.isDirectory()){let o=i.length;if(r.startsWith(i)&&r.substr(o,1)===$u){let a=new Error(`Circular symlink detected: "${r}" points to "${i}"`);return a.code=aa,this._onError(a)}return"directory"}}catch(i){return this._onError(i),""}}}_includeAsFile(e){let t=e&&e[this._statsProp];return t&&this._wantsEverything&&!t.isDirectory()}};function la(n,e={}){let t=e.entryType||e.type;if(t==="both"&&(t=ve.FILE_DIR_TYPE),t&&(e.type=t),n){if(typeof n!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(t&&!ia.includes(t))throw new Error(`readdirp: Invalid type passed. Use one of ${ia.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return e.root=n,new ci(e)}import{watchFile as zu,unwatchFile as ca,watch as Yu}from"fs";import{open as Ku,stat as fa,lstat as Ju,realpath as ui}from"fs/promises";import*as te from"path";import{type as Qu}from"os";var Zu="data",hi="end",da="close",xn=()=>{};var Cn=process.platform,pi=Cn==="win32",Xu=Cn==="darwin",ef=Cn==="linux",tf=Cn==="freebsd",ha=Qu()==="OS400",re={ALL:"all",READY:"ready",ADD:"add",CHANGE:"change",ADD_DIR:"addDir",UNLINK:"unlink",UNLINK_DIR:"unlinkDir",RAW:"raw",ERROR:"error"},De=re,nf="watch",rf={lstat:Ju,stat:fa},st="listeners",bn="errHandlers",mt="rawEmitters",sf=[st,bn,mt],of=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"]),af=n=>of.has(te.extname(n).slice(1).toLowerCase()),di=(n,e)=>{n instanceof Set?n.forEach(e):e(n)},Vt=(n,e,t)=>{let r=n[e];r instanceof Set||(n[e]=r=new Set([r])),r.add(t)},lf=n=>e=>{let t=n[e];t instanceof Set?t.clear():delete n[e]},jt=(n,e,t)=>{let r=n[e];r instanceof Set?r.delete(t):r===t&&delete n[e]},pa=n=>n instanceof Set?n.size===0:!n,wn=new Map;function ua(n,e,t,r,i){let s=(o,a)=>{t(n),i(o,a,{watchedPath:n}),a&&n!==a&&vn(te.resolve(n,a),st,te.join(n,a))};try{return Yu(n,{persistent:e.persistent},s)}catch(o){r(o);return}}var vn=(n,e,t,r,i)=>{let s=wn.get(n);s&&di(s[e],o=>{o(t,r,i)})},cf=(n,e,t,r)=>{let{listener:i,errHandler:s,rawEmitter:o}=r,a=wn.get(e),c;if(!t.persistent)return c=ua(n,t,i,s,o),c?c.close.bind(c):void 0;if(a)Vt(a,st,i),Vt(a,bn,s),Vt(a,mt,o);else{if(c=ua(n,t,vn.bind(null,e,st),s,vn.bind(null,e,mt)),!c)return;c.on(De.ERROR,async l=>{let d=vn.bind(null,e,bn);if(a&&(a.watcherUnusable=!0),pi&&l.code==="EPERM")try{await(await Ku(n,"r")).close(),d(l)}catch{}else d(l)}),a={listeners:i,errHandlers:s,rawEmitters:o,watcher:c},wn.set(e,a)}return()=>{jt(a,st,i),jt(a,bn,s),jt(a,mt,o),pa(a.listeners)&&(a.watcher.close(),wn.delete(e),sf.forEach(lf(a)),a.watcher=void 0,Object.freeze(a))}},fi=new Map,uf=(n,e,t,r)=>{let{listener:i,rawEmitter:s}=r,o=fi.get(e),a=o&&o.options;return a&&(a.persistent<t.persistent||a.interval>t.interval)&&(ca(e),o=void 0),o?(Vt(o,st,i),Vt(o,mt,s)):(o={listeners:i,rawEmitters:s,options:t,watcher:zu(e,t,(c,l)=>{di(o.rawEmitters,f=>{f(De.CHANGE,e,{curr:c,prev:l})});let d=c.mtimeMs;(c.size!==l.size||d>l.mtimeMs||d===0)&&di(o.listeners,f=>f(n,c))})},fi.set(e,o)),()=>{jt(o,st,i),jt(o,mt,s),pa(o.listeners)&&(fi.delete(e),ca(e),o.options=o.watcher=void 0,Object.freeze(o))}},Sn=class{constructor(e){this.fsw=e,this._boundHandleError=t=>e._handleError(t)}_watchWithNodeFs(e,t){let r=this.fsw.options,i=te.dirname(e),s=te.basename(e);this.fsw._getWatchedDir(i).add(s);let a=te.resolve(e),c={persistent:r.persistent};t||(t=xn);let l;if(r.usePolling){let d=r.interval!==r.binaryInterval;c.interval=d&&af(s)?r.binaryInterval:r.interval,l=uf(e,a,c,{listener:t,rawEmitter:this.fsw._emitRaw})}else l=cf(e,a,c,{listener:t,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw});return l}_handleFile(e,t,r){if(this.fsw.closed)return;let i=te.dirname(e),s=te.basename(e),o=this.fsw._getWatchedDir(i),a=t;if(o.has(s))return;let c=async(d,f)=>{if(this.fsw._throttle(nf,e,5)){if(!f||f.mtimeMs===0)try{let p=await fa(e);if(this.fsw.closed)return;let g=p.atimeMs,x=p.mtimeMs;if((!g||g<=x||x!==a.mtimeMs)&&this.fsw._emit(De.CHANGE,e,p),(Xu||ef||tf)&&a.ino!==p.ino){this.fsw._closeFile(d),a=p;let A=this._watchWithNodeFs(e,c);A&&this.fsw._addPathCloser(d,A)}else a=p}catch{this.fsw._remove(i,s)}else if(o.has(s)){let p=f.atimeMs,g=f.mtimeMs;(!p||p<=g||g!==a.mtimeMs)&&this.fsw._emit(De.CHANGE,e,f),a=f}}},l=this._watchWithNodeFs(e,c);if(!(r&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(De.ADD,e,0))return;this.fsw._emit(De.ADD,e,t)}return l}async _handleSymlink(e,t,r,i){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 ui(r)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(o.has(i)?this.fsw._symlinkPaths.get(s)!==a&&(this.fsw._symlinkPaths.set(s,a),this.fsw._emit(De.CHANGE,r,e.stats)):(o.add(i),this.fsw._symlinkPaths.set(s,a),this.fsw._emit(De.ADD,r,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(s))return!0;this.fsw._symlinkPaths.set(s,!0)}_handleRead(e,t,r,i,s,o,a){if(e=te.join(e,""),a=this.fsw._throttle("readdir",e,1e3),!a)return;let c=this.fsw._getWatchedDir(r.path),l=new Set,d=this.fsw._readdirp(e,{fileFilter:f=>r.filterPath(f),directoryFilter:f=>r.filterDir(f)});if(d)return d.on(Zu,async f=>{if(this.fsw.closed){d=void 0;return}let p=f.path,g=te.join(e,p);if(l.add(p),!(f.stats.isSymbolicLink()&&await this._handleSymlink(f,e,g,p))){if(this.fsw.closed){d=void 0;return}(p===i||!i&&!c.has(p))&&(this.fsw._incrReadyCount(),g=te.join(s,te.relative(s,g)),this._addToNodeFs(g,t,r,o+1))}}).on(De.ERROR,this._boundHandleError),new Promise((f,p)=>{if(!d)return p();d.once(hi,()=>{if(this.fsw.closed){d=void 0;return}let g=a?a.clear():!1;f(void 0),c.getChildren().filter(x=>x!==e&&!l.has(x)).forEach(x=>{this.fsw._remove(e,x)}),d=void 0,g&&this._handleRead(e,!1,r,i,s,o,a)})})}async _handleDir(e,t,r,i,s,o,a){let c=this.fsw._getWatchedDir(te.dirname(e)),l=c.has(te.basename(e));!(r&&this.fsw.options.ignoreInitial)&&!s&&!l&&this.fsw._emit(De.ADD_DIR,e,t),c.add(te.basename(e)),this.fsw._getWatchedDir(e);let d,f,p=this.fsw.options.depth;if((p==null||i<=p)&&!this.fsw._symlinkPaths.has(a)){if(!s&&(await this._handleRead(e,r,o,s,e,i,d),this.fsw.closed))return;f=this._watchWithNodeFs(e,(g,x)=>{x&&x.mtimeMs===0||this._handleRead(g,!1,o,s,e,i,d)})}return f}async _addToNodeFs(e,t,r,i,s){let o=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return o(),!1;let a=this.fsw._getWatchHelpers(e);r&&(a.filterPath=c=>r.filterPath(c),a.filterDir=c=>r.filterDir(c));try{let c=await rf[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,d;if(c.isDirectory()){let f=te.resolve(e),p=l?await ui(e):e;if(this.fsw.closed||(d=await this._handleDir(a.watchPath,c,t,i,s,a,p),this.fsw.closed))return;f!==p&&p!==void 0&&this.fsw._symlinkPaths.set(f,p)}else if(c.isSymbolicLink()){let f=l?await ui(e):e;if(this.fsw.closed)return;let p=te.dirname(a.watchPath);if(this.fsw._getWatchedDir(p).add(a.watchPath),this.fsw._emit(De.ADD,a.watchPath,c),d=await this._handleDir(p,c,t,i,e,a,f),this.fsw.closed)return;f!==void 0&&this.fsw._symlinkPaths.set(te.resolve(e),f)}else d=this._handleFile(a.watchPath,c,t);return o(),d&&this.fsw._addPathCloser(e,d),!1}catch(c){if(this.fsw._handleError(c))return o(),e}}};var mi="/",mf="//",wa=".",gf="..",_f="string",yf=/\\/g,ma=/\/\//,bf=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,wf=/^\.[/\\]/;function En(n){return Array.isArray(n)?n:[n]}var gi=n=>typeof n=="object"&&n!==null&&!(n instanceof RegExp);function vf(n){return typeof n=="function"?n:typeof n=="string"?e=>n===e:n instanceof RegExp?e=>n.test(e):typeof n=="object"&&n!==null?e=>{if(n.path===e)return!0;if(n.recursive){let t=z.relative(n.path,e);return t?!t.startsWith("..")&&!z.isAbsolute(t):!1}return!1}:()=>!1}function Sf(n){if(typeof n!="string")throw new Error("string expected");n=z.normalize(n),n=n.replace(/\\/g,"/");let e=!1;n.startsWith("//")&&(e=!0);let t=/\/\//;for(;n.match(t);)n=n.replace(t,"/");return e&&(n="/"+n),n}function ga(n,e,t){let r=Sf(e);for(let i=0;i<n.length;i++){let s=n[i];if(s(r,t))return!0}return!1}function xf(n,e){if(n==null)throw new TypeError("anymatch: specify first argument");let r=En(n).map(i=>vf(i));return e==null?(i,s)=>ga(r,i,s):ga(r,e)}var _a=n=>{let e=En(n).flat();if(!e.every(t=>typeof t===_f))throw new TypeError(`Non-string provided as watch path: ${e}`);return e.map(va)},ya=n=>{let e=n.replace(yf,mi),t=!1;for(e.startsWith(mf)&&(t=!0);e.match(ma);)e=e.replace(ma,mi);return t&&(e=mi+e),e},va=n=>ya(z.normalize(ya(n))),ba=(n="")=>e=>typeof e=="string"?va(z.isAbsolute(e)?e:z.join(n,e)):e,Cf=(n,e)=>z.isAbsolute(n)?n:z.join(e,n),Ef=Object.freeze(new Set),_i=class{constructor(e,t){this.path=e,this._removeWatcher=t,this.items=new Set}add(e){let{items:t}=this;t&&e!==wa&&e!==gf&&t.add(e)}async remove(e){let{items:t}=this;if(!t||(t.delete(e),t.size>0))return;let r=this.path;try{await hf(r)}catch{this._removeWatcher&&this._removeWatcher(z.dirname(r),z.basename(r))}}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=xn,this.items=Ef,Object.freeze(this)}},kf="stat",Af="lstat",yi=class{constructor(e,t,r){this.fsw=r;let i=e;this.path=e=e.replace(wf,""),this.watchPath=i,this.fullWatchPath=z.resolve(i),this.dirParts=[],this.dirParts.forEach(s=>{s.length>1&&s.pop()}),this.followSymlinks=t,this.statMethod=t?kf:Af}entryPath(e){return z.join(this.watchPath,z.relative(this.watchPath,e.fullPath))}filterPath(e){let{stats:t}=e;if(t&&t.isSymbolicLink())return this.filterDir(e);let r=this.entryPath(e);return this.fsw._isntIgnored(r,t)&&this.fsw._hasReadPermissions(t)}filterDir(e){return this.fsw._isntIgnored(this.entryPath(e),e.stats)}},kn=class extends pf{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,r={stabilityThreshold:2e3,pollInterval:100},i={persistent:!0,ignoreInitial:!1,ignorePermissionErrors:!1,interval:100,binaryInterval:300,followSymlinks:!0,usePolling:!1,atomic:!0,...e,ignored:e.ignored?En(e.ignored):En([]),awaitWriteFinish:t===!0?r:typeof t=="object"?{...r,...t}:!1};ha&&(i.usePolling=!0),i.atomic===void 0&&(i.atomic=!i.usePolling);let s=process.env.CHOKIDAR_USEPOLLING;if(s!==void 0){let c=s.toLowerCase();c==="false"||c==="0"?i.usePolling=!1:c==="true"||c==="1"?i.usePolling=!0:i.usePolling=!!c}let o=process.env.CHOKIDAR_INTERVAL;o&&(i.interval=Number.parseInt(o,10));let a=0;this._emitReady=()=>{a++,a>=this._readyCount&&(this._emitReady=xn,this._readyEmitted=!0,process.nextTick(()=>this.emit(re.READY)))},this._emitRaw=(...c)=>this.emit(re.RAW,...c),this._boundRemove=this._remove.bind(this),this.options=i,this._nodeFsHandler=new Sn(this),Object.freeze(i)}_addIgnoredPath(e){if(gi(e)){for(let t of this._ignoredPaths)if(gi(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)gi(t)&&t.path===e&&this._ignoredPaths.delete(t)}add(e,t,r){let{cwd:i}=this.options;this.closed=!1,this._closePromise=void 0;let s=_a(e);return i&&(s=s.map(o=>Cf(o,i))),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,!r,void 0,0,t);return a&&this._emitReady(),a})).then(o=>{this.closed||o.forEach(a=>{a&&this.add(z.dirname(a),z.basename(t||a))})}),this}unwatch(e){if(this.closed)return this;let t=_a(e),{cwd:r}=this.options;return t.forEach(i=>{!z.isAbsolute(i)&&!this._closers.has(i)&&(r&&(i=z.join(r,i)),i=z.resolve(i)),this._closePath(i),this._addIgnoredPath(i),this._watched.has(i)&&this._addIgnoredPath({path:i,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(r=>{let i=r();i instanceof Promise&&e.push(i)})),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,r)=>{let s=(this.options.cwd?z.relative(this.options.cwd,r):r)||wa;e[s]=t.getChildren().sort()}),e}emitWithAll(e,t){this.emit(e,...t),e!==re.ERROR&&this.emit(re.ALL,e,...t)}async _emit(e,t,r){if(this.closed)return;let i=this.options;pi&&(t=z.normalize(t)),i.cwd&&(t=z.relative(i.cwd,t));let s=[t];r!=null&&s.push(r);let o=i.awaitWriteFinish,a;if(o&&(a=this._pendingWrites.get(t)))return a.lastChange=new Date,this;if(i.atomic){if(e===re.UNLINK)return this._pendingUnlinks.set(t,[e,...s]),setTimeout(()=>{this._pendingUnlinks.forEach((c,l)=>{this.emit(...c),this.emit(re.ALL,...c),this._pendingUnlinks.delete(l)})},typeof i.atomic=="number"?i.atomic:100),this;e===re.ADD&&this._pendingUnlinks.has(t)&&(e=re.CHANGE,this._pendingUnlinks.delete(t))}if(o&&(e===re.ADD||e===re.CHANGE)&&this._readyEmitted){let c=(l,d)=>{l?(e=re.ERROR,s[0]=l,this.emitWithAll(e,s)):d&&(s.length>1?s[1]=d:s.push(d),this.emitWithAll(e,s))};return this._awaitWriteFinish(t,o.stabilityThreshold,e,c),this}if(e===re.CHANGE&&!this._throttle(re.CHANGE,t,50))return this;if(i.alwaysStat&&r===void 0&&(e===re.ADD||e===re.ADD_DIR||e===re.CHANGE)){let c=i.cwd?z.join(i.cwd,t):t,l;try{l=await df(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(re.ERROR,e),e||this.closed}_throttle(e,t,r){this._throttled.has(e)||this._throttled.set(e,new Map);let i=this._throttled.get(e);if(!i)throw new Error("invalid throttle");let s=i.get(t);if(s)return s.count++,!1;let o,a=()=>{let l=i.get(t),d=l?l.count:0;return i.delete(t),clearTimeout(o),l&&clearTimeout(l.timeoutObject),d};o=setTimeout(a,r);let c={timeoutObject:o,clear:a,count:0};return i.set(t,c),c}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,t,r,i){let s=this.options.awaitWriteFinish;if(typeof s!="object")return;let o=s.pollInterval,a,c=e;this.options.cwd&&!z.isAbsolute(e)&&(c=z.join(this.options.cwd,e));let l=new Date,d=this._pendingWrites;function f(p){ff(c,(g,x)=>{if(g||!d.has(e)){g&&g.code!=="ENOENT"&&i(g);return}let A=Number(new Date);p&&x.size!==p.size&&(d.get(e).lastChange=A);let L=d.get(e);A-L.lastChange>=t?(d.delete(e),i(void 0,x)):a=setTimeout(f,o,x)})}d.has(e)||(d.set(e,{lastChange:l,cancelWait:()=>(d.delete(e),clearTimeout(a),r)}),a=setTimeout(f,o))}_isIgnored(e,t){if(this.options.atomic&&bf.test(e))return!0;if(!this._userIgnored){let{cwd:r}=this.options,s=(this.options.ignored||[]).map(ba(r)),a=[...[...this._ignoredPaths].map(ba(r)),...s];this._userIgnored=xf(a,void 0)}return this._userIgnored(e,t)}_isntIgnored(e,t){return!this._isIgnored(e,t)}_getWatchHelpers(e){return new yi(e,this.options.followSymlinks,this)}_getWatchedDir(e){let t=z.resolve(e);return this._watched.has(t)||this._watched.set(t,new _i(t,this._boundRemove)),this._watched.get(t)}_hasReadPermissions(e){return this.options.ignorePermissionErrors?!0:!!(Number(e.mode)&256)}_remove(e,t,r){let i=z.join(e,t),s=z.resolve(i);if(r=r??(this._watched.has(i)||this._watched.has(s)),!this._throttle("remove",i,100))return;!r&&this._watched.size===1&&this.add(e,t,!0),this._getWatchedDir(i).getChildren().forEach(p=>this._remove(i,p));let c=this._getWatchedDir(e),l=c.has(t);c.remove(t),this._symlinkPaths.has(s)&&this._symlinkPaths.delete(s);let d=i;if(this.options.cwd&&(d=z.relative(this.options.cwd,i)),this.options.awaitWriteFinish&&this._pendingWrites.has(d)&&this._pendingWrites.get(d).cancelWait()===re.ADD)return;this._watched.delete(i),this._watched.delete(s);let f=r?re.UNLINK_DIR:re.UNLINK;l&&!this._isIgnored(i)&&this._emit(f,i),this._closePath(i)}_closePath(e){this._closeFile(e);let t=z.dirname(e);this._getWatchedDir(t).remove(z.basename(e))}_closeFile(e){let t=this._closers.get(e);t&&(t.forEach(r=>r()),this._closers.delete(e))}_addPathCloser(e,t){if(!t)return;let r=this._closers.get(e);r||(r=[],this._closers.set(e,r)),r.push(t)}_readdirp(e,t){if(this.closed)return;let r={type:re.ALL,alwaysStat:!0,lstat:!0,...t,depth:0},i=la(e,r);return this._streams.add(i),i.once(da,()=>{i=void 0}),i.once(hi,()=>{i&&(this._streams.delete(i),i=void 0)}),i}};function Pf(n,e={}){let t=new kn(e);return t.add(n),t}var Sa={watch:Pf,FSWatcher:kn};import{tsImport as ag}from"tsx/esm/api";import{register as lg}from"tsx/cjs/api";var Na=Fr(Ra(),1),{program:Kg,createCommand:Jg,createArgument:Qg,createOption:Zg,CommanderError:Xg,InvalidArgumentError:e_,InvalidOptionArgumentError:t_,Command:Ma,Argument:n_,Option:r_,Help:i_}=Na.default;var Fa=`# 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.15
87
+ version: 0.14.16
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
@@ -426,11 +426,11 @@ command_sets:
426
426
  recommended_before_use:
427
427
  - Ensure embedoc.config.yaml exists (run init if needed).
428
428
  - Verify datasource files are accessible.
429
- `,_c=`{
429
+ `,qa=`{
430
430
  "cli_contracts": "0.1.0",
431
431
  "info": {
432
432
  "title": "embedoc CLI",
433
- "version": "0.14.15",
433
+ "version": "0.14.16",
434
434
  "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, TypeScript API), programmable TypeScript renderers, Handlebars file generation, and incremental builds with dependency tracking.",
435
435
  "license": {
436
436
  "name": "MIT"
@@ -853,48 +853,49 @@ command_sets:
853
853
  }
854
854
  }
855
855
  }
856
- }`;function bc(t,e){let r=new gc;return r.name("embedoc").version(e,"-V, --version").description("In-place document generator with marker-based embedding."),r.command("init").description("Initialize embedoc in the current project.").option("-f, --force","Overwrite existing files.",!1).action(async(n,i)=>{await t.init(n,i.optsWithGlobals())}),r.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,i,s)=>{await t.build(n,i,s.optsWithGlobals())}),r.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,i)=>{await t.generate(n,i.optsWithGlobals())}),r.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,i)=>{await t.watch(n,i.optsWithGlobals())}),r.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("--no-include-meta").option("-F, --format <format>","Output format (yaml or json).","yaml").action(async(n,i)=>{if(n.length===0&&!i.all){process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
857
- `),process.exitCode=2;return}let s=i.format||"yaml",o=JSON.parse(_c),a=i.all?[]:n;if(a.length===0)if(s==="json"){let l={};i.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)+`
858
- `)}else{let l=[];if(l.push("# embedoc extract"),l.push("# source: embedded"),l.push("# type: cli-contracts/command-extract"),i.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(yc),process.stdout.write(l.join(`
856
+ }`;function Ba(n,e){let t=new Ma;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(r,i)=>{await n.init(r,i.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(r,i,s)=>{await n.build(r,i,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(r,i)=>{await n.generate(r,i.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(r,i)=>{await n.watch(r,i.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("--no-include-meta").option("-F, --format <format>","Output format (yaml or json).","yaml").action(async(r,i)=>{if(r.length===0&&!i.all){process.stderr.write(JSON.stringify({code:"INVALID_ARGS",message:"Specify command IDs or use --all"})+`
857
+ `),process.exitCode=2;return}let s=i.format||"yaml",o=JSON.parse(qa),a=i.all?[]:r;if(a.length===0)if(s==="json"){let c={};i.includeMeta&&(c._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(c,o),process.stdout.write(JSON.stringify(c,null,2)+`
858
+ `)}else{let c=[];if(c.push("# embedoc extract"),c.push("# source: embedded"),c.push("# type: cli-contracts/command-extract"),i.includeMeta){c.push("---"),c.push("source: embedded"),c.push("type: cli-contracts/command-extract"),c.push("extractedAt: "+new Date().toISOString()),c.push("spec_version: "+(o.cli_contracts??"0.1.0")),c.push("commands:");for(let l of["embedoc.init","embedoc.build","embedoc.generate","embedoc.watch"])c.push(" - "+l)}c.push("---"),c.push(Fa),process.stdout.write(c.join(`
859
859
  `)+`
860
- `)}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 O=f+"."+g;a.some(b=>b===g||b===O||g.startsWith(b+"."))&&(m[g]=_)}if(Object.keys(m).length>0){let g={...h};g.commands=m,c[f]=g}}o.components&&(l.components=o.components),process.stdout.write(JSON.stringify(l,null,2)+`
861
- `)}process.exitCode=0}),r}import Np from"better-sqlite3";var wn=class{type="sqlite";db;queryString;constructor(e){if(!e.path)throw new Error('SQLite datasource requires "path" configuration');this.db=new Np(e.path,{readonly:!0}),this.queryString=e.query}async query(e,r=[]){try{return this.db.prepare(e).all(...r)}catch(n){let i=n instanceof Error?n.message:String(n);throw new Error(`SQLite query failed: ${i}`,{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 Vs(t){return new wn(t)}import{readFile as qp}from"node:fs/promises";var K=class t extends Error{constructor(e,r,n,...i){Array.isArray(r)&&(r=r.join(" ").trim()),super(r),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,t),this.code=e;for(let s of i)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 vr=function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)};var vn=function(t){let e=[];for(let r=0,n=t.length;r<n;r++){let i=t[r];if(i==null||i===!1)e[r]={disabled:!0};else if(typeof i=="string"||typeof i=="number")e[r]={name:`${i}`};else if(vr(i)){if(typeof i.name!="string")throw new K("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${r}`,"when column is an object literal"]);e[r]=i}else throw new K("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(i)} at position ${r}`])}return e};var zs=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let r=this.length+e.length;if(r>=this.size&&(this.resize(),r>=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 r=this.length++;r===this.size&&this.resize();let n=this.clone();this.buf[0]=e,n.copy(this.buf,1,0,r)}}append(e){let r=this.length++;r===this.size&&this.resize(),this.buf[r]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let r=Buffer.allocUnsafe(this.size);this.buf.copy(r,0,0,e),this.buf=r}toString(e){return e?this.buf.toString(e,0,this.length):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},Us=zs;var wc=function(t){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((n,i)=>{let s=Buffer.from(String.fromCharCode(i),t.encoding);return i!==63&&s.length===1&&s[0]===63||n.push(s),n},[]),r=new Uint8Array(256);for(let n of e)r[n[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:t.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:t.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(t.escape)&&Buffer.isBuffer(t.quote)&&Buffer.compare(t.escape,t.quote)===0,expectedRecordLength:Array.isArray(t.columns)?t.columns.length:void 0,field:new Us(20),firstLineToHeaders:t.cast_first_line_to_header,needMoreDataSize:Math.max(t.comment!==null?t.comment.length:0,...t.delimiter?t.delimiter.map(n=>n.length):[],t.delimiter_auto?1:0,t.quote!==null?t.quote.length:0,...e.map(n=>n.length)),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new Us(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:t.record_delimiter.length===0?0:Math.max(...t.record_delimiter.map(n=>n.length)),trimChars:[Buffer.from(" ",t.encoding)[0],Buffer.from(" ",t.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:e,timcharFirstBytes:r}};var vc=function(t){return t.replace(/([A-Z])/g,function(e,r){return"_"+r.toLowerCase()})};var zt=function(t){let e={};for(let n in t)e[vc(n)]=t[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 i=Date.parse(n);return isNaN(i)?n:new Date(i)};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=void 0,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=vn(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);if(e.delimiter_auto===void 0||e.delimiter_auto===null||e.delimiter_auto===!1)e.delimiter_auto=!1;else if(e.delimiter_auto===!0)e.delimiter_auto={};else if(!vr(e.delimiter_auto))throw new K("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","delimiter_auto must be a boolean or a configuration object,",`got ${JSON.stringify(e.delimiter_auto)}`],e);if(e.delimiter_auto){if(e.delimiter_auto.preferred===void 0)e.delimiter_auto.preferred={44:1.8,9:1.8,59:1.6,32:1.6,58:1.5,46:1.4,47:1.4};else if(!vr(e.delimiter_auto.preferred))throw new K("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","preferred must be an object,",`got ${JSON.stringify(e.delimiter_auto.preferred)}`],e);if(e.delimiter_auto.score===void 0)e.delimiter_auto.score=(n,i)=>(n.total-n.std)*(i.preferred[n.char_code]||1);else if(typeof e.delimiter_auto.score!="function")throw new K("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","score must be a function,",`got ${JSON.stringify(e.delimiter_auto.score)}`],e);if(e.delimiter_auto.size===void 0)e.delimiter_auto.size=2048;else if(typeof e.delimiter_auto.size!="number")throw new K("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","size must be a number,",`got ${JSON.stringify(e.delimiter_auto.size)}`],e)}let r=JSON.stringify(e.delimiter);if(e.delimiter_auto!==!1&&(e.delimiter=[]),Array.isArray(e.delimiter)||((e.delimiter===void 0||e.delimiter===null||e.delimiter===!1)&&(e.delimiter=Buffer.from(",",e.encoding)),e.delimiter=[e.delimiter]),e.delimiter=e.delimiter.map(function(n){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 ${r}`],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(t.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(t.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(t.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,i){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 ${i},`,`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 ${i},`,`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&&t.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&t.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(e.to!==-1)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(t.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(t.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(e.to_line!==-1)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(t.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(t.to_line)}`);return e};var Sc=function(t,e){e||({delimiter_auto:e}=zt({delimiter_auto:!0})),typeof t=="string"&&(t=Buffer.from(t)),Buffer.isBuffer(t)&&(t=(i=>{let s=[],o=Sn({delimiter:[]}),a=f=>s.push(f),l=()=>{},c=o.parse(i,!0,a,l);if(c!==void 0)throw c;return s})(t));let r=Array(127).fill().map(()=>({lines:[]}));t.map(([i],s)=>{for(let o=0,a=i.length;o<a;o++){let l=i.charCodeAt(o);r[l].lines[s]===void 0&&(r[l].lines[s]=0),r[l].lines[s]++}}),r.map((i,s)=>{i.char_code=s,i.std=Mp(i.lines),i.total=i.lines.reduce((o,a)=>o+a,0),i.preferred=!!e.preferred[s],i.score=e.score(i,e)});let n=r.reduce((i,s)=>i.score>s.score?i:s,{});return String.fromCharCode(n.char_code)},Mp=function(t){let e=t.length;if(e===0)return 0;let r=t.reduce((n,i)=>n+i)/e;return Math.sqrt(t.map(n=>Math.pow(n-r,2)).reduce((n,i)=>n+i)/e)};var xc=function(t){return t.every(e=>e==null||e.toString&&e.toString().trim()==="")},Fp=13,Bp=10,Ut={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},Sn=function(t={}){let e={bytes:0,bytes_records:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},r=zt(t);return{info:e,original_options:t,options:r,state:wc(r),__needMoreData:function(n,i,s){if(s)return!1;let{encoding:o,escape:a,quote:l}=this.options,{quoting:c,needMoreDataSize:f,recordDelimiterMaxLength:h}=this.state,p=i-n-1,m=Math.max(f,h===0?Buffer.from(`\r
862
- `,o).length:h,c?(a===null?0:a.length)+l.length:0,c?l.length+h:0);return p<m},parse:function(n,i,s,o){let{bom:a,comment_no_infix:l,delimiter_auto:c,encoding:f,from_line:h,ltrim:p,max_record_size:m,raw:g,relax_quotes:_,rtrim:O,skip_empty_lines:b,to:S,to_line:I}=this.options,{comment:L,escape:N,quote:z,record_delimiter:U}=this.options,{bomSkipped:$,delimiterDiscovered:Q,delimiterBufPrevious:ee,rawBuffer:ue,escapeIsQuote:ae}=this.state;if(!Q&&c){let J;if(ee===void 0?J=n:ee!==void 0&&n===void 0?J=ee:J=Buffer.concat([ee,n]),n=void 0,i||J.length>c.size)this.options.delimiter=[Buffer.from(Sc(J,this.options.delimiter_auto))],this.state.previousBuf=J,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=J;return}}let{previousBuf:ke}=this.state,B;if(ke===void 0)if(n===void 0){o();return}else B=n;else ke!==void 0&&n===void 0?B=ke:B=Buffer.concat([ke,n]);if($===!1)if(a===!1)this.state.bomSkipped=!0;else if(B.length<3){if(i===!1){this.state.previousBuf=B;return}}else{for(let J in Ut)if(Ut[J].compare(B,0,Ut[J].length)===0){let he=Ut[J].length;this.state.bufBytesStart+=he,B=B.slice(he);let gt=zt({...this.original_options,encoding:J});for(let X in gt)this.options[X]=gt[X];({comment:L,escape:N,quote:z}=this.options);break}this.state.bomSkipped=!0}let Ne=B.length,E;for(E=0;E<Ne&&!this.__needMoreData(E,Ne,i);E++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),I!==-1&&this.info.lines>I){this.state.stop=!0,o();return}this.state.quoting===!1&&U.length===0&&this.__autoDiscoverRecordDelimiter(B,E)&&(U=this.options.record_delimiter);let J=B[E];if(g===!0&&ue.append(J),(J===Fp||J===Bp)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(N!==null&&this.state.quoting===!0&&this.__isEscape(B,E,J)&&E+N.length<Ne)if(ae){if(this.__isQuote(B,E+N.length)){this.state.escaping=!0,E+=N.length-1;continue}}else{this.state.escaping=!0,E+=N.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(B,E))if(this.state.quoting===!0){let X=B[E+z.length],We=O&&this.__isCharTrimable(B,E+z.length),xe=L!==null&&this.__compareBytes(L,B,E+z.length,X),Ae=this.__isDelimiter(B,E+z.length,X),st=U.length===0?this.__autoDiscoverRecordDelimiter(B,E+z.length):this.__isRecordDelimiter(X,B,E+z.length);if(N!==null&&this.__isEscape(B,E,J)&&this.__isQuote(B,E+N.length))E+=N.length-1;else if(!X||Ae||st||xe||We){this.state.quoting=!1,this.state.wasQuoting=!0,E+=z.length-1;continue}else if(_===!1){let _e=this.__error(new K("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(X)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(_e!==void 0)return _e}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(z),E+=z.length-1}else if(this.state.field.length!==0){if(_===!1){let X=this.__infoField(),We=Object.keys(Ut).map(Ae=>Ut[Ae].equals(this.state.field.toString())?Ae:!1).filter(Boolean)[0],xe=this.__error(new K("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(X.column)} at line ${X.lines}, value is ${JSON.stringify(this.state.field.toString(f))}`,We?`(${We} bom)`:void 0],this.options,X,{field:this.state.field}));if(xe!==void 0)return xe}}else{this.state.quoting=!0,E+=z.length-1;continue}if(this.state.quoting===!1){let X=this.__isRecordDelimiter(J,B,E);if(X!==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)>=h){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),E+=X-1;continue}if(b===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,E+=X-1;continue}this.info.bytes=this.state.bufBytesStart+E;let Ae=this.__onField();if(Ae!==void 0)return Ae;this.info.bytes=this.state.bufBytesStart+E+X;let st=this.__onRecord(s);if(st!==void 0)return st;if(S!==-1&&this.info.records>=S){this.state.stop=!0,o();return}}this.state.commenting=!1,E+=X-1;continue}if(this.state.commenting)continue;if(L!==null&&(l===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(L,B,E,J)!==0){this.state.commenting=!0;continue}let We=this.__isDelimiter(B,E,J);if(We!==0){this.info.bytes=this.state.bufBytesStart+E;let xe=this.__onField();if(xe!==void 0)return xe;E+=We-1;continue}}}if(this.state.commenting===!1&&m!==0&&this.state.record_length+this.state.field.length>m)return this.__error(new K("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${m}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let he=p===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(B,E),gt=O===!1||this.state.wasQuoting===!1;if(he===!0&&gt===!0)this.state.field.append(J);else{if(O===!0&&!this.__isCharTrimable(B,E))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()));he===!1&&(E+=this.__isCharTrimable(B,E)-1);continue}}if(i===!0)if(this.state.quoting===!0){let J=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(J!==void 0)return J}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+E;let J=this.__onField();if(J!==void 0)return J;let he=this.__onRecord(s);if(he!==void 0)return he}else this.state.wasRowDelimiter===!0?this.info.empty_lines++:this.state.commenting===!0&&this.info.comment_lines++;else this.state.bufBytesStart+=E,this.state.previousBuf=B.slice(E);this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1)},__onRecord:function(n){let{columns:i,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:g,record:_}=this.state;if(g===!1)return this.__resetRecord();let O=_.length;if(i===!0){if(m===!0&&xc(_)){this.__resetRecord();return}return this.__firstLineToColumns(_)}if(i===!1&&this.info.records===0&&(this.state.expectedRecordLength=O),O!==this.state.expectedRecordLength){let b=i===!1?new K("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${O} on line ${this.info.lines}`],this.options,this.__infoField(),{record:_}):new K("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${i.length},`,`got ${O} on line ${this.info.lines}`],this.options,this.__infoField(),{record:_});if(c===!0||f===!0&&O<this.state.expectedRecordLength||h===!0&&O>this.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=b;else{let S=this.__error(b);if(S)return S}}if(m===!0&&xc(_)){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:b}=this.options;if(i!==!1){let S={};for(let I=0,L=_.length;I<L;I++)i[I]===void 0||i[I].disabled||(s===!0&&Object.hasOwn(S,i[I].name)?Array.isArray(S[i[I].name])?S[i[I].name]=S[i[I].name].concat(_[I]):S[i[I].name]=[S[i[I].name],_[I]]:Object.defineProperty(S,i[I].name,{value:_[I],enumerable:!0,writable:!0,configurable:!0}));if(p===!0||a===!0){let I=Object.assign({record:S},p===!0?{raw:this.state.rawBuffer.toString(o)}:{},a===!0?{info:this.__infoRecord()}:{}),L=this.__push(b===void 0?I:[S[b],I],n);if(L)return L}else{let I=this.__push(b===void 0?S:[S[b],S],n);if(I)return I}}else if(p===!0||a===!0){let S=Object.assign({record:_},p===!0?{raw:this.state.rawBuffer.toString(o)}:{},a===!0?{info:this.__infoRecord()}:{}),I=this.__push(b===void 0?S:[_[b],S],n);if(I)return I}else{let S=this.__push(b===void 0?_:[_[b],_],n);if(S)return S}}this.__resetRecord()},__firstLineToColumns:function(n){let{firstLineToHeaders:i}=this.state;try{let s=i===void 0?n:i.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=vn(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:i,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(i);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,i){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}this.info.bytes_records+=this.info.bytes,i(n)},__cast:function(n){let{columns:i,relax_column_count:s}=this.options;if(Array.isArray(i)===!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]},__compareBytes:function(n,i,s,o){if(n[0]!==o)return 0;let a=n.length;for(let l=1;l<a;l++)if(n[l]!==i[s+l])return 0;return a},__isCharTrimable:function(n,i){let{timchars:s,timcharFirstBytes:o}=this.state,a=n[i];if(a===void 0||o[a]===0)return 0;e:for(let l=0;l<s.length;l++){let c=s[l];for(let f=0;f<c.length;f++)if(c[f]!==n[i+f])continue e;return c.length}return 0},__isDelimiter:function(n,i,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[i+f])continue e;return c.length}}return 0},__isEscape:function(n,i,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[i+l])return!1;return!0}return!1},__isFloat:function(n){return n-parseFloat(n)+1>=0},__isQuote:function(n,i){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[i+a])return!1;return!0},__isRecordDelimiter:function(n,i,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]!==i[s+h])continue e;return c.length}}return 0},__autoDiscoverRecordDelimiter:function(n,i){let{encoding:s}=this.options,o=[Buffer.from(`\r
860
+ `)}else{let c={cli_contracts:o.cli_contracts,info:o.info,command_sets:{}},l=c.command_sets;for(let[d,f]of Object.entries(o.command_sets??{})){let p=f.commands;if(!p)continue;let g={};for(let[x,A]of Object.entries(p)){let L=d+"."+x;a.some(O=>O===x||O===L||x.startsWith(O+"."))&&(g[x]=A)}if(Object.keys(g).length>0){let x={...f};x.commands=g,l[d]=x}}o.components&&(c.components=o.components),process.stdout.write(JSON.stringify(c,null,2)+`
861
+ `)}process.exitCode=0}),t}import{createRequire as Wf}from"node:module";var Uf="^11.7.0";function Gf(){try{return Wf(import.meta.url)("better-sqlite3")}catch(n){let e=n instanceof Error?n.message:String(n);throw new Error(`The "sqlite" datasource needs the "better-sqlite3" package (${Uf}). Install it in your project (npm install better-sqlite3). Cause: ${e}`,{cause:n})}}var In=class{type="sqlite";db;queryString;constructor(e){if(!e.path)throw new Error('SQLite datasource requires "path" configuration');let t=Gf();this.db=new t(e.path,{readonly:!0}),this.queryString=e.query}async query(e,t=[]){try{return this.db.prepare(e).all(...t)}catch(r){let i=r instanceof Error?r.message:String(r);throw new Error(`SQLite query failed: ${i}`,{cause:r})}}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 Mi(n){return new In(n)}import{readFile as Jf}from"node:fs/promises";var Y=class n extends Error{constructor(e,t,r,...i){Array.isArray(t)&&(t=t.join(" ").trim()),super(t),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,n),this.code=e;for(let s of i)for(let o in s){let a=s[o];this[o]=Buffer.isBuffer(a)?a.toString(r.encoding):a==null?a:JSON.parse(JSON.stringify(a))}}};var Ut=function(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)};var Tn=function(n){let e=[];for(let t=0,r=n.length;t<r;t++){let i=n[t];if(i==null||i===!1)e[t]={disabled:!0};else if(typeof i=="string"||typeof i=="number")e[t]={name:`${i}`};else if(Ut(i)){if(typeof i.name!="string")throw new Y("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${t}`,"when column is an object literal"]);e[t]=i}else throw new Y("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(i)} at position ${t}`])}return e};var Fi=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 r=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),r.copy(this.buf,e.length),this.length+=e.length}else{let t=this.length++;t===this.size&&this.resize();let r=this.clone();this.buf[0]=e,r.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.toString(e,0,this.length):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},qi=Fi;var Ha=function(n){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((r,i)=>{let s=Buffer.from(String.fromCharCode(i),n.encoding);return i!==63&&s.length===1&&s[0]===63||r.push(s),r},[]),t=new Uint8Array(256);for(let r of e)t[r[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:n.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:n.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(n.escape)&&Buffer.isBuffer(n.quote)&&Buffer.compare(n.escape,n.quote)===0,expectedRecordLength:Array.isArray(n.columns)?n.columns.length:void 0,field:new qi(20),firstLineToHeaders:n.cast_first_line_to_header,needMoreDataSize:Math.max(n.comment!==null?n.comment.length:0,...n.delimiter?n.delimiter.map(r=>r.length):[],n.delimiter_auto?1:0,n.quote!==null?n.quote.length:0,...e.map(r=>r.length)),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new qi(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:n.record_delimiter.length===0?0:Math.max(...n.record_delimiter.map(r=>r.length)),trimChars:[Buffer.from(" ",n.encoding)[0],Buffer.from(" ",n.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:e,timcharFirstBytes:t}};var $a=function(n){return n.replace(/([A-Z])/g,function(e,t){return"_"+t.toLowerCase()})};var gt=function(n){let e={};for(let r in n)e[$a(r)]=n[r];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 Y("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 Y("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 Y("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(r){let i=Date.parse(r);return isNaN(i)?r:new Date(i)};else if(typeof e.cast_date!="function")throw new Y("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=void 0,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=Tn(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new Y("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 Y("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 Y("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 Y("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 Y("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);if(e.delimiter_auto===void 0||e.delimiter_auto===null||e.delimiter_auto===!1)e.delimiter_auto=!1;else if(e.delimiter_auto===!0)e.delimiter_auto={};else if(!Ut(e.delimiter_auto))throw new Y("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","delimiter_auto must be a boolean or a configuration object,",`got ${JSON.stringify(e.delimiter_auto)}`],e);if(e.delimiter_auto){if(e.delimiter_auto.preferred===void 0)e.delimiter_auto.preferred={44:1.8,9:1.8,59:1.6,32:1.6,58:1.5,46:1.4,47:1.4};else if(!Ut(e.delimiter_auto.preferred))throw new Y("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","preferred must be an object,",`got ${JSON.stringify(e.delimiter_auto.preferred)}`],e);if(e.delimiter_auto.score===void 0)e.delimiter_auto.score=(r,i)=>(r.total-r.std)*(i.preferred[r.char_code]||1);else if(typeof e.delimiter_auto.score!="function")throw new Y("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","score must be a function,",`got ${JSON.stringify(e.delimiter_auto.score)}`],e);if(e.delimiter_auto.size===void 0)e.delimiter_auto.size=2048;else if(typeof e.delimiter_auto.size!="number")throw new Y("CSV_INVALID_OPTION_DELIMITER_AUTO",["Invalid option delimiter_auto:","size must be a number,",`got ${JSON.stringify(e.delimiter_auto.size)}`],e)}let t=JSON.stringify(e.delimiter);if(e.delimiter_auto!==!1&&(e.delimiter=[]),Array.isArray(e.delimiter)||((e.delimiter===void 0||e.delimiter===null||e.delimiter===!1)&&(e.delimiter=Buffer.from(",",e.encoding)),e.delimiter=[e.delimiter]),e.delimiter=e.delimiter.map(function(r){if(typeof r=="string"&&(r=Buffer.from(r,e.encoding)),!Buffer.isBuffer(r)||r.length===0)throw new Y("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 r}),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(n.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(n.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(n.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 Y("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 Y("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 Y("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 Y("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 Y("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(r,i){if(typeof r!="string"&&!Buffer.isBuffer(r))throw new Y("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${i},`,`got ${JSON.stringify(r)}`],e);if(r.length===0)throw new Y("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${i},`,`got ${JSON.stringify(r)}`],e);return typeof r=="string"&&(r=Buffer.from(r,e.encoding)),r}),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&&n.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&n.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(e.to!==-1)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(n.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(n.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(e.to_line!==-1)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(n.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(n.to_line)}`);return e};var Va=function(n,e){e||({delimiter_auto:e}=gt({delimiter_auto:!0})),typeof n=="string"&&(n=Buffer.from(n)),Buffer.isBuffer(n)&&(n=(i=>{let s=[],o=Dn({delimiter:[]}),a=d=>s.push(d),c=()=>{},l=o.parse(i,!0,a,c);if(l!==void 0)throw l;return s})(n));let t=Array(127).fill().map(()=>({lines:[]}));n.map(([i],s)=>{for(let o=0,a=i.length;o<a;o++){let c=i.charCodeAt(o);t[c].lines[s]===void 0&&(t[c].lines[s]=0),t[c].lines[s]++}}),t.map((i,s)=>{i.char_code=s,i.std=zf(i.lines),i.total=i.lines.reduce((o,a)=>o+a,0),i.preferred=!!e.preferred[s],i.score=e.score(i,e)});let r=t.reduce((i,s)=>i.score>s.score?i:s,{});return String.fromCharCode(r.char_code)},zf=function(n){let e=n.length;if(e===0)return 0;let t=n.reduce((r,i)=>r+i)/e;return Math.sqrt(n.map(r=>Math.pow(r-t,2)).reduce((r,i)=>r+i)/e)};var ja=function(n){return n.every(e=>e==null||e.toString&&e.toString().trim()==="")},Yf=13,Kf=10,_t={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},Dn=function(n={}){let e={bytes:0,bytes_records:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},t=gt(n);return{info:e,original_options:n,options:t,state:Ha(t),__needMoreData:function(r,i,s){if(s)return!1;let{encoding:o,escape:a,quote:c}=this.options,{quoting:l,needMoreDataSize:d,recordDelimiterMaxLength:f}=this.state,p=i-r-1,g=Math.max(d,f===0?Buffer.from(`\r
862
+ `,o).length:f,l?(a===null?0:a.length)+c.length:0,l?c.length+f:0);return p<g},parse:function(r,i,s,o){let{bom:a,comment_no_infix:c,delimiter_auto:l,encoding:d,from_line:f,ltrim:p,max_record_size:g,raw:x,relax_quotes:A,rtrim:L,skip_empty_lines:O,to:T,to_line:D}=this.options,{comment:F,escape:M,quote:G,record_delimiter:J}=this.options,{bomSkipped:W,delimiterDiscovered:X,delimiterBufPrevious:ne,rawBuffer:ye,escapeIsQuote:oe}=this.state;if(!X&&l){let K;if(ne===void 0?K=r:ne!==void 0&&r===void 0?K=ne:K=Buffer.concat([ne,r]),r=void 0,i||K.length>l.size)this.options.delimiter=[Buffer.from(Va(K,this.options.delimiter_auto))],this.state.previousBuf=K,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=K;return}}let{previousBuf:be}=this.state,q;if(be===void 0)if(r===void 0){o();return}else q=r;else be!==void 0&&r===void 0?q=be:q=Buffer.concat([be,r]);if(W===!1)if(a===!1)this.state.bomSkipped=!0;else if(q.length<3){if(i===!1){this.state.previousBuf=q;return}}else{for(let K in _t)if(_t[K].compare(q,0,_t[K].length)===0){let le=_t[K].length;this.state.bufBytesStart+=le,q=q.slice(le);let Je=gt({...this.original_options,encoding:K});for(let Z in Je)this.options[Z]=Je[Z];({comment:F,escape:M,quote:G}=this.options);break}this.state.bomSkipped=!0}let me=q.length,v;for(v=0;v<me&&!this.__needMoreData(v,me,i);v++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),D!==-1&&this.info.lines>D){this.state.stop=!0,o();return}this.state.quoting===!1&&J.length===0&&this.__autoDiscoverRecordDelimiter(q,v)&&(J=this.options.record_delimiter);let K=q[v];if(x===!0&&ye.append(K),(K===Yf||K===Kf)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(M!==null&&this.state.quoting===!0&&this.__isEscape(q,v,K)&&v+M.length<me)if(oe){if(this.__isQuote(q,v+M.length)){this.state.escaping=!0,v+=M.length-1;continue}}else{this.state.escaping=!0,v+=M.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(q,v))if(this.state.quoting===!0){let Z=q[v+G.length],Ie=L&&this.__isCharTrimable(q,v+G.length),ge=F!==null&&this.__compareBytes(F,q,v+G.length,Z),we=this.__isDelimiter(q,v+G.length,Z),Ve=J.length===0?this.__autoDiscoverRecordDelimiter(q,v+G.length):this.__isRecordDelimiter(Z,q,v+G.length);if(M!==null&&this.__isEscape(q,v,K)&&this.__isQuote(q,v+M.length))v+=M.length-1;else if(!Z||we||Ve||ge||Ie){this.state.quoting=!1,this.state.wasQuoting=!0,v+=G.length-1;continue}else if(A===!1){let fe=this.__error(new Y("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(Z)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(fe!==void 0)return fe}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(G),v+=G.length-1}else if(this.state.field.length!==0){if(A===!1){let Z=this.__infoField(),Ie=Object.keys(_t).map(we=>_t[we].equals(this.state.field.toString())?we:!1).filter(Boolean)[0],ge=this.__error(new Y("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(Z.column)} at line ${Z.lines}, value is ${JSON.stringify(this.state.field.toString(d))}`,Ie?`(${Ie} bom)`:void 0],this.options,Z,{field:this.state.field}));if(ge!==void 0)return ge}}else{this.state.quoting=!0,v+=G.length-1;continue}if(this.state.quoting===!1){let Z=this.__isRecordDelimiter(K,q,v);if(Z!==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+=Z-1;continue}if(O===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,v+=Z-1;continue}this.info.bytes=this.state.bufBytesStart+v;let we=this.__onField();if(we!==void 0)return we;this.info.bytes=this.state.bufBytesStart+v+Z;let Ve=this.__onRecord(s);if(Ve!==void 0)return Ve;if(T!==-1&&this.info.records>=T){this.state.stop=!0,o();return}}this.state.commenting=!1,v+=Z-1;continue}if(this.state.commenting)continue;if(F!==null&&(c===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(F,q,v,K)!==0){this.state.commenting=!0;continue}let Ie=this.__isDelimiter(q,v,K);if(Ie!==0){this.info.bytes=this.state.bufBytesStart+v;let ge=this.__onField();if(ge!==void 0)return ge;v+=Ie-1;continue}}}if(this.state.commenting===!1&&g!==0&&this.state.record_length+this.state.field.length>g)return this.__error(new Y("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${g}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let le=p===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(q,v),Je=L===!1||this.state.wasQuoting===!1;if(le===!0&&Je===!0)this.state.field.append(K);else{if(L===!0&&!this.__isCharTrimable(q,v))return this.__error(new Y("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()));le===!1&&(v+=this.__isCharTrimable(q,v)-1);continue}}if(i===!0)if(this.state.quoting===!0){let K=this.__error(new Y("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(K!==void 0)return K}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+v;let K=this.__onField();if(K!==void 0)return K;let le=this.__onRecord(s);if(le!==void 0)return le}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=q.slice(v);this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1)},__onRecord:function(r){let{columns:i,group_columns_by_name:s,encoding:o,info:a,from:c,relax_column_count:l,relax_column_count_less:d,relax_column_count_more:f,raw:p,skip_records_with_empty_values:g}=this.options,{enabled:x,record:A}=this.state;if(x===!1)return this.__resetRecord();let L=A.length;if(i===!0){if(g===!0&&ja(A)){this.__resetRecord();return}return this.__firstLineToColumns(A)}if(i===!1&&this.info.records===0&&(this.state.expectedRecordLength=L),L!==this.state.expectedRecordLength){let O=i===!1?new Y("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${L} on line ${this.info.lines}`],this.options,this.__infoField(),{record:A}):new Y("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${i.length},`,`got ${L} on line ${this.info.lines}`],this.options,this.__infoField(),{record:A});if(l===!0||d===!0&&L<this.state.expectedRecordLength||f===!0&&L>this.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=O;else{let T=this.__error(O);if(T)return T}}if(g===!0&&ja(A)){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:O}=this.options;if(i!==!1){let T={};for(let D=0,F=A.length;D<F;D++)i[D]===void 0||i[D].disabled||(s===!0&&Object.hasOwn(T,i[D].name)?Array.isArray(T[i[D].name])?T[i[D].name]=T[i[D].name].concat(A[D]):T[i[D].name]=[T[i[D].name],A[D]]:Object.defineProperty(T,i[D].name,{value:A[D],enumerable:!0,writable:!0,configurable:!0}));if(p===!0||a===!0){let D=Object.assign({record:T},p===!0?{raw:this.state.rawBuffer.toString(o)}:{},a===!0?{info:this.__infoRecord()}:{}),F=this.__push(O===void 0?D:[T[O],D],r);if(F)return F}else{let D=this.__push(O===void 0?T:[T[O],T],r);if(D)return D}}else if(p===!0||a===!0){let T=Object.assign({record:A},p===!0?{raw:this.state.rawBuffer.toString(o)}:{},a===!0?{info:this.__infoRecord()}:{}),D=this.__push(O===void 0?T:[A[O],T],r);if(D)return D}else{let T=this.__push(O===void 0?A:[A[O],A],r);if(T)return T}}this.__resetRecord()},__firstLineToColumns:function(r){let{firstLineToHeaders:i}=this.state;try{let s=i===void 0?r:i.call(null,r);if(!Array.isArray(s))return this.__error(new Y("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=Tn(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:r,encoding:i,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(i);if(s===!0&&c===!1&&(l=l.trimRight()),r===!0){let[d,f]=this.__cast(l);if(d!==void 0)return d;l=f}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(r,i){let{on_record:s}=this.options;if(s!==void 0){let o=this.__infoRecord();try{r=s.call(null,r,o)}catch(a){return a}if(r==null)return}this.info.bytes_records+=this.info.bytes,i(r)},__cast:function(r){let{columns:i,relax_column_count:s}=this.options;if(Array.isArray(i)===!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,r,a)]}catch(a){return[a]}if(this.__isFloat(r))return[void 0,parseFloat(r)];if(this.options.cast_date!==!1){let a=this.__infoField();return[void 0,this.options.cast_date.call(null,r,a)]}return[void 0,r]},__compareBytes:function(r,i,s,o){if(r[0]!==o)return 0;let a=r.length;for(let c=1;c<a;c++)if(r[c]!==i[s+c])return 0;return a},__isCharTrimable:function(r,i){let{timchars:s,timcharFirstBytes:o}=this.state,a=r[i];if(a===void 0||o[a]===0)return 0;e:for(let c=0;c<s.length;c++){let l=s[c];for(let d=0;d<l.length;d++)if(l[d]!==r[i+d])continue e;return l.length}return 0},__isDelimiter:function(r,i,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 d=1;d<l.length;d++)if(l[d]!==r[i+d])continue e;return l.length}}return 0},__isEscape:function(r,i,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]!==r[i+c])return!1;return!0}return!1},__isFloat:function(r){return r-parseFloat(r)+1>=0},__isQuote:function(r,i){let{quote:s}=this.options;if(s===null)return!1;let o=s.length;for(let a=0;a<o;a++)if(s[a]!==r[i+a])return!1;return!0},__isRecordDelimiter:function(r,i,s){let{record_delimiter:o}=this.options,a=o.length;e:for(let c=0;c<a;c++){let l=o[c],d=l.length;if(l[0]===r){for(let f=1;f<d;f++)if(l[f]!==i[s+f])continue e;return l.length}}return 0},__autoDiscoverRecordDelimiter:function(r,i){let{encoding:s}=this.options,o=[Buffer.from(`\r
863
863
  `,s),Buffer.from(`
864
- `,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[i+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:i,raw:s,skip_records_with_error:o}=this.options,a=typeof n=="string"?new Error(n):n;if(o){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(a,s?this.state.rawBuffer.toString(i):void 0)}catch(l){return l}return}else return a},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){let{columns:n,raw:i,encoding:s}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:n===!0,index:this.state.record.length,raw:i?this.state.rawBuffer.toString(s):void 0}},__infoField:function(){let{columns:n}=this.options,i=Array.isArray(n),s=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:s,column:i===!0?n.length>this.state.record.length?n[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var Cc=function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],n=Sn(e),i=a=>{n.options.objname===void 0?r.push(a):r[a[0]]=a[1]},s=()=>{},o=n.parse(t,!0,i,s);if(o!==void 0)throw o;return r};function Xe(t,e,r){let n=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(n&&r.length>0){let i=n[1]??"",s=String(r[0]);return t.filter(o=>String(o[i])===s)}return t}var xn=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 qp(this.filePath,{encoding:this.encoding}),r=Cc(e,{columns:!0,skip_empty_lines:!0,trim:!0});return this.data=r,this.data}async query(e,r=[]){return Xe(await this.loadData(),e,r)}async getAll(){return this.loadData()}async close(){this.data=null}};function Gs(t){return new xn(t)}import{readFile as Hp}from"node:fs/promises";var Cn=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 Hp(this.filePath,{encoding:"utf-8"}),r=JSON.parse(e);if(Array.isArray(r))this.data=r;else if(typeof r=="object"&&r!==null)this.data=[r];else throw new Error("JSON file must contain an array or object");return this.data}async query(e,r=[]){return Xe(await this.loadData(),e,r)}async getAll(){return this.loadData()}async close(){this.data=null}};function Ys(t){return new Cn(t)}import{readFile as $p}from"node:fs/promises";var En=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 $p(this.filePath,{encoding:"utf-8"}),r=Ze.load(e);if(Array.isArray(r))this.data=r;else if(typeof r=="object"&&r!==null)this.data=[r];else throw new Error("YAML file must contain an array or object");return this.data}async query(e,r=[]){return Xe(await this.loadData(),e,r)}async getAll(){return this.loadData()}async close(){this.data=null}};function Ks(t){return new En(t)}import{stat as Hg}from"node:fs/promises";import{basename as Hu,dirname as $g,extname as jg}from"node:path";import{fileURLToPath as qm}from"node:url";import{tracingChannel as Hm,channel as $m}from"node:diagnostics_channel";import{posix as Um,win32 as wo}from"node:path";import{fileURLToPath as Gm}from"node:url";import{lstatSync as Ym,readdir as Km,readdirSync as Jm,readlinkSync as Qm,realpathSync as Zm}from"fs";import*as Xm from"node:fs";import{lstat as eg,readdir as tg,readlink as rg,realpath as ng}from"node:fs/promises";import{EventEmitter as Eo}from"node:events";import gu from"node:stream";import{StringDecoder as ig}from"node:string_decoder";var Zc=(t,e,r)=>{let n=t instanceof RegExp?Ec(t,r):t,i=e instanceof RegExp?Ec(e,r):e,s=n!==null&&i!=null&&jp(n,i,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+n.length,s[1]),post:r.slice(s[1]+i.length)}},Ec=(t,e)=>{let r=e.match(t);return r?r[0]:null},jp=(t,e,r)=>{let n,i,s,o,a,l=r.indexOf(t),c=r.indexOf(e,l+1),f=l;if(l>=0&&c>0){if(t===e)return[l,c];for(n=[],s=r.length;f>=0&&!a;){if(f===l)n.push(f),l=r.indexOf(t,f+1);else if(n.length===1){let h=n.pop();h!==void 0&&(a=[h,c])}else i=n.pop(),i!==void 0&&i<s&&(s=i,o=c),c=r.indexOf(e,f+1);f=l<c&&l>=0?l:c}n.length&&o!==void 0&&(a=[s,o])}return a},Xc="\0SLASH"+Math.random()+"\0",eu="\0OPEN"+Math.random()+"\0",So="\0CLOSE"+Math.random()+"\0",tu="\0COMMA"+Math.random()+"\0",ru="\0PERIOD"+Math.random()+"\0",Wp=new RegExp(Xc,"g"),Vp=new RegExp(eu,"g"),zp=new RegExp(So,"g"),Up=new RegExp(tu,"g"),Gp=new RegExp(ru,"g"),Yp=/\\\\/g,Kp=/\\{/g,Jp=/\\}/g,Qp=/\\,/g,Zp=/\\\./g,Xp=1e5,em=4e6,tm=1e3,rm=1e3;function Js(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function nm(t){return t.replace(Yp,Xc).replace(Kp,eu).replace(Jp,So).replace(Qp,tu).replace(Zp,ru)}function im(t){return t.replace(Wp,"\\").replace(Vp,"{").replace(zp,"}").replace(Up,",").replace(Gp,".")}function Qs(t,e){for(let r=0;r<e.length;r++)t.push(e[r])}function sm(t){let e=[],r="";for(;;){let n=Zc("{","}",t);if(!n){let l=t.split(",");return l[0]=r+l[0],Qs(e,l),e}let{pre:i,body:s,post:o}=n,a=i.split(",");if(a[0]=r+a[0],a[a.length-1]+="{"+s+"}",!o.length)return Qs(e,a),e;r=a.pop(),Qs(e,a),t=o}}function om(t,e={}){if(!t)return[];let{max:r=Xp,maxLength:n=em,maxDepth:i=tm,maxRewrites:s=rm}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),fo(nm(t),r,n,i,0,s,!0).map(im)}function am(t){return"{"+t+"}"}function lm(t){return/^-?0\d/.test(t)}function cm(t,e){return t<=e}function um(t,e){return t>=e}function Sr(t,e,r,n,i,s){let o=[],a=0;for(let l=0;l<t.length;l++)for(let c=0;c<r.length;c++){if(o.length>=n)return o;let f=t[l]+e+r[c];if(!(s&&!f)){if(a+f.length>i)return o;o.push(f),a+=f.length}}return o}function hm(t,e,r,n){let i=t.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let o=Js(i[0]),a=Js(i[1]),l=Math.max(i[0].length,i[1].length),c=i.length===3&&i[2]!==void 0?Math.max(Math.abs(Js(i[2])),1):1,f=cm;a<o&&(c*=-1,f=um);let h=i.some(lm),p=0;for(let m=o;f(m,a)&&s.length<r;m+=c){let g;if(e)g=String.fromCharCode(m),g==="\\"&&(g="");else if(g=String(m),h){let _=l-g.length;if(_>0){let O=new Array(_+1).join("0");m<0?g="-"+O+g.slice(1):g=O+g}}if(p+g.length>n)break;s.push(g),p+=g.length}return s}function fo(t,e,r,n,i,s,o){if(i>n)return[t];let a=[""],l=0,c=!1,f=!0;for(;;){let h=Zc("{","}",t);if(!h)return Sr(a,t,[""],e,r,c);let p=h.pre;if(/\$$/.test(p)){if(a=Sr(a,p+"{"+h.body+"}",[""],e,r,c&&!h.post.length),f=!1,!h.post.length)break;t=h.post;continue}let m=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(h.body),g=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(h.body),_=m||g,O=h.body.indexOf(",")>=0;if(!_&&!O){if(l<s&&h.post.match(/,(?!,).*\}/)){l++,t=h.pre+"{"+h.body+So+h.post,o=!0;continue}return Sr(a,p+"{"+h.body+"}"+h.post,[""],e,r,c)}f&&(c=o&&!_,f=!1);let b;if(_)b=hm(h.body,g,e,r);else{let S=sm(h.body);if(S.length===1&&S[0]!==void 0&&(S=fo(S[0],e,r,n,i+1,s,!1).map(am),S.length===1)){if(a=Sr(a,p+S[0],[""],e,r,c&&!h.post.length),!h.post.length)break;t=h.post;continue}let I=c&&!h.post.length&&!p;for(let N=0;I&&N<a.length;N++)a[N]&&(I=!1);b=[];let L=0;e:for(let N=0;N<S.length;N++){let z=fo(S[N],e,r,n,i+1,s,!1);for(let U=0;U<z.length;U++){let $=z[U];if(!(I&&!$)){if(b.length>=e||L+$.length>r)break e;b.push($),L+=$.length}}}}if(a=Sr(a,p,b,e,r,c&&!h.post.length),!h.post.length)break;t=h.post}return a}var po=(t,e)=>t===e?{t:"lit",ch:String(t)}:{t:"class",re:new RegExp(`^[${t}-${e}]$`)},Zs=(t,e)=>e.map(r=>[po(t,t),...r]),Nr=(t,e)=>{if(!t)return[[]];let r=+t[0],n=+e[0],i=t.slice(1),s=e.slice(1);if(r===n)return Zs(r,Nr(i,s));let o="0".repeat(i.length),a="9".repeat(i.length),l=[];i!==o&&l.push(...Zs(r++,Nr(i,a)));let c=s===a?[]:Zs(n--,Nr(o,s));return r<=n&&l.push([po(r,n),...Array.from(i,()=>po(0,9))]),l.push(...c),l},kc=(t,e,r)=>{if(r)return Nr(String(t).padStart(r,"0"),String(e).padStart(r,"0"));let n=[];for(let i=String(t).length;i<=String(e).length;i++){let s=Math.max(t,i===1?0:10**(i-1)),o=Math.min(e,10**i-1);n.push(...Nr(String(s),String(o)))}return n},fm=(t,e)=>{let r=Number(t),n=Number(e);if(!Number.isSafeInteger(r)||!Number.isSafeInteger(n))return;r>n&&([r,n]=[n,r]);let i=/^-?0\d/.test(t)||/^-?0\d/.test(e)?Math.max(t.length,e.length):0,s=[];if(r<0){let o=kc(Math.max(-n,1),-r,i&&i-1);s.push(...o.map(a=>[{t:"lit",ch:"-"},...a]))}return n>=0&&s.push(...kc(Math.max(r,0),n,i)),s},dm={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}"],"[:alpha:]":["\\p{L}\\p{Nl}"],"[:ascii:]":["\\x00-\\x7f"],"[:blank:]":["\\p{Zs}\\t"],"[:cntrl:]":["\\p{Cc}"],"[:digit:]":["\\p{Nd}"],"[:graph:]":["\\p{Z}\\p{C}",!0],"[:lower:]":["\\p{Ll}"],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}\\p{S}"],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f"],"[:upper:]":["\\p{Lu}"],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}"],"[:xdigit:]":["A-Fa-f0-9"]},xr=t=>t.replace(/[[\]\\-]/g,"\\$&"),Xs=/$./,pm=(t,e,r=!1,n)=>{let i=b=>{let S=n?b.normalize(n):b;return[...S].length===1?S:b},s=e;if(t.charAt(s)!=="[")throw new Error("not in a brace expression");let o=[],a=[],l=s+1,c=!1,f=!1,h=!1,p=s,m="";e:for(;l<t.length;){let b=String.fromCodePoint(t.codePointAt(l));if((b==="!"||b==="^")&&l===s+1){h=!0,l++;continue}if(b==="]"&&c&&!f){p=l+1;break}if(c=!0,b==="\\"&&!f){f=!0,l++;continue}if(b==="["&&!f){for(let[I,[L,N]]of Object.entries(dm))if(t.startsWith(I,l)){if(m)return[Xs,t.length-s];l+=I.length,N?a.push(L):o.push(L);continue e}}f=!1;let S=i(b);if(m){S.codePointAt(0)>m.codePointAt(0)?o.push(xr(m)+"-"+xr(S)):S===m&&o.push(xr(S)),m="",l+=b.length;continue}if(t.startsWith("-]",l+b.length)){o.push(xr(S+"-")),l+=b.length+1;continue}if(t.startsWith("-",l+b.length)){m=S,l+=b.length+1;continue}o.push(xr(S)),l+=b.length}if(p<l)return[Xs,0];if(!o.length&&!a.length)return[Xs,t.length-s];let g="["+(h?"^":"")+o.join("")+"]",_="["+(h?"":"^")+a.join("")+"]",O="^"+(o.length&&a.length?"("+g+"|"+_+")":o.length?g:_);return[new RegExp(O,r?"iu":"u"),p-s]},mo={t:"match",id:0},mm="!?+*@",It=t=>({t:"lit",ch:t}),gm=t=>t.replace(/[\\^$.*+?()[\]{}|/]/g,"\\$&"),nu=t=>new RegExp(`^${gm(t)}$`,"iu"),kn=new Map,iu=t=>{let e=kn.get(t);return e||(e=nu(t),kn.size>=1e3&&kn.clear(),kn.set(t,e)),e},xo=(t,e)=>{if(e===t.ch)return!0;if(!t.re)return!1;let r=e.charCodeAt(0);if(r>=128)return t.re.test(e);let n=t.ascii??=new Uint8Array(128);return n[r]||=t.re.test(e)?1:2,n[r]===1},ym=(t,e,r,n,i)=>{let s=[];for(let o=0;o<t.length;){let a=String.fromCodePoint(t.codePointAt(o));if(i){let l=a==="\\"&&t.startsWith(i,o+1)?1:0;if(l||a===i){let c=o+l+i.length,f=t.indexOf(i,c),h=/^(-?\d+)\.\.(-?\d+)$/.exec(t.slice(c,f)),p=f!==-1&&h&&fm(h[1],h[2]);if(p){s.push({t:"ext",type:"@",alts:p}),o=f+i.length;continue}}}if(a==="\\"){let l=t.codePointAt(o+1),c=l===void 0?a:String.fromCodePoint(l);s.push(It(c)),o+=1+c.length;continue}if(a==="["){let[l,c]=pm(t,o,e,n);if(c){s.push({t:"class",re:l}),o+=c;continue}}if(!r&&mm.includes(a)&&t[o+1]==="("){s.push({t:"open",type:a}),o+=2;continue}s.push(!r&&a==="|"?{t:"bar"}:!r&&a===")"?{t:"close"}:a==="*"?{t:"star"}:a==="?"?{t:"any"}:It(a)),o+=a.length}return s},_m=t=>{let e=new Map,r=[];return t.forEach((n,i)=>{n.t==="open"?r.push(i):n.t==="close"&&r.length&&e.set(r.pop(),i)}),e},su=(t,e,r,n,i)=>{let s=[],o=[s];for(let a=r;a<n;a++){let l=t[a],c=e.get(a);if(l.t==="open"&&c!==void 0){let f=su(t,e,a+1,c,!1);s.push({t:"ext",type:l.type,alts:f}),a=c}else l.t==="bar"&&!i?o.push(s=[]):l.t==="open"?s.push(It(l.type),It("(")):l.t==="bar"?s.push(It("|")):l.t==="close"?s.push(It(")")):s.push(l)}return o},ou=(t,e)=>{let r=[],n="",i=()=>{for(let s of n.normalize(e))r.push(It(s));n=""};for(let s of t){if(s.t==="lit"){n+=s.ch;continue}i(),r.push(s.t==="ext"?{...s,alts:s.alts.map(o=>ou(o,e))}:s)}return i(),r},bm=(t,e)=>{let r=1,n=o=>({t:"split",id:r++,out:o}),i=(o,a)=>o.reduceRight((l,c)=>s(c,l),a),s=(o,a)=>{switch(o.t){case"lit":let h=e?iu(o.ch):void 0;return{t:"lit",id:r++,ch:o.ch,re:h,next:a};case"any":case"star":return{t:o.t,id:r++,next:a};case"class":return{t:"class",id:r++,re:o.re,next:a}}let l=h=>o.alts.map(p=>i(p,h));switch(o.type){case"@":return n(l(a));case"?":return n([a,...l(a)]);case"!":return{t:"neg",id:r++,sub:n(l(mo)),next:a}}let c=n([]),f=n(l(c));return c.out.push(a,f),o.type==="*"?c:f};return[i(t,mo),r]},wm=t=>{let e=[],r=new Set,n=s=>s.t==="match"?"match":String(s.id),i=(s,o)=>{if(s.t==="match"||r.has(s))return;r.add(s);let a=l=>e.push(`${o}${s.id}: ${l}`);switch(s.t){case"split":a(`split -> ${s.out.map(n).join(", ")}`);for(let l of s.out)i(l,o);return;case"neg":return a(`!(${n(s.sub)}) -> ${n(s.next)}`),i(s.sub,o+" "),i(s.next,o);case"lit":a(`${JSON.stringify(s.ch)} -> ${n(s.next)}`);break;case"class":a(`${s.re} -> ${n(s.next)}`);break;default:a(`${s.t==="any"?"?":"*"} -> ${n(s.next)}`)}i(s.next,o)};return i(t,""),[`start -> ${n(t)}`,...e].join(`
865
- `)},vm=class{gen;threads=[];match=!1;runs=[];ids=[];constructor(t){this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},au=(t,e)=>t.ids.length!==e.ids.length||t.runs.length!==e.runs.length||t.ids.some((r,n)=>r!==e.ids[n])?!1:t.runs.every(r=>e.runs.some(n=>n.neg===r.neg&&au(n.state,r.state))),Ac=t=>({has:new Float64Array(t),seen:new Float64Array(t),gen:0}),go=class{dots;dotStart;#e;constructor(t,e,r){this.dots=t,this.dotStart=e,this.#e=r}state(){return new vm(++this.#e.gen)}done(t){return t.ids=t.threads.map(e=>e.id).sort((e,r)=>e-r),t.match&&t.ids.unshift(mo.id),t}#i(t,e){let{seen:r}=this.#e;return r[e.id]===t.gen?!1:(r[e.id]=t.gen,!0)}#n(t,e){let{has:r}=this.#e;return r[e.id]===t.gen?!1:(r[e.id]=t.gen,t.threads.push(e),!0)}restricted(t,e){return e&&(this.dots||this.dotStart&&t===0)}add(t,e,r,n){switch(e.t){case"split":if(!this.#i(t,e))return;for(let s of e.out)this.add(t,s,r,n);return;case"neg":if(!this.#i(t,e))return;let i=this.state();return this.add(i,e.sub,r,!1),this.done(i),this.addRun(t,{t:"run",neg:e,state:i},r,n);case"star":if(this.restricted(r,n))return;this.#n(t,e)&&this.add(t,e.next,r,n);return;case"match":t.match=!0;return;default:this.#n(t,e)}}addRun(t,e,r,n){for(let i of t.runs)if(i.neg===e.neg&&au(i.state,e.state))return;t.runs.push(e),e.state.match||this.add(t,e.neg.next,r,n)}step(t,e,r,n){let i=this.state();for(let s of t.threads)switch(s.t){case"lit":xo(s,e)&&this.add(i,s.next,r+1,n);break;case"any":this.restricted(r,n)||this.add(i,s.next,r+1,n);break;case"class":!this.restricted(r,n)&&s.re.test(e)&&this.add(i,s.next,r+1,n);break;case"star":this.restricted(r,n)||this.add(i,s,r+1,n)}if(!this.restricted(r,n))for(let s of t.runs){if(s.state.dead){this.addRun(i,s,r+1,n);continue}let o=this.step(s.state,e,r,!1);this.addRun(i,{t:"run",neg:s.neg,state:o},r+1,n)}return this.done(i)}},lu=t=>{let e=t.ids.join();if(!t.runs.length)return e;let r=t.runs.map(n=>`${n.neg.id}(${lu(n.state)})`);return`${e}|${r.sort().join("|")}`},Sm=1<<18,xm=class{#e;#i=new Map;#n=0;#o;#s;#d;#f;constructor(t,e){this.#e=t,this.#d=new go(!1,!1,e),this.#f=new go(!1,!0,e)}#h(t){return{state:t,match:t.match,dead:t.dead,next:new Map}}#a(t){let e=lu(t),r=this.#i.get(e);if(r)return r;this.#n>Sm&&this.#m();let n=this.#h(t);return this.#i.set(e,n),this.#n+=e.length+1,n}#m(){this.#i.clear(),this.#n=0,this.#o=void 0,this.#s=void 0}start(t){if(t){if(this.#s)return this.#s;let r=this.#f.state();return this.#f.add(r,this.#e,0,!0),this.#s=this.#h(this.#f.done(r))}if(this.#o)return this.#o;let e=this.#d.state();return this.#d.add(e,this.#e,0,!0),this.#o=this.#a(this.#d.done(e))}next(t,e){let r=e.charCodeAt(0),n=r<128?void 0:t.next.get(e);if(n)return n;let i=t===this.#s?this.#a(this.#f.step(t.state,e,0,!0)):this.#a(this.#d.step(t.state,e,1,!0));return r<128?(t.ascii||(t.ascii=new Array(128),this.#n+=128),t.ascii[r]=i):t.next.set(e,i),this.#n++,i}},Cm=t=>{let e=[];for(let r=t;r.t!=="match";r=r.next){if(r.t==="split"||r.t==="neg")return;e.push(r)}return e},Em=(t,e,r,n)=>{let i=0,s=r,o=-1,a=0;for(;s<n;){let l=t[i];if(l?.t==="star"){o=i++,a=s;continue}let c=e[s];if(l&&(l.t==="any"||l.t==="lit"&&xo(l,c)||l.t==="class"&&l.re.test(c))){i++,s++;continue}if(o===-1)return!1;i=o+1,s=++a}for(;t[i]?.t==="star";)i++;return i===t.length},cu=t=>{let e=0,r=0;for(let n of t){let[i,s]=km(n);e+=i,r+=s}return[e,r]},km=t=>{if(t.t==="star")return[0,1/0];if(t.t!=="ext")return[1,1];if(t.type==="!")return[0,1/0];let e=t.alts.map(cu),r=Math.min(...e.map(s=>s[0])),n=Math.max(...e.map(s=>s[1])),i=n===0?0:1/0;return t.type==="@"?[r,n]:t.type==="?"?[0,n]:t.type==="*"?[0,i]:[r,i]},Oc=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!xo(t[n],e[r+n]))return!1;return!0},Am=/[/\ud800-\udfff]/,Om=/[\ud800-\udfff]/,An=t=>Om.test(t)?[...t]:t,Pc=t=>{if(t.includes("/"))throw new Error("can only match a single path portion, got: "+t)},Tc=class{pattern;options;#e;#i;#n;#o;#s;#d=!1;#f;#h;#a=!1;#m=0;#c=1/0;#l=[];#r=[];#_;#x;#b=!1;#g;#y;constructor(t,e={}){if(t.includes("/"))throw new Error("can only match a single path portion, got pattern: "+t);this.pattern=t,this.options=e;let{nocase:r=!1,noext:n=!1,normalize:i}=e;this.#y=i===!0?"NFC":i||void 0;let s=/^[?*+@]\(\)$/.test(t),o=ym(t,r,n||s,this.#y,e.rangeMark),[a]=su(o,_m(o),0,o.length,!0);this.#y&&(a=ou(a,this.#y));let[l,c]=bm(a,r);if(this.#e=l,this.#i=c,a.every(f=>f.t==="lit"))this.#s=a.map(f=>f.ch).join(""),this.#d=r;else{let f=m=>m.t!=="lit"?void 0:r?{ch:m.ch,re:iu(m.ch)}:{ch:m.ch};for(let m of a){let g=f(m);if(!g)break;this.#l.push(g)}for(let m=a.length-1;m>=0;m--){let g=f(a[m]);if(!g)break;this.#r.unshift(g)}this.#b=!!(this.#l.length||this.#r.length),r||(this.#_=this.#l.map(m=>m.ch).join(""),this.#x=this.#r.map(m=>m.ch).join("")),this.#h=Cm(this.#e)?.slice(this.#l.length,-this.#r.length||void 0),this.#a=!!this.#h?.every(m=>m.t==="star"||m.t==="any");let[h,p]=cu(a);this.#m=h,this.#c=p}}test(t){return this.#y?(Pc(t),this.#p(t.normalize(this.#y))):Am.test(t)?(Pc(t),this.#p(t,[...t])):this.#p(t,t)}testUnchecked(t){return this.#p(this.#y?t.normalize(this.#y):t)}#p(t,e){if(this.#s!==void 0)return this.#d?(this.#f??=nu(this.#s)).test(t):t===this.#s;let r=this.#m,n=this.#c;if(e===void 0){let c=t.length,f=c+1>>1;if(c<r||f>n)return!1;(f<r||c>n)&&(e=An(t))}if(e!==void 0&&(e.length<r||e.length>n))return!1;let i=this.#l.length;if(this.#b)if(this.#_!==void 0&&this.#x!==void 0){if(!t.startsWith(this.#_)||!t.endsWith(this.#x))return!1}else{e??=An(t);let c=e.length-this.#r.length;if(!Oc(this.#l,e,0)||!Oc(this.#r,e,c))return!1}let s=!this.options.dot&&t.startsWith(".");if(this.#h){if(t==="."||t===".."||s&&!i)return!1;if(this.#a)return!0;e??=An(t);let c=e.length-this.#r.length;return Em(this.#h,e,i,c)}if(e??=An(t),t==="."||t===".."){this.#n??=Ac(this.#i);let c=this.#o??=new go(!0,!1,this.#n),f=c.state();c.add(f,this.#e,0,!0);let h=c.done(f);for(let p=0;p<e.length;p++)h=c.step(h,e[p],p,!0);return h.match}this.#n??=Ac(this.#i);let o=this.#g??=new xm(this.#e,this.#n),a=o.start(s),l=e===t;for(let c=0;c<e.length;c++){if(a.dead)return!1;let f=l?t.charCodeAt(c):e[c].charCodeAt(0);a=a.ascii?.[f]??o.next(a,e[c])}return a.match}toString(){return wm(this.#e)}},$n=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},Co=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!1}={})=>r?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),uu=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!0}={})=>r?e?t.replace(/\[([^/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?t.replace(/\[([^/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1"),De=(t,e,r={})=>($n(e),!r.nocomment&&e.charAt(0)==="#"?!1:Tm(e,r).match(t)),Gt=new Map,Pm=256,Tm=(t,e)=>{let r=t+"\0"+JSON.stringify(e),n=Gt.get(r);return n?Gt.delete(r):(n=new Rt(t,{...e}),Gt.size>=Pm&&Gt.delete(Gt.keys().next().value)),Gt.set(r,n),n},hu=typeof process=="object"&&process?process.env?.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Dc={win32:{sep:"\\"},posix:{sep:"/"}},Dm=hu==="win32"?Dc.win32.sep:Dc.posix.sep;De.sep=Dm;var se=Symbol("globstar **");De.GLOBSTAR=se;var Im=(t,e={})=>r=>De(r,t,e);De.filter=Im;var lt=(t,e={})=>Object.assign({},t,e),Rm=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return De;let e=De;return Object.assign((r,n,i={})=>e(r,n,lt(t,i)),{Minimatch:class extends e.Minimatch{constructor(r,n={}){super(r,lt(t,n))}static defaults(r){return e.defaults(lt(t,r)).Minimatch}},unescape:(r,n={})=>e.unescape(r,lt(t,n)),escape:(r,n={})=>e.escape(r,lt(t,n)),filter:(r,n={})=>e.filter(r,lt(t,n)),defaults:r=>e.defaults(lt(t,r)),braceExpand:(r,n={})=>e.braceExpand(r,lt(t,n)),match:(r,n,i={})=>e.match(r,n,lt(t,i)),sep:e.sep,GLOBSTAR:se})};De.defaults=Rm;var yo=(t,e={})=>($n(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:om(t,{max:e.braceExpandMax}));De.braceExpand=yo;var Lm=100,Nm=/(?<![\\$])\{(-?\d+)\.\.(-?\d+)\}/g,Mm=(t,e,r={})=>{let n=new Rt(e,r);return t=t.filter(i=>n.match(i)),n.options.nonull&&!t.length&&t.push(e),t};De.match=Mm;var Ic=/[?*]|[+@!]\(.*?\)|\[|\]/,fu=(t,e)=>{let r=e+1;(t.charAt(r)==="!"||t.charAt(r)==="^")&&r++;let n=!1;for(;r<t.length;r++){let i=t.charAt(r);if(i==="]"&&n)return r;n=!0,i==="\\"&&r++}return-1},Fm=(t,e)=>{if(!e&&(t==="+()"||t==="@()"))return t;let r="";for(let n=0;n<t.length;n++){let i=t.charAt(n);if(i==="\\")r+=t.charAt(++n)||i;else{if(i==="*"||i==="?")return;if(i==="["){let s=fu(t,n);if(s===-1){r+=i;continue}let o=t.slice(n+1,s);if(o.startsWith("\\")&&(o=o.slice(1)),[...o].length!==1||"!^".includes(t.charAt(n+1)))return;r+=o,n=s}else{if(!e&&"+@!".includes(i)&&t.charAt(n+1)==="("&&t.includes(")",n+2))return;r+=i}}}return r},Bm=t=>{if(/^[?*+@]\(\)$/.test(t)||t.includes("[:"))return!1;let e=0;for(let r=0;r<t.length;r++){let n=t.charAt(r);if(n==="\\"){if(++r===t.length)return!1}else if(n==="["){let i=fu(t,r);i!==-1&&(r=i)}else if("+@!?*".includes(n)&&t.charAt(r+1)==="(")e++,r++;else if(n===")"){if(!e--)return!1}else if(n==="|"&&!e)return!1}return!e},eo,Rc,Ct=(t,e)=>typeof t=="string"?e===t:e!==""&&t.testUnchecked(e),Lc=(t,e,r,n,i)=>Ct(t,e)?r:n!==void 0&&Ct(t,n)?i:-1,_o=t=>t==="."||t==="..",to=t=>typeof t=="string"&&/^[a-z]:$/i.test(t),Bn=t=>typeof t=="string"&&/^unc$/i.test(t),ro=t=>{if(t[0]!==""||t[1]!=="")return-1;let e=t[2]!=="?"?2:Bn(t[3])?4:-1,r=t[e],n=t[e+1];return e!==-1&&r!==void 0&&r!==""&&r!==se&&n!==void 0&&n!==""&&n!==se?e:-1},On=(t,e)=>!_o(t)&&(e||!t.startsWith(".")),Cr=(t,e,r,n,i)=>{for(let s=e;s<r;){if(t.charCodeAt(s)===46){if(!n)return!0;let a=t.charCodeAt(s+1)===46?s+2:s+1;if(a>=r||jn(t.charCodeAt(a),i))return!0}let o=bo(t,s,i);if(o===-1)return!1;for(s=o+1;s<r&&jn(t.charCodeAt(s),i);)s++}return!1},jn=(t,e)=>e==="/"?t===47:e==="\\"?t===92:t===47||t===92,bo=(t,e,r)=>{if(r!=="both")return t.indexOf(r,e);let n=t.indexOf("/",e),i=t.indexOf("\\",e);return n===-1?i:i===-1?n:Math.min(n,i)},Nc=(t,e,r)=>r!=="both"?t.lastIndexOf(r,e):Math.max(t.lastIndexOf("/",e),t.lastIndexOf("\\",e)),no={},Rt=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;#e;#i;#n;#o;#s=[];#d=[];#f=[];#h=new Map;#a=!1;#m;#c=new WeakMap;constructor(t,e={}){$n(t),e=e||{},this.options=e,this.maxGlobstarRecursion=e.maxGlobstarRecursion??200,this.pattern=t,this.platform=e.platform||hu,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.#e=!this.preserveMultipleSlashes,this.#n=(e.optimizationLevel??1)>=2;let n=e.normalize;this.#o=n===!0?"NFC":n||void 0,this.make();let i=this.set.map(s=>this.#r(s));this.#f=this.set.map((s,o)=>this.#e&&s.length-1>i[o]),this.#s=this.set.map((s,o)=>{let a=this.#f[o]?s.length-1:s.length,l=s.slice(i[o]+1,a).filter(c=>typeof c=="string"&&!!c);return[...new Set(l)]}),this.#i=this.#s.some(s=>s.length),this.#d=this.set.map((s,o)=>{let[a,l,c]=s;if(this.#f[o]&&s.length===2&&a===se&&l!==se)return"tail";if(this.#f[o]&&e.matchBase&&s.length===1&&a!==se&&a!=="")return"base";if(!(!this.#e||i[o]!==-1)){if(s.length===3&&a===se&&c===se&&l!==se&&l!==""&&this.maxGlobstarRecursion>0)return"mid";if(s.length===2&&l===se&&a!==se&&a!=="")return"head"}})}#l(t){return this.#o?t.normalize(this.#o):t}#r(t){if(!this.isWindows)return-1;if(to(t[0]))return 0;if(t[0]===""&&t[1]===""&&t[2]==="?"&&to(t[3]))return 3;let e=ro(t);return e===-1?-1:e+1}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let e of t)if(typeof e!="string")return!0;return!1}make(){let t=this.pattern,e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.#A())];let r=this.globSet.map(i=>this.#t(i));this.globParts=this.preprocess(r),this.#a=!0;let n=this.globParts.map((i,s,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=i[2]==="?"&&Bn(i[3])?6:4,l=i[0]===""&&i[1]===""&&(i[2]==="?"||!Ic.test(i[2]))&&i.slice(3,a).every(f=>!Ic.test(f)),c=/^[a-z]:/i.test(i[0]);if(l)return[...i.slice(0,a).map(f=>this.#l(f)),...i.slice(a).map(f=>this.parse(f))];if(c)return[this.#l(i[0]),...i.slice(1).map(f=>this.parse(f))]}return i.map(a=>this.parse(a))});if(this.set=n.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){let s=this.set[i];s[0]===""&&s[1]===""&&this.globParts[i][2]==="?"&&(to(s[3])||Bn(this.globParts[i][3]))&&(Bn(this.globParts[i][3])&&(s[3]="UNC"),s[2]="?")}e.noext||this.mergeRows(),this.#a=!1,this.set.forEach((i,s)=>{for(let o=0;o<i.length;o++)i[o]===no&&(i[o]=this.parse(this.globParts[s][o]))})}mergeRows(){let t=!0;for(;t;){t=!1;let e=Math.max(0,...this.set.map(r=>r.length));for(let r=0;r<e;r++){let n=new Map;this.set.forEach((s,o)=>{if(!(s[r]instanceof Tc||s[r]===no)||!Bm(this.globParts[o][r]))return;let a=[...this.globParts[o]];a[r]="";let l=`${s.length}/${a.join("/")}`,c=n.get(l);c?c.push(o):n.set(l,[o])});let i=new Set;for(let s of n.values()){if(s.length<2)continue;let[o,...a]=s,l=`@(${s.map(c=>this.globParts[c][r]).join("|")})`;this.globParts[o][r]=l,this.set[o][r]=this.parse(l);for(let c of a)i.add(c)}i.size&&(t=!0,this.set=this.set.filter((s,o)=>!i.has(o)),this.globParts=this.globParts.filter((s,o)=>!i.has(o)))}}}preprocess(t){if(this.options.noglobstar)for(let r of t)for(let n=0;n<r.length;n++)r[n]==="**"&&(r[n]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):e>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(e=>{let r=-1;for(;(r=e.indexOf("**",r+1))!==-1;){let n=r;for(;e[n+1]==="**";)n++;n!==r&&e.splice(r,n-r)}return e})}levelOneOptimize(t){return t.map(e=>{let r=this.#r(e)+1;return e=e.reduce((n,i)=>{let s=n[n.length-1];return i==="**"&&s==="**"?n:i===".."&&n.length>r&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(i),n)},[]),e.length===0?[""]:e})}#_(t){let e=!this.isWindows||!t.includes("\\")?"/":t.includes("/")?"both":"\\",r=this.#e?0:-1,n="",i=0,s,o=0,a=!!this.options.dot;e:for(let l=0;l<this.set.length;l++){let c=this.set[l],f=c[c.length-1],h=r!==-1&&this.#f[l]&&f!==se;if(h&&r===0){let g=Nc(t,t.length,e);if(i=g+1,n=t.slice(i),n===""&&g>=0){let O=g;for(;O>0&&jn(t.charCodeAt(O-1),e);)O--;o=O===0?0:Nc(t,O-1,e)+1,s=t.slice(o,O)}let _=this.#n&&(_o(n)||n===""&&s!==void 0&&_o(s));r=_?-1:1,h=!_}let p=-1;if(h&&typeof f=="string"&&(p=Lc(f,n,i,s,o),p===-1))continue;if(this.#i){for(let g of this.#s[l])if(!t.includes(g))continue e}if(h&&typeof f=="object"&&(p=Lc(f,n,i,s,o),p===-1))continue;let m=this.#d[l];if(m==="base"&&h)return"yes";if(m==="tail"&&h){if(this.#n&&Cr(t,0,p,!0,e))return"maybe";if(!Cr(t,0,p,a,e))return"yes";continue}if(m==="mid"||m==="head"){let g=this.#b(t,c,m==="head",a,e);if(g!=="no")return g;continue}return"maybe"}return"no"}#x(t,e,r){let n=!!this.options.dot,i=t.length;if(r==="head"){if(i<2||!Ct(e[0],t[0]))return!1;for(let o=1;o<i;o++)if(!On(t[o],n))return!1;return!0}let s=e[1];if(r==="tail"){let o=i-1;if(!Ct(s,t[o])&&(t[o]!==""||i===1||!Ct(s,t[--o])))return!1;for(let a=0;a<o;a++)if(!On(t[a],n))return!1;return!0}for(let o=0;o<i;o++){if(Ct(s,t[o])&&o+1<i){let a=o+1;for(;a<i&&On(t[a],n);)a++;if(a===i)return!0}if(!On(t[o],n))return!1}return!1}#b(t,e,r,n,i){if(this.#n&&Cr(t,0,t.length,!0,i))return"maybe";let s=e[r?0:1],o=0;for(let a=bo(t,o,i);a!==-1;a=bo(t,o,i)){let l=a+1;for(;l<t.length&&jn(t.charCodeAt(l),i);)l++;if((typeof s=="string"?a-o===s.length&&t.startsWith(s,o):a>o&&s.testUnchecked(t.slice(o,a)))&&!Cr(t,l,t.length,n,i))return"yes";if(r||Cr(t,o,l,n,i))return"no";o=l}return"no"}#g(t){let e=eo;return e?.f===t&&e.isWindows===this.isWindows&&e.preserveMultipleSlashes===this.preserveMultipleSlashes&&e.normalize===this.#o?e:void 0}#y(t){let{isWindows:e,preserveMultipleSlashes:r}=this,n=this.#t(e?t.split("\\").join("/"):t),i=this.#o;return i&&(n=n.map(s=>s.normalize(i))),eo={f:t,isWindows:e,preserveMultipleSlashes:r,normalize:i,parts:n},eo}#p(t){let e=[...t],r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let s=1;s<e.length-1;s++){let o=e[s];s===1&&o===""&&e[0]===""||(o==="."||o==="")&&(r=!0,e.splice(s,1),s--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let n=this.#r(e)+1,i=n;for(;(i=e.indexOf("..",i+1))!==-1;){let s=e[i-1];s&&s!=="."&&s!==".."&&s!=="**"&&(r=!0,e.splice(i-1,2),i=Math.max(i-2,n))}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(t){let{braceExpandMax:e=1e5}=this.options,r=0,n=1e6,i=!1;do{i=!1;for(let s of t){let o=-1;for(;(o=s.indexOf("**",o+1))!==-1;){let c=o;for(;s[c+1]==="**";)c++;c>o&&s.splice(o+1,c-o);let f=s[o+1],h=s[o+2],p=s[o+3];if(f!==".."||!h||h==="."||h===".."||!p||p==="."||p==="..")continue;let m=s.length-1;if(t.length>=e||r+m>n)throw new RangeError("optimizationLevel 2: too many patterns from '**/..'");i=!0,s.splice(o,1);let g=s.slice(0);g[o]="**",r+=m,t.push(g),o--}if(!this.preserveMultipleSlashes){for(let c=1;c<s.length-1;c++){let f=s[c];c===1&&f===""&&s[0]===""||(f==="."||f==="")&&(i=!0,s.splice(c,1),c--)}s[0]==="."&&s.length===2&&(s[1]==="."||s[1]==="")&&(i=!0,s.pop())}let a=this.#r(s)+1,l=a;for(;(l=s.indexOf("..",l+1))!==-1;){let c=s[l-1];if(c&&c!=="."&&c!==".."&&c!=="**"){i=!0;let f=l===1&&s[l+1]==="**"?["."]:[];s.splice(l-1,2,...f),s.length===0&&s.push(""),l=Math.max(l-2,a)}}}}while(i);return t}secondPhasePreProcess(t){let e=new Set,r=t.filter(s=>{let o=s.join("/");return e.has(o)?!1:(e.add(o),!0)}),n=new Map;for(let s of r){let o=[];for(let a=0;a<s.length;a++)s[a]==="*"&&o.push(a);o.length&&n.set(o.join(","),o)}if(!n.size||r.length*n.size>1e5)return r;let{dot:i}=this.options;return r.filter(s=>{for(let o of n.values()){if(o[o.length-1]>=s.length)continue;let a=[...s],l=!0,c=!1;for(let f of o){let h=s[f];if(h!=="*"){if(!h||h==="**"||!i&&h.startsWith(".")){l=!1;break}a[f]="*",c=!0}}if(l&&c&&e.has(a.join("/")))return!1}return!0})}parseNegate(){if(this.nonegate)return;let t=this.pattern,e=!1,r=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)e=!e,r++;r&&(this.pattern=t.slice(r)),this.negate=e}#C(t,e,r,n){let i=0,s=0,o=this.isWindows?ro(e):-1,a=o===-1?-1:ro(r);if(a!==-1){let l=r[a],c=r[a+1];typeof l!="string"||typeof c!="string"?(i=o,s=a):e[o].toLowerCase()===l.toLowerCase()&&e[o+1].toLowerCase()===c.toLowerCase()&&(i=o+2,s=a+2)}else if(this.isWindows){let l=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),c=!l&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),f=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),h=!f&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),p=c?3:l?0:void 0,m=h?3:f?0:void 0;if(typeof p=="number"&&typeof m=="number"){let[g,_]=[t[p],r[m]];g.toLowerCase()===_.toLowerCase()&&(s=m+1,i=p+1)}}return t=e,r.includes(se)?this.#E(t,r,n,i,s):this.#w(t,r,n,i,s)}#E(t,e,r,n,i){let{head:s,body:o,tail:a,segments:l}=this.#v(e,r,i);if(s.length){let f=n+s.length;if(!this.#w(t,s,r,n,0,f))return!1;n+=s.length,i+=s.length}let c=0;if(a.length){if(a.length+n>t.length)return!1;let f=t.length-a.length;if(this.#w(t,a,r,f,0))c=a.length;else{if(t[t.length-1]!==""||n+a.length===t.length||(f--,!this.#w(t,a,r,f,0)))return!1;c=a.length+1}}if(!o.length){let f=!!c;for(let h=n;h<t.length-c;h++){let p=String(t[h]);if(f=!0,p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return r||f}return!!this.#S(t,l,t.length-c,n,0,r,0,!!c,new Set)}#v(t,e,r){let n=this.#c.get(t);n||(n=[],this.#c.set(t,n));let i=r*2+(e?1:0),s=n[i];if(s)return s;let o=t.indexOf(se,r),a=t.lastIndexOf(se),l=t.slice(r,o),c=t.slice(o+1,e?void 0:a),f=e?[]:t.slice(a+1),h=[[[],0]],p=h[0],m=0,g=[0];for(let O of c)O===se?(g.push(m),p=[[],0],h.push(p)):(p[0].push(O),m++);h.forEach((O,b)=>{O[1]=m-g[b]});let _={head:l,body:c,tail:f,segments:h};return n[i]=_,_}#S(t,e,r,n,i,s,o,a,l){let c=e[i];if(!c){if(s)return n>=r||n===r-1&&t[n]==="";for(let m=n;m<r;m++){a=!0;let g=t[m];if(g==="."||g===".."||!this.options.dot&&g.startsWith("."))return!1}return a}let[f,h]=c,p=s?r:r-h;for(;n<=p;){let m=i*(t.length+1)+n;if(l.has(m))return!1;if(l.add(m),this.#w(t,f,s,n,0,n+f.length)&&o<this.maxGlobstarRecursion){let _=this.#S(t,e,r,n+f.length,i+1,s,o+1,a,l);if(_!==!1)return _}if(n===p)break;let g=t[n];if(g==="."||g===".."||!this.options.dot&&g.startsWith("."))return!1;n++}return s||null}#w(t,e,r,n,i,s=t.length){let o,a,l,c;for(o=n,a=i,c=Math.min(s,t.length),l=e.length;o<c&&a<l;o++,a++){let f=e[a],h=t[o];if(f===!1||f===se||!Ct(f,h))return!1}if(o===c&&a===l)return!0;if(o===c)return r;if(a===l)return o===c-1&&t[o]==="";throw new Error("wtf?")}braceExpand(){return yo(this.pattern,this.options)}#A(){let{pattern:t}=this;if(this.options.nobrace)return this.braceExpand();let e=57344;for(;t.includes(String.fromCharCode(e));)if(++e>63743)return this.braceExpand();let r=String.fromCharCode(e),n=!1,i=t.replace(Nm,(o,a,l)=>{let c=Number(a),f=Number(l);return!Number.isSafeInteger(c)||!Number.isSafeInteger(f)||Math.abs(c-f)+1<Lm?o:(n=!0,`${r}${a}..${l}${r}`)});if(!n)return this.braceExpand();let s=yo(i,this.options);for(let o of s)for(let a of o.split("/")){let l=a.indexOf("[");if(l!==-1&&l<a.lastIndexOf(r))return this.braceExpand()}return this.#m=r,s}parse(t){$n(t);let e=this.options;if(t==="**")return se;if(t==="")return"";let{nocase:r,nocaseMagicOnly:n,noext:i=!1,dot:s,normalize:o}=e,a=this.#m,l=a&&t.includes(a)?void 0:Fm(t,i);if(l!==void 0&&!(r&&!n&&t.toUpperCase()!==t.toLowerCase()))return this.#l(l);if(this.#a)return no;let c=this.#h.get(t);return c||(c=new Tc(t,{nocase:r,noext:i,dot:s,normalize:o,...a&&{rangeMark:a}}),this.#h.set(t,c)),c}#t(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&e)return!0;let r=this.options,n=this.#g(t);if(!n){if(!e&&!this.#o&&(this.#e||this.#i)&&Rc!==t){Rc=t;let l=this.#_(t);if(l==="no")return r.flipNegate?!1:this.negate;if(l==="yes")return r.flipNegate?!0:!this.negate}n=this.#y(t)}let i=n.parts,s=this.#n?n.resolved??=this.#p(i):i,o=this.set,a=i[i.length-1];if(!a)for(let l=i.length-2;!a&&l>=0;l--)a=i[l];for(let l=0;l<o.length;l++){let c=o[l],f=e?void 0:this.#d[l];if(f==="base"?Ct(c[0],a):f?this.#x(s,c,f):r.matchBase&&c.length===1?this.#C([a],[a],c,e):this.#C(i,s,c,e))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return De.defaults(t).Minimatch}};De.Minimatch=Rt;De.escape=Co;De.unescape=uu;var me=$m("lru-cache:metrics"),Tr=Hm("lru-cache"),jm=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,io=()=>me.hasSubscribers||Tr.hasSubscribers,du=new Set,Mc=typeof process=="object"&&process?process:{},Wm=(t,e,r,n)=>{typeof Mc.emitWarning=="function"?Mc.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)},Vm=t=>!du.has(t),xt=t=>!!t&&t===Math.floor(t)&&t>0&&isFinite(t),pu=t=>xt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?qn:null:null,qn=class extends Array{constructor(t){super(t),this.fill(0)}},zm=class Dr{heap;length;static#e=!1;static create(e){let r=pu(e);if(!r)return[];Dr.#e=!0;let n=new Dr(e,r);return Dr.#e=!1,n}constructor(e,r){if(!Dr.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Vn=class mu{#e;#i;#n;#o;#s;#d;#f;#h;get perf(){return this.#h}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#a;#m;#c;#l;#r;#_;#x;#b;#g;#y;#p;#C;#E;#v;#S;#w;#A;#t;#D;static unsafeExposeInternals(e){return{starts:e.#E,ttls:e.#v,autopurgeTimers:e.#S,sizes:e.#C,keyMap:e.#c,keyList:e.#l,valList:e.#r,next:e.#_,prev:e.#x,get head(){return e.#b},get tail(){return e.#g},free:e.#y,isBackgroundFetch:r=>e.#u(r),backgroundFetch:(r,n,i,s)=>e.#F(r,n,i,s),moveToTail:r=>e.#Y(r),indexes:r=>e.#P(r),rindexes:r=>e.#T(r),isStale:r=>e.#k(r)}}get max(){return this.#e}get maxSize(){return this.#i}get calculatedSize(){return this.#m}get size(){return this.#a}get fetchMethod(){return this.#d}get memoMethod(){return this.#f}get dispose(){return this.#n}get onInsert(){return this.#o}get disposeAfter(){return this.#s}constructor(e){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:c,onInsert:f,disposeAfter:h,noDisposeOnSet:p,noUpdateTTL:m,maxSize:g=0,maxEntrySize:_=0,sizeCalculation:O,fetchMethod:b,memoMethod:S,noDeleteOnFetchRejection:I,noDeleteOnStaleGet:L,allowStaleOnFetchRejection:N,allowStaleOnFetchAbort:z,ignoreFetchAbort:U,backgroundFetchSize:$=1,perf:Q}=e;if(this.backgroundFetchSize=$,Q!==void 0&&typeof Q?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#h=Q??jm,r!==0&&!xt(r))throw new TypeError("max option must be a nonnegative integer");let ee=r?pu(r):Array;if(!ee)throw new Error("invalid max value: "+r);if(this.#e=r,this.#i=g,this.maxEntrySize=_||this.#i,this.sizeCalculation=O,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.#f=S,b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#d=b,this.#A=!!b,this.#c=new Map,this.#l=Array.from({length:r}).fill(void 0),this.#r=Array.from({length:r}).fill(void 0),this.#_=new ee(r),this.#x=new ee(r),this.#b=0,this.#g=0,this.#y=zm.create(r),this.#a=0,this.#m=0,typeof c=="function"&&(this.#n=c),typeof f=="function"&&(this.#o=f),typeof h=="function"?(this.#s=h,this.#p=[]):(this.#s=void 0,this.#p=void 0),this.#w=!!this.#n,this.#D=!!this.#o,this.#t=!!this.#s,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!I,this.allowStaleOnFetchRejection=!!N,this.allowStaleOnFetchAbort=!!z,this.ignoreFetchAbort=!!U,this.maxEntrySize!==0){if(this.#i!==0&&!xt(this.#i))throw new TypeError("maxSize must be a positive integer if specified");if(!xt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#V()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!L,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=xt(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!xt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#I()}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 ue="LRU_CACHE_UNBOUNDED";Vm(ue)&&(du.add(ue),Wm("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",ue,mu))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#I(){let e=new qn(this.#e),r=new qn(this.#e);this.#v=e,this.#E=r;let n=this.ttlAutopurge?Array.from({length:this.#e}):void 0;this.#S=n,this.#q=(l,c,f=this.#h.now())=>{r[l]=c!==0?f:0,e[l]=c,i(l,c)},this.#O=l=>{r[l]=e[l]!==0?this.#h.now():0,i(l,e[l])};let i=this.ttlAutopurge?(l,c)=>{if(n?.[l]&&(clearTimeout(n[l]),n[l]=void 0),c&&c!==0&&n){let f=setTimeout(()=>{this.#k(l)?(this.#B(this.#l[l],"expire"),n[l]=void 0):i(l,a(l))},c+1);f.unref&&f.unref(),n[l]=f}}:()=>{};this.#R=(l,c)=>{if(e[c]){let f=e[c],h=r[c];if(!f||!h)return;l.ttl=f,l.start=h,l.now=s||o();let p=l.now-h;l.remainingTTL=f-p}};let s=0,o=()=>{let l=this.#h.now();if(this.ttlResolution>0){s=l;let c=setTimeout(()=>s=0,this.ttlResolution);c.unref&&c.unref()}return l};this.getRemainingTTL=l=>{let c=this.#c.get(l);return c===void 0?0:a(c)};let a=l=>{let c=e[l],f=r[l];if(!c||!f)return 1/0;let h=(s||o())-f;return c-h};this.#k=l=>{let c=r[l],f=e[l];return!!f&&!!c&&(s||o())-c>f}}#O=()=>{};#R=()=>{};#q=()=>{};#k=()=>!1;#V(){let e=new qn(this.#e);this.#m=0,this.#C=e,this.#N=r=>{this.#m-=e[r],e[r]=0},this.#H=(r,n,i,s)=>{if(!xt(i)){if(this.#u(n))return this.backgroundFetchSize;if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(i=s(n,r),!xt(i))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 i},this.#L=(r,n,i)=>{if(e[r]=n,this.#i){let s=this.#i-e[r];for(;this.#m>s;)this.#W(!0)}this.#m+=e[r],i&&(i.entrySize=n,i.totalCalculatedSize=this.#m)}}#N=e=>{};#L=(e,r,n)=>{};#H=(e,r,n,i)=>{if(n||i)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 r=this.#g;this.#$(r)&&((e||!this.#k(r))&&(yield r),r!==this.#b);)r=this.#x[r]}*#T({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#b;this.#$(r)&&((e||!this.#k(r))&&(yield r),r!==this.#g);)r=this.#_[r]}#$(e){return e!==void 0&&this.#c.get(this.#l[e])===e}*entries(){for(let e of this.#P())this.#r[e]!==void 0&&this.#l[e]!==void 0&&!this.#u(this.#r[e])&&(yield[this.#l[e],this.#r[e]])}*rentries(){for(let e of this.#T())this.#r[e]!==void 0&&this.#l[e]!==void 0&&!this.#u(this.#r[e])&&(yield[this.#l[e],this.#r[e]])}*keys(){for(let e of this.#P()){let r=this.#l[e];r!==void 0&&!this.#u(this.#r[e])&&(yield r)}}*rkeys(){for(let e of this.#T()){let r=this.#l[e];r!==void 0&&!this.#u(this.#r[e])&&(yield r)}}*values(){for(let e of this.#P())this.#r[e]!==void 0&&!this.#u(this.#r[e])&&(yield this.#r[e])}*rvalues(){for(let e of this.#T())this.#r[e]!==void 0&&!this.#u(this.#r[e])&&(yield this.#r[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let n of this.#P()){let i=this.#r[n],s=this.#u(i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,this.#l[n],this))return this.#G(this.#l[n],r)}}forEach(e,r=this){for(let n of this.#P()){let i=this.#r[n],s=this.#u(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(r,s,this.#l[n],this)}}rforEach(e,r=this){for(let n of this.#T()){let i=this.#r[n],s=this.#u(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(r,s,this.#l[n],this)}}purgeStale(){let e=!1;for(let r of this.#T({allowStale:!0}))this.#k(r)&&(this.#B(this.#l[r],"expire"),e=!0);return e}info(e){let r=this.#c.get(e);if(r===void 0)return;let n=this.#r[r],i=this.#u(n)?n.__staleWhileFetching:n;if(i===void 0)return;let s={value:i};if(this.#v&&this.#E){let o=this.#v[r],a=this.#E[r];if(o&&a){let l=o-(this.#h.now()-a);s.ttl=l,s.start=Date.now()}}return this.#C&&(s.size=this.#C[r]),s}dump(){let e=[];for(let r of this.#P({allowStale:!0})){let n=this.#l[r],i=this.#r[r],s=this.#u(i)?i.__staleWhileFetching:i;if(s===void 0||n===void 0)continue;let o={value:s};if(this.#v&&this.#E){o.ttl=this.#v[r];let a=this.#h.now()-this.#E[r];o.start=Math.floor(Date.now()-a)}this.#C&&(o.size=this.#C[r]),e.unshift([n,o])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let i=Date.now()-n.start;n.start=this.#h.now()-i}this.#M(r,n.value,n)}}set(e,r,n={}){let{status:i=me.hasSubscribers?{}:void 0}=n;n.status=i,i&&(i.op="set",i.key=e,r!==void 0&&(i.value=r),i.cache=this);let s=this.#M(e,r,n);return i&&me.hasSubscribers&&me.publish(i),s}#M(e,r,n,i){let{ttl:s=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:c}=n,f=this.#u(r);if(r===void 0)return c&&(c.set="deleted"),this.delete(e),this;let{noUpdateTTL:h=this.noUpdateTTL}=n;c&&!f&&(c.value=r);let p=this.#H(e,r,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.#c.get(e);if(m===void 0)m=this.#a===0?this.#g:this.#y.length!==0?this.#y.pop():this.#a===this.#e?this.#W(!1):this.#a,this.#l[m]=e,this.#r[m]=r,this.#c.set(e,m),this.#_[this.#g]=m,this.#x[m]=this.#g,this.#g=m,this.#a++,this.#L(m,p,c),c&&(c.set="add"),h=!1,this.#D&&!f&&this.#o?.(r,e,"add");else{this.#Y(m);let g=this.#r[m];if(r!==g){if(!a)if(this.#u(g)){g!==i&&g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:_}=g;_!==void 0&&_!==r&&(this.#w&&this.#n?.(_,e,"set"),this.#t&&this.#p?.push([_,e,"set"]))}else this.#w&&this.#n?.(g,e,"set"),this.#t&&this.#p?.push([g,e,"set"]);if(this.#N(m),this.#L(m,p,c),this.#r[m]=r,!f){let _=g&&this.#u(g)?g.__staleWhileFetching:g,O=_===void 0?"add":r!==_?"replace":"update";c&&(c.set=O,_!==void 0&&(c.oldValue=_)),this.#D&&this.onInsert?.(r,e,O)}}else f||(c&&(c.set="update"),this.#D&&this.onInsert?.(r,e,"update"))}if(s!==0&&!this.#v&&this.#I(),this.#v&&(h||this.#q(m,s,o),c&&this.#R(c,m)),!a&&this.#t&&this.#p){let g=this.#p,_;for(;_=g?.shift();)this.#s?.(..._)}return this}pop(){try{for(;this.#a;){let e=this.#r[this.#b];if(this.#W(!0),this.#u(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#t&&this.#p){let e=this.#p,r;for(;r=e?.shift();)this.#s?.(...r)}}}#W(e){let r=this.#b,n=this.#l[r],i=this.#r[r],s=this.#u(i);s&&i.__abortController.abort(new Error("evicted"));let o=s?i.__staleWhileFetching:i;return(this.#w||this.#t)&&o!==void 0&&(this.#w&&this.#n?.(o,n,"evict"),this.#t&&this.#p?.push([o,n,"evict"])),this.#N(r),this.#S?.[r]&&(clearTimeout(this.#S[r]),this.#S[r]=void 0),e&&(this.#l[r]=void 0,this.#r[r]=void 0,this.#y.push(r)),this.#a===1?(this.#b=this.#g=0,this.#y.length=0):this.#b=this.#_[r],this.#c.delete(n),this.#a--,r}has(e,r={}){let{status:n=me.hasSubscribers?{}:void 0}=r;r.status=n,n&&(n.op="has",n.key=e,n.cache=this);let i=this.#K(e,r);return me.hasSubscribers&&me.publish(n),i}#K(e,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,s=this.#c.get(e);if(s!==void 0){let o=this.#r[s];if(this.#u(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#k(s))i&&(i.has="stale",this.#R(i,s));else return n&&this.#O(s),i&&(i.has="hit",this.#R(i,s)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){let{status:n=io()?{}:void 0}=r;n&&(n.op="peek",n.key=e,n.cache=this),r.status=n;let i=this.#z(e,r);return me.hasSubscribers&&me.publish(n),i}#z(e,r){let{status:n,allowStale:i=this.allowStale}=r,s=this.#c.get(e);if(s===void 0||!i&&this.#k(s)){n&&(n.peek=s===void 0?"miss":"stale");return}let o=this.#r[s],a=this.#u(o)?o.__staleWhileFetching:o;return n&&(a!==void 0?(n.peek="hit",n.value=a):n.peek="miss"),a}#F(e,r,n,i){let s=r===void 0?void 0:this.#r[r];if(this.#u(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:i},c=(_,O=!1)=>{let{aborted:b}=o.signal,S=n.ignoreFetchAbort&&_!==void 0,I=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&_!==void 0);if(n.status&&(b&&!O?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,S&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),b&&!S&&!O)return h(o.signal.reason,I);let L=m,N=this.#r[r];return(N===m||N===void 0&&S&&O)&&(_===void 0?L.__staleWhileFetching!==void 0?this.#r[r]=L.__staleWhileFetching:this.#B(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#M(e,_,l.options,L))),_},f=_=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=_),h(_,!1)),h=(_,O)=>{let{aborted:b}=o.signal,S=b&&n.allowStaleOnFetchAbort,I=S||n.allowStaleOnFetchRejection,L=I||n.noDeleteOnFetchRejection,N=m;if(this.#r[r]===m&&(!L||!O&&N.__staleWhileFetching===void 0?this.#B(e,"fetch"):S||(this.#r[r]=N.__staleWhileFetching)),I)return n.status&&N.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),N.__staleWhileFetching;if(N.__returned===N)throw _},p=(_,O)=>{let b=this.#d?.(e,s,l);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(_(void 0),n.allowStaleOnFetchAbort&&(_=S=>c(S,!0)))}),b&&b instanceof Promise?b.then(S=>_(S===void 0?void 0:S),O):b!==void 0&&_(b)};n.status&&(n.status.fetchDispatched=!0);let m=new Promise(p).then(c,f),g=Object.assign(m,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.#M(e,g,{...l.options,status:void 0}),r=this.#c.get(e)):this.#r[r]=g,g}#u(e){if(!this.#A)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof AbortController}fetch(e,r={}){let n=Tr.hasSubscribers,{status:i=io()?{}:void 0}=r;r.status=i,i&&r.context&&(i.context=r.context);let s=this.#U(e,r);return i&&n&&(i.trace=!0,Tr.tracePromise(()=>s,i).catch(()=>{})),s}async#U(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=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:g=this.allowStaleOnFetchAbort,context:_,forceRefresh:O=!1,status:b,signal:S}=r;if(b&&(b.op="fetch",b.key=e,O&&(b.forceRefresh=!0),b.cache=this),!this.#A)return b&&(b.fetch="get"),this.#G(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:b});let I={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:c,noUpdateTTL:f,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:g,ignoreFetchAbort:m,status:b,signal:S},L=this.#c.get(e);if(L===void 0){b&&(b.fetch="miss");let N=this.#F(e,L,I,_);return N.__returned=N}else{let N=this.#r[L];if(this.#u(N)){let Q=n&&N.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",Q&&(b.returnedStale=!0)),Q?N.__staleWhileFetching:N.__returned=N}let z=this.#k(L);if(!O&&!z)return b&&(b.fetch="hit"),this.#Y(L),i&&this.#O(L),b&&this.#R(b,L),N;let U=this.#F(e,L,I,_),$=U.__staleWhileFetching!==void 0&&n;return b&&(b.fetch=z?"stale":"refresh",$&&z&&(b.returnedStale=!0)),$?U.__staleWhileFetching:U.__returned=U}}forceFetch(e,r={}){let n=Tr.hasSubscribers,{status:i=io()?{}:void 0}=r;r.status=i,i&&r.context&&(i.context=r.context);let s=this.#j(e,r);return i&&n&&(i.trace=!0,Tr.tracePromise(()=>s,i).catch(()=>{})),s}async#j(e,r={}){let n=await this.#U(e,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,r={}){let{status:n=me.hasSubscribers?{}:void 0}=r;r.status=n,n&&(n.op="memo",n.key=e,r.context&&(n.context=r.context),n.cache=this);let i=this.#Z(e,r);return n&&(n.value=i),me.hasSubscribers&&me.publish(n),i}#Z(e,r={}){let n=this.#f;if(!n)throw new Error("no memoMethod provided to constructor");let{context:i,status:s,forceRefresh:o,...a}=r;s&&o&&(s.forceRefresh=!0);let l=this.#G(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:i});return s&&(s.value=f),this.#M(e,f,a),f}get(e,r={}){let{status:n=me.hasSubscribers?{}:void 0}=r;r.status=n,n&&(n.op="get",n.key=e,n.cache=this);let i=this.#G(e,r);return n&&(i!==void 0&&(n.value=i),me.hasSubscribers&&me.publish(n)),i}#G(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=r,a=this.#c.get(e);if(a===void 0){o&&(o.get="miss");return}let l=this.#r[a],c=this.#u(l);return o&&this.#R(o,a),this.#k(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),i&&this.#O(a),c?l.__staleWhileFetching:l)}#J(e,r){this.#x[r]=e,this.#_[e]=r}#Y(e){e!==this.#g&&(e===this.#b?this.#b=this.#_[e]:this.#J(this.#x[e],this.#_[e]),this.#J(this.#g,e),this.#g=e)}delete(e){return this.#B(e,"delete")}#B(e,r){me.hasSubscribers&&me.publish({op:"delete",delete:r,key:e,cache:this});let n=!1;if(this.#a!==0){let i=this.#c.get(e);if(i!==void 0)if(this.#S?.[i]&&(clearTimeout(this.#S[i]),this.#S[i]=void 0),n=!0,this.#a===1)this.#Q(r);else{this.#N(i);let s=this.#r[i];if(this.#u(s)?s.__abortController.abort(new Error("deleted")):(this.#w||this.#t)&&(this.#w&&this.#n?.(s,e,r),this.#t&&this.#p?.push([s,e,r])),this.#c.delete(e),this.#l[i]=void 0,this.#r[i]=void 0,i===this.#g)this.#g=this.#x[i];else if(i===this.#b)this.#b=this.#_[i];else{let o=this.#x[i];this.#_[o]=this.#_[i];let a=this.#_[i];this.#x[a]=this.#x[i]}this.#a--,this.#y.push(i)}}if(this.#t&&this.#p?.length){let i=this.#p,s;for(;s=i?.shift();)this.#s?.(...s)}return n}clear(){return this.#Q("delete")}#Q(e){for(let r of this.#T({allowStale:!0})){let n=this.#r[r];if(this.#u(n))n.__abortController.abort(new Error("deleted"));else{let i=this.#l[r];this.#w&&this.#n?.(n,i,e),this.#t&&this.#p?.push([n,i,e])}}if(this.#c.clear(),this.#r.fill(void 0),this.#l.fill(void 0),this.#v&&this.#E){this.#v.fill(0),this.#E.fill(0);for(let r of this.#S??[])r!==void 0&&clearTimeout(r);this.#S?.fill(void 0)}if(this.#C&&this.#C.fill(0),this.#b=0,this.#g=0,this.#y.length=0,this.#m=0,this.#a=0,this.#t&&this.#p){let r=this.#p,n;for(;n=r?.shift();)this.#s?.(...n)}}},Fc=typeof process=="object"&&process?process:{stdout:null,stderr:null},sg=t=>!!t&&typeof t=="object"&&(t instanceof Wn||t instanceof gu||og(t)||ag(t)),og=t=>!!t&&typeof t=="object"&&t instanceof Eo&&typeof t.pipe=="function"&&t.pipe!==gu.Writable.prototype.pipe,ag=t=>!!t&&typeof t=="object"&&t instanceof Eo&&typeof t.write=="function"&&typeof t.end=="function",ct=Symbol("EOF"),ut=Symbol("maybeEmitEnd"),St=Symbol("emittedEnd"),Pn=Symbol("emittingEnd"),Er=Symbol("emittedError"),Tn=Symbol("closed"),Bc=Symbol("read"),Dn=Symbol("flush"),qc=Symbol("flushChunk"),Ue=Symbol("encoding"),Yt=Symbol("decoder"),fe=Symbol("flowing"),kr=Symbol("paused"),Kt=Symbol("resume"),de=Symbol("buffer"),Ee=Symbol("pipes"),pe=Symbol("bufferLength"),so=Symbol("bufferPush"),In=Symbol("bufferShift"),we=Symbol("objectMode"),le=Symbol("destroyed"),oo=Symbol("error"),ao=Symbol("emitData"),Hc=Symbol("emitEnd"),lo=Symbol("emitEnd2"),et=Symbol("async"),co=Symbol("abort"),Rn=Symbol("aborted"),Ar=Symbol("signal"),Tt=Symbol("dataListeners"),Te=Symbol("discarded"),Or=t=>Promise.resolve().then(t),lg=t=>t(),cg=t=>t==="end"||t==="finish"||t==="prefinish",ug=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,hg=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),yu=class{src;dest;opts;ondrain;constructor(t,e,r){this.src=t,this.dest=e,this.opts=r,this.ondrain=()=>t[Kt](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},fg=class extends yu{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,r){super(t,e,r),this.proxyErrors=n=>this.dest.emit("error",n),t.on("error",this.proxyErrors)}},dg=t=>!!t.objectMode,pg=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Wn=class extends Eo{[fe]=!1;[kr]=!1;[Ee]=[];[de]=[];[we];[Ue];[et];[Yt];[ct]=!1;[St]=!1;[Pn]=!1;[Tn]=!1;[Er]=null;[pe]=0;[le]=!1;[Ar];[Rn]=!1;[Tt]=0;[Te]=!1;writable=!0;readable=!0;constructor(...t){let e=t[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");dg(e)?(this[we]=!0,this[Ue]=null):pg(e)?(this[Ue]=e.encoding,this[we]=!1):(this[we]=!1,this[Ue]=null),this[et]=!!e.async,this[Yt]=this[Ue]?new ig(this[Ue]):null,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[de]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Ee]});let{signal:r}=e;r&&(this[Ar]=r,r.aborted?this[co]():r.addEventListener("abort",()=>this[co]()))}get bufferLength(){return this[pe]}get encoding(){return this[Ue]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[we]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[et]}set async(t){this[et]=this[et]||!!t}[co](){this[Rn]=!0,this.emit("abort",this[Ar]?.reason),this.destroy(this[Ar]?.reason)}get aborted(){return this[Rn]}set aborted(t){}write(t,e,r){if(this[Rn])return!1;if(this[ct])throw new Error("write after end");if(this[le])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof e=="function"&&(r=e,e="utf8"),e||(e="utf8");let n=this[et]?Or:lg;if(!this[we]&&!Buffer.isBuffer(t)){if(hg(t))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if(ug(t))t=Buffer.from(t);else if(typeof t!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[we]?(this[fe]&&this[pe]!==0&&this[Dn](!0),this[fe]?this.emit("data",t):this[so](t),this[pe]!==0&&this.emit("readable"),r&&n(r),this[fe]):t.length?(typeof t=="string"&&!(e===this[Ue]&&!this[Yt]?.lastNeed)&&(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[Ue]&&(t=this[Yt].write(t)),this[fe]&&this[pe]!==0&&this[Dn](!0),this[fe]?this.emit("data",t):this[so](t),this[pe]!==0&&this.emit("readable"),r&&n(r),this[fe]):(this[pe]!==0&&this.emit("readable"),r&&n(r),this[fe])}read(t){if(this[le])return null;if(this[Te]=!1,this[pe]===0||t===0||t&&t>this[pe])return this[ut](),null;this[we]&&(t=null),this[de].length>1&&!this[we]&&(this[de]=[this[Ue]?this[de].join(""):Buffer.concat(this[de],this[pe])]);let e=this[Bc](t||null,this[de][0]);return this[ut](),e}[Bc](t,e){if(this[we])this[In]();else{let r=e;t===r.length||t===null?this[In]():typeof r=="string"?(this[de][0]=r.slice(t),e=r.slice(0,t),this[pe]-=t):(this[de][0]=r.subarray(t),e=r.subarray(0,t),this[pe]-=t)}return this.emit("data",e),!this[de].length&&!this[ct]&&this.emit("drain"),e}end(t,e,r){return typeof t=="function"&&(r=t,t=void 0),typeof e=="function"&&(r=e,e="utf8"),t!==void 0&&this.write(t,e),r&&this.once("end",r),this[ct]=!0,this.writable=!1,(this[fe]||!this[kr])&&this[ut](),this}[Kt](){this[le]||(!this[Tt]&&!this[Ee].length&&(this[Te]=!0),this[kr]=!1,this[fe]=!0,this.emit("resume"),this[de].length?this[Dn]():this[ct]?this[ut]():this.emit("drain"))}resume(){return this[Kt]()}pause(){this[fe]=!1,this[kr]=!0,this[Te]=!1}get destroyed(){return this[le]}get flowing(){return this[fe]}get paused(){return this[kr]}[so](t){this[we]?this[pe]+=1:this[pe]+=t.length,this[de].push(t)}[In](){return this[we]?this[pe]-=1:this[pe]-=this[de][0].length,this[de].shift()}[Dn](t=!1){do;while(this[qc](this[In]())&&this[de].length);!t&&!this[de].length&&!this[ct]&&this.emit("drain")}[qc](t){return this.emit("data",t),this[fe]}pipe(t,e){if(this[le])return t;this[Te]=!1;let r=this[St];return e=e||{},t===Fc.stdout||t===Fc.stderr?e.end=!1:e.end=e.end!==!1,e.proxyErrors=!!e.proxyErrors,r?e.end&&t.end():(this[Ee].push(e.proxyErrors?new fg(this,t,e):new yu(this,t,e)),this[et]?Or(()=>this[Kt]()):this[Kt]()),t}unpipe(t){let e=this[Ee].find(r=>r.dest===t);e&&(this[Ee].length===1?(this[fe]&&this[Tt]===0&&(this[fe]=!1),this[Ee]=[]):this[Ee].splice(this[Ee].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){let r=super.on(t,e);if(t==="data")this[Te]=!1,this[Tt]++,!this[Ee].length&&!this[fe]&&this[Kt]();else if(t==="readable"&&this[pe]!==0)super.emit("readable");else if(cg(t)&&this[St])super.emit(t),this.removeAllListeners(t);else if(t==="error"&&this[Er]){let n=e;this[et]?Or(()=>n.call(this,this[Er])):n.call(this,this[Er])}return r}removeListener(t,e){return this.off(t,e)}off(t,e){let r=super.off(t,e);return t==="data"&&(this[Tt]=this.listeners("data").length,this[Tt]===0&&!this[Te]&&!this[Ee].length&&(this[fe]=!1)),r}removeAllListeners(t){let e=super.removeAllListeners(t);return(t==="data"||t===void 0)&&(this[Tt]=0,!this[Te]&&!this[Ee].length&&(this[fe]=!1)),e}get emittedEnd(){return this[St]}[ut](){!this[Pn]&&!this[St]&&!this[le]&&this[de].length===0&&this[ct]&&(this[Pn]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Tn]&&this.emit("close"),this[Pn]=!1)}emit(t,...e){let r=e[0];if(t!=="error"&&t!=="close"&&t!==le&&this[le])return!1;if(t==="data")return!this[we]&&!r?!1:this[et]?(Or(()=>this[ao](r)),!0):this[ao](r);if(t==="end")return this[Hc]();if(t==="close"){if(this[Tn]=!0,!this[St]&&!this[le])return!1;let i=super.emit("close");return this.removeAllListeners("close"),i}else if(t==="error"){this[Er]=r,super.emit(oo,r);let i=!this[Ar]||this.listeners("error").length?super.emit("error",r):!1;return this[ut](),i}else if(t==="resume"){let i=super.emit("resume");return this[ut](),i}else if(t==="finish"||t==="prefinish"){let i=super.emit(t);return this.removeAllListeners(t),i}let n=super.emit(t,...e);return this[ut](),n}[ao](t){for(let r of this[Ee])r.dest.write(t)===!1&&this.pause();let e=this[Te]?!1:super.emit("data",t);return this[ut](),e}[Hc](){return this[St]?!1:(this[St]=!0,this.readable=!1,this[et]?(Or(()=>this[lo]()),!0):this[lo]())}[lo](){if(this[Yt]){let e=this[Yt].end();if(e){for(let r of this[Ee])r.dest.write(e);this[Te]||super.emit("data",e)}}for(let e of this[Ee])e.end();let t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){let t=Object.assign([],{dataLength:0});this[we]||(t.dataLength=0);let e=this.promise();return this.on("data",r=>{t.push(r),this[we]||(t.dataLength+=r.length)}),await e,t}async concat(){if(this[we])throw new Error("cannot concat in objectMode");let t=await this.collect();return this[Ue]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise((t,e)=>{this.on(le,()=>e(new Error("stream destroyed"))),this.on("error",r=>e(r)),this.on("end",()=>t())})}[Symbol.asyncIterator](){this[Te]=!1;let t=!1,e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[ct])return e();let n,i,s=c=>{this.off("data",o),this.off("end",a),this.off(le,l),e(),i(c)},o=c=>{this.off("error",s),this.off("end",a),this.off(le,l),this.pause(),n({value:c,done:!!this[ct]})},a=()=>{this.off("error",s),this.off("data",o),this.off(le,l),e(),n({done:!0,value:void 0})},l=()=>s(new Error("stream destroyed"));return new Promise((c,f)=>{i=f,n=c,this.once(le,l),this.once("error",s),this.once("end",a),this.once("data",o)})},throw:e,return:e,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[Te]=!1;let t=!1,e=()=>(this.pause(),this.off(oo,e),this.off(le,e),this.off("end",e),t=!0,{done:!0,value:void 0}),r=()=>{if(t)return e();let n=this.read();return n===null?e():{done:!1,value:n}};return this.once("end",e),this.once(oo,e),this.once(le,e),{next:r,throw:e,return:e,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(t){if(this[le])return t?this.emit("error",t):this.emit(le),this;this[le]=!0,this[Te]=!0,this[de].length=0,this[pe]=0;let e=this;return typeof e.close=="function"&&!this[Tn]&&e.close(),t?this.emit("error",t):this.emit(le),this}static get isStream(){return sg}},mg=Zm.native,Ir={lstatSync:Ym,readdir:Km,readdirSync:Jm,readlinkSync:Qm,realpathSync:mg,promises:{lstat:eg,readdir:tg,readlink:rg,realpath:ng}},_u=t=>!t||t===Ir||t===Xm?Ir:{...Ir,...t,promises:{...Ir.promises,...t.promises}},gg=/^\\\\\?\\([a-z]:)\\?$/i,yg=/^\\\\\?\\UNC\\([^\\]+\\[^\\]+)\\?$/i,_g=/^\\\\[^\\?]+\\[^\\]+$/,$c=t=>t.replace(/\//g,"\\").replace(gg,"$1\\").replace(yg,"\\\\$1\\").replace(_g,"$&\\"),bg=/^[\\/]{2}\?[\\/]unc[\\/][^\\/]+[\\/][^\\/]+(?:[\\/]|$)/i,wg=/^[\\/]{2}\?[\\/](?=[a-z]:)/i,vg=/^[\\/]{2}\?[\\/]unc(?=[\\/][^\\/]+[\\/][^\\/])/i,Sg=/[\\/]/,Be=0,bu=1,wu=2,tt=4,vu=6,Su=8,Dt=10,xu=12,Fe=15,Pr=~Fe,uo=16,jc=32,Rr=64,Ge=128,Ln=256,Hn=512,Wc=Rr|Ge|Hn,xg=1023,ho=t=>t.isFile()?Su:t.isDirectory()?tt:t.isSymbolicLink()?Dt:t.isCharacterDevice()?wu:t.isBlockDevice()?vu:t.isSocket()?xu:t.isFIFO()?bu:Be,Vc=new Vn({max:2**12}),Lr=t=>{let e=Vc.get(t);if(e)return e;let r=t.normalize("NFKD");return Vc.set(t,r),r},zc=new Vn({max:2**12}),Nn=t=>{let e=zc.get(t);if(e)return e;let r=Lr(t.toLowerCase());return zc.set(t,r),r},Uc=class extends Vn{constructor(){super({max:256})}},Cg=class extends Vn{constructor(t=16*1024){super({maxSize:t,sizeCalculation:e=>e.length+1})}},Cu=Symbol("PathScurry setAsCwd"),Oe=class{name;root;roots;parent;nocase;isCWD=!1;#e;#i;get dev(){return this.#i}#n;get mode(){return this.#n}#o;get nlink(){return this.#o}#s;get uid(){return this.#s}#d;get gid(){return this.#d}#f;get rdev(){return this.#f}#h;get blksize(){return this.#h}#a;get ino(){return this.#a}#m;get size(){return this.#m}#c;get blocks(){return this.#c}#l;get atimeMs(){return this.#l}#r;get mtimeMs(){return this.#r}#_;get ctimeMs(){return this.#_}#x;get birthtimeMs(){return this.#x}#b;get atime(){return this.#b}#g;get mtime(){return this.#g}#y;get ctime(){return this.#y}#p;get birthtime(){return this.#p}#C;#E;#v;#S;#w;#A;#t;#D;#I;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(t,e=Be,r,n,i,s,o){this.name=t,this.#C=i?Nn(t):Lr(t),this.#t=e&xg,this.nocase=i,this.roots=n,this.root=r||this,this.#D=s,this.#v=o.fullpath,this.#w=o.relative,this.#A=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=_u(o.fs)}get fs(){return this.#e}depth(){return this.#E!==void 0?this.#E:this.parent?this.#E=this.parent.depth()+1:this.#E=0}childrenCache(){return this.#D}resolve(t){if(!t)return this;let e=this.getRootString(t),r=t.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#R(r):this.#R(r)}#R(t){let e=this;for(let r of t)e=e.child(r);return e}children(){let t=this.#D.get(this);if(t)return t;let e=Object.assign([],{provisional:0});return this.#D.set(this,e),this.#t&=~uo,e}child(t,e){if(t===""||t===".")return this;if(t==="..")return this.parent||this;let r=this.children(),n=this.nocase?Nn(t):Lr(t);for(let a of r)if(a.#C===n)return a;let i=this.parent?this.sep:"",s=this.#v?this.#v+i+t:void 0,o=this.newChild(t,Be,{...e,parent:this,fullpath:s});return this.canReaddir()||(o.#t|=Ge),r.push(o),o}relative(){if(this.isCWD)return"";if(this.#w!==void 0)return this.#w;let t=this.name,e=this.parent;if(!e)return this.#w=this.name;let r=e.relative();return r+(!r||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let t=this.name,e=this.parent;if(!e)return this.#A=this.fullpathPosix();let r=e.relativePosix();return r+(!r||!e.parent?"":"/")+t}fullpath(){if(this.#v!==void 0)return this.#v;let t=this.name,e=this.parent;if(!e)return this.#v=this.name;let r=e.fullpath()+(e.parent?this.sep:"")+t;return this.#v=r}fullpathPosix(){if(this.#S!==void 0)return this.#S;if(this.sep==="/")return this.#S=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#S=`//?/${n}`:this.#S=n}let t=this.parent,e=t.fullpathPosix(),r=e+(!e||!t.parent?"":"/")+this.name;return this.#S=r}isUnknown(){return(this.#t&Fe)===Be}isType(t){return this[`is${t}`]()}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.#t&Fe)===Su}isDirectory(){return(this.#t&Fe)===tt}isCharacterDevice(){return(this.#t&Fe)===wu}isBlockDevice(){return(this.#t&Fe)===vu}isFIFO(){return(this.#t&Fe)===bu}isSocket(){return(this.#t&Fe)===xu}isSymbolicLink(){return(this.#t&Dt)===Dt}lstatCached(){return this.#t&jc?this:void 0}readlinkCached(){return this.#I}realpathCached(){return this.#O}readdirCached(){let t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#I)return!0;if(!this.parent)return!1;let t=this.#t&Fe;return!(t!==Be&&t!==Dt||this.#t&Ln||this.#t&Ge)}calledReaddir(){return!!(this.#t&uo)}isENOENT(){return!!(this.#t&Ge)}isNamed(t){return this.nocase?this.#C===Nn(t):this.#C===Lr(t)}async readlink(){let t=this.#I;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=await this.#e.promises.readlink(this.fullpath()),r=(await this.parent.realpath())?.resolve(e);if(r)return this.#I=r}catch(e){this.#T(e.code);return}}readlinkSync(){let t=this.#I;if(t)return t;if(this.canReadlink()&&this.parent)try{let e=this.#e.readlinkSync(this.fullpath()),r=this.parent.realpathSync()?.resolve(e);if(r)return this.#I=r}catch(e){this.#T(e.code);return}}#q(t){this.#t|=uo;for(let e=t.provisional;e<t.length;e++){let r=t[e];r&&r.#k()}}#k(){this.#t&Ge||(this.#t=(this.#t|Ge)&Pr,this.#V())}#V(){let t=this.children();t.provisional=0;for(let e of t)e.#k()}#N(){this.#t|=Hn,this.#L()}#L(){if(this.#t&Rr)return;let t=this.#t;(t&Fe)===tt&&(t&=Pr),this.#t=t|Rr,this.#V()}#H(t=""){t==="ENOTDIR"||t==="EPERM"?this.#L():t==="ENOENT"?this.#k():this.children().provisional=0}#P(t=""){t==="ENOTDIR"?this.parent.#L():t==="ENOENT"&&this.#k()}#T(t=""){let e=this.#t;e|=Ln,t==="ENOENT"&&(e|=Ge),(t==="EINVAL"||t==="UNKNOWN")&&(e&=Pr),this.#t=e,t==="ENOTDIR"&&this.parent&&this.parent.#L()}#$(t,e){return this.#W(t,e)||this.#M(t,e)}#M(t,e){let r=ho(t),n=this.newChild(t.name,r,{parent:this}),i=n.#t&Fe;return i!==tt&&i!==Dt&&i!==Be&&(n.#t|=Rr),e.unshift(n),e.provisional++,n}#W(t,e){for(let r=e.provisional;r<e.length;r++){let n=e[r];if((this.nocase?Nn(t.name):Lr(t.name))===n.#C)return this.#K(t,n,r,e)}}#K(t,e,r,n){let i=e.name;return e.#t=e.#t&Pr|ho(t),i!==t.name&&(e.name=t.name),r!==n.provisional&&(r===n.length-1?n.pop():n.splice(r,1),n.unshift(e)),n.provisional++,e}async lstat(){if((this.#t&Ge)===0)try{return this.#z(await this.#e.promises.lstat(this.fullpath())),this}catch(t){this.#P(t.code)}}lstatSync(){if((this.#t&Ge)===0)try{return this.#z(this.#e.lstatSync(this.fullpath())),this}catch(t){this.#P(t.code)}}#z(t){let{atime:e,atimeMs:r,birthtime:n,birthtimeMs:i,blksize:s,blocks:o,ctime:a,ctimeMs:l,dev:c,gid:f,ino:h,mode:p,mtime:m,mtimeMs:g,nlink:_,rdev:O,size:b,uid:S}=t;this.#b=e,this.#l=r,this.#p=n,this.#x=i,this.#h=s,this.#c=o,this.#y=a,this.#_=l,this.#i=c,this.#d=f,this.#a=h,this.#n=p,this.#g=m,this.#r=g,this.#o=_,this.#f=O,this.#m=b,this.#s=S;let I=ho(t);this.#t=this.#t&Pr|I|jc,I!==Be&&I!==tt&&I!==Dt&&(this.#t|=Rr)}#F=[];#u=!1;#U(t){this.#u=!1;let e=this.#F.slice();this.#F.length=0,e.forEach(r=>r(null,t))}readdirCB(t,e=!1){if(!this.canReaddir()){e?t(null,[]):queueMicrotask(()=>t(null,[]));return}let r=this.children();if(this.calledReaddir()){let i=r.slice(0,r.provisional);e?t(null,i):queueMicrotask(()=>t(null,i));return}if(this.#F.push(t),this.#u)return;this.#u=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(i,s)=>{if(i)this.#H(i.code),r.provisional=0;else{for(let o of s)this.#$(o,r);this.#q(r)}this.#U(r.slice(0,r.provisional))})}#j;async readdir(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();if(this.#j)await this.#j;else{let r=()=>{};this.#j=new Promise(n=>r=n);try{for(let n of await this.#e.promises.readdir(e,{withFileTypes:!0}))this.#$(n,t);this.#q(t)}catch(n){this.#H(n.code),t.provisional=0}this.#j=void 0,r()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir())return[];let t=this.children();if(this.calledReaddir())return t.slice(0,t.provisional);let e=this.fullpath();try{for(let r of this.#e.readdirSync(e,{withFileTypes:!0}))this.#$(r,t);this.#q(t)}catch(r){this.#H(r.code),t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#t&Wc)return!1;let t=Fe&this.#t;return t===Be||t===tt||t===Dt}shouldWalk(t,e){return(this.#t&tt)===tt&&!(this.#t&Wc)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#O)return this.#O;if(!((Hn|Ln|Ge)&this.#t))try{let t=await this.#e.promises.realpath(this.fullpath());return this.#O=this.resolve(t)}catch{this.#N()}}realpathSync(){if(this.#O)return this.#O;if(!((Hn|Ln|Ge)&this.#t))try{let t=this.#e.realpathSync(this.fullpath());return this.#O=this.resolve(t)}catch{this.#N()}}[Cu](t){if(t===this)return;t.isCWD=!1,this.isCWD=!0;let e=new Set([]),r=[],n=this;for(;n&&n.parent;)e.add(n),n.#w=r.join(this.sep),n.#A=r.join("/"),n=n.parent,r.push("..");for(n=t;n&&n.parent&&!e.has(n);)n.#w=void 0,n.#A=void 0,n=n.parent}},Eu=class ku extends Oe{sep="\\";splitSep=Sg;constructor(e,r=Be,n,i,s,o,a){super(e,r,n,i,s,o,a)}newChild(e,r=Be,n={}){return new ku(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return bg.exec(e)?.[0]??wo.parse(e).root}getRoot(e){if(e=$c(e.toUpperCase()),e===this.root.name||/^[\\/]$/.test(e))return this.root;for(let[r,n]of Object.entries(this.roots))if(this.sameRoot(e,r))return this.roots[e]=n;return this.roots[e]=new ko(e,{nocase:this.nocase,fs:this.fs}).root}sameRoot(e,r=this.root.name){return $c(e.toUpperCase())===r}},Au=class Ou extends Oe{splitSep="/";sep="/";constructor(e,r=Be,n,i,s,o,a){super(e,r,n,i,s,o,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=Be,n={}){return new Ou(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}},Pu=class{root;rootPath;roots;cwd;#e;#i;#n;nocase;#o;constructor(t=process.cwd(),e,r,{nocase:n,childrenCacheSize:i=16*1024,fs:s=Ir}={}){this.#o=_u(s),(t instanceof URL||t.startsWith("file://"))&&(t=Gm(t));let o=e.resolve(t);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new Uc,this.#i=new Uc,this.#n=new Cg(i);let a=o.substring(this.rootPath.length).split(r);if(a.length===1&&!a[0]&&a.pop(),n===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#o),this.roots[this.rootPath]=this.root;let l=this.root,c=a.length-1,f=e.sep,h=this.rootPath,p=!1;for(let m of a){let g=c--;l=l.child(m,{relative:new Array(g).fill("..").join(f),relativePosix:new Array(g).fill("..").join("/"),fullpath:h+=(p?"":f)+m}),p=!0}this.cwd=l}depth(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.depth()}childrenCache(){return this.#n}resolve(...t){let e="";for(let i=t.length-1;i>=0;i--){let s=t[i];if(!(!s||s===".")&&(e=e?`${s}/${e}`:s,this.isAbsolute(s)))break}let r=this.#e.get(e);if(r!==void 0)return r;let n=this.cwd.resolve(e).fullpath();return this.#e.set(e,n),n}resolvePosix(...t){let e="";for(let i=t.length-1;i>=0;i--){let s=t[i];if(!(!s||s===".")&&(e=e?`${s}/${e}`:s,this.isAbsolute(s)))break}let r=this.#i.get(e);if(r!==void 0)return r;let n=this.cwd.resolve(e).fullpathPosix();return this.#i.set(e,n),n}relative(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relative()}relativePosix(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.relativePosix()}basename(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.name}dirname(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Oe||(e=t,t=this.cwd);let{withFileTypes:r}=e;if(t.canReaddir()){let n=await t.readdir();return r?n:n.map(i=>i.name)}else return[]}readdirSync(t=this.cwd,e={withFileTypes:!0}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Oe||(e=t,t=this.cwd);let{withFileTypes:r=!0}=e;return t.canReaddir()?r?t.readdirSync():t.readdirSync().map(n=>n.name):[]}async lstat(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstat()}lstatSync(t=this.cwd){return typeof t=="string"&&(t=this.cwd.resolve(t)),t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Oe||(e=t.withFileTypes,t=this.cwd);let r=await t.readlink();return e?r:r?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Oe||(e=t.withFileTypes,t=this.cwd);let r=t.readlinkSync();return e?r:r?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Oe||(e=t.withFileTypes,t=this.cwd);let r=await t.realpath();return e?r:r?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Oe||(e=t.withFileTypes,t=this.cwd);let r=t.realpathSync();return e?r:r?.fullpath()}async walk(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Oe||(e=t,t=this.cwd);let{withFileTypes:r=!0,follow:n=!1,filter:i,walkFilter:s}=e,o=[];(!i||i(t))&&o.push(r?t:t.fullpath());let a=new Set,l=(f,h)=>{a.add(f),f.readdirCB((p,m)=>{if(p)return h(p);let g=m.length;if(!g)return h();let _=()=>{--g===0&&h()};for(let O of m)(!i||i(O))&&o.push(r?O:O.fullpath()),n&&O.isSymbolicLink()?O.realpath().then(b=>b?.isUnknown()?b.lstat():b).then(b=>b?.shouldWalk(a,s)?l(b,_):_()):O.shouldWalk(a,s)?l(O,_):_()},!0)},c=t;return new Promise((f,h)=>{l(c,p=>{if(p)return h(p);f(o)})})}walkSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Oe||(e=t,t=this.cwd);let{withFileTypes:r=!0,follow:n=!1,filter:i,walkFilter:s}=e,o=[];(!i||i(t))&&o.push(r?t:t.fullpath());let a=new Set([t]);for(let l of a){let c=l.readdirSync();for(let f of c){(!i||i(f))&&o.push(r?f:f.fullpath());let h=f;if(f.isSymbolicLink()){if(!(n&&(h=f.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(a,s)&&a.add(h)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){return typeof t=="string"?t=this.cwd.resolve(t):t instanceof Oe||(e=t,t=this.cwd),this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Oe||(e=t,t=this.cwd);let{withFileTypes:r=!0,follow:n=!1,filter:i,walkFilter:s}=e;(!i||i(t))&&(yield r?t:t.fullpath());let o=new Set([t]);for(let a of o){let l=a.readdirSync();for(let c of l){(!i||i(c))&&(yield r?c:c.fullpath());let f=c;if(c.isSymbolicLink()){if(!(n&&(f=c.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(o,s)&&o.add(f)}}}stream(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Oe||(e=t,t=this.cwd);let{withFileTypes:r=!0,follow:n=!1,filter:i,walkFilter:s}=e,o=new Wn({objectMode:!0});(!i||i(t))&&o.write(r?t:t.fullpath());let a=new Set,l=[t],c=0,f=()=>{let h=!1;for(;!h;){let p=l.shift();if(!p){c===0&&o.end();return}c++,a.add(p);let m=(_,O,b=!1)=>{if(_)return o.emit("error",_);if(n&&!b){let S=[];for(let I of O)I.isSymbolicLink()&&S.push(I.realpath().then(L=>L?.isUnknown()?L.lstat():L));if(S.length){Promise.all(S).then(()=>m(null,O,!0));return}}for(let S of O)S&&(!i||i(S))&&(o.write(r?S:S.fullpath())||(h=!0));c--;for(let S of O){let I=S.realpathCached()||S;I.shouldWalk(a,s)&&l.push(I)}h&&!o.flowing?o.once("drain",f):g||f()},g=!0;p.readdirCB(m,!0),g=!1}};return f(),o}streamSync(t=this.cwd,e={}){typeof t=="string"?t=this.cwd.resolve(t):t instanceof Oe||(e=t,t=this.cwd);let{withFileTypes:r=!0,follow:n=!1,filter:i,walkFilter:s}=e,o=new Wn({objectMode:!0}),a=new Set;(!i||i(t))&&o.write(r?t:t.fullpath());let l=[t],c=0,f=()=>{let h=!1;for(;!h;){let p=l.shift();if(!p){c===0&&o.end();return}c++,a.add(p);let m=p.readdirSync();for(let g of m)(!i||i(g))&&(o.write(r?g:g.fullpath())||(h=!0));c--;for(let g of m){let _=g;if(g.isSymbolicLink()){if(!(n&&(_=g.realpathSync())))continue;_.isUnknown()&&_.lstatSync()}_.shouldWalk(a,s)&&l.push(_)}}h&&!o.flowing&&o.once("drain",f)};return f(),o}chdir(t=this.cwd){let e=this.cwd;this.cwd=typeof t=="string"?this.cwd.resolve(t):t,this.cwd[Cu](e)}},ko=class extends Pu{sep="\\";constructor(t=process.cwd(),e={}){let{nocase:r=!0}=e;typeof t=="string"&&!t.startsWith("file://")&&(t=t.replace(wg,"").replace(vg,"\\")),super(t,wo,"\\",{...e,nocase:r}),this.nocase=r;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(t){return wo.parse(t).root.toUpperCase()}newRoot(t){return new Eu(this.rootPath,tt,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}},Ao=class extends Pu{sep="/";constructor(t=process.cwd(),e={}){let{nocase:r=!1}=e;super(t,Um,"/",{...e,nocase:r}),this.nocase=r}parseRootPath(t){return"/"}newRoot(t){return new Au(this.rootPath,tt,void 0,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}},Tu=class extends Ao{constructor(t=process.cwd(),e={}){let{nocase:r=!0}=e;super(t,{...e,nocase:r})}},R0=process.platform==="win32"?Eu:Au,Eg=process.platform==="win32"?ko:process.platform==="darwin"?Tu:Ao,kg=t=>t.length>=1,Ag=t=>t.length>=1,Og=Symbol.for("nodejs.util.inspect.custom"),Du=class Iu{#e;#i;#n;length;#o;#s;#d;#f;#h;#a;#m=!0;constructor(e,r,n,i){if(!kg(e))throw new TypeError("empty pattern list");if(!Ag(r))throw new TypeError("empty glob list");if(r.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=r,this.#n=n,this.#o=i,this.#n===0){if(this.isUNC()){let s=this.#c()?6:4,o=this.#e.slice(0,s),a=this.#i.slice(0,s),l=this.#e.slice(s),c=this.#i.slice(s);l[0]===""&&(l.shift(),c.shift());let f=[...o,""].join("/"),h=[...a,""].join("/");this.#e=[f,...l],this.#i=[h,...c],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}}}[Og](){return`Pattern <${this.#i.slice(this.#n).join("/")}>`}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]=="string"}isGlobstar(){return this.#e[this.#n]===se}isMatcher(){return typeof this.#e[this.#n]=="object"}globString(){return this.#d=this.#d||(this.#n===0?this.isAbsolute()?this.#i[0]+this.#i.slice(1).join("/"):this.#i.join("/"):this.#i.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#s!==void 0?this.#s:this.hasMore()?(this.#s=new Iu(this.#e,this.#i,this.#n+1,this.#o),this.#s.#a=this.#a,this.#s.#h=this.#h,this.#s.#f=this.#f,this.#s):this.#s=null}#c(){let e=this.#e;return e[2]==="?"&&typeof e[3]=="string"&&/^unc$/i.test(e[3])}isUNC(){let e=this.#e,r=this.#c()?4:2;return this.#h!==void 0?this.#h:this.#h=this.#o==="win32"&&this.#n===0&&e[0]===""&&e[1]===""&&typeof e[r]=="string"&&!!e[r]&&typeof e[r+1]=="string"&&!!e[r+1]}isDrive(){let e=this.#e;return this.#f!==void 0?this.#f:this.#f=this.#o==="win32"&&this.#n===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.#n===0?e:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#m)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#m?!1:(this.#m=!1,!0)}},Pg=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Gc=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;slashRoot;constructor(t,{nobrace:e,nocase:r,noext:n,noglobstar:i,normalize:s,platform:o=Pg,root:a,windowsPathsNoEscape:l,allowWindowsEscape:c,braceExpandMax:f=1e4},h){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,l=!!l||c===!1,this.mmopts={braceExpandMax:f,dot:!0,nobrace:e,nocase:r,noext:n,noglobstar:i,normalize:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0,windowsPathsNoEscape:l};let p=h?.resolve(a??"/").fullpath()??"/";this.slashRoot=Co(p.replace(/\\/g,"/").replace(/\/$/,""),{magicalBraces:!0,windowsPathsNoEscape:l});for(let m of t)this.add(m)}add(t){let e=new Rt(t,this.mmopts);for(let r=0;r<e.set.length;r++){let n=e.set[r],i=e.globParts[r];if(!n||!i)throw new Error("invalid pattern object");for(;n[0]==="."&&i[0]===".";)n.shift(),i.shift();let s=new Du(n,i,0,this.platform),o=s.root()==="/"?`${this.slashRoot}/${s.rest()?.globString()??""}`:s.globString(),a=new Rt(o,this.mmopts),l=i[i.length-1]==="**",c=s.isAbsolute();c?this.absolute.push(a):this.relative.push(a),l&&(c?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(t){let e=t.fullpath(),r=`${e}/`,n=t.relative()||".",i=`${n}/`;for(let s of this.relative)if(s.match(n)||s.match(i))return!0;for(let s of this.absolute)if(s.match(e)||s.match(r))return!0;return!1}childrenIgnored(t){let e=`${t.fullpath()}/`,r=`${t.relative()||"."}/`;for(let n of this.relativeChildren)if(n.match(r))return!0;for(let n of this.absoluteChildren)if(n.match(e))return!0;return!1}},Tg=class Ru{parent;store;constructor(e){this.parent=e}copy(){return new Ru(this)}#e(e){let r=this.store?.get(e);return r||!this.parent?r:this.parent.#e(e)}hasWalked(e,r){return!!this.#e(e.fullpath())?.has(r.globString())}storeWalked(e,r){let n=e.fullpath(),i=this.#e(n);i?i.add(r.globString()):(this.store??=new Map).set(n,new Set([r.globString()]))}},Lu=class vo{static ABSOLUTE=2;static IF_DIR=1;store=new Map;add(e,r,n){let i=(r?vo.ABSOLUTE:0)|(n?vo.IF_DIR:0),s=this.store.get(e);this.store.set(e,s===void 0?i:i&s)}},Dg=class{store=new Map;add(t,e){if(!t.canReaddir())return;let r=this.store.get(t);r?r.find(n=>n.globString()===e.globString())||r.push(e):this.store.set(t,[e])}get(t){let e=this.store.get(t);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(t=>[t,this.store.get(t)])}keys(){return[...this.store.keys()].filter(t=>t.canReaddir())}},Yc=class Nu{hasWalkedCache;matches=new Lu;subwalks=new Dg;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new Tg}processPatterns(e,r){this.patterns=r;let n=r.map(i=>[e,i]);for(let[i,s]of n){this.hasWalkedCache.storeWalked(i,s);let o=s.root(),a=s.isAbsolute()&&this.opts.absolute!==!1;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let h=s.rest();if(h)s=h;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let l,c,f=!1;for(;typeof(l=s.pattern())=="string"&&(c=s.rest());)i=i.resolve(l),s=c,f=!0;if(l=s.pattern(),c=s.rest(),f){if(this.hasWalkedCache.hasWalked(i,s))continue;this.hasWalkedCache.storeWalked(i,s)}if(typeof l=="string"){let h=l===".."||l===""||l===".";this.matches.add(i.resolve(l),a,h);continue}else if(l===se){(!i.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(i,s);let h=c?.pattern(),p=c?.rest();if(!c||(h===""||h===".")&&!p)this.matches.add(i,a,h===""||h===".");else if(h===".."){let m=i.parent||i;p?this.hasWalkedCache.hasWalked(m,p)||this.subwalks.add(m,p):this.matches.add(m,a,!0)}}else typeof l=="object"&&this.subwalks.add(i,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Nu(this.opts,this.hasWalkedCache)}filterEntries(e,r){let n=this.subwalks.get(e),i=this.child();for(let s of r)for(let o of n){let a=o.isAbsolute(),l=o.pattern(),c=o.rest();l===se?i.testGlobstar(s,o,c,a):typeof l=="object"?i.testMatcher(s,l,c,a):i.testString(s,l,c,a)}return i}testGlobstar(e,r,n,i){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,i,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(n&&r.checkFollowGlobstar()?this.subwalks.add(e,n):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),n){let s=n.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,n.rest(),i);else if(s===".."){let o=e.parent||e;this.subwalks.add(o,n)}else typeof s=="object"&&this.testMatcher(e,s,n.rest(),i)}}testMatcher(e,r,n,i){r.testUnchecked(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}testString(e,r,n,i){e.isNamed(r)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}},{ABSOLUTE:Mn,IF_DIR:Fn}=Lu,Ig=(t,e,r)=>typeof t=="string"?new Gc([t],e,r):Array.isArray(t)?new Gc(t,e,r):t,Mu=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#i;#n;signal;maxDepth;includeChildMatches;constructor(t,e,r){if(this.patterns=t,this.path=e,this.opts=r,this.#n=!r.posix&&r.platform==="win32"?"\\":"/",this.includeChildMatches=r.includeChildMatches!==!1,(r.ignore||!this.includeChildMatches)&&(this.#i=Ig(r.ignore??[],r,e),!this.includeChildMatches&&typeof this.#i.add!="function")){let n="cannot ignore child matches, ignore lacks add() method.";throw new Error(n)}this.maxDepth=r.maxDepth||1/0,r.signal&&(this.signal=r.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#o(t){return this.seen.has(t)||!!this.#i?.ignored?.(t)}#s(t){return!!this.#i?.childrenIgnored?.(t)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let t;for(;!this.paused&&(t=this.#e.shift());)t()}onResume(t){this.paused?this.#e.push(t):t()}async matchCheck(t,e){if(e&&this.opts.nodir)return;let r,n;if(this.opts.realpath){if(r=t.realpathCached()||await t.realpath(),!r)return;n=r}else n=t;let i=n.isUnknown()||this.opts.stat?await n.lstat():n;if(this.opts.follow&&this.opts.nodir&&i?.isSymbolicLink()){let s=await i.realpath();s&&(s.isUnknown()||this.opts.stat)&&await s.lstat()}return this.matchCheckTest(i,e)}matchCheckTest(t,e){return t&&(this.maxDepth===1/0||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#o(t)?t:void 0}matchCheckSync(t,e){if(e&&this.opts.nodir)return;let r,n;if(this.opts.realpath){if(r=t.realpathCached()||t.realpathSync(),!r)return;n=r}else n=t;let i=n.isUnknown()||this.opts.stat?n.lstatSync():n;if(this.opts.follow&&this.opts.nodir&&i?.isSymbolicLink()){let s=i.realpathSync();s&&(s?.isUnknown()||this.opts.stat)&&s.lstatSync()}return this.matchCheckTest(i,e)}matchFinish(t,e){this.#o(t)||this.#d(t,e)}#d(t,e){if(!this.includeChildMatches&&this.#i?.add){let i=`${t.relativePosix()}/**`;this.#i.add(i)}let r=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(t);let n=this.opts.mark&&t.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(t);else if(r){let i=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(i+n)}else{let i=this.opts.posix?t.relativePosix():t.relative(),s=this.opts.dotRelative&&!i.startsWith(`..${this.#n}`)?`.${this.#n}`:"";this.matchEmit(i?s+i+n:`.${n}`)}}async match(t,e,r){let n=await this.matchCheck(t,r);n&&this.matchFinish(n,e)}matchSync(t,e,r){let n=this.matchCheckSync(t,r);n&&this.#d(n,e)}walkCB(t,e,r){if(this.signal?.aborted)return r();this.walkCB2(t,e,new Yc(this.opts),r)}walkCB2(t,e,r,n){if(this.#s(t)||this.signal?.aborted)return n();if(this.paused){this.onResume(()=>this.walkCB2(t,e,r,n));return}r.processPatterns(t,e);let i=1,s=()=>{--i===0&&n()};for(let[o,a]of r.matches.store)this.#o(o)||(i++,this.match(o,!!(a&Mn),!!(a&Fn)).then(()=>s()));for(let o of r.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;i++;let a=o.readdirCached();o.calledReaddir()?this.walkCB3(o,a,r,s):o.readdirCB((l,c)=>this.walkCB3(o,c,r,s),!0)}s()}walkCB3(t,e,r,n){let i=r.filterEntries(t,e),s=1,o=()=>{--s===0&&n()};for(let[a,l]of i.matches.store)this.#o(a)||(s++,this.match(a,!!(l&Mn),!!(l&Fn)).then(()=>o()));for(let[a,l]of i.subwalks.entries())s++,this.walkCB2(a,l,i.child(),o);o()}walkCBSync(t,e,r){if(this.signal?.aborted)return r();this.walkCB2Sync(t,e,new Yc(this.opts),r)}walkCB2Sync(t,e,r,n){if(this.#s(t)||this.signal?.aborted)return n();if(this.paused){this.onResume(()=>this.walkCB2Sync(t,e,r,n));return}r.processPatterns(t,e);let i=1,s=()=>{--i===0&&n()};for(let[o,a]of r.matches.store)this.#o(o)||this.matchSync(o,!!(a&Mn),!!(a&Fn));for(let o of r.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;i++;let a=o.readdirSync();this.walkCB3Sync(o,a,r,s)}s()}walkCB3Sync(t,e,r,n){let i=r.filterEntries(t,e),s=1,o=()=>{--s===0&&n()};for(let[a,l]of i.matches.store)this.#o(a)||this.matchSync(a,!!(l&Mn),!!(l&Fn));for(let[a,l]of i.subwalks.entries())s++,this.walkCB2Sync(a,l,i.child(),o);o()}},Kc=class extends Mu{matches=[];constructor(t,e,r){super(t,e,r)}matchEmit(t){this.matches.push(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):t(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}},Jc=class extends Mu{results;constructor(t,e,r){super(t,e,r),this.results=new Wn({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(t){this.results.write(t),this.results.flowing||this.pause()}stream(){let t=this.path;return t.isUnknown()?t.lstat().then(()=>{this.walkCB(t,this.patterns,()=>this.results.end())}):this.walkCB(t,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}},Rg=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Lt=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(t,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=qm(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");let r=typeof t=="string"?[t]:t;if(this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(r=r.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");r=r.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=r,this.platform=e.platform||Rg,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=e.platform==="win32"?ko:e.platform==="darwin"?Tu:e.platform?Ao:Eg;this.scurry=new l(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",i={braceExpandMax:1e4,...e,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},s=this.pattern.map(l=>new Rt(l,i)),[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 Du(l,f,0,this.platform)})}async walk(){return await new Kc(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 Kc(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 Jc(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 Jc(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()}},Lg=(t,e={})=>{for(let r of Array.isArray(t)?t:[t])if(new Rt(r,e).hasMagic())return!0;return!1};function zn(t,e={}){return new Lt(t,e).streamSync()}function Fu(t,e={}){return new Lt(t,e).stream()}function Bu(t,e={}){return new Lt(t,e).walkSync()}async function Qc(t,e={}){return new Lt(t,e).walk()}function Un(t,e={}){return new Lt(t,e).iterateSync()}function qu(t,e={}){return new Lt(t,e).iterate()}var Ng=zn,Mg=Object.assign(Fu,{sync:zn}),Fg=Un,Bg=Object.assign(qu,{sync:Un}),qg=Object.assign(Bu,{stream:zn,iterate:Un}),Et=Object.assign(Qc,{glob:Qc,globSync:Bu,sync:qg,globStream:Fu,stream:Mg,globStreamSync:zn,streamSync:Ng,globIterate:qu,iterate:Bg,globIterateSync:Un,iterateSync:Fg,Glob:Lt,hasMagic:Lg,escape:Co,unescape:uu});Et.glob=Et;var Gn=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 Et(this.pattern,{nodir:!0}),r=[];for(let n of e)try{let i=await Hg(n),s=jg(n);r.push({path:n,name:Hu(n),basename:Hu(n,s),ext:s.slice(1),dir:$g(n),size:i.size,mtime:i.mtime.toISOString()})}catch{continue}return this.data=r,this.data}async query(e,r=[]){return Xe(await this.loadData(),e,r)}async getAll(){return this.loadData()}async close(){this.data=null}};function Oo(t){return new Gn(t)}import{dirname as To,relative as Yn,resolve as $u,sep as Kn}from"node:path";var ju=">=5.0.0 <7.0.0",Nt={namespace:{label:"Namespace",dir:"namespaces"},enum:{label:"Enumeration",dir:"enumerations"},class:{label:"Class",dir:"classes"},interface:{label:"Interface",dir:"interfaces"},type:{label:"Type Alias",dir:"type-aliases"},variable:{label:"Variable",dir:"variables"},function:{label:"Function",dir:"functions"},reference:{label:"Reference",dir:"references"}},Wg=new Set(["hidden","ignore"]),Vg={summary:"",tags:[],parameters:new Map,typeParameters:new Map,returns:""};function Wu(t){for(;t.length>0&&t[0].trim()==="";)t.shift();for(;t.length>0&&t[t.length-1].trim()==="";)t.pop();return t.join(`
866
- `)}function zg(t){let e=[],r=0;for(let n=0;n<t.length;n++){if(t[n]==="`"){let i=1;for(;t[n+i]==="`";)i++;r===0?r=i:i===r&&(r=0),n+=i-1;continue}r===0&&t[n]==="@"&&(n===0||/\s/.test(t[n-1]))&&/[A-Za-z]/.test(t[n+1]??"")&&e.push(n)}return e}function Ug(t){let r=t.replace(/^\/\*\*/,"").replace(/\*\/$/,"").split(/\r?\n/).map((o,a)=>a===0?o.trim():o.replace(/^\s*\*(?: |(?=\S)|$)/,"").replace(/\s+$/,"")),n=[{tag:null,lines:[]}],i=null;for(let o of r){let a=/^\s*(```+|~~~+)/.exec(o);if(a){let f=a[1];i===null?i=f[0].repeat(f.length):f.startsWith(i)&&(i=null)}let l=i===null&&!a?zg(o):[];if(l.length===0){n[n.length-1].lines.push(o);continue}let c=o.slice(0,l[0]).replace(/\s+$/,"");c!==""&&n[n.length-1].lines.push(c),l.forEach((f,h)=>{let p=o.slice(f,l[h+1]??o.length).replace(/\s+$/,""),m=/^@([A-Za-z][\w-]*)\s*([\s\S]*)$/.exec(p);n.push({tag:m[1],lines:[m[2]]})})}let s={summary:Wu(n[0].lines),tags:[],parameters:new Map,typeParameters:new Map,returns:""};for(let o of n.slice(1)){let a=o.tag,l=Wu(o.lines);if(a==="param"||a==="template"||a==="typeParam"){let c=/^(?:\{[^}]*\}\s*)?\[?([\w$.]+)(?:=[^\]]*)?\]?\s*(?:-\s*)?([\s\S]*)$/.exec(l);if(c){let f=a==="param"?s.parameters:s.typeParameters;!c[1].includes(".")&&!f.has(c[1])&&f.set(c[1],c[2].trim())}}else a==="returns"||a==="return"?s.returns=l.replace(/^\{[^}]*\}\s*/,""):s.tags.push({tag:a,text:l})}return s}async function Gg(){let t;try{t=await import("typescript")}catch(r){let n=r instanceof Error?r.message:String(r);throw new Error(`The "typescript" datasource needs the "typescript" package (${ju}). Install it in your project (npm install -D typescript). Cause: ${n}`,{cause:r})}let e=t.default??t;if(typeof e.createProgram!="function")throw new Error(`The "typescript" datasource needs the TypeScript compiler API (${ju}); the installed "typescript" package does not provide it.`);return e}function Mr(t){return t.split(Kn).join("/")}function Yg(t){let e=t.map(i=>To(i).split(Kn)),r=e[0]??[],n=r.length;for(let i of e){let s=0;for(;s<n&&s<i.length&&i[s]===r[s];)s++;n=s}return r.slice(0,n).join(Kn)||Kn}var Io=/\{@link(?:code|plain)?\s+([^}|\s]+)(?:\s*\|\s*|\s+)?([^}]*)\}/g;function Kg(t){let e=new Map(t.map(r=>[r.name,r]));for(let r of t){let n=[],i=[...r.extends,...r.implements],s=(f,h)=>{n.push(f,...h.map(p=>p.text))},o=f=>{for(let h of f)i.push(h.constraint??"",h.default??"")},a=f=>{s(f.summary,f.tags),n.push(...f.parameters.map(h=>h.description)),i.push(...f.parameters.map(h=>h.type)),o(f.typeParameters),f.returns&&(n.push(f.returns.description),i.push(f.returns.type))};s(r.summary,r.tags),o(r.typeParameters),r.signatures.forEach(a);for(let f of r.members)s(f.summary,f.tags),f.type!==null&&i.push(f.type),f.signatures.forEach(a);let l=new Map,c=r.referenceOf?[r.referenceOf]:[];for(let f of n)for(let h of f.matchAll(Io))c.push(h[1]);for(let f of i)for(let h of Ro(f))h.identifier&&c.push(h.text);for(let f of c){if(l.has(f))continue;let[h,...p]=f.split(/[.#]/),m=e.get(h??"");m&&l.set(f,{target:f,name:m.name,kind:m.kind,kindDir:m.kindDir,page:m.page,member:p.length>0?p.join("."):null})}r.links=[...l.values()]}}function Ro(t){let e=[],r=/(['"`])(?:\\.|(?!\1)[^\\])*\1|[A-Za-z_$][\w$]*/g,n=0;for(let i of t.matchAll(r)){let s=i[1]===void 0,o=t[i.index-1]===".";!s||o||(i.index>n&&e.push({text:t.slice(n,i.index),identifier:!1}),e.push({text:i[0],identifier:!0}),n=i.index+i[0].length)}return n<t.length&&e.push({text:t.slice(n),identifier:!1}),e}function Jg(t,e){return t<e?-1:t>e?1:0}function Po(t,e){let r=t.toLowerCase(),n=e.toLowerCase();return r!==n?r<n?-1:1:t<e?-1:t>e?1:0}var Do=class{constructor(e,r,n,i){this.ts=e;this.program=r;this.checker=n;this.options=i;this.typeFlags=e.TypeFormatFlags.NoTruncation|e.TypeFormatFlags.UseAliasDefinedOutsideCurrentScope}ts;program;checker;options;typeFlags;extract(e){let{ts:r,checker:n}=this,i=new Map;for(let a of e){let l=this.program.getSourceFile(a);if(!l)throw new Error(`TypeScript entry point not found in the program: ${a}`);let c=n.getSymbolAtLocation(l);if(c)for(let f of n.getExportsOfModule(c)){let h=f.flags&r.SymbolFlags.Alias?n.getAliasedSymbol(f):f,p=i.get(h)??[];p.some(m=>m.name===f.name)||p.push(f),i.set(h,p)}}let s=[];for(let[a,l]of i){let c=l.find(h=>h.name===a.name)??l[0],f=this.buildSymbol(c.name,a);if(f){s.push(f);for(let h of l){if(h===c)continue;let p=this.buildReference(h,f.symbol);p&&s.push(p)}}}s.sort((a,l)=>{if(this.options.sort==="source-order"){let c=Jg(a.position[0],l.position[0]);if(c!==0)return c;if(a.position[1]!==l.position[1])return a.position[1]-l.position[1]}return Po(a.symbol.name,l.symbol.name)});let o=s.map(a=>a.symbol);return Kg(o),o}buildReference(e,r){let n=e.declarations?.[0];if(!n)return null;let i=this.docOf(n);if(this.isHidden(i.tags))return null;let s=n.getSourceFile();return{symbol:{name:e.name,kind:"reference",kindLabel:Nt.reference.label,kindDir:Nt.reference.dir,category:null,summary:i.summary,tags:i.tags,code:null,typeParameters:[],extends:[],implements:[],signatures:[],members:[],source:this.sourceOf(n),abstract:!1,hasPage:!1,page:null,referenceOf:r.name,links:[]},position:[Mr(Yn(this.options.baseDir,s.fileName)),this.nameNode(n).getStart()]}}buildSymbol(e,r){let{ts:n}=this,i=(r.declarations??[]).filter(h=>!this.isExcludedFile(h)),s=this.primaryDeclaration(i);if(!s)return null;let o=this.kindOf(s);if(!o)return null;let a=this.docOf(s);if(this.isHidden(a.tags))return null;let l=a.tags.find(h=>h.tag==="category"),c={name:e,kind:o,kindLabel:Nt[o].label,kindDir:Nt[o].dir,category:l&&l.text.trim()||null,summary:a.summary,tags:a.tags,code:null,typeParameters:[],extends:[],implements:[],signatures:[],members:[],source:this.sourceOf(s),abstract:n.isClassDeclaration(s)&&this.modifiers(s).has(n.SyntaxKind.AbstractKeyword),hasPage:this.options.pages.has(o),page:this.options.pages.has(o)?`${Nt[o].dir}/${e}.md`:null,referenceOf:null,links:[]};if(n.isClassDeclaration(s))c.typeParameters=this.typeParameters(s.typeParameters,a),this.heritage(s,c),c.members=this.members(s.members,e);else if(n.isInterfaceDeclaration(s)){c.typeParameters=this.typeParameters(s.typeParameters,a);let h=i.filter(n.isInterfaceDeclaration);for(let p of h)this.heritage(p,c);c.members=h.flatMap(p=>this.members(p.members,e))}else if(n.isEnumDeclaration(s))c.members=i.filter(n.isEnumDeclaration).flatMap(h=>h.members.map(p=>this.enumMember(p))).filter(h=>h!==null);else if(n.isTypeAliasDeclaration(s)){c.typeParameters=this.typeParameters(s.typeParameters,a);let h=this.typeParameterList(s.typeParameters);c.code=`type ${e}${h} = ${s.type.getText()};`,n.isTypeLiteralNode(s.type)&&(c.members=this.members(s.type.members,e))}else if(o==="function")c.signatures=this.functionSignatures(e,r,s);else if(n.isVariableDeclaration(s)){let h=(n.getCombinedNodeFlags(s)&n.NodeFlags.Const)!==0,p=s.type?s.type.getText():this.checker.typeToString(this.checker.getTypeAtLocation(s.name),void 0,this.typeFlags);c.code=`${h?"const":"let"} ${e}: ${p};`,c.members=this.variableMembers(s)}let f=s.getSourceFile();return{symbol:c,position:[Mr(Yn(this.options.baseDir,f.fileName)),this.nameNode(s).getStart()]}}isExcludedFile(e){if(!this.options.excludeExternals)return!1;let r=e.getSourceFile();return this.program.isSourceFileFromExternalLibrary(r)||this.program.isSourceFileDefaultLibrary(r)||Mr(r.fileName).includes("/node_modules/")}primaryDeclaration(e){let{ts:r}=this,n=[r.isClassDeclaration,r.isInterfaceDeclaration,r.isEnumDeclaration,r.isTypeAliasDeclaration,r.isFunctionDeclaration,r.isVariableDeclaration,r.isModuleDeclaration];for(let i of n){let s=e.find(i);if(s)return s}}kindOf(e){let{ts:r}=this;if(r.isClassDeclaration(e))return"class";if(r.isInterfaceDeclaration(e))return"interface";if(r.isEnumDeclaration(e))return"enum";if(r.isTypeAliasDeclaration(e))return"type";if(r.isFunctionDeclaration(e))return"function";if(r.isModuleDeclaration(e))return"namespace";if(r.isVariableDeclaration(e)){let n=e.initializer;return n!==void 0&&(r.isArrowFunction(n)||r.isFunctionExpression(n))&&!e.type?"function":"variable"}return null}nameNode(e){return e.name??e}sourceOf(e){let r=e.getSourceFile(),n=r.getLineAndCharacterOfPosition(this.nameNode(e).getStart()).line+1,i=Mr(Yn(this.options.baseDir,r.fileName)),s=Mr(Yn(this.options.displayDir,r.fileName)),o=null,a=this.options.sourceLinkTemplate;return a&&(o=a.replace(/\{gitRevision\}/g,this.options.gitRevision??"").replace(/\{path\}/g,i).replace(/\{line\}/g,String(n))),{file:s,path:i,line:n,url:o}}docOf(e){let{ts:r}=this,n=r.getJSDocCommentsAndTags(e).filter(r.isJSDoc),i=n[n.length-1];return i?Ug(i.getSourceFile().text.slice(i.pos,i.end)):Vg}isHidden(e){return e.some(r=>Wg.has(r.tag)||this.options.excludeInternal&&r.tag==="internal")}typeText(e,r){return e?e.getText():this.checker.typeToString(r(),void 0,this.typeFlags)}typeParameterList(e){return!e||e.length===0?"":`<${e.map(r=>r.getText()).join(", ")}>`}typeParameters(e,r){return e?e.map(n=>({name:n.name.text,constraint:n.constraint?n.constraint.getText():null,default:n.default?n.default.getText():null,description:r.typeParameters.get(n.name.text)??""})):[]}heritage(e,r){let{ts:n}=this;for(let i of e.heritageClauses??[]){let s=i.types.map(o=>o.getText());i.token===n.SyntaxKind.ExtendsKeyword?r.extends.push(...s):r.implements.push(...s)}}parameters(e,r){let{ts:n}=this;return e.map(i=>({name:i.name.getText(),type:this.typeText(i.type,()=>this.checker.getTypeAtLocation(i)),optional:i.questionToken!==void 0||i.initializer!==void 0,rest:i.dotDotDotToken!==void 0,defaultValue:i.initializer?i.initializer.getText():null,description:n.isIdentifier(i.name)?r.parameters.get(i.name.text)??"":""}))}parameterCode(e){return e.map(r=>`${r.rest?"...":""}${r.name}${r.optional&&!r.rest?"?":""}: ${r.type}`).join(", ")}returnsOf(e,r,n){return{type:e.type?e.type.getText():r?this.checker.typeToString(this.checker.getReturnTypeOfSignature(r),void 0,this.typeFlags):"void",description:n.returns}}signature(e,r,n,i="",s=e){let o=this.docOf(s),a=this.parameters(e.parameters,o),l=this.typeParameters(e.typeParameters,o),c=this.checker.getSignatureFromDeclaration(e),f=null,h="";n==="construct"?h=`: ${i}`:n!=="set"&&(f=this.returnsOf(e,c,o),h=`: ${f.type}`);let p=this.typeParameterList(e.typeParameters);return{code:`${r}${p}(${this.parameterCode(a)})${h};`,summary:o.summary,tags:o.tags,typeParameters:l,parameters:a,returns:f,source:this.sourceOf(s)}}publicOverloads(e){let r=e.filter(n=>!("body"in n)||n.body===void 0);return r.length>0?r:e}functionSignatures(e,r,n){let{ts:i}=this;if(i.isVariableDeclaration(n)){let o=n.initializer;return o&&(i.isArrowFunction(o)||i.isFunctionExpression(o))?[this.signature(o,`function ${e}`,"call","",n)]:[]}let s=(r.declarations??[]).filter(i.isFunctionDeclaration);return this.publicOverloads(s).map(o=>this.signature(o,`function ${e}`,"call"))}modifiers(e){let{ts:r}=this,n=r.canHaveModifiers(e)?r.getModifiers(e)??[]:[];return new Set(n.map(i=>i.kind))}isPrivate(e,r){let n=e.name;return r.has(this.ts.SyntaxKind.PrivateKeyword)||n!==void 0&&this.ts.isPrivateIdentifier(n)}members(e,r){let{ts:n}=this,i=new Map,s=[];for(let a of e){if(n.isClassStaticBlockDeclaration(a)||n.isSemicolonClassElement(a))continue;let l=this.modifiers(a);if(this.options.excludePrivate&&this.isPrivate(a,l))continue;let c;if(n.isConstructorDeclaration(a)||n.isConstructSignatureDeclaration(a))c="constructor";else if(n.isCallSignatureDeclaration(a))c="()";else if(n.isIndexSignatureDeclaration(a))c=`[${a.parameters.map(f=>f.getText()).join(", ")}]`;else{let f=a.name?a.name.getText():"";c=`${l.has(n.SyntaxKind.StaticKeyword)?"static ":""}${f}`}i.has(c)||(i.set(c,[]),s.push(c)),i.get(c).push(a)}let o=[];for(let a of s){let l=this.member(i.get(a),r);l&&o.push(l),a==="constructor"&&o.push(...this.parameterProperties(i.get(a)))}return this.options.sort==="alphabetical"&&o.sort((a,l)=>Po(a.name,l.name)),o}member(e,r){let{ts:n}=this,i=e[0],s=this.docOf(i);if(this.isHidden(s.tags))return null;let o=this.modifiers(i),a=o.has(n.SyntaxKind.StaticKeyword),l=o.has(n.SyntaxKind.AbstractKeyword),c=`${a?"static ":""}${l?"abstract ":""}`,f={static:a,readonly:o.has(n.SyntaxKind.ReadonlyKeyword),optional:i.questionToken!==void 0,protected:o.has(n.SyntaxKind.ProtectedKeyword),abstract:l,summary:s.summary,tags:s.tags,source:this.sourceOf(i)};if(n.isConstructorDeclaration(i)||n.isConstructSignatureDeclaration(i)){let p=this.publicOverloads(e),m=`${r}${this.ownerTypeArguments(i)}`;return{...f,name:"constructor",kind:"constructor",type:null,signatures:p.map(g=>this.signature(g,`new ${r}`,"construct",m))}}if(n.isCallSignatureDeclaration(i))return{...f,name:"()",kind:"call-signature",type:null,signatures:e.map(p=>this.signature(p,"","call"))};if(n.isIndexSignatureDeclaration(i)){let p=i.parameters.map(m=>m.getText()).join(", ");return{...f,name:`[${p}]`,kind:"index-signature",type:this.typeText(i.type,()=>this.checker.getTypeAtLocation(i)),signatures:[]}}let h=i.name?i.name.getText():"";if(n.isMethodDeclaration(i)||n.isMethodSignature(i)){let p=this.publicOverloads(e);return{...f,name:h,kind:"method",type:null,signatures:p.map(m=>this.signature(m,`${c}${h}`,"call"))}}if(n.isGetAccessorDeclaration(i)||n.isSetAccessorDeclaration(i)){let p=e.filter(n.isGetAccessorDeclaration),m=e.filter(n.isSetAccessorDeclaration);return{...f,name:h,kind:"accessor",type:null,signatures:[...p.map(g=>this.signature(g,`${c}get ${h}`,"get")),...m.map(g=>this.signature(g,`${c}set ${h}`,"set"))]}}return n.isPropertyDeclaration(i)||n.isPropertySignature(i)?{...f,name:h,kind:"property",type:this.typeText(i.type,()=>this.checker.getTypeAtLocation(i.name)),signatures:[]}:null}variableMembers(e){let{ts:r,checker:n}=this,i=n.getTypeAtLocation(e.name),s=i.isIntersection()?i.types:[i],o=[];for(let a of s){let l=a.getSymbol();if(!(!l||!(l.flags&(r.SymbolFlags.ObjectLiteral|r.SymbolFlags.TypeLiteral))))for(let c of n.getPropertiesOfType(a)){let f=c.valueDeclaration??c.declarations?.[0];if(!f)continue;let h=this.docOf(f);this.isHidden(h.tags)||o.push({name:c.name,kind:"property",static:!1,readonly:!1,optional:(c.flags&r.SymbolFlags.Optional)!==0,protected:!1,abstract:!1,type:n.typeToString(n.getTypeOfSymbolAtLocation(c,e),void 0,this.typeFlags),summary:h.summary,tags:h.tags,signatures:[],source:this.sourceOf(f)})}}return this.options.sort==="alphabetical"&&o.sort((a,l)=>Po(a.name,l.name)),o}parameterProperties(e){let{ts:r}=this,n=[];for(let i of e){if(!r.isConstructorDeclaration(i))continue;let s=this.docOf(i);for(let o of i.parameters){if(!r.isParameterPropertyDeclaration(o,i)||!r.isIdentifier(o.name))continue;let a=this.modifiers(o);this.options.excludePrivate&&a.has(r.SyntaxKind.PrivateKeyword)||n.push({name:o.name.text,kind:"property",static:!1,readonly:a.has(r.SyntaxKind.ReadonlyKeyword),optional:o.questionToken!==void 0||o.initializer!==void 0,protected:a.has(r.SyntaxKind.ProtectedKeyword),abstract:!1,type:this.typeText(o.type,()=>this.checker.getTypeAtLocation(o)),summary:s.parameters.get(o.name.text)??"",tags:[],signatures:[],source:this.sourceOf(o)})}}return n}ownerTypeArguments(e){let r=e.parent;return this.ts.isClassDeclaration(r)&&r.typeParameters&&r.typeParameters.length>0?`<${r.typeParameters.map(n=>n.name.text).join(", ")}>`:""}enumMember(e){let r=this.docOf(e);if(this.isHidden(r.tags))return null;let n=this.checker.getConstantValue(e);return{name:e.name.getText(),kind:"enum-member",static:!1,readonly:!0,optional:!1,protected:!1,abstract:!1,type:n===void 0?e.initializer?.getText()??null:JSON.stringify(n),summary:r.summary,tags:r.tags,signatures:[],source:this.sourceOf(e)}}},Jn=class{type="typescript";data=null;config;constructor(e){let r=e.entry_points;if(!Array.isArray(r)||r.length===0||!r.every(o=>typeof o=="string"))throw new Error('TypeScript datasource requires "entry_points" (a list of file paths)');let n=e.source_link_template;if(n!==void 0&&typeof n!="string")throw new Error('TypeScript datasource "source_link_template" must be a string');if(typeof n=="string"&&n.includes("{gitRevision}")&&typeof e.git_revision!="string")throw new Error('TypeScript datasource "source_link_template" uses {gitRevision}; set "git_revision" (e.g. main)');let i=e.sort;if(i!==void 0&&i!=="source-order"&&i!=="alphabetical")throw new Error('TypeScript datasource "sort" must be "source-order" or "alphabetical"');let s=e.pages;if(s!==void 0&&(!Array.isArray(s)||!s.every(o=>typeof o=="string"&&o in Nt)))throw new Error(`TypeScript datasource "pages" must be a list of kinds (${Object.keys(Nt).join(", ")})`);for(let o of["exclude_internal","exclude_private","exclude_externals"])if(e[o]!==void 0&&typeof e[o]!="boolean")throw new Error(`TypeScript datasource "${o}" must be true or false`);this.config=e}async loadData(){if(this.data!==null)return this.data;let e=await Gg(),r=process.cwd(),n=this.config.entry_points.map(l=>$u(r,l)),i=this.config.tsconfig?$u(r,this.config.tsconfig):e.findConfigFile(To(n[0]),e.sys.fileExists),s={};if(i){let l=e.readConfigFile(i,e.sys.readFile);if(l.error)throw new Error(`Cannot read ${i}: ${e.flattenDiagnosticMessageText(l.error.messageText,`
867
- `)}`);s=e.parseJsonConfigFileContent(l.config,e.sys,To(i)).options}s={...s,noEmit:!0};let o=e.createProgram({rootNames:n,options:s}),a=new Do(e,o,o.getTypeChecker(),{excludeInternal:this.config.exclude_internal??!0,excludePrivate:this.config.exclude_private??!0,excludeExternals:this.config.exclude_externals??!0,pages:new Set(this.config.pages??[]),sourceLinkTemplate:this.config.source_link_template??null,gitRevision:this.config.git_revision??null,sort:this.config.sort??"source-order",baseDir:r,displayDir:Yg(n)});return this.data=a.extract(n),this.data}async query(e,r=[]){return Xe(await this.loadData(),e,r)}async getAll(){return this.loadData()}async close(){this.data=null}};function Lo(t){return new Jn(t)}async function Qg(t,e){if(e&&t.type in e)return e[t.type].create(t);switch(t.type){case"sqlite":return Vs(t);case"csv":return Gs(t);case"json":return Ys(t);case"yaml":return Ks(t);case"glob":return Oo(t);case"typescript":return Lo(t);default:throw new Error(`Unknown datasource type: "${t.type}". Register custom types in datasources_dir.`)}}async function Fr(t,e){let r={};if(t.datasources)for(let[n,i]of Object.entries(t.datasources))r[n]=await Qg(i,e);return r}async function Br(t){for(let e of Object.values(t))await e.close()}import{readFile as iy,writeFile as sy}from"node:fs/promises";import{resolve as nh}from"node:path";var Zg={html:{start:"<!--",end:"-->"},block:{start:"/*",end:"*/"},line:{start:"//",end:""},hash:{start:"#",end:""},sql:{start:"--",end:""}};function zu(t){let e={},r=/(\w+)=["']([^"']*)["']/g,n;for(;(n=r.exec(t))!==null;){let i=n[1],s=n[2];i&&s!==void 0&&(e[i]=s)}return e}function Zn(t){let e=t.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);if(!e)return{data:{},content:t,raw:""};let r=e[1]??"",n=Ze.load(r);return{data:n&&typeof n=="object"&&!Array.isArray(n)?n:{},content:t.slice(e[0].length),raw:e[0]}}function Xn(t){let e=t.split(".").pop()?.toLowerCase()??"";return e==="md"||e==="markdown"||e==="mdx"}function Uu(t){let e=[],r=null,n=0;for(let i of t.split(`
868
- `)){let s=n+i.length+1,o=/^ {0,3}(`{3,}|~{3,})(.*)$/.exec(i.replace(/\r$/,""));if(o){let a=o[1];r===null?a[0]==="`"&&o[2].includes("`")||(r={char:a[0],length:a.length,start:n}):a[0]===r.char&&a.length>=r.length&&o[2].trim()===""&&(e.push([r.start,Math.min(s,t.length)]),r=null)}n=s}return r!==null&&e.push([r.start,t.length]),e}function Gu(t){return e=>t.some(([r,n])=>e>=r&&e<n)}function Yu(t,e,r,n){let i=new RegExp(t.source,t.flags.includes("g")?t.flags:t.flags+"g");i.lastIndex=r;let s;for(;(s=i.exec(e))!==null;){if(!n(s.index))return s;s[0].length===0&&i.lastIndex++}return null}function ei(t,e,r={}){let n=[],{start:i,end:s}=e,o=Gu(r.markdown?Uu(t):[]),a=Qn(i),l=s?Qn(s):"",c;s?c=new RegExp(`${a}\\s*@embedoc:(?!end\\b)(\\w+)\\s*([^]*?)\\s*${l}`,"g"):c=new RegExp(`${a}\\s*@embedoc:(?!end\\b)(\\w+)\\s*(.*)$`,"gm");let f;s?f=new RegExp(`${a}\\s*@embedoc:end\\s*${l}`):f=new RegExp(`${a}\\s*@embedoc:end\\s*$`,"m");let h;for(;(h=c.exec(t))!==null;){let p=h.index;if(o(p))continue;let m=h[0],g=h[1],_=h[2]?.trim()??"",O=p+m.length,b=t.slice(O),S=Yu(f,t,O,o),I=S&&{index:S.index-O,0:S[0]};if(I){let N=/(?:^|\n)([ \t]+)$/.exec(b.slice(0,I.index))?.[1]??"",z=I.index-N.length,U=N+I[0],$=O+z+U.length,Q=b.slice(0,z);g&&n.push({startIndex:p,endIndex:$,templateName:g,params:zu(_),existingContent:Q,startMarkerLine:m,endMarkerLine:U}),c.lastIndex=$}}return n}function ti(t,e){let n={...Zg,...e}[t];if(!n)throw new Error(`Unknown comment style: ${t}`);return n}function Vu(t,e){return t.slice(0,e).split(`
869
- `).length}function Ku(t,e,r={}){let n=[],{start:i,end:s}=e,o=Gu(r.markdown?Uu(t):[]),a=Qn(i),l=s?Qn(s):"",c,f;s?(c=new RegExp(`${a}\\s*@embedoc-data:(?!end\\s*${l})([\\w.]+)(?:\\s+([^\\n]*?))?\\s*${l}`,"g"),f=new RegExp(`${a}\\s*@embedoc-data:end\\s*${l}`)):(c=new RegExp(`${a}\\s*@embedoc-data:(?!end\\s*$)([\\w.]+)(?:\\s+(.*))?$`,"gm"),f=new RegExp(`${a}\\s*@embedoc-data:end\\s*$`,"m"));let h;for(;(h=c.exec(t))!==null;){let p=h.index;if(o(p))continue;let m=h[0],g=h[1],_=h[2]?.trim()??"";if(!g||g==="end")continue;let b=zu(_).format??"yaml",S=p+m.length,I=t.slice(S),L=Yu(f,t,S,o),N=L&&{index:L.index-S,0:L[0]};if(N){let z=I.slice(0,N.index),U=Vu(t,p),$=Vu(t,S+N.index+N[0].length);n.push({name:g,format:b,content:z,startLine:U,endLine:$,byteSize:Buffer.byteLength(z,"utf-8")})}}return n}function Qn(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ju(t){return t==null?"":String(t).replace(/\|/g,"\\|").replace(/\n/g,"<br>")}function Qu(){return{table(t,e){if(t.length===0)return"";let r=[],n="| "+t.map(Ju).join(" | ")+" |";r.push(n);let i="| "+t.map(()=>"---").join(" | ")+" |";r.push(i);for(let s of e){let a="| "+t.map((l,c)=>Ju(s[c])).join(" | ")+" |";r.push(a)}return r.join(`
870
- `)},list(t,e=!1){return t.map((r,n)=>`${e?`${n+1}.`:"-"} ${r}`).join(`
871
- `)},codeBlock(t,e=""){return"```"+e+`
872
- `+t+"\n```"},link(t,e){return`[${t}](${e})`},heading(t,e=1){return`${"#".repeat(Math.min(Math.max(e,1),6))} ${t}`},bold(t){return`**${t}**`},italic(t){return`*${t}*`},checkbox(t){return t?"\u2714":""}}}import Zu from"node:path";var Mo=["^```\\w*\\s*\\n?","\\n?```\\s*$"],Xg={enabled:!0,maxBytes:10240,allowedFormats:["yaml","json","js","csv","table","text"],conflictPolicy:"warn",allowAnonymous:!1,stripCodeFences:!0,stripPatterns:Mo};function eh(t){return t.replace(/\[(\d+)\]/g,".$1").split(".").filter(e=>e.length>0).map(e=>/^\d+$/.test(e)?parseInt(e,10):e)}function Fo(t,e){let r=eh(e),n=t;for(let i of r){if(n==null)return;n=n[i]}return n}function th(t,e,r){let n=eh(e);if(n.length===0)return;let i=t;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 i||(i[a]=typeof l=="number"?[]:{}),i=i[a]}let s=n[n.length-1];i[s]=r}function ey(t){let e=t.indexOf(".");return e===-1?t:t.slice(0,e)}function ty(t,e){let r=t.trim();for(let n of e){let i=new RegExp(n);r=r.replace(i,"")}return r.trim()}function Xu(t,e,r={},n){let{stripCodeFences:i=!0,stripPatterns:s}=r,o=t;i&&(o=ty(o,s??Mo));let a=o.trim();switch(e){case"yaml":return Ze.load(a,{schema:Ze.JSON_SCHEMA})??{};case"json":return a?JSON.parse(a):{};case"js":case"javascript":return a?new Function("return ("+a+")")():{};case"csv":return ry(a);case"table":return ny(a);case"text":return a;default:{let l=n?.[e];return l?l(a):a}}}function ry(t){let e=t.split(`
873
- `).filter(s=>s.trim().length>0);if(e.length===0)return[];let r=e[0];if(!r)return[];let n=r.split(",").map(s=>s.trim()),i=[];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]??""}),i.push(l)}return i}function ny(t){let e=t.split(`
874
- `).map(s=>s.trim()).filter(s=>s.length>0&&!s.match(/^\|[-:| ]+\|$/));if(e.length===0)return[];let r=e[0];if(!r)return[];let n=r.split("|").map(s=>s.trim()).filter(s=>s.length>0),i=[];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]??""}),i.push(c)}return i}var No=class{type="inline";format;documentPath;startLine;endLine;byteSize;data;_isObject;_locations;constructor(e,r,n,i,s,o,a=[]){this.data=e,this.format=r,this.documentPath=n,this.startLine=i,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,r){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 Fo(this.data,e)}isObjectType(){return this._isObject}async close(){}merge(e,r){if(!this._isObject)throw new Error("Cannot merge into array datasource");th(this.data,e,r)}getMeta(e="",r){let n=this._locations.find(i=>i.propertyPath===e);return n?this._buildLocation(n,r):null}getAllMeta(e){return this._locations.map(r=>this._buildLocation(r,e))}get locations(){return this._locations}_buildLocation(e,r){let n=this.documentPath;if(r){let i=Zu.dirname(r);n=Zu.relative(i,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 rh(t,e,r={},n){let i={...Xg,...r},s=new Map,o={stripCodeFences:i.stripCodeFences,stripPatterns:r.stripPatterns??Mo},a=new Map;for(let l of t){if(l.byteSize>i.maxBytes)throw new Error(`Inline datasource "${l.name}" exceeds max size (${l.byteSize} > ${i.maxBytes} bytes)`);if(!(n!=null&&l.format in n)&&!i.allowedFormats.includes(l.format))throw new Error(`Inline datasource "${l.name}" uses disallowed format "${l.format}"`);let f=ey(l.name);a.has(f)||a.set(f,[]),a.get(f).push(l)}for(let[l,c]of a){let f=c.find(b=>b.name===l),h,p="yaml",m=0,g=0,_=0,O=[];f?(h=Xu(f.content,f.format,o,n),p=f.format,m=f.startLine,g=f.endLine,_=f.byteSize,O.push({propertyPath:"",startLine:f.startLine,endLine:f.endLine,format:f.format})):h={};for(let b of c)if(b.name!==l&&b.name.startsWith(l+".")){let S=b.name.slice(l.length+1),I=Xu(b.content,b.format,o,n);(typeof h!="object"||h===null)&&(h={}),th(h,S,I),O.push({propertyPath:S,startLine:b.startLine,endLine:b.endLine,format:b.format}),(m===0||b.startLine<m)&&(m=b.startLine),b.endLine>g&&(g=b.endLine),_+=b.byteSize}s.set(l,new No(h,p,e,m,g,_,O))}return s}function oy(t,e,r){let n={};for(let[i,s]of Object.entries(t))n[i]=s.replace(/\$\{(\w+(?:\.\w+|\[\d+\])*)\}/g,(o,a)=>{let l=a.split("."),c=l[0];if(!c)return"";let f=r.get(c);if(f){let p=l.slice(1).join(".");if(p){let g=Fo(f.data,p);return g!=null?String(g):""}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 ay(t,e,r,n,i,s,o=!1,a){let l={filePath:t,success:!0,markersUpdated:0,changed:!1};try{let c=ti(r.comment_style,s.comment_styles),{data:f,content:h,raw:p}=Zn(e),m=p?p.split(`
875
- `).length-1:0,g={markdown:Xn(t)},_=Ku(h,c,g);for(let $ of _)$.startLine+=m,$.endLine+=m;let O=rh(_,t,s.inline_datasource,a),b={...i};for(let[$,Q]of O){if($ in b){let ee=s.inline_datasource?.conflictPolicy??"warn";if(ee==="error")throw new Error(`Inline datasource "${$}" conflicts with external datasource (conflict_policy: error)`);if(ee==="prefer_external")continue;console.warn(`Warning: Inline datasource "${$}" overrides external datasource in ${t}`)}b[$]=Q}let S=ei(h,c,g);if(S.length===0&&_.length===0)return l;let I=Qu(),L=S.filter($=>!n[$.templateName]);if(L.length>0){let $=L.map(Q=>{let ee=m+h.slice(0,Q.startIndex).split(`
876
- `).length;return`"${Q.templateName}" at ${t}:${ee}`});throw new Error(`Unknown embed ${$.join(", ")} (no renderer has this name)`)}let N=h,z=[...S].sort(($,Q)=>Q.startIndex-$.startIndex);for(let $ of z){let Q=n[$.templateName],ue={params:oy($.params,f,O),frontmatter:f,datasources:b,markdown:I,filePath:t,existingContent:$.existingContent},ae=await Q.render(ue);if(ae.content===null||ae.content===void 0)continue;let B=$.params.inline==="true"?$.startMarkerLine+ae.content+$.endMarkerLine:$.startMarkerLine+`
877
- `+ae.content+`
878
- `+$.endMarkerLine;N=N.slice(0,$.startIndex)+B+N.slice($.endIndex),l.markersUpdated++}let U=p+N;if(U!==e&&(l.changed=!0,!o)){let Q=(s.output?.line_ending??"lf")==="crlf"?U.replace(/\r?\n/g,`\r
879
- `):U;await sy(t,Q,{encoding:s.output?.encoding??"utf-8"})}for(let $ of O.values())await $.close()}catch(c){l.success=!1,l.error=c instanceof Error?c:new Error(String(c))}return l}async function qr(t){return await Et(t.pattern,{ignore:t.exclude??[],nodir:!0})}async function Bo(t,e,r,n={}){let i=Date.now(),s=[],o=n.specificFiles&&n.specificFiles.length>0?new Set(n.specificFiles.map(l=>nh(l))):null;for(let l of t.targets){let c=await qr(l);o&&(c=c.filter(f=>o.has(nh(f))));for(let f of c){n.verbose&&console.log(`Processing: ${f}`);try{let h=await iy(f,{encoding:"utf-8"}),p=await ay(f,h,l,e,r,t,n.dryRun,n.customInlineFormats);s.push(p),n.verbose&&p.markersUpdated>0&&console.log(` Updated ${p.markersUpdated} marker(s)${p.changed?" (changed)":" (no changes)"}`)}catch(h){s.push({filePath:f,success:!1,markersUpdated:0,changed:!1,error:h instanceof Error?h:new Error(String(h))}),n.verbose&&console.error(` Error: ${h}`)}}}let a=Date.now()-i;return{totalFiles:s.length,successFiles:s.filter(l=>l.success).length,failedFiles:s.filter(l=>!l.success).length,totalMarkersUpdated:s.reduce((l,c)=>l+c.markersUpdated,0),results:s,duration:a}}var ye=zi(Zf(),1);import{readFile as yw,writeFile as _w,mkdir as bw,access as ww,unlink as vw}from"node:fs/promises";import{dirname as Sw,join as xw,resolve as id}from"node:path";var ow=[{kind:"constructor",title:"Constructors"},{kind:"call-signature",title:"Call Signature"},{kind:"index-signature",title:"Indexable"},{kind:"property",title:"Properties"},{kind:"accessor",title:"Accessors"},{kind:"method",title:"Methods"},{kind:"enum-member",title:"Enumeration Members"}];var aw=new Set(["example","deprecated","see","default","defaultValue","internal","category"]),lw=new Set(["example","deprecated","see","remarks","default","defaultValue","internal","category"]);function cw(t){if(typeof t.name!="string"||typeof t.kind!="string"||typeof t.kindDir!="string"||!Array.isArray(t.members))throw new Error('Expected a record of the "typescript" datasource (ApiSymbol)');return t}function Na(t){return t.trim().toLowerCase().replace(/[^\p{L}\p{N}\s_-]/gu,"").replace(/\s/g,"-")}function Le(t,e){return`${"#".repeat(Math.min(Math.max(t,1),6))} ${e}`}function Jr(t){return t.replace(/([\\`*_<>[\]|])/g,"\\$1")}function je(t){let e=t.replace(/\s+/g," ").trim(),r=e.includes("`")?"``":"`",n=r==="``"?" ":"";return`${r}${n}${e}${n}${r}`}function Ma(t){return t.replace(/\r?\n\s*\r?\n/g,"<br><br>").replace(/\s*\r?\n\s*/g," ").trim()}function La(t){return`| ${t.map(e=>e.replace(/(?<!\\)\|/g,"\\|")).join(" | ")} |`}function Fa(t,e){return[La(t),La(t.map(()=>"------")),...e.map(La)].join(`
880
- `)}function Ba(t,e){if(e.page!==null){let n=t.onOwnPage?`../${e.page}`:e.page;return e.member?`${n}#${Na(e.member)}`:n}let r=`#${Na(e.name)}`;return t.onOwnPage?`../${t.indexFile}${r}`:r}function pt(t,e){return e.replace(Io,(r,n,i)=>{let s=i.trim()||n,o=t.symbol.links.find(a=>a.target===n);return o?`[${je(s)}](${Ba(t,o)})`:je(s)})}function Kr(t,e){let r=[],n="",i=()=>{n.trim()!==""?r.push(je(n)):n!==""&&r.push(" "),n=""};for(let s of Ro(e)){let o=s.identifier?t.symbol.links.find(a=>a.target===s.text):void 0;if(!o||o.name===t.symbol.name){n+=s.text;continue}i(),r.push(`[${je(s.text)}](${Ba(t,o)})`)}return i(),r.join("")}function Xf(t){let e=`${t.file}:${t.line}`;return t.url?`Defined in: [${e}](${t.url})`:`Defined in: ${e}`}function ed(t){return["```ts",t,"```"].join(`
881
- `)}function mt(t,e){return t.filter(r=>r.tag===e)}function Hi(t,e,r,n){let i=[];for(let a of mt(r,"deprecated"))i.push(`> **Deprecated**${a.text?` ${pt(t,a.text)}`:""}`);e&&i.push(pt(t,e));for(let a of mt(r,"remarks"))i.push(Le(n,"Remarks"),pt(t,a.text));for(let a of r){if(lw.has(a.tag))continue;let l=a.tag.charAt(0).toUpperCase()+a.tag.slice(1);i.push(Le(n,l)),a.text&&i.push(pt(t,a.text))}let s=mt(r,"example");if(s.length>0){i.push(Le(n,s.length>1?"Examples":"Example"));for(let a of s){let[l="",...c]=a.text.split(`
882
- `);l.trim()!==""&&!l.trimStart().startsWith("```")&&c.some(f=>f.trimStart().startsWith("```"))?i.push(Le(n+1,Jr(l.trim())),c.join(`
883
- `).trim()):i.push(a.text)}}let o=mt(r,"see");return o.length>0&&i.push(Le(n,"See"),o.map(a=>`- ${pt(t,a.text)}`).join(`
884
- `)),i}function uw(t){let e=[],r=!1;for(let n of t.split(`
885
- `)){if(/^\s*(```|~~~)/.test(n)){r=!r;continue}n.trim()!==""&&e.push(r?je(n):n.trim())}return e.join(" ")}function hw(t,e,r){let n=[];for(let s of mt(r,"deprecated"))n.push(`**Deprecated**${s.text?` ${s.text}`:""}`);e&&n.push(e);for(let s of r)aw.has(s.tag)||n.push(`**${s.tag.charAt(0).toUpperCase()+s.tag.slice(1)}**${s.text?` ${s.text}`:""}`);for(let s of[...mt(r,"default"),...mt(r,"defaultValue")])n.push(`**Default** ${je(s.text)}`);let i=mt(r,"example");i.length>0&&n.push(`**${i.length>1?"Examples":"Example"}** ${i.map(s=>uw(s.text)).join(" ")}`);for(let s of mt(r,"see"))n.push(`**See** ${s.text}`);return Ma(pt(t,n.join(`
886
-
887
- `)))}function td(t,e,r){if(e.length===0)return[];let n=e.some(o=>o.description),i=e.map(o=>{let a=o.name;o.constraint&&(a+=` extends ${o.constraint}`),o.default&&(a+=` = ${o.default}`);let l=[je(a)];return n&&l.push(Ma(pt(t,o.description))),l}),s=n?["Type Parameter","Description"]:["Type Parameter"];return[Le(r,"Type Parameters"),Fa(s,i)]}function rd(t,e,r){let n=[ed(e.code),Xf(e.source)];if(n.push(...Hi(t,e.summary,e.tags,r)),n.push(...td(t,e.typeParameters,r)),e.parameters.length>0){let i=e.parameters.some(a=>a.description||a.defaultValue!==null),s=i?["Parameter","Type","Description"]:["Parameter","Type"],o=e.parameters.map(a=>{let l=`${a.rest?"...":""}${a.name}${a.optional&&!a.rest?"?":""}`,c=[je(l),Kr(t,a.type)];if(i){let f=pt(t,a.description);a.defaultValue!==null&&(f+=`${f?" ":""}**Default** ${je(a.defaultValue)}`),c.push(Ma(f))}return c});n.push(Le(r,"Parameters"),Fa(s,o))}return e.returns&&(n.push(Le(r,"Returns"),Kr(t,e.returns.type)),e.returns.description&&n.push(pt(t,e.returns.description))),n}function fw(t){let e=t.kind==="method"?`${t.name}()`:t.name;return Jr(e)}function dw(t,e,r){let n=[];for(let i of ow){let s=e.filter(o=>o.kind===i.kind);if(s.length!==0){if(n.push(Le(r,i.title)),i.kind==="property"||i.kind==="enum-member"||i.kind==="index-signature"){let o=i.kind==="enum-member",a=o?["Member","Value","Description","Defined in"]:[i.kind==="index-signature"?"Index":"Property","Type","Description","Defined in"],l=s.map(c=>{let f=[c.static?"static":"",c.abstract?"abstract":"",c.readonly&&!o?"readonly":"",c.protected?"protected":""].filter(Boolean).join(" "),h=`<a id="${Na(c.name)}"></a> ${je(`${c.name}${c.optional?"?":""}`)}${f?` (${f})`:""}`,p=c.source.url?`[${c.source.file}:${c.source.line}](${c.source.url})`:`${c.source.file}:${c.source.line}`,m=c.type===null?"":o?je(c.type):Kr(t,c.type);return[h,m,hw(t,c.summary,c.tags),p]});n.push(Fa(a,l));continue}s.forEach((o,a)=>{a>0&&n.push("***"),i.kind!=="call-signature"&&n.push(Le(r+1,fw(o)));let l=i.kind==="call-signature"?r+1:r+2,c=o.signatures.length===0?Hi(t,o.summary,o.tags,l):[];n.push(...c),o.signatures.forEach((f,h)=>{h>0&&n.push("***");let p=f.summary||f.tags.length>0?f:{...f,summary:o.summary,tags:o.tags};n.push(...rd(t,p,l))})})}}return n}function pw(t,e){let r=t.symbol,n=[];if(r.referenceOf!==null){let i=r.links.find(o=>o.target===r.referenceOf),s=i?`[${Jr(r.referenceOf)}](${Ba(t,{...i,member:null})})`:je(r.referenceOf);return n.push(`Renames and re-exports ${s}`),n.push(...Hi(t,r.summary,r.tags,e)),n}return r.code&&n.push(ed(r.code)),r.kind!=="function"&&(n.push(Xf(r.source)),n.push(...Hi(t,r.summary,r.tags,e))),r.extends.length>0&&n.push(Le(e,"Extends"),r.extends.map(i=>`- ${Kr(t,i)}`).join(`
888
- `)),r.implements.length>0&&n.push(Le(e,"Implements"),r.implements.map(i=>`- ${Kr(t,i)}`).join(`
889
- `)),r.kind!=="function"&&n.push(...td(t,r.typeParameters,e)),r.kind==="function"&&r.signatures.forEach((i,s)=>{s>0&&n.push("***"),n.push(...rd(t,i,e))}),n.push(...dw(t,r.members,e)),n}function mw(t,e){let r=e&&t.typeParameters.length>0?`<${t.typeParameters.map(i=>i.name).join(", ")}>`:"",n=t.kind==="function"?"()":"";return Jr(`${t.name}${n}${r}`)}function gw(t,e,r){return{categoryOrder:e.categoryOrder??[],indexFile:e.indexFile??"README.md",onOwnPage:r,symbol:t}}function nd(t,e={}){let r=cw(t),n=gw(r,e,!0),i=`[API](../${n.indexFile}) / ${Jr(r.name)}`,s=r.abstract?`Abstract ${r.kindLabel}`:r.kindLabel,o=Le(1,`${s}: ${mw(r,!0)}`);return[i,o,...pw(n,2)].join(`
864
+ `,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]!==r[i+l])continue e;return this.options.record_delimiter.push(o[a]),this.state.recordDelimiterMaxLength=o[a].length,o[a].length}return 0},__error:function(r){let{encoding:i,raw:s,skip_records_with_error:o}=this.options,a=typeof r=="string"?new Error(r):r;if(o){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(a,s?this.state.rawBuffer.toString(i):void 0)}catch(c){return c}return}else return a},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){let{columns:r,raw:i,encoding:s}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:r===!0,index:this.state.record.length,raw:i?this.state.rawBuffer.toString(s):void 0}},__infoField:function(){let{columns:r}=this.options,i=Array.isArray(r),s=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:s,column:i===!0?r.length>this.state.record.length?r[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var Wa=function(n,e={}){typeof n=="string"&&(n=Buffer.from(n));let t=e&&e.objname?Object.create(null):[],r=Dn(e),i=a=>{r.options.objname===void 0?t.push(a):t[a[0]]=a[1]},s=()=>{},o=r.parse(n,!0,i,s);if(o!==void 0)throw o;return t};function qe(n,e,t){let r=e.match(/WHERE\s+(\w+)\s*=\s*\?/i);if(r&&t.length>0){let i=r[1]??"",s=String(t[0]);return n.filter(o=>String(o[i])===s)}return n}var Ln=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 Jf(this.filePath,{encoding:this.encoding}),t=Wa(e,{columns:!0,skip_empty_lines:!0,trim:!0});return this.data=t,this.data}async query(e,t=[]){return qe(await this.loadData(),e,t)}async getAll(){return this.loadData()}async close(){this.data=null}};function Bi(n){return new Ln(n)}import{readFile as Qf}from"node:fs/promises";var Rn=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 Qf(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=[]){return qe(await this.loadData(),e,t)}async getAll(){return this.loadData()}async close(){this.data=null}};function Hi(n){return new Rn(n)}import{readFile as Zf}from"node:fs/promises";var Nn=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 Zf(this.filePath,{encoding:"utf-8"}),t=Fe.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=[]){return qe(await this.loadData(),e,t)}async getAll(){return this.loadData()}async close(){this.data=null}};function $i(n){return new Nn(n)}import{stat as ld}from"node:fs/promises";import{basename as Ja,dirname as cd,extname as ud}from"node:path";import{lstatSync as Xf,readdirSync as ed,statSync as td}from"node:fs";import{isAbsolute as nd,posix as Mn,resolve as rd}from"node:path";function yt(n,e={}){let t=rd(e.cwd??process.cwd()),r=(e.ignore??[]).flatMap(ji).map(od),i=new Set;for(let s of ji(n)){let{root:o,segments:a,dirOnly:c}=Ya(s);a.length===0||c||new Ui(a,r,o!=="",t,i).start(o===""?t:o,o)}return[...i].sort()}var Ua=process.platform==="darwin"||process.platform==="win32";function Vi(n,e){throw new Error(`Unsupported glob syntax in "${n}": ${e}`)}function ji(n){n.includes("\\")&&Vi(n,'"\\" escapes'),/[@!+?*]\(/.test(n)&&Vi(n,"extended glob");for(let e=n.indexOf("{");e!==-1;e=n.indexOf("{",e+1)){let t=0,r=[],i=-1;for(let d=e;d<n.length;d++){let f=n[d];if(f==="{")t++;else if(f==="}"&&--t===0){i=d;break}else f===","&&t===1&&r.push(d)}if(i===-1)return[n];let s=n.slice(e+1,i);if(r.length===0){/^(-?\d+|[A-Za-z])\.\.(-?\d+|[A-Za-z])(\.\.-?\d+)?$/.test(s)&&Vi(n,`brace range "{${s}}"`);continue}let o=n.slice(0,e),a=n.slice(i+1),c=[e,...r,i],l=[];for(let d=0;d<c.length-1;d++)l.push(n.slice(c[d]+1,c[d+1]));return l.flatMap(d=>ji(o+d+a))}return[n]}function Ya(n){let e=nd(n),t=n.split("/"),r="";for(e&&(r=t[0]===""?"/":`${t[0]}/`,t.shift());t.length>1&&t[0]===".";)t.shift();let i=t.length>1&&t[t.length-1]==="",s=t.filter((a,c)=>a!==""||c===0).filter(a=>a!==""),o=s.filter((a,c)=>!(a==="**"&&s[c-1]==="**"));return{root:r,segments:o,dirOnly:i}}var Wi=/[*?[]/,Ga=new Map;function Ka(n,e,t){if(!Wi.test(e))return Ua?n.toLowerCase()===e.toLowerCase():n===e;if(n==="."||n===".."||!t&&n.startsWith(".")&&!e.startsWith("."))return!1;let r=Ga.get(e);return r||(r=new RegExp(`^${id(e)}$`,Ua?"i":""),Ga.set(e,r)),r.test(n)}function id(n){let e="";for(let t=0;t<n.length;t++){let r=n[t];if(r==="*")e+="[^/]*";else if(r==="?")e+="[^/]";else if(r==="["){let i=n.indexOf("]",t+2);if(i===-1){e+="\\[";continue}let s=n.slice(t+1,i),o=s.startsWith("!")||s.startsWith("^");o&&(s=s.slice(1)),e+=`[${o?"^":""}${s.replace(/[\]\\^]/g,a=>`\\${a}`)}]`,t=i}else e+=r.replace(/[.+^${}()|\]\\]/g,i=>`\\${i}`)}return e}function sd(n,e,t){let r=new Map,i=(s,o)=>{let a=`${s}:${o}`,c=r.get(a);if(c!==void 0)return c;let l;return s===n.length?l=o===e.length:n[s]==="**"?l=i(s+1,o)||o<e.length&&e[o]!=="."&&e[o]!==".."&&(t||!e[o].startsWith("."))&&i(s,o+1):l=o<e.length&&Ka(e[o],n[s],t)&&i(s+1,o+1),r.set(a,l),l};return i(0,0)}function od(n){let{root:e,segments:t}=Ya(n),r=e===""||e==="/"?[]:[e.replace(/\/$/,"")];return{absolute:e!=="",segments:[...r,...t],children:t[t.length-1]==="**"}}function ad(n){return n.replace(/\\/g,"/")}function Fn(n,e){return n===""?e:n.endsWith("/")?n+e:`${n}/${e}`}var Ui=class{constructor(e,t,r,i,s){this.segments=e;this.ignore=t;this.absoluteResults=r;this.found=s;this.cwdPosix=ad(i);let o=e.findIndex(a=>a==="**"||Wi.test(a));this.prefixLength=o===-1?e.length:o}segments;ignore;absoluteResults;found;cwdPosix;prefixLength;close(e){let t=new Set;for(let r of e)for(t.add(r);this.segments[r]==="**";)t.add(++r);return[...t]}start(e,t){this.walk(e,t,[0])}add(e){let t=Mn.resolve(this.cwdPosix,e);this.found.add(this.absoluteResults?t:Mn.relative(this.cwdPosix,t))}walk(e,t,r){let i=this.segments.length,s=this.close(r).filter(c=>c<i);if(s.length===0)return;let a=s.every(c=>!Wi.test(this.segments[c])&&this.segments[c]!=="**")?this.literalEntries(e,s):this.listEntries(e);for(let c of a){let l=[],d=[];for(let M of s){let G=this.segments[M];G==="**"?c.name.startsWith(".")||d.push(M):Ka(c.name,G,!1)&&l.push(M)}if(l.length===0&&d.length===0)continue;let f=Fn(e,c.name),p=Fn(t,c.name),g=Mn.resolve(this.cwdPosix,p),x=(Mn.relative(this.cwdPosix,g)||".").split("/"),A=g.split("/").filter(Boolean),L=x[0]==="..",O=this.ignore.filter(M=>sd(M.segments,M.absolute||L?A:x,!0)),T=d.length===0&&l.every(M=>M<this.prefixLength-1);if((l.some(M=>M+1===i)||l.some(M=>M+1<i&&this.close([M+1]).includes(i)&&(c.isLink||M<this.prefixLength))||d.some(M=>this.close([M]).includes(i)))&&O.length===0&&!c.isDir&&this.add(p),!c.isDir||!T&&O.some(M=>M.children))continue;let F=c.isLink?[...l.map(M=>M+1),...d.filter(M=>M>0).map(M=>M+1)]:[...l.map(M=>M+1),...d];F.length>0&&this.walk(f,p,F)}}listEntries(e){let t;try{t=ed(e,{withFileTypes:!0})}catch{return[]}return t.map(r=>({name:r.name,isLink:r.isSymbolicLink(),isDir:r.isSymbolicLink()?za(Fn(e,r.name)):r.isDirectory()}))}literalEntries(e,t){let r=[];for(let i of new Set(t.map(s=>this.segments[s]))){let s=Fn(e,i),o;try{o=Xf(s)}catch{continue}r.push({name:i,isLink:o.isSymbolicLink(),isDir:o.isSymbolicLink()?za(s):o.isDirectory()})}return r}};function za(n){try{return td(n).isDirectory()}catch{return!1}}var qn=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=yt(this.pattern),t=[];for(let r of e)try{let i=await ld(r),s=ud(r);t.push({path:r,name:Ja(r),basename:Ja(r,s),ext:s.slice(1),dir:cd(r),size:i.size,mtime:i.mtime.toISOString()})}catch{continue}return this.data=t,this.data}async query(e,t=[]){return qe(await this.loadData(),e,t)}async getAll(){return this.loadData()}async close(){this.data=null}};function Gi(n){return new qn(n)}import{dirname as Yi,relative as Bn,resolve as Qa,sep as Hn}from"node:path";var Za=">=5.0.0 <7.0.0",ot={namespace:{label:"Namespace",dir:"namespaces"},enum:{label:"Enumeration",dir:"enumerations"},class:{label:"Class",dir:"classes"},interface:{label:"Interface",dir:"interfaces"},type:{label:"Type Alias",dir:"type-aliases"},variable:{label:"Variable",dir:"variables"},function:{label:"Function",dir:"functions"},reference:{label:"Reference",dir:"references"}},fd=new Set(["hidden","ignore"]),dd={summary:"",tags:[],parameters:new Map,typeParameters:new Map,returns:""};function Xa(n){for(;n.length>0&&n[0].trim()==="";)n.shift();for(;n.length>0&&n[n.length-1].trim()==="";)n.pop();return n.join(`
865
+ `)}function hd(n){let e=[],t=0;for(let r=0;r<n.length;r++){if(n[r]==="`"){let i=1;for(;n[r+i]==="`";)i++;t===0?t=i:i===t&&(t=0),r+=i-1;continue}t===0&&n[r]==="@"&&(r===0||/\s/.test(n[r-1]))&&/[A-Za-z]/.test(n[r+1]??"")&&e.push(r)}return e}function pd(n){let t=n.replace(/^\/\*\*/,"").replace(/\*\/$/,"").split(/\r?\n/).map((o,a)=>a===0?o.trim():o.replace(/^\s*\*(?: |(?=\S)|$)/,"").replace(/\s+$/,"")),r=[{tag:null,lines:[]}],i=null;for(let o of t){let a=/^\s*(```+|~~~+)/.exec(o);if(a){let d=a[1];i===null?i=d[0].repeat(d.length):d.startsWith(i)&&(i=null)}let c=i===null&&!a?hd(o):[];if(c.length===0){r[r.length-1].lines.push(o);continue}let l=o.slice(0,c[0]).replace(/\s+$/,"");l!==""&&r[r.length-1].lines.push(l),c.forEach((d,f)=>{let p=o.slice(d,c[f+1]??o.length).replace(/\s+$/,""),g=/^@([A-Za-z][\w-]*)\s*([\s\S]*)$/.exec(p);r.push({tag:g[1],lines:[g[2]]})})}let s={summary:Xa(r[0].lines),tags:[],parameters:new Map,typeParameters:new Map,returns:""};for(let o of r.slice(1)){let a=o.tag,c=Xa(o.lines);if(a==="param"||a==="template"||a==="typeParam"){let l=/^(?:\{[^}]*\}\s*)?\[?([\w$.]+)(?:=[^\]]*)?\]?\s*(?:-\s*)?([\s\S]*)$/.exec(c);if(l){let d=a==="param"?s.parameters:s.typeParameters;!l[1].includes(".")&&!d.has(l[1])&&d.set(l[1],l[2].trim())}}else a==="returns"||a==="return"?s.returns=c.replace(/^\{[^}]*\}\s*/,""):s.tags.push({tag:a,text:c})}return s}async function md(){let n;try{n=await import("typescript")}catch(t){let r=t instanceof Error?t.message:String(t);throw new Error(`The "typescript" datasource needs the "typescript" package (${Za}). Install it in your project (npm install -D typescript). Cause: ${r}`,{cause:t})}let e=n.default??n;if(typeof e.createProgram!="function")throw new Error(`The "typescript" datasource needs the TypeScript compiler API (${Za}); the installed "typescript" package does not provide it.`);return e}function Gt(n){return n.split(Hn).join("/")}function gd(n){let e=n.map(i=>Yi(i).split(Hn)),t=e[0]??[],r=t.length;for(let i of e){let s=0;for(;s<r&&s<i.length&&i[s]===t[s];)s++;r=s}return t.slice(0,r).join(Hn)||Hn}var Ji=/\{@link(?:code|plain)?\s+([^}|\s]+)(?:\s*\|\s*|\s+)?([^}]*)\}/g;function _d(n){let e=new Map(n.map(t=>[t.name,t]));for(let t of n){let r=[],i=[...t.extends,...t.implements],s=(d,f)=>{r.push(d,...f.map(p=>p.text))},o=d=>{for(let f of d)i.push(f.constraint??"",f.default??"")},a=d=>{s(d.summary,d.tags),r.push(...d.parameters.map(f=>f.description)),i.push(...d.parameters.map(f=>f.type)),o(d.typeParameters),d.returns&&(r.push(d.returns.description),i.push(d.returns.type))};s(t.summary,t.tags),o(t.typeParameters),t.signatures.forEach(a);for(let d of t.members)s(d.summary,d.tags),d.type!==null&&i.push(d.type),d.signatures.forEach(a);let c=new Map,l=t.referenceOf?[t.referenceOf]:[];for(let d of r)for(let f of d.matchAll(Ji))l.push(f[1]);for(let d of i)for(let f of Qi(d))f.identifier&&l.push(f.text);for(let d of l){if(c.has(d))continue;let[f,...p]=d.split(/[.#]/),g=e.get(f??"");g&&c.set(d,{target:d,name:g.name,kind:g.kind,kindDir:g.kindDir,page:g.page,member:p.length>0?p.join("."):null})}t.links=[...c.values()]}}function Qi(n){let e=[],t=/(['"`])(?:\\.|(?!\1)[^\\])*\1|[A-Za-z_$][\w$]*/g,r=0;for(let i of n.matchAll(t)){let s=i[1]===void 0,o=n[i.index-1]===".";!s||o||(i.index>r&&e.push({text:n.slice(r,i.index),identifier:!1}),e.push({text:i[0],identifier:!0}),r=i.index+i[0].length)}return r<n.length&&e.push({text:n.slice(r),identifier:!1}),e}function yd(n,e){return n<e?-1:n>e?1:0}function zi(n,e){let t=n.toLowerCase(),r=e.toLowerCase();return t!==r?t<r?-1:1:n<e?-1:n>e?1:0}var Ki=class{constructor(e,t,r,i){this.ts=e;this.program=t;this.checker=r;this.options=i;this.typeFlags=e.TypeFormatFlags.NoTruncation|e.TypeFormatFlags.UseAliasDefinedOutsideCurrentScope}ts;program;checker;options;typeFlags;extract(e){let{ts:t,checker:r}=this,i=new Map;for(let a of e){let c=this.program.getSourceFile(a);if(!c)throw new Error(`TypeScript entry point not found in the program: ${a}`);let l=r.getSymbolAtLocation(c);if(l)for(let d of r.getExportsOfModule(l)){let f=d.flags&t.SymbolFlags.Alias?r.getAliasedSymbol(d):d,p=i.get(f)??[];p.some(g=>g.name===d.name)||p.push(d),i.set(f,p)}}let s=[];for(let[a,c]of i){let l=c.find(f=>f.name===a.name)??c[0],d=this.buildSymbol(l.name,a);if(d){s.push(d);for(let f of c){if(f===l)continue;let p=this.buildReference(f,d.symbol);p&&s.push(p)}}}s.sort((a,c)=>{if(this.options.sort==="source-order"){let l=yd(a.position[0],c.position[0]);if(l!==0)return l;if(a.position[1]!==c.position[1])return a.position[1]-c.position[1]}return zi(a.symbol.name,c.symbol.name)});let o=s.map(a=>a.symbol);return _d(o),o}buildReference(e,t){let r=e.declarations?.[0];if(!r)return null;let i=this.docOf(r);if(this.isHidden(i.tags))return null;let s=r.getSourceFile();return{symbol:{name:e.name,kind:"reference",kindLabel:ot.reference.label,kindDir:ot.reference.dir,category:null,summary:i.summary,tags:i.tags,code:null,typeParameters:[],extends:[],implements:[],signatures:[],members:[],source:this.sourceOf(r),abstract:!1,hasPage:!1,page:null,referenceOf:t.name,links:[]},position:[Gt(Bn(this.options.baseDir,s.fileName)),this.nameNode(r).getStart()]}}buildSymbol(e,t){let{ts:r}=this,i=(t.declarations??[]).filter(f=>!this.isExcludedFile(f)),s=this.primaryDeclaration(i);if(!s)return null;let o=this.kindOf(s);if(!o)return null;let a=this.docOf(s);if(this.isHidden(a.tags))return null;let c=a.tags.find(f=>f.tag==="category"),l={name:e,kind:o,kindLabel:ot[o].label,kindDir:ot[o].dir,category:c&&c.text.trim()||null,summary:a.summary,tags:a.tags,code:null,typeParameters:[],extends:[],implements:[],signatures:[],members:[],source:this.sourceOf(s),abstract:r.isClassDeclaration(s)&&this.modifiers(s).has(r.SyntaxKind.AbstractKeyword),hasPage:this.options.pages.has(o),page:this.options.pages.has(o)?`${ot[o].dir}/${e}.md`:null,referenceOf:null,links:[]};if(r.isClassDeclaration(s))l.typeParameters=this.typeParameters(s.typeParameters,a),this.heritage(s,l),l.members=this.members(s.members,e);else if(r.isInterfaceDeclaration(s)){l.typeParameters=this.typeParameters(s.typeParameters,a);let f=i.filter(r.isInterfaceDeclaration);for(let p of f)this.heritage(p,l);l.members=f.flatMap(p=>this.members(p.members,e))}else if(r.isEnumDeclaration(s))l.members=i.filter(r.isEnumDeclaration).flatMap(f=>f.members.map(p=>this.enumMember(p))).filter(f=>f!==null);else if(r.isTypeAliasDeclaration(s)){l.typeParameters=this.typeParameters(s.typeParameters,a);let f=this.typeParameterList(s.typeParameters);l.code=`type ${e}${f} = ${s.type.getText()};`,r.isTypeLiteralNode(s.type)&&(l.members=this.members(s.type.members,e))}else if(o==="function")l.signatures=this.functionSignatures(e,t,s);else if(r.isVariableDeclaration(s)){let f=(r.getCombinedNodeFlags(s)&r.NodeFlags.Const)!==0,p=s.type?s.type.getText():this.checker.typeToString(this.checker.getTypeAtLocation(s.name),void 0,this.typeFlags);l.code=`${f?"const":"let"} ${e}: ${p};`,l.members=this.variableMembers(s)}let d=s.getSourceFile();return{symbol:l,position:[Gt(Bn(this.options.baseDir,d.fileName)),this.nameNode(s).getStart()]}}isExcludedFile(e){if(!this.options.excludeExternals)return!1;let t=e.getSourceFile();return this.program.isSourceFileFromExternalLibrary(t)||this.program.isSourceFileDefaultLibrary(t)||Gt(t.fileName).includes("/node_modules/")}primaryDeclaration(e){let{ts:t}=this,r=[t.isClassDeclaration,t.isInterfaceDeclaration,t.isEnumDeclaration,t.isTypeAliasDeclaration,t.isFunctionDeclaration,t.isVariableDeclaration,t.isModuleDeclaration];for(let i of r){let s=e.find(i);if(s)return s}}kindOf(e){let{ts:t}=this;if(t.isClassDeclaration(e))return"class";if(t.isInterfaceDeclaration(e))return"interface";if(t.isEnumDeclaration(e))return"enum";if(t.isTypeAliasDeclaration(e))return"type";if(t.isFunctionDeclaration(e))return"function";if(t.isModuleDeclaration(e))return"namespace";if(t.isVariableDeclaration(e)){let r=e.initializer;return r!==void 0&&(t.isArrowFunction(r)||t.isFunctionExpression(r))&&!e.type?"function":"variable"}return null}nameNode(e){return e.name??e}sourceOf(e){let t=e.getSourceFile(),r=t.getLineAndCharacterOfPosition(this.nameNode(e).getStart()).line+1,i=Gt(Bn(this.options.baseDir,t.fileName)),s=Gt(Bn(this.options.displayDir,t.fileName)),o=null,a=this.options.sourceLinkTemplate;return a&&(o=a.replace(/\{gitRevision\}/g,this.options.gitRevision??"").replace(/\{path\}/g,()=>i.split("/").map(encodeURIComponent).join("/")).replace(/\{line\}/g,String(r))),{file:s,path:i,line:r,url:o}}docOf(e){let{ts:t}=this,r=t.getJSDocCommentsAndTags(e).filter(t.isJSDoc),i=r[r.length-1];return i?pd(i.getSourceFile().text.slice(i.pos,i.end)):dd}isHidden(e){return e.some(t=>fd.has(t.tag)||this.options.excludeInternal&&t.tag==="internal")}typeText(e,t){return e?e.getText():this.checker.typeToString(t(),void 0,this.typeFlags)}typeParameterList(e){return!e||e.length===0?"":`<${e.map(t=>t.getText()).join(", ")}>`}typeParameters(e,t){return e?e.map(r=>({name:r.name.text,constraint:r.constraint?r.constraint.getText():null,default:r.default?r.default.getText():null,description:t.typeParameters.get(r.name.text)??""})):[]}heritage(e,t){let{ts:r}=this;for(let i of e.heritageClauses??[]){let s=i.types.map(o=>o.getText());i.token===r.SyntaxKind.ExtendsKeyword?t.extends.push(...s):t.implements.push(...s)}}parameters(e,t){let{ts:r}=this;return e.map(i=>({name:i.name.getText(),type:this.typeText(i.type,()=>this.checker.getTypeAtLocation(i)),optional:i.questionToken!==void 0||i.initializer!==void 0,rest:i.dotDotDotToken!==void 0,defaultValue:i.initializer?i.initializer.getText():null,description:r.isIdentifier(i.name)?t.parameters.get(i.name.text)??"":""}))}parameterCode(e){return e.map(t=>`${t.rest?"...":""}${t.name}${t.optional&&!t.rest?"?":""}: ${t.type}`).join(", ")}returnsOf(e,t,r){return{type:e.type?e.type.getText():t?this.checker.typeToString(this.checker.getReturnTypeOfSignature(t),void 0,this.typeFlags):"void",description:r.returns}}signature(e,t,r,i="",s=e){let o=this.docOf(s),a=this.parameters(e.parameters,o),c=this.typeParameters(e.typeParameters,o),l=this.checker.getSignatureFromDeclaration(e),d=null,f="";r==="construct"?f=`: ${i}`:r!=="set"&&(d=this.returnsOf(e,l,o),f=`: ${d.type}`);let p=this.typeParameterList(e.typeParameters);return{code:`${t}${p}(${this.parameterCode(a)})${f};`,summary:o.summary,tags:o.tags,typeParameters:c,parameters:a,returns:d,source:this.sourceOf(s)}}publicOverloads(e){let t=e.filter(r=>!("body"in r)||r.body===void 0);return t.length>0?t:e}functionSignatures(e,t,r){let{ts:i}=this;if(i.isVariableDeclaration(r)){let o=r.initializer;return o&&(i.isArrowFunction(o)||i.isFunctionExpression(o))?[this.signature(o,`function ${e}`,"call","",r)]:[]}let s=(t.declarations??[]).filter(i.isFunctionDeclaration);return this.publicOverloads(s).map(o=>this.signature(o,`function ${e}`,"call"))}modifiers(e){let{ts:t}=this,r=t.canHaveModifiers(e)?t.getModifiers(e)??[]:[];return new Set(r.map(i=>i.kind))}isPrivate(e,t){let r=e.name;return t.has(this.ts.SyntaxKind.PrivateKeyword)||r!==void 0&&this.ts.isPrivateIdentifier(r)}members(e,t){let{ts:r}=this,i=new Map,s=[];for(let a of e){if(r.isClassStaticBlockDeclaration(a)||r.isSemicolonClassElement(a))continue;let c=this.modifiers(a);if(this.options.excludePrivate&&this.isPrivate(a,c))continue;let l;if(r.isConstructorDeclaration(a)||r.isConstructSignatureDeclaration(a))l="constructor";else if(r.isCallSignatureDeclaration(a))l="()";else if(r.isIndexSignatureDeclaration(a))l=`[${a.parameters.map(d=>d.getText()).join(", ")}]`;else{let d=a.name?a.name.getText():"";l=`${c.has(r.SyntaxKind.StaticKeyword)?"static ":""}${d}`}i.has(l)||(i.set(l,[]),s.push(l)),i.get(l).push(a)}let o=[];for(let a of s){let c=this.member(i.get(a),t);c&&o.push(c),a==="constructor"&&o.push(...this.parameterProperties(i.get(a)))}return this.options.sort==="alphabetical"&&o.sort((a,c)=>zi(a.name,c.name)),o}member(e,t){let{ts:r}=this,i=e[0],s=this.docOf(i);if(this.isHidden(s.tags))return null;let o=this.modifiers(i),a=o.has(r.SyntaxKind.StaticKeyword),c=o.has(r.SyntaxKind.AbstractKeyword),l=`${a?"static ":""}${c?"abstract ":""}`,d={static:a,readonly:o.has(r.SyntaxKind.ReadonlyKeyword),optional:i.questionToken!==void 0,protected:o.has(r.SyntaxKind.ProtectedKeyword),abstract:c,summary:s.summary,tags:s.tags,source:this.sourceOf(i)};if(r.isConstructorDeclaration(i)||r.isConstructSignatureDeclaration(i)){let p=this.publicOverloads(e),g=`${t}${this.ownerTypeArguments(i)}`;return{...d,name:"constructor",kind:"constructor",type:null,signatures:p.map(x=>this.signature(x,`new ${t}`,"construct",g))}}if(r.isCallSignatureDeclaration(i))return{...d,name:"()",kind:"call-signature",type:null,signatures:e.map(p=>this.signature(p,"","call"))};if(r.isIndexSignatureDeclaration(i)){let p=i.parameters.map(g=>g.getText()).join(", ");return{...d,name:`[${p}]`,kind:"index-signature",type:this.typeText(i.type,()=>this.checker.getTypeAtLocation(i)),signatures:[]}}let f=i.name?i.name.getText():"";if(r.isMethodDeclaration(i)||r.isMethodSignature(i)){let p=this.publicOverloads(e);return{...d,name:f,kind:"method",type:null,signatures:p.map(g=>this.signature(g,`${l}${f}`,"call"))}}if(r.isGetAccessorDeclaration(i)||r.isSetAccessorDeclaration(i)){let p=e.filter(r.isGetAccessorDeclaration),g=e.filter(r.isSetAccessorDeclaration);return{...d,name:f,kind:"accessor",type:null,signatures:[...p.map(x=>this.signature(x,`${l}get ${f}`,"get")),...g.map(x=>this.signature(x,`${l}set ${f}`,"set"))]}}return r.isPropertyDeclaration(i)||r.isPropertySignature(i)?{...d,name:f,kind:"property",type:this.typeText(i.type,()=>this.checker.getTypeAtLocation(i.name)),signatures:[]}:null}variableMembers(e){let{ts:t,checker:r}=this,i=r.getTypeAtLocation(e.name),s=i.isIntersection()?i.types:[i],o=[];for(let a of s){let c=a.getSymbol();if(!(!c||!(c.flags&(t.SymbolFlags.ObjectLiteral|t.SymbolFlags.TypeLiteral))))for(let l of r.getPropertiesOfType(a)){let d=l.valueDeclaration??l.declarations?.[0];if(!d)continue;let f=this.docOf(d);this.isHidden(f.tags)||o.push({name:l.name,kind:"property",static:!1,readonly:!1,optional:(l.flags&t.SymbolFlags.Optional)!==0,protected:!1,abstract:!1,type:r.typeToString(r.getTypeOfSymbolAtLocation(l,e),void 0,this.typeFlags),summary:f.summary,tags:f.tags,signatures:[],source:this.sourceOf(d)})}}return this.options.sort==="alphabetical"&&o.sort((a,c)=>zi(a.name,c.name)),o}parameterProperties(e){let{ts:t}=this,r=[];for(let i of e){if(!t.isConstructorDeclaration(i))continue;let s=this.docOf(i);for(let o of i.parameters){if(!t.isParameterPropertyDeclaration(o,i)||!t.isIdentifier(o.name))continue;let a=this.modifiers(o);this.options.excludePrivate&&a.has(t.SyntaxKind.PrivateKeyword)||r.push({name:o.name.text,kind:"property",static:!1,readonly:a.has(t.SyntaxKind.ReadonlyKeyword),optional:o.questionToken!==void 0||o.initializer!==void 0,protected:a.has(t.SyntaxKind.ProtectedKeyword),abstract:!1,type:this.typeText(o.type,()=>this.checker.getTypeAtLocation(o)),summary:s.parameters.get(o.name.text)??"",tags:[],signatures:[],source:this.sourceOf(o)})}}return r}ownerTypeArguments(e){let t=e.parent;return this.ts.isClassDeclaration(t)&&t.typeParameters&&t.typeParameters.length>0?`<${t.typeParameters.map(r=>r.name.text).join(", ")}>`:""}enumMember(e){let t=this.docOf(e);if(this.isHidden(t.tags))return null;let r=this.checker.getConstantValue(e);return{name:e.name.getText(),kind:"enum-member",static:!1,readonly:!0,optional:!1,protected:!1,abstract:!1,type:r===void 0?e.initializer?.getText()??null:JSON.stringify(r),summary:t.summary,tags:t.tags,signatures:[],source:this.sourceOf(e)}}},$n=class{type="typescript";data=null;config;constructor(e){let t=e.entry_points;if(!Array.isArray(t)||t.length===0||!t.every(o=>typeof o=="string"))throw new Error('TypeScript datasource requires "entry_points" (a list of file paths)');let r=e.source_link_template;if(r!==void 0&&typeof r!="string")throw new Error('TypeScript datasource "source_link_template" must be a string');if(typeof r=="string"&&r.includes("{gitRevision}")&&typeof e.git_revision!="string")throw new Error('TypeScript datasource "source_link_template" uses {gitRevision}; set "git_revision" (e.g. main)');let i=e.sort;if(i!==void 0&&i!=="source-order"&&i!=="alphabetical")throw new Error('TypeScript datasource "sort" must be "source-order" or "alphabetical"');let s=e.pages;if(s!==void 0&&(!Array.isArray(s)||!s.every(o=>typeof o=="string"&&o in ot)))throw new Error(`TypeScript datasource "pages" must be a list of kinds (${Object.keys(ot).join(", ")})`);for(let o of["exclude_internal","exclude_private","exclude_externals"])if(e[o]!==void 0&&typeof e[o]!="boolean")throw new Error(`TypeScript datasource "${o}" must be true or false`);this.config=e}async loadData(){if(this.data!==null)return this.data;let e=await md(),t=process.cwd(),r=this.config.entry_points.map(c=>Qa(t,c)),i=this.config.tsconfig?Qa(t,this.config.tsconfig):e.findConfigFile(Yi(r[0]),e.sys.fileExists),s={};if(i){let c=e.readConfigFile(i,e.sys.readFile);if(c.error)throw new Error(`Cannot read ${i}: ${e.flattenDiagnosticMessageText(c.error.messageText,`
866
+ `)}`);s=e.parseJsonConfigFileContent(c.config,e.sys,Yi(i)).options}s={...s,noEmit:!0};let o=e.createProgram({rootNames:r,options:s}),a=new Ki(e,o,o.getTypeChecker(),{excludeInternal:this.config.exclude_internal??!0,excludePrivate:this.config.exclude_private??!0,excludeExternals:this.config.exclude_externals??!0,pages:new Set(this.config.pages??[]),sourceLinkTemplate:this.config.source_link_template??null,gitRevision:this.config.git_revision??null,sort:this.config.sort??"source-order",baseDir:t,displayDir:gd(r)});return this.data=a.extract(r),this.data}async query(e,t=[]){return qe(await this.loadData(),e,t)}async getAll(){return this.loadData()}async close(){this.data=null}};function Zi(n){return new $n(n)}async function bd(n,e){if(e&&Object.hasOwn(e,n.type))return e[n.type].create(n);switch(n.type){case"sqlite":return Mi(n);case"csv":return Bi(n);case"json":return Hi(n);case"yaml":return $i(n);case"glob":return Gi(n);case"typescript":return Zi(n);default:throw new Error(`Unknown datasource type: "${n.type}". Register custom types in datasources_dir.`)}}async function zt(n,e){let t={};if(n.datasources)for(let[r,i]of Object.entries(n.datasources))t[r]=await bd(i,e);return t}async function Yt(n){for(let e of Object.values(n))await e.close()}import{readFile as Ad,writeFile as Pd}from"node:fs/promises";import{resolve as dl}from"node:path";var wd={html:{start:"<!--",end:"-->"},block:{start:"/*",end:"*/"},line:{start:"//",end:""},hash:{start:"#",end:""},sql:{start:"--",end:""}};function tl(n){let e={},t=/(\w+)=["']([^"']*)["']/g,r;for(;(r=t.exec(n))!==null;){let i=r[1],s=r[2];i&&s!==void 0&&(e[i]=s)}return e}function jn(n){let e=n.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);if(!e)return{data:{},content:n,raw:""};let t=e[1]??"",r=Fe.load(t);return{data:r&&typeof r=="object"&&!Array.isArray(r)?r:{},content:n.slice(e[0].length),raw:e[0]}}function Wn(n){let e=n.split(".").pop()?.toLowerCase()??"";return e==="md"||e==="markdown"||e==="mdx"}function nl(n){let e=[],t=null,r=0;for(let i of n.split(`
867
+ `)){let s=r+i.length+1,o=/^ {0,3}(`{3,}|~{3,})(.*)$/.exec(i.replace(/\r$/,""));if(o){let a=o[1];t===null?a[0]==="`"&&o[2].includes("`")||(t={char:a[0],length:a.length,start:r}):a[0]===t.char&&a.length>=t.length&&o[2].trim()===""&&(e.push([t.start,Math.min(s,n.length)]),t=null)}r=s}return t!==null&&e.push([t.start,n.length]),e}function Xi(n){return e=>n.some(([t,r])=>e>=t&&e<r)}function rl(n,e,t,r){let i=new RegExp(n.source,n.flags.includes("g")?n.flags:n.flags+"g");i.lastIndex=t;let s;for(;(s=i.exec(e))!==null;){if(!r(s.index))return s;s[0].length===0&&i.lastIndex++}return null}function bt(n,e,t={}){let r=[],{start:i,end:s}=e,o=Xi(t.markdown?nl(n):[]),a=Vn(i),c=s?Vn(s):"",l;s?l=new RegExp(`${a}\\s*@embedoc:(?!end\\b)(\\w+)\\s*([^]*?)\\s*${c}`,"g"):l=new RegExp(`${a}\\s*@embedoc:(?!end\\b)(\\w+)\\s*(.*)$`,"gm");let d;s?d=new RegExp(`${a}\\s*@embedoc:end\\s*${c}`):d=new RegExp(`${a}\\s*@embedoc:end\\s*$`,"m");let f;for(;(f=l.exec(n))!==null;){let p=f.index;if(o(p))continue;let g=f[0],x=f[1],A=f[2]?.trim()??"",L=p+g.length,O=n.slice(L),T=rl(d,n,L,o),D=T&&{index:T.index-L,0:T[0]};if(D){let M=/(?:^|\n)([ \t]+)$/.exec(O.slice(0,D.index))?.[1]??"",G=D.index-M.length,J=M+D[0],W=L+G+J.length,X=O.slice(0,G);x&&r.push({startIndex:p,endIndex:W,templateName:x,params:tl(A),existingContent:X,startMarkerLine:g,endMarkerLine:J}),l.lastIndex=W}}return r}function Un(n,e){let r={...wd,...e}[n];if(!r)throw new Error(`Unknown comment style: ${n}`);return r}function el(n,e){return n.slice(0,e).split(`
868
+ `).length}function il(n,e,t={}){let r=[],{start:i,end:s}=e,o=Xi(t.markdown?nl(n):[]),a=Xi(bt(n,e,t).map(x=>[x.startIndex,x.endIndex])),c=x=>o(x)||a(x),l=Vn(i),d=s?Vn(s):"",f,p;s?(f=new RegExp(`${l}\\s*@embedoc-data:(?!end\\s*${d})([\\w.]+)(?:\\s+([^\\n]*?))?\\s*${d}`,"g"),p=new RegExp(`${l}\\s*@embedoc-data:end\\s*${d}`)):(f=new RegExp(`${l}\\s*@embedoc-data:(?!end\\s*$)([\\w.]+)(?:\\s+(.*))?$`,"gm"),p=new RegExp(`${l}\\s*@embedoc-data:end\\s*$`,"m"));let g;for(;(g=f.exec(n))!==null;){let x=g.index;if(c(x))continue;let A=g[0],L=g[1],O=g[2]?.trim()??"";if(!L||L==="end")continue;let D=tl(O).format??"yaml",F=x+A.length,M=n.slice(F),G=rl(p,n,F,c),J=G&&{index:G.index-F,0:G[0]};if(J){let W=M.slice(0,J.index),X=el(n,x),ne=el(n,F+J.index+J[0].length);r.push({name:L,format:D,content:W,startLine:X,endLine:ne,byteSize:Buffer.byteLength(W,"utf-8")})}}return r}function Vn(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function sl(n){return n==null?"":String(n).replace(/\|/g,"\\|").replace(/\n/g,"<br>")}function Gn(n,e){let t=Math.max(0,...(n.match(/`+/g)??[]).map(r=>r.length));return"`".repeat(Math.max(e,t+1))}function ol(){return{table(n,e){if(n.length===0)return"";let t=[],r="| "+n.map(sl).join(" | ")+" |";t.push(r);let i="| "+n.map(()=>"---").join(" | ")+" |";t.push(i);for(let s of e){let a="| "+n.map((c,l)=>sl(s[l])).join(" | ")+" |";t.push(a)}return t.join(`
869
+ `)},list(n,e=!1){return n.map((t,r)=>`${e?`${r+1}.`:"-"} ${t}`).join(`
870
+ `)},codeBlock(n,e=""){let t=Gn(n,3);return t+e+`
871
+ `+n+`
872
+ `+t},link(n,e){return`[${n}](${e})`},heading(n,e=1){return`${"#".repeat(Math.min(Math.max(e,1),6))} ${n}`},bold(n){return`**${n}**`},italic(n){return`*${n}*`},checkbox(n){return n?"\u2714":""}}}import al from"node:path";var ts=["^```\\w*\\s*\\n?","\\n?```\\s*$"],vd={enabled:!0,maxBytes:10240,allowedFormats:["yaml","json","csv","table","text"],conflictPolicy:"warn",allowAnonymous:!1,stripCodeFences:!0,stripPatterns:ts};function cl(n){return n.replace(/\[(\d+)\]/g,".$1").split(".").filter(e=>e.length>0).map(e=>/^\d+$/.test(e)?parseInt(e,10):e)}function ns(n,e){let t=cl(e),r=n;for(let i of t){if(r==null)return;r=r[i]}return r}var Sd=new Set(["__proto__","constructor","prototype"]);function ul(n,e,t){let r=cl(e);if(r.length===0)return;let i=r.find(a=>typeof a=="string"&&Sd.has(a));if(i!==void 0)throw new Error(`Reserved name "${i}" in path: ${e}`);let s=n;for(let a=0;a<r.length-1;a++){let c=r[a],l=r[a+1];if(typeof c=="number")throw new Error(`Array index in middle of path not supported: ${e}`);Object.hasOwn(s,c)||(s[c]=typeof l=="number"?[]:{}),s=s[c]}let o=r[r.length-1];s[o]=t}function xd(n){let e=n.indexOf(".");return e===-1?n:n.slice(0,e)}function Cd(n,e){let t=n.trim();for(let r of e){let i=new RegExp(r);t=t.replace(i,"")}return t.trim()}function ll(n,e,t={},r){let{stripCodeFences:i=!0,stripPatterns:s}=t,o=n;i&&(o=Cd(o,s??ts));let a=o.trim();switch(e){case"yaml":return Fe.load(a,{schema:Fe.JSON_SCHEMA})??{};case"json":return a?JSON.parse(a):{};case"js":case"javascript":return a?new Function("return ("+a+")")():{};case"csv":return Ed(a);case"table":return kd(a);case"text":return a;default:{let c=r&&Object.hasOwn(r,e)?r[e]:void 0;return c?c(a):a}}}function Ed(n){let e=n.split(`
873
+ `).filter(s=>s.trim().length>0);if(e.length===0)return[];let t=e[0];if(!t)return[];let r=t.split(",").map(s=>s.trim()),i=[];for(let s=1;s<e.length;s++){let o=e[s];if(!o)continue;let a=o.split(",").map(l=>l.trim()),c={};r.forEach((l,d)=>{c[l]=a[d]??""}),i.push(c)}return i}function kd(n){let e=n.split(`
874
+ `).map(s=>s.trim()).filter(s=>s.length>0&&!s.match(/^\|[-:| ]+\|$/));if(e.length===0)return[];let t=e[0];if(!t)return[];let r=t.split("|").map(s=>s.trim()).filter(s=>s.length>0),i=[];for(let s=1;s<e.length;s++){let o=e[s];if(!o)continue;let a=o.split("|").map(d=>d.trim()),c=o.startsWith("|")?a.slice(1,-1):a,l={};r.forEach((d,f)=>{l[d]=c[f]??""}),i.push(l)}return i}var es=class{type="inline";format;documentPath;startLine;endLine;byteSize;data;_isObject;_locations;constructor(e,t,r,i,s,o,a=[]){this.data=e,this.format=t,this.documentPath=r,this.startLine=i,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 ns(this.data,e)}isObjectType(){return this._isObject}async close(){}merge(e,t){if(!this._isObject)throw new Error("Cannot merge into array datasource");ul(this.data,e,t)}getMeta(e="",t){let r=this._locations.find(i=>i.propertyPath===e);return r?this._buildLocation(r,t):null}getAllMeta(e){return this._locations.map(t=>this._buildLocation(t,e))}get locations(){return this._locations}_buildLocation(e,t){let r=this.documentPath;if(t){let i=al.dirname(t);r=al.relative(i,this.documentPath),r=r.replace(/\\/g,"/"),!r.startsWith(".")&&!r.startsWith("/")&&(r="./"+r)}return{propertyPath:e.propertyPath,absolutePath:this.documentPath,relativePath:r,startLine:e.startLine,endLine:e.endLine,contentStartLine:e.startLine+1,contentEndLine:e.endLine-1,format:e.format}}};function fl(n,e,t={},r){let i={...vd,...t},s=new Map;if(!i.enabled)return s;let o={stripCodeFences:i.stripCodeFences,stripPatterns:t.stripPatterns??ts},a=new Map;for(let c of n){if(c.byteSize>i.maxBytes)throw new Error(`Inline datasource "${c.name}" exceeds max size (${c.byteSize} > ${i.maxBytes} bytes)`);if(!(r!=null&&Object.hasOwn(r,c.format))&&!i.allowedFormats.includes(c.format))throw new Error(`Inline datasource "${c.name}" uses disallowed format "${c.format}"`);let d=xd(c.name);a.has(d)||a.set(d,[]),a.get(d).push(c)}for(let[c,l]of a){let d=l.find(O=>O.name===c),f,p="yaml",g=0,x=0,A=0,L=[];d?(f=ll(d.content,d.format,o,r),p=d.format,g=d.startLine,x=d.endLine,A=d.byteSize,L.push({propertyPath:"",startLine:d.startLine,endLine:d.endLine,format:d.format})):f={};for(let O of l)if(O.name!==c&&O.name.startsWith(c+".")){let T=O.name.slice(c.length+1),D=ll(O.content,O.format,o,r);(typeof f!="object"||f===null)&&(f={}),ul(f,T,D),L.push({propertyPath:T,startLine:O.startLine,endLine:O.endLine,format:O.format}),(g===0||O.startLine<g)&&(g=O.startLine),O.endLine>x&&(x=O.endLine),A+=O.byteSize}s.set(c,new es(f,p,e,g,x,A,L))}return s}function Od(n,e,t){let r={};for(let[i,s]of Object.entries(n))r[i]=s.replace(/\$\{(\w+(?:\.\w+|\[\d+\])*)\}/g,(o,a)=>{let c=a.split("."),l=c[0];if(!l)return"";let d=t.get(l);if(d){let p=c.slice(1).join(".");if(p){let x=ns(d.data,p);return x!=null?String(x):""}let g=d.data;return g!=null?String(g):""}let f=e;for(let p of c){if(f==null)return"";if(typeof f=="object")f=f[p];else return""}return f!=null?String(f):""});return r}async function Id(n,e,t,r,i,s,o=!1,a){let c={filePath:n,success:!0,markersUpdated:0,changed:!1};try{let l=Un(t.comment_style,s.comment_styles),{data:d,content:f,raw:p}=jn(e),g=p?p.split(`
875
+ `).length-1:0,x={markdown:Wn(n)},A=il(f,l,x);for(let W of A)W.startLine+=g,W.endLine+=g;let L=fl(A,n,s.inline_datasource,a),O={...i};for(let[W,X]of L){if(Object.hasOwn(O,W)){let ne=s.inline_datasource?.conflictPolicy??"warn";if(ne==="error")throw new Error(`Inline datasource "${W}" conflicts with external datasource (conflict_policy: error)`);if(ne==="prefer_external")continue;console.warn(`Warning: Inline datasource "${W}" overrides external datasource in ${n}`)}O[W]=X}let T=bt(f,l,x);if(T.length===0&&A.length===0)return c;let D=ol(),F=T.filter(W=>!r[W.templateName]);if(F.length>0){let W=F.map(X=>{let ne=g+f.slice(0,X.startIndex).split(`
876
+ `).length;return`"${X.templateName}" at ${n}:${ne}`});throw new Error(`Unknown embed ${W.join(", ")} (no renderer has this name)`)}let M=f,G=[...T].sort((W,X)=>X.startIndex-W.startIndex);for(let W of G){let X=r[W.templateName],ye={params:Od(W.params,d,L),frontmatter:d,datasources:O,markdown:D,filePath:n,existingContent:W.existingContent},oe=await X.render(ye);if(oe.content===null||oe.content===void 0)continue;let q=W.params.inline==="true"?W.startMarkerLine+oe.content+W.endMarkerLine:W.startMarkerLine+`
877
+ `+oe.content+`
878
+ `+W.endMarkerLine,me=bt(q,l,x);if(me.length!==1||me[0].endIndex!==q.length){let v=g+f.slice(0,W.startIndex).split(`
879
+ `).length;throw new Error(`Output of embed "${W.templateName}" at ${n}:${v} contains marker syntax that ends its block early (an end marker or an unclosed code fence)`)}M=M.slice(0,W.startIndex)+q+M.slice(W.endIndex),c.markersUpdated++}let J=p+M;if(J!==e&&(c.changed=!0,!o)){let X=(s.output?.line_ending??"lf")==="crlf"?J.replace(/\r?\n/g,`\r
880
+ `):J;await Pd(n,X,{encoding:s.output?.encoding??"utf-8"})}for(let W of L.values())await W.close()}catch(l){c.success=!1,c.error=l instanceof Error?l:new Error(String(l))}return c}async function Kt(n){return yt(n.pattern,{ignore:n.exclude??[]})}async function rs(n,e,t,r={}){let i=Date.now(),s=[],o=r.specificFiles&&r.specificFiles.length>0?new Set(r.specificFiles.map(c=>dl(c))):null;for(let c of n.targets){let l=await Kt(c);o&&(l=l.filter(d=>o.has(dl(d))));for(let d of l){r.verbose&&console.log(`Processing: ${d}`);try{let f=await Ad(d,{encoding:"utf-8"}),p=await Id(d,f,c,e,t,n,r.dryRun,r.customInlineFormats);s.push(p),r.verbose&&p.markersUpdated>0&&console.log(` Updated ${p.markersUpdated} marker(s)${p.changed?" (changed)":" (no changes)"}`)}catch(f){s.push({filePath:d,success:!1,markersUpdated:0,changed:!1,error:f instanceof Error?f:new Error(String(f))}),r.verbose&&console.error(` Error: ${f}`)}}}let a=Date.now()-i;return{totalFiles:s.length,successFiles:s.filter(c=>c.success).length,failedFiles:s.filter(c=>!c.success).length,totalMarkersUpdated:s.reduce((c,l)=>c+l.markersUpdated,0),results:s,duration:a}}var ue=Fr(ou(),1);import{readFile as Hm,writeFile as $m,mkdir as Vm,access as jm,unlink as Wm}from"node:fs/promises";import{dirname as du,isAbsolute as Um,join as Gm,relative as zm,resolve as Dr,sep as Ym}from"node:path";var Om=[{kind:"constructor",title:"Constructors"},{kind:"call-signature",title:"Call Signature"},{kind:"index-signature",title:"Indexable"},{kind:"property",title:"Properties"},{kind:"accessor",title:"Accessors"},{kind:"method",title:"Methods"},{kind:"enum-member",title:"Enumeration Members"}];var Im=new Set(["example","deprecated","see","default","defaultValue","internal","category"]),Tm=new Set(["example","deprecated","see","remarks","default","defaultValue","internal","category"]);function Dm(n){if(typeof n.name!="string"||typeof n.kind!="string"||typeof n.kindDir!="string"||!Array.isArray(n.members))throw new Error('Expected a record of the "typescript" datasource (ApiSymbol)');return n}function eo(n){return n.trim().toLowerCase().replace(/[^\p{L}\p{N}\s_-]/gu,"").replace(/\s/g,"-")}function Ce(n,e){return`${"#".repeat(Math.min(Math.max(n,1),6))} ${e}`}function an(n){return n.replace(/([\\`*_<>[\]|])/g,"\\$1")}function Oe(n){let e=n.replace(/\s+/g," ").trim(),t=Gn(e,1),r=e.includes("`")?" ":"";return`${t}${r}${e}${r}${t}`}function to(n){return n.replace(/\r?\n\s*\r?\n/g,"<br><br>").replace(/\s*\r?\n\s*/g," ").trim()}function Xs(n){return`| ${n.map(e=>e.replace(/(?<!\\)\|/g,"\\|")).join(" | ")} |`}function no(n,e){return[Xs(n),Xs(n.map(()=>"------")),...e.map(Xs)].join(`
881
+ `)}function ro(n,e){if(e.page!==null){let r=n.onOwnPage?`../${e.page}`:e.page;return e.member?`${r}#${eo(e.member)}`:r}let t=`#${eo(e.name)}`;return n.onOwnPage?`../${n.indexFile}${t}`:t}function Ye(n,e){return e.replace(Ji,(t,r,i)=>{let s=i.trim()||r,o=n.symbol.links.find(a=>a.target===r);return o?`[${Oe(s)}](${ro(n,o)})`:Oe(s)})}function on(n,e){let t=[],r="",i=()=>{r.trim()!==""?t.push(Oe(r)):r!==""&&t.push(" "),r=""};for(let s of Qi(e)){let o=s.identifier?n.symbol.links.find(a=>a.target===s.text):void 0;if(!o||o.name===n.symbol.name){r+=s.text;continue}i(),t.push(`[${Oe(s.text)}](${ro(n,o)})`)}return i(),t.join("")}function au(n){let e=`${n.file}:${n.line}`;return n.url?`Defined in: [${e}](${n.url})`:`Defined in: ${e}`}function lu(n){let e=Gn(n,3);return[`${e}ts`,n,e].join(`
882
+ `)}function Ke(n,e){return n.filter(t=>t.tag===e)}function Tr(n,e,t,r){let i=[];for(let a of Ke(t,"deprecated"))i.push(`> **Deprecated**${a.text?` ${Ye(n,a.text)}`:""}`);e&&i.push(Ye(n,e));for(let a of Ke(t,"remarks"))i.push(Ce(r,"Remarks"),Ye(n,a.text));for(let a of t){if(Tm.has(a.tag))continue;let c=a.tag.charAt(0).toUpperCase()+a.tag.slice(1);i.push(Ce(r,c)),a.text&&i.push(Ye(n,a.text))}let s=Ke(t,"example");if(s.length>0){i.push(Ce(r,s.length>1?"Examples":"Example"));for(let a of s){let[c="",...l]=a.text.split(`
883
+ `);c.trim()!==""&&!c.trimStart().startsWith("```")&&l.some(d=>d.trimStart().startsWith("```"))?i.push(Ce(r+1,an(c.trim())),l.join(`
884
+ `).trim()):i.push(a.text)}}let o=Ke(t,"see");return o.length>0&&i.push(Ce(r,"See"),o.map(a=>`- ${Ye(n,a.text)}`).join(`
885
+ `)),i}function Lm(n){let e=[],t=!1;for(let r of n.split(`
886
+ `)){if(/^\s*(```|~~~)/.test(r)){t=!t;continue}r.trim()!==""&&e.push(t?Oe(r):r.trim())}return e.join(" ")}function Rm(n,e,t){let r=[];for(let s of Ke(t,"deprecated"))r.push(`**Deprecated**${s.text?` ${s.text}`:""}`);e&&r.push(e);for(let s of t)Im.has(s.tag)||r.push(`**${s.tag.charAt(0).toUpperCase()+s.tag.slice(1)}**${s.text?` ${s.text}`:""}`);for(let s of[...Ke(t,"default"),...Ke(t,"defaultValue")])r.push(`**Default** ${Oe(s.text)}`);let i=Ke(t,"example");i.length>0&&r.push(`**${i.length>1?"Examples":"Example"}** ${i.map(s=>Lm(s.text)).join(" ")}`);for(let s of Ke(t,"see"))r.push(`**See** ${s.text}`);return to(Ye(n,r.join(`
887
+
888
+ `)))}function cu(n,e,t){if(e.length===0)return[];let r=e.some(o=>o.description),i=e.map(o=>{let a=o.name;o.constraint&&(a+=` extends ${o.constraint}`),o.default&&(a+=` = ${o.default}`);let c=[Oe(a)];return r&&c.push(to(Ye(n,o.description))),c}),s=r?["Type Parameter","Description"]:["Type Parameter"];return[Ce(t,"Type Parameters"),no(s,i)]}function uu(n,e,t){let r=[lu(e.code),au(e.source)];if(r.push(...Tr(n,e.summary,e.tags,t)),r.push(...cu(n,e.typeParameters,t)),e.parameters.length>0){let i=e.parameters.some(a=>a.description||a.defaultValue!==null),s=i?["Parameter","Type","Description"]:["Parameter","Type"],o=e.parameters.map(a=>{let c=`${a.rest?"...":""}${a.name}${a.optional&&!a.rest?"?":""}`,l=[Oe(c),on(n,a.type)];if(i){let d=Ye(n,a.description);a.defaultValue!==null&&(d+=`${d?" ":""}**Default** ${Oe(a.defaultValue)}`),l.push(to(d))}return l});r.push(Ce(t,"Parameters"),no(s,o))}return e.returns&&(r.push(Ce(t,"Returns"),on(n,e.returns.type)),e.returns.description&&r.push(Ye(n,e.returns.description))),r}function Nm(n){let e=n.kind==="method"?`${n.name}()`:n.name;return an(e)}function Mm(n,e,t){let r=[];for(let i of Om){let s=e.filter(o=>o.kind===i.kind);if(s.length!==0){if(r.push(Ce(t,i.title)),i.kind==="property"||i.kind==="enum-member"||i.kind==="index-signature"){let o=i.kind==="enum-member",a=o?["Member","Value","Description","Defined in"]:[i.kind==="index-signature"?"Index":"Property","Type","Description","Defined in"],c=s.map(l=>{let d=[l.static?"static":"",l.abstract?"abstract":"",l.readonly&&!o?"readonly":"",l.protected?"protected":""].filter(Boolean).join(" "),f=`<a id="${eo(l.name)}"></a> ${Oe(`${l.name}${l.optional?"?":""}`)}${d?` (${d})`:""}`,p=l.source.url?`[${l.source.file}:${l.source.line}](${l.source.url})`:`${l.source.file}:${l.source.line}`,g=l.type===null?"":o?Oe(l.type):on(n,l.type);return[f,g,Rm(n,l.summary,l.tags),p]});r.push(no(a,c));continue}s.forEach((o,a)=>{a>0&&r.push("***"),i.kind!=="call-signature"&&r.push(Ce(t+1,Nm(o)));let c=i.kind==="call-signature"?t+1:t+2,l=o.signatures.length===0?Tr(n,o.summary,o.tags,c):[];r.push(...l),o.signatures.forEach((d,f)=>{f>0&&r.push("***");let p=d.summary||d.tags.length>0?d:{...d,summary:o.summary,tags:o.tags};r.push(...uu(n,p,c))})})}}return r}function Fm(n,e){let t=n.symbol,r=[];if(t.referenceOf!==null){let i=t.links.find(o=>o.target===t.referenceOf),s=i?`[${an(t.referenceOf)}](${ro(n,{...i,member:null})})`:Oe(t.referenceOf);return r.push(`Renames and re-exports ${s}`),r.push(...Tr(n,t.summary,t.tags,e)),r}return t.code&&r.push(lu(t.code)),t.kind!=="function"&&(r.push(au(t.source)),r.push(...Tr(n,t.summary,t.tags,e))),t.extends.length>0&&r.push(Ce(e,"Extends"),t.extends.map(i=>`- ${on(n,i)}`).join(`
889
+ `)),t.implements.length>0&&r.push(Ce(e,"Implements"),t.implements.map(i=>`- ${on(n,i)}`).join(`
890
+ `)),t.kind!=="function"&&r.push(...cu(n,t.typeParameters,e)),t.kind==="function"&&t.signatures.forEach((i,s)=>{s>0&&r.push("***"),r.push(...uu(n,i,e))}),r.push(...Mm(n,t.members,e)),r}function qm(n,e){let t=e&&n.typeParameters.length>0?`<${n.typeParameters.map(i=>i.name).join(", ")}>`:"",r=n.kind==="function"?"()":"";return an(`${n.name}${r}${t}`)}function Bm(n,e,t){return{categoryOrder:e.categoryOrder??[],indexFile:e.indexFile??"README.md",onOwnPage:t,symbol:n}}function fu(n,e={}){let t=Dm(n),r=Bm(t,e,!0),i=`[API](../${r.indexFile}) / ${an(t.name)}`,s=t.abstract?`Abstract ${t.kindLabel}`:t.kindLabel,o=Ce(1,`${s}: ${qm(t,!0)}`);return[i,o,...Fm(r,2)].join(`
890
891
 
891
892
  `)+`
892
- `}function Cw(){ye.default.registerHelper("today",()=>new Date().toISOString().split("T")[0]),ye.default.registerHelper("datetime",()=>new Date().toISOString()),ye.default.registerHelper("eq",(t,e)=>t===e),ye.default.registerHelper("ne",(t,e)=>t!==e),ye.default.registerHelper("gt",(t,e)=>t>e),ye.default.registerHelper("lt",(t,e)=>t<e),ye.default.registerHelper("and",(...t)=>(t.pop(),t.every(Boolean))),ye.default.registerHelper("or",(...t)=>(t.pop(),t.some(Boolean))),ye.default.registerHelper("json",t=>JSON.stringify(t,null,2)),ye.default.registerHelper("uppercase",t=>String(t??"").toUpperCase()),ye.default.registerHelper("lowercase",t=>String(t??"").toLowerCase()),ye.default.registerHelper("capitalize",t=>{let e=String(t??"");return e.charAt(0).toUpperCase()+e.slice(1)}),ye.default.registerHelper("replace",(t,e,r)=>String(t??"").replace(new RegExp(e,"g"),r)),ye.default.registerHelper("api_page",(t,e)=>{let r=e.hash.index_file;return new ye.default.SafeString(nd(t,{indexFile:typeof r=="string"?r:void 0}))})}Cw();async function Ew(t,e){let r=await yw(t,{encoding:"utf-8"});return ye.default.compile(r)(e)}function kw(t,e){return t.replace(/\{([^}]+)\}/g,(r,n)=>{let i=e[n];return i!=null?String(i):""})}async function Aw(t){try{return await ww(t),!0}catch{return!1}}async function Ow(t,e,r,n,i=!1){let s=kw(e.output_path,t),o={filePath:s,success:!0,skipped:!1};try{if(await Aw(s)&&!e.overwrite)return o.skipped=!0,o;let l=xw(r,e.template),c=await Ew(l,t);if(!i){await bw(Sw(s),{recursive:!0});let h=(n.output?.line_ending??"lf")==="crlf"?c.replace(/\n/g,`\r
893
- `):c;await _w(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}function Pw(t,e){if(e===void 0)return t;let r=Object.entries(e).map(([n,i])=>{let s=Array.isArray(i)?i:[i];if(!s.every(o=>typeof o=="string"))throw new Error(`Generator "where.${n}" must be a string or a list of strings`);return{field:n,values:new Set(s)}});return t.filter(n=>r.every(({field:i,values:s})=>s.has(String(n[i]))))}async function Tw(t,e,r){let n=t.replace(/\{[^}]+\}/g,"*"),i=[];for(let s of(await Et(n,{nodir:!0})).sort()){if(e.has(id(s)))continue;let o={filePath:s,success:!0,skipped:!1,removed:!0};try{r||await vw(s)}catch(a){o.success=!1,o.error=a instanceof Error?a:new Error(String(a))}i.push(o)}return i}async function Dw(t,e,r,n,i={}){let s=[];if(!e.generators||e.generators.length===0)return i.verbose&&console.log(`No generators defined for datasource: ${t}`),s;let o=n.templates_dir??".embedoc/templates",a=await r.getAll();i.verbose&&console.log(`Found ${a.length} records in datasource: ${t}`);for(let l of e.generators){if(i.generatorName&&l.template!==i.generatorName)continue;i.verbose&&console.log(` Generator: ${l.template}`);let c=new Set;for(let f of Pw(a,l.where)){let h=await Ow(f,l,o,n,i.dryRun);s.push(h),c.add(id(h.filePath)),i.verbose&&(h.skipped?console.log(` Skipped (exists): ${h.filePath}`):h.success?console.log(` Generated: ${h.filePath}`):console.log(` Failed: ${h.filePath} - ${h.error?.message}`))}if(l.prune){let f=await Tw(l.output_path,c,i.dryRun??!1);if(s.push(...f),i.verbose)for(let h of f)console.log(` Removed: ${h.filePath}`)}}return s}async function sd(t,e,r={}){let n=[];if(!t.datasources)return n;for(let[i,s]of Object.entries(t.datasources)){if(r.datasourceName&&i!==r.datasourceName||!s.generators||s.generators.length===0)continue;let o=e[i];if(!o){r.verbose&&console.warn(`Datasource not initialized: ${i}`);continue}r.verbose&&console.log(`
894
- Processing datasource: ${i}`);let a=await Dw(i,s,o,t,r);n.push(...a)}return n}import{readFile as Iw}from"node:fs/promises";import{resolve as it,relative as qa}from"node:path";var lr=class{nodes=new Map;config;renderersDir;embeds;constructor(e,r){this.config=e,this.embeds=r,this.renderersDir=it(e.renderers_dir??e.embeds_dir??".embedoc/renderers")}getOrCreateNode(e,r){let n=it(r),i=this.nodes.get(n);return i||(i={type:e,path:n,dependsOn:new Set,dependedBy:new Set},this.nodes.set(n,i)),i}addDependency(e,r){let n=this.nodes.get(it(e)),i=this.nodes.get(it(r));n&&i&&(n.dependsOn.add(i.path),i.dependedBy.add(n.path))}async analyzeDocument(e,r){let n=it(e),i=this.getOrCreateNode("document",n);try{let s=await Iw(n,{encoding:"utf-8"}),o=ti(r.comment_style,this.config.comment_styles),{content:a}=Zn(s),l=ei(a,o,{markdown:Xn(e)}),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(i.dependsOn.add(m.path),m.dependedBy.add(i.path),h.dependsOn)for(let g of h.dependsOn){let _=this.config.datasources?.[g];if(_?.path){let O=it(_.path),b=this.getOrCreateNode("datasource",O);m.dependsOn.add(b.path),b.dependedBy.add(m.path)}}}}}catch{}}async build(){this.nodes.clear();for(let e of this.config.targets){let r=await qr(e);for(let n of r)await this.analyzeDocument(n,e)}}getAffectedDocuments(e){let r=it(e),n=new Set,i=this.nodes.get(r);if(!i){for(let a of this.nodes.values())if(a.type==="datasource"&&a.path===r){i=a;break}}if(!i&&e.endsWith(".ts")){let a=e.split("/").pop()?.replace(".ts","");if(a&&a!=="index"){let l=`embed:${a}`;if(i=this.nodes.get(it(l)),!i){let c=a.replace(/([A-Z])/g,"_$1").toLowerCase().replace(/^_/,"");i=this.nodes.get(it(`embed:${c}`))}}}if(!i)return this.nodes.get(r)?.type==="document"?[r]:[];let s=new Set,o=[i];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 r of Object.values(this.config.datasources))r.path&&e.push(it(r.path));return e.push(this.renderersDir),e}dump(){console.log(`
895
- === Dependency Graph ===`);for(let[e,r]of this.nodes){if(console.log(`
896
- [${r.type}] ${qa(process.cwd(),e)}`),r.dependsOn.size>0){console.log(" depends on:");for(let n of r.dependsOn)console.log(` - ${qa(process.cwd(),n)}`)}if(r.dependedBy.size>0){console.log(" depended by:");for(let n of r.dependedBy)console.log(` - ${qa(process.cwd(),n)}`)}}}};var Fw={version:"0.14.15"};async function $a(t){let e=Je(t),r=await cd(e,{encoding:"utf-8"});return t.endsWith(".json")?JSON.parse(r):Ze.load(r)}async function cr(t){try{return await Rw(t),!0}catch{return!1}}function ad(t){return t.renderers_dir?t.renderers_dir:t.embeds_dir?(console.warn(W.default.yellow('Warning: "embeds_dir" is deprecated. Use "renderers_dir" instead.')),t.embeds_dir):".embedoc/renderers"}var ld=!1;async function hd(t){return ld||(Mw(),ld=!0),Nw(t,import.meta.url)}async function ja(t){let e=Je(t,"index.ts"),r=Je(t,"index.js");try{if(await cr(e)){let n=await hd(e);return n.embeds??n.default?.embeds??{}}return await cr(r)?(await import(ud(r).href)).embeds??{}:{}}catch(n){let i=n instanceof Error?n.message:String(n);throw new Error(`Could not load renderers from ${t}: ${i}`,{cause:n})}}async function Wa(t){let e=Je(t,"index.ts"),r=Je(t,"index.js"),n={datasourceTypes:{},inlineFormats:{}};try{let i;return await cr(e)?i=await hd(e):await cr(r)&&(i=await import(ud(r).href)),i?{datasourceTypes:i.datasourceTypes??i.default?.datasourceTypes??{},inlineFormats:i.inlineFormats??i.default?.inlineFormats??{}}:n}catch(i){let s=i instanceof Error?i.message:String(i);throw new Error(`Could not load custom datasources from ${t}: ${s}`,{cause:i})}}var Bw={init:async t=>{try{console.log(W.default.cyan(`\u{1F4C1} Initializing embedoc...
897
- `));let e=[],r=[],n=async(l,c)=>{let f=Je(l);if(!t.force&&await cr(f)){r.push(l);return}let h=f.substring(0,f.lastIndexOf("/"));await Lw(h,{recursive:!0}),await od(f,c,{encoding:"utf-8"}),e.push(l)};await n("embedoc.config.yaml",`version: "1.0"
893
+ `}function Km(){ue.default.registerHelper("today",()=>new Date().toISOString().split("T")[0]),ue.default.registerHelper("datetime",()=>new Date().toISOString()),ue.default.registerHelper("eq",(n,e)=>n===e),ue.default.registerHelper("ne",(n,e)=>n!==e),ue.default.registerHelper("gt",(n,e)=>n>e),ue.default.registerHelper("lt",(n,e)=>n<e),ue.default.registerHelper("and",(...n)=>(n.pop(),n.every(Boolean))),ue.default.registerHelper("or",(...n)=>(n.pop(),n.some(Boolean))),ue.default.registerHelper("json",n=>JSON.stringify(n,null,2)),ue.default.registerHelper("uppercase",n=>String(n??"").toUpperCase()),ue.default.registerHelper("lowercase",n=>String(n??"").toLowerCase()),ue.default.registerHelper("capitalize",n=>{let e=String(n??"");return e.charAt(0).toUpperCase()+e.slice(1)}),ue.default.registerHelper("replace",(n,e,t)=>String(n??"").replace(new RegExp(e,"g"),t)),ue.default.registerHelper("api_page",(n,e)=>{let t=e.hash.index_file;return new ue.default.SafeString(fu(n,{indexFile:typeof t=="string"?t:void 0}))})}Km();async function Jm(n,e){let t=await Hm(n,{encoding:"utf-8"});return ue.default.compile(t)(e)}function Qm(n,e){return n.replace(/\{([^}]+)\}/g,(t,r)=>{let i=e[r];return i!=null?String(i):""})}function Zm(n,e){let t=n.indexOf("{");if(t===-1)return;let r=du(n.slice(0,t)+"_"),i=zm(Dr(r),Dr(e));if(i===""||i===".."||i.startsWith(`..${Ym}`)||Um(i))throw new Error(`Output path "${e}" is outside "${r}", where output_path "${n}" places its files`)}async function Xm(n){try{return await jm(n),!0}catch{return!1}}async function eg(n,e,t,r,i=!1){let s=Qm(e.output_path,n),o={filePath:s,success:!0,skipped:!1};try{if(Zm(e.output_path,s),await Xm(s)&&!e.overwrite)return o.skipped=!0,o;let c=Gm(t,e.template),l=await Jm(c,n);if(!i){await Vm(du(s),{recursive:!0});let f=(r.output?.line_ending??"lf")==="crlf"?l.replace(/\n/g,`\r
894
+ `):l;await $m(s,f,{encoding:r.output?.encoding??"utf-8"})}}catch(a){o.success=!1,o.error=a instanceof Error?a:new Error(String(a))}return o}function tg(n,e){if(e===void 0)return n;let t=Object.entries(e).map(([r,i])=>{let s=Array.isArray(i)?i:[i];if(!s.every(o=>typeof o=="string"))throw new Error(`Generator "where.${r}" must be a string or a list of strings`);return{field:r,values:new Set(s)}});return n.filter(r=>t.every(({field:i,values:s})=>s.has(String(r[i]))))}async function ng(n,e,t){let r=n.replace(/\{[^}]+\}/g,"*"),i=[];for(let s of yt(r)){if(e.has(Dr(s)))continue;let o={filePath:s,success:!0,skipped:!1,removed:!0};try{t||await Wm(s)}catch(a){o.success=!1,o.error=a instanceof Error?a:new Error(String(a))}i.push(o)}return i}async function rg(n,e,t,r,i={}){let s=[];if(!e.generators||e.generators.length===0)return i.verbose&&console.log(`No generators defined for datasource: ${n}`),s;let o=r.templates_dir??".embedoc/templates",a=await t.getAll();i.verbose&&console.log(`Found ${a.length} records in datasource: ${n}`);for(let c of e.generators){if(i.generatorName&&c.template!==i.generatorName)continue;i.verbose&&console.log(` Generator: ${c.template}`);let l=new Set;for(let d of tg(a,c.where)){let f=await eg(d,c,o,r,i.dryRun);s.push(f),l.add(Dr(f.filePath)),i.verbose&&(f.skipped?console.log(` Skipped (exists): ${f.filePath}`):f.success?console.log(` Generated: ${f.filePath}`):console.log(` Failed: ${f.filePath} - ${f.error?.message}`))}if(c.prune){let d=await ng(c.output_path,l,i.dryRun??!1);if(s.push(...d),i.verbose)for(let f of d)console.log(` Removed: ${f.filePath}`)}}return s}async function hu(n,e,t={}){let r=[];if(!n.datasources)return r;for(let[i,s]of Object.entries(n.datasources)){if(t.datasourceName&&i!==t.datasourceName||!s.generators||s.generators.length===0)continue;let o=e[i];if(!o){t.verbose&&console.warn(`Datasource not initialized: ${i}`);continue}t.verbose&&console.log(`
895
+ Processing datasource: ${i}`);let a=await rg(i,s,o,n,t);r.push(...a)}return r}import{readFile as ig}from"node:fs/promises";import{resolve as $e,relative as io}from"node:path";var Dt=class{nodes=new Map;config;renderersDir;embeds;constructor(e,t){this.config=e,this.embeds=t,this.renderersDir=$e(e.renderers_dir??e.embeds_dir??".embedoc/renderers")}getOrCreateNode(e,t){let r=$e(t),i=this.nodes.get(r);return i||(i={type:e,path:r,dependsOn:new Set,dependedBy:new Set},this.nodes.set(r,i)),i}addDependency(e,t){let r=this.nodes.get($e(e)),i=this.nodes.get($e(t));r&&i&&(r.dependsOn.add(i.path),i.dependedBy.add(r.path))}async analyzeDocument(e,t){let r=$e(e),i=this.getOrCreateNode("document",r);try{let s=await ig(r,{encoding:"utf-8"}),o=Un(t.comment_style,this.config.comment_styles),{content:a}=jn(s),c=bt(a,o,{markdown:Wn(e)}),l=new Set(c.map(d=>d.templateName));for(let d of l){let f=this.embeds[d];if(f){let p=`embed:${d}`,g=this.getOrCreateNode("embed",p);if(i.dependsOn.add(g.path),g.dependedBy.add(i.path),f.dependsOn)for(let x of f.dependsOn){let A=this.config.datasources?.[x];if(A?.path){let L=$e(A.path),O=this.getOrCreateNode("datasource",L);g.dependsOn.add(O.path),O.dependedBy.add(g.path)}}}}}catch{}}async build(){this.nodes.clear();for(let e of this.config.targets){let t=await Kt(e);for(let r of t)await this.analyzeDocument(r,e)}}getAffectedDocuments(e){let t=$e(e),r=new Set,i=this.nodes.get(t);if(!i){for(let a of this.nodes.values())if(a.type==="datasource"&&a.path===t){i=a;break}}if(!i&&e.endsWith(".ts")){let a=e.split("/").pop()?.replace(".ts","");if(a&&a!=="index"){let c=`embed:${a}`;if(i=this.nodes.get($e(c)),!i){let l=a.replace(/([A-Z])/g,"_$1").toLowerCase().replace(/^_/,"");i=this.nodes.get($e(`embed:${l}`))}}}if(!i)return this.nodes.get(t)?.type==="document"?[t]:[];let s=new Set,o=[i];for(;o.length>0;){let a=o.shift();if(!s.has(a.path)){s.add(a.path),a.type==="document"&&r.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(r)}getWatchPaths(){let e=[];if(this.config.datasources)for(let t of Object.values(this.config.datasources))t.path&&e.push($e(t.path));return e.push(this.renderersDir),e}dump(){console.log(`
896
+ === Dependency Graph ===`);for(let[e,t]of this.nodes){if(console.log(`
897
+ [${t.type}] ${io(process.cwd(),e)}`),t.dependsOn.size>0){console.log(" depends on:");for(let r of t.dependsOn)console.log(` - ${io(process.cwd(),r)}`)}if(t.dependedBy.size>0){console.log(" depended by:");for(let r of t.dependedBy)console.log(` - ${io(process.cwd(),r)}`)}}}};var cg={version:"0.14.16"};async function oo(n){let e=Ne(n),t=await _u(e,{encoding:"utf-8"});return n.endsWith(".json")?JSON.parse(t):Fe.load(t)}async function Lt(n){try{return await sg(n),!0}catch{return!1}}function mu(n){return n.renderers_dir?n.renderers_dir:n.embeds_dir?(console.warn(V.default.yellow('Warning: "embeds_dir" is deprecated. Use "renderers_dir" instead.')),n.embeds_dir):".embedoc/renderers"}var gu=!1;async function bu(n){return gu||(lg(),gu=!0),ag(n,import.meta.url)}async function ao(n){let e=Ne(n,"index.ts"),t=Ne(n,"index.js");try{if(await Lt(e)){let r=await bu(e);return r.embeds??r.default?.embeds??{}}return await Lt(t)?(await import(yu(t).href)).embeds??{}:{}}catch(r){let i=r instanceof Error?r.message:String(r);throw new Error(`Could not load renderers from ${n}: ${i}`,{cause:r})}}async function lo(n){let e=Ne(n,"index.ts"),t=Ne(n,"index.js"),r={datasourceTypes:{},inlineFormats:{}};try{let i;return await Lt(e)?i=await bu(e):await Lt(t)&&(i=await import(yu(t).href)),i?{datasourceTypes:i.datasourceTypes??i.default?.datasourceTypes??{},inlineFormats:i.inlineFormats??i.default?.inlineFormats??{}}:r}catch(i){let s=i instanceof Error?i.message:String(i);throw new Error(`Could not load custom datasources from ${n}: ${s}`,{cause:i})}}var ug={init:async n=>{try{console.log(V.default.cyan(`\u{1F4C1} Initializing embedoc...
898
+ `));let e=[],t=[],r=async(c,l)=>{let d=Ne(c);if(!n.force&&await Lt(d)){t.push(c);return}let f=d.substring(0,d.lastIndexOf("/"));await og(f,{recursive:!0}),await pu(d,l,{encoding:"utf-8"}),e.push(c)};await r("embedoc.config.yaml",`version: "1.0"
898
899
 
899
900
  targets:
900
901
  - pattern: "./docs/**/*.md"
@@ -910,7 +911,7 @@ datasources: {}
910
911
  # example_csv:
911
912
  # type: csv
912
913
  # path: "./data/example.csv"
913
- `),await n(".embedoc/renderers/index.ts",`/**
914
+ `),await r(".embedoc/renderers/index.ts",`/**
914
915
  * embedoc renderers
915
916
  *
916
917
  * Export your custom renderers here.
@@ -922,7 +923,7 @@ datasources: {}
922
923
  export const embeds = {
923
924
  // my_renderer: myRenderer,
924
925
  };
925
- `),await n(".embedoc/datasources/index.ts",`/**
926
+ `),await r(".embedoc/datasources/index.ts",`/**
926
927
  * embedoc custom datasources and inline format parsers
927
928
  *
928
929
  * datasourceTypes: register custom datasource types usable in embedoc.config.yaml
@@ -939,17 +940,17 @@ export const datasourceTypes = {
939
940
  export const inlineFormats = {
940
941
  // toml: (content: string) => parseToml(content),
941
942
  };
942
- `),await n(".embedoc/templates/.gitkeep","");let a=Je("package.json");if(await cr(a)){let l=await cd(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,g]of p)m in f||(f[m]=g,h=!0);if(h){c.scripts=f,await od(a,JSON.stringify(c,null,2)+`
943
- `,{encoding:"utf-8"}),console.log(W.default.green(" Updated package.json scripts:"));for(let[m,g]of p)l.includes(`"${m}"`)||console.log(W.default.gray(` "${m}": "${g}"`));console.log("")}}if(e.length>0){console.log(W.default.green(" Created:"));for(let l of e)console.log(W.default.gray(` ${l}`))}if(r.length>0){console.log(W.default.yellow(" Skipped (already exists):"));for(let l of r)console.log(W.default.gray(` ${l}`))}console.log(""),console.log(W.default.green("\u2705 embedoc initialized!")),console.log(""),console.log(" Next steps:"),console.log(W.default.cyan(" 1. Edit embedoc.config.yaml to configure targets and datasources")),console.log(W.default.cyan(" 2. Add renderers in .embedoc/renderers/")),console.log(W.default.cyan(" 3. Run: npx embedoc build"))}catch(e){console.error(W.default.red("\u274C Init failed:")),console.error(e instanceof Error?e.message:String(e)),process.exit(1)}},build:async(t,e)=>{let r=Date.now();try{console.log(W.default.cyan("\u{1F527} Loading configuration..."));let n=await $a(e.config??"embedoc.config.yaml"),i=n.datasources_dir??".embedoc/datasources",s=await Wa(i);console.log(W.default.cyan("\u{1F4E6} Initializing datasources..."));let o=await Fr(n,s.datasourceTypes);console.log(W.default.cyan("\u{1F4DD} Loading renderers..."));let a=ad(n),l=await ja(a);console.log(W.default.cyan("\u{1F504} Processing files..."));let c=await Bo(n,l,o,{dryRun:e.dryRun,verbose:e.verbose,specificFiles:t.length>0?t:void 0,customInlineFormats:s.inlineFormats});await Br(o);let f=Date.now()-r;console.log(""),console.log(W.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(W.default.red(` Failed: ${c.failedFiles}`)),console.log(` Duration: ${f}ms`),e.dryRun&&console.log(W.default.yellow(`
944
- (Dry run - no files were modified)`));for(let h of c.results)!h.success&&h.error&&(console.error(W.default.red(`
945
- Error in ${h.filePath}:`)),console.error(` ${h.error.message}`));process.exit(c.failedFiles>0?1:0)}catch(n){console.error(W.default.red("\u274C Build failed:")),console.error(n instanceof Error?n.message:String(n)),process.exit(1)}},generate:async t=>{let e=Date.now();try{!t.datasource&&!t.all&&(console.error(W.default.red("Error: Either --datasource or --all must be specified")),process.exit(1)),console.log(W.default.cyan("\u{1F527} Loading configuration..."));let r=await $a(t.config??"embedoc.config.yaml"),n=r.datasources_dir??".embedoc/datasources",i=await Wa(n);console.log(W.default.cyan("\u{1F4E6} Initializing datasources..."));let s=await Fr(r,i.datasourceTypes);console.log(W.default.cyan("\u{1F4C4} Generating files..."));let o=await sd(r,s,{dryRun:t.dryRun,verbose:t.verbose,datasourceName:t.datasource,generatorName:t.generator});await Br(s);let a=Date.now()-e,l=o.filter(p=>p.success&&!p.skipped&&!p.removed).length,c=o.filter(p=>p.success&&p.removed).length,f=o.filter(p=>p.skipped).length,h=o.filter(p=>!p.success).length;console.log(""),console.log(W.default.green("\u2705 Generation completed!")),console.log(` Generated: ${l}`),console.log(` Skipped (existing): ${f}`),c>0&&console.log(` Removed (prune): ${c}`),h>0&&console.log(W.default.red(` Failed: ${h}`)),console.log(` Duration: ${a}ms`),t.dryRun&&console.log(W.default.yellow(`
946
- (Dry run - no files were created)`));for(let p of o)!p.success&&p.error&&(console.error(W.default.red(`
947
- Error for ${p.filePath}:`)),console.error(` ${p.error.message}`));process.exit(h>0?1:0)}catch(r){console.error(W.default.red("\u274C Generation failed:")),console.error(r instanceof Error?r.message:String(r)),process.exit(1)}},watch:async t=>{try{console.log(W.default.cyan("\u{1F527} Loading configuration..."));let e=await $a(t.config??"embedoc.config.yaml"),r=e.datasources_dir??".embedoc/datasources",n=await Wa(r);console.log(W.default.cyan("\u{1F4E6} Initializing datasources..."));let i=await Fr(e,n.datasourceTypes);console.log(W.default.cyan("\u{1F4DD} Loading renderers..."));let s=Je(ad(e)),o=await ja(s);console.log(W.default.cyan("\u{1F517} Building dependency graph..."));let a=new lr(e,o);await a.build(),t.debugDeps&&a.dump();let l=e.targets.map(_=>_.pattern),c=a.getWatchPaths();console.log(W.default.cyan("\u{1F440} Watching for changes...")),console.log(` Document patterns: ${l.join(", ")}`),c.length>0&&console.log(` Additional paths: ${c.map(_=>Ha(process.cwd(),_)).join(", ")}`);let f=rc.watch([...l,...c],{ignored:["**/node_modules/**","**/.git/**"],persistent:!0,ignoreInitial:!0}),h=null,p=new Map,m=async()=>{let _=new Map(p);p.clear();let O=!1;for(let[S]of _)if(S.startsWith(s)&&S.endsWith(".ts")){console.log(W.default.yellow(`
948
- \u{1F504} Renderer changed: ${Ha(process.cwd(),S)}`)),console.log(W.default.cyan(" Reloading renderers..."));try{o=await ja(s),O=!0}catch(I){console.error(W.default.red(" Failed to reload renderers:"),I);return}}O&&(console.log(W.default.cyan(" Rebuilding dependency graph...")),a=new lr(e,o),await a.build());let b=new Set;for(let[S]of _){let I=a.getAffectedDocuments(S);for(let L of I)b.add(L)}if(b.size===0)for(let[S]of _){let I=Je(S);for(let L of e.targets)if((await qr(L)).some(z=>Je(z)===I)){b.add(I);break}}if(b.size===0){console.log(W.default.gray(`
949
- No affected documents found`));return}console.log(W.default.yellow(`
950
- \u{1F4DD} Rebuilding ${b.size} document(s)...`));for(let S of b)console.log(W.default.gray(` - ${Ha(process.cwd(),S)}`));try{await Br(i),i=await Fr(e,n.datasourceTypes);let S=await Bo(e,o,i,{verbose:t.verbose,specificFiles:Array.from(b),customInlineFormats:n.inlineFormats});S.totalMarkersUpdated>0?console.log(W.default.green(` \u2705 Updated ${S.totalMarkersUpdated} marker(s)`)):console.log(W.default.gray(" No markers updated")),a=new lr(e,o),await a.build()}catch(S){console.error(W.default.red(" \u274C Error:"),S)}},g=_=>O=>{p.set(Je(O),_),h&&clearTimeout(h),h=setTimeout(m,200)};f.on("change",g("change")),f.on("add",g("add")),process.on("SIGINT",async()=>{console.log(W.default.cyan(`
951
-
952
- \u{1F44B} Stopping watch...`)),await f.close(),await Br(i),process.exit(0)})}catch(e){console.error(W.default.red("\u274C Watch failed:")),console.error(e instanceof Error?e.message:String(e)),process.exit(1)}}};bc(Bw,Fw.version).parse();
943
+ `),await r(".embedoc/templates/.gitkeep","");let a=Ne("package.json");if(await Lt(a)){let c=await _u(a,{encoding:"utf-8"}),l=JSON.parse(c),d=l.scripts??{},f=!1,p=[["embedoc:build","embedoc build"],["embedoc:watch","embedoc watch"],["embedoc:generate","embedoc generate --all"]];for(let[g,x]of p)g in d||(d[g]=x,f=!0);if(f){l.scripts=d,await pu(a,JSON.stringify(l,null,2)+`
944
+ `,{encoding:"utf-8"}),console.log(V.default.green(" Updated package.json scripts:"));for(let[g,x]of p)c.includes(`"${g}"`)||console.log(V.default.gray(` "${g}": "${x}"`));console.log("")}}if(e.length>0){console.log(V.default.green(" Created:"));for(let c of e)console.log(V.default.gray(` ${c}`))}if(t.length>0){console.log(V.default.yellow(" Skipped (already exists):"));for(let c of t)console.log(V.default.gray(` ${c}`))}console.log(""),console.log(V.default.green("\u2705 embedoc initialized!")),console.log(""),console.log(" Next steps:"),console.log(V.default.cyan(" 1. Edit embedoc.config.yaml to configure targets and datasources")),console.log(V.default.cyan(" 2. Add renderers in .embedoc/renderers/")),console.log(V.default.cyan(" 3. Run: npx embedoc build"))}catch(e){console.error(V.default.red("\u274C Init failed:")),console.error(e instanceof Error?e.message:String(e)),process.exit(1)}},build:async(n,e)=>{let t=Date.now();try{console.log(V.default.cyan("\u{1F527} Loading configuration..."));let r=await oo(e.config??"embedoc.config.yaml"),i=r.datasources_dir??".embedoc/datasources",s=await lo(i);console.log(V.default.cyan("\u{1F4E6} Initializing datasources..."));let o=await zt(r,s.datasourceTypes);console.log(V.default.cyan("\u{1F4DD} Loading renderers..."));let a=mu(r),c=await ao(a);console.log(V.default.cyan("\u{1F504} Processing files..."));let l=await rs(r,c,o,{dryRun:e.dryRun,verbose:e.verbose,specificFiles:n.length>0?n:void 0,customInlineFormats:s.inlineFormats});await Yt(o);let d=Date.now()-t;console.log(""),console.log(V.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(V.default.red(` Failed: ${l.failedFiles}`)),console.log(` Duration: ${d}ms`),e.dryRun&&console.log(V.default.yellow(`
945
+ (Dry run - no files were modified)`));for(let f of l.results)!f.success&&f.error&&(console.error(V.default.red(`
946
+ Error in ${f.filePath}:`)),console.error(` ${f.error.message}`));process.exit(l.failedFiles>0?1:0)}catch(r){console.error(V.default.red("\u274C Build failed:")),console.error(r instanceof Error?r.message:String(r)),process.exit(1)}},generate:async n=>{let e=Date.now();try{!n.datasource&&!n.all&&(console.error(V.default.red("Error: Either --datasource or --all must be specified")),process.exit(1)),console.log(V.default.cyan("\u{1F527} Loading configuration..."));let t=await oo(n.config??"embedoc.config.yaml"),r=t.datasources_dir??".embedoc/datasources",i=await lo(r);console.log(V.default.cyan("\u{1F4E6} Initializing datasources..."));let s=await zt(t,i.datasourceTypes);console.log(V.default.cyan("\u{1F4C4} Generating files..."));let o=await hu(t,s,{dryRun:n.dryRun,verbose:n.verbose,datasourceName:n.datasource,generatorName:n.generator});await Yt(s);let a=Date.now()-e,c=o.filter(p=>p.success&&!p.skipped&&!p.removed).length,l=o.filter(p=>p.success&&p.removed).length,d=o.filter(p=>p.skipped).length,f=o.filter(p=>!p.success).length;console.log(""),console.log(V.default.green("\u2705 Generation completed!")),console.log(` Generated: ${c}`),console.log(` Skipped (existing): ${d}`),l>0&&console.log(` Removed (prune): ${l}`),f>0&&console.log(V.default.red(` Failed: ${f}`)),console.log(` Duration: ${a}ms`),n.dryRun&&console.log(V.default.yellow(`
947
+ (Dry run - no files were created)`));for(let p of o)!p.success&&p.error&&(console.error(V.default.red(`
948
+ Error for ${p.filePath}:`)),console.error(` ${p.error.message}`));process.exit(f>0?1:0)}catch(t){console.error(V.default.red("\u274C Generation failed:")),console.error(t instanceof Error?t.message:String(t)),process.exit(1)}},watch:async n=>{try{console.log(V.default.cyan("\u{1F527} Loading configuration..."));let e=await oo(n.config??"embedoc.config.yaml"),t=e.datasources_dir??".embedoc/datasources",r=await lo(t);console.log(V.default.cyan("\u{1F4E6} Initializing datasources..."));let i=await zt(e,r.datasourceTypes);console.log(V.default.cyan("\u{1F4DD} Loading renderers..."));let s=Ne(mu(e)),o=await ao(s);console.log(V.default.cyan("\u{1F517} Building dependency graph..."));let a=new Dt(e,o);await a.build(),n.debugDeps&&a.dump();let c=e.targets.map(A=>A.pattern),l=a.getWatchPaths();console.log(V.default.cyan("\u{1F440} Watching for changes...")),console.log(` Document patterns: ${c.join(", ")}`),l.length>0&&console.log(` Additional paths: ${l.map(A=>so(process.cwd(),A)).join(", ")}`);let d=Sa.watch([...c,...l],{ignored:["**/node_modules/**","**/.git/**"],persistent:!0,ignoreInitial:!0}),f=null,p=new Map,g=async()=>{let A=new Map(p);p.clear();let L=!1;for(let[T]of A)if(T.startsWith(s)&&T.endsWith(".ts")){console.log(V.default.yellow(`
949
+ \u{1F504} Renderer changed: ${so(process.cwd(),T)}`)),console.log(V.default.cyan(" Reloading renderers..."));try{o=await ao(s),L=!0}catch(D){console.error(V.default.red(" Failed to reload renderers:"),D);return}}L&&(console.log(V.default.cyan(" Rebuilding dependency graph...")),a=new Dt(e,o),await a.build());let O=new Set;for(let[T]of A){let D=a.getAffectedDocuments(T);for(let F of D)O.add(F)}if(O.size===0)for(let[T]of A){let D=Ne(T);for(let F of e.targets)if((await Kt(F)).some(G=>Ne(G)===D)){O.add(D);break}}if(O.size===0){console.log(V.default.gray(`
950
+ No affected documents found`));return}console.log(V.default.yellow(`
951
+ \u{1F4DD} Rebuilding ${O.size} document(s)...`));for(let T of O)console.log(V.default.gray(` - ${so(process.cwd(),T)}`));try{await Yt(i),i=await zt(e,r.datasourceTypes);let T=await rs(e,o,i,{verbose:n.verbose,specificFiles:Array.from(O),customInlineFormats:r.inlineFormats});T.totalMarkersUpdated>0?console.log(V.default.green(` \u2705 Updated ${T.totalMarkersUpdated} marker(s)`)):console.log(V.default.gray(" No markers updated")),a=new Dt(e,o),await a.build()}catch(T){console.error(V.default.red(" \u274C Error:"),T)}},x=A=>L=>{p.set(Ne(L),A),f&&clearTimeout(f),f=setTimeout(g,200)};d.on("change",x("change")),d.on("add",x("add")),process.on("SIGINT",async()=>{console.log(V.default.cyan(`
952
+
953
+ \u{1F44B} Stopping watch...`)),await d.close(),await Yt(i),process.exit(0)})}catch(e){console.error(V.default.red("\u274C Watch failed:")),console.error(e instanceof Error?e.message:String(e)),process.exit(1)}}};Ba(ug,cg.version).parse();
953
954
  /*! Bundled license information:
954
955
 
955
956
  chokidar/esm/index.js: